summaryrefslogtreecommitdiff
path: root/tools/convbdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/convbdf.c')
-rw-r--r--tools/convbdf.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/tools/convbdf.c b/tools/convbdf.c
index d972cc17ca..ac88ea889b 100644
--- a/tools/convbdf.c
+++ b/tools/convbdf.c
@@ -703,14 +703,8 @@ int gen_c_source(struct font* pf, char *path)
703 " %s\n" 703 " %s\n"
704 "*/\n" 704 "*/\n"
705 "\n" 705 "\n"
706 "#ifdef SIMULATOR\n"
707 "#define FONT_CONST\n"
708 "#else\n"
709 "#define FONT_CONST const\n"
710 "#endif\n"
711 "\n"
712 "/* Font character bitmap data. */\n" 706 "/* Font character bitmap data. */\n"
713 "static FONT_CONST bitmap_t _font_bits[] = {\n" 707 "static bitmap_t _font_bits[] = {\n"
714 }; 708 };
715 709
716 ofp = fopen(path, "w"); 710 ofp = fopen(path, "w");
@@ -805,7 +799,7 @@ int gen_c_source(struct font* pf, char *path)
805 if (pf->offset) { 799 if (pf->offset) {
806 /* output offset table*/ 800 /* output offset table*/
807 fprintf(ofp, "/* Character->glyph mapping. */\n" 801 fprintf(ofp, "/* Character->glyph mapping. */\n"
808 "static FONT_CONST unsigned long _sysfont_offset[] = {\n"); 802 "static unsigned long _sysfont_offset[] = {\n");
809 803
810 for (i=0; i<pf->size; ++i) 804 for (i=0; i<pf->size; ++i)
811 fprintf(ofp, " %ld,\t/* (0x%02x) */\n", 805 fprintf(ofp, " %ld,\t/* (0x%02x) */\n",
@@ -816,7 +810,7 @@ int gen_c_source(struct font* pf, char *path)
816 /* output width table for proportional fonts*/ 810 /* output width table for proportional fonts*/
817 if (pf->width) { 811 if (pf->width) {
818 fprintf(ofp, "/* Character width data. */\n" 812 fprintf(ofp, "/* Character width data. */\n"
819 "static FONT_CONST unsigned char _sysfont_width[] = {\n"); 813 "static unsigned char _sysfont_width[] = {\n");
820 814
821 for (i=0; i<pf->size; ++i) 815 for (i=0; i<pf->size; ++i)
822 fprintf(ofp, " %d,\t/* (0x%02x) */\n", 816 fprintf(ofp, " %d,\t/* (0x%02x) */\n",
@@ -836,15 +830,15 @@ int gen_c_source(struct font* pf, char *path)
836 sprintf(buf, "0, /* fixed width*/"); 830 sprintf(buf, "0, /* fixed width*/");
837 831
838 fprintf(ofp, "/* Exported structure definition. */\n" 832 fprintf(ofp, "/* Exported structure definition. */\n"
839 "FONT_CONST struct font sysfont = {\n" 833 "struct font sysfont = {\n"
840 " \"%s\",\n" 834 " \"%s\",\n"
841 " %d,\n" 835 " %d,\n"
842 " %d,\n" 836 " %d,\n"
843 " %d,\n" 837 " %d,\n"
844 " %d,\n" 838 " %d,\n"
845 " %d,\n" 839 " %d,\n"
846 " (bitmap_t *)_font_bits,\n" 840 " _font_bits,\n"
847 " (unsigned long *)%s\n" 841 " %s\n"
848 " %s\n" 842 " %s\n"
849 " %d,\n" 843 " %d,\n"
850 " sizeof(_font_bits)/sizeof(bitmap_t),\n" 844 " sizeof(_font_bits)/sizeof(bitmap_t),\n"