summaryrefslogtreecommitdiff
path: root/apps/menus
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-06 21:04:40 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-06 21:04:40 +0000
commit50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch)
treec7881b015b220558167310345b162324c96be15a /apps/menus
parentadb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff)
downloadrockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip
rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz
rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.bz2
rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.xz
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/eq_menu.c1
-rw-r--r--apps/menus/recording_menu.c1
-rw-r--r--apps/menus/settings_menu.c1
-rw-r--r--apps/menus/time_menu.c30
4 files changed, 15 insertions, 18 deletions
diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c
index 16d5b82..066787a 100644
--- a/apps/menus/eq_menu.c
+++ b/apps/menus/eq_menu.c
@@ -35,7 +35,6 @@
#include "icons.h"
#include "font.h"
#include "lang.h"
-#include "sprintf.h"
#include "talk.h"
#include "misc.h"
#include "sound.h"
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c
index 800918b..daea1ea 100644
--- a/apps/menus/recording_menu.c
+++ b/apps/menus/recording_menu.c
@@ -38,7 +38,6 @@
#include "scrollbar.h"
#endif
#include "lang.h"
-#include "sprintf.h"
#include "talk.h"
#include "misc.h"
#include "sound.h"
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index db2ad78..1007d2a 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -35,7 +35,6 @@
#include "usb.h"
#include "splash.h"
#include "talk.h"
-#include "sprintf.h"
#include "powermgmt.h"
#if CONFIG_CODEC == SWCODEC
#include "playback.h"
diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c
index 597f7e0..a529837 100644
--- a/apps/menus/time_menu.c
+++ b/apps/menus/time_menu.c
@@ -22,9 +22,9 @@
#include <stdbool.h>
#include <stddef.h>
#include <limits.h>
+#include <stdio.h>
#include "config.h"
#include "string.h"
-#include "sprintf.h"
#include "lang.h"
#include "action.h"
#include "settings.h"
@@ -201,7 +201,7 @@ static void draw_timedate(struct viewport *vp, struct screen *display)
}
-static struct viewport clock[NB_SCREENS], menu[NB_SCREENS];
+static struct viewport clock_vps[NB_SCREENS], menu[NB_SCREENS];
static bool menu_was_pressed;
static int time_menu_callback(int action,
const struct menu_item_ex *this_item)
@@ -233,7 +233,7 @@ static int time_menu_callback(int action,
{
last_redraw = current_tick;
FOR_NB_SCREENS(i)
- draw_timedate(&clock[i], &screens[i]);
+ draw_timedate(&clock_vps[i], &screens[i]);
}
return action;
}
@@ -257,30 +257,30 @@ int time_screen(void* ignored)
FOR_NB_SCREENS(i)
{
- viewport_set_defaults(&clock[i], i);
+ viewport_set_defaults(&clock_vps[i], i);
#ifdef HAVE_BUTTONBAR
if (global_settings.buttonbar)
{
- clock[i].height -= BUTTONBAR_HEIGHT;
+ clock_vps[i].height -= BUTTONBAR_HEIGHT;
}
#endif
- nb_lines = viewport_get_nb_lines(&clock[i]);
+ nb_lines = viewport_get_nb_lines(&clock_vps[i]);
- menu[i] = clock[i];
+ menu[i] = clock_vps[i];
/* force time to be drawn centered */
- clock[i].flags |= VP_FLAG_ALIGN_CENTER;
+ clock_vps[i].flags |= VP_FLAG_ALIGN_CENTER;
- font_h = font_get(clock[i].font)->height;
+ font_h = font_get(clock_vps[i].font)->height;
nb_lines -= 2; /* at least 2 lines for menu */
if (nb_lines > 4)
nb_lines = 4;
if (nb_lines >= 2)
- clock[i].height = nb_lines*font_h;
- else /* disable the clock drawing */
- clock[i].height = 0;
- menu[i].y += clock[i].height;
- menu[i].height -= clock[i].height;
- draw_timedate(&clock[i], &screens[i]);
+ clock_vps[i].height = nb_lines*font_h;
+ else /* disable the clock_vps drawing */
+ clock_vps[i].height = 0;
+ menu[i].y += clock_vps[i].height;
+ menu[i].height -= clock_vps[i].height;
+ draw_timedate(&clock_vps[i], &screens[i]);
}
ret = do_menu(&time_menu, NULL, menu, false);