summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-04-26 09:30:24 +0000
committerNils Wallménius <nils@rockbox.org>2008-04-26 09:30:24 +0000
commit33c44461e1b5fb9aff2f8ba7470ad2449b3c410e (patch)
tree4dac157ab03a45868ba75e07af9fb92766fa4ccd /apps/onplay.c
parente1bc2d5b71bd424325e852b0ef9a89252dac1471 (diff)
downloadrockbox-33c44461e1b5fb9aff2f8ba7470ad2449b3c410e.tar.gz
rockbox-33c44461e1b5fb9aff2f8ba7470ad2449b3c410e.zip
Const police raid, making a lot of pointers to lang strings const and removing some ugly casting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17251 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 21b16c9381..a0de6f2e81 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -160,11 +160,11 @@ static bool save_playlist(void)
160static bool add_to_playlist(int position, bool queue) 160static bool add_to_playlist(int position, bool queue)
161{ 161{
162 bool new_playlist = !(audio_status() & AUDIO_STATUS_PLAY); 162 bool new_playlist = !(audio_status() & AUDIO_STATUS_PLAY);
163 char *lines[] = { 163 const char *lines[] = {
164 ID2P(LANG_RECURSE_DIRECTORY_QUESTION), 164 ID2P(LANG_RECURSE_DIRECTORY_QUESTION),
165 selected_file 165 selected_file
166 }; 166 };
167 struct text_message message={lines, 2}; 167 const struct text_message message={lines, 2};
168 168
169 gui_syncsplash(0, ID2P(LANG_WAIT)); 169 gui_syncsplash(0, ID2P(LANG_WAIT));
170 170
@@ -523,11 +523,11 @@ static int remove_dir(char* dirname, int len)
523/* share code for file and directory deletion, saves space */ 523/* share code for file and directory deletion, saves space */
524static bool delete_handler(bool is_dir) 524static bool delete_handler(bool is_dir)
525{ 525{
526 char *lines[]={ 526 const char *lines[]={
527 ID2P(LANG_REALLY_DELETE), 527 ID2P(LANG_REALLY_DELETE),
528 selected_file 528 selected_file
529 }; 529 };
530 char *yes_lines[]={ 530 const char *yes_lines[]={
531 ID2P(LANG_DELETED), 531 ID2P(LANG_DELETED),
532 selected_file 532 selected_file
533 }; 533 };
@@ -867,8 +867,8 @@ static bool clipboard_paste(void)
867 char *cwd, *nameptr; 867 char *cwd, *nameptr;
868 bool success; 868 bool success;
869 869
870 unsigned char *lines[]={ID2P(LANG_REALLY_OVERWRITE)}; 870 static const char *lines[]={ID2P(LANG_REALLY_OVERWRITE)};
871 struct text_message message={(char **)lines, 1}; 871 static const struct text_message message={lines, 1};
872 872
873 /* Get the name of the current directory */ 873 /* Get the name of the current directory */
874 cwd = getcwd(NULL, 0); 874 cwd = getcwd(NULL, 0);