diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 75e138be8..e30c02b4e 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -22,7 +22,6 @@ uninstall-local:
clean-local:
test -f Makefile.am || rm -f test?.xml
- rm -f .memdump
EXTRA_DIST = \
examples.xml \
@@ -86,35 +85,18 @@ valgrind:
check-local:
@test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .
@(echo '## examples regression tests')
- @(echo > .memdump)
@$(CHECKER) ./io1 >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./io2 >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./parse1 test1.xml
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./parse2 test2.xml
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./parse3
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./parse4 test3.xml
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./reader1 test2.xml >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./reader2 test2.xml >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./reader3 >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./reader4 test1.xml test2.xml test3.xml >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./testWriter
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./tree1 test2.xml >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./tree2 >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
- @$(CHECKER) ./xpath1 test3.xml '//child2' >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@$(CHECKER) ./xpath2 test3.xml '//discarded' discarded >/dev/null
- @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
@rm -f *.tmp
diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml
index 465ea8247..177e81599 100644
--- a/doc/examples/examples.xml
+++ b/doc/examples/examples.xml
@@ -15,11 +15,9 @@
Usage:
io1
@@ -133,8 +131,6 @@ install step or when installing the libxml2 development package:Usage:
parse1 test1.xml
@@ -159,8 +155,6 @@ install step or when installing the libxml2 development package:Usage:
parse2 test2.xml
@@ -182,8 +176,6 @@ install step or when installing the libxml2 development package:Usage:
parse3
@@ -208,8 +200,6 @@ install step or when installing the libxml2 development package:Usage:
parse4 test3.xml
@@ -281,18 +271,18 @@ install step or when installing the libxml2 development package:Uses:
Usage:
xpath1 <xml-file> <xpath-expr> [<known-ns-list>]
@@ -317,15 +307,15 @@ install step or when installing the libxml2 development package:Uses:
Usage:
xpath2 <xml-file> <xpath-expr> <new-value>
@@ -353,8 +343,6 @@ install step or when installing the libxml2 development package:Usage:
reader1 <filename>
@@ -440,32 +428,32 @@ install step or when installing the libxml2 development package:Uses:
Usage:
testWriter
diff --git a/doc/examples/index.py b/doc/examples/index.py index c422904f7..bceae8b99 100755 --- a/doc/examples/index.py +++ b/doc/examples/index.py @@ -262,10 +262,8 @@ clean-local: Makefile = Makefile + "tests: $(check_PROGRAMS)\n" Makefile = Makefile + "\t@test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .\n" Makefile = Makefile + "\t@(echo '## examples regression tests')\n" - Makefile = Makefile + "\t@(echo > .memdump)\n" for test in tests: Makefile = Makefile + "\t@$(CHECKER) %s\n" % (test) - Makefile = Makefile + '\t@grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0\n' Makefile = Makefile + "\t@rm *.tmp\n" try: old = open("Makefile.am", "r").read() diff --git a/doc/examples/io1.c b/doc/examples/io1.c index 5c2b25d79..366c63cb9 100644 --- a/doc/examples/io1.c +++ b/doc/examples/io1.c @@ -148,14 +148,6 @@ int main(void) { */ xmlFreeDoc(doc); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } #else diff --git a/doc/examples/parse1.c b/doc/examples/parse1.c index e3c9d3a67..01087d1ab 100644 --- a/doc/examples/parse1.c +++ b/doc/examples/parse1.c @@ -44,13 +44,5 @@ int main(int argc, char **argv) { example1Func(argv[1]); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } diff --git a/doc/examples/parse2.c b/doc/examples/parse2.c index 4dcbfde9a..0732e1e5d 100644 --- a/doc/examples/parse2.c +++ b/doc/examples/parse2.c @@ -60,13 +60,5 @@ int main(int argc, char **argv) { exampleFunc(argv[1]); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } diff --git a/doc/examples/parse3.c b/doc/examples/parse3.c index 076a786a2..15349dccd 100644 --- a/doc/examples/parse3.c +++ b/doc/examples/parse3.c @@ -48,13 +48,5 @@ int main(void) { example3Func(document, 6); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } diff --git a/doc/examples/parse4.c b/doc/examples/parse4.c index ae8d332a9..eaeab40c9 100644 --- a/doc/examples/parse4.c +++ b/doc/examples/parse4.c @@ -125,14 +125,6 @@ int main(int argc, char **argv) { fprintf(stderr, "Failed to parse %s\n", argv[1]); } - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } #else /* ! LIBXML_PUSH_ENABLED */ diff --git a/doc/examples/reader1.c b/doc/examples/reader1.c index 103016865..eafb6e1d4 100644 --- a/doc/examples/reader1.c +++ b/doc/examples/reader1.c @@ -88,14 +88,6 @@ int main(int argc, char **argv) { streamFile(argv[1]); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } diff --git a/doc/examples/reader2.c b/doc/examples/reader2.c index 9c2d2e6b3..d8d7f924b 100644 --- a/doc/examples/reader2.c +++ b/doc/examples/reader2.c @@ -103,14 +103,6 @@ int main(int argc, char **argv) { streamFile(argv[1]); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } diff --git a/doc/examples/reader3.c b/doc/examples/reader3.c index f60829795..d6a43b1b5 100644 --- a/doc/examples/reader3.c +++ b/doc/examples/reader3.c @@ -100,15 +100,6 @@ int main(int argc, char **argv) { xmlFreeDoc(doc); } - - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } diff --git a/doc/examples/reader4.c b/doc/examples/reader4.c index f4277ec4f..3c0d1b97d 100644 --- a/doc/examples/reader4.c +++ b/doc/examples/reader4.c @@ -103,14 +103,6 @@ int main(int argc, char **argv) { */ xmlFreeTextReader(readerPtr); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c index a77eec710..948cf16f4 100644 --- a/doc/examples/testWriter.c +++ b/doc/examples/testWriter.c @@ -48,14 +48,6 @@ main(void) /* next, the tree version */ testXmlwriterTree("writer4.tmp"); - /* - * Cleanup function for the XML library. - */ - xmlCleanupParser(); - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return 0; } diff --git a/doc/examples/tree1.c b/doc/examples/tree1.c index e8fc8d1b1..28fc1b70c 100644 --- a/doc/examples/tree1.c +++ b/doc/examples/tree1.c @@ -78,12 +78,6 @@ main(int argc, char **argv) /*free the document */ xmlFreeDoc(doc); - /* - *Free the global variables that may - *have been allocated by the parser. - */ - xmlCleanupParser(); - return 0; } #else diff --git a/doc/examples/tree2.c b/doc/examples/tree2.c index 83f29a0b5..78dcac142 100644 --- a/doc/examples/tree2.c +++ b/doc/examples/tree2.c @@ -97,16 +97,6 @@ main(int argc, char **argv) /*free the document */ xmlFreeDoc(doc); - /* - *Free the global variables that may - *have been allocated by the parser. - */ - xmlCleanupParser(); - - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return(0); } #else diff --git a/doc/examples/xpath1.c b/doc/examples/xpath1.c index af996e697..14efcbab9 100644 --- a/doc/examples/xpath1.c +++ b/doc/examples/xpath1.c @@ -45,13 +45,6 @@ main(int argc, char **argv) { return(-1); } - /* Shutdown libxml */ - xmlCleanupParser(); - - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return 0; } diff --git a/doc/examples/xpath2.c b/doc/examples/xpath2.c index a17a0256a..bf4e631d0 100644 --- a/doc/examples/xpath2.c +++ b/doc/examples/xpath2.c @@ -47,13 +47,6 @@ main(int argc, char **argv) { return(-1); } - /* Shutdown libxml */ - xmlCleanupParser(); - - /* - * this is to debug memory for regression tests - */ - xmlMemoryDump(); return 0; }