summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-11-04 14:03:01 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-11-04 14:03:01 +0000
commit9df079cdfe36be816c8c4b8dbe82aef970afc24b (patch)
tree4e722bbe7b2327edec39da0b4d6e4c56124620de
parent7ee737e50a50519b93af93200720b3c3f0bbbbc0 (diff)
downloadlibdom-9df079cdfe36be816c8c4b8dbe82aef970afc24b.tar.gz
libdom-9df079cdfe36be816c8c4b8dbe82aef970afc24b.tar.bz2
Make the example a tad more useful
-rw-r--r--examples/.gitignore1
-rw-r--r--examples/dom-structure-dump.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/examples/.gitignore b/examples/.gitignore
new file mode 100644
index 0000000..5761abc
--- /dev/null
+++ b/examples/.gitignore
@@ -0,0 +1 @@
+*.o
diff --git a/examples/dom-structure-dump.c b/examples/dom-structure-dump.c
index 0e691e0..833bbe1 100644
--- a/examples/dom-structure-dump.c
+++ b/examples/dom-structure-dump.c
@@ -315,7 +315,7 @@ int main(int argc, char **argv)
dom_node *root = NULL; /* root element of document */
/* Load up the input HTML file */
- doc = create_doc_dom_from_file("files/test.html");
+ doc = create_doc_dom_from_file((argc > 1) ? (argv[1]) : "files/test.html");
if (doc == NULL) {
printf("Failed to load document.\n");
return EXIT_FAILURE;