summaryrefslogtreecommitdiff
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
parentc5029cc2dbcc074984b4474085fac03e3bc2e4f5 (diff)
downloadlibcss-8708b0abdabb56af70cc8f2dbff9ebd5934481b7.tar.gz
libcss-8708b0abdabb56af70cc8f2dbff9ebd5934481b7.tar.bz2
Minor changes.
svn path=/trunk/libcss/; revision=5255
-rw-r--r--src/parse/css21.c2
-rw-r--r--test/parse.c15
2 files changed, 14 insertions, 3 deletions
diff --git a/src/parse/css21.c b/src/parse/css21.c
index caaacd3..a1f3516 100644
--- a/src/parse/css21.c
+++ b/src/parse/css21.c
@@ -289,8 +289,6 @@ css_error handleStartAtRule(css_css21 *c, const parserutils_vector *vector)
parserutils_error perror;
context_entry entry = { CSS_PARSER_START_ATRULE, NULL };
- UNUSED(vector);
-
assert(c != NULL);
/* vector contains: ATKEYWORD ws any0 */
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");