summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-12-06 19:39:50 +0000
committerVincent Sanders <vince@netsurf-browser.org>2012-12-06 19:39:50 +0000
commit8051772672c6cae6e00847f396cea6f7e3f43f3b (patch)
tree985347e424af102a9a2244fd9edc198e367499aa
parent44a1b75fe3664687238929c61e58399940d3f862 (diff)
downloadlibdom-8051772672c6cae6e00847f396cea6f7e3f43f3b.tar.gz
libdom-8051772672c6cae6e00847f396cea6f7e3f43f3b.tar.bz2
fix example for new parameter setup
-rw-r--r--examples/dom-structure-dump.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/examples/dom-structure-dump.c b/examples/dom-structure-dump.c
index 833bbe1..4ce7670 100644
--- a/examples/dom-structure-dump.c
+++ b/examples/dom-structure-dump.c
@@ -60,13 +60,21 @@ dom_document *create_doc_dom_from_file(char *file)
FILE *handle;
int chunk_length;
dom_hubbub_error error;
+ dom_hubbub_parser_params params;
dom_document *doc;
unsigned char buffer[buffer_size];
+ params.enc = NULL;
+ params.fix_enc = true;
+ params.enable_script = false;
+ params.msg = NULL;
+ params.script = NULL;
+ params.ctx = NULL;
+ params.daf = NULL;
+
/* Create Hubbub parser */
- parser = dom_hubbub_parser_create(NULL, true, false, NULL, NULL,
- NULL, &doc);
- if (parser == NULL) {
+ error = dom_hubbub_parser_create(&params, &parser, &doc);
+ if (error != DOM_HUBBUB_OK) {
printf("Can't create Hubbub Parser\n");
return NULL;
}