Reverted my brainless const'ing of the font data
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4492 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
65ef9640d8
commit
7480ff900a
1 changed files with 6 additions and 12 deletions
|
@ -703,14 +703,8 @@ int gen_c_source(struct font* pf, char *path)
|
|||
" %s\n"
|
||||
"*/\n"
|
||||
"\n"
|
||||
"#ifdef SIMULATOR\n"
|
||||
"#define FONT_CONST\n"
|
||||
"#else\n"
|
||||
"#define FONT_CONST const\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
"/* Font character bitmap data. */\n"
|
||||
"static FONT_CONST bitmap_t _font_bits[] = {\n"
|
||||
"static bitmap_t _font_bits[] = {\n"
|
||||
};
|
||||
|
||||
ofp = fopen(path, "w");
|
||||
|
@ -805,7 +799,7 @@ int gen_c_source(struct font* pf, char *path)
|
|||
if (pf->offset) {
|
||||
/* output offset table*/
|
||||
fprintf(ofp, "/* Character->glyph mapping. */\n"
|
||||
"static FONT_CONST unsigned long _sysfont_offset[] = {\n");
|
||||
"static unsigned long _sysfont_offset[] = {\n");
|
||||
|
||||
for (i=0; i<pf->size; ++i)
|
||||
fprintf(ofp, " %ld,\t/* (0x%02x) */\n",
|
||||
|
@ -816,7 +810,7 @@ int gen_c_source(struct font* pf, char *path)
|
|||
/* output width table for proportional fonts*/
|
||||
if (pf->width) {
|
||||
fprintf(ofp, "/* Character width data. */\n"
|
||||
"static FONT_CONST unsigned char _sysfont_width[] = {\n");
|
||||
"static unsigned char _sysfont_width[] = {\n");
|
||||
|
||||
for (i=0; i<pf->size; ++i)
|
||||
fprintf(ofp, " %d,\t/* (0x%02x) */\n",
|
||||
|
@ -836,15 +830,15 @@ int gen_c_source(struct font* pf, char *path)
|
|||
sprintf(buf, "0, /* fixed width*/");
|
||||
|
||||
fprintf(ofp, "/* Exported structure definition. */\n"
|
||||
"FONT_CONST struct font sysfont = {\n"
|
||||
"struct font sysfont = {\n"
|
||||
" \"%s\",\n"
|
||||
" %d,\n"
|
||||
" %d,\n"
|
||||
" %d,\n"
|
||||
" %d,\n"
|
||||
" %d,\n"
|
||||
" (bitmap_t *)_font_bits,\n"
|
||||
" (unsigned long *)%s\n"
|
||||
" _font_bits,\n"
|
||||
" %s\n"
|
||||
" %s\n"
|
||||
" %d,\n"
|
||||
" sizeof(_font_bits)/sizeof(bitmap_t),\n"
|
||||
|
|
Loading…
Reference in a new issue