summaryrefslogtreecommitdiffstats
path: root/tools/checkwps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-11-15 14:11:08 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-11-15 14:11:08 +0000
commit9e07ef2b0adb8fca7e5a9e516397e533653f8836 (patch)
tree0a283550421917e52ee04068b84a464976f0c4f2 /tools/checkwps
parent101693fd3047fb64e766580e80635a424fa25c4d (diff)
downloadrockbox-9e07ef2b0adb8fca7e5a9e516397e533653f8836.tar.gz
rockbox-9e07ef2b0adb8fca7e5a9e516397e533653f8836.tar.bz2
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')
-rw-r--r--tools/checkwps/checkwps.c11
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 @@
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;