From 9e07ef2b0adb8fca7e5a9e516397e533653f8836 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 15 Nov 2011 14:11:08 +0000 Subject: Use buflib for all skin engine allocations. Massive thanks to Michael Chicoine and other testers for finding the early bugs. This removes all skin memory limitations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657 --- tools/checkwps/checkwps.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tools/checkwps/checkwps.c') diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 846dd97191..ec0262bfe7 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c @@ -37,6 +37,7 @@ bool debug_wps = true; int wps_verbose_level = 0; +char *skin_buffer; int errno; @@ -252,8 +253,6 @@ int main(int argc, char **argv) struct wps_data wps={0}; 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 */ @@ -278,14 +277,14 @@ int main(int argc, char **argv) wps_verbose_level++; } } - buffer = malloc(SKIN_BUFFER_SIZE); - if (!buffer) + skin_buffer = malloc(SKIN_BUFFER_SIZE); + if (!skin_buffer) { printf("mallloc fail!\n"); return 1; } - skin_buffer_init(buffer, SKIN_BUFFER_SIZE); + skin_buffer_init(skin_buffer, SKIN_BUFFER_SIZE); /* Go through every skin that was thrown at us, error out at the first * flawed wps */ @@ -311,7 +310,7 @@ int main(int argc, char **argv) printf("WPS parsed OK\n\n"); if (wps_verbose_level>2) - skin_debug_tree(wps.tree); + skin_debug_tree(SKINOFFSETTOPTR(skin_buffer, wps.tree)); filearg++; } return 0; -- cgit v1.2.3