From 88a1e6a9522092498b606859a5c8684de715cb52 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 11 Oct 2012 21:44:33 +0100 Subject: Fix for current libdom. --- examples/dom-structure-dump.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'examples') diff --git a/examples/dom-structure-dump.c b/examples/dom-structure-dump.c index e6af3b7..0e691e0 100644 --- a/examples/dom-structure-dump.c +++ b/examples/dom-structure-dump.c @@ -46,21 +46,6 @@ #include #include -#define UNUSED(x) ((x)=(x)) - -void test_msg(uint32_t severity, void *ctx, const char *msg, ...) -{ - va_list l; - - UNUSED(ctx); - - va_start(l, msg); - - fprintf(stderr, "%d: ", severity); - vfprintf(stderr, msg, l); - fprintf(stderr, "\n"); -} - /** * Generate a LibDOM document DOM from an HTML file @@ -79,8 +64,8 @@ dom_document *create_doc_dom_from_file(char *file) unsigned char buffer[buffer_size]; /* Create Hubbub parser */ - parser = dom_hubbub_parser_create(NULL, true, false, test_msg, NULL, - NULL, NULL); + parser = dom_hubbub_parser_create(NULL, true, false, NULL, NULL, + NULL, &doc); if (parser == NULL) { printf("Can't create Hubbub Parser\n"); return NULL; @@ -115,9 +100,6 @@ dom_document *create_doc_dom_from_file(char *file) return NULL; } - /* Get the document */ - doc = dom_hubbub_parser_get_document(parser); - /* Finished with parser */ dom_hubbub_parser_destroy(parser); -- cgit v1.2.3