diff options
author | Jens Arnold <amiconn@rockbox.org> | 2004-08-18 01:09:31 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2004-08-18 01:09:31 +0000 |
commit | 8fb336148fb34474c67fbc6e0354daa4512a22fb (patch) | |
tree | 5910d0a54bf8424b424939a263abef0f570591f7 /apps/filetypes.c | |
parent | 6d0da414bfea35b4370ad820d28d4565521d7b12 (diff) | |
download | rockbox-8fb336148fb34474c67fbc6e0354daa4512a22fb.tar.gz rockbox-8fb336148fb34474c67fbc6e0354daa4512a22fb.zip |
Const policed pointer arguments to functions, part 3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4999 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/filetypes.c')
-rw-r--r-- | apps/filetypes.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index d7151ca661..09090c30d4 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -72,11 +72,11 @@ static char string_buffer[STRING_BUFFER_SIZE]; | |||
72 | 72 | ||
73 | /* prototypes */ | 73 | /* prototypes */ |
74 | #ifdef HAVE_LCD_BITMAP | 74 | #ifdef HAVE_LCD_BITMAP |
75 | static char* string2icon(char*); | 75 | static char* string2icon(const char*); |
76 | #endif | 76 | #endif |
77 | static char* get_string(char*); | 77 | static char* get_string(const char*); |
78 | static int find_attr_index(int); | 78 | static int find_attr_index(int); |
79 | static bool read_config(char*); | 79 | static bool read_config(const char*); |
80 | static void rm_whitespaces(char*); | 80 | static void rm_whitespaces(char*); |
81 | static void scan_plugins(void); | 81 | static void scan_plugins(void); |
82 | 82 | ||
@@ -160,7 +160,7 @@ int filetype_get_icon(int attr) | |||
160 | } | 160 | } |
161 | 161 | ||
162 | /* get plugin */ | 162 | /* get plugin */ |
163 | char* filetype_get_plugin(struct entry* file) | 163 | char* filetype_get_plugin(const struct entry* file) |
164 | { | 164 | { |
165 | int ix; | 165 | int ix; |
166 | 166 | ||
@@ -197,7 +197,7 @@ bool filetype_supported(int attr) | |||
197 | } | 197 | } |
198 | 198 | ||
199 | /* get the "dynamic" attribute for an extension */ | 199 | /* get the "dynamic" attribute for an extension */ |
200 | int filetype_get_attr(char* name) | 200 | int filetype_get_attr(const char* name) |
201 | { | 201 | { |
202 | int i; | 202 | int i; |
203 | 203 | ||
@@ -239,7 +239,7 @@ int filetype_load_menu(struct menu_item* menu,int max_items) | |||
239 | } | 239 | } |
240 | 240 | ||
241 | /* start a plugin with an argument (called from onplay.c) */ | 241 | /* start a plugin with an argument (called from onplay.c) */ |
242 | int filetype_load_plugin(char* plugin, char* file) | 242 | int filetype_load_plugin(const char* plugin, char* file) |
243 | { | 243 | { |
244 | snprintf(plugin_name,sizeof(plugin_name),"%s/%s.rock", | 244 | snprintf(plugin_name,sizeof(plugin_name),"%s/%s.rock", |
245 | VIEWERS_DIR,plugin); | 245 | VIEWERS_DIR,plugin); |
@@ -427,7 +427,7 @@ static void scan_plugins(void) | |||
427 | } | 427 | } |
428 | 428 | ||
429 | /* read config file (or cahe file) */ | 429 | /* read config file (or cahe file) */ |
430 | bool read_config(char* file) | 430 | bool read_config(const char* file) |
431 | { | 431 | { |
432 | enum {extension, | 432 | enum {extension, |
433 | plugin, | 433 | plugin, |
@@ -584,7 +584,7 @@ bool read_config(char* file) | |||
584 | 584 | ||
585 | #ifdef HAVE_LCD_BITMAP | 585 | #ifdef HAVE_LCD_BITMAP |
586 | /* convert an ascii hexadecimal icon to a binary icon */ | 586 | /* convert an ascii hexadecimal icon to a binary icon */ |
587 | static char* string2icon(char* str) | 587 | static char* string2icon(const char* str) |
588 | { | 588 | { |
589 | char tmp[ICON_LENGTH*2]; | 589 | char tmp[ICON_LENGTH*2]; |
590 | char *cp; | 590 | char *cp; |
@@ -634,7 +634,7 @@ static char* string2icon(char* str) | |||
634 | #endif | 634 | #endif |
635 | 635 | ||
636 | /* get string from buffer */ | 636 | /* get string from buffer */ |
637 | static char* get_string(char* str) | 637 | static char* get_string(const char* str) |
638 | { | 638 | { |
639 | unsigned int l=strlen(str)+1; | 639 | unsigned int l=strlen(str)+1; |
640 | char* cp; | 640 | char* cp; |