From 50a6ca39ad4ed01922aa4f755f0ca579788226cf Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 6 May 2010 21:04:40 +0000 Subject: 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 --- apps/menus/time_menu.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'apps/menus/time_menu.c') diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index 597f7e0c3a..a529837b07 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c @@ -22,9 +22,9 @@ #include #include #include +#include #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); -- cgit v1.2.3