awtk/tools/font_gen/gen_ascii.c

19 lines
332 B
C
Raw Normal View History

2018-02-21 19:36:38 +08:00
#include <stdio.h>
2018-03-09 21:54:46 +08:00
#include <ctype.h>
2018-02-21 19:36:38 +08:00
int main(int argc, char* argv[]) {
2018-03-09 21:54:46 +08:00
unsigned char c = 0;
2018-02-21 19:36:38 +08:00
FILE* fp = fopen("ascii.txt", "wb+");
if (fp != NULL) {
2018-03-09 21:54:46 +08:00
for (c = 0; c < 128; c++) {
2018-04-13 10:25:58 +08:00
if (isprint(c) && !isspace(c)) {
2018-03-09 21:54:46 +08:00
printf("%c", c);
fprintf(fp, "%c", c);
}
2018-02-21 19:36:38 +08:00
}
fclose(fp);
}
return 0;
}