diff options
| author | Nils Wallménius <nils@rockbox.org> | 2007-08-13 12:21:27 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2007-08-13 12:21:27 +0000 |
| commit | 45ffc87030f1fa3d49b10cc61c1d2d748ffd3e3f (patch) | |
| tree | bc92c80316169756128e65cbcc7f452c8f9e4144 /apps | |
| parent | 58537b43e61b23053371d92e9521e104d0908bca (diff) | |
| download | rockbox-45ffc87030f1fa3d49b10cc61c1d2d748ffd3e3f.zip rockbox-45ffc87030f1fa3d49b10cc61c1d2d748ffd3e3f.tar.gz rockbox-45ffc87030f1fa3d49b10cc61c1d2d748ffd3e3f.tar.bz2 rockbox-45ffc87030f1fa3d49b10cc61c1d2d748ffd3e3f.tar.xz | |
Const-police, use less bytes where possible, get rid of duplicated backlight timeout array
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14310 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/settings_list.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 1b8b333..7d3f76c 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -207,8 +207,6 @@ static void rectime_formatter(char *buffer, int buffer_size, #ifdef HAVE_BACKLIGHT static const char backlight_times_conf [] = "off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90"; -static const int backlight_times[] = - {-1, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90}; static void backlight_formatter(char *buffer, int buffer_size, int val, const char *unit) { @@ -217,8 +215,8 @@ static void backlight_formatter(char *buffer, int buffer_size, strcpy(buffer, str(LANG_OFF)); else if (val == 1) strcpy(buffer, str(LANG_ON)); - else - snprintf(buffer, buffer_size, "%d s", backlight_times[val]); + else + snprintf(buffer, buffer_size, "%d s", backlight_timeout_value[val]); } static long backlight_getlang(int value) { @@ -226,11 +224,11 @@ static long backlight_getlang(int value) return LANG_OFF; else if (value == 1) return LANG_ON; - return TALK_ID(backlight_times[value], UNIT_SEC); + return TALK_ID(backlight_timeout_value[value], UNIT_SEC); } #endif /* ffwd/rewind and scan acceleration stuff */ -static int ff_rewind_min_stepvals[] = {1,2,3,4,5,6,8,10,15,20,25,30,45,60}; +static const unsigned char ff_rewind_min_stepvals[] = {1,2,3,4,5,6,8,10,15,20,25,30,45,60}; static long ff_rewind_min_step_getlang(int value) { return TALK_ID(ff_rewind_min_stepvals[value], UNIT_SEC); @@ -257,7 +255,7 @@ static void scanaccel_formatter(char *buffer, int buffer_size, snprintf(buffer, buffer_size, "2x/%ds", val); } -static int poweroff_idle_timer_times[] = {0,1,2,3,4,5,6,7,8,9,10,15,30,45,60}; +static const unsigned char poweroff_idle_timer_times[] = {0,1,2,3,4,5,6,7,8,9,10,15,30,45,60}; static long poweroff_idle_timer_getlang(int value) { if (value == 0) |