stat=CHAR;
if(argc==2) {
- fd=open(argv[1],O_WRONLY);
+ fd=open(argv[1],O_WRONLY|O_CREAT);
if(fd<0) {
perror("file open");
return fd;
for(font=0;font<=0xff;font++) {
/* print the font number */
- printf("\t/* %d 0x%02x",font,font);
- if((font>0x1f)&(font<0x7f))
- printf(" %c */\n",font);
- else
- printf(" */\n");
+ if(stat==CHAR) {
+ printf("\t/* %d 0x%02x",font,font);
+ if((font>0x1f)&(font<0x7f))
+ printf(" %c */\n",font);
+ else
+ printf(" */\n");
+ }
/* print the array content of the font */
for(col=0;col<8;col++) {