summaryrefslogtreecommitdiff
path: root/test/parse.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-09-05 11:44:12 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-09-05 11:44:12 +0000
commit8708b0abdabb56af70cc8f2dbff9ebd5934481b7 (patch)
treee6064a96bf8d635307c3f1003e519dd7552087da /test/parse.c
parentc5029cc2dbcc074984b4474085fac03e3bc2e4f5 (diff)
downloadlibcss-8708b0abdabb56af70cc8f2dbff9ebd5934481b7.tar.gz
libcss-8708b0abdabb56af70cc8f2dbff9ebd5934481b7.tar.bz2
Minor changes.
svn path=/trunk/libcss/; revision=5255
Diffstat (limited to 'test/parse.c')
-rw-r--r--test/parse.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/parse.c b/test/parse.c
index dff11a1..25d1759 100644
--- a/test/parse.c
+++ b/test/parse.c
@@ -11,6 +11,19 @@
#include "testutils.h"
+static const char *event_names[] = {
+ "START_STYLESHEET",
+ "END_STYLESHEET",
+ "START_RULESET",
+ "END_RULESET",
+ "START_ATRULE",
+ "END_ATRULE",
+ "START_BLOCK",
+ "END_BLOCK",
+ "BLOCK_CONTENT",
+ "DECLARATION"
+};
+
static void *myrealloc(void *ptr, size_t len, void *pw)
{
UNUSED(pw);
@@ -31,7 +44,7 @@ static css_error event_handler(css_parser_event type,
UNUSED(pw);
- printf("%s%d", tokens != NULL ? " " : "", type);
+ printf("%s%s", tokens != NULL ? " " : "", event_names[type]);
if (tokens == NULL) {
printf("\n");