diff options
Diffstat (limited to 'tools/checkwps')
-rw-r--r-- | tools/checkwps/SOURCES | 1 | ||||
-rw-r--r-- | tools/checkwps/checkwps.c | 15 | ||||
-rw-r--r-- | tools/checkwps/checkwps.make | 4 |
3 files changed, 15 insertions, 5 deletions
diff --git a/tools/checkwps/SOURCES b/tools/checkwps/SOURCES index 48ed53b330..3e12d1f74e 100644 --- a/tools/checkwps/SOURCES +++ b/tools/checkwps/SOURCES | |||
@@ -1,7 +1,6 @@ | |||
1 | ../../apps/gui/skin_engine/wps_debug.c | 1 | ../../apps/gui/skin_engine/wps_debug.c |
2 | ../../apps/gui/skin_engine/skin_parser.c | 2 | ../../apps/gui/skin_engine/skin_parser.c |
3 | ../../apps/gui/skin_engine/skin_backdrops.c | 3 | ../../apps/gui/skin_engine/skin_backdrops.c |
4 | ../../apps/gui/skin_engine/skin_buffer.c | ||
5 | #ifdef HAVE_LCD_BITMAP | 4 | #ifdef HAVE_LCD_BITMAP |
6 | ../../apps/gui/skin_engine/skin_fonts.c | 5 | ../../apps/gui/skin_engine/skin_fonts.c |
7 | #endif | 6 | #endif |
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 94136e02f0..e00fb724bc 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include "checkwps.h" | 26 | #include "checkwps.h" |
27 | #include "resize.h" | 27 | #include "resize.h" |
28 | #include "wps.h" | 28 | #include "wps.h" |
29 | #include "skin_buffer.h" | ||
30 | #include "skin_debug.h" | ||
29 | #include "skin_engine.h" | 31 | #include "skin_engine.h" |
30 | #include "wps_internals.h" | 32 | #include "wps_internals.h" |
31 | #include "settings.h" | 33 | #include "settings.h" |
@@ -237,6 +239,8 @@ int main(int argc, char **argv) | |||
237 | struct wps_data wps; | 239 | struct wps_data wps; |
238 | enum screen_type screen = SCREEN_MAIN; | 240 | enum screen_type screen = SCREEN_MAIN; |
239 | struct screen* wps_screen; | 241 | struct screen* wps_screen; |
242 | |||
243 | char* buffer = NULL; | ||
240 | 244 | ||
241 | /* No arguments -> print the help text | 245 | /* No arguments -> print the help text |
242 | * Also print the help text upon -h or --help */ | 246 | * Also print the help text upon -h or --help */ |
@@ -261,13 +265,19 @@ int main(int argc, char **argv) | |||
261 | wps_verbose_level++; | 265 | wps_verbose_level++; |
262 | } | 266 | } |
263 | } | 267 | } |
268 | buffer = malloc(SKIN_BUFFER_SIZE); | ||
269 | if (!buffer) | ||
270 | { | ||
271 | printf("mallloc fail!\n"); | ||
272 | return 1; | ||
273 | } | ||
264 | 274 | ||
265 | skin_buffer_init(); | 275 | skin_buffer_init(buffer, SKIN_BUFFER_SIZE); |
266 | #ifdef HAVE_LCD_BITMAP | 276 | #ifdef HAVE_LCD_BITMAP |
267 | skin_font_init(); | 277 | skin_font_init(); |
268 | #endif | 278 | #endif |
269 | 279 | ||
270 | /* Go through every wps that was thrown at us, error out at the first | 280 | /* Go through every skin that was thrown at us, error out at the first |
271 | * flawed wps */ | 281 | * flawed wps */ |
272 | while (argv[filearg]) { | 282 | while (argv[filearg]) { |
273 | printf("Checking %s...\n", argv[filearg]); | 283 | printf("Checking %s...\n", argv[filearg]); |
@@ -285,6 +295,7 @@ int main(int argc, char **argv) | |||
285 | 295 | ||
286 | if (!res) { | 296 | if (!res) { |
287 | printf("WPS parsing failure\n"); | 297 | printf("WPS parsing failure\n"); |
298 | skin_error_format_message(); | ||
288 | return 3; | 299 | return 3; |
289 | } | 300 | } |
290 | 301 | ||
diff --git a/tools/checkwps/checkwps.make b/tools/checkwps/checkwps.make index 0db643bc84..e09ce25aec 100644 --- a/tools/checkwps/checkwps.make +++ b/tools/checkwps/checkwps.make | |||
@@ -26,6 +26,6 @@ GCCOPTS+=-D__PCTOOL__ | |||
26 | 26 | ||
27 | .SECONDEXPANSION: # $$(OBJ) is not populated until after this | 27 | .SECONDEXPANSION: # $$(OBJ) is not populated until after this |
28 | 28 | ||
29 | $(BUILDDIR)/$(BINARY): $$(OBJ) | 29 | $(BUILDDIR)/$(BINARY): $$(OBJ) $$(SKINLIB) |
30 | @echo LD $(BINARY) | 30 | @echo LD $(BINARY) |
31 | $(SILENT)$(HOSTCC) $(INCLUDE) $(FLAGS) -o $@ $+ | 31 | $(SILENT)$(HOSTCC) $(INCLUDE) $(FLAGS) -L$(BUILDDIR)/lib -lskin_parser -o $@ $+ |