diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 21:44:33 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 21:44:33 +0100 |
commit | 12450399e7ba07df3fa442a0ec6cd0439aeb2cf5 (patch) | |
tree | 6c909ffae2a0fd14bc04223cdabc9db536ca93d2 /examples | |
parent | c64b65770e0ab230d5c8ba02718563540fadac6f (diff) | |
download | libdom-12450399e7ba07df3fa442a0ec6cd0439aeb2cf5.tar.gz libdom-12450399e7ba07df3fa442a0ec6cd0439aeb2cf5.tar.bz2 |
Fix for current libdom.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dom-structure-dump.c | 22 |
1 files changed, 2 insertions, 20 deletions
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 <dom/dom.h> #include <dom/bindings/hubbub/parser.h> -#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); |