diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-07-06 13:23:28 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-07-06 13:23:28 +0000 |
commit | d035f255c95d69c342d3ecbcf4cc88c1f1c01af2 (patch) | |
tree | b12499b9c893086b12c03684986ee80a1abc1472 | |
parent | feeac4f15fdd6e680522b172f7217ab0a98ad0f7 (diff) | |
download | rockbox-d035f255c95d69c342d3ecbcf4cc88c1f1c01af2.tar.gz rockbox-d035f255c95d69c342d3ecbcf4cc88c1f1c01af2.zip |
get checkwps building again (FS#9150) - still doesnt compile on d2 and mr500 though
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17957 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/wps_parser.c | 6 | ||||
-rw-r--r-- | apps/misc.c | 1 | ||||
-rw-r--r-- | tools/checkwps/checkwps.c | 49 | ||||
-rw-r--r-- | tools/checkwps/checkwps.h | 42 |
4 files changed, 84 insertions, 14 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 73516f604d..682ff681d0 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #define DEBUGF printf | 31 | #define DEBUGF printf |
32 | #define FONT_SYSFIXED 0 | 32 | #define FONT_SYSFIXED 0 |
33 | #define FONT_UI 1 | 33 | #define FONT_UI 1 |
34 | #define SYSFONT_HEIGHT 8 | ||
35 | #include "checkwps.h" | ||
34 | #else | 36 | #else |
35 | #include "debug.h" | 37 | #include "debug.h" |
36 | #endif | 38 | #endif |
@@ -818,7 +820,11 @@ static int parse_progressbar(const char *wps_bufptr, | |||
818 | const char *ptr = wps_bufptr; | 820 | const char *ptr = wps_bufptr; |
819 | struct progressbar *pb; | 821 | struct progressbar *pb; |
820 | struct viewport *vp = &wps_data->viewports[wps_data->num_viewports].vp; | 822 | struct viewport *vp = &wps_data->viewports[wps_data->num_viewports].vp; |
823 | #ifndef __PCTOOL__ | ||
821 | int font_height = font_get(vp->font)->height; | 824 | int font_height = font_get(vp->font)->height; |
825 | #else | ||
826 | int font_height = 8; | ||
827 | #endif | ||
822 | int line_y_pos = font_height*(wps_data->num_lines - | 828 | int line_y_pos = font_height*(wps_data->num_lines - |
823 | wps_data->viewports[wps_data->num_viewports].first_line); | 829 | wps_data->viewports[wps_data->num_viewports].first_line); |
824 | 830 | ||
diff --git a/apps/misc.c b/apps/misc.c index f37bd5f081..60955b9820 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "file.h" | 25 | #include "file.h" |
26 | #ifdef __PCTOOL__ | 26 | #ifdef __PCTOOL__ |
27 | #include <stdint.h> | ||
27 | #include <stdarg.h> | 28 | #include <stdarg.h> |
28 | #else | 29 | #else |
29 | #include "sprintf.h" | 30 | #include "sprintf.h" |
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 409a62c566..2a6327df7c 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c | |||
@@ -1,8 +1,30 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Dave Chapman | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
1 | #include <stdio.h> | 22 | #include <stdio.h> |
2 | #include <stdlib.h> | 23 | #include <stdlib.h> |
3 | #include <fcntl.h> | 24 | #include <fcntl.h> |
4 | #include "config.h" | 25 | #include "config.h" |
5 | #include "gwps.h" | 26 | #include "gwps.h" |
27 | #include "checkwps.h" | ||
6 | 28 | ||
7 | #define MIN(x,y) ((x) > (y) ? (y) : (x)) | 29 | #define MIN(x,y) ((x) > (y) ? (y) : (x)) |
8 | 30 | ||
@@ -89,11 +111,6 @@ bool load_remote_wps_backdrop(const char* filename) | |||
89 | 111 | ||
90 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; | 112 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; |
91 | 113 | ||
92 | static int dummy_func1(void) | ||
93 | { | ||
94 | return 0; | ||
95 | } | ||
96 | |||
97 | static unsigned dummy_func2(void) | 114 | static unsigned dummy_func2(void) |
98 | { | 115 | { |
99 | return 0; | 116 | return 0; |
@@ -104,21 +121,27 @@ void* plugin_get_buffer(size_t *buffer_size) | |||
104 | *buffer_size = PLUGIN_BUFFER_SIZE; | 121 | *buffer_size = PLUGIN_BUFFER_SIZE; |
105 | return pluginbuf; | 122 | return pluginbuf; |
106 | } | 123 | } |
107 | 124 | struct user_settings global_settings = { | |
125 | .statusbar = true, | ||
126 | #ifdef HAVE_LCD_COLOR | ||
127 | .bg_color = LCD_DEFAULT_BG, | ||
128 | .fg_color = LCD_DEFAULT_FG, | ||
129 | #endif | ||
130 | }; | ||
131 | |||
132 | |||
108 | struct screen screens[NB_SCREENS] = | 133 | struct screen screens[NB_SCREENS] = |
109 | { | 134 | { |
110 | { | 135 | { |
111 | .screen_type=SCREEN_MAIN, | 136 | .screen_type=SCREEN_MAIN, |
112 | .width=LCD_WIDTH, | 137 | .lcdwidth=LCD_WIDTH, |
113 | .height=LCD_HEIGHT, | 138 | .lcdheight=LCD_HEIGHT, |
114 | .depth=LCD_DEPTH, | 139 | .depth=LCD_DEPTH, |
115 | #ifdef HAVE_LCD_COLOR | 140 | #ifdef HAVE_LCD_COLOR |
116 | .is_color=true, | 141 | .is_color=true, |
117 | #else | 142 | #else |
118 | .is_color=false, | 143 | .is_color=false, |
119 | #endif | 144 | #endif |
120 | .getxmargin=dummy_func1, | ||
121 | .getymargin=dummy_func1, | ||
122 | #if LCD_DEPTH > 1 | 145 | #if LCD_DEPTH > 1 |
123 | .get_foreground=dummy_func2, | 146 | .get_foreground=dummy_func2, |
124 | .get_background=dummy_func2, | 147 | .get_background=dummy_func2, |
@@ -127,12 +150,10 @@ struct screen screens[NB_SCREENS] = | |||
127 | #ifdef HAVE_REMOTE_LCD | 150 | #ifdef HAVE_REMOTE_LCD |
128 | { | 151 | { |
129 | .screen_type=SCREEN_REMOTE, | 152 | .screen_type=SCREEN_REMOTE, |
130 | .width=LCD_REMOTE_WIDTH, | 153 | .lcdwidth=LCD_REMOTE_WIDTH, |
131 | .height=LCD_REMOTE_HEIGHT, | 154 | .lcdheight=LCD_REMOTE_HEIGHT, |
132 | .depth=LCD_REMOTE_DEPTH, | 155 | .depth=LCD_REMOTE_DEPTH, |
133 | .is_color=false,/* No color remotes yet */ | 156 | .is_color=false,/* No color remotes yet */ |
134 | .getxmargin=dummy_func1, | ||
135 | .getymargin=dummy_func1, | ||
136 | #if LCD_REMOTE_DEPTH > 1 | 157 | #if LCD_REMOTE_DEPTH > 1 |
137 | .get_foreground=dummy_func2, | 158 | .get_foreground=dummy_func2, |
138 | .get_background=dummy_func2, | 159 | .get_background=dummy_func2, |
diff --git a/tools/checkwps/checkwps.h b/tools/checkwps/checkwps.h new file mode 100644 index 0000000000..fa3b425500 --- /dev/null +++ b/tools/checkwps/checkwps.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Jonathan Gordon | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef _CHECKWPS_H_ | ||
23 | #define _CHECKWPS_H_ | ||
24 | #include <stdio.h> | ||
25 | #include <stdlib.h> | ||
26 | #include <fcntl.h> | ||
27 | |||
28 | /* subset of global_settings needed to build checkwps. */ | ||
29 | struct user_settings { | ||
30 | bool statusbar; | ||
31 | #ifdef HAVE_LCD_COLOR | ||
32 | int bg_color; /* background color native format */ | ||
33 | int fg_color; /* foreground color native format */ | ||
34 | #endif | ||
35 | }; | ||
36 | |||
37 | extern struct user_settings global_settings; | ||
38 | |||
39 | |||
40 | |||
41 | |||
42 | #endif | ||