From 9d0017edd2af7d1ec4479fd57d8d8b38d8a0152e Mon Sep 17 00:00:00 2001 From: kugel Date: Fri, 14 May 2010 13:21:40 +0000 Subject: [PATCH] Fix remaining reds/yellows. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26024 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/buttonbar.c | 2 +- apps/player/icons.c | 6 +++--- apps/plugins/jackpot.c | 6 +++--- apps/plugins/pdbox/pdbox.h | 9 ++++++++- apps/screen_access.c | 2 +- apps/screen_access.h | 3 ++- firmware/drivers/lcd-charcell.c | 2 +- 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/apps/gui/buttonbar.c b/apps/gui/buttonbar.c index 3c343f09a..84d49464c 100644 --- a/apps/gui/buttonbar.c +++ b/apps/gui/buttonbar.c @@ -34,7 +34,7 @@ #include "viewport.h" #include "lcd.h" #include "font.h" -#include "string.h" +#include "string-extra.h" #include "settings.h" static struct viewport bb_vp[NB_SCREENS]; diff --git a/apps/player/icons.c b/apps/player/icons.c index ce243ead5..0d160bc96 100644 --- a/apps/player/icons.c +++ b/apps/player/icons.c @@ -85,11 +85,11 @@ extern void screen_put_iconxy(struct screen * screen, int x, int y, enum themable_icons icon) { if (icon == Icon_NOICON) - screen->putc(x, y, ' '); + screen->putchar(x, y, ' '); else if (icon >= Icon_Last_Themeable) - screen->putc(x, y, old_Icon_Unknown); + screen->putchar(x, y, old_Icon_Unknown); else - screen->putc(x, y, icons[icon]); + screen->putchar(x, y, icons[icon]); } void screen_put_cursorxy(struct screen * display, int x, int y, bool on) diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index 4ab1d3a83..302c5c685 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -170,7 +170,7 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display) int i; bool changes=false; #ifdef HAVE_LCD_CHARCELLS - display->putc(0, 0, '['); + display->putchar(0, 0, '['); #else const struct picture* picture= &(jackpot_pictures[display->screen_type]); int pos_x=(display->getwidth()-NB_SLOTS*(picture->width+1))/2; @@ -195,7 +195,7 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display) char* current_pattern=&(jackpot_slots_patterns[state_y]); display->define_pattern(char_patterns[i], current_pattern); - display->putc(i+1, 0, char_patterns[i]); + display->putchar(i+1, 0, char_patterns[i]); #else vertical_picture_draw_part(display, picture, state_y, pos_x, pos_y); pos_x+=(picture->width+1); @@ -204,7 +204,7 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display) if(changes){ #ifdef HAVE_LCD_CHARCELLS rb->snprintf(str,sizeof(str),"$%d", game->money); - display->putc(++i, 0, ']'); + display->putchar(++i, 0, ']'); display->puts(++i, 0, str); #else rb->snprintf(str,sizeof(str),"money : $%d", game->money); diff --git a/apps/plugins/pdbox/pdbox.h b/apps/plugins/pdbox/pdbox.h index 815248cf9..ce29c1e80 100644 --- a/apps/plugins/pdbox/pdbox.h +++ b/apps/plugins/pdbox/pdbox.h @@ -107,6 +107,7 @@ float rb_atan(float); float rb_atan2(float, float); float rb_sinh(float); float rb_tan(float); +#ifndef SIMULATOR typedef struct { int quot; @@ -114,6 +115,7 @@ typedef struct } div_t; div_t div(int x, int y); +#endif union f2i { float f; @@ -180,10 +182,11 @@ void pd_init(void); #define write rb->write #define strncat rb_strncat + +#ifndef SIMULATOR #define floor rb_floor #define atof rb_atof #define atol rb_atol -#define ftoan rb_ftoan #define sin rb_sin #define cos rb_cos #define log10 rb_log10 @@ -196,7 +199,11 @@ void pd_init(void); #define atan2 rb_atan2 #define sinh rb_sinh #define tan rb_tan +#else +#include +#endif +#define ftoan rb_ftoan #define strtok_r rb->strtok_r #define strstr rb->strcasestr diff --git a/apps/screen_access.c b/apps/screen_access.c index df071020e..7b64c400b 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c @@ -174,7 +174,7 @@ struct screen screens[NB_SCREENS] = #ifdef HAVE_LCD_CHARCELLS .double_height=&lcd_double_height, - .putc=&lcd_putc, + .putchar=&lcd_putc, .get_locked_pattern=&lcd_get_locked_pattern, .define_pattern=&lcd_define_pattern, .unlock_pattern=&lcd_unlock_pattern, diff --git a/apps/screen_access.h b/apps/screen_access.h index 2dc95460d..463ca3fd6 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -121,7 +121,8 @@ struct screen #ifdef HAVE_LCD_CHARCELLS /* no charcell remote LCDs so far */ void (*double_height)(bool on); - void (*putc)(int x, int y, unsigned long ucs); + /* name it putchar, not putc because putc is a c library function */ + void (*putchar)(int x, int y, unsigned long ucs); void (*icon)(int icon, bool enable); unsigned long (*get_locked_pattern)(void); void (*define_pattern)(unsigned long ucs, const char *pattern); diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c index cf2b55da8..36f1d2648 100644 --- a/firmware/drivers/lcd-charcell.c +++ b/firmware/drivers/lcd-charcell.c @@ -27,7 +27,7 @@ #include "lcd.h" #include "kernel.h" #include "thread.h" -#include +#include "string-extra.h" #include #include "debug.h" #include "file.h" -- 2.11.4.GIT