summaryrefslogtreecommitdiff
path: root/testSAX.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2005-02-05 12:06:19 +0000
committerMike Hommey <mh@glandium.org>2005-02-05 12:06:19 +0000
commita7457388701e6ccba9091ba3ec09505dc903b758 (patch)
tree80a7d0fba3968fee73cc71a62ffe1af039396f29 /testSAX.c
parentf51dd67f3a3f472af0620391eb588eeca4533689 (diff)
downloadlibxml2-a7457388701e6ccba9091ba3ec09505dc903b758.tar.gz
Load /tmp/tmp.5kkLmZ/libxml2-2.6.17 intoupstream/2.6.17
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'testSAX.c')
-rw-r--r--testSAX.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/testSAX.c b/testSAX.c
index c18dd0a..36fb12d 100644
--- a/testSAX.c
+++ b/testSAX.c
@@ -1004,6 +1004,7 @@ static void
parseAndPrintFile(char *filename) {
int res;
+#ifdef LIBXML_PUSH_ENABLED
if (push) {
FILE *f;
@@ -1071,6 +1072,7 @@ parseAndPrintFile(char *filename) {
fclose(f);
}
} else {
+#endif /* LIBXML_PUSH_ENABLED */
if (!speed) {
/*
* Empty callbacks for checking
@@ -1118,7 +1120,9 @@ parseAndPrintFile(char *filename) {
fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res);
}
}
+#ifdef LIBXML_PUSH_ENABLED
}
+#endif
}
@@ -1138,7 +1142,11 @@ int main(int argc, char **argv) {
recovery++;
else if ((!strcmp(argv[i], "-push")) ||
(!strcmp(argv[i], "--push")))
+#ifdef LIBXML_PUSH_ENABLED
push++;
+#else
+ fprintf(stderr,"'push' not enabled in library - ignoring\n");
+#endif /* LIBXML_PUSH_ENABLED */
else if ((!strcmp(argv[i], "-speed")) ||
(!strcmp(argv[i], "--speed")))
speed++;