diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-08-20 16:47:44 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-08-20 16:47:44 +0000 |
commit | 3200d04d75c5e7556ed8880b155533e881a4d1e1 (patch) | |
tree | 188e2c9525b25cb8922a14766e51ab02bad3f831 /apps/debug_menu.c | |
parent | 0a1728444882cdbc6a0c815bd88464de25ad94e9 (diff) | |
download | rockbox-3200d04d75c5e7556ed8880b155533e881a4d1e1.tar.gz rockbox-3200d04d75c5e7556ed8880b155533e881a4d1e1.zip |
Make the formatter functions used by the settings return a pointer to avoid usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index ea53d445fd..4ca8b3fa4f 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -141,8 +141,8 @@ static char thread_status_char(unsigned status) | |||
141 | return thread_status_chars[status]; | 141 | return thread_status_chars[status]; |
142 | } | 142 | } |
143 | 143 | ||
144 | static char* threads_getname(int selected_item, void *data, | 144 | static const char* threads_getname(int selected_item, void *data, |
145 | char *buffer, size_t buffer_len) | 145 | char *buffer, size_t buffer_len) |
146 | { | 146 | { |
147 | (void)data; | 147 | (void)data; |
148 | struct thread_entry *thread; | 148 | struct thread_entry *thread; |
@@ -183,6 +183,7 @@ static char* threads_getname(int selected_item, void *data, | |||
183 | 183 | ||
184 | return buffer; | 184 | return buffer; |
185 | } | 185 | } |
186 | |||
186 | static int dbg_threads_action_callback(int action, struct gui_synclist *lists) | 187 | static int dbg_threads_action_callback(int action, struct gui_synclist *lists) |
187 | { | 188 | { |
188 | (void)lists; | 189 | (void)lists; |
@@ -783,8 +784,8 @@ static bool dbg_hw_info(void) | |||
783 | #endif /* !SIMULATOR */ | 784 | #endif /* !SIMULATOR */ |
784 | 785 | ||
785 | #ifndef SIMULATOR | 786 | #ifndef SIMULATOR |
786 | static char* dbg_partitions_getname(int selected_item, void *data, | 787 | static const char* dbg_partitions_getname(int selected_item, void *data, |
787 | char *buffer, size_t buffer_len) | 788 | char *buffer, size_t buffer_len) |
788 | { | 789 | { |
789 | (void)data; | 790 | (void)data; |
790 | int partition = selected_item/2; | 791 | int partition = selected_item/2; |
@@ -2796,12 +2797,14 @@ static int menu_action_callback(int btn, struct gui_synclist *lists) | |||
2796 | } | 2797 | } |
2797 | return btn; | 2798 | return btn; |
2798 | } | 2799 | } |
2799 | static char* dbg_menu_getname(int item, void * data, | 2800 | |
2800 | char *buffer, size_t buffer_len) | 2801 | static const char* dbg_menu_getname(int item, void * data, |
2802 | char *buffer, size_t buffer_len) | ||
2801 | { | 2803 | { |
2802 | (void)data; (void)buffer; (void)buffer_len; | 2804 | (void)data; (void)buffer; (void)buffer_len; |
2803 | return menuitems[item].desc; | 2805 | return menuitems[item].desc; |
2804 | } | 2806 | } |
2807 | |||
2805 | bool debug_menu(void) | 2808 | bool debug_menu(void) |
2806 | { | 2809 | { |
2807 | struct simplelist_info info; | 2810 | struct simplelist_info info; |