diff options
| author | Daniel Veillard <veillard@src.gnome.org> | 2003-09-30 12:36:01 +0000 |
|---|---|---|
| committer | Daniel Veillard <veillard@src.gnome.org> | 2003-09-30 12:36:01 +0000 |
| commit | 73b013fc1758c3c3afb54c00ade42b529fc4c77d (patch) | |
| tree | d49de3d96b84830585e2a03bea39088b12287c48 /testHTML.c | |
| parent | cd101049596ae0e1e63df7f6c08e03d189fe7754 (diff) | |
| download | android_external_libxml2-73b013fc1758c3c3afb54c00ade42b529fc4c77d.tar.gz android_external_libxml2-73b013fc1758c3c3afb54c00ade42b529fc4c77d.tar.bz2 android_external_libxml2-73b013fc1758c3c3afb54c00ade42b529fc4c77d.zip | |
added a new configure option --with-push, some cleanups, chased code size
* HTMLparser.c Makefile.am configure.in legacy.c parser.c
parserInternals.c testHTML.c xmllint.c include/libxml/HTMLparser.h
include/libxml/parser.h include/libxml/parserInternals.h
include/libxml/xmlversion.h.in: added a new configure
option --with-push, some cleanups, chased code size anomalies.
Now a library configured --with-minimum is around 150KB,
sounds good enough.
Daniel
Diffstat (limited to 'testHTML.c')
| -rw-r--r-- | testHTML.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -44,7 +44,9 @@ static int copy = 0; static int sax = 0; static int repeat = 0; static int noout = 0; +#ifdef LIBXML_PUSH_ENABLED static int push = 0; +#endif /* LIBXML_PUSH_ENABLED */ static char *encoding = NULL; static int options = 0; @@ -619,6 +621,7 @@ parseSAXFile(char *filename) { /* * Empty callbacks for checking */ +#ifdef LIBXML_PUSH_ENABLED if (push) { FILE *f; @@ -675,6 +678,7 @@ parseSAXFile(char *filename) { } } } else { +#endif /* LIBXML_PUSH_ENABLED */ doc = htmlSAXParseFile(filename, NULL, emptySAXHandler, NULL); if (doc != NULL) { fprintf(stdout, "htmlSAXParseFile returned non-NULL\n"); @@ -691,7 +695,9 @@ parseSAXFile(char *filename) { xmlFreeDoc(doc); } } +#ifdef LIBXML_PUSH_ENABLED } +#endif /* LIBXML_PUSH_ENABLED */ } static void @@ -782,8 +788,10 @@ int main(int argc, char **argv) { #endif if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy"))) copy++; +#ifdef LIBXML_PUSH_ENABLED else if ((!strcmp(argv[i], "-push")) || (!strcmp(argv[i], "--push"))) push++; +#endif /* LIBXML_PUSH_ENABLED */ else if ((!strcmp(argv[i], "-sax")) || (!strcmp(argv[i], "--sax"))) sax++; else if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) @@ -831,7 +839,9 @@ int main(int argc, char **argv) { printf("\t--sax : debug the sequence of SAX callbacks\n"); printf("\t--repeat : parse the file 100 times, for timing\n"); printf("\t--noout : do not print the result\n"); +#ifdef LIBXML_PUSH_ENABLED printf("\t--push : use the push mode parser\n"); +#endif /* LIBXML_PUSH_ENABLED */ printf("\t--encode encoding : output in the given encoding\n"); } xmlCleanupParser(); |
