diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 22:44:42 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 22:44:42 +0000 |
commit | f981ea93fb411019133a022c7dd873166d66b5dd (patch) | |
tree | 4f671d67b6584068d4e388c5fd4b6cdd54b5cca2 | |
parent | 5c3546ccbb14b576fd5eef3815bdfc97047de422 (diff) | |
download | rockbox-f981ea93fb411019133a022c7dd873166d66b5dd.tar.gz rockbox-f981ea93fb411019133a022c7dd873166d66b5dd.zip |
kill gcc4 warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8162 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/bookmark.c | 22 | ||||
-rw-r--r-- | apps/codecs.h | 2 | ||||
-rw-r--r-- | apps/dbtree.c | 28 | ||||
-rw-r--r-- | apps/filetree.c | 26 | ||||
-rw-r--r-- | apps/filetypes.c | 50 | ||||
-rw-r--r-- | apps/filetypes.h | 2 | ||||
-rw-r--r-- | apps/gui/gwps-common.c | 44 | ||||
-rw-r--r-- | apps/gui/splash.c | 4 | ||||
-rw-r--r-- | apps/gui/splash.h | 2 | ||||
-rw-r--r-- | apps/gui/textarea.c | 5 | ||||
-rw-r--r-- | apps/gui/yesno.c | 4 | ||||
-rw-r--r-- | apps/language.c | 2 | ||||
-rw-r--r-- | apps/main_menu.c | 22 | ||||
-rw-r--r-- | apps/menu.c | 4 | ||||
-rw-r--r-- | apps/misc.c | 14 | ||||
-rw-r--r-- | apps/onplay.c | 24 | ||||
-rw-r--r-- | apps/pcmbuf.c | 4 | ||||
-rw-r--r-- | apps/playback.c | 12 | ||||
-rw-r--r-- | apps/playlist.c | 34 | ||||
-rw-r--r-- | apps/playlist_menu.c | 2 | ||||
-rw-r--r-- | apps/playlist_viewer.c | 13 | ||||
-rw-r--r-- | apps/plugin.h | 2 | ||||
-rw-r--r-- | apps/screens.c | 14 | ||||
-rw-r--r-- | apps/settings.c | 50 | ||||
-rw-r--r-- | apps/settings.h | 5 | ||||
-rw-r--r-- | apps/settings_menu.c | 103 | ||||
-rw-r--r-- | apps/sleeptimer.c | 2 | ||||
-rw-r--r-- | apps/sound_menu.c | 2 | ||||
-rw-r--r-- | apps/talk.c | 2 | ||||
-rw-r--r-- | apps/tree.c | 21 |
30 files changed, 275 insertions, 246 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index 4ca828089f..8980e4fc26 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -207,14 +207,14 @@ bool bookmark_autobookmark(void) | |||
207 | return write_bookmark(false); | 207 | return write_bookmark(false); |
208 | } | 208 | } |
209 | #ifdef HAVE_LCD_BITMAP | 209 | #ifdef HAVE_LCD_BITMAP |
210 | char *lines[]={str(LANG_AUTO_BOOKMARK_QUERY), | 210 | unsigned char *lines[]={str(LANG_AUTO_BOOKMARK_QUERY), |
211 | str(LANG_CONFIRM_WITH_PLAY_RECORDER), | 211 | str(LANG_CONFIRM_WITH_PLAY_RECORDER), |
212 | str(LANG_CANCEL_WITH_ANY_RECORDER)}; | 212 | str(LANG_CANCEL_WITH_ANY_RECORDER)}; |
213 | struct text_message message={lines, 3}; | 213 | struct text_message message={(char **)lines, 3}; |
214 | #else | 214 | #else |
215 | char *lines[]={str(LANG_AUTO_BOOKMARK_QUERY), | 215 | unsigned char *lines[]={str(LANG_AUTO_BOOKMARK_QUERY), |
216 | str(LANG_RESUME_CONFIRM_PLAYER)}; | 216 | str(LANG_RESUME_CONFIRM_PLAYER)}; |
217 | struct text_message message={lines, 2}; | 217 | struct text_message message={(char **)lines, 2}; |
218 | #endif | 218 | #endif |
219 | gui_syncstatusbar_draw(&statusbars, false); | 219 | gui_syncstatusbar_draw(&statusbars, false); |
220 | if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) | 220 | if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) |
@@ -766,7 +766,7 @@ static void display_bookmark(const char* bookmark, | |||
766 | dot=NULL; | 766 | dot=NULL; |
767 | if (dot) | 767 | if (dot) |
768 | *dot='\0'; | 768 | *dot='\0'; |
769 | lcd_puts_scroll(0, 0, global_filename); | 769 | lcd_puts_scroll(0, 0, (unsigned char *)global_filename); |
770 | if (dot) | 770 | if (dot) |
771 | *dot='.'; | 771 | *dot='.'; |
772 | 772 | ||
@@ -774,12 +774,12 @@ static void display_bookmark(const char* bookmark, | |||
774 | snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %2d/%2d", | 774 | snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %2d/%2d", |
775 | str(LANG_BOOKMARK_SELECT_BOOKMARK_TEXT), | 775 | str(LANG_BOOKMARK_SELECT_BOOKMARK_TEXT), |
776 | bookmark_id + 1, bookmark_count); | 776 | bookmark_id + 1, bookmark_count); |
777 | lcd_puts_scroll(0, 1, global_temp_buffer); | 777 | lcd_puts_scroll(0, 1, (unsigned char *)global_temp_buffer); |
778 | 778 | ||
779 | /* bookmark resume index */ | 779 | /* bookmark resume index */ |
780 | snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %2d", | 780 | snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %2d", |
781 | str(LANG_BOOKMARK_SELECT_INDEX_TEXT), resume_index+1); | 781 | str(LANG_BOOKMARK_SELECT_INDEX_TEXT), resume_index+1); |
782 | lcd_puts_scroll(0, 2, global_temp_buffer); | 782 | lcd_puts_scroll(0, 2, (unsigned char *)global_temp_buffer); |
783 | 783 | ||
784 | /* elapsed time*/ | 784 | /* elapsed time*/ |
785 | if ( ms < 3600000 ) | 785 | if ( ms < 3600000 ) |
@@ -799,7 +799,7 @@ static void display_bookmark(const char* bookmark, | |||
799 | ms % 3600000 / 60000, | 799 | ms % 3600000 / 60000, |
800 | (unsigned int)(ms % 60000) / 1000); | 800 | (unsigned int)(ms % 60000) / 1000); |
801 | } | 801 | } |
802 | lcd_puts_scroll(0, 3, global_temp_buffer); | 802 | lcd_puts_scroll(0, 3, (unsigned char *)global_temp_buffer); |
803 | 803 | ||
804 | /* commands */ | 804 | /* commands */ |
805 | lcd_puts_scroll(0, 4, str(LANG_BOOKMARK_SELECT_PLAY)); | 805 | lcd_puts_scroll(0, 4, str(LANG_BOOKMARK_SELECT_PLAY)); |
diff --git a/apps/codecs.h b/apps/codecs.h index 75903bc858..b9b4bb4c71 100644 --- a/apps/codecs.h +++ b/apps/codecs.h | |||
@@ -168,7 +168,7 @@ struct codec_api { | |||
168 | /* Configure different codec buffer parameters. */ | 168 | /* Configure different codec buffer parameters. */ |
169 | void (*configure)(int setting, void *value); | 169 | void (*configure)(int setting, void *value); |
170 | 170 | ||
171 | void (*splash)(int ticks, bool center, const char *fmt, ...); | 171 | void (*splash)(int ticks, bool center, const unsigned char *fmt, ...); |
172 | 172 | ||
173 | /* file */ | 173 | /* file */ |
174 | int (*PREFIX(open))(const char* pathname, int flags); | 174 | int (*PREFIX(open))(const char* pathname, int flags); |
diff --git a/apps/dbtree.c b/apps/dbtree.c index b8a4c4703e..a9d90b348b 100644 --- a/apps/dbtree.c +++ b/apps/dbtree.c | |||
@@ -88,13 +88,13 @@ int db_load(struct tree_context* c) | |||
88 | static const int tables[] = {allartists, allalbums, allsongs, | 88 | static const int tables[] = {allartists, allalbums, allsongs, |
89 | search }; | 89 | search }; |
90 | char* nbuf = (char*)nptr; | 90 | char* nbuf = (char*)nptr; |
91 | char* labels[] = { str(LANG_ID3DB_ARTISTS), | 91 | unsigned char* labels[] = { str(LANG_ID3DB_ARTISTS), |
92 | str(LANG_ID3DB_ALBUMS), | 92 | str(LANG_ID3DB_ALBUMS), |
93 | str(LANG_ID3DB_SONGS), | 93 | str(LANG_ID3DB_SONGS), |
94 | str(LANG_ID3DB_SEARCH)}; | 94 | str(LANG_ID3DB_SEARCH)}; |
95 | DEBUGF("dbload table root\n"); | 95 | DEBUGF("dbload table root\n"); |
96 | for (i=0; i < 4; i++) { | 96 | for (i=0; i < 4; i++) { |
97 | strcpy(nbuf, labels[i]); | 97 | strcpy(nbuf, (char *)labels[i]); |
98 | dptr[0] = (unsigned long)nbuf; | 98 | dptr[0] = (unsigned long)nbuf; |
99 | dptr[1] = tables[i]; | 99 | dptr[1] = tables[i]; |
100 | nbuf += strlen(nbuf) + 1; | 100 | nbuf += strlen(nbuf) + 1; |
@@ -109,12 +109,12 @@ int db_load(struct tree_context* c) | |||
109 | searchalbums, | 109 | searchalbums, |
110 | searchsongs}; | 110 | searchsongs}; |
111 | char* nbuf = (char*)nptr; | 111 | char* nbuf = (char*)nptr; |
112 | char* labels[] = { str(LANG_ID3DB_SEARCH_ARTISTS), | 112 | unsigned char* labels[] = { str(LANG_ID3DB_SEARCH_ARTISTS), |
113 | str(LANG_ID3DB_SEARCH_ALBUMS), | 113 | str(LANG_ID3DB_SEARCH_ALBUMS), |
114 | str(LANG_ID3DB_SEARCH_SONGS)}; | 114 | str(LANG_ID3DB_SEARCH_SONGS)}; |
115 | DEBUGF("dbload table search\n"); | 115 | DEBUGF("dbload table search\n"); |
116 | for (i=0; i < 3; i++) { | 116 | for (i=0; i < 3; i++) { |
117 | strcpy(nbuf, labels[i]); | 117 | strcpy(nbuf, (char *)labels[i]); |
118 | dptr[0] = (unsigned long)nbuf; | 118 | dptr[0] = (unsigned long)nbuf; |
119 | dptr[1] = tables[i]; | 119 | dptr[1] = tables[i]; |
120 | nbuf += strlen(nbuf) + 1; | 120 | nbuf += strlen(nbuf) + 1; |
@@ -131,9 +131,9 @@ int db_load(struct tree_context* c) | |||
131 | i = db_search(c, searchstring); | 131 | i = db_search(c, searchstring); |
132 | c->dirlength = c->filesindir = i; | 132 | c->dirlength = c->filesindir = i; |
133 | if (c->dirfull) { | 133 | if (c->dirfull) { |
134 | gui_syncsplash(HZ, true, "%s %s", | 134 | gui_syncsplash(HZ, true, (unsigned char *)"%s %s", |
135 | str(LANG_SHOWDIR_ERROR_BUFFER), | 135 | str(LANG_SHOWDIR_ERROR_BUFFER), |
136 | str(LANG_SHOWDIR_ERROR_FULL)); | 136 | str(LANG_SHOWDIR_ERROR_FULL)); |
137 | c->dirfull = false; | 137 | c->dirfull = false; |
138 | } | 138 | } |
139 | else | 139 | else |
@@ -313,7 +313,7 @@ int db_load(struct tree_context* c) | |||
313 | } | 313 | } |
314 | 314 | ||
315 | if (c->currtable == albums4artist && !c->dirfull) { | 315 | if (c->currtable == albums4artist && !c->dirfull) { |
316 | strcpy((char*)nptr, str(LANG_ID3DB_ALL_SONGS)); | 316 | strcpy((char*)nptr, (char *)str(LANG_ID3DB_ALL_SONGS)); |
317 | dptr[0] = (unsigned long)nptr; | 317 | dptr[0] = (unsigned long)nptr; |
318 | dptr[1] = extra; /* offset to artist */ | 318 | dptr[1] = extra; /* offset to artist */ |
319 | hits++; | 319 | hits++; |
@@ -554,7 +554,7 @@ int db_get_icon(struct tree_context* c) | |||
554 | } | 554 | } |
555 | 555 | ||
556 | #ifdef HAVE_LCD_BITMAP | 556 | #ifdef HAVE_LCD_BITMAP |
557 | return bitmap_icons_6x8[icon]; | 557 | return (char *)bitmap_icons_6x8[icon]; |
558 | #else | 558 | #else |
559 | return icon; | 559 | return icon; |
560 | #endif | 560 | #endif |
diff --git a/apps/filetree.c b/apps/filetree.c index 708c135be7..b870f969b5 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -106,10 +106,10 @@ static void check_file_thumbnails(struct tree_context* c) | |||
106 | { | 106 | { |
107 | int ext_pos; | 107 | int ext_pos; |
108 | 108 | ||
109 | ext_pos = strlen(entry->d_name) - strlen(file_thumbnail_ext); | 109 | ext_pos = strlen((char *)entry->d_name) - strlen(file_thumbnail_ext); |
110 | if (ext_pos <= 0 /* too short to carry ".talk" */ | 110 | if (ext_pos <= 0 /* too short to carry ".talk" */ |
111 | || (entry->attribute & ATTR_DIRECTORY) /* no file */ | 111 | || (entry->attribute & ATTR_DIRECTORY) /* no file */ |
112 | || strcasecmp(&entry->d_name[ext_pos], file_thumbnail_ext)) | 112 | || strcasecmp((char *)&entry->d_name[ext_pos], file_thumbnail_ext)) |
113 | { /* or doesn't end with ".talk", no candidate */ | 113 | { /* or doesn't end with ".talk", no candidate */ |
114 | continue; | 114 | continue; |
115 | } | 115 | } |
@@ -121,7 +121,7 @@ static void check_file_thumbnails(struct tree_context* c) | |||
121 | /* search corresponding file in dir cache */ | 121 | /* search corresponding file in dir cache */ |
122 | for (i=0; i < c->filesindir; i++) | 122 | for (i=0; i < c->filesindir; i++) |
123 | { | 123 | { |
124 | if (!strcasecmp(dircache[i].name, entry->d_name)) | 124 | if (!strcasecmp(dircache[i].name, (char *)entry->d_name)) |
125 | { /* match */ | 125 | { /* match */ |
126 | dircache[i].attr |= TREE_ATTR_THUMBNAIL; /* set the flag */ | 126 | dircache[i].attr |= TREE_ATTR_THUMBNAIL; /* set the flag */ |
127 | break; /* exit search loop, because we found it */ | 127 | break; /* exit search loop, because we found it */ |
@@ -219,14 +219,12 @@ int ft_load(struct tree_context* c, const char* tempdir) | |||
219 | if (!entry) | 219 | if (!entry) |
220 | break; | 220 | break; |
221 | 221 | ||
222 | len = strlen(entry->d_name); | 222 | len = strlen((char *)entry->d_name); |
223 | 223 | ||
224 | /* skip directories . and .. */ | 224 | /* skip directories . and .. */ |
225 | if ((entry->attribute & ATTR_DIRECTORY) && | 225 | if ((entry->attribute & ATTR_DIRECTORY) && |
226 | (((len == 1) && | 226 | (((len == 1) && (!strncmp((char *)entry->d_name, ".", 1))) || |
227 | (!strncmp(entry->d_name, ".", 1))) || | 227 | ((len == 2) && (!strncmp((char *)entry->d_name, "..", 2))))) { |
228 | ((len == 2) && | ||
229 | (!strncmp(entry->d_name, "..", 2))))) { | ||
230 | i--; | 228 | i--; |
231 | continue; | 229 | continue; |
232 | } | 230 | } |
@@ -249,7 +247,7 @@ int ft_load(struct tree_context* c, const char* tempdir) | |||
249 | 247 | ||
250 | /* check for known file types */ | 248 | /* check for known file types */ |
251 | if ( !(dptr->attr & ATTR_DIRECTORY) ) | 249 | if ( !(dptr->attr & ATTR_DIRECTORY) ) |
252 | dptr->attr |= filetype_get_attr(entry->d_name); | 250 | dptr->attr |= filetype_get_attr((char *)entry->d_name); |
253 | 251 | ||
254 | #ifdef BOOTFILE | 252 | #ifdef BOOTFILE |
255 | /* memorize/compare details about the boot file */ | 253 | /* memorize/compare details about the boot file */ |
@@ -295,7 +293,7 @@ int ft_load(struct tree_context* c, const char* tempdir) | |||
295 | dptr->time_write = | 293 | dptr->time_write = |
296 | (long)entry->wrtdate<<16 | | 294 | (long)entry->wrtdate<<16 | |
297 | (long)entry->wrttime; /* in one # */ | 295 | (long)entry->wrttime; /* in one # */ |
298 | strcpy(dptr->name,entry->d_name); | 296 | strcpy(dptr->name, (char *)entry->d_name); |
299 | name_buffer_used += len + 1; | 297 | name_buffer_used += len + 1; |
300 | 298 | ||
301 | if (dptr->attr & ATTR_DIRECTORY) /* count the remaining dirs */ | 299 | if (dptr->attr & ATTR_DIRECTORY) /* count the remaining dirs */ |
@@ -384,7 +382,7 @@ int ft_enter(struct tree_context* c) | |||
384 | /* wps config file */ | 382 | /* wps config file */ |
385 | case TREE_ATTR_WPS: | 383 | case TREE_ATTR_WPS: |
386 | wps_data_load(gui_wps[0].data, buf, true, true); | 384 | wps_data_load(gui_wps[0].data, buf, true, true); |
387 | set_file(buf, global_settings.wps_file, | 385 | set_file(buf, (char *)global_settings.wps_file, |
388 | MAX_FILENAME); | 386 | MAX_FILENAME); |
389 | break; | 387 | break; |
390 | 388 | ||
@@ -392,7 +390,7 @@ int ft_enter(struct tree_context* c) | |||
392 | /* remote-wps config file */ | 390 | /* remote-wps config file */ |
393 | case TREE_ATTR_RWPS: | 391 | case TREE_ATTR_RWPS: |
394 | wps_data_load(gui_wps[1].data, buf, true, true); | 392 | wps_data_load(gui_wps[1].data, buf, true, true); |
395 | set_file(buf, global_settings.rwps_file, | 393 | set_file(buf, (char *)global_settings.rwps_file, |
396 | MAX_FILENAME); | 394 | MAX_FILENAME); |
397 | break; | 395 | break; |
398 | #endif | 396 | #endif |
@@ -416,7 +414,7 @@ int ft_enter(struct tree_context* c) | |||
416 | 414 | ||
417 | case TREE_ATTR_LNG: | 415 | case TREE_ATTR_LNG: |
418 | if(!lang_load(buf)) { | 416 | if(!lang_load(buf)) { |
419 | set_file(buf, global_settings.lang_file, | 417 | set_file(buf, (char *)global_settings.lang_file, |
420 | MAX_FILENAME); | 418 | MAX_FILENAME); |
421 | talk_init(); /* use voice of same language */ | 419 | talk_init(); /* use voice of same language */ |
422 | gui_syncsplash(HZ, true, str(LANG_LANGUAGE_LOADED)); | 420 | gui_syncsplash(HZ, true, str(LANG_LANGUAGE_LOADED)); |
@@ -426,7 +424,7 @@ int ft_enter(struct tree_context* c) | |||
426 | #ifdef HAVE_LCD_BITMAP | 424 | #ifdef HAVE_LCD_BITMAP |
427 | case TREE_ATTR_FONT: | 425 | case TREE_ATTR_FONT: |
428 | font_load(buf); | 426 | font_load(buf); |
429 | set_file(buf, global_settings.font_file, MAX_FILENAME); | 427 | set_file(buf, (char *)global_settings.font_file, MAX_FILENAME); |
430 | break; | 428 | break; |
431 | #endif | 429 | #endif |
432 | 430 | ||
diff --git a/apps/filetypes.c b/apps/filetypes.c index e2240089ce..4e88f81dec 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -149,7 +149,7 @@ void filetype_init(void) | |||
149 | 149 | ||
150 | /* get icon */ | 150 | /* get icon */ |
151 | #ifdef HAVE_LCD_BITMAP | 151 | #ifdef HAVE_LCD_BITMAP |
152 | const char* filetype_get_icon(int attr) | 152 | const unsigned char* filetype_get_icon(int attr) |
153 | #else | 153 | #else |
154 | int filetype_get_icon(int attr) | 154 | int filetype_get_icon(int attr) |
155 | #endif | 155 | #endif |
@@ -249,7 +249,7 @@ int filetype_load_menu(struct menu_item* menu,int max_items) | |||
249 | cp=strrchr(filetypes[i].plugin,'/'); | 249 | cp=strrchr(filetypes[i].plugin,'/'); |
250 | if (cp) cp++; | 250 | if (cp) cp++; |
251 | else cp=filetypes[i].plugin; | 251 | else cp=filetypes[i].plugin; |
252 | menu[cnt].desc = cp; | 252 | menu[cnt].desc = (unsigned char *)cp; |
253 | cnt++; | 253 | cnt++; |
254 | if (cnt == max_items) | 254 | if (cnt == max_items) |
255 | break; | 255 | break; |
@@ -317,14 +317,14 @@ static void scan_plugins(void) | |||
317 | /* exttypes[] full, bail out */ | 317 | /* exttypes[] full, bail out */ |
318 | if (cnt_exttypes >= MAX_EXTTYPES) | 318 | if (cnt_exttypes >= MAX_EXTTYPES) |
319 | { | 319 | { |
320 | gui_syncsplash(HZ,true,str(LANG_FILETYPES_EXTENSION_FULL)); | 320 | gui_syncsplash(HZ, true, str(LANG_FILETYPES_EXTENSION_FULL)); |
321 | break; | 321 | break; |
322 | } | 322 | } |
323 | 323 | ||
324 | /* filetypes[] full, bail out */ | 324 | /* filetypes[] full, bail out */ |
325 | if (cnt_filetypes >= MAX_FILETYPES) | 325 | if (cnt_filetypes >= MAX_FILETYPES) |
326 | { | 326 | { |
327 | gui_syncsplash(HZ,true,str(LANG_FILETYPES_FULL)); | 327 | gui_syncsplash(HZ, true, str(LANG_FILETYPES_FULL)); |
328 | break; | 328 | break; |
329 | } | 329 | } |
330 | 330 | ||
@@ -348,31 +348,31 @@ static void scan_plugins(void) | |||
348 | } | 348 | } |
349 | 349 | ||
350 | /* filter out non rock files */ | 350 | /* filter out non rock files */ |
351 | if (strcasecmp( | 351 | if (strcasecmp((char *)&entry->d_name[strlen((char *)entry->d_name) - |
352 | &entry->d_name[strlen(entry->d_name) - sizeof(ROCK_EXTENSION) + 1], | 352 | sizeof(ROCK_EXTENSION) + 1], |
353 | ROCK_EXTENSION)) { | 353 | ROCK_EXTENSION)) { |
354 | continue; | 354 | continue; |
355 | } | 355 | } |
356 | 356 | ||
357 | /* filter out to long filenames */ | 357 | /* filter out to long filenames */ |
358 | if (strlen(entry->d_name) > MAX_PLUGIN_LENGTH + 5) | 358 | if (strlen((char *)entry->d_name) > MAX_PLUGIN_LENGTH + 5) |
359 | { | 359 | { |
360 | gui_syncsplash(HZ,true,str(LANG_FILETYPES_PLUGIN_NAME_LONG)); | 360 | gui_syncsplash(HZ, true, str(LANG_FILETYPES_PLUGIN_NAME_LONG)); |
361 | continue; | 361 | continue; |
362 | } | 362 | } |
363 | 363 | ||
364 | dot=strrchr(entry->d_name,'.'); | 364 | dot=strrchr((char *)entry->d_name,'.'); |
365 | *dot='\0'; | 365 | *dot='\0'; |
366 | dash=strchr(entry->d_name,'-'); | 366 | dash=strchr((char *)entry->d_name,'-'); |
367 | 367 | ||
368 | /* add plugin and extension */ | 368 | /* add plugin and extension */ |
369 | if (dash) | 369 | if (dash) |
370 | { | 370 | { |
371 | *dash='\0'; | 371 | *dash='\0'; |
372 | ix=(filetype_get_attr(entry->d_name) >> 8); | 372 | ix=(filetype_get_attr((char *)entry->d_name) >> 8); |
373 | if (!ix) | 373 | if (!ix) |
374 | { | 374 | { |
375 | cp=get_string(entry->d_name); | 375 | cp=get_string((char *)entry->d_name); |
376 | if (cp) | 376 | if (cp) |
377 | { | 377 | { |
378 | exttypes[cnt_exttypes].extension=cp; | 378 | exttypes[cnt_exttypes].extension=cp; |
@@ -385,7 +385,7 @@ static void scan_plugins(void) | |||
385 | cnt_exttypes++; | 385 | cnt_exttypes++; |
386 | 386 | ||
387 | *dash='-'; | 387 | *dash='-'; |
388 | cp=get_string(entry->d_name); | 388 | cp=get_string((char *)entry->d_name); |
389 | if (cp) | 389 | if (cp) |
390 | { | 390 | { |
391 | filetypes[cnt_filetypes].plugin=cp; | 391 | filetypes[cnt_filetypes].plugin=cp; |
@@ -402,7 +402,7 @@ static void scan_plugins(void) | |||
402 | *dash='-'; | 402 | *dash='-'; |
403 | if (!filetypes[ix].plugin) | 403 | if (!filetypes[ix].plugin) |
404 | { | 404 | { |
405 | cp=get_string(entry->d_name); | 405 | cp=get_string((char *)entry->d_name); |
406 | if (cp) | 406 | if (cp) |
407 | { | 407 | { |
408 | filetypes[cnt_filetypes].plugin=cp; | 408 | filetypes[cnt_filetypes].plugin=cp; |
@@ -421,7 +421,7 @@ static void scan_plugins(void) | |||
421 | for (i = first_soft_filetype; i < cnt_filetypes; i++) | 421 | for (i = first_soft_filetype; i < cnt_filetypes; i++) |
422 | { | 422 | { |
423 | if (filetypes[i].plugin) | 423 | if (filetypes[i].plugin) |
424 | if (!strcasecmp(filetypes[i].plugin,entry->d_name)) | 424 | if (!strcasecmp(filetypes[i].plugin, (char *)entry->d_name)) |
425 | { | 425 | { |
426 | found=true; | 426 | found=true; |
427 | break; | 427 | break; |
@@ -430,7 +430,7 @@ static void scan_plugins(void) | |||
430 | 430 | ||
431 | if (!found) | 431 | if (!found) |
432 | { | 432 | { |
433 | cp=get_string(entry->d_name); | 433 | cp=get_string((char *)entry->d_name); |
434 | if (cp) | 434 | if (cp) |
435 | { | 435 | { |
436 | filetypes[cnt_filetypes].plugin=cp; | 436 | filetypes[cnt_filetypes].plugin=cp; |
@@ -477,7 +477,7 @@ static int add_plugin(char *plugin) | |||
477 | { | 477 | { |
478 | cp = string2icon(icon); | 478 | cp = string2icon(icon); |
479 | if (cp) | 479 | if (cp) |
480 | filetypes[cnt_filetypes].icon = cp; | 480 | filetypes[cnt_filetypes].icon = (unsigned char *)cp; |
481 | else | 481 | else |
482 | return 0; | 482 | return 0; |
483 | } | 483 | } |
@@ -498,7 +498,7 @@ static int add_plugin(char *plugin) | |||
498 | { | 498 | { |
499 | cp = string2icon(icon); | 499 | cp = string2icon(icon); |
500 | if (cp) | 500 | if (cp) |
501 | filetypes[cnt_filetypes].icon = cp; | 501 | filetypes[cnt_filetypes].icon = (unsigned char *)cp; |
502 | else | 502 | else |
503 | return 0; | 503 | return 0; |
504 | } | 504 | } |
@@ -538,13 +538,13 @@ bool read_config(const char* file) | |||
538 | { | 538 | { |
539 | if (cnt_exttypes >= MAX_EXTTYPES) | 539 | if (cnt_exttypes >= MAX_EXTTYPES) |
540 | { | 540 | { |
541 | gui_syncsplash(HZ,true,str(LANG_FILETYPES_EXTENSION_FULL)); | 541 | gui_syncsplash(HZ, true, str(LANG_FILETYPES_EXTENSION_FULL)); |
542 | break; | 542 | break; |
543 | } | 543 | } |
544 | 544 | ||
545 | if (cnt_filetypes >= MAX_FILETYPES) | 545 | if (cnt_filetypes >= MAX_FILETYPES) |
546 | { | 546 | { |
547 | gui_syncsplash(HZ,true,str(LANG_FILETYPES_FULL)); | 547 | gui_syncsplash(HZ, true, str(LANG_FILETYPES_FULL)); |
548 | break; | 548 | break; |
549 | } | 549 | } |
550 | 550 | ||
@@ -635,7 +635,7 @@ bool read_config(const char* file) | |||
635 | { | 635 | { |
636 | cp = string2icon(str[icon]); | 636 | cp = string2icon(str[icon]); |
637 | if (cp) | 637 | if (cp) |
638 | exttypes[i].type->icon = cp; | 638 | exttypes[i].type->icon = (unsigned char *)cp; |
639 | } | 639 | } |
640 | } | 640 | } |
641 | } | 641 | } |
@@ -713,7 +713,7 @@ static char* string2icon(const char* str) | |||
713 | (unsigned long) string_buffer - | 713 | (unsigned long) string_buffer - |
714 | (unsigned long) next_free_string) < ICON_LENGTH) | 714 | (unsigned long) next_free_string) < ICON_LENGTH) |
715 | { | 715 | { |
716 | gui_syncsplash(HZ,true,str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); | 716 | gui_syncsplash(HZ, true, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); |
717 | return NULL; | 717 | return NULL; |
718 | } | 718 | } |
719 | 719 | ||
@@ -762,14 +762,14 @@ static char* get_string(const char* str) | |||
762 | (unsigned long) string_buffer - | 762 | (unsigned long) string_buffer - |
763 | (unsigned long) next_free_string)) | 763 | (unsigned long) next_free_string)) |
764 | { | 764 | { |
765 | strcpy(next_free_string,str); | 765 | strcpy(next_free_string, str); |
766 | cp=next_free_string; | 766 | cp=next_free_string; |
767 | next_free_string=&next_free_string[l]; | 767 | next_free_string=&next_free_string[l]; |
768 | return cp; | 768 | return cp; |
769 | } | 769 | } |
770 | else | 770 | else |
771 | { | 771 | { |
772 | gui_syncsplash(HZ,true,str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); | 772 | gui_syncsplash(HZ, true, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); |
773 | return NULL; | 773 | return NULL; |
774 | } | 774 | } |
775 | } | 775 | } |
diff --git a/apps/filetypes.h b/apps/filetypes.h index e72dd6ffd3..7416c93b00 100644 --- a/apps/filetypes.h +++ b/apps/filetypes.h | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | int filetype_get_attr(const char*); | 26 | int filetype_get_attr(const char*); |
27 | #ifdef HAVE_LCD_BITMAP | 27 | #ifdef HAVE_LCD_BITMAP |
28 | const char* filetype_get_icon(int); | 28 | const unsigned char* filetype_get_icon(int); |
29 | #else | 29 | #else |
30 | int filetype_get_icon(int); | 30 | int filetype_get_icon(int); |
31 | #endif | 31 | #endif |
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index afc00a4519..665f6f4bb0 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -1130,7 +1130,7 @@ void gui_wps_format(struct wps_data *data, const char *bmpdir, | |||
1130 | 1130 | ||
1131 | /* load the image */ | 1131 | /* load the image */ |
1132 | ret = read_bmp_file(imgname, &data->img[n].w, | 1132 | ret = read_bmp_file(imgname, &data->img[n].w, |
1133 | &data->img[n].h, img_buf_ptr, | 1133 | &data->img[n].h, (char *)img_buf_ptr, |
1134 | img_buf_free); | 1134 | img_buf_free); |
1135 | if (ret > 0) | 1135 | if (ret > 0) |
1136 | { | 1136 | { |
@@ -1389,10 +1389,11 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1389 | #endif | 1389 | #endif |
1390 | #ifdef HAVE_LCD_BITMAP | 1390 | #ifdef HAVE_LCD_BITMAP |
1391 | /* calculate different string sizes and positions */ | 1391 | /* calculate different string sizes and positions */ |
1392 | display->getstringsize(" ", &space_width, &string_height); | 1392 | display->getstringsize((unsigned char *)" ", &space_width, &string_height); |
1393 | if (data->format_align[i][data->curr_subline[i]].left != 0) { | 1393 | if (data->format_align[i][data->curr_subline[i]].left != 0) { |
1394 | display->getstringsize(data->format_align[i][data->curr_subline[i]].left, | 1394 | display->getstringsize((unsigned char *)data->format_align[i] |
1395 | &left_width, &string_height); | 1395 | [data->curr_subline[i]].left, |
1396 | &left_width, &string_height); | ||
1396 | } | 1397 | } |
1397 | else { | 1398 | else { |
1398 | left_width = 0; | 1399 | left_width = 0; |
@@ -1400,8 +1401,9 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1400 | left_xpos = 0; | 1401 | left_xpos = 0; |
1401 | 1402 | ||
1402 | if (data->format_align[i][data->curr_subline[i]].center != 0) { | 1403 | if (data->format_align[i][data->curr_subline[i]].center != 0) { |
1403 | display->getstringsize(data->format_align[i][data->curr_subline[i]].center, | 1404 | display->getstringsize((unsigned char *)data->format_align[i] |
1404 | ¢er_width, &string_height); | 1405 | [data->curr_subline[i]].center, |
1406 | ¢er_width, &string_height); | ||
1405 | } | 1407 | } |
1406 | else { | 1408 | else { |
1407 | center_width = 0; | 1409 | center_width = 0; |
@@ -1409,8 +1411,9 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1409 | center_xpos=(display->width - center_width) / 2; | 1411 | center_xpos=(display->width - center_width) / 2; |
1410 | 1412 | ||
1411 | if (data->format_align[i][data->curr_subline[i]].right != 0) { | 1413 | if (data->format_align[i][data->curr_subline[i]].right != 0) { |
1412 | display->getstringsize(data->format_align[i][data->curr_subline[i]].right, | 1414 | display->getstringsize((unsigned char *)data->format_align[i] |
1413 | &right_width, &string_height); | 1415 | [data->curr_subline[i]].right, |
1416 | &right_width, &string_height); | ||
1414 | } | 1417 | } |
1415 | else { | 1418 | else { |
1416 | right_width = 0; | 1419 | right_width = 0; |
@@ -1517,7 +1520,8 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1517 | 1520 | ||
1518 | if (left_width>display->width) { | 1521 | if (left_width>display->width) { |
1519 | display->puts_scroll(0, i, | 1522 | display->puts_scroll(0, i, |
1520 | data->format_align[i][data->curr_subline[i]].left); | 1523 | (unsigned char *)data->format_align[i] |
1524 | [data->curr_subline[i]].left); | ||
1521 | } else { | 1525 | } else { |
1522 | /* clear the line first */ | 1526 | /* clear the line first */ |
1523 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1527 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
@@ -1526,23 +1530,26 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1526 | 1530 | ||
1527 | /* Nasty hack: we output an empty scrolling string, | 1531 | /* Nasty hack: we output an empty scrolling string, |
1528 | which will reset the scroller for that line */ | 1532 | which will reset the scroller for that line */ |
1529 | display->puts_scroll(0, i, ""); | 1533 | display->puts_scroll(0, i, (unsigned char *)""); |
1530 | 1534 | ||
1531 | /* print aligned strings */ | 1535 | /* print aligned strings */ |
1532 | if (left_width != 0) | 1536 | if (left_width != 0) |
1533 | { | 1537 | { |
1534 | display->putsxy(left_xpos, ypos, | 1538 | display->putsxy(left_xpos, ypos, |
1535 | data->format_align[i][data->curr_subline[i]].left); | 1539 | (unsigned char *)data->format_align[i] |
1540 | [data->curr_subline[i]].left); | ||
1536 | } | 1541 | } |
1537 | if (center_width != 0) | 1542 | if (center_width != 0) |
1538 | { | 1543 | { |
1539 | display->putsxy(center_xpos, ypos, | 1544 | display->putsxy(center_xpos, ypos, |
1540 | data->format_align[i][data->curr_subline[i]].center); | 1545 | (unsigned char *)data->format_align[i] |
1546 | [data->curr_subline[i]].center); | ||
1541 | } | 1547 | } |
1542 | if (right_width != 0) | 1548 | if (right_width != 0) |
1543 | { | 1549 | { |
1544 | display->putsxy(right_xpos, ypos, | 1550 | display->putsxy(right_xpos, ypos, |
1545 | data->format_align[i][data->curr_subline[i]].right); | 1551 | (unsigned char *)data->format_align[i] |
1552 | [data->curr_subline[i]].right); | ||
1546 | } | 1553 | } |
1547 | } | 1554 | } |
1548 | #else | 1555 | #else |
@@ -1568,23 +1575,26 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1568 | 1575 | ||
1569 | /* Nasty hack: we output an empty scrolling string, | 1576 | /* Nasty hack: we output an empty scrolling string, |
1570 | which will reset the scroller for that line */ | 1577 | which will reset the scroller for that line */ |
1571 | display->puts_scroll(0, i, ""); | 1578 | display->puts_scroll(0, i, (unsigned char *)""); |
1572 | 1579 | ||
1573 | /* print aligned strings */ | 1580 | /* print aligned strings */ |
1574 | if (left_width != 0) | 1581 | if (left_width != 0) |
1575 | { | 1582 | { |
1576 | display->putsxy(left_xpos, ypos, | 1583 | display->putsxy(left_xpos, ypos, |
1577 | data->format_align[i][data->curr_subline[i]].left); | 1584 | (unsigned char *)data->format_align[i] |
1585 | [data->curr_subline[i]].left); | ||
1578 | } | 1586 | } |
1579 | if (center_width != 0) | 1587 | if (center_width != 0) |
1580 | { | 1588 | { |
1581 | display->putsxy(center_xpos, ypos, | 1589 | display->putsxy(center_xpos, ypos, |
1582 | data->format_align[i][data->curr_subline[i]].center); | 1590 | (unsigned char *)data->format_align[i] |
1591 | [data->curr_subline[i]].center); | ||
1583 | } | 1592 | } |
1584 | if (right_width != 0) | 1593 | if (right_width != 0) |
1585 | { | 1594 | { |
1586 | display->putsxy(right_xpos, ypos, | 1595 | display->putsxy(right_xpos, ypos, |
1587 | data->format_align[i][data->curr_subline[i]].right); | 1596 | (unsigned char *)data->format_align[i] |
1597 | [data->curr_subline[i]].right); | ||
1588 | } | 1598 | } |
1589 | #else | 1599 | #else |
1590 | update_line = true; | 1600 | update_line = true; |
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 551888544f..fffa520b4f 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -186,7 +186,7 @@ static void splash(struct screen * screen, | |||
186 | } | 186 | } |
187 | 187 | ||
188 | void gui_splash(struct screen * screen, int ticks, | 188 | void gui_splash(struct screen * screen, int ticks, |
189 | bool center, const char *fmt, ...) | 189 | bool center, const unsigned char *fmt, ...) |
190 | { | 190 | { |
191 | va_list ap; | 191 | va_list ap; |
192 | va_start( ap, fmt ); | 192 | va_start( ap, fmt ); |
@@ -197,7 +197,7 @@ void gui_splash(struct screen * screen, int ticks, | |||
197 | sleep(ticks); | 197 | sleep(ticks); |
198 | } | 198 | } |
199 | 199 | ||
200 | void gui_syncsplash(int ticks, bool center, const char *fmt, ...) | 200 | void gui_syncsplash(int ticks, bool center, const unsigned char *fmt, ...) |
201 | { | 201 | { |
202 | va_list ap; | 202 | va_list ap; |
203 | int i; | 203 | int i; |
diff --git a/apps/gui/splash.h b/apps/gui/splash.h index b1aece9dde..9d8def16f8 100644 --- a/apps/gui/splash.h +++ b/apps/gui/splash.h | |||
@@ -39,6 +39,6 @@ extern void gui_splash(struct screen * screen, int ticks, | |||
39 | * - fmt : what to say *printf style | 39 | * - fmt : what to say *printf style |
40 | */ | 40 | */ |
41 | extern void gui_syncsplash(int ticks, bool center, | 41 | extern void gui_syncsplash(int ticks, bool center, |
42 | const char *fmt, ...); | 42 | const unsigned char *fmt, ...); |
43 | 43 | ||
44 | #endif /* _GUI_ICON_H_ */ | 44 | #endif /* _GUI_ICON_H_ */ |
diff --git a/apps/gui/textarea.c b/apps/gui/textarea.c index 1ddb70eadf..54aa7e4a6c 100644 --- a/apps/gui/textarea.c +++ b/apps/gui/textarea.c | |||
@@ -49,7 +49,7 @@ int gui_textarea_put_message(struct screen * display, | |||
49 | int i; | 49 | int i; |
50 | gui_textarea_clear(display); | 50 | gui_textarea_clear(display); |
51 | for(i=0;i<message->nb_lines && i+ystart<display->nb_lines;i++) | 51 | for(i=0;i<message->nb_lines && i+ystart<display->nb_lines;i++) |
52 | display->puts_scroll(0, i+ystart, message->message_lines[i]); | 52 | display->puts_scroll(0, i+ystart, (unsigned char *)message->message_lines[i]); |
53 | gui_textarea_update(display); | 53 | gui_textarea_update(display); |
54 | return(i); | 54 | return(i); |
55 | } | 55 | } |
@@ -64,7 +64,8 @@ void gui_textarea_update_nblines(struct screen * display) | |||
64 | if(global_settings.buttonbar && display->has_buttonbar) | 64 | if(global_settings.buttonbar && display->has_buttonbar) |
65 | height -= BUTTONBAR_HEIGHT; | 65 | height -= BUTTONBAR_HEIGHT; |
66 | #endif | 66 | #endif |
67 | display->getstringsize("A", &display->char_width, &display->char_height); | 67 | display->getstringsize((unsigned char *)"A", &display->char_width, |
68 | &display->char_height); | ||
68 | display->nb_lines = height / display->char_height; | 69 | display->nb_lines = height / display->char_height; |
69 | #else | 70 | #else |
70 | display->char_width = 1; | 71 | display->char_width = 1; |
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index 220f1814dc..3345a691ca 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c | |||
@@ -55,8 +55,8 @@ bool gui_yesno_draw_result(struct gui_yesno * yn, enum yesno_res result) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | enum yesno_res gui_syncyesno_run(struct text_message * main_message, | 57 | enum yesno_res gui_syncyesno_run(struct text_message * main_message, |
58 | struct text_message * yes_message, | 58 | struct text_message * yes_message, |
59 | struct text_message * no_message) | 59 | struct text_message * no_message) |
60 | { | 60 | { |
61 | int i; | 61 | int i; |
62 | unsigned button; | 62 | unsigned button; |
diff --git a/apps/language.c b/apps/language.c index 14fc7f1742..7a1442517d 100644 --- a/apps/language.c +++ b/apps/language.c | |||
@@ -36,7 +36,7 @@ void lang_init(void) | |||
36 | 36 | ||
37 | for (i = 0; i < LANG_LAST_INDEX_IN_ARRAY; i++) { | 37 | for (i = 0; i < LANG_LAST_INDEX_IN_ARRAY; i++) { |
38 | language_strings[i] = ptr; | 38 | language_strings[i] = ptr; |
39 | ptr += strlen(ptr) + 1; /* advance pointer to next string */ | 39 | ptr += strlen((char *)ptr) + 1; /* advance pointer to next string */ |
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
diff --git a/apps/main_menu.c b/apps/main_menu.c index 8bdb6fec2e..b04a91f55d 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c | |||
@@ -153,29 +153,29 @@ bool show_info(void) | |||
153 | integer = buflen / 1000; | 153 | integer = buflen / 1000; |
154 | decimal = buflen % 1000; | 154 | decimal = buflen % 1000; |
155 | #ifdef HAVE_LCD_CHARCELLS | 155 | #ifdef HAVE_LCD_CHARCELLS |
156 | snprintf(s, sizeof(s), str(LANG_BUFFER_STAT_PLAYER), | 156 | snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_PLAYER), |
157 | integer, decimal); | 157 | integer, decimal); |
158 | #else | 158 | #else |
159 | snprintf(s, sizeof(s), str(LANG_BUFFER_STAT_RECORDER), | 159 | snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_RECORDER), |
160 | integer, decimal); | 160 | integer, decimal); |
161 | #endif | 161 | #endif |
162 | lcd_puts(0, y++, s); | 162 | lcd_puts(0, y++, (unsigned char *)s); |
163 | 163 | ||
164 | #ifdef HAVE_CHARGE_CTRL | 164 | #ifdef HAVE_CHARGE_CTRL |
165 | if (charge_state == 1) | 165 | if (charge_state == 1) |
166 | snprintf(s, sizeof(s), str(LANG_BATTERY_CHARGE)); | 166 | snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_CHARGE)); |
167 | else if (charge_state == 2) | 167 | else if (charge_state == 2) |
168 | snprintf(s, sizeof(s), str(LANG_BATTERY_TOPOFF_CHARGE)); | 168 | snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_TOPOFF_CHARGE)); |
169 | else if (charge_state == 3) | 169 | else if (charge_state == 3) |
170 | snprintf(s, sizeof(s), str(LANG_BATTERY_TRICKLE_CHARGE)); | 170 | snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_TRICKLE_CHARGE)); |
171 | else | 171 | else |
172 | #endif | 172 | #endif |
173 | if (battery_level() >= 0) | 173 | if (battery_level() >= 0) |
174 | snprintf(s, sizeof(s), str(LANG_BATTERY_TIME), battery_level(), | 174 | snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_TIME), battery_level(), |
175 | battery_time() / 60, battery_time() % 60); | 175 | battery_time() / 60, battery_time() % 60); |
176 | else | 176 | else |
177 | strncpy(s, "(n/a)", sizeof(s)); | 177 | strncpy(s, "(n/a)", sizeof(s)); |
178 | lcd_puts(0, y++, s); | 178 | lcd_puts(0, y++, (unsigned char *)s); |
179 | } | 179 | } |
180 | 180 | ||
181 | if (state & 2) { | 181 | if (state & 2) { |
@@ -188,7 +188,7 @@ bool show_info(void) | |||
188 | output_dyn_value(s1, sizeof s1, size, kbyte_units, true); | 188 | output_dyn_value(s1, sizeof s1, size, kbyte_units, true); |
189 | snprintf(s, sizeof s, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1); | 189 | snprintf(s, sizeof s, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1); |
190 | #endif | 190 | #endif |
191 | lcd_puts(0, y++, s); | 191 | lcd_puts(0, y++, (unsigned char *)s); |
192 | 192 | ||
193 | #ifdef HAVE_MULTIVOLUME | 193 | #ifdef HAVE_MULTIVOLUME |
194 | if (size2) { | 194 | if (size2) { |
@@ -196,12 +196,12 @@ bool show_info(void) | |||
196 | output_dyn_value(s2, sizeof s2, size2, kbyte_units, true); | 196 | output_dyn_value(s2, sizeof s2, size2, kbyte_units, true); |
197 | snprintf(s, sizeof s, "%s %s/%s", str(LANG_DISK_NAME_MMC), | 197 | snprintf(s, sizeof s, "%s %s/%s", str(LANG_DISK_NAME_MMC), |
198 | s1, s2); | 198 | s1, s2); |
199 | lcd_puts(0, y++, s); | 199 | lcd_puts(0, y++, (unsigned char *)s); |
200 | } | 200 | } |
201 | #else | 201 | #else |
202 | output_dyn_value(s1, sizeof s1, free, kbyte_units, true); | 202 | output_dyn_value(s1, sizeof s1, free, kbyte_units, true); |
203 | snprintf(s, sizeof s, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1); | 203 | snprintf(s, sizeof s, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1); |
204 | lcd_puts(0, y++, s); | 204 | lcd_puts(0, y++, (unsigned char *)s); |
205 | #endif | 205 | #endif |
206 | } | 206 | } |
207 | lcd_update(); | 207 | lcd_update(); |
diff --git a/apps/menu.c b/apps/menu.c index 42ae2b8890..26df94b5a7 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -252,7 +252,7 @@ void menu_insert(int menu, int position, char *desc, bool (*function) (void)) | |||
252 | menus[menu].items[i] = menus[menu].items[i - 1]; | 252 | menus[menu].items[i] = menus[menu].items[i - 1]; |
253 | 253 | ||
254 | /* Update the current item */ | 254 | /* Update the current item */ |
255 | menus[menu].items[position].desc = desc; | 255 | menus[menu].items[position].desc = (unsigned char *)desc; |
256 | menus[menu].items[position].function = function; | 256 | menus[menu].items[position].function = function; |
257 | gui_synclist_add_item(&(menus[menu].synclist)); | 257 | gui_synclist_add_item(&(menus[menu].synclist)); |
258 | } | 258 | } |
@@ -347,7 +347,7 @@ void put_cursorxy(int x, int y, bool on) | |||
347 | if (global_settings.invert_cursor) | 347 | if (global_settings.invert_cursor) |
348 | return; | 348 | return; |
349 | 349 | ||
350 | lcd_getstringsize("A", &fw, &fh); | 350 | lcd_getstringsize((unsigned char *)"A", &fw, &fh); |
351 | xpos = x*6; | 351 | xpos = x*6; |
352 | ypos = y*fh + lcd_getymargin(); | 352 | ypos = y*fh + lcd_getymargin(); |
353 | if ( fh > 8 ) | 353 | if ( fh > 8 ) |
diff --git a/apps/misc.c b/apps/misc.c index c40eac0def..755eba095f 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -137,11 +137,11 @@ char *create_numbered_filename(char *buffer, const char *path, | |||
137 | { | 137 | { |
138 | int curr_num; | 138 | int curr_num; |
139 | 139 | ||
140 | if (strncasecmp(entry->d_name, prefix, prefixlen) | 140 | if (strncasecmp((char *)entry->d_name, prefix, prefixlen) |
141 | || strcasecmp(entry->d_name + prefixlen + numberlen, suffix)) | 141 | || strcasecmp((char *)entry->d_name + prefixlen + numberlen, suffix)) |
142 | continue; | 142 | continue; |
143 | 143 | ||
144 | curr_num = atoi(entry->d_name + prefixlen); | 144 | curr_num = atoi((char *)entry->d_name + prefixlen); |
145 | if (curr_num > max_num) | 145 | if (curr_num > max_num) |
146 | max_num = curr_num; | 146 | max_num = curr_num; |
147 | } | 147 | } |
@@ -591,16 +591,16 @@ int show_logo( void ) | |||
591 | 591 | ||
592 | snprintf(version, sizeof(version), "Ver. %s", appsversion); | 592 | snprintf(version, sizeof(version), "Ver. %s", appsversion); |
593 | lcd_setfont(FONT_SYSFIXED); | 593 | lcd_setfont(FONT_SYSFIXED); |
594 | lcd_getstringsize("A", &font_w, &font_h); | 594 | lcd_getstringsize((unsigned char *)"A", &font_w, &font_h); |
595 | lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2), | 595 | lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2), |
596 | LCD_HEIGHT-font_h, version); | 596 | LCD_HEIGHT-font_h, (unsigned char *)version); |
597 | lcd_update(); | 597 | lcd_update(); |
598 | 598 | ||
599 | #ifdef HAVE_REMOTE_LCD | 599 | #ifdef HAVE_REMOTE_LCD |
600 | lcd_remote_setfont(FONT_SYSFIXED); | 600 | lcd_remote_setfont(FONT_SYSFIXED); |
601 | lcd_remote_getstringsize("A", &font_w, &font_h); | 601 | lcd_remote_getstringsize((unsigned char *)"A", &font_w, &font_h); |
602 | lcd_remote_putsxy((LCD_REMOTE_WIDTH/2) - ((strlen(version)*font_w)/2), | 602 | lcd_remote_putsxy((LCD_REMOTE_WIDTH/2) - ((strlen(version)*font_w)/2), |
603 | LCD_REMOTE_HEIGHT-font_h, version); | 603 | LCD_REMOTE_HEIGHT-font_h, (unsigned char *)version); |
604 | lcd_remote_update(); | 604 | lcd_remote_update(); |
605 | #endif | 605 | #endif |
606 | 606 | ||
diff --git a/apps/onplay.c b/apps/onplay.c index 8c22a58b3e..dac5d4b27f 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -123,11 +123,12 @@ static bool list_viewers(void) | |||
123 | result = menu_show(m); | 123 | result = menu_show(m); |
124 | menu_exit(m); | 124 | menu_exit(m); |
125 | if (result >= 0) | 125 | if (result >= 0) |
126 | ret = filetype_load_plugin(menu[result].desc,selected_file); | 126 | ret = filetype_load_plugin((char *)menu[result].desc,selected_file); |
127 | } | 127 | } |
128 | else | 128 | else |
129 | { | 129 | { |
130 | gui_syncsplash(HZ*2, true, "No viewers found"); | 130 | /* FIX: translation! */ |
131 | gui_syncsplash(HZ*2, true, (unsigned char *)"No viewers found"); | ||
131 | } | 132 | } |
132 | 133 | ||
133 | if (ret == PLUGIN_USB_CONNECTED) | 134 | if (ret == PLUGIN_USB_CONNECTED) |
@@ -182,12 +183,12 @@ static bool add_to_playlist(int position, bool queue) | |||
182 | bool exit = false; | 183 | bool exit = false; |
183 | 184 | ||
184 | lcd_clear_display(); | 185 | lcd_clear_display(); |
185 | lcd_puts_scroll(0,0,str(LANG_RECURSE_DIRECTORY_QUESTION)); | 186 | lcd_puts_scroll(0, 0, str(LANG_RECURSE_DIRECTORY_QUESTION)); |
186 | lcd_puts_scroll(0,1,selected_file); | 187 | lcd_puts_scroll(0, 1, (unsigned char *)selected_file); |
187 | 188 | ||
188 | #ifdef HAVE_LCD_BITMAP | 189 | #ifdef HAVE_LCD_BITMAP |
189 | lcd_puts(0,3,str(LANG_CONFIRM_WITH_PLAY_RECORDER)); | 190 | lcd_puts(0, 3, str(LANG_CONFIRM_WITH_PLAY_RECORDER)); |
190 | lcd_puts(0,4,str(LANG_CANCEL_WITH_ANY_RECORDER)); | 191 | lcd_puts(0, 4, str(LANG_CANCEL_WITH_ANY_RECORDER)); |
191 | #endif | 192 | #endif |
192 | 193 | ||
193 | lcd_update(); | 194 | lcd_update(); |
@@ -365,8 +366,8 @@ static int remove_dir(char* dirname, int len) | |||
365 | 366 | ||
366 | if (entry->attribute & ATTR_DIRECTORY) | 367 | if (entry->attribute & ATTR_DIRECTORY) |
367 | { /* remove a subdirectory */ | 368 | { /* remove a subdirectory */ |
368 | if (!strcmp(entry->d_name, ".") || | 369 | if (!strcmp((char *)entry->d_name, ".") || |
369 | !strcmp(entry->d_name, "..")) | 370 | !strcmp((char *)entry->d_name, "..")) |
370 | continue; /* skip these */ | 371 | continue; /* skip these */ |
371 | 372 | ||
372 | result = remove_dir(dirname, len); /* recursion */ | 373 | result = remove_dir(dirname, len); /* recursion */ |
@@ -395,11 +396,11 @@ static int remove_dir(char* dirname, int len) | |||
395 | static bool delete_handler(bool is_dir) | 396 | static bool delete_handler(bool is_dir) |
396 | { | 397 | { |
397 | char *lines[]={ | 398 | char *lines[]={ |
398 | str(LANG_REALLY_DELETE), | 399 | (char *)str(LANG_REALLY_DELETE), |
399 | selected_file | 400 | selected_file |
400 | }; | 401 | }; |
401 | char *yes_lines[]={ | 402 | char *yes_lines[]={ |
402 | str(LANG_DELETED), | 403 | (char *)str(LANG_DELETED), |
403 | selected_file | 404 | selected_file |
404 | }; | 405 | }; |
405 | 406 | ||
@@ -476,7 +477,8 @@ bool create_dir(void) | |||
476 | 477 | ||
477 | rc = mkdir(dirname, 0); | 478 | rc = mkdir(dirname, 0); |
478 | if (rc < 0) { | 479 | if (rc < 0) { |
479 | gui_syncsplash(HZ, true, "%s %s", str(LANG_CREATE_DIR), str(LANG_FAILED)); | 480 | gui_syncsplash(HZ, true, (unsigned char *)"%s %s", |
481 | str(LANG_CREATE_DIR), str(LANG_FAILED)); | ||
480 | } else { | 482 | } else { |
481 | onplay_result = ONPLAY_RELOAD_DIR; | 483 | onplay_result = ONPLAY_RELOAD_DIR; |
482 | } | 484 | } |
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index 6024756c74..474d09ee5f 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c | |||
@@ -267,8 +267,8 @@ void pcmbuf_play_stop(void) | |||
267 | void pcmbuf_init(long bufsize) | 267 | void pcmbuf_init(long bufsize) |
268 | { | 268 | { |
269 | pcmbuf_size = bufsize; | 269 | pcmbuf_size = bufsize; |
270 | audiobuffer = &audiobuf[(audiobufend - audiobuf) - | 270 | audiobuffer = (char *)&audiobuf[(audiobufend - audiobuf) - |
271 | pcmbuf_size - PCMBUF_GUARD]; | 271 | pcmbuf_size - PCMBUF_GUARD]; |
272 | guardbuf = &audiobuffer[pcmbuf_size]; | 272 | guardbuf = &audiobuffer[pcmbuf_size]; |
273 | pcmbuf_event_handler = NULL; | 273 | pcmbuf_event_handler = NULL; |
274 | pcmbuf_play_stop(); | 274 | pcmbuf_play_stop(); |
diff --git a/apps/playback.c b/apps/playback.c index c8fd5d81d6..a61b8128ae 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -222,8 +222,8 @@ static void do_swap(int idx_old, int idx_new) | |||
222 | memcpy(iram_p, iram_buf[idx_new], CODEC_IRAM_SIZE); | 222 | memcpy(iram_p, iram_buf[idx_new], CODEC_IRAM_SIZE); |
223 | #endif | 223 | #endif |
224 | 224 | ||
225 | dram_buf[0] = &filebuf[filebuflen+CODEC_IRAM_SIZE*2]; | 225 | dram_buf[0] = (unsigned char *)&filebuf[filebuflen+CODEC_IRAM_SIZE*2]; |
226 | dram_buf[1] = &filebuf[filebuflen+CODEC_IRAM_SIZE*2+CODEC_SIZE]; | 226 | dram_buf[1] = (unsigned char *)&filebuf[filebuflen+CODEC_IRAM_SIZE*2+CODEC_SIZE]; |
227 | memcpy(dram_buf[idx_old], codecbuf, CODEC_SIZE); | 227 | memcpy(dram_buf[idx_old], codecbuf, CODEC_SIZE); |
228 | memcpy(codecbuf, dram_buf[idx_new], CODEC_SIZE); | 228 | memcpy(codecbuf, dram_buf[idx_new], CODEC_SIZE); |
229 | } | 229 | } |
@@ -1924,7 +1924,7 @@ void codec_thread(void) | |||
1924 | 1924 | ||
1925 | static void reset_buffer(void) | 1925 | static void reset_buffer(void) |
1926 | { | 1926 | { |
1927 | filebuf = &audiobuf[MALLOC_BUFSIZE]; | 1927 | filebuf = (char *)&audiobuf[MALLOC_BUFSIZE]; |
1928 | filebuflen = audiobufend - audiobuf - pcmbuf_get_bufsize() | 1928 | filebuflen = audiobufend - audiobuf - pcmbuf_get_bufsize() |
1929 | - PCMBUF_GUARD - MALLOC_BUFSIZE - GUARD_BUFSIZE; | 1929 | - PCMBUF_GUARD - MALLOC_BUFSIZE - GUARD_BUFSIZE; |
1930 | 1930 | ||
@@ -2287,7 +2287,7 @@ void mp3_play_data(const unsigned char* start, int size, | |||
2287 | void (*get_more)(unsigned char** start, int* size)) | 2287 | void (*get_more)(unsigned char** start, int* size)) |
2288 | { | 2288 | { |
2289 | voice_getmore = get_more; | 2289 | voice_getmore = get_more; |
2290 | voicebuf = (unsigned char *)start; | 2290 | voicebuf = (char *)start; |
2291 | voice_remaining = size; | 2291 | voice_remaining = size; |
2292 | voice_is_playing = true; | 2292 | voice_is_playing = true; |
2293 | pcmbuf_reset_mixpos(); | 2293 | pcmbuf_reset_mixpos(); |
@@ -2334,7 +2334,7 @@ void audio_set_crossfade(int enable) | |||
2334 | 2334 | ||
2335 | /* Re-initialize audio system. */ | 2335 | /* Re-initialize audio system. */ |
2336 | if (was_playing) | 2336 | if (was_playing) |
2337 | gui_syncsplash(0, true, str(LANG_RESTARTING_PLAYBACK)); | 2337 | gui_syncsplash(0, true, (char *)str(LANG_RESTARTING_PLAYBACK)); |
2338 | pcmbuf_init(size); | 2338 | pcmbuf_init(size); |
2339 | pcmbuf_crossfade_enable(enable); | 2339 | pcmbuf_crossfade_enable(enable); |
2340 | reset_buffer(); | 2340 | reset_buffer(); |
@@ -2385,7 +2385,7 @@ void audio_init(void) | |||
2385 | filebufused = 0; | 2385 | filebufused = 0; |
2386 | filling = false; | 2386 | filling = false; |
2387 | current_codec = CODEC_IDX_AUDIO; | 2387 | current_codec = CODEC_IDX_AUDIO; |
2388 | filebuf = &audiobuf[MALLOC_BUFSIZE]; | 2388 | filebuf = (char *)&audiobuf[MALLOC_BUFSIZE]; |
2389 | playing = false; | 2389 | playing = false; |
2390 | audio_codec_loaded = false; | 2390 | audio_codec_loaded = false; |
2391 | voice_is_playing = false; | 2391 | voice_is_playing = false; |
diff --git a/apps/playlist.c b/apps/playlist.c index e0a2b9ba6e..46556bff12 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -173,7 +173,7 @@ static int get_previous_directory(char *dir); | |||
173 | static int check_subdir_for_music(char *dir, char *subdir); | 173 | static int check_subdir_for_music(char *dir, char *subdir); |
174 | static int format_track_path(char *dest, char *src, int buf_length, int max, | 174 | static int format_track_path(char *dest, char *src, int buf_length, int max, |
175 | char *dir); | 175 | char *dir); |
176 | static void display_playlist_count(int count, const char *fmt); | 176 | static void display_playlist_count(int count, const unsigned char *fmt); |
177 | static void display_buffer_full(void); | 177 | static void display_buffer_full(void); |
178 | static int flush_pending_control(struct playlist_info* playlist); | 178 | static int flush_pending_control(struct playlist_info* playlist); |
179 | static int rotate_index(const struct playlist_info* playlist, int index); | 179 | static int rotate_index(const struct playlist_info* playlist, int index); |
@@ -274,9 +274,9 @@ static void create_control(struct playlist_info* playlist) | |||
274 | { | 274 | { |
275 | if (check_rockboxdir()) | 275 | if (check_rockboxdir()) |
276 | { | 276 | { |
277 | gui_syncsplash(HZ*2, true, "%s (%d)", | 277 | gui_syncsplash(HZ*2, true, (unsigned char *)"%s (%d)", |
278 | str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), | 278 | str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), |
279 | playlist->control_fd); | 279 | playlist->control_fd); |
280 | } | 280 | } |
281 | playlist->control_created = false; | 281 | playlist->control_created = false; |
282 | } | 282 | } |
@@ -375,7 +375,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist, | |||
375 | audio_stop(); | 375 | audio_stop(); |
376 | talk_buffer_steal(); /* we use the mp3 buffer, need to tell */ | 376 | talk_buffer_steal(); /* we use the mp3 buffer, need to tell */ |
377 | 377 | ||
378 | buffer = audiobuf; | 378 | buffer = (char *)audiobuf; |
379 | buflen = (audiobufend - audiobuf); | 379 | buflen = (audiobufend - audiobuf); |
380 | } | 380 | } |
381 | 381 | ||
@@ -388,7 +388,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist, | |||
388 | if(nread <= 0) | 388 | if(nread <= 0) |
389 | break; | 389 | break; |
390 | 390 | ||
391 | p = buffer; | 391 | p = (unsigned char *)buffer; |
392 | 392 | ||
393 | for(count=0; count < nread; count++,p++) { | 393 | for(count=0; count < nread; count++,p++) { |
394 | 394 | ||
@@ -598,7 +598,7 @@ static int add_directory_to_playlist(struct playlist_info* playlist, | |||
598 | bool queue, int *count, bool recurse) | 598 | bool queue, int *count, bool recurse) |
599 | { | 599 | { |
600 | char buf[MAX_PATH+1]; | 600 | char buf[MAX_PATH+1]; |
601 | char *count_str; | 601 | unsigned char *count_str; |
602 | int result = 0; | 602 | int result = 0; |
603 | int num_files = 0; | 603 | int num_files = 0; |
604 | int i; | 604 | int i; |
@@ -1512,7 +1512,7 @@ static int format_track_path(char *dest, char *src, int buf_length, int max, | |||
1512 | * Display splash message showing progress of playlist/directory insertion or | 1512 | * Display splash message showing progress of playlist/directory insertion or |
1513 | * save. | 1513 | * save. |
1514 | */ | 1514 | */ |
1515 | static void display_playlist_count(int count, const char *fmt) | 1515 | static void display_playlist_count(int count, const unsigned char *fmt) |
1516 | { | 1516 | { |
1517 | lcd_clear_display(); | 1517 | lcd_clear_display(); |
1518 | 1518 | ||
@@ -1525,9 +1525,9 @@ static void display_playlist_count(int count, const char *fmt) | |||
1525 | 1525 | ||
1526 | gui_syncsplash(0, true, fmt, count, | 1526 | gui_syncsplash(0, true, fmt, count, |
1527 | #if CONFIG_KEYPAD == PLAYER_PAD | 1527 | #if CONFIG_KEYPAD == PLAYER_PAD |
1528 | str(LANG_STOP_ABORT) | 1528 | str(LANG_STOP_ABORT) |
1529 | #else | 1529 | #else |
1530 | str(LANG_OFF_ABORT) | 1530 | str(LANG_OFF_ABORT) |
1531 | #endif | 1531 | #endif |
1532 | ); | 1532 | ); |
1533 | } | 1533 | } |
@@ -1537,9 +1537,9 @@ static void display_playlist_count(int count, const char *fmt) | |||
1537 | */ | 1537 | */ |
1538 | static void display_buffer_full(void) | 1538 | static void display_buffer_full(void) |
1539 | { | 1539 | { |
1540 | gui_syncsplash(HZ*2, true, "%s %s", | 1540 | gui_syncsplash(HZ*2, true, (unsigned char *)"%s %s", |
1541 | str(LANG_PLAYINDICES_PLAYLIST), | 1541 | str(LANG_PLAYINDICES_PLAYLIST), |
1542 | str(LANG_PLAYINDICES_BUFFER)); | 1542 | str(LANG_PLAYINDICES_BUFFER)); |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | /* | 1545 | /* |
@@ -1684,10 +1684,10 @@ int playlist_resume(void) | |||
1684 | #if CONFIG_CODEC != SWCODEC | 1684 | #if CONFIG_CODEC != SWCODEC |
1685 | talk_buffer_steal(); /* we use the mp3 buffer, need to tell */ | 1685 | talk_buffer_steal(); /* we use the mp3 buffer, need to tell */ |
1686 | buflen = (audiobufend - audiobuf); | 1686 | buflen = (audiobufend - audiobuf); |
1687 | buffer = audiobuf; | 1687 | buffer = (char *)audiobuf; |
1688 | #else | 1688 | #else |
1689 | buflen = (audiobufend - audiobuf - talk_get_bufsize()); | 1689 | buflen = (audiobufend - audiobuf - talk_get_bufsize()); |
1690 | buffer = &audiobuf[talk_get_bufsize()]; | 1690 | buffer = (char *)&audiobuf[talk_get_bufsize()]; |
1691 | #endif | 1691 | #endif |
1692 | 1692 | ||
1693 | empty_playlist(playlist, true); | 1693 | empty_playlist(playlist, true); |
@@ -2602,7 +2602,7 @@ int playlist_insert_directory(struct playlist_info* playlist, | |||
2602 | { | 2602 | { |
2603 | int count = 0; | 2603 | int count = 0; |
2604 | int result; | 2604 | int result; |
2605 | char *count_str; | 2605 | unsigned char *count_str; |
2606 | 2606 | ||
2607 | if (!playlist) | 2607 | if (!playlist) |
2608 | playlist = ¤t_playlist; | 2608 | playlist = ¤t_playlist; |
@@ -2649,7 +2649,7 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename, | |||
2649 | int max; | 2649 | int max; |
2650 | char *temp_ptr; | 2650 | char *temp_ptr; |
2651 | char *dir; | 2651 | char *dir; |
2652 | char *count_str; | 2652 | unsigned char *count_str; |
2653 | char temp_buf[MAX_PATH+1]; | 2653 | char temp_buf[MAX_PATH+1]; |
2654 | char trackname[MAX_PATH+1]; | 2654 | char trackname[MAX_PATH+1]; |
2655 | int count = 0; | 2655 | int count = 0; |
diff --git a/apps/playlist_menu.c b/apps/playlist_menu.c index c6ccd5a45a..d59661a96c 100644 --- a/apps/playlist_menu.c +++ b/apps/playlist_menu.c | |||
@@ -55,7 +55,7 @@ static bool recurse_directory(void) | |||
55 | { STR(LANG_RESUME_SETTING_ASK)}, | 55 | { STR(LANG_RESUME_SETTING_ASK)}, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | return set_option( str(LANG_RECURSE_DIRECTORY), | 58 | return set_option( (char *)str(LANG_RECURSE_DIRECTORY), |
59 | &global_settings.recursive_dir_insert, INT, names, 3, | 59 | &global_settings.recursive_dir_insert, INT, names, 3, |
60 | NULL ); | 60 | NULL ); |
61 | } | 61 | } |
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index b41bee3c20..c249142bda 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -514,15 +514,15 @@ static bool viewer_menu(void) | |||
514 | /* Show icons in viewer? */ | 514 | /* Show icons in viewer? */ |
515 | static bool show_icons(void) | 515 | static bool show_icons(void) |
516 | { | 516 | { |
517 | return set_bool(str(LANG_SHOW_ICONS), | 517 | return set_bool((char *)str(LANG_SHOW_ICONS), |
518 | &global_settings.playlist_viewer_icons); | 518 | &global_settings.playlist_viewer_icons); |
519 | } | 519 | } |
520 | 520 | ||
521 | /* Show indices of tracks? */ | 521 | /* Show indices of tracks? */ |
522 | static bool show_indices(void) | 522 | static bool show_indices(void) |
523 | { | 523 | { |
524 | return set_bool(str(LANG_SHOW_INDICES), | 524 | return set_bool((char *)str(LANG_SHOW_INDICES), |
525 | &global_settings.playlist_viewer_indices); | 525 | &global_settings.playlist_viewer_indices); |
526 | } | 526 | } |
527 | 527 | ||
528 | /* How to display a track */ | 528 | /* How to display a track */ |
@@ -533,8 +533,9 @@ static bool track_display(void) | |||
533 | { STR(LANG_DISPLAY_FULL_PATH) } | 533 | { STR(LANG_DISPLAY_FULL_PATH) } |
534 | }; | 534 | }; |
535 | 535 | ||
536 | return set_option(str(LANG_TRACK_DISPLAY), | 536 | return set_option((char *)str(LANG_TRACK_DISPLAY), |
537 | &global_settings.playlist_viewer_track_display, INT, names, 2, NULL); | 537 | &global_settings.playlist_viewer_track_display, INT, names, 2, |
538 | NULL); | ||
538 | } | 539 | } |
539 | 540 | ||
540 | /* Save playlist to disk */ | 541 | /* Save playlist to disk */ |
diff --git a/apps/plugin.h b/apps/plugin.h index f8e84f8cae..92f1d4ea8b 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -201,7 +201,7 @@ struct plugin_api { | |||
201 | void (*backlight_on)(void); | 201 | void (*backlight_on)(void); |
202 | void (*backlight_off)(void); | 202 | void (*backlight_off)(void); |
203 | void (*backlight_set_timeout)(int index); | 203 | void (*backlight_set_timeout)(int index); |
204 | void (*splash)(int ticks, bool center, const char *fmt, ...); | 204 | void (*splash)(int ticks, bool center, const unsigned char *fmt, ...); |
205 | 205 | ||
206 | #ifdef HAVE_REMOTE_LCD | 206 | #ifdef HAVE_REMOTE_LCD |
207 | /* remote lcd */ | 207 | /* remote lcd */ |
diff --git a/apps/screens.c b/apps/screens.c index 41b51cc0ac..6c6c5325be 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -521,23 +521,23 @@ bool quick_screen_quick(int button_enter) | |||
521 | struct gui_quickscreen qs; | 521 | struct gui_quickscreen qs; |
522 | 522 | ||
523 | option_select_init_items(&left_option, | 523 | option_select_init_items(&left_option, |
524 | str(LANG_SHUFFLE), | 524 | (char *)str(LANG_SHUFFLE), |
525 | bool_to_int(global_settings.playlist_shuffle), | 525 | bool_to_int(global_settings.playlist_shuffle), |
526 | left_items, | 526 | left_items, |
527 | 2); | 527 | 2); |
528 | option_select_init_items(&bottom_option, | 528 | option_select_init_items(&bottom_option, |
529 | str(LANG_FILTER), | 529 | (char *)str(LANG_FILTER), |
530 | global_settings.dirfilter, | 530 | global_settings.dirfilter, |
531 | bottom_items, | 531 | bottom_items, |
532 | sizeof(bottom_items)/sizeof(struct opt_items)); | 532 | sizeof(bottom_items)/sizeof(struct opt_items)); |
533 | option_select_init_items(&right_option, | 533 | option_select_init_items(&right_option, |
534 | str(LANG_REPEAT), | 534 | (char *)str(LANG_REPEAT), |
535 | global_settings.repeat_mode, | 535 | global_settings.repeat_mode, |
536 | right_items, | 536 | right_items, |
537 | sizeof(right_items)/sizeof(struct opt_items)); | 537 | sizeof(right_items)/sizeof(struct opt_items)); |
538 | 538 | ||
539 | gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, | 539 | gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, |
540 | str(LANG_F2_MODE), &quick_screen_quick_apply); | 540 | (char *)str(LANG_F2_MODE), &quick_screen_quick_apply); |
541 | oldrepeat=global_settings.repeat_mode; | 541 | oldrepeat=global_settings.repeat_mode; |
542 | res=gui_syncquickscreen_run(&qs, button_enter); | 542 | res=gui_syncquickscreen_run(&qs, button_enter); |
543 | if(!res) | 543 | if(!res) |
@@ -619,7 +619,7 @@ bool quick_screen_f3(int button_enter) | |||
619 | #if defined(HAVE_CHARGING) || defined(SIMULATOR) | 619 | #if defined(HAVE_CHARGING) || defined(SIMULATOR) |
620 | void charging_splash(void) | 620 | void charging_splash(void) |
621 | { | 621 | { |
622 | gui_syncsplash(2*HZ, true, str(LANG_BATTERY_CHARGE)); | 622 | gui_syncsplash(2*HZ, true, (char *)str(LANG_BATTERY_CHARGE)); |
623 | button_clear_queue(); | 623 | button_clear_queue(); |
624 | } | 624 | } |
625 | #endif | 625 | #endif |
@@ -1184,8 +1184,8 @@ bool set_rating(void) | |||
1184 | { | 1184 | { |
1185 | lcd_clear_display(); | 1185 | lcd_clear_display(); |
1186 | lcd_puts(0, 0, str(LANG_RATING)); | 1186 | lcd_puts(0, 0, str(LANG_RATING)); |
1187 | snprintf(rating_text,sizeof(rating_text),"%d",id3->rating); | 1187 | snprintf(rating_text, sizeof(rating_text), "%d", id3->rating); |
1188 | lcd_puts(0,1,rating_text); | 1188 | lcd_puts(0, 1, (unsigned char *)rating_text); |
1189 | lcd_update(); | 1189 | lcd_update(); |
1190 | button = button_get(true); | 1190 | button = button_get(true); |
1191 | 1191 | ||
diff --git a/apps/settings.c b/apps/settings.c index 302cf51e26..ac23cafe96 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -770,11 +770,15 @@ int settings_save( void ) | |||
770 | save_bit_table(rtc_bits, sizeof(rtc_bits)/sizeof(rtc_bits[0]), 4*8); | 770 | save_bit_table(rtc_bits, sizeof(rtc_bits)/sizeof(rtc_bits[0]), 4*8); |
771 | save_bit_table(hd_bits, sizeof(hd_bits)/sizeof(hd_bits[0]), RTC_BLOCK_SIZE*8); | 771 | save_bit_table(hd_bits, sizeof(hd_bits)/sizeof(hd_bits[0]), RTC_BLOCK_SIZE*8); |
772 | 772 | ||
773 | strncpy(&config_block[0xb8], global_settings.wps_file, MAX_FILENAME); | 773 | strncpy((char *)&config_block[0xb8], (char *)global_settings.wps_file, |
774 | strncpy(&config_block[0xcc], global_settings.lang_file, MAX_FILENAME); | 774 | MAX_FILENAME); |
775 | strncpy(&config_block[0xe0], global_settings.font_file, MAX_FILENAME); | 775 | strncpy((char *)&config_block[0xcc], (char *)global_settings.lang_file, |
776 | MAX_FILENAME); | ||
777 | strncpy((char *)&config_block[0xe0], (char *)global_settings.font_file, | ||
778 | MAX_FILENAME); | ||
776 | #ifdef HAVE_REMOTE_LCD | 779 | #ifdef HAVE_REMOTE_LCD |
777 | strncpy(&config_block[0xf4], global_settings.rwps_file, MAX_FILENAME); | 780 | strncpy((char *)&config_block[0xf4], (char *)global_settings.rwps_file, |
781 | MAX_FILENAME); | ||
778 | #endif | 782 | #endif |
779 | 783 | ||
780 | if(save_config_buffer()) | 784 | if(save_config_buffer()) |
@@ -1053,11 +1057,15 @@ void settings_load(int which) | |||
1053 | if ( global_settings.contrast < MIN_CONTRAST_SETTING ) | 1057 | if ( global_settings.contrast < MIN_CONTRAST_SETTING ) |
1054 | global_settings.contrast = lcd_default_contrast(); | 1058 | global_settings.contrast = lcd_default_contrast(); |
1055 | 1059 | ||
1056 | strncpy(global_settings.wps_file, &config_block[0xb8], MAX_FILENAME); | 1060 | strncpy((char *)global_settings.wps_file, (char *)&config_block[0xb8], |
1057 | strncpy(global_settings.lang_file, &config_block[0xcc], MAX_FILENAME); | 1061 | MAX_FILENAME); |
1058 | strncpy(global_settings.font_file, &config_block[0xe0], MAX_FILENAME); | 1062 | strncpy((char *)global_settings.lang_file, (char *)&config_block[0xcc], |
1063 | MAX_FILENAME); | ||
1064 | strncpy((char *)global_settings.font_file, (char *)&config_block[0xe0], | ||
1065 | MAX_FILENAME); | ||
1059 | #ifdef HAVE_REMOTE_LCD | 1066 | #ifdef HAVE_REMOTE_LCD |
1060 | strncpy(global_settings.rwps_file, &config_block[0xf4], MAX_FILENAME); | 1067 | strncpy((char *)global_settings.rwps_file, (char *)&config_block[0xf4], |
1068 | MAX_FILENAME); | ||
1061 | #endif | 1069 | #endif |
1062 | } | 1070 | } |
1063 | } | 1071 | } |
@@ -1198,25 +1206,25 @@ bool settings_load_config(const char* file) | |||
1198 | /* check for the string values */ | 1206 | /* check for the string values */ |
1199 | if (!strcasecmp(name, "wps")) { | 1207 | if (!strcasecmp(name, "wps")) { |
1200 | if (wps_data_load(gui_wps[0].data,value,true, false)) | 1208 | if (wps_data_load(gui_wps[0].data,value,true, false)) |
1201 | set_file(value, global_settings.wps_file, MAX_FILENAME); | 1209 | set_file(value, (char *)global_settings.wps_file, MAX_FILENAME); |
1202 | } | 1210 | } |
1203 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) | 1211 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) |
1204 | else if (!strcasecmp(name, "rwps")) { | 1212 | else if (!strcasecmp(name, "rwps")) { |
1205 | if (wps_data_load(gui_wps[1].data,value,true, false)) | 1213 | if (wps_data_load(gui_wps[1].data,value,true, false)) |
1206 | set_file(value, global_settings.rwps_file, MAX_FILENAME); | 1214 | set_file(value, (char *)global_settings.rwps_file, MAX_FILENAME); |
1207 | } | 1215 | } |
1208 | #endif | 1216 | #endif |
1209 | else if (!strcasecmp(name, "lang")) { | 1217 | else if (!strcasecmp(name, "lang")) { |
1210 | if (!lang_load(value)) | 1218 | if (!lang_load(value)) |
1211 | { | 1219 | { |
1212 | set_file(value, global_settings.lang_file, MAX_FILENAME); | 1220 | set_file(value, (char *)global_settings.lang_file, MAX_FILENAME); |
1213 | talk_init(); /* use voice of same language */ | 1221 | talk_init(); /* use voice of same language */ |
1214 | } | 1222 | } |
1215 | } | 1223 | } |
1216 | #ifdef HAVE_LCD_BITMAP | 1224 | #ifdef HAVE_LCD_BITMAP |
1217 | else if (!strcasecmp(name, "font")) { | 1225 | else if (!strcasecmp(name, "font")) { |
1218 | if (font_load(value)) | 1226 | if (font_load(value)) |
1219 | set_file(value, global_settings.font_file, MAX_FILENAME); | 1227 | set_file(value, (char *)global_settings.font_file, MAX_FILENAME); |
1220 | } | 1228 | } |
1221 | #endif | 1229 | #endif |
1222 | 1230 | ||
@@ -1367,7 +1375,7 @@ bool settings_save_config(void) | |||
1367 | 1375 | ||
1368 | close(fd); | 1376 | close(fd); |
1369 | 1377 | ||
1370 | gui_syncsplash(HZ, true, "%s %s", str(LANG_SETTINGS_SAVED1), | 1378 | gui_syncsplash(HZ, true, (unsigned char *)"%s %s", str(LANG_SETTINGS_SAVED1), |
1371 | str(LANG_SETTINGS_SAVED2)); | 1379 | str(LANG_SETTINGS_SAVED2)); |
1372 | return true; | 1380 | return true; |
1373 | } | 1381 | } |
@@ -1447,9 +1455,9 @@ void settings_reset(void) { | |||
1447 | bool set_bool(const char* string, bool* variable ) | 1455 | bool set_bool(const char* string, bool* variable ) |
1448 | { | 1456 | { |
1449 | return set_bool_options(string, variable, | 1457 | return set_bool_options(string, variable, |
1450 | STR(LANG_SET_BOOL_YES), | 1458 | (char *)STR(LANG_SET_BOOL_YES), |
1451 | STR(LANG_SET_BOOL_NO), | 1459 | (char *)STR(LANG_SET_BOOL_NO), |
1452 | NULL); | 1460 | NULL); |
1453 | } | 1461 | } |
1454 | 1462 | ||
1455 | /* wrapper to convert from int param to bool param in set_option */ | 1463 | /* wrapper to convert from int param to bool param in set_option */ |
@@ -1467,7 +1475,10 @@ bool set_bool_options(const char* string, bool* variable, | |||
1467 | const char* no_str, int no_voice, | 1475 | const char* no_str, int no_voice, |
1468 | void (*function)(bool)) | 1476 | void (*function)(bool)) |
1469 | { | 1477 | { |
1470 | struct opt_items names[] = { {no_str, no_voice}, {yes_str, yes_voice} }; | 1478 | struct opt_items names[] = { |
1479 | {(unsigned char *)no_str, no_voice}, | ||
1480 | {(unsigned char *)yes_str, yes_voice} | ||
1481 | }; | ||
1471 | bool result; | 1482 | bool result; |
1472 | 1483 | ||
1473 | boolfunction = function; | 1484 | boolfunction = function; |
@@ -1492,7 +1503,7 @@ void talk_unit(int unit, int value) | |||
1492 | } | 1503 | } |
1493 | } | 1504 | } |
1494 | 1505 | ||
1495 | bool set_int(const char* string, | 1506 | bool set_int(const unsigned char* string, |
1496 | const char* unit, | 1507 | const char* unit, |
1497 | int voice_unit, | 1508 | int voice_unit, |
1498 | int* variable, | 1509 | int* variable, |
@@ -1505,7 +1516,8 @@ bool set_int(const char* string, | |||
1505 | int button; | 1516 | int button; |
1506 | int oldvalue=*variable; | 1517 | int oldvalue=*variable; |
1507 | struct gui_select select; | 1518 | struct gui_select select; |
1508 | gui_select_init_numeric(&select, string, *variable, min, max, step, unit, formatter); | 1519 | gui_select_init_numeric(&select, (char *)string, *variable, min, max, step, unit, |
1520 | formatter); | ||
1509 | gui_syncselect_draw(&select); | 1521 | gui_syncselect_draw(&select); |
1510 | talk_unit(voice_unit, *variable); | 1522 | talk_unit(voice_unit, *variable); |
1511 | while (!gui_select_is_validated(&select)) | 1523 | while (!gui_select_is_validated(&select)) |
diff --git a/apps/settings.h b/apps/settings.h index 9f9cc63602..6c675463f1 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -139,7 +139,7 @@ extern unsigned char vp_dummy[VIRT_SIZE]; | |||
139 | #define ID2P(id) (VIRT_PTR + id) | 139 | #define ID2P(id) (VIRT_PTR + id) |
140 | 140 | ||
141 | /* resolve a pointer which could be a virtualized ID or a literal */ | 141 | /* resolve a pointer which could be a virtualized ID or a literal */ |
142 | #define P2STR(p) ((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p) | 142 | #define P2STR(p) (char *)((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p) |
143 | 143 | ||
144 | /* get the string ID from a virtual pointer, -1 if not virtual */ | 144 | /* get the string ID from a virtual pointer, -1 if not virtual */ |
145 | #define P2ID(p) ((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1) | 145 | #define P2ID(p) ((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1) |
@@ -403,7 +403,8 @@ bool set_bool_options(const char* string, bool* variable, | |||
403 | bool set_bool(const char* string, bool* variable ); | 403 | bool set_bool(const char* string, bool* variable ); |
404 | bool set_option(const char* string, void* variable, enum optiontype type, | 404 | bool set_option(const char* string, void* variable, enum optiontype type, |
405 | const struct opt_items* options, int numoptions, void (*function)(int)); | 405 | const struct opt_items* options, int numoptions, void (*function)(int)); |
406 | bool set_int(const char* string, const char* unit, int voice_unit, int* variable, | 406 | bool set_int(const unsigned char* string, const char* unit, int voice_unit, |
407 | int* variable, | ||
407 | void (*function)(int), int step, int min, int max, | 408 | void (*function)(int), int step, int min, int max, |
408 | void (*formatter)(char*, int, int, const char*) ); | 409 | void (*formatter)(char*, int, int, const char*) ); |
409 | bool set_time_screen(const char* string, struct tm *tm); | 410 | bool set_time_screen(const char* string, struct tm *tm); |
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index ca352fd8ff..5f902e2ef9 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -88,7 +88,7 @@ static bool car_adapter_mode(void) | |||
88 | */ | 88 | */ |
89 | static bool show_icons(void) | 89 | static bool show_icons(void) |
90 | { | 90 | { |
91 | return set_bool( str(LANG_SHOW_ICONS), &global_settings.show_icons ); | 91 | return set_bool( (char *)str(LANG_SHOW_ICONS), &global_settings.show_icons ); |
92 | } | 92 | } |
93 | 93 | ||
94 | #ifdef HAVE_REMOTE_LCD | 94 | #ifdef HAVE_REMOTE_LCD |
@@ -102,9 +102,9 @@ static bool remote_contrast(void) | |||
102 | 102 | ||
103 | static bool remote_invert(void) | 103 | static bool remote_invert(void) |
104 | { | 104 | { |
105 | bool rc = set_bool_options(str(LANG_INVERT), | 105 | bool rc = set_bool_options((char *)str(LANG_INVERT), |
106 | &global_settings.remote_invert, | 106 | &global_settings.remote_invert, |
107 | STR(LANG_INVERT_LCD_INVERSE), | 107 | (char *)STR(LANG_INVERT_LCD_INVERSE), |
108 | STR(LANG_INVERT_LCD_NORMAL), | 108 | STR(LANG_INVERT_LCD_NORMAL), |
109 | lcd_remote_set_invert_display); | 109 | lcd_remote_set_invert_display); |
110 | return rc; | 110 | return rc; |
@@ -112,7 +112,7 @@ static bool remote_invert(void) | |||
112 | 112 | ||
113 | static bool remote_flip_display(void) | 113 | static bool remote_flip_display(void) |
114 | { | 114 | { |
115 | bool rc = set_bool( str(LANG_FLIP_DISPLAY), | 115 | bool rc = set_bool( (char *)str(LANG_FLIP_DISPLAY), |
116 | &global_settings.remote_flip_display); | 116 | &global_settings.remote_flip_display); |
117 | 117 | ||
118 | lcd_remote_set_flip(global_settings.remote_flip_display); | 118 | lcd_remote_set_flip(global_settings.remote_flip_display); |
@@ -138,35 +138,35 @@ static bool remote_reduce_ticking(void) | |||
138 | static const struct opt_items backlight_timeouts[] = { | 138 | static const struct opt_items backlight_timeouts[] = { |
139 | { STR(LANG_OFF) }, | 139 | { STR(LANG_OFF) }, |
140 | { STR(LANG_ON) }, | 140 | { STR(LANG_ON) }, |
141 | { "1s ", TALK_ID(1, UNIT_SEC) }, | 141 | { (unsigned char *)"1s ", TALK_ID(1, UNIT_SEC) }, |
142 | { "2s ", TALK_ID(2, UNIT_SEC) }, | 142 | { (unsigned char *)"2s ", TALK_ID(2, UNIT_SEC) }, |
143 | { "3s ", TALK_ID(3, UNIT_SEC) }, | 143 | { (unsigned char *)"3s ", TALK_ID(3, UNIT_SEC) }, |
144 | { "4s ", TALK_ID(4, UNIT_SEC) }, | 144 | { (unsigned char *)"4s ", TALK_ID(4, UNIT_SEC) }, |
145 | { "5s ", TALK_ID(5, UNIT_SEC) }, | 145 | { (unsigned char *)"5s ", TALK_ID(5, UNIT_SEC) }, |
146 | { "6s ", TALK_ID(6, UNIT_SEC) }, | 146 | { (unsigned char *)"6s ", TALK_ID(6, UNIT_SEC) }, |
147 | { "7s ", TALK_ID(7, UNIT_SEC) }, | 147 | { (unsigned char *)"7s ", TALK_ID(7, UNIT_SEC) }, |
148 | { "8s ", TALK_ID(8, UNIT_SEC) }, | 148 | { (unsigned char *)"8s ", TALK_ID(8, UNIT_SEC) }, |
149 | { "9s ", TALK_ID(9, UNIT_SEC) }, | 149 | { (unsigned char *)"9s ", TALK_ID(9, UNIT_SEC) }, |
150 | { "10s", TALK_ID(10, UNIT_SEC) }, | 150 | { (unsigned char *)"10s", TALK_ID(10, UNIT_SEC) }, |
151 | { "15s", TALK_ID(15, UNIT_SEC) }, | 151 | { (unsigned char *)"15s", TALK_ID(15, UNIT_SEC) }, |
152 | { "20s", TALK_ID(20, UNIT_SEC) }, | 152 | { (unsigned char *)"20s", TALK_ID(20, UNIT_SEC) }, |
153 | { "25s", TALK_ID(25, UNIT_SEC) }, | 153 | { (unsigned char *)"25s", TALK_ID(25, UNIT_SEC) }, |
154 | { "30s", TALK_ID(30, UNIT_SEC) }, | 154 | { (unsigned char *)"30s", TALK_ID(30, UNIT_SEC) }, |
155 | { "45s", TALK_ID(45, UNIT_SEC) }, | 155 | { (unsigned char *)"45s", TALK_ID(45, UNIT_SEC) }, |
156 | { "60s", TALK_ID(60, UNIT_SEC) }, | 156 | { (unsigned char *)"60s", TALK_ID(60, UNIT_SEC) }, |
157 | { "90s", TALK_ID(90, UNIT_SEC) } | 157 | { (unsigned char *)"90s", TALK_ID(90, UNIT_SEC) } |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static bool caption_backlight(void) | 160 | static bool caption_backlight(void) |
161 | { | 161 | { |
162 | return set_bool( str(LANG_CAPTION_BACKLIGHT), | 162 | return set_bool( (char *)str(LANG_CAPTION_BACKLIGHT), |
163 | &global_settings.caption_backlight); | 163 | &global_settings.caption_backlight); |
164 | } | 164 | } |
165 | 165 | ||
166 | #ifdef HAVE_CHARGING | 166 | #ifdef HAVE_CHARGING |
167 | static bool backlight_timer_plugged(void) | 167 | static bool backlight_timer_plugged(void) |
168 | { | 168 | { |
169 | return set_option(str(LANG_BACKLIGHT_ON_WHEN_CHARGING), | 169 | return set_option((char *)str(LANG_BACKLIGHT_ON_WHEN_CHARGING), |
170 | &global_settings.backlight_timeout_plugged, | 170 | &global_settings.backlight_timeout_plugged, |
171 | INT, backlight_timeouts, 19, | 171 | INT, backlight_timeouts, 19, |
172 | backlight_set_timeout_plugged ); | 172 | backlight_set_timeout_plugged ); |
@@ -175,7 +175,7 @@ static bool backlight_timer_plugged(void) | |||
175 | 175 | ||
176 | static bool backlight_timer(void) | 176 | static bool backlight_timer(void) |
177 | { | 177 | { |
178 | return set_option(str(LANG_BACKLIGHT), | 178 | return set_option((char *)str(LANG_BACKLIGHT), |
179 | &global_settings.backlight_timeout, | 179 | &global_settings.backlight_timeout, |
180 | INT, backlight_timeouts, 19, | 180 | INT, backlight_timeouts, 19, |
181 | backlight_set_timeout ); | 181 | backlight_set_timeout ); |
@@ -186,9 +186,9 @@ static bool backlight_fade_in(void) | |||
186 | { | 186 | { |
187 | static const struct opt_items names[] = { | 187 | static const struct opt_items names[] = { |
188 | { STR(LANG_OFF) }, | 188 | { STR(LANG_OFF) }, |
189 | { "500ms", TALK_ID(500, UNIT_MS) }, | 189 | { (unsigned char *)"500ms", TALK_ID(500, UNIT_MS) }, |
190 | { "1s", TALK_ID(1, UNIT_SEC) }, | 190 | { (unsigned char *)"1s", TALK_ID(1, UNIT_SEC) }, |
191 | { "2s", TALK_ID(2, UNIT_SEC) }, | 191 | { (unsigned char *)"2s", TALK_ID(2, UNIT_SEC) }, |
192 | }; | 192 | }; |
193 | return set_option(str(LANG_BACKLIGHT_FADE_IN), | 193 | return set_option(str(LANG_BACKLIGHT_FADE_IN), |
194 | &global_settings.backlight_fade_in, | 194 | &global_settings.backlight_fade_in, |
@@ -199,13 +199,13 @@ static bool backlight_fade_out(void) | |||
199 | { | 199 | { |
200 | static const struct opt_items names[] = { | 200 | static const struct opt_items names[] = { |
201 | { STR(LANG_OFF) }, | 201 | { STR(LANG_OFF) }, |
202 | { "500ms", TALK_ID(500, UNIT_MS) }, | 202 | { (unsigned char *)"500ms", TALK_ID(500, UNIT_MS) }, |
203 | { "1s", TALK_ID(1, UNIT_SEC) }, | 203 | { (unsigned char *)"1s", TALK_ID(1, UNIT_SEC) }, |
204 | { "2s", TALK_ID(2, UNIT_SEC) }, | 204 | { (unsigned char *)"2s", TALK_ID(2, UNIT_SEC) }, |
205 | { "3s", TALK_ID(3, UNIT_SEC) }, | 205 | { (unsigned char *)"3s", TALK_ID(3, UNIT_SEC) }, |
206 | { "4s", TALK_ID(4, UNIT_SEC) }, | 206 | { (unsigned char *)"4s", TALK_ID(4, UNIT_SEC) }, |
207 | { "5s", TALK_ID(5, UNIT_SEC) }, | 207 | { (unsigned char *)"5s", TALK_ID(5, UNIT_SEC) }, |
208 | { "10s", TALK_ID(10, UNIT_SEC) }, | 208 | { (unsigned char *)"10s", TALK_ID(10, UNIT_SEC) }, |
209 | }; | 209 | }; |
210 | return set_option(str(LANG_BACKLIGHT_FADE_OUT), | 210 | return set_option(str(LANG_BACKLIGHT_FADE_OUT), |
211 | &global_settings.backlight_fade_out, | 211 | &global_settings.backlight_fade_out, |
@@ -218,7 +218,7 @@ static bool backlight_fade_out(void) | |||
218 | 218 | ||
219 | static bool remote_backlight_timer(void) | 219 | static bool remote_backlight_timer(void) |
220 | { | 220 | { |
221 | return set_option(str(LANG_BACKLIGHT), | 221 | return set_option((char *)str(LANG_BACKLIGHT), |
222 | &global_settings.remote_backlight_timeout, | 222 | &global_settings.remote_backlight_timeout, |
223 | INT, backlight_timeouts, 19, | 223 | INT, backlight_timeouts, 19, |
224 | remote_backlight_set_timeout ); | 224 | remote_backlight_set_timeout ); |
@@ -227,7 +227,7 @@ static bool remote_backlight_timer(void) | |||
227 | #ifdef HAVE_CHARGING | 227 | #ifdef HAVE_CHARGING |
228 | static bool remote_backlight_timer_plugged(void) | 228 | static bool remote_backlight_timer_plugged(void) |
229 | { | 229 | { |
230 | return set_option(str(LANG_BACKLIGHT_ON_WHEN_CHARGING), | 230 | return set_option((char *)str(LANG_BACKLIGHT_ON_WHEN_CHARGING), |
231 | &global_settings.remote_backlight_timeout_plugged, | 231 | &global_settings.remote_backlight_timeout_plugged, |
232 | INT, backlight_timeouts, 19, | 232 | INT, backlight_timeouts, 19, |
233 | remote_backlight_set_timeout_plugged ); | 233 | remote_backlight_set_timeout_plugged ); |
@@ -236,8 +236,8 @@ static bool remote_backlight_timer_plugged(void) | |||
236 | 236 | ||
237 | static bool remote_caption_backlight(void) | 237 | static bool remote_caption_backlight(void) |
238 | { | 238 | { |
239 | return set_bool( str(LANG_CAPTION_BACKLIGHT), | 239 | return set_bool((char *)str(LANG_CAPTION_BACKLIGHT), |
240 | &global_settings.remote_caption_backlight); | 240 | &global_settings.remote_caption_backlight); |
241 | } | 241 | } |
242 | #endif /* HAVE_REMOTE_LCD */ | 242 | #endif /* HAVE_REMOTE_LCD */ |
243 | 243 | ||
@@ -256,12 +256,12 @@ static bool contrast(void) | |||
256 | */ | 256 | */ |
257 | static bool invert(void) | 257 | static bool invert(void) |
258 | { | 258 | { |
259 | bool rc = set_bool_options(str(LANG_INVERT), | 259 | bool rc = set_bool_options(str(LANG_INVERT), |
260 | &global_settings.invert, | 260 | &global_settings.invert, |
261 | STR(LANG_INVERT_LCD_INVERSE), | 261 | (char *)STR(LANG_INVERT_LCD_INVERSE), |
262 | STR(LANG_INVERT_LCD_NORMAL), | 262 | STR(LANG_INVERT_LCD_NORMAL), |
263 | lcd_set_invert_display); | 263 | lcd_set_invert_display); |
264 | return rc; | 264 | return rc; |
265 | } | 265 | } |
266 | 266 | ||
267 | /** | 267 | /** |
@@ -1428,12 +1428,15 @@ static bool bookmark_settings_menu(void) | |||
1428 | } | 1428 | } |
1429 | static bool reset_settings(void) | 1429 | static bool reset_settings(void) |
1430 | { | 1430 | { |
1431 | char *lines[]={str(LANG_RESET_ASK_RECORDER)}; | 1431 | unsigned char *lines[]={str(LANG_RESET_ASK_RECORDER)}; |
1432 | char *yes_lines[]={str(LANG_RESET_DONE_SETTING), str(LANG_RESET_DONE_CLEAR)}; | 1432 | unsigned char *yes_lines[]={ |
1433 | char *no_lines[]={yes_lines[0], str(LANG_RESET_DONE_CANCEL)}; | 1433 | str(LANG_RESET_DONE_SETTING), |
1434 | struct text_message message={lines, 1}; | 1434 | str(LANG_RESET_DONE_CLEAR) |
1435 | struct text_message yes_message={yes_lines, 2}; | 1435 | }; |
1436 | struct text_message no_message={no_lines, 2}; | 1436 | unsigned char *no_lines[]={yes_lines[0], str(LANG_RESET_DONE_CANCEL)}; |
1437 | struct text_message message={(char **)lines, 1}; | ||
1438 | struct text_message yes_message={(char **)yes_lines, 2}; | ||
1439 | struct text_message no_message={(char **)no_lines, 2}; | ||
1437 | 1440 | ||
1438 | switch(gui_syncyesno_run(&message, &yes_message, &no_message)) | 1441 | switch(gui_syncyesno_run(&message, &yes_message, &no_message)) |
1439 | { | 1442 | { |
diff --git a/apps/sleeptimer.c b/apps/sleeptimer.c index 982cbe621a..e9b0924388 100644 --- a/apps/sleeptimer.c +++ b/apps/sleeptimer.c | |||
@@ -126,7 +126,7 @@ bool sleeptimer_screen(void) | |||
126 | minutes = (seconds - (hours * 3600)) / 60; | 126 | minutes = (seconds - (hours * 3600)) / 60; |
127 | snprintf(buf, 32, "%d:%02d", | 127 | snprintf(buf, 32, "%d:%02d", |
128 | hours, minutes); | 128 | hours, minutes); |
129 | lcd_puts(0, 1, buf); | 129 | lcd_puts(0, 1, (unsigned char *)buf); |
130 | 130 | ||
131 | if (sayit && global_settings.talk_menu) | 131 | if (sayit && global_settings.talk_menu) |
132 | { | 132 | { |
diff --git a/apps/sound_menu.c b/apps/sound_menu.c index af1a2fdfee..f97cdde2ab 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c | |||
@@ -56,7 +56,7 @@ void dec_sound_formatter(char *buffer, int buffer_size, int val, const char * un | |||
56 | snprintf(buffer, buffer_size, "%d.%d %s", integer, dec, unit); | 56 | snprintf(buffer, buffer_size, "%d.%d %s", integer, dec, unit); |
57 | } | 57 | } |
58 | 58 | ||
59 | bool set_sound(const char* string, | 59 | bool set_sound(const unsigned char * string, |
60 | int* variable, | 60 | int* variable, |
61 | int setting) | 61 | int setting) |
62 | { | 62 | { |
diff --git a/apps/talk.c b/apps/talk.c index ec92578ee6..07ee93bc16 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -115,7 +115,7 @@ static int open_voicefile(void) | |||
115 | if ( global_settings.lang_file[0] && | 115 | if ( global_settings.lang_file[0] && |
116 | global_settings.lang_file[0] != 0xff ) | 116 | global_settings.lang_file[0] != 0xff ) |
117 | { /* try to open the voice file of the selected language */ | 117 | { /* try to open the voice file of the selected language */ |
118 | p_lang = global_settings.lang_file; | 118 | p_lang = (char *)global_settings.lang_file; |
119 | } | 119 | } |
120 | 120 | ||
121 | snprintf(buf, sizeof(buf), ROCKBOX_DIR LANG_DIR "/%s.voice", p_lang); | 121 | snprintf(buf, sizeof(buf), ROCKBOX_DIR LANG_DIR "/%s.voice", p_lang); |
diff --git a/apps/tree.c b/apps/tree.c index 1a419c74d2..15624d7618 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -184,12 +184,12 @@ void tree_get_fileicon(int selected_item, void * data, ICON * icon) | |||
184 | struct tree_context * local_tc=(struct tree_context *)data; | 184 | struct tree_context * local_tc=(struct tree_context *)data; |
185 | bool id3db = *(local_tc->dirfilter) == SHOW_ID3DB; | 185 | bool id3db = *(local_tc->dirfilter) == SHOW_ID3DB; |
186 | if (id3db) { | 186 | if (id3db) { |
187 | *icon = db_get_icon(&tc); | 187 | *icon = (ICON)db_get_icon(&tc); |
188 | } | 188 | } |
189 | else { | 189 | else { |
190 | struct entry* dc = local_tc->dircache; | 190 | struct entry* dc = local_tc->dircache; |
191 | struct entry* e = &dc[selected_item]; | 191 | struct entry* e = &dc[selected_item]; |
192 | *icon = filetype_get_icon(e->attr); | 192 | *icon = (ICON)filetype_get_icon(e->attr); |
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
@@ -423,7 +423,8 @@ static void start_resume(bool just_powered_on) | |||
423 | start_wps = true; | 423 | start_wps = true; |
424 | } | 424 | } |
425 | else return; | 425 | else return; |
426 | } else if (! just_powered_on) { | 426 | } |
427 | else if (! just_powered_on) { | ||
427 | gui_syncsplash(HZ*2, true, str(LANG_NOTHING_TO_RESUME)); | 428 | gui_syncsplash(HZ*2, true, str(LANG_NOTHING_TO_RESUME)); |
428 | } | 429 | } |
429 | } | 430 | } |
@@ -1014,8 +1015,8 @@ static bool add_dir(char* dirname, int len, int fd) | |||
1014 | int dirlen = strlen(dirname); | 1015 | int dirlen = strlen(dirname); |
1015 | bool result; | 1016 | bool result; |
1016 | 1017 | ||
1017 | if (!strcmp(entry->d_name, ".") || | 1018 | if (!strcmp((char *)entry->d_name, ".") || |
1018 | !strcmp(entry->d_name, "..")) | 1019 | !strcmp((char *)entry->d_name, "..")) |
1019 | continue; | 1020 | continue; |
1020 | 1021 | ||
1021 | if (dirname[1]) | 1022 | if (dirname[1]) |
@@ -1031,9 +1032,9 @@ static bool add_dir(char* dirname, int len, int fd) | |||
1031 | } | 1032 | } |
1032 | } | 1033 | } |
1033 | else { | 1034 | else { |
1034 | int x = strlen(entry->d_name); | 1035 | int x = strlen((char *)entry->d_name); |
1035 | unsigned int i; | 1036 | unsigned int i; |
1036 | char *cp = strrchr(entry->d_name,'.'); | 1037 | char *cp = strrchr((char *)entry->d_name,'.'); |
1037 | 1038 | ||
1038 | if (cp) { | 1039 | if (cp) { |
1039 | cp++; | 1040 | cp++; |
@@ -1056,7 +1057,7 @@ static bool add_dir(char* dirname, int len, int fd) | |||
1056 | FOR_NB_SCREENS(i) | 1057 | FOR_NB_SCREENS(i) |
1057 | { | 1058 | { |
1058 | gui_textarea_clear(&screens[i]); | 1059 | gui_textarea_clear(&screens[i]); |
1059 | screens[i].puts(0,4,buf); | 1060 | screens[i].puts(0, 4, (unsigned char *)buf); |
1060 | } | 1061 | } |
1061 | #else | 1062 | #else |
1062 | x = 10; | 1063 | x = 10; |
@@ -1098,8 +1099,8 @@ bool create_playlist(void) | |||
1098 | FOR_NB_SCREENS(i) | 1099 | FOR_NB_SCREENS(i) |
1099 | { | 1100 | { |
1100 | gui_textarea_clear(&screens[i]); | 1101 | gui_textarea_clear(&screens[i]); |
1101 | screens[i].puts(0,0,str(LANG_CREATING)); | 1102 | screens[i].puts(0, 0, str(LANG_CREATING)); |
1102 | screens[i].puts_scroll(0,1,filename); | 1103 | screens[i].puts_scroll(0, 1, (unsigned char *)filename); |
1103 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) | 1104 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) |
1104 | gui_textarea_update(&screens[i]); | 1105 | gui_textarea_update(&screens[i]); |
1105 | #endif | 1106 | #endif |