summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2004-04-11 22:50:30 +0000
committerHardeep Sidhu <dyp@pobox.com>2004-04-11 22:50:30 +0000
commit716fd7419d35c5c5a3d3d9260e049f74bb43743d (patch)
treefe2de053ca8fb2c48cdc17341d35b0259588690e /tools
parent99483dee1c4d8bcb6600c8407b4fadc76dab4e91 (diff)
downloadrockbox-716fd7419d35c5c5a3d3d9260e049f74bb43743d.tar.gz
rockbox-716fd7419d35c5c5a3d3d9260e049f74bb43743d.tar.bz2
rockbox-716fd7419d35c5c5a3d3d9260e049f74bb43743d.zip
Structures should not be const for simulator builds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4486 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/convbdf.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/convbdf.c b/tools/convbdf.c
index 6a2ebf692a..d972cc17ca 100644
--- a/tools/convbdf.c
+++ b/tools/convbdf.c
@@ -703,8 +703,14 @@ 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 const bitmap_t _font_bits[] = {\n"
+ "static FONT_CONST bitmap_t _font_bits[] = {\n"
};
ofp = fopen(path, "w");
@@ -799,7 +805,7 @@ int gen_c_source(struct font* pf, char *path)
if (pf->offset) {
/* output offset table*/
fprintf(ofp, "/* Character->glyph mapping. */\n"
- "static const unsigned long _sysfont_offset[] = {\n");
+ "static FONT_CONST unsigned long _sysfont_offset[] = {\n");
for (i=0; i<pf->size; ++i)
fprintf(ofp, " %ld,\t/* (0x%02x) */\n",
@@ -810,7 +816,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 const unsigned char _sysfont_width[] = {\n");
+ "static FONT_CONST unsigned char _sysfont_width[] = {\n");
for (i=0; i<pf->size; ++i)
fprintf(ofp, " %d,\t/* (0x%02x) */\n",
@@ -830,7 +836,7 @@ int gen_c_source(struct font* pf, char *path)
sprintf(buf, "0, /* fixed width*/");
fprintf(ofp, "/* Exported structure definition. */\n"
- "const struct font sysfont = {\n"
+ "FONT_CONST struct font sysfont = {\n"
" \"%s\",\n"
" %d,\n"
" %d,\n"