diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-11-15 14:11:08 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-11-15 14:11:08 +0000 |
commit | 9e07ef2b0adb8fca7e5a9e516397e533653f8836 (patch) | |
tree | 0a283550421917e52ee04068b84a464976f0c4f2 /tools/checkwps/checkwps.c | |
parent | 101693fd3047fb64e766580e80635a424fa25c4d (diff) | |
download | rockbox-9e07ef2b0adb8fca7e5a9e516397e533653f8836.tar.gz rockbox-9e07ef2b0adb8fca7e5a9e516397e533653f8836.zip |
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
Diffstat (limited to 'tools/checkwps/checkwps.c')
-rw-r--r-- | tools/checkwps/checkwps.c | 11 |
1 files changed, 5 insertions, 6 deletions
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 @@ | |||
37 | 37 | ||
38 | bool debug_wps = true; | 38 | bool debug_wps = true; |
39 | int wps_verbose_level = 0; | 39 | int wps_verbose_level = 0; |
40 | char *skin_buffer; | ||
40 | 41 | ||
41 | int errno; | 42 | int errno; |
42 | 43 | ||
@@ -252,8 +253,6 @@ int main(int argc, char **argv) | |||
252 | struct wps_data wps={0}; | 253 | struct wps_data wps={0}; |
253 | enum screen_type screen = SCREEN_MAIN; | 254 | enum screen_type screen = SCREEN_MAIN; |
254 | struct screen* wps_screen; | 255 | struct screen* wps_screen; |
255 | |||
256 | char* buffer = NULL; | ||
257 | 256 | ||
258 | /* No arguments -> print the help text | 257 | /* No arguments -> print the help text |
259 | * Also print the help text upon -h or --help */ | 258 | * Also print the help text upon -h or --help */ |
@@ -278,14 +277,14 @@ int main(int argc, char **argv) | |||
278 | wps_verbose_level++; | 277 | wps_verbose_level++; |
279 | } | 278 | } |
280 | } | 279 | } |
281 | buffer = malloc(SKIN_BUFFER_SIZE); | 280 | skin_buffer = malloc(SKIN_BUFFER_SIZE); |
282 | if (!buffer) | 281 | if (!skin_buffer) |
283 | { | 282 | { |
284 | printf("mallloc fail!\n"); | 283 | printf("mallloc fail!\n"); |
285 | return 1; | 284 | return 1; |
286 | } | 285 | } |
287 | 286 | ||
288 | skin_buffer_init(buffer, SKIN_BUFFER_SIZE); | 287 | skin_buffer_init(skin_buffer, SKIN_BUFFER_SIZE); |
289 | 288 | ||
290 | /* Go through every skin that was thrown at us, error out at the first | 289 | /* Go through every skin that was thrown at us, error out at the first |
291 | * flawed wps */ | 290 | * flawed wps */ |
@@ -311,7 +310,7 @@ int main(int argc, char **argv) | |||
311 | 310 | ||
312 | printf("WPS parsed OK\n\n"); | 311 | printf("WPS parsed OK\n\n"); |
313 | if (wps_verbose_level>2) | 312 | if (wps_verbose_level>2) |
314 | skin_debug_tree(wps.tree); | 313 | skin_debug_tree(SKINOFFSETTOPTR(skin_buffer, wps.tree)); |
315 | filearg++; | 314 | filearg++; |
316 | } | 315 | } |
317 | return 0; | 316 | return 0; |