summaryrefslogtreecommitdiff
path: root/examples/dom-structure-dump.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-10-11 21:44:33 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-10-11 21:44:33 +0100
commit88a1e6a9522092498b606859a5c8684de715cb52 (patch)
tree6c909ffae2a0fd14bc04223cdabc9db536ca93d2 /examples/dom-structure-dump.c
parent9c182425bd8ed61160f213f9ebfd5fe8cec09f6c (diff)
downloadlibdom-88a1e6a9522092498b606859a5c8684de715cb52.tar.gz
libdom-88a1e6a9522092498b606859a5c8684de715cb52.tar.bz2
Fix for current libdom.
Diffstat (limited to 'examples/dom-structure-dump.c')
-rw-r--r--examples/dom-structure-dump.c22
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);