From dbf44a6a4d915aef9dbd9fd5626926551d4a86cb Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 10 Aug 2010 14:26:53 +0000 Subject: [PATCH] fid red/yellow... does database really need to compile all of misc.c? git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27769 a1c6a512-1295-4272-9138-f99709370657 --- apps/misc.c | 8 ++++---- tools/checkwps/checkwps.make | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/misc.c b/apps/misc.c index 31f0ac4193..91be53b11c 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -929,14 +929,13 @@ int hex_to_rgb(const char* hex, int* color) #ifdef HAVE_LCD_BITMAP /* '0'-'3' are ASCII 0x30 to 0x33 */ #define is0123(x) (((x) & 0xfc) == 0x30) - +#if !defined(__PCTOOL__) || defined(CHECKWPS) bool parse_color(enum screen_type screen, char *text, int *value) { (void)text; (void)value; /* silence warnings on mono bitmap */ - int depth = screens[screen].depth; #ifdef HAVE_LCD_COLOR - if (depth > 2) + if (screens[screen].depth > 2) { if (hex_to_rgb(text, value) < 0) return false; @@ -946,7 +945,7 @@ bool parse_color(enum screen_type screen, char *text, int *value) #endif #if LCD_DEPTH == 2 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH == 2) - if (depth == 2) + if (screens[screen].depth == 2) { if (text[1] != '\0' || !is0123(*text)) return false; @@ -956,6 +955,7 @@ bool parse_color(enum screen_type screen, char *text, int *value) #endif return false; } +#endif /* !defined(__PCTOOL__) || defined(CHECKWPS) */ /* only used in USB HID and set_time screen */ #if defined(USB_ENABLE_HID) || (CONFIG_RTC != 0) diff --git a/tools/checkwps/checkwps.make b/tools/checkwps/checkwps.make index e09ce25aec..e84452d59e 100644 --- a/tools/checkwps/checkwps.make +++ b/tools/checkwps/checkwps.make @@ -7,7 +7,7 @@ # $Id$ # -FLAGS=-g -D__PCTOOL__ $(TARGET) -Wall +FLAGS=-g -D__PCTOOL__ $(TARGET) -Wall -DCHECKWPS SRC= $(call preprocess, $(TOOLSDIR)/checkwps/SOURCES)