summaryrefslogtreecommitdiff
path: root/tools/checkwps/checkwps.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-07-29 12:37:48 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-07-29 12:37:48 +0000
commit2d31d77a8ba231cb03ec35863c4c4ce2024f6509 (patch)
treeb85ca1bede3e83695619064ee9a323f0a8da1865 /tools/checkwps/checkwps.c
parente436483b66a931fef6436e9cd3e69eb2b3ff1f7b (diff)
FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/checkwps/checkwps.c')
-rw-r--r--tools/checkwps/checkwps.c15
1 files changed, 13 insertions, 2 deletions
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 @@
#include "checkwps.h"
#include "resize.h"
#include "wps.h"
+#include "skin_buffer.h"
+#include "skin_debug.h"
#include "skin_engine.h"
#include "wps_internals.h"
#include "settings.h"
@@ -237,6 +239,8 @@ int main(int argc, char **argv)
struct wps_data wps;
enum screen_type screen = SCREEN_MAIN;
struct screen* wps_screen;
+
+ char* buffer = NULL;
/* No arguments -> print the help text
* Also print the help text upon -h or --help */
@@ -261,13 +265,19 @@ int main(int argc, char **argv)
wps_verbose_level++;
}
}
+ buffer = malloc(SKIN_BUFFER_SIZE);
+ if (!buffer)
+ {
+ printf("mallloc fail!\n");
+ return 1;
+ }
- skin_buffer_init();
+ skin_buffer_init(buffer, SKIN_BUFFER_SIZE);
#ifdef HAVE_LCD_BITMAP
skin_font_init();
#endif
- /* Go through every wps that was thrown at us, error out at the first
+ /* Go through every skin that was thrown at us, error out at the first
* flawed wps */
while (argv[filearg]) {
printf("Checking %s...\n", argv[filearg]);
@@ -285,6 +295,7 @@ int main(int argc, char **argv)
if (!res) {
printf("WPS parsing failure\n");
+ skin_error_format_message();
return 3;
}