From f8a5802d8e6434a4ffb3f9e09b8c128c6bc7fc83 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Thu, 26 Aug 2004 22:05:35 +0000 Subject: Fixed pointer types & struct font git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5016 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/gray_putsxy.c | 2 +- firmware/drivers/lcd-recorder.c | 4 ++-- firmware/export/font.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/plugins/lib/gray_putsxy.c b/apps/plugins/lib/gray_putsxy.c index 20af8a3cbf..906b0e1b38 100644 --- a/apps/plugins/lib/gray_putsxy.c +++ b/apps/plugins/lib/gray_putsxy.c @@ -37,7 +37,7 @@ void gray_putsxy(int x, int y, const unsigned char *str) { int ch, width; - unsigned char *bits; + const unsigned char *bits; struct font *pf = _graybuf->curfont; if ((unsigned) x >= (unsigned) _graybuf->width diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index a791a79f4c..584ead91dc 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c @@ -407,7 +407,7 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str) if (width > 0) { unsigned int i; - unsigned char* bits = pf->bits + + const unsigned char* bits = pf->bits + (pf->offset ? pf->offset[ch] : (pf->height * ch)); if (ofs != 0) @@ -416,7 +416,7 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str) { lcd_bitmap (bits + ofs, x, y + i, width, MIN(8, pf->height - i), true); - bits = (bitmap_t *)((int)bits + gwidth); + bits += gwidth; } } else diff --git a/firmware/export/font.h b/firmware/export/font.h index fff7d05c0b..eeb8a36bf8 100644 --- a/firmware/export/font.h +++ b/firmware/export/font.h @@ -97,7 +97,6 @@ struct font { const unsigned short *offset; /* offsets into bitmap data*/ const unsigned char *width; /* character widths or NULL if fixed*/ int defaultchar; /* default char (not glyph index)*/ - long bits_size; /* # words of bitmap_t bits*/ }; /* font routines*/ -- cgit v1.2.3