diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2004-08-01 21:50:57 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2004-08-01 21:50:57 +0000 |
| commit | abe77a1a2a1db4e6b9bcd4a8d14dc7abef0b2104 (patch) | |
| tree | d6ea7f30e04c644693dc50f9b112a5d2cbc0cd41 /apps | |
| parent | 27a4b60f1a0cd2bfef48f59acf236081fd3b787e (diff) | |
| download | rockbox-abe77a1a2a1db4e6b9bcd4a8d14dc7abef0b2104.zip rockbox-abe77a1a2a1db4e6b9bcd4a8d14dc7abef0b2104.tar.gz rockbox-abe77a1a2a1db4e6b9bcd4a8d14dc7abef0b2104.tar.bz2 rockbox-abe77a1a2a1db4e6b9bcd4a8d14dc7abef0b2104.tar.xz | |
More const policeing step 1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4978 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/main.c | 2 | ||||
| -rw-r--r-- | apps/misc.c | 4 | ||||
| -rw-r--r-- | apps/plugin.h | 6 | ||||
| -rw-r--r-- | apps/settings.c | 4 | ||||
| -rw-r--r-- | apps/settings.h | 6 | ||||
| -rw-r--r-- | apps/version.h | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/apps/main.c b/apps/main.c index 346c9bc..270f3d6 100644 --- a/apps/main.c +++ b/apps/main.c @@ -59,7 +59,7 @@ /*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */ -char appsversion[]=APPSVERSION; +const char appsversion[]=APPSVERSION; void init(void); diff --git a/apps/misc.c b/apps/misc.c index 2ee6627..582901f 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -114,7 +114,7 @@ int main(int argc, char **argv) #ifdef HAVE_LCD_BITMAP extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; -static unsigned char bmpheader[] = +static const unsigned char bmpheader[] = { 0x42, 0x4d, 0x3e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x40, 0x00, @@ -126,7 +126,7 @@ static unsigned char bmpheader[] = static unsigned char buf[112*8]; static unsigned char buf2[112*8]; -static char dummy[2] = {0, 0}; +static const char dummy[2] = {0, 0}; void screen_dump(void) { diff --git a/apps/plugin.h b/apps/plugin.h index 3d5f9a5..4656b05 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -111,7 +111,7 @@ struct plugin_api { /* lcd */ void (*lcd_clear_display)(void); - void (*lcd_puts)(int x, int y, unsigned char *string); + void (*lcd_puts)(int x, int y, const unsigned char *string); void (*lcd_puts_scroll)(int x, int y, unsigned char* string); void (*lcd_stop_scroll)(void); void (*lcd_set_contrast)(int x); @@ -125,7 +125,7 @@ struct plugin_api { void (*lcd_icon)(int icon, bool enable); #else void (*lcd_putsxy)(int x, int y, const unsigned char *string); - void (*lcd_puts_style)(int x, int y, unsigned char *str, int style); + void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style); void (*lcd_bitmap)(const unsigned char *src, int x, int y, int nx, int ny, bool clear); void (*lcd_drawline)(int x1, int y1, int x2, int y2); @@ -138,7 +138,7 @@ struct plugin_api { void (*lcd_fillrect)(int x, int y, int nx, int ny); void (*lcd_drawrect)(int x, int y, int nx, int ny); void (*lcd_invertrect)(int x, int y, int nx, int ny); - int (*lcd_getstringsize)(unsigned char *str, int *w, int *h); + int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h); void (*lcd_update)(void); void (*lcd_update_rect)(int x, int y, int width, int height); void (*scrollbar)(int x, int y, int width, int height, int items, diff --git a/apps/settings.c b/apps/settings.c index 0487f25..47969d1 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -67,7 +67,7 @@ void dac_line_in(bool enable); #endif struct user_settings global_settings; -char rec_base_directory[] = REC_BASE_DIR; +const char rec_base_directory[] = REC_BASE_DIR; #define CONFIG_BLOCK_VERSION 16 @@ -1513,7 +1513,7 @@ bool set_option(char* string, void* variable, enum optiontype type, #ifdef HAVE_MAS3587F /* This array holds the record timer interval lengths, in seconds */ -static unsigned long rec_timer_seconds[] = +static const unsigned long rec_timer_seconds[] = { 24*60*60, /* OFF really means 24 hours, to avoid >2Gbyte files */ 5*60, /* 00:05 */ diff --git a/apps/settings.h b/apps/settings.h index 36b4a83..78f46ea 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -69,7 +69,7 @@ #define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */ #ifdef SIMULATOR /* a space which is defined in stubs.c */ -extern unsigned char vp_dummy[VIRT_SIZE]; +extern unsigned char vp_dummy[VIRT_SIZE]; #define VIRT_PTR vp_dummy #else /* a location where we won't store strings, 0 is the fastest */ @@ -250,7 +250,7 @@ struct user_settings enum optiontype { INT, BOOL }; struct opt_items { - unsigned char* string; + unsigned const char* string; int voice_id; }; @@ -291,7 +291,7 @@ extern struct user_settings global_settings; extern long lasttime; /* Recording base directory */ -extern char rec_base_directory[]; +extern const char rec_base_directory[]; /* system defines */ diff --git a/apps/version.h b/apps/version.h index 0090bce..2eb9c26 100644 --- a/apps/version.h +++ b/apps/version.h @@ -19,6 +19,6 @@ #ifndef _VERSION_H_ #define _VERSION_H_ -extern char appsversion[]; +extern const char appsversion[]; #endif |