From 4e8fa1efca3c71ef7e0c515afb175e849a97d416 Mon Sep 17 00:00:00 2001 From: xroche Date: Fri, 7 Nov 2014 17:26:44 +0100 Subject: [PATCH] Imported Upstream version 2.9.1 --- COPYING | 14 +- Copyright | 14 +- DOCBparser.c | 12 +- HTMLparser.c | 140 +- HTMLtree.c | 106 +- INSTALL | 9 +- Makefile.am | 127 +- Makefile.in | 547 +- SAX.c | 2 +- SAX2.c | 153 +- acinclude.m4 | 8 +- aclocal.m4 | 118 +- buf.c | 1304 +++ buf.h | 72 + c14n.c | 632 +- catalog.c | 101 +- chvalid.c | 164 +- config.guess | 259 +- config.h.in | 26 + config.sub | 204 +- configure | 1175 +- configure.in | 164 +- debugXML.c | 31 +- depcomp | 190 +- dict.c | 222 +- doc/APIchunk0.html | 14 +- doc/APIchunk1.html | 8 +- doc/APIchunk10.html | 37 +- doc/APIchunk11.html | 29 +- doc/APIchunk12.html | 22 +- doc/APIchunk13.html | 36 +- doc/APIchunk14.html | 14 +- doc/APIchunk15.html | 16 +- doc/APIchunk16.html | 17 +- doc/APIchunk17.html | 27 +- doc/APIchunk18.html | 28 +- doc/APIchunk19.html | 15 +- doc/APIchunk2.html | 13 +- doc/APIchunk20.html | 8 +- doc/APIchunk21.html | 20 +- doc/APIchunk22.html | 19 +- doc/APIchunk23.html | 18 +- doc/APIchunk24.html | 25 +- doc/APIchunk25.html | 14 +- doc/APIchunk26.html | 19 +- doc/APIchunk27.html | 15 +- doc/APIchunk28.html | 26 +- doc/APIchunk29.html | 8 +- doc/APIchunk3.html | 24 +- doc/APIchunk4.html | 19 +- doc/APIchunk5.html | 9 +- doc/APIchunk6.html | 12 +- doc/APIchunk7.html | 13 +- doc/APIchunk8.html | 10 +- doc/APIchunk9.html | 20 +- doc/APIconstructors.html | 10 + doc/APIfiles.html | 34 +- doc/APIfunctions.html | 31 +- doc/APIsymbols.html | 34 +- doc/Makefile.am | 298 +- doc/Makefile.in | 496 +- doc/apibuild.py | 3262 +++--- doc/devhelp/Makefile.am | 32 +- doc/devhelp/Makefile.in | 171 +- doc/devhelp/general.html | 2 +- doc/devhelp/libxml2-dict.html | 12 +- doc/devhelp/libxml2-parser.html | 9 +- doc/devhelp/libxml2-parserInternals.html | 21 +- doc/devhelp/libxml2-relaxng.html | 2 +- doc/devhelp/libxml2-tree.html | 80 +- doc/devhelp/libxml2-valid.html | 2 +- doc/devhelp/libxml2-xmlIO.html | 10 + doc/devhelp/libxml2-xmlerror.html | 9 +- doc/devhelp/libxml2-xmlmodule.html | 4 +- doc/devhelp/libxml2-xmlregexp.html | 6 +- doc/devhelp/libxml2-xmlschemas.html | 15 + doc/devhelp/libxml2-xmlversion.html | 5 + doc/devhelp/libxml2-xmlwriter.html | 11 +- doc/devhelp/libxml2-xpath.html | 11 + doc/devhelp/libxml2-xpathInternals.html | 18 +- doc/devhelp/libxml2.devhelp | 32 +- doc/examples/Makefile.am | 241 +- doc/examples/Makefile.in | 451 +- doc/examples/examples.xml | 450 +- doc/examples/index.html | 14 + doc/examples/index.py | 92 +- doc/examples/io1.c | 2 +- doc/examples/io1.res | 2 +- doc/examples/io2.c | 2 +- doc/examples/reader1.c | 2 +- doc/examples/reader2.c | 2 +- doc/examples/reader3.c | 2 +- doc/examples/reader4.c | 2 +- doc/examples/testWriter.c | 10 +- doc/examples/tree1.c | 2 +- doc/examples/tree2.c | 2 +- doc/examples/xpath1.c | 2 +- doc/examples/xpath2.c | 2 +- doc/html/book1.html | 2 +- doc/html/index.html | 2 +- doc/html/libxml-dict.html | 12 +- doc/html/libxml-lib.html | 2 +- doc/html/libxml-parser.html | 7 +- doc/html/libxml-parserInternals.html | 7 +- doc/html/libxml-relaxng.html | 2 +- doc/html/libxml-tree.html | 49 +- doc/html/libxml-valid.html | 2 +- doc/html/libxml-xmlIO.html | 8 +- doc/html/libxml-xmlerror.html | 7 +- doc/html/libxml-xmlmodule.html | 4 +- doc/html/libxml-xmlregexp.html | 6 +- doc/html/libxml-xmlschemas.html | 14 +- doc/html/libxml-xmlversion.html | 3 +- doc/html/libxml-xmlwriter.html | 5 +- doc/html/libxml-xpath.html | 11 +- doc/html/libxml-xpathInternals.html | 14 +- doc/libxml2-api.xml | 251 +- doc/libxml2.xsa | 177 +- doc/news.html | 137 +- doc/symbols.xml | 19 + doc/xml.html | 150 +- doc/xmllint.1 | 611 +- doc/xmllint.xml | 14 + elfgcchack.h | 174 + enc.h | 32 + encoding.c | 492 +- entities.c | 149 +- error.c | 77 +- example/Makefile.am | 9 +- example/Makefile.in | 103 +- globals.c | 28 +- hash.c | 48 +- include/Makefile.in | 65 +- include/libxml/DOCBparser.h | 18 +- include/libxml/HTMLparser.h | 44 +- include/libxml/HTMLtree.h | 38 +- include/libxml/Makefile.in | 69 +- include/libxml/SAX.h | 74 +- include/libxml/SAX2.h | 68 +- include/libxml/c14n.h | 2 +- include/libxml/catalog.h | 70 +- include/libxml/debugXML.h | 52 +- include/libxml/dict.h | 6 + include/libxml/encoding.h | 28 +- include/libxml/entities.h | 3 +- include/libxml/hash.h | 48 +- include/libxml/list.h | 52 +- include/libxml/nanoftp.h | 1 + include/libxml/nanohttp.h | 26 +- include/libxml/parser.h | 144 +- include/libxml/parserInternals.h | 179 +- include/libxml/schemasInternals.h | 4 +- include/libxml/schematron.h | 22 +- include/libxml/tree.h | 352 +- include/libxml/valid.h | 144 +- include/libxml/xlink.h | 14 +- include/libxml/xmlIO.h | 136 +- include/libxml/xmlautomata.h | 44 +- include/libxml/xmlerror.h | 13 +- include/libxml/xmlexports.h | 2 +- include/libxml/xmlmodule.h | 2 +- include/libxml/xmlreader.h | 39 +- include/libxml/xmlschemas.h | 32 +- include/libxml/xmlschemastypes.h | 40 +- include/libxml/xmlstring.h | 6 +- include/libxml/xmlversion.h | 25 +- include/libxml/xmlversion.h.in | 15 +- include/libxml/xmlwriter.h | 5 +- include/libxml/xpath.h | 94 +- include/libxml/xpathInternals.h | 160 +- include/libxml/xpointer.h | 46 +- include/wsockcompat.h | 2 +- install-sh | 29 +- legacy.c | 30 +- libxml-2.0-uninstalled.pc.in | 2 +- libxml-2.0.pc.in | 2 +- libxml.3 | 2 +- libxml.h | 9 + libxml.spec.in | 57 +- libxml2.spec | 63 +- libxml2.syms | 35 + list.c | 76 +- ltmain.sh | 95 +- m4/libtool.m4 | 265 +- m4/ltoptions.m4 | 19 +- m4/ltversion.m4 | 10 +- missing | 53 +- nanoftp.c | 64 +- nanohttp.c | 64 +- parser.c | 1386 ++- parserInternals.c | 206 +- pattern.c | 178 +- python/Makefile.am | 63 +- python/Makefile.in | 269 +- python/generator.py | 241 +- python/libxml.c | 324 +- python/libxml.py | 109 +- python/libxml2-export.c | 2063 ++++ python/libxml2-py.c | 14789 ++++++++++++++++++++++++++ python/libxml2-py.h | 2063 ++++ python/libxml2-python-api.xml | 9 + python/libxml2.py | 9315 ++++++++++++++++ python/libxml2class.py | 8529 +++++++++++++++ python/libxml2class.txt | 1177 ++ python/libxml_wrap.h | 30 + python/setup.py | 20 +- python/setup.py.in | 18 +- python/tests/Makefile.am | 7 +- python/tests/Makefile.in | 78 +- python/tests/attribs.py | 6 +- python/tests/build.py | 18 +- python/tests/compareNodes.py | 18 +- python/tests/ctxterror.py | 12 +- python/tests/cutnpaste.py | 6 +- python/tests/dtdvalid.py | 6 +- python/tests/error.py | 12 +- python/tests/inbuf.py | 13 +- python/tests/indexes.py | 20 +- python/tests/input_callback.py | 148 + python/tests/nsdel.py | 6 +- python/tests/outbuf.py | 49 +- python/tests/push.py | 8 +- python/tests/pushSAX.py | 8 +- python/tests/pushSAXhtml.py | 8 +- python/tests/reader.py | 185 +- python/tests/reader2.py | 63 +- python/tests/reader3.py | 63 +- python/tests/reader4.py | 17 +- python/tests/reader5.py | 15 +- python/tests/reader6.py | 27 +- python/tests/reader7.py | 17 +- python/tests/reader8.py | 7 +- python/tests/readererr.py | 21 +- python/tests/readernext.py | 39 +- python/tests/regexp.py | 14 +- python/tests/relaxng.py | 6 +- python/tests/resolver.py | 17 +- python/tests/schema.py | 6 +- python/tests/serialize.py | 36 +- python/tests/sync.py | 32 +- python/tests/thread2.py | 21 +- python/tests/tst.py | 10 +- python/tests/tstLastError.py | 20 +- python/tests/tstURI.py | 18 +- python/tests/tstmem.py | 6 +- python/tests/tstxpath.py | 16 +- python/tests/validDTD.py | 10 +- python/tests/validRNG.py | 10 +- python/tests/validSchemas.py | 10 +- python/tests/validate.py | 20 +- python/tests/walker.py | 23 +- python/tests/xpath.py | 14 +- python/tests/xpathext.py | 12 +- python/tests/xpathleak.py | 14 +- python/tests/xpathns.py | 8 +- python/tests/xpathret.py | 14 +- python/types.c | 280 +- relaxng.c | 105 +- result/HTML/53867.html | 8 +- result/HTML/Down.html | 5 +- result/HTML/attrents.html | 8 +- result/HTML/autoclose.html | 4 +- result/HTML/cf_128.html | 22 +- result/HTML/doc2.htm | 4 +- result/HTML/doc3.htm | 286 +- result/HTML/entities.html | 6 +- result/HTML/entities2.html | 6 +- result/HTML/fp40.htm | 20 +- result/HTML/html5_enc.html | 4 +- result/HTML/liclose.html | 5 +- result/HTML/lt.html | 6 +- result/HTML/noscript.html | 10 +- result/HTML/pre.html | 6 +- result/HTML/python.html | 5 +- result/HTML/reg1.html | 4 +- result/HTML/reg2.html | 4 +- result/HTML/reg3.html | 4 +- result/HTML/reg4.html | 5 +- result/HTML/repeat.html | 4 +- result/HTML/script.html | 3 +- result/HTML/script2.html | 7 +- result/HTML/test2.html | 11 +- result/HTML/test3.html | 32 +- result/HTML/utf8bug.html | 100 +- result/HTML/wired.html | 488 +- result/VC/AttributeDefaultLegal.rdr | 12 + result/VC/AttributeNmtokens.rdr | 3 + result/VC/DuplicateType.rdr | 3 + result/VC/ElementValid.rdr | 3 + result/VC/ElementValid2.rdr | 6 + result/VC/ElementValid3.rdr | 6 + result/VC/ElementValid4.rdr | 6 + result/VC/ElementValid5.rdr | 6 + result/VC/ElementValid6.rdr | 6 + result/VC/ElementValid7.rdr | 6 + result/VC/ElementValid8.rdr | 3 + result/VC/Enumeration.rdr | 3 + result/VC/NS1.rdr | 0 result/VC/NS2.rdr | 3 + result/VC/NS3.rdr | 9 + result/VC/OneID.rdr | 6 + result/VC/OneID2.rdr | 6 + result/VC/OneID3.rdr | 6 + result/VC/PENesting.rdr | 4 + result/VC/PENesting2.rdr | 4 + result/VC/UniqueElementTypeDeclaration.rdr | 3 + result/VC/UniqueElementTypeDeclaration2.rdr | 3 + result/att11.sax | 2 - result/att11.sax2 | 2 - result/errors/content1.xml.err | 3 +- result/errors/content1.xml.str | 3 +- result/errors/extparsedent.xml | 5 + result/errors/extparsedent.xml.err | 0 result/errors/extparsedent.xml.str | 0 result/valid/127772.xml.err.rdr | 0 result/valid/694228.xml | 5 + result/valid/694228.xml.err | 0 result/valid/694228.xml.err.rdr | 0 result/valid/REC-xml-19980210.xml.err.rdr | 0 result/valid/UTF16Entity.xml.err.rdr | 0 result/valid/dia.xml.err.rdr | 0 result/valid/id1.xml.err.rdr | 0 result/valid/id2.xml.err.rdr | 0 result/valid/id3.xml.err.rdr | 0 result/valid/index.xml.err.rdr | 0 result/valid/mixed_ns.xml.err.rdr | 0 result/valid/notes.xml.err.rdr | 0 result/valid/ns.xml.err.rdr | 0 result/valid/ns2.xml.err.rdr | 0 result/valid/objednavka.xml.err.rdr | 0 result/valid/rss.xml.err.rdr | 3 + result/valid/t10.xml.err.rdr | 0 result/valid/t11.xml.err.rdr | 0 result/valid/t4.dtd.err.rdr | 6 + result/valid/t4.xml.err.rdr | 0 result/valid/t4a.dtd.err.rdr | 6 + result/valid/t4a.xml.err.rdr | 0 result/valid/t6.dtd.err.rdr | 6 + result/valid/t6.xml.err.rdr | 0 result/valid/t8.xml.err | 3 +- result/valid/t8.xml.err.rdr | 14 + result/valid/t8a.xml.err | 3 +- result/valid/t8a.xml.err.rdr | 14 + result/valid/t9.xml.err.rdr | 0 result/valid/t9a.xml.err.rdr | 0 result/valid/xhtml1.xhtml.err.rdr | 0 result/valid/xlink.xml.err.rdr | 4 + runsuite.c | 37 +- runtest.c | 139 +- runxmlconf.c | 9 +- save.h | 35 + schematron.c | 34 +- test/errors/extparsedent.xml | 5 + test/valid/694228.xml | 5 + test/valid/dtds/694228.dtd | 3 + testAutomata.c | 4 +- testC14N.c | 96 +- testHTML.c | 30 +- testModule.c | 4 +- testRegexp.c | 18 +- testRelax.c | 10 +- testSAX.c | 22 +- testSchemas.c | 10 +- testThreadsWin32.c | 6 +- testXPath.c | 16 +- testapi.c | 457 +- testchar.c | 20 +- testlimits.c | 1634 +++ testrecurse.c | 11 - threads.c | 11 +- timsort.h | 514 + tree.c | 301 +- trio.c | 300 +- trio.h | 2 +- trionan.c | 74 +- trionan.h | 2 +- triostr.c | 146 +- uri.c | 404 +- valid.c | 200 +- win32/.cvsignore | 7 - win32/Makefile.bcb | 20 +- win32/Makefile.mingw | 20 +- win32/Makefile.msvc | 30 +- win32/VC10/libxml2.vcxproj | 1 + win32/VC10/runsuite.vcxproj | 2 +- win32/configure.js | 2 + win32/libxml2.def.src | 22 +- win32/wince/wincecompat.c | 7 +- xinclude.c | 127 +- xlink.c | 10 +- xml2-config.1 | 1 - xml2-config.in | 6 +- xmlIO.c | 241 +- xmlcatalog.c | 24 +- xmllint.c | 46 +- xmlmemory.c | 2 +- xmlmodule.c | 21 +- xmlreader.c | 169 +- xmlregexp.c | 251 +- xmlsave.c | 317 +- xmlschemas.c | 275 +- xmlschemastypes.c | 334 +- xmlstring.c | 34 +- xmlunicode.c | 1270 +-- xmlwriter.c | 48 +- xpath.c | 636 +- xpointer.c | 98 +- xstc/Makefile.am | 4 +- xstc/Makefile.in | 58 +- 409 files changed, 59022 insertions(+), 11194 deletions(-) create mode 100644 buf.c create mode 100644 buf.h mode change 100755 => 100644 chvalid.c create mode 100644 doc/examples/index.html create mode 100644 enc.h mode change 100755 => 100644 ltmain.sh create mode 100644 python/libxml2-export.c create mode 100644 python/libxml2-py.c create mode 100644 python/libxml2-py.h create mode 100644 python/libxml2.py create mode 100644 python/libxml2class.py create mode 100644 python/libxml2class.txt create mode 100755 python/tests/input_callback.py mode change 100644 => 100755 python/tests/readererr.py mode change 100644 => 100755 python/tests/regexp.py mode change 100644 => 100755 python/tests/xpathleak.py create mode 100644 result/VC/AttributeDefaultLegal.rdr create mode 100644 result/VC/AttributeNmtokens.rdr create mode 100644 result/VC/DuplicateType.rdr create mode 100644 result/VC/ElementValid.rdr create mode 100644 result/VC/ElementValid2.rdr create mode 100644 result/VC/ElementValid3.rdr create mode 100644 result/VC/ElementValid4.rdr create mode 100644 result/VC/ElementValid5.rdr create mode 100644 result/VC/ElementValid6.rdr create mode 100644 result/VC/ElementValid7.rdr create mode 100644 result/VC/ElementValid8.rdr create mode 100644 result/VC/Enumeration.rdr create mode 100644 result/VC/NS1.rdr create mode 100644 result/VC/NS2.rdr create mode 100644 result/VC/NS3.rdr create mode 100644 result/VC/OneID.rdr create mode 100644 result/VC/OneID2.rdr create mode 100644 result/VC/OneID3.rdr create mode 100644 result/VC/PENesting.rdr create mode 100644 result/VC/PENesting2.rdr create mode 100644 result/VC/UniqueElementTypeDeclaration.rdr create mode 100644 result/VC/UniqueElementTypeDeclaration2.rdr create mode 100644 result/errors/extparsedent.xml create mode 100644 result/errors/extparsedent.xml.err create mode 100644 result/errors/extparsedent.xml.str create mode 100644 result/valid/127772.xml.err.rdr create mode 100644 result/valid/694228.xml create mode 100644 result/valid/694228.xml.err create mode 100644 result/valid/694228.xml.err.rdr create mode 100644 result/valid/REC-xml-19980210.xml.err.rdr create mode 100644 result/valid/UTF16Entity.xml.err.rdr create mode 100644 result/valid/dia.xml.err.rdr create mode 100644 result/valid/id1.xml.err.rdr create mode 100644 result/valid/id2.xml.err.rdr create mode 100644 result/valid/id3.xml.err.rdr create mode 100644 result/valid/index.xml.err.rdr create mode 100644 result/valid/mixed_ns.xml.err.rdr create mode 100644 result/valid/notes.xml.err.rdr create mode 100644 result/valid/ns.xml.err.rdr create mode 100644 result/valid/ns2.xml.err.rdr create mode 100644 result/valid/objednavka.xml.err.rdr create mode 100644 result/valid/rss.xml.err.rdr create mode 100644 result/valid/t10.xml.err.rdr create mode 100644 result/valid/t11.xml.err.rdr create mode 100644 result/valid/t4.dtd.err.rdr create mode 100644 result/valid/t4.xml.err.rdr create mode 100644 result/valid/t4a.dtd.err.rdr create mode 100644 result/valid/t4a.xml.err.rdr create mode 100644 result/valid/t6.dtd.err.rdr create mode 100644 result/valid/t6.xml.err.rdr create mode 100644 result/valid/t8.xml.err.rdr create mode 100644 result/valid/t8a.xml.err.rdr create mode 100644 result/valid/t9.xml.err.rdr create mode 100644 result/valid/t9a.xml.err.rdr create mode 100644 result/valid/xhtml1.xhtml.err.rdr create mode 100644 result/valid/xlink.xml.err.rdr create mode 100644 save.h create mode 100644 test/errors/extparsedent.xml create mode 100644 test/valid/694228.xml create mode 100644 test/valid/dtds/694228.dtd create mode 100644 testlimits.c create mode 100644 timsort.h delete mode 100644 win32/.cvsignore diff --git a/COPYING b/COPYING index 417e955..d613185 100644 --- a/COPYING +++ b/COPYING @@ -2,7 +2,7 @@ Except where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered by a similar licence but with different Copyright notices) all the files are: - Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. + Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -17,11 +17,7 @@ all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- -NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Daniel Veillard shall not -be used in advertising or otherwise to promote the sale, use or other deal- -ings in this Software without prior written authorization from him. - +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Copyright b/Copyright index 417e955..d613185 100644 --- a/Copyright +++ b/Copyright @@ -2,7 +2,7 @@ Except where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered by a similar licence but with different Copyright notices) all the files are: - Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. + Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -17,11 +17,7 @@ all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- -NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Daniel Veillard shall not -be used in advertising or otherwise to promote the sale, use or other deal- -ings in this Software without prior written authorization from him. - +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/DOCBparser.c b/DOCBparser.c index 3573743..f12511b 100644 --- a/DOCBparser.c +++ b/DOCBparser.c @@ -53,7 +53,7 @@ docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED, /** * docbParseDocument: * @ctxt: an SGML parser context - * + * * parse an SGML document (and build a tree if using the standard SAX * interface). * @@ -163,12 +163,12 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED, * @cur: a pointer to an array of xmlChar * @encoding: a free form C string describing the SGML document encoding, or NULL * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. + * @userData: if using SAX, this pointer will be provided on callbacks. * * parse an SGML in-memory document and build a tree. * It use the given SAX function block to handle the parsing callback. * If sax is NULL, fallback to the default DOM tree building routines. - * + * * Returns the resulting document tree */ @@ -196,7 +196,7 @@ docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED, * @encoding: a free form C string describing the SGML document encoding, or NULL * * parse an SGML in-memory document and build a tree. - * + * * Returns the resulting document tree */ @@ -221,7 +221,7 @@ docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED, * @filename: the filename * @encoding: the SGML document encoding, or NULL * - * Create a parser context for a file content. + * Create a parser context for a file content. * Automatic support for ZLIB/Compress compressed document is provided * by default if found at compile-time. * @@ -247,7 +247,7 @@ docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED, * @filename: the filename * @encoding: a free form C string describing the SGML document encoding, or NULL * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. + * @userData: if using SAX, this pointer will be provided on callbacks. * * parse an SGML file and build a tree. Automatic support for ZLIB/Compress * compressed document is provided by default if found at compile-time. diff --git a/HTMLparser.c b/HTMLparser.c index 66ff17b..dd0c1ea 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -44,6 +44,9 @@ #include #include +#include "buf.h" +#include "enc.h" + #define HTML_MAX_NAMELEN 1000 #define HTML_PARSER_BIG_BUFFER_SIZE 1000 #define HTML_PARSER_BUFFER_SIZE 100 @@ -1082,7 +1085,7 @@ static const char * const htmlStartClose[] = { "div", "p", "head", NULL, "noscript", "p", NULL, "center", "font", "b", "i", "p", "head", NULL, -"a", "a", NULL, +"a", "a", "head", NULL, "caption", "p", NULL, "colgroup", "caption", "colgroup", "col", "p", NULL, "col", "caption", "col", "p", NULL, @@ -1100,6 +1103,43 @@ static const char * const htmlStartClose[] = { "option", "option", NULL, "fieldset", "legend", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "listing", "xmp", "a", NULL, +/* most tags in in FONTSTYLE, PHRASE and SPECIAL should close */ +"tt", "head", NULL, +"i", "head", NULL, +"b", "head", NULL, +"u", "head", NULL, +"s", "head", NULL, +"strike", "head", NULL, +"big", "head", NULL, +"small", "head", NULL, + +"em", "head", NULL, +"strong", "head", NULL, +"dfn", "head", NULL, +"code", "head", NULL, +"samp", "head", NULL, +"kbd", "head", NULL, +"var", "head", NULL, +"cite", "head", NULL, +"abbr", "head", NULL, +"acronym", "head", NULL, + +/* "a" */ +"img", "head", NULL, +/* "applet" */ +/* "embed" */ +/* "object" */ +"font", "head", NULL, +/* "basefont" */ +"br", "head", NULL, +/* "script" */ +"map", "head", NULL, +"q", "head", NULL, +"sub", "head", NULL, +"sup", "head", NULL, +"span", "head", NULL, +"bdo", "head", NULL, +"iframe", "head", NULL, NULL }; @@ -2941,9 +2981,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) { */ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { - if (ctxt->sax->ignorableWhitespace != NULL) - ctxt->sax->ignorableWhitespace(ctxt->userData, - buf, nbchar); + if (ctxt->keepBlanks) { + if (ctxt->sax->characters != NULL) + ctxt->sax->characters(ctxt->userData, buf, nbchar); + } else { + if (ctxt->sax->ignorableWhitespace != NULL) + ctxt->sax->ignorableWhitespace(ctxt->userData, + buf, nbchar); + } } else { htmlCheckParagraph(ctxt); if (ctxt->sax->characters != NULL) @@ -2974,8 +3019,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) { */ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { - if (ctxt->sax->ignorableWhitespace != NULL) - ctxt->sax->ignorableWhitespace(ctxt->userData, buf, nbchar); + if (ctxt->keepBlanks) { + if (ctxt->sax->characters != NULL) + ctxt->sax->characters(ctxt->userData, buf, nbchar); + } else { + if (ctxt->sax->ignorableWhitespace != NULL) + ctxt->sax->ignorableWhitespace(ctxt->userData, + buf, nbchar); + } } else { htmlCheckParagraph(ctxt); if (ctxt->sax->characters != NULL) @@ -3509,19 +3560,14 @@ htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) { * convert as much as possible to the parser reading buffer. */ processed = ctxt->input->cur - ctxt->input->base; - xmlBufferShrink(ctxt->input->buf->buffer, processed); - nbchars = xmlCharEncInFunc(ctxt->input->buf->encoder, - ctxt->input->buf->buffer, - ctxt->input->buf->raw); + xmlBufShrink(ctxt->input->buf->buffer, processed); + nbchars = xmlCharEncInput(ctxt->input->buf, 1); if (nbchars < 0) { htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, "htmlCheckEncoding: encoder error\n", NULL, NULL); } - ctxt->input->base = - ctxt->input->cur = ctxt->input->buf->buffer->content; - ctxt->input->end = - &ctxt->input->base[ctxt->input->buf->buffer->use]; + xmlBufResetInput(ctxt->input->buf->buffer, ctxt->input); } } } @@ -4906,9 +4952,7 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) { input->filename = NULL; input->buf = buf; - input->base = input->buf->buffer->content; - input->cur = input->buf->buffer->content; - input->end = &input->buf->buffer->content[input->buf->buffer->use]; + xmlBufResetInput(buf->buffer, input); inputPush(ctxt, input); return(ctxt); @@ -5025,8 +5069,8 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, buf = in->base; len = in->length; } else { - buf = in->buf->buffer->content; - len = in->buf->buffer->use; + buf = xmlBufContent(in->buf->buffer); + len = xmlBufUse(in->buf->buffer); } /* take into account the sequence length */ @@ -5118,13 +5162,13 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, * @stop: Array of chars, which stop the lookup. * @stopLen: Length of stop-Array * - * Try to find if any char of the stop-Array is available in the input + * Try to find if any char of the stop-Array is available in the input * stream. * This function has a side effect of (possibly) incrementing ctxt->checkIndex * to avoid rescanning sequences of bytes, it DOES change the state of the * parser, do not use liberally. * - * Returns the index to the current parsing point if a stopChar + * Returns the index to the current parsing point if a stopChar * is available, -1 otherwise. */ static int @@ -5152,8 +5196,8 @@ htmlParseLookupChars(htmlParserCtxtPtr ctxt, const xmlChar * stop, buf = in->base; len = in->length; } else { - buf = in->buf->buffer->content; - len = in->buf->buffer->use; + buf = xmlBufContent(in->buf->buffer); + len = xmlBufUse(in->buf->buffer); } for (; base < len; base++) { @@ -5264,7 +5308,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); if ((avail == 0) && (terminate)) { htmlAutoCloseOnEnd(ctxt); if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) { @@ -5300,7 +5344,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); } if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, @@ -5342,7 +5386,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); /* * no chars in buffer */ @@ -5415,7 +5459,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); if (avail < 2) goto done; cur = in->cur[0]; @@ -5456,7 +5500,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); if (avail < 1) goto done; cur = in->cur[0]; @@ -5654,9 +5698,15 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((cur != '<') && (cur != '&')) { if (ctxt->sax != NULL) { if (IS_BLANK_CH(cur)) { - if (ctxt->sax->ignorableWhitespace != NULL) - ctxt->sax->ignorableWhitespace( - ctxt->userData, &cur, 1); + if (ctxt->keepBlanks) { + if (ctxt->sax->characters != NULL) + ctxt->sax->characters( + ctxt->userData, &cur, 1); + } else { + if (ctxt->sax->ignorableWhitespace != NULL) + ctxt->sax->ignorableWhitespace( + ctxt->userData, &cur, 1); + } } else { htmlCheckParagraph(ctxt); if (ctxt->sax->characters != NULL) @@ -5979,8 +6029,8 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, } if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) { - int base = ctxt->input->base - ctxt->input->buf->buffer->content; - int cur = ctxt->input->cur - ctxt->input->base; + size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input); + size_t cur = ctxt->input->cur - ctxt->input->base; int res; res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk); @@ -5989,10 +6039,7 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, ctxt->disableSAX = 1; return (XML_PARSER_EOF); } - ctxt->input->base = ctxt->input->buf->buffer->content + base; - ctxt->input->cur = ctxt->input->base + cur; - ctxt->input->end = - &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use]; + xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur); #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size); #endif @@ -6007,13 +6054,16 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, if ((in->encoder != NULL) && (in->buffer != NULL) && (in->raw != NULL)) { int nbchars; + size_t base = xmlBufGetInputBase(in->buffer, ctxt->input); + size_t current = ctxt->input->cur - ctxt->input->base; - nbchars = xmlCharEncInFunc(in->encoder, in->buffer, in->raw); + nbchars = xmlCharEncInput(in, terminate); if (nbchars < 0) { htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, "encoder error\n", NULL, NULL); return(XML_ERR_INVALID_ENCODING); } + xmlBufSetInputBaseCur(in->buffer, ctxt->input, base, current); } } } @@ -6107,24 +6157,18 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, inputStream->filename = (char *) xmlCanonicPath((const xmlChar *) filename); inputStream->buf = buf; - inputStream->base = inputStream->buf->buffer->content; - inputStream->cur = inputStream->buf->buffer->content; - inputStream->end = - &inputStream->buf->buffer->content[inputStream->buf->buffer->use]; + xmlBufResetInput(buf->buffer, inputStream); inputPush(ctxt, inputStream); if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && (ctxt->input->buf != NULL)) { - int base = ctxt->input->base - ctxt->input->buf->buffer->content; - int cur = ctxt->input->cur - ctxt->input->base; + size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input); + size_t cur = ctxt->input->cur - ctxt->input->base; xmlParserInputBufferPush(ctxt->input->buf, size, chunk); - ctxt->input->base = ctxt->input->buf->buffer->content + base; - ctxt->input->cur = ctxt->input->base + cur; - ctxt->input->end = - &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use]; + xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur); #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size); #endif diff --git a/HTMLtree.c b/HTMLtree.c index 5d0893b..4d8e354 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -30,16 +30,18 @@ #include #include +#include "buf.h" + /************************************************************************ * * - * Getting/Setting encoding meta tags * + * Getting/Setting encoding meta tags * * * ************************************************************************/ /** * htmlGetMetaEncoding: * @doc: the document - * + * * Encoding definition lookup in the Meta tags * * Returns the current encoding as flagged in the HTML source @@ -126,17 +128,17 @@ found_meta: found_content: encoding = xmlStrstr(content, BAD_CAST"charset="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"Charset="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"CHARSET="); if (encoding != NULL) { encoding += 8; } else { encoding = xmlStrstr(content, BAD_CAST"charset ="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"Charset ="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"CHARSET ="); if (encoding != NULL) encoding += 9; @@ -314,7 +316,7 @@ static const char* htmlBooleanAttrs[] = { * @name: the name of the attribute to check * * Determine if a given attribute is a boolean attribute. - * + * * returns: false if the attribute is not boolean, true otherwise. */ int @@ -338,7 +340,7 @@ xmlOutputBufferPtr xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder); /************************************************************************ * * - * Output error handlers * + * Output error handlers * * * ************************************************************************/ /** @@ -387,17 +389,13 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra) /************************************************************************ * * - * Dumping HTML tree content to a simple buffer * + * Dumping HTML tree content to a simple buffer * * * ************************************************************************/ -static int -htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, - int format); - /** - * htmlNodeDumpFormat: - * @buf: the HTML buffer output + * htmlBufNodeDumpFormat: + * @buf: the xmlBufPtr output * @doc: the document * @cur: the current node * @format: should formatting spaces been added @@ -406,10 +404,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, * * Returns the number of byte written or -1 in case of error */ -static int -htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, +static size_t +htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, int format) { - unsigned int use; + size_t use; int ret; xmlOutputBufferPtr outbuf; @@ -432,10 +430,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, outbuf->context = NULL; outbuf->written = 0; - use = buf->use; + use = xmlBufUse(buf); htmlNodeDumpFormatOutput(outbuf, doc, cur, NULL, format); xmlFree(outbuf); - ret = buf->use - use; + ret = xmlBufUse(buf) - use; return (ret); } @@ -452,9 +450,24 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, */ int htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { + xmlBufPtr buffer; + size_t ret; + + if ((buf == NULL) || (cur == NULL)) + return(-1); + xmlInitParser(); + buffer = xmlBufFromBuffer(buf); + if (buffer == NULL) + return(-1); + + ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1); + + xmlBufBackToBuffer(buffer); - return(htmlNodeDumpFormat(buf, doc, cur, 1)); + if (ret > INT_MAX) + return(-1); + return((int) ret); } /** @@ -499,7 +512,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc, if (handler == NULL) handler = xmlFindCharEncodingHandler("ascii"); - /* + /* * save the content to a temp buffer. */ buf = xmlOutputBufferCreateFile(out, handler); @@ -595,11 +608,11 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { xmlOutputBufferFlush(buf); if (buf->conv != NULL) { - *size = buf->conv->use; - *mem = xmlStrndup(buf->conv->content, *size); + *size = xmlBufUse(buf->conv); + *mem = xmlStrndup(xmlBufContent(buf->conv), *size); } else { - *size = buf->buffer->use; - *mem = xmlStrndup(buf->buffer->content, *size); + *size = xmlBufUse(buf->buffer); + *mem = xmlStrndup(xmlBufContent(buf->buffer), *size); } (void)xmlOutputBufferClose(buf); } @@ -621,7 +634,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { /************************************************************************ * * - * Dumping HTML tree content to an I/O output buffer * + * Dumping HTML tree content to an I/O output buffer * * * ************************************************************************/ @@ -632,7 +645,7 @@ void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur); * @buf: the HTML buffer output * @doc: the document * @encoding: the encoding string - * + * * TODO: check whether encoding is needed * * Dump the HTML document DTD, if any. @@ -650,14 +663,14 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlOutputBufferWriteString(buf, (const char *)cur->name); if (cur->ExternalID != NULL) { xmlOutputBufferWriteString(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf->buffer, cur->ExternalID); + xmlBufWriteQuotedString(buf->buffer, cur->ExternalID); if (cur->SystemID != NULL) { xmlOutputBufferWriteString(buf, " "); - xmlBufferWriteQuotedString(buf->buffer, cur->SystemID); - } + xmlBufWriteQuotedString(buf->buffer, cur->SystemID); + } } else if (cur->SystemID != NULL) { xmlOutputBufferWriteString(buf, " SYSTEM "); - xmlBufferWriteQuotedString(buf->buffer, cur->SystemID); + xmlBufWriteQuotedString(buf->buffer, cur->SystemID); } xmlOutputBufferWriteString(buf, ">\n"); } @@ -677,9 +690,10 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, xmlChar *value; /* - * TODO: The html output method should not escape a & character - * occurring in an attribute value immediately followed by - * a { character (see Section B.7.1 of the HTML 4.0 Recommendation). + * The html output method should not escape a & character + * occurring in an attribute value immediately followed by + * a { character (see Section B.7.1 of the HTML 4.0 Recommendation). + * This is implemented in xmlEncodeEntitiesReentrant */ if (cur == NULL) { @@ -707,15 +721,19 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, while (IS_BLANK_CH(*tmp)) tmp++; - escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+"); + /* + * the < and > have already been escaped at the entity level + * And doing so here breaks server side includes + */ + escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>"); if (escaped != NULL) { - xmlBufferWriteQuotedString(buf->buffer, escaped); + xmlBufWriteQuotedString(buf->buffer, escaped); xmlFree(escaped); } else { - xmlBufferWriteQuotedString(buf->buffer, value); + xmlBufWriteQuotedString(buf->buffer, value); } } else { - xmlBufferWriteQuotedString(buf->buffer, value); + xmlBufWriteQuotedString(buf->buffer, value); } xmlFree(value); } else { @@ -1105,7 +1123,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { if ((cur == NULL) || (filename == NULL)) return(-1); - + xmlInitParser(); encoding = (const char *) htmlGetMetaEncoding(cur); @@ -1136,7 +1154,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { if (handler == NULL) handler = xmlFindCharEncodingHandler("ascii"); - /* + /* * save the content to a temp buffer. */ buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); @@ -1156,7 +1174,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { * @encoding: the document encoding * * Dump an HTML document to a file using a given encoding. - * + * * returns: the number of byte written or -1 in case of failure. */ int @@ -1200,7 +1218,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur, if (handler == NULL) handler = xmlFindCharEncodingHandler("ascii"); - /* + /* * save the content to a temp buffer. */ buf = xmlOutputBufferCreateFilename(filename, handler, 0); @@ -1220,7 +1238,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur, * * Dump an HTML document to a file using a given encoding * and formatting returns/spaces are added. - * + * * returns: the number of byte written or -1 in case of failure. */ int diff --git a/INSTALL b/INSTALL index 7d1c323..a1e89e1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended diff --git a/Makefile.am b/Makefile.am index f82cefa..a4a9f87 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,23 +2,25 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ +SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR) DIST_SUBDIRS = include . doc example python xstc -INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ @LZMA_CFLAGS@ +AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include + +AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS) noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \ testThreads testC14N testAutomata testRegexp \ testReader testapi testModule runtest runsuite testchar \ - testdict runxmlconf testrecurse + testdict runxmlconf testrecurse testlimits bin_PROGRAMS = xmllint xmlcatalog bin_SCRIPTS=xml2-config lib_LTLIBRARIES = libxml2.la -libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ +libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) if USE_VERSION_SCRIPT LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms @@ -26,35 +28,37 @@ else LIBXML2_VERSION_SCRIPT = endif -libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ - $(LIBXML2_VERSION_SCRIPT) \ - -version-info @LIBXML_VERSION_INFO@ \ - @MODULE_PLATFORM_LIBS@ +libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ + $(LIBXML2_VERSION_SCRIPT) \ + -version-info $(LIBXML_VERSION_INFO) \ + $(MODULE_PLATFORM_LIBS) + +if WITH_SAX1_SOURCES +docb_sources = DOCBparser.c +else +docb_sources = +endif if WITH_TRIO_SOURCES -libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ - parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ - valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ - xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ - catalog.c globals.c threads.c c14n.c xmlstring.c \ - xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ - triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \ - xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ - xmlmodule.c schematron.c xzlib.c +trio_sources = triostr.c trio.c else +trio_sources = +endif + libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ - xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ - catalog.c globals.c threads.c c14n.c xmlstring.c \ + xpointer.c xinclude.c nanohttp.c nanoftp.c \ + $(docb_sources) \ + catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ + $(trio_sources) \ xmlreader.c relaxng.c dict.c SAX2.c \ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ xmlmodule.c schematron.c xzlib.c -endif DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ +LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) man_MANS = xml2-config.1 libxml.3 @@ -65,32 +69,37 @@ m4data_DATA = libxml.m4 runtest_SOURCES=runtest.c runtest_LDFLAGS = runtest_DEPENDENCIES = $(DEPS) -runtest_LDADD= @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +runtest_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testrecurse_SOURCES=testrecurse.c testrecurse_LDFLAGS = testrecurse_DEPENDENCIES = $(DEPS) -testrecurse_LDADD= @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +testrecurse_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) + +testlimits_SOURCES=testlimits.c +testlimits_LDFLAGS = +testlimits_DEPENDENCIES = $(DEPS) +testlimits_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testchar_SOURCES=testchar.c testchar_LDFLAGS = testchar_DEPENDENCIES = $(DEPS) -testchar_LDADD= @RDL_LIBS@ $(LDADDS) +testchar_LDADD= $(RDL_LIBS) $(LDADDS) testdict_SOURCES=testdict.c testdict_LDFLAGS = testdict_DEPENDENCIES = $(DEPS) -testdict_LDADD= @RDL_LIBS@ $(LDADDS) +testdict_LDADD= $(RDL_LIBS) $(LDADDS) runsuite_SOURCES=runsuite.c runsuite_LDFLAGS = runsuite_DEPENDENCIES = $(DEPS) -runsuite_LDADD= @RDL_LIBS@ $(LDADDS) +runsuite_LDADD= $(RDL_LIBS) $(LDADDS) xmllint_SOURCES=xmllint.c xmllint_LDFLAGS = xmllint_DEPENDENCIES = $(DEPS) -xmllint_LDADD= @RDL_LIBS@ $(LDADDS) +xmllint_LDADD= $(RDL_LIBS) $(LDADDS) testSAX_SOURCES=testSAX.c testSAX_LDFLAGS = @@ -105,7 +114,7 @@ testHTML_LDADD= $(LDADDS) xmlcatalog_SOURCES=xmlcatalog.c xmlcatalog_LDFLAGS = xmlcatalog_DEPENDENCIES = $(DEPS) -xmlcatalog_LDADD= @RDL_LIBS@ $(LDADDS) +xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS) testXPath_SOURCES=testXPath.c testXPath_LDFLAGS = @@ -117,10 +126,14 @@ testC14N_LDFLAGS = testC14N_DEPENDENCIES = $(DEPS) testC14N_LDADD= $(LDADDS) -testThreads_SOURCES=testThreads@THREADS_W32@.c +if THREADS_W32 +testThreads_SOURCES = testThreadsWin32.c +else +testThreads_SOURCES = testThreads.c +endif testThreads_LDFLAGS = testThreads_DEPENDENCIES = $(DEPS) -testThreads_LDADD= @BASE_THREAD_LIBS@ $(LDADDS) +testThreads_LDADD= $(BASE_THREAD_LIBS) $(LDADDS) testURI_SOURCES=testURI.c testURI_LDFLAGS = @@ -172,6 +185,8 @@ testapi.c: $(srcdir)/gentest.py -@(if [ "$(PYTHON)" != "" ] ; then \ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) +BUILT_SOURCES = testapi.c + testapi_SOURCES=testapi.c testapi_LDFLAGS = testapi_DEPENDENCIES = $(DEPS) @@ -188,28 +203,25 @@ runxmlconf_LDADD= $(LDADDS) #testOOM_LDADD= $(LDADDS) runtests: + [ -d test ] || $(LN_S) $(srcdir)/test . + [ -d result ] || $(LN_S) $(srcdir)/result . $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT) - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) check: all runtests -check-valgrind: all +check-valgrind valgrind: all @echo '## Running the regression tests under Valgrind' @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' check + $(MAKE) CHECKER='valgrind -q' runtests testall : tests SVGtests SAXtests -tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_SCHEMATRON@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) - @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests) - -valgrind: - @echo '## Running the regression tests under Valgrind' - @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' tests +tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) + @(cd doc/examples ; $(MAKE) tests) APItests: testapi$(EXEEXT) @echo "## Running the API regression tests this may take a little while" @@ -1115,7 +1127,7 @@ SchemasPythonTests: echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) - @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) + @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi) Patterntests: xmllint$(EXEEXT) @(echo > .memdump) @@ -1147,8 +1159,8 @@ ModuleTests: testModule$(EXEEXT) testdso.la cleanup: -@(find . -name .\#\* -exec rm {} \;) - -@(find . -name \*.gcda -o *.gcno -exec rm {} \;) - -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm {} \;) + -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;) + -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;) dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) @@ -1183,7 +1195,8 @@ xml2Conf.sh: xml2Conf.sh.in Makefile < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \ && mv xml2Conf.tmp xml2Conf.sh -CLEANFILES=xml2Conf.sh *.gcda *.gcno +CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res +DISTCLEANFILES = COPYING missing.lst confexecdir=$(libdir) confexec_DATA = xml2Conf.sh @@ -1195,10 +1208,10 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ example/Makefile.am example/gjobread.c example/gjobs.xml \ $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \ trionan.c trionan.h triostr.c triostr.h trio.c trio.h \ - triop.h triodef.h libxml.h elfgcchack.h xzlib.h \ - testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ + triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \ + enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ dbgen.pl dbgenattr.pl regressions.py regressions.xml \ - README.tests Makefile.tests libxml2.syms \ + README.tests Makefile.tests libxml2.syms timsort.h \ $(CVS_EXTRA_DIST) @@ -1213,13 +1226,13 @@ DOC_MODULE=libxml2-$(VERSION) EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples install-data-local: - @MKDIR_P@ $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - @MKDIR_P@ $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) + $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) uninstall-local: rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c diff --git a/Makefile.in b/Makefile.in index 6e88cc9..bde07d3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -19,6 +19,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -43,7 +60,7 @@ noinst_PROGRAMS = testSchemas$(EXEEXT) testRelax$(EXEEXT) \ testAutomata$(EXEEXT) testRegexp$(EXEEXT) testReader$(EXEEXT) \ testapi$(EXEEXT) testModule$(EXEEXT) runtest$(EXEEXT) \ runsuite$(EXEEXT) testchar$(EXEEXT) testdict$(EXEEXT) \ - runxmlconf$(EXEEXT) testrecurse$(EXEEXT) + runxmlconf$(EXEEXT) testrecurse$(EXEEXT) testlimits$(EXEEXT) bin_PROGRAMS = xmllint$(EXEEXT) xmlcatalog$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ @@ -88,57 +105,46 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(confexecdir)" \ "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__libxml2_la_SOURCES_DIST = SAX.c entities.c encoding.c error.c \ parserInternals.c parser.c tree.c hash.c list.c xmlIO.c \ xmlmemory.c uri.c valid.c xlink.c HTMLparser.c HTMLtree.c \ debugXML.c xpath.c xpointer.c xinclude.c nanohttp.c nanoftp.c \ DOCBparser.c catalog.c globals.c threads.c c14n.c xmlstring.c \ - xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ - xmlreader.c relaxng.c dict.c SAX2.c xmlwriter.c legacy.c \ - chvalid.c pattern.c xmlsave.c xmlmodule.c schematron.c xzlib.c \ - triostr.c trio.c -@WITH_TRIO_SOURCES_FALSE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \ -@WITH_TRIO_SOURCES_FALSE@ encoding.lo error.lo \ -@WITH_TRIO_SOURCES_FALSE@ parserInternals.lo parser.lo tree.lo \ -@WITH_TRIO_SOURCES_FALSE@ hash.lo list.lo xmlIO.lo xmlmemory.lo \ -@WITH_TRIO_SOURCES_FALSE@ uri.lo valid.lo xlink.lo \ -@WITH_TRIO_SOURCES_FALSE@ HTMLparser.lo HTMLtree.lo debugXML.lo \ -@WITH_TRIO_SOURCES_FALSE@ xpath.lo xpointer.lo xinclude.lo \ -@WITH_TRIO_SOURCES_FALSE@ nanohttp.lo nanoftp.lo DOCBparser.lo \ -@WITH_TRIO_SOURCES_FALSE@ catalog.lo globals.lo threads.lo \ -@WITH_TRIO_SOURCES_FALSE@ c14n.lo xmlstring.lo xmlregexp.lo \ -@WITH_TRIO_SOURCES_FALSE@ xmlschemas.lo xmlschemastypes.lo \ -@WITH_TRIO_SOURCES_FALSE@ xmlunicode.lo xmlreader.lo relaxng.lo \ -@WITH_TRIO_SOURCES_FALSE@ dict.lo SAX2.lo xmlwriter.lo \ -@WITH_TRIO_SOURCES_FALSE@ legacy.lo chvalid.lo pattern.lo \ -@WITH_TRIO_SOURCES_FALSE@ xmlsave.lo xmlmodule.lo schematron.lo \ -@WITH_TRIO_SOURCES_FALSE@ xzlib.lo -@WITH_TRIO_SOURCES_TRUE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \ -@WITH_TRIO_SOURCES_TRUE@ encoding.lo error.lo \ -@WITH_TRIO_SOURCES_TRUE@ parserInternals.lo parser.lo tree.lo \ -@WITH_TRIO_SOURCES_TRUE@ hash.lo list.lo xmlIO.lo xmlmemory.lo \ -@WITH_TRIO_SOURCES_TRUE@ uri.lo valid.lo xlink.lo HTMLparser.lo \ -@WITH_TRIO_SOURCES_TRUE@ HTMLtree.lo debugXML.lo xpath.lo \ -@WITH_TRIO_SOURCES_TRUE@ xpointer.lo xinclude.lo nanohttp.lo \ -@WITH_TRIO_SOURCES_TRUE@ nanoftp.lo DOCBparser.lo catalog.lo \ -@WITH_TRIO_SOURCES_TRUE@ globals.lo threads.lo c14n.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlstring.lo xmlregexp.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlschemas.lo xmlschemastypes.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlunicode.lo triostr.lo trio.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlreader.lo relaxng.lo dict.lo \ -@WITH_TRIO_SOURCES_TRUE@ SAX2.lo xmlwriter.lo legacy.lo \ -@WITH_TRIO_SOURCES_TRUE@ chvalid.lo pattern.lo xmlsave.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlmodule.lo schematron.lo xzlib.lo + buf.c xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ + triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \ + xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c xmlmodule.c \ + schematron.c xzlib.c +@WITH_SAX1_SOURCES_TRUE@am__objects_1 = DOCBparser.lo +@WITH_TRIO_SOURCES_TRUE@am__objects_2 = triostr.lo trio.lo +am_libxml2_la_OBJECTS = SAX.lo entities.lo encoding.lo error.lo \ + parserInternals.lo parser.lo tree.lo hash.lo list.lo xmlIO.lo \ + xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo \ + HTMLtree.lo debugXML.lo xpath.lo xpointer.lo xinclude.lo \ + nanohttp.lo nanoftp.lo $(am__objects_1) catalog.lo globals.lo \ + threads.lo c14n.lo xmlstring.lo buf.lo xmlregexp.lo \ + xmlschemas.lo xmlschemastypes.lo xmlunicode.lo \ + $(am__objects_2) xmlreader.lo relaxng.lo dict.lo SAX2.lo \ + xmlwriter.lo legacy.lo chvalid.lo pattern.lo xmlsave.lo \ + xmlmodule.lo schematron.lo xzlib.lo libxml2_la_OBJECTS = $(am_libxml2_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libxml2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -152,7 +158,10 @@ testdso_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_runsuite_OBJECTS = runsuite.$(OBJEXT) runsuite_OBJECTS = $(am_runsuite_OBJECTS) -am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(top_builddir)/libxml2.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) runsuite_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(runsuite_LDFLAGS) $(LDFLAGS) -o $@ @@ -211,7 +220,9 @@ testSchemas_OBJECTS = $(am_testSchemas_OBJECTS) testSchemas_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(testSchemas_LDFLAGS) $(LDFLAGS) -o $@ -am_testThreads_OBJECTS = testThreads@THREADS_W32@.$(OBJEXT) +am__testThreads_SOURCES_DIST = testThreads.c testThreadsWin32.c +@THREADS_W32_FALSE@am_testThreads_OBJECTS = testThreads.$(OBJEXT) +@THREADS_W32_TRUE@am_testThreads_OBJECTS = testThreadsWin32.$(OBJEXT) testThreads_OBJECTS = $(am_testThreads_OBJECTS) testThreads_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -241,6 +252,11 @@ testdict_OBJECTS = $(am_testdict_OBJECTS) testdict_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(testdict_LDFLAGS) $(LDFLAGS) -o $@ +am_testlimits_OBJECTS = testlimits.$(OBJEXT) +testlimits_OBJECTS = $(am_testlimits_OBJECTS) +testlimits_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(testlimits_LDFLAGS) $(LDFLAGS) -o $@ am_testrecurse_OBJECTS = testrecurse.$(OBJEXT) testrecurse_OBJECTS = $(am_testrecurse_OBJECTS) testrecurse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -267,21 +283,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libxml2_la_SOURCES) $(testdso_la_SOURCES) \ $(runsuite_SOURCES) $(runtest_SOURCES) $(runxmlconf_SOURCES) \ @@ -291,16 +307,17 @@ SOURCES = $(libxml2_la_SOURCES) $(testdso_la_SOURCES) \ $(testRelax_SOURCES) $(testSAX_SOURCES) $(testSchemas_SOURCES) \ $(testThreads_SOURCES) $(testURI_SOURCES) $(testXPath_SOURCES) \ $(testapi_SOURCES) $(testchar_SOURCES) $(testdict_SOURCES) \ - $(testrecurse_SOURCES) $(xmlcatalog_SOURCES) \ - $(xmllint_SOURCES) + $(testlimits_SOURCES) $(testrecurse_SOURCES) \ + $(xmlcatalog_SOURCES) $(xmllint_SOURCES) DIST_SOURCES = $(am__libxml2_la_SOURCES_DIST) $(testdso_la_SOURCES) \ $(runsuite_SOURCES) $(runtest_SOURCES) $(runxmlconf_SOURCES) \ $(testAutomata_SOURCES) $(testC14N_SOURCES) \ $(testHTML_SOURCES) $(testModule_SOURCES) \ $(testReader_SOURCES) $(testRegexp_SOURCES) \ $(testRelax_SOURCES) $(testSAX_SOURCES) $(testSchemas_SOURCES) \ - $(testThreads_SOURCES) $(testURI_SOURCES) $(testXPath_SOURCES) \ - $(testapi_SOURCES) $(testchar_SOURCES) $(testdict_SOURCES) \ + $(am__testThreads_SOURCES_DIST) $(testURI_SOURCES) \ + $(testXPath_SOURCES) $(testapi_SOURCES) $(testchar_SOURCES) \ + $(testdict_SOURCES) $(testlimits_SOURCES) \ $(testrecurse_SOURCES) $(xmlcatalog_SOURCES) \ $(xmllint_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -310,6 +327,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man1dir = $(mandir)/man1 man3dir = $(mandir)/man3 NROFF = nroff @@ -326,9 +348,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -357,12 +381,13 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -399,6 +424,7 @@ HTML_DIR = @HTML_DIR@ HTML_OBJ = @HTML_OBJ@ HTTP_OBJ = @HTTP_OBJ@ ICONV_LIBS = @ICONV_LIBS@ +ICU_LIBS = @ICU_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -454,7 +480,6 @@ RANLIB = @RANLIB@ RDL_LIBS = @RDL_LIBS@ READER_TEST = @READER_TEST@ RELDATE = @RELDATE@ -RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -479,7 +504,6 @@ TEST_VTIME = @TEST_VTIME@ TEST_XINCLUDE = @TEST_XINCLUDE@ TEST_XPATH = @TEST_XPATH@ TEST_XPTR = @TEST_XPTR@ -THREADS_W32 = @THREADS_W32@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ VERSION = @VERSION@ @@ -512,6 +536,7 @@ WITH_SAX1 = @WITH_SAX1@ WITH_SCHEMAS = @WITH_SCHEMAS@ WITH_SCHEMATRON = @WITH_SCHEMATRON@ WITH_THREADS = @WITH_THREADS@ +WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@ WITH_TREE = @WITH_TREE@ WITH_TRIO = @WITH_TRIO@ WITH_VALID = @WITH_VALID@ @@ -586,68 +611,69 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ +SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR) DIST_SUBDIRS = include . doc example python xstc -INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ @LZMA_CFLAGS@ +AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include +AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS) bin_SCRIPTS = xml2-config lib_LTLIBRARIES = libxml2.la -libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ +libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) @USE_VERSION_SCRIPT_FALSE@LIBXML2_VERSION_SCRIPT = @USE_VERSION_SCRIPT_TRUE@LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms -libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ - $(LIBXML2_VERSION_SCRIPT) \ - -version-info @LIBXML_VERSION_INFO@ \ - @MODULE_PLATFORM_LIBS@ - -@WITH_TRIO_SOURCES_FALSE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ -@WITH_TRIO_SOURCES_FALSE@ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ -@WITH_TRIO_SOURCES_FALSE@ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ -@WITH_TRIO_SOURCES_FALSE@ xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ -@WITH_TRIO_SOURCES_FALSE@ catalog.c globals.c threads.c c14n.c xmlstring.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlreader.c relaxng.c dict.c SAX2.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlmodule.c schematron.c xzlib.c - -@WITH_TRIO_SOURCES_TRUE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ -@WITH_TRIO_SOURCES_TRUE@ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ -@WITH_TRIO_SOURCES_TRUE@ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ -@WITH_TRIO_SOURCES_TRUE@ xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ -@WITH_TRIO_SOURCES_TRUE@ catalog.c globals.c threads.c c14n.c xmlstring.c \ -@WITH_TRIO_SOURCES_TRUE@ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ -@WITH_TRIO_SOURCES_TRUE@ triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \ -@WITH_TRIO_SOURCES_TRUE@ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ -@WITH_TRIO_SOURCES_TRUE@ xmlmodule.c schematron.c xzlib.c +libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ + $(LIBXML2_VERSION_SCRIPT) \ + -version-info $(LIBXML_VERSION_INFO) \ + $(MODULE_PLATFORM_LIBS) + +@WITH_SAX1_SOURCES_FALSE@docb_sources = +@WITH_SAX1_SOURCES_TRUE@docb_sources = DOCBparser.c +@WITH_TRIO_SOURCES_FALSE@trio_sources = +@WITH_TRIO_SOURCES_TRUE@trio_sources = triostr.c trio.c +libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ + parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ + valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ + xpointer.c xinclude.c nanohttp.c nanoftp.c \ + $(docb_sources) \ + catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \ + xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ + $(trio_sources) \ + xmlreader.c relaxng.c dict.c SAX2.c \ + xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ + xmlmodule.c schematron.c xzlib.c DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ +LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) man_MANS = xml2-config.1 libxml.3 m4datadir = $(datadir)/aclocal m4data_DATA = libxml.m4 runtest_SOURCES = runtest.c runtest_LDFLAGS = runtest_DEPENDENCIES = $(DEPS) -runtest_LDADD = @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +runtest_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testrecurse_SOURCES = testrecurse.c testrecurse_LDFLAGS = testrecurse_DEPENDENCIES = $(DEPS) -testrecurse_LDADD = @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +testrecurse_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) +testlimits_SOURCES = testlimits.c +testlimits_LDFLAGS = +testlimits_DEPENDENCIES = $(DEPS) +testlimits_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testchar_SOURCES = testchar.c testchar_LDFLAGS = testchar_DEPENDENCIES = $(DEPS) -testchar_LDADD = @RDL_LIBS@ $(LDADDS) +testchar_LDADD = $(RDL_LIBS) $(LDADDS) testdict_SOURCES = testdict.c testdict_LDFLAGS = testdict_DEPENDENCIES = $(DEPS) -testdict_LDADD = @RDL_LIBS@ $(LDADDS) +testdict_LDADD = $(RDL_LIBS) $(LDADDS) runsuite_SOURCES = runsuite.c runsuite_LDFLAGS = runsuite_DEPENDENCIES = $(DEPS) -runsuite_LDADD = @RDL_LIBS@ $(LDADDS) +runsuite_LDADD = $(RDL_LIBS) $(LDADDS) xmllint_SOURCES = xmllint.c xmllint_LDFLAGS = xmllint_DEPENDENCIES = $(DEPS) -xmllint_LDADD = @RDL_LIBS@ $(LDADDS) +xmllint_LDADD = $(RDL_LIBS) $(LDADDS) testSAX_SOURCES = testSAX.c testSAX_LDFLAGS = testSAX_DEPENDENCIES = $(DEPS) @@ -659,7 +685,7 @@ testHTML_LDADD = $(LDADDS) xmlcatalog_SOURCES = xmlcatalog.c xmlcatalog_LDFLAGS = xmlcatalog_DEPENDENCIES = $(DEPS) -xmlcatalog_LDADD = @RDL_LIBS@ $(LDADDS) +xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS) testXPath_SOURCES = testXPath.c testXPath_LDFLAGS = testXPath_DEPENDENCIES = $(DEPS) @@ -668,10 +694,11 @@ testC14N_SOURCES = testC14N.c testC14N_LDFLAGS = testC14N_DEPENDENCIES = $(DEPS) testC14N_LDADD = $(LDADDS) -testThreads_SOURCES = testThreads@THREADS_W32@.c +@THREADS_W32_FALSE@testThreads_SOURCES = testThreads.c +@THREADS_W32_TRUE@testThreads_SOURCES = testThreadsWin32.c testThreads_LDFLAGS = testThreads_DEPENDENCIES = $(DEPS) -testThreads_LDADD = @BASE_THREAD_LIBS@ $(LDADDS) +testThreads_LDADD = $(BASE_THREAD_LIBS) $(LDADDS) testURI_SOURCES = testURI.c testURI_LDFLAGS = testURI_DEPENDENCIES = $(DEPS) @@ -703,6 +730,7 @@ testModule_LDADD = $(LDADDS) noinst_LTLIBRARIES = testdso.la testdso_la_SOURCES = testdso.c testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir) +BUILT_SOURCES = testapi.c testapi_SOURCES = testapi.c testapi_LDFLAGS = testapi_DEPENDENCIES = $(DEPS) @@ -711,7 +739,8 @@ runxmlconf_SOURCES = runxmlconf.c runxmlconf_LDFLAGS = runxmlconf_DEPENDENCIES = $(DEPS) runxmlconf_LDADD = $(LDADDS) -CLEANFILES = xml2Conf.sh *.gcda *.gcno +CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res +DISTCLEANFILES = COPYING missing.lst confexecdir = $(libdir) confexec_DATA = xml2Conf.sh CVS_EXTRA_DIST = @@ -722,10 +751,10 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ example/Makefile.am example/gjobread.c example/gjobs.xml \ $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \ trionan.c trionan.h triostr.c triostr.h trio.c trio.h \ - triop.h triodef.h libxml.h elfgcchack.h xzlib.h \ - testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ + triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \ + enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ dbgen.pl dbgenattr.pl regressions.py regressions.xml \ - README.tests Makefile.tests libxml2.syms \ + README.tests Makefile.tests libxml2.syms timsort.h \ $(CVS_EXTRA_DIST) pkgconfigdir = $(libdir)/pkgconfig @@ -744,12 +773,12 @@ EXAMPLES_DIR = $(BASE_DIR)/$(DOC_MODULE)/examples # LCOV = /usr/bin/lcov GENHTML = /usr/bin/genhtml -all: config.h +all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -785,10 +814,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -810,7 +837,6 @@ libxml-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/libxml-2.0-un cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -818,6 +844,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -848,14 +876,17 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) +libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES) $(AM_V_CCLD)$(libxml2_la_LINK) -rpath $(libdir) $(libxml2_la_OBJECTS) $(libxml2_la_LIBADD) $(LIBS) -testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) +testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) $(EXTRA_testdso_la_DEPENDENCIES) $(AM_V_CCLD)$(testdso_la_LINK) $(testdso_la_OBJECTS) $(testdso_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -904,73 +935,79 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -runsuite$(EXEEXT): $(runsuite_OBJECTS) $(runsuite_DEPENDENCIES) +runsuite$(EXEEXT): $(runsuite_OBJECTS) $(runsuite_DEPENDENCIES) $(EXTRA_runsuite_DEPENDENCIES) @rm -f runsuite$(EXEEXT) $(AM_V_CCLD)$(runsuite_LINK) $(runsuite_OBJECTS) $(runsuite_LDADD) $(LIBS) -runtest$(EXEEXT): $(runtest_OBJECTS) $(runtest_DEPENDENCIES) +runtest$(EXEEXT): $(runtest_OBJECTS) $(runtest_DEPENDENCIES) $(EXTRA_runtest_DEPENDENCIES) @rm -f runtest$(EXEEXT) $(AM_V_CCLD)$(runtest_LINK) $(runtest_OBJECTS) $(runtest_LDADD) $(LIBS) -runxmlconf$(EXEEXT): $(runxmlconf_OBJECTS) $(runxmlconf_DEPENDENCIES) +runxmlconf$(EXEEXT): $(runxmlconf_OBJECTS) $(runxmlconf_DEPENDENCIES) $(EXTRA_runxmlconf_DEPENDENCIES) @rm -f runxmlconf$(EXEEXT) $(AM_V_CCLD)$(runxmlconf_LINK) $(runxmlconf_OBJECTS) $(runxmlconf_LDADD) $(LIBS) -testAutomata$(EXEEXT): $(testAutomata_OBJECTS) $(testAutomata_DEPENDENCIES) +testAutomata$(EXEEXT): $(testAutomata_OBJECTS) $(testAutomata_DEPENDENCIES) $(EXTRA_testAutomata_DEPENDENCIES) @rm -f testAutomata$(EXEEXT) $(AM_V_CCLD)$(testAutomata_LINK) $(testAutomata_OBJECTS) $(testAutomata_LDADD) $(LIBS) -testC14N$(EXEEXT): $(testC14N_OBJECTS) $(testC14N_DEPENDENCIES) +testC14N$(EXEEXT): $(testC14N_OBJECTS) $(testC14N_DEPENDENCIES) $(EXTRA_testC14N_DEPENDENCIES) @rm -f testC14N$(EXEEXT) $(AM_V_CCLD)$(testC14N_LINK) $(testC14N_OBJECTS) $(testC14N_LDADD) $(LIBS) -testHTML$(EXEEXT): $(testHTML_OBJECTS) $(testHTML_DEPENDENCIES) +testHTML$(EXEEXT): $(testHTML_OBJECTS) $(testHTML_DEPENDENCIES) $(EXTRA_testHTML_DEPENDENCIES) @rm -f testHTML$(EXEEXT) $(AM_V_CCLD)$(testHTML_LINK) $(testHTML_OBJECTS) $(testHTML_LDADD) $(LIBS) -testModule$(EXEEXT): $(testModule_OBJECTS) $(testModule_DEPENDENCIES) +testModule$(EXEEXT): $(testModule_OBJECTS) $(testModule_DEPENDENCIES) $(EXTRA_testModule_DEPENDENCIES) @rm -f testModule$(EXEEXT) $(AM_V_CCLD)$(testModule_LINK) $(testModule_OBJECTS) $(testModule_LDADD) $(LIBS) -testReader$(EXEEXT): $(testReader_OBJECTS) $(testReader_DEPENDENCIES) +testReader$(EXEEXT): $(testReader_OBJECTS) $(testReader_DEPENDENCIES) $(EXTRA_testReader_DEPENDENCIES) @rm -f testReader$(EXEEXT) $(AM_V_CCLD)$(testReader_LINK) $(testReader_OBJECTS) $(testReader_LDADD) $(LIBS) -testRegexp$(EXEEXT): $(testRegexp_OBJECTS) $(testRegexp_DEPENDENCIES) +testRegexp$(EXEEXT): $(testRegexp_OBJECTS) $(testRegexp_DEPENDENCIES) $(EXTRA_testRegexp_DEPENDENCIES) @rm -f testRegexp$(EXEEXT) $(AM_V_CCLD)$(testRegexp_LINK) $(testRegexp_OBJECTS) $(testRegexp_LDADD) $(LIBS) -testRelax$(EXEEXT): $(testRelax_OBJECTS) $(testRelax_DEPENDENCIES) +testRelax$(EXEEXT): $(testRelax_OBJECTS) $(testRelax_DEPENDENCIES) $(EXTRA_testRelax_DEPENDENCIES) @rm -f testRelax$(EXEEXT) $(AM_V_CCLD)$(testRelax_LINK) $(testRelax_OBJECTS) $(testRelax_LDADD) $(LIBS) -testSAX$(EXEEXT): $(testSAX_OBJECTS) $(testSAX_DEPENDENCIES) +testSAX$(EXEEXT): $(testSAX_OBJECTS) $(testSAX_DEPENDENCIES) $(EXTRA_testSAX_DEPENDENCIES) @rm -f testSAX$(EXEEXT) $(AM_V_CCLD)$(testSAX_LINK) $(testSAX_OBJECTS) $(testSAX_LDADD) $(LIBS) -testSchemas$(EXEEXT): $(testSchemas_OBJECTS) $(testSchemas_DEPENDENCIES) +testSchemas$(EXEEXT): $(testSchemas_OBJECTS) $(testSchemas_DEPENDENCIES) $(EXTRA_testSchemas_DEPENDENCIES) @rm -f testSchemas$(EXEEXT) $(AM_V_CCLD)$(testSchemas_LINK) $(testSchemas_OBJECTS) $(testSchemas_LDADD) $(LIBS) -testThreads$(EXEEXT): $(testThreads_OBJECTS) $(testThreads_DEPENDENCIES) +testThreads$(EXEEXT): $(testThreads_OBJECTS) $(testThreads_DEPENDENCIES) $(EXTRA_testThreads_DEPENDENCIES) @rm -f testThreads$(EXEEXT) $(AM_V_CCLD)$(testThreads_LINK) $(testThreads_OBJECTS) $(testThreads_LDADD) $(LIBS) -testURI$(EXEEXT): $(testURI_OBJECTS) $(testURI_DEPENDENCIES) +testURI$(EXEEXT): $(testURI_OBJECTS) $(testURI_DEPENDENCIES) $(EXTRA_testURI_DEPENDENCIES) @rm -f testURI$(EXEEXT) $(AM_V_CCLD)$(testURI_LINK) $(testURI_OBJECTS) $(testURI_LDADD) $(LIBS) -testXPath$(EXEEXT): $(testXPath_OBJECTS) $(testXPath_DEPENDENCIES) +testXPath$(EXEEXT): $(testXPath_OBJECTS) $(testXPath_DEPENDENCIES) $(EXTRA_testXPath_DEPENDENCIES) @rm -f testXPath$(EXEEXT) $(AM_V_CCLD)$(testXPath_LINK) $(testXPath_OBJECTS) $(testXPath_LDADD) $(LIBS) -testapi$(EXEEXT): $(testapi_OBJECTS) $(testapi_DEPENDENCIES) +testapi$(EXEEXT): $(testapi_OBJECTS) $(testapi_DEPENDENCIES) $(EXTRA_testapi_DEPENDENCIES) @rm -f testapi$(EXEEXT) $(AM_V_CCLD)$(testapi_LINK) $(testapi_OBJECTS) $(testapi_LDADD) $(LIBS) -testchar$(EXEEXT): $(testchar_OBJECTS) $(testchar_DEPENDENCIES) +testchar$(EXEEXT): $(testchar_OBJECTS) $(testchar_DEPENDENCIES) $(EXTRA_testchar_DEPENDENCIES) @rm -f testchar$(EXEEXT) $(AM_V_CCLD)$(testchar_LINK) $(testchar_OBJECTS) $(testchar_LDADD) $(LIBS) -testdict$(EXEEXT): $(testdict_OBJECTS) $(testdict_DEPENDENCIES) +testdict$(EXEEXT): $(testdict_OBJECTS) $(testdict_DEPENDENCIES) $(EXTRA_testdict_DEPENDENCIES) @rm -f testdict$(EXEEXT) $(AM_V_CCLD)$(testdict_LINK) $(testdict_OBJECTS) $(testdict_LDADD) $(LIBS) -testrecurse$(EXEEXT): $(testrecurse_OBJECTS) $(testrecurse_DEPENDENCIES) +testlimits$(EXEEXT): $(testlimits_OBJECTS) $(testlimits_DEPENDENCIES) $(EXTRA_testlimits_DEPENDENCIES) + @rm -f testlimits$(EXEEXT) + $(AM_V_CCLD)$(testlimits_LINK) $(testlimits_OBJECTS) $(testlimits_LDADD) $(LIBS) +testrecurse$(EXEEXT): $(testrecurse_OBJECTS) $(testrecurse_DEPENDENCIES) $(EXTRA_testrecurse_DEPENDENCIES) @rm -f testrecurse$(EXEEXT) $(AM_V_CCLD)$(testrecurse_LINK) $(testrecurse_OBJECTS) $(testrecurse_LDADD) $(LIBS) -xmlcatalog$(EXEEXT): $(xmlcatalog_OBJECTS) $(xmlcatalog_DEPENDENCIES) +xmlcatalog$(EXEEXT): $(xmlcatalog_OBJECTS) $(xmlcatalog_DEPENDENCIES) $(EXTRA_xmlcatalog_DEPENDENCIES) @rm -f xmlcatalog$(EXEEXT) $(AM_V_CCLD)$(xmlcatalog_LINK) $(xmlcatalog_OBJECTS) $(xmlcatalog_LDADD) $(LIBS) -xmllint$(EXEEXT): $(xmllint_OBJECTS) $(xmllint_DEPENDENCIES) +xmllint$(EXEEXT): $(xmllint_OBJECTS) $(xmllint_DEPENDENCIES) $(EXTRA_xmllint_DEPENDENCIES) @rm -f xmllint$(EXEEXT) $(AM_V_CCLD)$(xmllint_LINK) $(xmllint_OBJECTS) $(xmllint_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -998,9 +1035,7 @@ uninstall-binSCRIPTS: @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1013,6 +1048,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTMLtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAX2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c14n.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catalog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chvalid.Plo@am__quote@ @@ -1044,13 +1080,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRelax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSAX.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSchemas.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreads@THREADS_W32@.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreads.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreadsWin32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testURI.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testXPath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testapi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testchar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdso.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlimits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrecurse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Plo@am__quote@ @@ -1080,26 +1118,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -1111,11 +1146,18 @@ distclean-libtool: -rm -f libtool config.lt install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1144,16 +1186,21 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man3: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1182,13 +1229,14 @@ uninstall-man3: sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) install-confexecDATA: $(confexec_DATA) @$(NORMAL_INSTALL) - test -z "$(confexecdir)" || $(MKDIR_P) "$(DESTDIR)$(confexecdir)" @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(confexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(confexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1202,13 +1250,14 @@ uninstall-confexecDATA: @$(NORMAL_UNINSTALL) @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(confexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(confexecdir)" && rm -f $$files + dir='$(DESTDIR)$(confexecdir)'; $(am__uninstall_files_from_dir) install-m4dataDATA: $(m4data_DATA) @$(NORMAL_INSTALL) - test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(m4datadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(m4datadir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1222,13 +1271,14 @@ uninstall-m4dataDATA: @$(NORMAL_UNINSTALL) @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(m4datadir)" && rm -f $$files + dir='$(DESTDIR)$(m4datadir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1242,9 +1292,7 @@ uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1428,13 +1476,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1469,7 +1514,11 @@ dist-gzip: distdir $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -1477,7 +1526,7 @@ dist-lzma: distdir $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -1508,6 +1557,8 @@ distcheck: dist bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -1517,7 +1568,7 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -1527,6 +1578,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -1555,8 +1607,16 @@ distcheck: dist list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1573,7 +1633,8 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-recursive +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ config.h install-binPROGRAMS: install-libLTLIBRARIES @@ -1583,7 +1644,8 @@ installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(confexecdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-recursive +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -1593,10 +1655,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1605,10 +1672,12 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ @@ -1691,34 +1760,35 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-man: uninstall-man1 uninstall-man3 -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-binPROGRAMS \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-binSCRIPTS \ - install-confexecDATA install-data install-data-am \ - install-data-local install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-m4dataDATA \ - install-man install-man1 install-man3 install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-confexecDATA \ - uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \ - uninstall-man uninstall-man1 uninstall-man3 \ - uninstall-pkgconfigDATA + dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-confexecDATA install-data \ + install-data-am install-data-local install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-m4dataDATA install-man install-man1 install-man3 \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-confexecDATA uninstall-libLTLIBRARIES \ + uninstall-local uninstall-m4dataDATA uninstall-man \ + uninstall-man1 uninstall-man3 uninstall-pkgconfigDATA # that one forces the rebuild when "make rebuild" is run on doc/ @@ -1738,28 +1808,25 @@ testapi.c: $(srcdir)/gentest.py #testOOM_LDADD= $(LDADDS) runtests: + [ -d test ] || $(LN_S) $(srcdir)/test . + [ -d result ] || $(LN_S) $(srcdir)/result . $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT) - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) check: all runtests -check-valgrind: all +check-valgrind valgrind: all @echo '## Running the regression tests under Valgrind' @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' check + $(MAKE) CHECKER='valgrind -q' runtests testall : tests SVGtests SAXtests -tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_SCHEMATRON@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) - @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests) - -valgrind: - @echo '## Running the regression tests under Valgrind' - @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' tests +tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) + @(cd doc/examples ; $(MAKE) tests) APItests: testapi$(EXEEXT) @echo "## Running the API regression tests this may take a little while" @@ -2665,7 +2732,7 @@ SchemasPythonTests: echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) - @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) + @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi) Patterntests: xmllint$(EXEEXT) @(echo > .memdump) @@ -2697,8 +2764,8 @@ ModuleTests: testModule$(EXEEXT) testdso.la cleanup: -@(find . -name .\#\* -exec rm {} \;) - -@(find . -name \*.gcda -o *.gcno -exec rm {} \;) - -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm {} \;) + -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;) + -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;) dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) @@ -2728,13 +2795,13 @@ xml2Conf.sh: xml2Conf.sh.in Makefile && mv xml2Conf.tmp xml2Conf.sh install-data-local: - @MKDIR_P@ $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - @MKDIR_P@ $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) + $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) uninstall-local: rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c diff --git a/SAX.c b/SAX.c index 8e5d460..292af57 100644 --- a/SAX.c +++ b/SAX.c @@ -41,7 +41,7 @@ void initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning) { - + if(hdlr->initialized == 1) return; diff --git a/SAX2.c b/SAX2.c index 126a79f..4adf202 100644 --- a/SAX2.c +++ b/SAX2.c @@ -45,7 +45,7 @@ *> values "system" and "public". I have made the default be "system" to *> match yours. */ -#define TODO \ +#define TODO \ xmlGenericError(xmlGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); @@ -57,12 +57,29 @@ */ static void xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) { + xmlStructuredErrorFunc schannel = NULL; + const char *str1 = "out of memory\n"; + if (ctxt != NULL) { - if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt->userData, "%s: out of memory\n", msg); + ctxt->errNo = XML_ERR_NO_MEMORY; + if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) + schannel = ctxt->sax->serror; + __xmlRaiseError(schannel, + ctxt->vctxt.error, ctxt->vctxt.userData, + ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY, + XML_ERR_ERROR, NULL, 0, (const char *) str1, + NULL, NULL, 0, 0, + msg, (const char *) str1, NULL); ctxt->errNo = XML_ERR_NO_MEMORY; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; + } else { + __xmlRaiseError(schannel, + NULL, NULL, + ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY, + XML_ERR_ERROR, NULL, 0, (const char *) str1, + NULL, NULL, 0, 0, + msg, (const char *) str1, NULL); } } @@ -126,7 +143,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, - XML_ERR_FATAL, NULL, 0, + XML_ERR_FATAL, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, str1, str2); if (ctxt != NULL) { @@ -157,7 +174,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, - XML_ERR_WARNING, NULL, 0, + XML_ERR_WARNING, NULL, 0, (const char *) str1, NULL, NULL, 0, 0, msg, str1); } @@ -182,7 +199,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error, - XML_ERR_ERROR, NULL, 0, + XML_ERR_ERROR, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, str1, str2); } @@ -206,7 +223,7 @@ xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error, - XML_ERR_WARNING, NULL, 0, + XML_ERR_WARNING, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, str1, str2); } @@ -240,7 +257,7 @@ xmlSAX2GetSystemId(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL); - return((const xmlChar *) ctxt->input->filename); + return((const xmlChar *) ctxt->input->filename); } /** @@ -355,7 +372,7 @@ xmlSAX2InternalSubset(void *ctx, const xmlChar *name, xmlFreeDtd(dtd); ctxt->myDoc->intSubset = NULL; } - ctxt->myDoc->intSubset = + ctxt->myDoc->intSubset = xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID); if (ctxt->myDoc->intSubset == NULL) xmlSAX2ErrMemory(ctxt, "xmlSAX2InternalSubset"); @@ -394,6 +411,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, xmlParserInputPtr input = NULL; xmlCharEncoding enc; int oldcharset; + const xmlChar *oldencoding; /* * Ask the Entity resolver to load the damn thing @@ -415,6 +433,8 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, oldinputMax = ctxt->inputMax; oldinputTab = ctxt->inputTab; oldcharset = ctxt->charset; + oldencoding = ctxt->encoding; + ctxt->encoding = NULL; ctxt->inputTab = (xmlParserInputPtr *) xmlMalloc(5 * sizeof(xmlParserInputPtr)); @@ -425,6 +445,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, ctxt->inputMax = oldinputMax; ctxt->inputTab = oldinputTab; ctxt->charset = oldcharset; + ctxt->encoding = oldencoding; return; } ctxt->inputNr = 0; @@ -470,6 +491,11 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, ctxt->inputMax = oldinputMax; ctxt->inputTab = oldinputTab; ctxt->charset = oldcharset; + if ((ctxt->encoding != NULL) && + ((ctxt->dict == NULL) || + (!xmlDictOwns(ctxt->dict, ctxt->encoding)))) + xmlFree((xmlChar *) ctxt->encoding); + ctxt->encoding = oldencoding; /* ctxt->wellFormed = oldwellFormed; */ } } @@ -574,6 +600,7 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name) * parse the external entity */ xmlNodePtr children; + unsigned long oldnbent = ctxt->nbentities; val = xmlParseCtxtExternalEntity(ctxt, ret->URI, ret->ExternalID, &children); @@ -586,8 +613,11 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name) return(NULL); } ret->owner = 1; - if (ret->checked == 0) - ret->checked = 1; + if (ret->checked == 0) { + ret->checked = (ctxt->nbentities - oldnbent + 1) * 2; + if ((ret->content != NULL) && (xmlStrchr(ret->content, '<'))) + ret->checked |= 1; + } } return(ret); } @@ -621,8 +651,8 @@ xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name) /** * xmlSAX2EntityDecl: * @ctx: the user data (XML parser context) - * @name: the entity name - * @type: the entity type + * @name: the entity name + * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). @@ -657,7 +687,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type, base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; - + URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } @@ -666,7 +696,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type, systemId, content); if ((ent == NULL) && (ctxt->pedantic) && (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) - ctxt->sax->warning(ctxt->userData, + ctxt->sax->warning(ctxt->userData, "Entity(%s) already defined in the external subset\n", name); if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { xmlChar *URI; @@ -676,7 +706,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type, base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; - + URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } @@ -691,8 +721,8 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type, * xmlSAX2AttributeDecl: * @ctx: the user data (XML parser context) * @elem: the name of the element - * @fullname: the attribute name - * @type: the attribute type + * @fullname: the attribute name + * @type: the attribute type * @def: the type of default value * @defaultValue: the attribute default value * @tree: the tree of enumerated value set @@ -735,7 +765,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname, (xmlAttributeDefault) def, defaultValue, tree); else if (ctxt->inSubset == 2) attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem, - name, prefix, (xmlAttributeType) type, + name, prefix, (xmlAttributeType) type, (xmlAttributeDefault) def, defaultValue, tree); else { xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, @@ -761,8 +791,8 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname, /** * xmlSAX2ElementDecl: * @ctx: the user data (XML parser context) - * @name: the element name - * @type: the element type + * @name: the element name + * @type: the element type * @content: the element value tree * * An element definition has been parsed @@ -883,7 +913,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name, publicId, systemId, notationName); if ((ent == NULL) && (ctxt->pedantic) && (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) - ctxt->sax->warning(ctxt->userData, + ctxt->sax->warning(ctxt->userData, "Entity(%s) already defined in the internal subset\n", name); if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { xmlChar *URI; @@ -893,7 +923,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name, base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; - + URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } @@ -903,7 +933,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name, publicId, systemId, notationName); if ((ent == NULL) && (ctxt->pedantic) && (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) - ctxt->sax->warning(ctxt->userData, + ctxt->sax->warning(ctxt->userData, "Entity(%s) already defined in the external subset\n", name); if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { xmlChar *URI; @@ -913,7 +943,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name, base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; - + URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } @@ -1157,12 +1187,12 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, uri = xmlParseURI((const char *)val); if (uri == NULL) { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) - ctxt->sax->warning(ctxt->userData, + ctxt->sax->warning(ctxt->userData, "xmlns: %s not a valid URI\n", val); } else { if (uri->scheme == NULL) { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) - ctxt->sax->warning(ctxt->userData, + ctxt->sax->warning(ctxt->userData, "xmlns: URI %s is not absolute\n", val); } xmlFreeURI(uri); @@ -1182,7 +1212,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, ctxt->node, prefix, nsret, val); #endif /* LIBXML_VALID_ENABLED */ - if (name != NULL) + if (name != NULL) xmlFree(name); if (nval != NULL) xmlFree(nval); @@ -1204,7 +1234,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, if (val == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); xmlFree(ns); - if (name != NULL) + if (name != NULL) xmlFree(name); return; } @@ -1245,7 +1275,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, ctxt->node, prefix, nsret, value); #endif /* LIBXML_VALID_ENABLED */ - if (name != NULL) + if (name != NULL) xmlFree(name); if (nval != NULL) xmlFree(nval); @@ -1311,7 +1341,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, #ifdef LIBXML_VALID_ENABLED if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) { - + /* * If we don't substitute entities, the validation should be * done on a value with replaced entities anyway. @@ -1323,7 +1353,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, 0,0,0); ctxt->depth--; - + if (val == NULL) ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, value); @@ -1380,7 +1410,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, error: if (nval != NULL) xmlFree(nval); - if (ns != NULL) + if (ns != NULL) xmlFree(ns); } @@ -1479,7 +1509,7 @@ process_external_subset: * - this is a namespace prefix * - the user required for completion in the tree * like XSLT - * - there isn't already an attribute definition + * - there isn't already an attribute definition * in the internal subset overriding it. */ if (((attr->prefix != NULL) && @@ -1568,17 +1598,17 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) /* * First check on validity: */ - if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && + if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && ((ctxt->myDoc->intSubset == NULL) || - ((ctxt->myDoc->intSubset->notations == NULL) && + ((ctxt->myDoc->intSubset->notations == NULL) && (ctxt->myDoc->intSubset->elements == NULL) && - (ctxt->myDoc->intSubset->attributes == NULL) && + (ctxt->myDoc->intSubset->attributes == NULL) && (ctxt->myDoc->intSubset->entities == NULL)))) { xmlErrValid(ctxt, XML_ERR_NO_DTD, "Validation failed: no DTD found !", NULL, NULL); ctxt->validate = 0; } - + /* * Split the full name into a namespace prefix and the tag name @@ -1766,7 +1796,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) else xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name); #endif - + /* Capture end position and add node */ if (cur != NULL && ctxt->record_info) { ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base; @@ -1783,7 +1813,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) cur); #endif /* LIBXML_VALID_ENABLED */ - + /* * end of parsing of this node. */ @@ -1799,8 +1829,8 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) * @ctxt: the parser context * @str: the input string * @len: the string length - * - * Remove the entities from an attribute value + * + * Callback for a text node * * Returns the newly allocated string or NULL if not needed or error */ @@ -1833,7 +1863,7 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { if ((len < (int) (2 * sizeof(void *))) && (ctxt->options & XML_PARSE_COMPACT)) { - /* store the string in the node overrithing properties and nsDef */ + /* store the string in the node overriding properties and nsDef */ xmlChar *tmp = (xmlChar *) &(ret->properties); memcpy(tmp, str, len); tmp[len] = 0; @@ -1865,8 +1895,17 @@ skip: } else ret->content = (xmlChar *) intern; - if (ctxt->input != NULL) - ret->line = ctxt->input->line; + if (ctxt->linenumbers) { + if (ctxt->input != NULL) { + if (ctxt->input->line < 65535) + ret->line = (short) ctxt->input->line; + else { + ret->line = 65535; + if (ctxt->options & XML_PARSE_BIG_LINES) + ret->psvi = (void *) (long) ctxt->input->line; + } + } + } if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) xmlRegisterNodeDefaultValue(ret); @@ -1879,7 +1918,7 @@ skip: * @ctxt: the parser context * @str: the input string * @len: the string length - * + * * Remove the entities from an attribute value * * Returns the newly allocated string or NULL if not needed or error @@ -1945,7 +1984,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, memset(ret, 0, sizeof(xmlAttr)); ret->type = XML_ATTRIBUTE_NODE; - ret->parent = ctxt->node; + ret->parent = ctxt->node; ret->doc = ctxt->myDoc; ret->ns = namespace; @@ -1969,7 +2008,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, xmlRegisterNodeDefaultValue((xmlNodePtr)ret); } else { if (ctxt->dictNames) - ret = xmlNewNsPropEatName(ctxt->node, namespace, + ret = xmlNewNsPropEatName(ctxt->node, namespace, (xmlChar *) localname, NULL); else ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL); @@ -2055,7 +2094,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, xmlChar *nvalnorm; xmlChar fn[50]; xmlChar *fullname; - + fullname = xmlBuildQName(localname, prefix, fn, 50); if (fullname != NULL) { ctxt->vctxt.valid = 1; @@ -2170,13 +2209,13 @@ xmlSAX2StartElementNs(void *ctx, /* * First check on validity: */ - if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && + if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && ((ctxt->myDoc->intSubset == NULL) || - ((ctxt->myDoc->intSubset->notations == NULL) && + ((ctxt->myDoc->intSubset->notations == NULL) && (ctxt->myDoc->intSubset->elements == NULL) && - (ctxt->myDoc->intSubset->attributes == NULL) && + (ctxt->myDoc->intSubset->attributes == NULL) && (ctxt->myDoc->intSubset->entities == NULL)))) { - xmlErrValid(ctxt, XML_ERR_NO_DTD, + xmlErrValid(ctxt, XML_DTD_NO_DTD, "Validation failed: no DTD found !", NULL, NULL); ctxt->validate = 0; } @@ -2221,12 +2260,12 @@ xmlSAX2StartElementNs(void *ctx, xmlRegisterNodeDefaultValue(ret); } else { if (ctxt->dictNames) - ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, + ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, (xmlChar *) localname, NULL); else if (lname == NULL) ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL); else - ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, + ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, (xmlChar *) lname, NULL); if (ret == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); @@ -2431,7 +2470,7 @@ xmlSAX2EndElementNs(void *ctx, * @ctx: the user data (XML parser context) * @name: The entity name * - * called when an entity xmlSAX2Reference is detected. + * called when an entity xmlSAX2Reference is detected. */ void xmlSAX2Reference(void *ctx, const xmlChar *name) @@ -2536,7 +2575,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len) xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: huge text node"); return; } - if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len || + if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len || (size_t)ctxt->nodemem + (size_t)len > SIZE_T_MAX / 2) { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented"); return; diff --git a/acinclude.m4 b/acinclude.m4 index 4ff672e..7ad8630 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2,8 +2,8 @@ dnl Like AC_TRY_EVAL but also errors out if the compiler generates dnl _any_ output. Some compilers might issue warnings which we want dnl to catch. AC_DEFUN([AC_TRY_EVAL2], -[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl -(eval [$]$1) 2>&AC_FD_CC; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }]) +[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AS_MESSAGE_LOG_FD; dnl +(eval [$]$1) 2>&AS_MESSAGE_LOG_FD; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }]) dnl Like AC_TRY_COMPILE but calls AC_TRY_EVAL2 instead of AC_TRY_EVAL AC_DEFUN([AC_TRY_COMPILE2], @@ -19,8 +19,8 @@ if AC_TRY_EVAL2(ac_compile); then ifelse([$3], , :, [rm -rf conftest* $3]) else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD ifelse([$4], , , [ rm -rf conftest* $4 ])dnl diff --git a/aclocal.m4 b/aclocal.m4 index fcf3076..cb558d2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,18 +14,21 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK], if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -406,18 +416,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -557,12 +555,15 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -694,12 +695,15 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -722,13 +726,14 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -736,13 +741,13 @@ AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -818,13 +823,13 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- @@ -839,18 +844,50 @@ yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using `$V' instead of `$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -873,13 +910,13 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -888,13 +925,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -916,10 +953,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) diff --git a/buf.c b/buf.c new file mode 100644 index 0000000..d1756c4 --- /dev/null +++ b/buf.c @@ -0,0 +1,1304 @@ +/* + * buf.c: memory buffers for libxml2 + * + * new buffer structures and entry points to simplify the maintainance + * of libxml2 and ensure we keep good control over memory allocations + * and stay 64 bits clean. + * The new entry point use the xmlBufPtr opaque structure and + * xmlBuf...() counterparts to the old xmlBuf...() functions + * + * See Copyright for the status of this software. + * + * daniel@veillard.com + */ + +#define IN_LIBXML +#include "libxml.h" + +#include /* for memset() only ! */ +#include +#ifdef HAVE_CTYPE_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif + +#include +#include +#include +#include "buf.h" + +#define WITH_BUFFER_COMPAT + +/** + * xmlBuf: + * + * A buffer structure. The base of the structure is somehow compatible + * with struct _xmlBuffer to limit risks on application which accessed + * directly the input->buf->buffer structures. + */ + +struct _xmlBuf { + xmlChar *content; /* The buffer content UTF8 */ + unsigned int compat_use; /* for binary compatibility */ + unsigned int compat_size; /* for binary compatibility */ + xmlBufferAllocationScheme alloc; /* The realloc method */ + xmlChar *contentIO; /* in IO mode we may have a different base */ + size_t use; /* The buffer size used */ + size_t size; /* The buffer size */ + xmlBufferPtr buffer; /* wrapper for an old buffer */ + int error; /* an error code if a failure occured */ +}; + +#ifdef WITH_BUFFER_COMPAT +/* + * Macro for compatibility with xmlBuffer to be used after an xmlBuf + * is updated. This makes sure the compat fields are updated too. + */ +#define UPDATE_COMPAT(buf) \ + if (buf->size < INT_MAX) buf->compat_size = buf->size; \ + else buf->compat_size = INT_MAX; \ + if (buf->use < INT_MAX) buf->compat_use = buf->use; \ + else buf->compat_use = INT_MAX; + +/* + * Macro for compatibility with xmlBuffer to be used in all the xmlBuf + * entry points, it checks that the compat fields have not been modified + * by direct call to xmlBuffer function from code compiled before 2.9.0 . + */ +#define CHECK_COMPAT(buf) \ + if (buf->size != (size_t) buf->compat_size) \ + if (buf->compat_size < INT_MAX) \ + buf->size = buf->compat_size; \ + if (buf->use != (size_t) buf->compat_use) \ + if (buf->compat_use < INT_MAX) \ + buf->use = buf->compat_use; + +#else /* ! WITH_BUFFER_COMPAT */ +#define UPDATE_COMPAT(buf) +#define CHECK_COMPAT(buf) +#endif /* WITH_BUFFER_COMPAT */ + +/** + * xmlBufMemoryError: + * @extra: extra informations + * + * Handle an out of memory condition + * To be improved... + */ +static void +xmlBufMemoryError(xmlBufPtr buf, const char *extra) +{ + __xmlSimpleError(XML_FROM_BUFFER, XML_ERR_NO_MEMORY, NULL, NULL, extra); + if ((buf) && (buf->error == 0)) + buf->error = XML_ERR_NO_MEMORY; +} + +/** + * xmlBufOverflowError: + * @extra: extra informations + * + * Handle a buffer overflow error + * To be improved... + */ +static void +xmlBufOverflowError(xmlBufPtr buf, const char *extra) +{ + __xmlSimpleError(XML_FROM_BUFFER, XML_BUF_OVERFLOW, NULL, NULL, extra); + if ((buf) && (buf->error == 0)) + buf->error = XML_BUF_OVERFLOW; +} + + +/** + * xmlBufCreate: + * + * routine to create an XML buffer. + * returns the new structure. + */ +xmlBufPtr +xmlBufCreate(void) { + xmlBufPtr ret; + + ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf)); + if (ret == NULL) { + xmlBufMemoryError(NULL, "creating buffer"); + return(NULL); + } + ret->compat_use = 0; + ret->use = 0; + ret->error = 0; + ret->buffer = NULL; + ret->size = xmlDefaultBufferSize; + ret->compat_size = xmlDefaultBufferSize; + ret->alloc = xmlBufferAllocScheme; + ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar)); + if (ret->content == NULL) { + xmlBufMemoryError(ret, "creating buffer"); + xmlFree(ret); + return(NULL); + } + ret->content[0] = 0; + ret->contentIO = NULL; + return(ret); +} + +/** + * xmlBufCreateSize: + * @size: initial size of buffer + * + * routine to create an XML buffer. + * returns the new structure. + */ +xmlBufPtr +xmlBufCreateSize(size_t size) { + xmlBufPtr ret; + + ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf)); + if (ret == NULL) { + xmlBufMemoryError(NULL, "creating buffer"); + return(NULL); + } + ret->compat_use = 0; + ret->use = 0; + ret->error = 0; + ret->buffer = NULL; + ret->alloc = xmlBufferAllocScheme; + ret->size = (size ? size+2 : 0); /* +1 for ending null */ + ret->compat_size = (int) ret->size; + if (ret->size){ + ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar)); + if (ret->content == NULL) { + xmlBufMemoryError(ret, "creating buffer"); + xmlFree(ret); + return(NULL); + } + ret->content[0] = 0; + } else + ret->content = NULL; + ret->contentIO = NULL; + return(ret); +} + +/** + * xmlBufDetach: + * @buf: the buffer + * + * Remove the string contained in a buffer and give it back to the + * caller. The buffer is reset to an empty content. + * This doesn't work with immutable buffers as they can't be reset. + * + * Returns the previous string contained by the buffer. + */ +xmlChar * +xmlBufDetach(xmlBufPtr buf) { + xmlChar *ret; + + if (buf == NULL) + return(NULL); + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) + return(NULL); + if (buf->buffer != NULL) + return(NULL); + if (buf->error) + return(NULL); + + ret = buf->content; + buf->content = NULL; + buf->size = 0; + buf->use = 0; + buf->compat_use = 0; + buf->compat_size = 0; + + return ret; +} + + +/** + * xmlBufCreateStatic: + * @mem: the memory area + * @size: the size in byte + * + * routine to create an XML buffer from an immutable memory area. + * The area won't be modified nor copied, and is expected to be + * present until the end of the buffer lifetime. + * + * returns the new structure. + */ +xmlBufPtr +xmlBufCreateStatic(void *mem, size_t size) { + xmlBufPtr ret; + + if ((mem == NULL) || (size == 0)) + return(NULL); + + ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf)); + if (ret == NULL) { + xmlBufMemoryError(NULL, "creating buffer"); + return(NULL); + } + if (size < INT_MAX) { + ret->compat_use = size; + ret->compat_size = size; + } else { + ret->compat_use = INT_MAX; + ret->compat_size = INT_MAX; + } + ret->use = size; + ret->size = size; + ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE; + ret->content = (xmlChar *) mem; + ret->error = 0; + ret->buffer = NULL; + return(ret); +} + +/** + * xmlBufGetAllocationScheme: + * @buf: the buffer + * + * Get the buffer allocation scheme + * + * Returns the scheme or -1 in case of error + */ +int +xmlBufGetAllocationScheme(xmlBufPtr buf) { + if (buf == NULL) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufGetAllocationScheme: buf == NULL\n"); +#endif + return(-1); + } + return(buf->alloc); +} + +/** + * xmlBufSetAllocationScheme: + * @buf: the buffer to tune + * @scheme: allocation scheme to use + * + * Sets the allocation scheme for this buffer + * + * returns 0 in case of success and -1 in case of failure + */ +int +xmlBufSetAllocationScheme(xmlBufPtr buf, + xmlBufferAllocationScheme scheme) { + if ((buf == NULL) || (buf->error != 0)) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufSetAllocationScheme: buf == NULL or in error\n"); +#endif + return(-1); + } + if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) || + (buf->alloc == XML_BUFFER_ALLOC_IO)) + return(-1); + if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) || + (scheme == XML_BUFFER_ALLOC_EXACT) || + (scheme == XML_BUFFER_ALLOC_HYBRID) || + (scheme == XML_BUFFER_ALLOC_IMMUTABLE)) { + buf->alloc = scheme; + if (buf->buffer) + buf->buffer->alloc = scheme; + return(0); + } + /* + * Switching a buffer ALLOC_IO has the side effect of initializing + * the contentIO field with the current content + */ + if (scheme == XML_BUFFER_ALLOC_IO) { + buf->alloc = XML_BUFFER_ALLOC_IO; + buf->contentIO = buf->content; + } + return(-1); +} + +/** + * xmlBufFree: + * @buf: the buffer to free + * + * Frees an XML buffer. It frees both the content and the structure which + * encapsulate it. + */ +void +xmlBufFree(xmlBufPtr buf) { + if (buf == NULL) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufFree: buf == NULL\n"); +#endif + return; + } + + if ((buf->alloc == XML_BUFFER_ALLOC_IO) && + (buf->contentIO != NULL)) { + xmlFree(buf->contentIO); + } else if ((buf->content != NULL) && + (buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) { + xmlFree(buf->content); + } + xmlFree(buf); +} + +/** + * xmlBufEmpty: + * @buf: the buffer + * + * empty a buffer. + */ +void +xmlBufEmpty(xmlBufPtr buf) { + if ((buf == NULL) || (buf->error != 0)) return; + if (buf->content == NULL) return; + CHECK_COMPAT(buf) + buf->use = 0; + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) { + buf->content = BAD_CAST ""; + } else if ((buf->alloc == XML_BUFFER_ALLOC_IO) && + (buf->contentIO != NULL)) { + size_t start_buf = buf->content - buf->contentIO; + + buf->size += start_buf; + buf->content = buf->contentIO; + buf->content[0] = 0; + } else { + buf->content[0] = 0; + } + UPDATE_COMPAT(buf) +} + +/** + * xmlBufShrink: + * @buf: the buffer to dump + * @len: the number of xmlChar to remove + * + * Remove the beginning of an XML buffer. + * NOTE that this routine behaviour differs from xmlBufferShrink() + * as it will return 0 on error instead of -1 due to size_t being + * used as the return type. + * + * Returns the number of byte removed or 0 in case of failure + */ +size_t +xmlBufShrink(xmlBufPtr buf, size_t len) { + if ((buf == NULL) || (buf->error != 0)) return(0); + CHECK_COMPAT(buf) + if (len == 0) return(0); + if (len > buf->use) return(0); + + buf->use -= len; + if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) || + ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) { + /* + * we just move the content pointer, but also make sure + * the perceived buffer size has shrinked accordingly + */ + buf->content += len; + buf->size -= len; + + /* + * sometimes though it maybe be better to really shrink + * on IO buffers + */ + if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) { + size_t start_buf = buf->content - buf->contentIO; + if (start_buf >= buf->size) { + memmove(buf->contentIO, &buf->content[0], buf->use); + buf->content = buf->contentIO; + buf->content[buf->use] = 0; + buf->size += start_buf; + } + } + } else { + memmove(buf->content, &buf->content[len], buf->use); + buf->content[buf->use] = 0; + } + UPDATE_COMPAT(buf) + return(len); +} + +/** + * xmlBufGrowInternal: + * @buf: the buffer + * @len: the minimum free size to allocate + * + * Grow the available space of an XML buffer, @len is the target value + * Error checking should be done on buf->error since using the return + * value doesn't work that well + * + * Returns 0 in case of error or the length made available otherwise + */ +static size_t +xmlBufGrowInternal(xmlBufPtr buf, size_t len) { + size_t size; + xmlChar *newbuf; + + if ((buf == NULL) || (buf->error != 0)) return(0); + CHECK_COMPAT(buf) + + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0); + if (buf->use + len < buf->size) + return(buf->size - buf->use); + + /* + * Windows has a BIG problem on realloc timing, so we try to double + * the buffer size (if that's enough) (bug 146697) + * Apparently BSD too, and it's probably best for linux too + * On an embedded system this may be something to change + */ +#if 1 + if (buf->size > (size_t) len) + size = buf->size * 2; + else + size = buf->use + len + 100; +#else + size = buf->use + len + 100; +#endif + + if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) { + size_t start_buf = buf->content - buf->contentIO; + + newbuf = (xmlChar *) xmlRealloc(buf->contentIO, start_buf + size); + if (newbuf == NULL) { + xmlBufMemoryError(buf, "growing buffer"); + return(0); + } + buf->contentIO = newbuf; + buf->content = newbuf + start_buf; + } else { + newbuf = (xmlChar *) xmlRealloc(buf->content, size); + if (newbuf == NULL) { + xmlBufMemoryError(buf, "growing buffer"); + return(0); + } + buf->content = newbuf; + } + buf->size = size; + UPDATE_COMPAT(buf) + return(buf->size - buf->use); +} + +/** + * xmlBufGrow: + * @buf: the buffer + * @len: the minimum free size to allocate + * + * Grow the available space of an XML buffer, @len is the target value + * This is been kept compatible with xmlBufferGrow() as much as possible + * + * Returns -1 in case of error or the length made available otherwise + */ +int +xmlBufGrow(xmlBufPtr buf, int len) { + size_t ret; + + if ((buf == NULL) || (len < 0)) return(-1); + if (len == 0) + return(0); + ret = xmlBufGrowInternal(buf, len); + if (buf->error != 0) + return(-1); + return((int) ret); +} + +/** + * xmlBufInflate: + * @buf: the buffer + * @len: the minimum extra free size to allocate + * + * Grow the available space of an XML buffer, adding at least @len bytes + * + * Returns 0 if successful or -1 in case of error + */ +int +xmlBufInflate(xmlBufPtr buf, size_t len) { + if (buf == NULL) return(-1); + xmlBufGrowInternal(buf, len + buf->size); + if (buf->error) + return(-1); + return(0); +} + +/** + * xmlBufDump: + * @file: the file output + * @buf: the buffer to dump + * + * Dumps an XML buffer to a FILE *. + * Returns the number of #xmlChar written + */ +size_t +xmlBufDump(FILE *file, xmlBufPtr buf) { + size_t ret; + + if ((buf == NULL) || (buf->error != 0)) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufDump: buf == NULL or in error\n"); +#endif + return(0); + } + if (buf->content == NULL) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufDump: buf->content == NULL\n"); +#endif + return(0); + } + CHECK_COMPAT(buf) + if (file == NULL) + file = stdout; + ret = fwrite(buf->content, sizeof(xmlChar), buf->use, file); + return(ret); +} + +/** + * xmlBufContent: + * @buf: the buffer + * + * Function to extract the content of a buffer + * + * Returns the internal content + */ + +xmlChar * +xmlBufContent(const xmlBufPtr buf) +{ + if ((!buf) || (buf->error)) + return NULL; + + return(buf->content); +} + +/** + * xmlBufEnd: + * @buf: the buffer + * + * Function to extract the end of the content of a buffer + * + * Returns the end of the internal content or NULL in case of error + */ + +xmlChar * +xmlBufEnd(const xmlBufPtr buf) +{ + if ((!buf) || (buf->error)) + return NULL; + CHECK_COMPAT(buf) + + return(&buf->content[buf->use]); +} + +/** + * xmlBufAddLen: + * @buf: the buffer + * @len: the size which were added at the end + * + * Sometime data may be added at the end of the buffer without + * using the xmlBuf APIs that is used to expand the used space + * and set the zero terminating at the end of the buffer + * + * Returns -1 in case of error and 0 otherwise + */ +int +xmlBufAddLen(xmlBufPtr buf, size_t len) { + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (len > (buf->size - buf->use)) + return(-1); + buf->use += len; + UPDATE_COMPAT(buf) + if (buf->size > buf->use) + buf->content[buf->use] = 0; + else + return(-1); + return(0); +} + +/** + * xmlBufErase: + * @buf: the buffer + * @len: the size to erase at the end + * + * Sometime data need to be erased at the end of the buffer + * + * Returns -1 in case of error and 0 otherwise + */ +int +xmlBufErase(xmlBufPtr buf, size_t len) { + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (len > buf->use) + return(-1); + buf->use -= len; + buf->content[buf->use] = 0; + UPDATE_COMPAT(buf) + return(0); +} + +/** + * xmlBufLength: + * @buf: the buffer + * + * Function to get the length of a buffer + * + * Returns the length of data in the internal content + */ + +size_t +xmlBufLength(const xmlBufPtr buf) +{ + if ((!buf) || (buf->error)) + return 0; + CHECK_COMPAT(buf) + + return(buf->use); +} + +/** + * xmlBufUse: + * @buf: the buffer + * + * Function to get the length of a buffer + * + * Returns the length of data in the internal content + */ + +size_t +xmlBufUse(const xmlBufPtr buf) +{ + if ((!buf) || (buf->error)) + return 0; + CHECK_COMPAT(buf) + + return(buf->use); +} + +/** + * xmlBufAvail: + * @buf: the buffer + * + * Function to find how much free space is allocated but not + * used in the buffer. It does not account for the terminating zero + * usually needed + * + * Returns the amount or 0 if none or an error occured + */ + +size_t +xmlBufAvail(const xmlBufPtr buf) +{ + if ((!buf) || (buf->error)) + return 0; + CHECK_COMPAT(buf) + + return(buf->size - buf->use); +} + +/** + * xmlBufIsEmpty: + * @buf: the buffer + * + * Tell if a buffer is empty + * + * Returns 0 if no, 1 if yes and -1 in case of error + */ +int +xmlBufIsEmpty(const xmlBufPtr buf) +{ + if ((!buf) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + + return(buf->use == 0); +} + +/** + * xmlBufResize: + * @buf: the buffer to resize + * @size: the desired size + * + * Resize a buffer to accommodate minimum size of @size. + * + * Returns 0 in case of problems, 1 otherwise + */ +int +xmlBufResize(xmlBufPtr buf, size_t size) +{ + unsigned int newSize; + xmlChar* rebuf = NULL; + size_t start_buf; + + if ((buf == NULL) || (buf->error)) + return(0); + CHECK_COMPAT(buf) + + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0); + + /* Don't resize if we don't have to */ + if (size < buf->size) + return 1; + + /* figure out new size */ + switch (buf->alloc){ + case XML_BUFFER_ALLOC_IO: + case XML_BUFFER_ALLOC_DOUBLEIT: + /*take care of empty case*/ + newSize = (buf->size ? buf->size*2 : size + 10); + while (size > newSize) { + if (newSize > UINT_MAX / 2) { + xmlBufMemoryError(buf, "growing buffer"); + return 0; + } + newSize *= 2; + } + break; + case XML_BUFFER_ALLOC_EXACT: + newSize = size+10; + break; + case XML_BUFFER_ALLOC_HYBRID: + if (buf->use < BASE_BUFFER_SIZE) + newSize = size; + else { + newSize = buf->size * 2; + while (size > newSize) { + if (newSize > UINT_MAX / 2) { + xmlBufMemoryError(buf, "growing buffer"); + return 0; + } + newSize *= 2; + } + } + break; + + default: + newSize = size+10; + break; + } + + if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) { + start_buf = buf->content - buf->contentIO; + + if (start_buf > newSize) { + /* move data back to start */ + memmove(buf->contentIO, buf->content, buf->use); + buf->content = buf->contentIO; + buf->content[buf->use] = 0; + buf->size += start_buf; + } else { + rebuf = (xmlChar *) xmlRealloc(buf->contentIO, start_buf + newSize); + if (rebuf == NULL) { + xmlBufMemoryError(buf, "growing buffer"); + return 0; + } + buf->contentIO = rebuf; + buf->content = rebuf + start_buf; + } + } else { + if (buf->content == NULL) { + rebuf = (xmlChar *) xmlMallocAtomic(newSize); + } else if (buf->size - buf->use < 100) { + rebuf = (xmlChar *) xmlRealloc(buf->content, newSize); + } else { + /* + * if we are reallocating a buffer far from being full, it's + * better to make a new allocation and copy only the used range + * and free the old one. + */ + rebuf = (xmlChar *) xmlMallocAtomic(newSize); + if (rebuf != NULL) { + memcpy(rebuf, buf->content, buf->use); + xmlFree(buf->content); + rebuf[buf->use] = 0; + } + } + if (rebuf == NULL) { + xmlBufMemoryError(buf, "growing buffer"); + return 0; + } + buf->content = rebuf; + } + buf->size = newSize; + UPDATE_COMPAT(buf) + + return 1; +} + +/** + * xmlBufAdd: + * @buf: the buffer to dump + * @str: the #xmlChar string + * @len: the number of #xmlChar to add + * + * Add a string range to an XML buffer. if len == -1, the length of + * str is recomputed. + * + * Returns 0 successful, a positive error code number otherwise + * and -1 in case of internal or API error. + */ +int +xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) { + unsigned int needSize; + + if ((str == NULL) || (buf == NULL) || (buf->error)) + return -1; + CHECK_COMPAT(buf) + + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1; + if (len < -1) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufAdd: len < 0\n"); +#endif + return -1; + } + if (len == 0) return 0; + + if (len < 0) + len = xmlStrlen(str); + + if (len < 0) return -1; + if (len == 0) return 0; + + needSize = buf->use + len + 2; + if (needSize > buf->size){ + if (!xmlBufResize(buf, needSize)){ + xmlBufMemoryError(buf, "growing buffer"); + return XML_ERR_NO_MEMORY; + } + } + + memmove(&buf->content[buf->use], str, len*sizeof(xmlChar)); + buf->use += len; + buf->content[buf->use] = 0; + UPDATE_COMPAT(buf) + return 0; +} + +/** + * xmlBufAddHead: + * @buf: the buffer + * @str: the #xmlChar string + * @len: the number of #xmlChar to add + * + * Add a string range to the beginning of an XML buffer. + * if len == -1, the length of @str is recomputed. + * + * Returns 0 successful, a positive error code number otherwise + * and -1 in case of internal or API error. + */ +int +xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) { + unsigned int needSize; + + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1; + if (str == NULL) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufAddHead: str == NULL\n"); +#endif + return -1; + } + if (len < -1) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufAddHead: len < 0\n"); +#endif + return -1; + } + if (len == 0) return 0; + + if (len < 0) + len = xmlStrlen(str); + + if (len <= 0) return -1; + + if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) { + size_t start_buf = buf->content - buf->contentIO; + + if (start_buf > (unsigned int) len) { + /* + * We can add it in the space previously shrinked + */ + buf->content -= len; + memmove(&buf->content[0], str, len); + buf->use += len; + buf->size += len; + UPDATE_COMPAT(buf) + return(0); + } + } + needSize = buf->use + len + 2; + if (needSize > buf->size){ + if (!xmlBufResize(buf, needSize)){ + xmlBufMemoryError(buf, "growing buffer"); + return XML_ERR_NO_MEMORY; + } + } + + memmove(&buf->content[len], &buf->content[0], buf->use); + memmove(&buf->content[0], str, len); + buf->use += len; + buf->content[buf->use] = 0; + UPDATE_COMPAT(buf) + return 0; +} + +/** + * xmlBufCat: + * @buf: the buffer to add to + * @str: the #xmlChar string + * + * Append a zero terminated string to an XML buffer. + * + * Returns 0 successful, a positive error code number otherwise + * and -1 in case of internal or API error. + */ +int +xmlBufCat(xmlBufPtr buf, const xmlChar *str) { + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1; + if (str == NULL) return -1; + return xmlBufAdd(buf, str, -1); +} + +/** + * xmlBufCCat: + * @buf: the buffer to dump + * @str: the C char string + * + * Append a zero terminated C string to an XML buffer. + * + * Returns 0 successful, a positive error code number otherwise + * and -1 in case of internal or API error. + */ +int +xmlBufCCat(xmlBufPtr buf, const char *str) { + const char *cur; + + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1; + if (str == NULL) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufCCat: str == NULL\n"); +#endif + return -1; + } + for (cur = str;*cur != 0;cur++) { + if (buf->use + 10 >= buf->size) { + if (!xmlBufResize(buf, buf->use+10)){ + xmlBufMemoryError(buf, "growing buffer"); + return XML_ERR_NO_MEMORY; + } + } + buf->content[buf->use++] = *cur; + } + buf->content[buf->use] = 0; + UPDATE_COMPAT(buf) + return 0; +} + +/** + * xmlBufWriteCHAR: + * @buf: the XML buffer + * @string: the string to add + * + * routine which manages and grows an output buffer. This one adds + * xmlChars at the end of the buffer. + * + * Returns 0 if successful, a positive error code number otherwise + * and -1 in case of internal or API error. + */ +int +xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string) { + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) + return(-1); + return(xmlBufCat(buf, string)); +} + +/** + * xmlBufWriteChar: + * @buf: the XML buffer output + * @string: the string to add + * + * routine which manage and grows an output buffer. This one add + * C chars at the end of the array. + * + * Returns 0 if successful, a positive error code number otherwise + * and -1 in case of internal or API error. + */ +int +xmlBufWriteChar(xmlBufPtr buf, const char *string) { + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) + return(-1); + return(xmlBufCCat(buf, string)); +} + + +/** + * xmlBufWriteQuotedString: + * @buf: the XML buffer output + * @string: the string to add + * + * routine which manage and grows an output buffer. This one writes + * a quoted or double quoted #xmlChar string, checking first if it holds + * quote or double-quotes internally + * + * Returns 0 if successful, a positive error code number otherwise + * and -1 in case of internal or API error. + */ +int +xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string) { + const xmlChar *cur, *base; + if ((buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) + return(-1); + if (xmlStrchr(string, '\"')) { + if (xmlStrchr(string, '\'')) { +#ifdef DEBUG_BUFFER + xmlGenericError(xmlGenericErrorContext, + "xmlBufWriteQuotedString: string contains quote and double-quotes !\n"); +#endif + xmlBufCCat(buf, "\""); + base = cur = string; + while(*cur != 0){ + if(*cur == '"'){ + if (base != cur) + xmlBufAdd(buf, base, cur - base); + xmlBufAdd(buf, BAD_CAST """, 6); + cur++; + base = cur; + } + else { + cur++; + } + } + if (base != cur) + xmlBufAdd(buf, base, cur - base); + xmlBufCCat(buf, "\""); + } + else{ + xmlBufCCat(buf, "\'"); + xmlBufCat(buf, string); + xmlBufCCat(buf, "\'"); + } + } else { + xmlBufCCat(buf, "\""); + xmlBufCat(buf, string); + xmlBufCCat(buf, "\""); + } + return(0); +} + +/** + * xmlBufFromBuffer: + * @buffer: incoming old buffer to convert to a new one + * + * Helper routine to switch from the old buffer structures in use + * in various APIs. It creates a wrapper xmlBufPtr which will be + * used for internal processing until the xmlBufBackToBuffer() is + * issued. + * + * Returns a new xmlBufPtr unless the call failed and NULL is returned + */ +xmlBufPtr +xmlBufFromBuffer(xmlBufferPtr buffer) { + xmlBufPtr ret; + + if (buffer == NULL) + return(NULL); + + ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf)); + if (ret == NULL) { + xmlBufMemoryError(NULL, "creating buffer"); + return(NULL); + } + ret->use = buffer->use; + ret->size = buffer->size; + ret->compat_use = buffer->use; + ret->compat_size = buffer->size; + ret->error = 0; + ret->buffer = buffer; + ret->alloc = buffer->alloc; + ret->content = buffer->content; + ret->contentIO = buffer->contentIO; + + return(ret); +} + +/** + * xmlBufBackToBuffer: + * @buf: new buffer wrapping the old one + * + * Function to be called once internal processing had been done to + * update back the buffer provided by the user. This can lead to + * a failure in case the size accumulated in the xmlBuf is larger + * than what an xmlBuffer can support on 64 bits (INT_MAX) + * The xmlBufPtr @buf wrapper is deallocated by this call in any case. + * + * Returns the old xmlBufferPtr unless the call failed and NULL is returned + */ +xmlBufferPtr +xmlBufBackToBuffer(xmlBufPtr buf) { + xmlBufferPtr ret; + + if ((buf == NULL) || (buf->error)) + return(NULL); + CHECK_COMPAT(buf) + if (buf->buffer == NULL) { + xmlBufFree(buf); + return(NULL); + } + + ret = buf->buffer; + /* + * What to do in case of error in the buffer ??? + */ + if (buf->use > INT_MAX) { + /* + * Worse case, we really allocated and used more than the + * maximum allowed memory for an xmlBuffer on this architecture. + * Keep the buffer but provide a truncated size value. + */ + xmlBufOverflowError(buf, "Used size too big for xmlBuffer"); + ret->use = INT_MAX; + ret->size = INT_MAX; + } else if (buf->size > INT_MAX) { + /* + * milder case, we allocated more than the maximum allowed memory + * for an xmlBuffer on this architecture, but used less than the + * limit. + * Keep the buffer but provide a truncated size value. + */ + xmlBufOverflowError(buf, "Allocated size too big for xmlBuffer"); + ret->size = INT_MAX; + } + ret->use = (int) buf->use; + ret->size = (int) buf->size; + ret->alloc = buf->alloc; + ret->content = buf->content; + ret->contentIO = buf->contentIO; + xmlFree(buf); + return(ret); +} + +/** + * xmlBufMergeBuffer: + * @buf: an xmlBufPtr + * @buffer: the buffer to consume into @buf + * + * The content of @buffer is appended to @buf and @buffer is freed + * + * Returns -1 in case of error, 0 otherwise, in any case @buffer is freed + */ +int +xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer) { + int ret = 0; + + if ((buf == NULL) || (buf->error)) { + xmlBufferFree(buffer); + return(-1); + } + CHECK_COMPAT(buf) + if ((buffer != NULL) && (buffer->content != NULL) && + (buffer->use > 0)) { + ret = xmlBufAdd(buf, buffer->content, buffer->use); + } + xmlBufferFree(buffer); + return(ret); +} + +/** + * xmlBufResetInput: + * @buf: an xmlBufPtr + * @input: an xmlParserInputPtr + * + * Update the input to use the current set of pointers from the buffer. + * + * Returns -1 in case of error, 0 otherwise + */ +int +xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input) { + if ((input == NULL) || (buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + input->base = input->cur = buf->content; + input->end = &buf->content[buf->use]; + return(0); +} + +/** + * xmlBufGetInputBase: + * @buf: an xmlBufPtr + * @input: an xmlParserInputPtr + * + * Get the base of the @input relative to the beginning of the buffer + * + * Returns the size_t corresponding to the displacement + */ +size_t +xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input) { + size_t base; + + if ((input == NULL) || (buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + base = input->base - buf->content; + /* + * We could do some pointer arythmetic checks but that's probably + * sufficient. + */ + if (base > buf->size) { + xmlBufOverflowError(buf, "Input reference outside of the buffer"); + base = 0; + } + return(base); +} + +/** + * xmlBufSetInputBaseCur: + * @buf: an xmlBufPtr + * @input: an xmlParserInputPtr + * @base: the base value relative to the beginning of the buffer + * @cur: the cur value relative to the beginning of the buffer + * + * Update the input to use the base and cur relative to the buffer + * after a possible reallocation of its content + * + * Returns -1 in case of error, 0 otherwise + */ +int +xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input, + size_t base, size_t cur) { + if ((input == NULL) || (buf == NULL) || (buf->error)) + return(-1); + CHECK_COMPAT(buf) + input->base = &buf->content[base]; + input->cur = input->base + cur; + input->end = &buf->content[buf->use]; + return(0); +} + +#define bottom_buf +#include "elfgcchack.h" diff --git a/buf.h b/buf.h new file mode 100644 index 0000000..e8c7715 --- /dev/null +++ b/buf.h @@ -0,0 +1,72 @@ +/* + * Summary: Internal Interfaces for memory buffers in libxml2 + * Description: this module describes most of the new xmlBuf buffer + * entry points, those are private routines, with a + * few exceptions exported in tree.h. This was added + * in 2.9.0. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_BUF_H__ +#define __XML_BUF_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +xmlBufPtr xmlBufCreate(void); +xmlBufPtr xmlBufCreateSize(size_t size); +xmlBufPtr xmlBufCreateStatic(void *mem, size_t size); + +int xmlBufSetAllocationScheme(xmlBufPtr buf, + xmlBufferAllocationScheme scheme); +int xmlBufGetAllocationScheme(xmlBufPtr buf); + +void xmlBufFree(xmlBufPtr buf); +void xmlBufEmpty(xmlBufPtr buf); + +/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */ +int xmlBufGrow(xmlBufPtr buf, int len); +int xmlBufInflate(xmlBufPtr buf, size_t len); +int xmlBufResize(xmlBufPtr buf, size_t len); + +int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len); +int xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len); +int xmlBufCat(xmlBufPtr buf, const xmlChar *str); +int xmlBufCCat(xmlBufPtr buf, const char *str); +int xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string); +int xmlBufWriteChar(xmlBufPtr buf, const char *string); +int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string); + +size_t xmlBufAvail(const xmlBufPtr buf); +size_t xmlBufLength(const xmlBufPtr buf); +/* size_t xmlBufUse(const xmlBufPtr buf); */ +int xmlBufIsEmpty(const xmlBufPtr buf); +int xmlBufAddLen(xmlBufPtr buf, size_t len); +int xmlBufErase(xmlBufPtr buf, size_t len); + +/* const xmlChar * xmlBufContent(const xmlBufPtr buf); */ +/* const xmlChar * xmlBufEnd(const xmlBufPtr buf); */ + +xmlChar * xmlBufDetach(xmlBufPtr buf); + +size_t xmlBufDump(FILE *file, xmlBufPtr buf); + +xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer); +xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf); +int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer); + +int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input); +size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input); +int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input, + size_t base, size_t cur); +#ifdef __cplusplus +} +#endif +#endif /* __XML_BUF_H__ */ + diff --git a/c14n.c b/c14n.c index 9c3cad2..afd95b3 100644 --- a/c14n.c +++ b/c14n.c @@ -1,12 +1,12 @@ /* - * "Canonical XML" implementation + * "Canonical XML" implementation * http://www.w3.org/TR/xml-c14n - * + * * "Exclusive XML Canonicalization" implementation * http://www.w3.org/TR/xml-exc-c14n * * See Copyright for the status of this software. - * + * * Author: Aleksey Sanin */ #define IN_LIBXML @@ -27,6 +27,8 @@ #include #include +#include "buf.h" + /************************************************************************ * * * Some declaration better left private ATM * @@ -44,7 +46,7 @@ typedef struct _xmlC14NVisibleNsStack { int nsPrevStart; /* the begginning of the stack for previous visible node */ int nsPrevEnd; /* the end of the stack for previous visible node */ int nsMax; /* size of the array as allocated */ - xmlNsPtr *nsTab; /* array of ns in no particular order */ + xmlNsPtr *nsTab; /* array of ns in no particular order */ xmlNodePtr *nodeTab; /* array of nodes in no particular order */ } xmlC14NVisibleNsStack, *xmlC14NVisibleNsStackPtr; @@ -52,7 +54,7 @@ typedef struct _xmlC14NCtx { /* input parameters */ xmlDocPtr doc; xmlC14NIsVisibleCallback is_visible_callback; - void* user_data; + void* user_data; int with_comments; xmlOutputBufferPtr buf; @@ -60,7 +62,7 @@ typedef struct _xmlC14NCtx { xmlC14NPosition pos; int parent_is_doc; xmlC14NVisibleNsStackPtr ns_rendered; - + /* C14N mode */ xmlC14NMode mode; @@ -73,17 +75,17 @@ typedef struct _xmlC14NCtx { static xmlC14NVisibleNsStackPtr xmlC14NVisibleNsStackCreate (void); static void xmlC14NVisibleNsStackDestroy (xmlC14NVisibleNsStackPtr cur); -static void xmlC14NVisibleNsStackAdd (xmlC14NVisibleNsStackPtr cur, +static void xmlC14NVisibleNsStackAdd (xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr node); -static void xmlC14NVisibleNsStackSave (xmlC14NVisibleNsStackPtr cur, +static void xmlC14NVisibleNsStackSave (xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state); -static void xmlC14NVisibleNsStackRestore (xmlC14NVisibleNsStackPtr cur, +static void xmlC14NVisibleNsStackRestore (xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state); -static void xmlC14NVisibleNsStackShift (xmlC14NVisibleNsStackPtr cur); -static int xmlC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur, +static void xmlC14NVisibleNsStackShift (xmlC14NVisibleNsStackPtr cur); +static int xmlC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns); -static int xmlExcC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur, +static int xmlExcC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NCtxPtr ctx); @@ -105,26 +107,26 @@ typedef enum { static xmlChar *xmlC11NNormalizeString(const xmlChar * input, xmlC14NNormalizationMode mode); -#define xmlC11NNormalizeAttr( a ) \ +#define xmlC11NNormalizeAttr( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_ATTR) -#define xmlC11NNormalizeComment( a ) \ +#define xmlC11NNormalizeComment( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_COMMENT) -#define xmlC11NNormalizePI( a ) \ +#define xmlC11NNormalizePI( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_PI) -#define xmlC11NNormalizeText( a ) \ +#define xmlC11NNormalizeText( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_TEXT) -#define xmlC14NIsVisible( ctx, node, parent ) \ +#define xmlC14NIsVisible( ctx, node, parent ) \ (((ctx)->is_visible_callback != NULL) ? \ (ctx)->is_visible_callback((ctx)->user_data, \ (xmlNodePtr)(node), (xmlNodePtr)(parent)) : 1) -#define xmlC14NIsExclusive( ctx ) \ +#define xmlC14NIsExclusive( ctx ) \ ( (ctx)->mode == XML_C14N_EXCLUSIVE_1_0 ) /************************************************************************ * * - * Some factorized error routines * + * Some factorized error routines * * * ************************************************************************/ @@ -249,25 +251,25 @@ xmlC14NErr(xmlC14NCtxPtr ctxt, xmlNodePtr node, int error, ************************************************************************/ #define XML_NAMESPACES_DEFAULT 16 -static int +static int xmlC14NIsNodeInNodeset(xmlNodeSetPtr nodes, xmlNodePtr node, xmlNodePtr parent) { if((nodes != NULL) && (node != NULL)) { if(node->type != XML_NAMESPACE_DECL) { return(xmlXPathNodeSetContains(nodes, node)); } else { xmlNs ns; - - memcpy(&ns, node, sizeof(ns)); - + + memcpy(&ns, node, sizeof(ns)); + /* this is a libxml hack! check xpath.c for details */ if((parent != NULL) && (parent->type == XML_ATTRIBUTE_NODE)) { ns.next = (xmlNsPtr)parent->parent; } else { - ns.next = (xmlNsPtr)parent; + ns.next = (xmlNsPtr)parent; } - /* - * If the input is an XPath node-set, then the node-set must explicitly + /* + * If the input is an XPath node-set, then the node-set must explicitly * contain every node to be rendered to the canonical form. */ return(xmlXPathNodeSetContains(nodes, (xmlNodePtr)&ns)); @@ -305,12 +307,12 @@ xmlC14NVisibleNsStackDestroy(xmlC14NVisibleNsStackPtr cur) { } memset(cur, 0, sizeof(xmlC14NVisibleNsStack)); xmlFree(cur); - + } -static void +static void xmlC14NVisibleNsStackAdd(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr node) { - if((cur == NULL) || + if((cur == NULL) || ((cur->nsTab == NULL) && (cur->nodeTab != NULL)) || ((cur->nsTab != NULL) && (cur->nodeTab == NULL))) { xmlC14NErrParam("adding namespace to stack"); @@ -328,9 +330,9 @@ xmlC14NVisibleNsStackAdd(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr n memset(cur->nodeTab, 0 , XML_NAMESPACES_DEFAULT * sizeof(xmlNodePtr)); cur->nsMax = XML_NAMESPACES_DEFAULT; } else if(cur->nsMax == cur->nsCurEnd) { - void *tmp; + void *tmp; int tmpSize; - + tmpSize = 2 * cur->nsMax; tmp = xmlRealloc(cur->nsTab, tmpSize * sizeof(xmlNsPtr)); if (tmp == NULL) { @@ -360,7 +362,7 @@ xmlC14NVisibleNsStackSave(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr xmlC14NErrParam("saving namespaces stack"); return; } - + state->nsCurEnd = cur->nsCurEnd; state->nsPrevStart = cur->nsPrevStart; state->nsPrevEnd = cur->nsPrevEnd; @@ -377,7 +379,7 @@ xmlC14NVisibleNsStackRestore(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStack cur->nsPrevEnd = state->nsPrevEnd; } -static void +static void xmlC14NVisibleNsStackShift(xmlC14NVisibleNsStackPtr cur) { if(cur == NULL) { xmlC14NErrParam("shifting namespaces stack"); @@ -400,7 +402,7 @@ xmlC14NStrEqual(const xmlChar *str1, const xmlChar *str2) { /** * xmlC14NVisibleNsStackFind: - * @ctx: the C14N context + * @ctx: the C14N context * @ns: the namespace to check * * Checks whether the given namespace was already rendered or not @@ -414,14 +416,14 @@ xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns) const xmlChar *prefix; const xmlChar *href; int has_empty_ns; - + if(cur == NULL) { xmlC14NErrParam("searching namespaces stack (c14n)"); return (0); } /* - * if the default namespace xmlns="" is not defined yet then + * if the default namespace xmlns="" is not defined yet then * we do not want to print it out */ prefix = ((ns == NULL) || (ns->prefix == NULL)) ? BAD_CAST "" : ns->prefix; @@ -432,7 +434,7 @@ xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns) int start = (has_empty_ns) ? 0 : cur->nsPrevStart; for (i = cur->nsCurEnd - 1; i >= start; --i) { xmlNsPtr ns1 = cur->nsTab[i]; - + if(xmlC14NStrEqual(prefix, (ns1 != NULL) ? ns1->prefix : NULL)) { return(xmlC14NStrEqual(href, (ns1 != NULL) ? ns1->href : NULL)); } @@ -441,20 +443,20 @@ xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns) return(has_empty_ns); } -static int +static int xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NCtxPtr ctx) { int i; const xmlChar *prefix; const xmlChar *href; int has_empty_ns; - + if(cur == NULL) { xmlC14NErrParam("searching namespaces stack (exc c14n)"); return (0); } /* - * if the default namespace xmlns="" is not defined yet then + * if the default namespace xmlns="" is not defined yet then * we do not want to print it out */ prefix = ((ns == NULL) || (ns->prefix == NULL)) ? BAD_CAST "" : ns->prefix; @@ -465,10 +467,10 @@ xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NC int start = 0; for (i = cur->nsCurEnd - 1; i >= start; --i) { xmlNsPtr ns1 = cur->nsTab[i]; - + if(xmlC14NStrEqual(prefix, (ns1 != NULL) ? ns1->prefix : NULL)) { if(xmlC14NStrEqual(href, (ns1 != NULL) ? ns1->href : NULL)) { - return(xmlC14NIsVisible(ctx, ns1, cur->nodeTab[i])); + return(xmlC14NIsVisible(ctx, ns1, cur->nodeTab[i])); } else { return(0); } @@ -483,8 +485,8 @@ xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NC /** * xmlC14NIsXmlNs: - * @ns: the namespace to check - * + * @ns: the namespace to check + * * Checks whether the given namespace is a default "xml:" namespace * with href="http://www.w3.org/XML/1998/namespace" * @@ -504,7 +506,7 @@ xmlC14NIsXmlNs(xmlNsPtr ns) /** * xmlC14NNsCompare: * @ns1: the pointer to first namespace - * @ns2: the pointer to second namespace + * @ns2: the pointer to second namespace * * Compares the namespaces by names (prefixes). * @@ -527,7 +529,7 @@ xmlC14NNsCompare(xmlNsPtr ns1, xmlNsPtr ns2) /** * xmlC14NPrintNamespaces: * @ns: the pointer to namespace - * @ctx: the C14N context + * @ctx: the C14N context * * Prints the given namespace to the output buffer from C14N context. * @@ -558,39 +560,39 @@ xmlC14NPrintNamespaces(const xmlNsPtr ns, xmlC14NCtxPtr ctx) /** * xmlC14NProcessNamespacesAxis: - * @ctx: the C14N context + * @ctx: the C14N context * @node: the current node * * Prints out canonical namespace axis of the current node to the - * buffer from C14N context as follows + * buffer from C14N context as follows * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * * Namespace Axis - * Consider a list L containing only namespace nodes in the - * axis and in the node-set in lexicographic order (ascending). To begin - * processing L, if the first node is not the default namespace node (a node - * with no namespace URI and no local name), then generate a space followed + * Consider a list L containing only namespace nodes in the + * axis and in the node-set in lexicographic order (ascending). To begin + * processing L, if the first node is not the default namespace node (a node + * with no namespace URI and no local name), then generate a space followed * by xmlns="" if and only if the following conditions are met: * - the element E that owns the axis is in the node-set - * - The nearest ancestor element of E in the node-set has a default - * namespace node in the node-set (default namespace nodes always + * - The nearest ancestor element of E in the node-set has a default + * namespace node in the node-set (default namespace nodes always * have non-empty values in XPath) - * The latter condition eliminates unnecessary occurrences of xmlns="" in - * the canonical form since an element only receives an xmlns="" if its - * default namespace is empty and if it has an immediate parent in the - * canonical form that has a non-empty default namespace. To finish - * processing L, simply process every namespace node in L, except omit - * namespace node with local name xml, which defines the xml prefix, + * The latter condition eliminates unnecessary occurrences of xmlns="" in + * the canonical form since an element only receives an xmlns="" if its + * default namespace is empty and if it has an immediate parent in the + * canonical form that has a non-empty default namespace. To finish + * processing L, simply process every namespace node in L, except omit + * namespace node with local name xml, which defines the xml prefix, * if its string value is http://www.w3.org/XML/1998/namespace. * * Exclusive XML Canonicalization v 1.0 (http://www.w3.org/TR/xml-exc-c14n) - * Canonical XML applied to a document subset requires the search of the - * ancestor nodes of each orphan element node for attributes in the xml - * namespace, such as xml:lang and xml:space. These are copied into the - * element node except if a declaration of the same attribute is already - * in the attribute axis of the element (whether or not it is included in - * the document subset). This search and copying are omitted from the + * Canonical XML applied to a document subset requires the search of the + * ancestor nodes of each orphan element node for attributes in the xml + * namespace, such as xml:lang and xml:space. These are copied into the + * element node except if a declaration of the same attribute is already + * in the attribute axis of the element (whether or not it is included in + * the document subset). This search and copying are omitted from the * Exclusive XML Canonicalization method. * * Returns 0 on success or -1 on fail. @@ -603,7 +605,7 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) xmlListPtr list; int already_rendered; int has_empty_ns = 0; - + if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { xmlC14NErrParam("processing namespaces axis (c14n)"); return (-1); @@ -622,29 +624,29 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) for(n = cur; n != NULL; n = n->parent) { for(ns = n->nsDef; ns != NULL; ns = ns->next) { tmp = xmlSearchNs(cur->doc, cur, ns->prefix); - + if((tmp == ns) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) { already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns); if(visible) { - xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); + xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); } if(!already_rendered) { - xmlListInsert(list, ns); + xmlListInsert(list, ns); } - if(xmlStrlen(ns->prefix) == 0) { + if(xmlStrlen(ns->prefix) == 0) { has_empty_ns = 1; } } } } - + /** - * if the first node is not the default namespace node (a node with no - * namespace URI and no local name), then generate a space followed by + * if the first node is not the default namespace node (a node with no + * namespace URI and no local name), then generate a space followed by * xmlns="" if and only if the following conditions are met: * - the element E that owns the axis is in the node-set - * - the nearest ancestor element of E in the node-set has a default - * namespace node in the node-set (default namespace nodes always + * - the nearest ancestor element of E in the node-set has a default + * namespace node in the node-set (default namespace nodes always * have non-empty values in XPath) */ if(visible && !has_empty_ns) { @@ -652,17 +654,17 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) memset(&ns_default, 0, sizeof(ns_default)); if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) { - xmlC14NPrintNamespaces(&ns_default, ctx); + xmlC14NPrintNamespaces(&ns_default, ctx); } } - - - /* - * print out all elements from list + + + /* + * print out all elements from list */ xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx); - /* + /* * Cleanup */ xmlListDelete(list); @@ -672,28 +674,28 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) /** * xmlExcC14NProcessNamespacesAxis: - * @ctx: the C14N context + * @ctx: the C14N context * @node: the current node * * Prints out exclusive canonical namespace axis of the current node to the - * buffer from C14N context as follows + * buffer from C14N context as follows * * Exclusive XML Canonicalization * http://www.w3.org/TR/xml-exc-c14n * - * If the element node is in the XPath subset then output the node in - * accordance with Canonical XML except for namespace nodes which are + * If the element node is in the XPath subset then output the node in + * accordance with Canonical XML except for namespace nodes which are * rendered as follows: * * 1. Render each namespace node iff: - * * it is visibly utilized by the immediate parent element or one of + * * it is visibly utilized by the immediate parent element or one of * its attributes, or is present in InclusiveNamespaces PrefixList, and - * * its prefix and value do not appear in ns_rendered. ns_rendered is - * obtained by popping the state stack in order to obtain a list of - * prefixes and their values which have already been rendered by + * * its prefix and value do not appear in ns_rendered. ns_rendered is + * obtained by popping the state stack in order to obtain a list of + * prefixes and their values which have already been rendered by * an output ancestor of the namespace node's parent element. - * 2. Append the rendered namespace node to the list ns_rendered of namespace - * nodes rendered by output ancestors. Push ns_rendered on state stack and + * 2. Append the rendered namespace node to the list ns_rendered of namespace + * nodes rendered by output ancestors. Push ns_rendered on state stack and * recurse. * 3. After the recursion returns, pop thestate stack. * @@ -710,7 +712,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) int has_empty_ns = 0; int has_visibly_utilized_empty_ns = 0; int has_empty_ns_in_inclusive_list = 0; - + if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { xmlC14NErrParam("processing namespaces axis (exc c14n)"); return (-1); @@ -731,15 +733,15 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) return (-1); } - /* + /* * process inclusive namespaces: - * All namespace nodes appearing on inclusive ns list are + * All namespace nodes appearing on inclusive ns list are * handled as provided in Canonical XML */ if(ctx->inclusive_ns_prefixes != NULL) { - xmlChar *prefix; + xmlChar *prefix; int i; - + for (i = 0; ctx->inclusive_ns_prefixes[i] != NULL; ++i) { prefix = ctx->inclusive_ns_prefixes[i]; /* @@ -750,23 +752,23 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) prefix = NULL; has_empty_ns_in_inclusive_list = 1; } - - ns = xmlSearchNs(cur->doc, cur, prefix); + + ns = xmlSearchNs(cur->doc, cur, prefix); if((ns != NULL) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) { already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns); if(visible) { - xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); + xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); } if(!already_rendered) { - xmlListInsert(list, ns); + xmlListInsert(list, ns); } - if(xmlStrlen(ns->prefix) == 0) { + if(xmlStrlen(ns->prefix) == 0) { has_empty_ns = 1; } } } } - + /* add node namespace */ if(cur->ns != NULL) { ns = cur->ns; @@ -775,32 +777,32 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) has_visibly_utilized_empty_ns = 1; } if((ns != NULL) && !xmlC14NIsXmlNs(ns)) { - if(visible && xmlC14NIsVisible(ctx, ns, cur)) { + if(visible && xmlC14NIsVisible(ctx, ns, cur)) { if(!xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, ns, ctx)) { xmlListInsert(list, ns); } } if(visible) { - xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); + xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); } if(xmlStrlen(ns->prefix) == 0) { has_empty_ns = 1; } } - - + + /* add attributes */ for(attr = cur->properties; attr != NULL; attr = attr->next) { - /* + /* * we need to check that attribute is visible and has non - * default namespace (XML Namespaces: "default namespaces - * do not apply directly to attributes") + * default namespace (XML Namespaces: "default namespaces + * do not apply directly to attributes") */ if((attr->ns != NULL) && !xmlC14NIsXmlNs(attr->ns) && xmlC14NIsVisible(ctx, attr, cur)) { already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx); - xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur); + xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur); if(!already_rendered && visible) { - xmlListInsert(list, attr->ns); + xmlListInsert(list, attr->ns); } if(xmlStrlen(attr->ns->prefix) == 0) { has_empty_ns = 1; @@ -813,33 +815,33 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) /* * Process xmlns="" */ - if(visible && has_visibly_utilized_empty_ns && + if(visible && has_visibly_utilized_empty_ns && !has_empty_ns && !has_empty_ns_in_inclusive_list) { static xmlNs ns_default; memset(&ns_default, 0, sizeof(ns_default)); - + already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default, ctx); if(!already_rendered) { - xmlC14NPrintNamespaces(&ns_default, ctx); + xmlC14NPrintNamespaces(&ns_default, ctx); } } else if(visible && !has_empty_ns && has_empty_ns_in_inclusive_list) { static xmlNs ns_default; memset(&ns_default, 0, sizeof(ns_default)); if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) { - xmlC14NPrintNamespaces(&ns_default, ctx); + xmlC14NPrintNamespaces(&ns_default, ctx); } } - - /* - * print out all elements from list + + /* + * print out all elements from list */ xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx); - /* + /* * Cleanup */ xmlListDelete(list); @@ -849,8 +851,8 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) /** * xmlC14NIsXmlAttr: - * @attr: the attr to check - * + * @attr: the attr to check + * * Checks whether the given attribute is a default "xml:" namespace * with href="http://www.w3.org/XML/1998/namespace" * @@ -861,7 +863,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) static int xmlC14NIsXmlAttr(xmlAttrPtr attr) { - return ((attr->ns != NULL) && + return ((attr->ns != NULL) && (xmlC14NIsXmlNs(attr->ns) != 0)); } @@ -869,7 +871,7 @@ xmlC14NIsXmlAttr(xmlAttrPtr attr) /** * xmlC14NAttrsCompare: * @attr1: the pointer tls o first attr - * @attr2: the pointer to second attr + * @attr2: the pointer to second attr * * Prints the given attribute to the output buffer from C14N context. * @@ -893,7 +895,7 @@ xmlC14NAttrsCompare(xmlAttrPtr attr1, xmlAttrPtr attr2) return (xmlStrcmp(attr1->name, attr2->name)); } - /* + /* * Attributes in the default namespace are first * because the default namespace is not applied to * unqualified attributes @@ -918,10 +920,10 @@ xmlC14NAttrsCompare(xmlAttrPtr attr1, xmlAttrPtr attr2) /** * xmlC14NPrintAttrs: * @attr: the pointer to attr - * @ctx: the C14N context + * @ctx: the C14N context * * Prints out canonical attribute urrent node to the - * buffer from C14N context as follows + * buffer from C14N context as follows * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * @@ -968,7 +970,7 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx) * xmlC14NFindHiddenParentAttr: * * Finds an attribute in a hidden parent node. - * + * * Returns a pointer to the attribute node (if found) or NULL otherwise. */ static xmlAttrPtr @@ -996,7 +998,7 @@ xmlC14NFindHiddenParentAttr(xmlC14NCtxPtr ctx, xmlNodePtr cur, const xmlChar * n */ static xmlAttrPtr xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr) -{ +{ xmlChar * res = NULL; xmlNodePtr cur; xmlAttrPtr attr; @@ -1028,9 +1030,9 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr) xmlC14NErrInternal("processing xml:base attribute - can't get attr value"); return (NULL); - } + } - /* we need to add '/' if our current base uri ends with '..' or '.' + /* we need to add '/' if our current base uri ends with '..' or '.' to ensure that we are forced to go "up" all the time */ tmp_str_len = xmlStrlen(tmp_str); if(tmp_str_len > 1 && tmp_str[tmp_str_len - 2] == '.') { @@ -1047,7 +1049,7 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr) } /* build uri */ - tmp_str2 = xmlBuildURI(res, tmp_str); + tmp_str2 = xmlBuildURI(res, tmp_str); if(tmp_str2 == NULL) { xmlFree(tmp_str); xmlFree(res); @@ -1080,7 +1082,7 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr) xmlC14NErrInternal("processing xml:base attribute - can't construct attribute"); return (NULL); } - + /* done */ xmlFree(res); return (attr); @@ -1088,33 +1090,33 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr) /** * xmlC14NProcessAttrsAxis: - * @ctx: the C14N context + * @ctx: the C14N context * @cur: the current node * @parent_visible: the visibility of parent node * @all_parents_visible: the visibility of all parent nodes * * Prints out canonical attribute axis of the current node to the - * buffer from C14N context as follows + * buffer from C14N context as follows * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * - * Attribute Axis - * In lexicographic order (ascending), process each node that + * Attribute Axis + * In lexicographic order (ascending), process each node that * is in the element's attribute axis and in the node-set. - * - * The processing of an element node E MUST be modified slightly - * when an XPath node-set is given as input and the element's + * + * The processing of an element node E MUST be modified slightly + * when an XPath node-set is given as input and the element's * parent is omitted from the node-set. * * * Exclusive XML Canonicalization v 1.0 (http://www.w3.org/TR/xml-exc-c14n) * - * Canonical XML applied to a document subset requires the search of the - * ancestor nodes of each orphan element node for attributes in the xml - * namespace, such as xml:lang and xml:space. These are copied into the - * element node except if a declaration of the same attribute is already - * in the attribute axis of the element (whether or not it is included in - * the document subset). This search and copying are omitted from the + * Canonical XML applied to a document subset requires the search of the + * ancestor nodes of each orphan element node for attributes in the xml + * namespace, such as xml:lang and xml:space. These are copied into the + * element node except if a declaration of the same attribute is already + * in the attribute axis of the element (whether or not it is included in + * the document subset). This search and copying are omitted from the * Exclusive XML Canonicalization method. * * Returns 0 on success or -1 on fail. @@ -1123,9 +1125,9 @@ static int xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) { xmlAttrPtr attr; - xmlListPtr list; + xmlListPtr list; xmlAttrPtr attrs_to_delete = NULL; - + /* special processing for 1.1 spec */ xmlAttrPtr xml_base_attr = NULL; xmlAttrPtr xml_lang_attr = NULL; @@ -1147,19 +1149,19 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) switch(ctx->mode) { case XML_C14N_1_0: - /* The processing of an element node E MUST be modified slightly when an XPath node-set is - * given as input and the element's parent is omitted from the node-set. The method for processing - * the attribute axis of an element E in the node-set is enhanced. All element nodes along E's - * ancestor axis are examined for nearest occurrences of attributes in the xml namespace, such - * as xml:lang and xml:space (whether or not they are in the node-set). From this list of attributes, - * remove any that are in E's attribute axis (whether or not they are in the node-set). Then, - * lexicographically merge this attribute list with the nodes of E's attribute axis that are in - * the node-set. The result of visiting the attribute axis is computed by processing the attribute - * nodes in this merged attribute list. + /* The processing of an element node E MUST be modified slightly when an XPath node-set is + * given as input and the element's parent is omitted from the node-set. The method for processing + * the attribute axis of an element E in the node-set is enhanced. All element nodes along E's + * ancestor axis are examined for nearest occurrences of attributes in the xml namespace, such + * as xml:lang and xml:space (whether or not they are in the node-set). From this list of attributes, + * remove any that are in E's attribute axis (whether or not they are in the node-set). Then, + * lexicographically merge this attribute list with the nodes of E's attribute axis that are in + * the node-set. The result of visiting the attribute axis is computed by processing the attribute + * nodes in this merged attribute list. */ - - /* - * Add all visible attributes from current node. + + /* + * Add all visible attributes from current node. */ attr = cur->properties; while (attr != NULL) { @@ -1170,16 +1172,16 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) attr = attr->next; } - /* + /* * Handle xml attributes */ - if (parent_visible && (cur->parent != NULL) && - (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) + if (parent_visible && (cur->parent != NULL) && + (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) { xmlNodePtr tmp; /* - * If XPath node-set is not specified then the parent is always + * If XPath node-set is not specified then the parent is always * visible! */ tmp = cur->parent; @@ -1200,12 +1202,12 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) /* done */ break; case XML_C14N_EXCLUSIVE_1_0: - /* attributes in the XML namespace, such as xml:lang and xml:space - * are not imported into orphan nodes of the document subset + /* attributes in the XML namespace, such as xml:lang and xml:space + * are not imported into orphan nodes of the document subset */ - /* - * Add all visible attributes from current node. + /* + * Add all visible attributes from current node. */ attr = cur->properties; while (attr != NULL) { @@ -1219,36 +1221,36 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) /* do nothing special for xml attributes */ break; case XML_C14N_1_1: - /* The processing of an element node E MUST be modified slightly when an XPath node-set is - * given as input and some of the element's ancestors are omitted from the node-set. + /* The processing of an element node E MUST be modified slightly when an XPath node-set is + * given as input and some of the element's ancestors are omitted from the node-set. * - * Simple inheritable attributes are attributes that have a value that requires at most a simple - * redeclaration. This redeclaration is done by supplying a new value in the child axis. The - * redeclaration of a simple inheritable attribute A contained in one of E's ancestors is done - * by supplying a value to an attribute Ae inside E with the same name. Simple inheritable attributes + * Simple inheritable attributes are attributes that have a value that requires at most a simple + * redeclaration. This redeclaration is done by supplying a new value in the child axis. The + * redeclaration of a simple inheritable attribute A contained in one of E's ancestors is done + * by supplying a value to an attribute Ae inside E with the same name. Simple inheritable attributes * are xml:lang and xml:space. - * - * The method for processing the attribute axis of an element E in the node-set is hence enhanced. - * All element nodes along E's ancestor axis are examined for the nearest occurrences of simple - * inheritable attributes in the xml namespace, such as xml:lang and xml:space (whether or not they - * are in the node-set). From this list of attributes, any simple inheritable attributes that are - * already in E's attribute axis (whether or not they are in the node-set) are removed. Then, - * lexicographically merge this attribute list with the nodes of E's attribute axis that are in - * the node-set. The result of visiting the attribute axis is computed by processing the attribute + * + * The method for processing the attribute axis of an element E in the node-set is hence enhanced. + * All element nodes along E's ancestor axis are examined for the nearest occurrences of simple + * inheritable attributes in the xml namespace, such as xml:lang and xml:space (whether or not they + * are in the node-set). From this list of attributes, any simple inheritable attributes that are + * already in E's attribute axis (whether or not they are in the node-set) are removed. Then, + * lexicographically merge this attribute list with the nodes of E's attribute axis that are in + * the node-set. The result of visiting the attribute axis is computed by processing the attribute * nodes in this merged attribute list. - * - * The xml:id attribute is not a simple inheritable attribute and no processing of these attributes is + * + * The xml:id attribute is not a simple inheritable attribute and no processing of these attributes is * performed. - * - * The xml:base attribute is not a simple inheritable attribute and requires special processing beyond + * + * The xml:base attribute is not a simple inheritable attribute and requires special processing beyond * a simple redeclaration. - * - * Attributes in the XML namespace other than xml:base, xml:id, xml:lang, and xml:space MUST be processed + * + * Attributes in the XML namespace other than xml:base, xml:id, xml:lang, and xml:space MUST be processed * as ordinary attributes. */ - /* - * Add all visible attributes from current node. + /* + * Add all visible attributes from current node. */ attr = cur->properties; while (attr != NULL) { @@ -1265,7 +1267,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) if((!matched) && (xml_lang_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "lang")) { xml_lang_attr = attr; matched = 1; - } + } if((!matched) && (xml_space_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "space")) { xml_space_attr = attr; matched = 1; @@ -1282,11 +1284,11 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) xmlListInsert(list, attr); } } - + /* move to the next one */ attr = attr->next; } - + /* special processing for XML attribute kiks in only when we have invisible parents */ if ((parent_visible)) { @@ -1311,7 +1313,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) } if(xml_base_attr != NULL) { xml_base_attr = xmlC14NFixupBaseAttr(ctx, xml_base_attr); - if(xml_base_attr != NULL) { + if(xml_base_attr != NULL) { xmlListInsert(list, xml_base_attr); /* note that we MUST delete returned attr node ourselves! */ @@ -1325,12 +1327,12 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) break; } - /* - * print out all elements from list + /* + * print out all elements from list */ xmlListWalk(list, (xmlListWalker) xmlC14NPrintAttrs, (const void *) ctx); - /* + /* * Cleanup */ xmlFreePropList(attrs_to_delete); @@ -1338,7 +1340,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) return (0); } -/** +/** * xmlC14NCheckForRelativeNamespaces: * @ctx: the C14N context * @cur: the current element node @@ -1388,23 +1390,23 @@ xmlC14NCheckForRelativeNamespaces(xmlC14NCtxPtr ctx, xmlNodePtr cur) /** * xmlC14NProcessElementNode: - * @ctx: the pointer to C14N context object + * @ctx: the pointer to C14N context object * @cur: the node to process * @visible: this node is visible * @all_parents_visible: whether all the parents of this node are visible - * + * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * * Element Nodes - * If the element is not in the node-set, then the result is obtained - * by processing the namespace axis, then the attribute axis, then - * processing the child nodes of the element that are in the node-set - * (in document order). If the element is in the node-set, then the result - * is an open angle bracket (<), the element QName, the result of - * processing the namespace axis, the result of processing the attribute - * axis, a close angle bracket (>), the result of processing the child - * nodes of the element that are in the node-set (in document order), an - * open angle bracket, a forward slash (/), the element QName, and a close + * If the element is not in the node-set, then the result is obtained + * by processing the namespace axis, then the attribute axis, then + * processing the child nodes of the element that are in the node-set + * (in document order). If the element is in the node-set, then the result + * is an open angle bracket (<), the element QName, the result of + * processing the namespace axis, the result of processing the attribute + * axis, a close angle bracket (>), the result of processing the child + * nodes of the element that are in the node-set (in document order), an + * open angle bracket, a forward slash (/), the element QName, and a close * angle bracket. * * Returns non-negative value on success or negative value on fail @@ -1421,7 +1423,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) return (-1); } - /* + /* * Check relative relative namespaces: * implementations of XML canonicalization MUST report an operation * failure on documents containing relative namespace URIs. @@ -1432,13 +1434,13 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) } - /* + /* * Save ns_rendered stack position */ memset(&state, 0, sizeof(state)); xmlC14NVisibleNsStackSave(ctx->ns_rendered, &state); - if (visible) { + if (visible) { if (ctx->parent_is_doc) { /* save this flag into the stack */ parent_is_doc = ctx->parent_is_doc; @@ -1468,14 +1470,14 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) if(visible) { xmlC14NVisibleNsStackShift(ctx->ns_rendered); } - + ret = xmlC14NProcessAttrsAxis(ctx, cur, visible); if (ret < 0) { xmlC14NErrInternal("processing attributes axis"); - return (-1); + return (-1); } - if (visible) { + if (visible) { xmlOutputBufferWriteString(ctx->buf, ">"); } if (cur->children != NULL) { @@ -1501,7 +1503,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) } } - /* + /* * Restore ns_rendered stack position */ xmlC14NVisibleNsStackRestore(ctx->ns_rendered, &state); @@ -1510,9 +1512,9 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) /** * xmlC14NProcessNode: - * @ctx: the pointer to C14N context object + * @ctx: the pointer to C14N context object * @cur: the node to process - * + * * Processes the given node * * Returns non-negative value on success or negative value on fail @@ -1537,9 +1539,9 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur) case XML_TEXT_NODE: /* * Text Nodes - * the string value, except all ampersands are replaced - * by &, all open angle brackets (<) are replaced by <, all closing - * angle brackets (>) are replaced by >, and all #xD characters are + * the string value, except all ampersands are replaced + * by &, all open angle brackets (<) are replaced by <, all closing + * angle brackets (>) are replaced by >, and all #xD characters are * replaced by . */ /* cdata sections are processed as text nodes */ @@ -1559,16 +1561,16 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur) } break; case XML_PI_NODE: - /* - * Processing Instruction (PI) Nodes- - * The opening PI symbol (). If the string value is empty, - * then the leading space is not added. Also, a trailing #xA is - * rendered after the closing PI symbol for PI children of the - * root node with a lesser document order than the document - * element, and a leading #xA is rendered before the opening PI - * symbol of PI children of the root node with a greater document + /* + * Processing Instruction (PI) Nodes- + * The opening PI symbol (). If the string value is empty, + * then the leading space is not added. Also, a trailing #xA is + * rendered after the closing PI symbol for PI children of the + * root node with a lesser document order than the document + * element, and a leading #xA is rendered before the opening PI + * symbol of PI children of the root node with a greater document * order than the document element. */ if (visible) { @@ -1607,17 +1609,17 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur) case XML_COMMENT_NODE: /* * Comment Nodes - * Nothing if generating canonical XML without comments. For - * canonical XML with comments, generate the opening comment - * symbol (). Also, a trailing #xA is rendered - * after the closing comment symbol for comment children of the - * root node with a lesser document order than the document - * element, and a leading #xA is rendered before the opening - * comment symbol of comment children of the root node with a - * greater document order than the document element. (Comment - * children of the root node represent comments outside of the - * top-level document element and outside of the document type + * Nothing if generating canonical XML without comments. For + * canonical XML with comments, generate the opening comment + * symbol (). Also, a trailing #xA is rendered + * after the closing comment symbol for comment children of the + * root node with a lesser document order than the document + * element, and a leading #xA is rendered before the opening + * comment symbol of comment children of the root node with a + * greater document order than the document element. (Comment + * children of the root node represent comments outside of the + * top-level document element and outside of the document type * declaration). */ if (visible && ctx->with_comments) { @@ -1687,8 +1689,8 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur) case XML_XINCLUDE_START: case XML_XINCLUDE_END: #endif - /* - * should be ignored according to "W3C Canonical XML" + /* + * should be ignored according to "W3C Canonical XML" */ break; default: @@ -1701,9 +1703,9 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur) /** * xmlC14NProcessNodeList: - * @ctx: the pointer to C14N context object + * @ctx: the pointer to C14N context object * @cur: the node to start from - * + * * Processes all nodes in the row starting from cur. * * Returns non-negative value on success or negative value on fail @@ -1728,7 +1730,7 @@ xmlC14NProcessNodeList(xmlC14NCtxPtr ctx, xmlNodePtr cur) /** * xmlC14NFreeCtx: * @ctx: the pointer to C14N context object - * + * * Cleanups the C14N context object. */ @@ -1748,27 +1750,27 @@ xmlC14NFreeCtx(xmlC14NCtxPtr ctx) /** * xmlC14NNewCtx: - * @doc: the XML document for canonization - * @is_visible_callback:the function to use to determine is node visible + * @doc: the XML document for canonization + * @is_visible_callback:the function to use to determine is node visible * or not - * @user_data: the first parameter for @is_visible_callback function + * @user_data: the first parameter for @is_visible_callback function * (in most cases, it is nodes set) * @mode: the c14n mode (see @xmlC14NMode) - * @inclusive_ns_prefixe the list of inclusive namespace prefixes + * @inclusive_ns_prefixe the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no - * inclusive namespaces (only for ` + * inclusive namespaces (only for ` * canonicalization) - * @with_comments: include comments in the result (!=0) or not (==0) - * @buf: the output buffer to store canonical XML; this + * @with_comments: include comments in the result (!=0) or not (==0) + * @buf: the output buffer to store canonical XML; this * buffer MUST have encoder==NULL because C14N requires * UTF-8 output - * + * * Creates new C14N context object to store C14N parameters. * * Returns pointer to newly created object (success) or NULL (fail) */ static xmlC14NCtxPtr -xmlC14NNewCtx(xmlDocPtr doc, +xmlC14NNewCtx(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, xmlC14NMode mode, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) @@ -1840,28 +1842,28 @@ xmlC14NNewCtx(xmlDocPtr doc, /** * xmlC14NExecute: - * @doc: the XML document for canonization - * @is_visible_callback:the function to use to determine is node visible + * @doc: the XML document for canonization + * @is_visible_callback:the function to use to determine is node visible * or not - * @user_data: the first parameter for @is_visible_callback function + * @user_data: the first parameter for @is_visible_callback function * (in most cases, it is nodes set) * @mode: the c14n mode (see @xmlC14NMode) - * @inclusive_ns_prefixes: the list of inclusive namespace prefixes + * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no - * inclusive namespaces (only for exclusive + * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) - * @with_comments: include comments in the result (!=0) or not (==0) - * @buf: the output buffer to store canonical XML; this + * @with_comments: include comments in the result (!=0) or not (==0) + * @buf: the output buffer to store canonical XML; this * buffer MUST have encoder==NULL because C14N requires * UTF-8 output - * + * * Dumps the canonized image of given XML document into the provided buffer. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * - * Returns non-negative value on success or a negative value on fail + * Returns non-negative value on success or a negative value on fail */ -int +int xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, int mode, xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { @@ -1875,15 +1877,15 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, return (-1); } - /* for backward compatibility, we have to have "mode" as "int" + /* for backward compatibility, we have to have "mode" as "int" and here we check that user gives valid value */ switch(mode) { case XML_C14N_1_0: case XML_C14N_EXCLUSIVE_1_0: - case XML_C14N_1_1: + case XML_C14N_1_1: c14n_mode = (xmlC14NMode)mode; break; - default: + default: xmlC14NErrParam("invalid mode for executing c14n"); return (-1); } @@ -1897,7 +1899,7 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, return (-1); } - ctx = xmlC14NNewCtx(doc, is_visible_callback, user_data, + ctx = xmlC14NNewCtx(doc, is_visible_callback, user_data, c14n_mode, inclusive_ns_prefixes, with_comments, buf); if (ctx == NULL) { @@ -1908,12 +1910,12 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, - /* + /* * Root Node - * The root node is the parent of the top-level document element. The - * result of processing each of its child nodes that is in the node-set - * in document order. The root node does not generate a byte order mark, - * XML declaration, nor anything from within the document type + * The root node is the parent of the top-level document element. The + * result of processing each of its child nodes that is in the node-set + * in document order. The root node does not generate a byte order mark, + * XML declaration, nor anything from within the document type * declaration. */ if (doc->children != NULL) { @@ -1935,7 +1937,7 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, return (-1); } - /* + /* * Cleanup */ xmlC14NFreeCtx(ctx); @@ -1944,30 +1946,30 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, /** * xmlC14NDocSaveTo: - * @doc: the XML document for canonization - * @nodes: the nodes set to be included in the canonized image - * or NULL if all document nodes should be included + * @doc: the XML document for canonization + * @nodes: the nodes set to be included in the canonized image + * or NULL if all document nodes should be included * @mode: the c14n mode (see @xmlC14NMode) - * @inclusive_ns_prefixes: the list of inclusive namespace prefixes + * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no - * inclusive namespaces (only for exclusive + * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) - * @with_comments: include comments in the result (!=0) or not (==0) - * @buf: the output buffer to store canonical XML; this + * @with_comments: include comments in the result (!=0) or not (==0) + * @buf: the output buffer to store canonical XML; this * buffer MUST have encoder==NULL because C14N requires * UTF-8 output - * + * * Dumps the canonized image of given XML document into the provided buffer. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * - * Returns non-negative value on success or a negative value on fail + * Returns non-negative value on success or a negative value on fail */ int xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes, int mode, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { - return(xmlC14NExecute(doc, + return(xmlC14NExecute(doc, (xmlC14NIsVisibleCallback)xmlC14NIsNodeInNodeset, nodes, mode, @@ -1979,24 +1981,24 @@ xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes, /** * xmlC14NDocDumpMemory: - * @doc: the XML document for canonization - * @nodes: the nodes set to be included in the canonized image - * or NULL if all document nodes should be included + * @doc: the XML document for canonization + * @nodes: the nodes set to be included in the canonized image + * or NULL if all document nodes should be included * @mode: the c14n mode (see @xmlC14NMode) - * @inclusive_ns_prefixes: the list of inclusive namespace prefixes + * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no - * inclusive namespaces (only for exclusive + * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) - * @with_comments: include comments in the result (!=0) or not (==0) - * @doc_txt_ptr: the memory pointer for allocated canonical XML text; + * @with_comments: include comments in the result (!=0) or not (==0) + * @doc_txt_ptr: the memory pointer for allocated canonical XML text; * the caller of this functions is responsible for calling - * xmlFree() to free allocated memory - * + * xmlFree() to free allocated memory + * * Dumps the canonized image of given XML document into memory. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * - * Returns the number of bytes written on success or a negative value on fail + * Returns the number of bytes written on success or a negative value on fail */ int xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, @@ -2014,7 +2016,7 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, *doc_txt_ptr = NULL; /* - * create memory buffer with UTF8 (default) encoding + * create memory buffer with UTF8 (default) encoding */ buf = xmlAllocOutputBuffer(NULL); if (buf == NULL) { @@ -2033,9 +2035,9 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, return (-1); } - ret = buf->buffer->use; + ret = xmlBufUse(buf->buffer); if (ret > 0) { - *doc_txt_ptr = xmlStrndup(buf->buffer->content, ret); + *doc_txt_ptr = xmlStrndup(xmlBufContent(buf->buffer), ret); } (void) xmlOutputBufferClose(buf); @@ -2048,26 +2050,26 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, /** * xmlC14NDocSave: - * @doc: the XML document for canonization - * @nodes: the nodes set to be included in the canonized image - * or NULL if all document nodes should be included + * @doc: the XML document for canonization + * @nodes: the nodes set to be included in the canonized image + * or NULL if all document nodes should be included * @mode: the c14n mode (see @xmlC14NMode) - * @inclusive_ns_prefixes: the list of inclusive namespace prefixes + * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no - * inclusive namespaces (only for exclusive + * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) - * @with_comments: include comments in the result (!=0) or not (==0) - * @filename: the filename to store canonical XML image - * @compression: the compression level (zlib requred): + * @with_comments: include comments in the result (!=0) or not (==0) + * @filename: the filename to store canonical XML image + * @compression: the compression level (zlib requred): * -1 - libxml default, - * 0 - uncompressed, + * 0 - uncompressed, * >0 - compression level - * + * * Dumps the canonized image of given XML document into the file. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * - * Returns the number of bytes written success or a negative value on fail + * Returns the number of bytes written success or a negative value on fail */ int xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes, @@ -2086,7 +2088,7 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes, compression = xmlGetCompressMode(); #endif - /* + /* * save the content to a temp buffer, use default UTF8 encoding. */ buf = xmlOutputBufferCreateFilename(filename, NULL, compression); @@ -2106,8 +2108,8 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes, return (-1); } - /* - * get the numbers of bytes written + /* + * get the numbers of bytes written */ ret = xmlOutputBufferClose(buf); return (ret); @@ -2121,14 +2123,14 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes, #define growBufferReentrant() { \ buffer_size *= 2; \ buffer = (xmlChar *) \ - xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \ + xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \ if (buffer == NULL) { \ xmlC14NErrMemory("growing buffer"); \ return(NULL); \ } \ } -/** +/** * xmlC11NNormalizeString: * @input: the input string * @mode: the normalization mode (attribute, comment, PI or text) diff --git a/catalog.c b/catalog.c index fb586c1..8e34cd2 100644 --- a/catalog.c +++ b/catalog.c @@ -1,5 +1,5 @@ /** - * catalog.c: set of generic Catalog related routines + * catalog.c: set of generic Catalog related routines * * Reference: SGML Open Technical Resolution TR9401:1997. * http://www.jclark.com/sp/catalog.htm @@ -41,6 +41,8 @@ #include #include +#include "buf.h" + #define MAX_DELEGATE 50 #define MAX_CATAL_DEPTH 50 @@ -60,7 +62,7 @@ *> values "system" and "public". I have made the default be "system" to *> match yours. */ -#define TODO \ +#define TODO \ xmlGenericError(xmlGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); @@ -82,10 +84,12 @@ static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog"; #define GetModuleHandleA GetModuleHandle #define GetModuleFileNameA GetModuleFileName #else +#if !defined(_WINDOWS_) void* __stdcall GetModuleHandleA(const char*); unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long); #endif #endif +#endif static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID); static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename); @@ -206,7 +210,7 @@ static int xmlCatalogInitialized = 0; /************************************************************************ * * - * Catalog error handlers * + * Catalog error handlers * * * ************************************************************************/ @@ -259,9 +263,9 @@ xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error, * @name: name of the entry * @value: value of the entry * @prefer: the PUBLIC vs. SYSTEM current preference value - * @group: for members of a group, the group entry + * @group: for members of a group, the group entry * - * create a new Catalog entry, this type is shared both by XML and + * create a new Catalog entry, this type is shared both by XML and * SGML catalogs, but the acceptable types values differs. * * Returns the xmlCatalogEntryPtr or NULL in case of error @@ -399,7 +403,7 @@ xmlFreeCatalogHashEntryList(xmlCatalogEntryPtr catal) { * @type: type of catalog * @prefer: the PUBLIC vs. SYSTEM current preference value * - * create a new Catalog, this type is shared both by XML and + * create a new Catalog, this type is shared both by XML and * SGML catalogs, but the acceptable types values differs. * * Returns the xmlCatalogPtr or NULL in case of error @@ -567,7 +571,7 @@ static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog, xns = xmlSearchNsByHref(doc, node, XML_XML_NAMESPACE); if (xns != NULL) xmlSetNsProp(node, xns, BAD_CAST "base", - cur->value); + cur->value); } switch (cur->prefer) { case XML_CATA_PREFER_NONE: @@ -685,7 +689,7 @@ BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"); xmlAddChild((xmlNodePtr) doc, catalog); xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL); - + /* * reserialize it */ @@ -822,7 +826,7 @@ xmlCatalogUnWrapURN(const xmlChar *urn) { if (xmlStrncmp(urn, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) return(NULL); urn += sizeof(XML_URN_PUBID) - 1; - + while (*urn != 0) { if (i > sizeof(result) - 4) break; @@ -912,10 +916,7 @@ xmlParseCatalogFile(const char *filename) { inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename); inputStream->buf = buf; - inputStream->base = inputStream->buf->buffer->content; - inputStream->cur = inputStream->buf->buffer->content; - inputStream->end = - &inputStream->buf->buffer->content[inputStream->buf->buffer->use]; + xmlBufResetInput(buf->buffer, inputStream); inputPush(ctxt, inputStream); if ((ctxt->directory == NULL) && (directory == NULL)) @@ -938,7 +939,7 @@ xmlParseCatalogFile(const char *filename) { ctxt->myDoc = NULL; } xmlFreeParserCtxt(ctxt); - + return(ret); } @@ -990,7 +991,7 @@ xmlLoadFileContent(const char *filename) return (NULL); } #endif - content = xmlMallocAtomic(size + 10); + content = (xmlChar*)xmlMallocAtomic(size + 10); if (content == NULL) { xmlCatalogErrMemory("allocating catalog data"); return (NULL); @@ -1328,7 +1329,7 @@ xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer, * * Parses the catalog file to extract the XML tree and then analyze the * tree to build a list of Catalog entries corresponding to this catalog - * + * * Returns the resulting Catalog entries list */ static xmlCatalogEntryPtr @@ -1396,14 +1397,14 @@ xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) { * @catal: an existing but incomplete catalog entry * * Fetch and parse the subcatalog referenced by an entry - * + * * Returns 0 in case of success, -1 otherwise */ static int xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) { xmlCatalogEntryPtr doc; - if (catal == NULL) + if (catal == NULL) return(-1); if (catal->URL == NULL) return(-1); @@ -1495,7 +1496,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type, xmlCatalogEntryType typ; int doregister = 0; - if ((catal == NULL) || + if ((catal == NULL) || ((catal->type != XML_CATA_CATALOG) && (catal->type != XML_CATA_BROKEN_CATALOG))) return(-1); @@ -1548,7 +1549,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type, NULL, catal->prefer, NULL); if (doregister) { catal->type = XML_CATA_CATALOG; - cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL); + cur = (xmlCatalogEntryPtr)xmlHashLookup(xmlCatalogXMLFiles, catal->URL); if (cur != NULL) cur->children = catal->children; } @@ -1571,7 +1572,7 @@ xmlDelXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *value) { xmlCatalogEntryPtr cur; int ret = 0; - if ((catal == NULL) || + if ((catal == NULL) || ((catal->type != XML_CATA_CATALOG) && (catal->type != XML_CATA_BROKEN_CATALOG))) return(-1); @@ -1786,7 +1787,7 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, } if (nbList < MAX_DELEGATE) delegates[nbList++] = cur->URL; - + if (cur->children == NULL) { xmlFetchXMLCatalogFile(cur); } @@ -1999,7 +2000,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, xmlChar *ret = NULL; xmlChar *urnID = NULL; xmlChar *normid; - + if (catal == NULL) return(NULL); if ((pubID == NULL) && (sysID == NULL)) @@ -2008,7 +2009,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, normid = xmlCatalogNormalizePublic(pubID); if (normid != NULL) pubID = (*normid != 0 ? normid : NULL); - + if (!xmlStrncmp(pubID, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) { urnID = xmlCatalogUnWrapURN(pubID); if (xmlDebugCatalogs) { @@ -2088,7 +2089,7 @@ static xmlChar * xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) { xmlChar *ret = NULL; xmlChar *urnID = NULL; - + if (catal == NULL) return(NULL); if (URI == NULL) @@ -2148,7 +2149,7 @@ xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) { */ static const xmlChar * xmlParseSGMLCatalogComment(const xmlChar *cur) { - if ((cur[0] != '-') || (cur[1] != '-')) + if ((cur[0] != '-') || (cur[1] != '-')) return(cur); SKIP(2); while ((cur[0] != 0) && ((cur[0] != '-') || ((cur[1] != '-')))) @@ -2683,7 +2684,7 @@ xmlLoadACatalog(const char *filename) first = content; - + while ((*first != 0) && (*first != '-') && (*first != '<') && (!(((*first >= 'A') && (*first <= 'Z')) || ((*first >= 'a') && (*first <= 'z'))))) @@ -2778,7 +2779,7 @@ xmlACatalogResolveSystem(xmlCatalogPtr catal, const xmlChar *sysID) { if ((sysID == NULL) || (catal == NULL)) return(NULL); - + if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Resolve sysID %s\n", sysID); @@ -2813,7 +2814,7 @@ xmlACatalogResolvePublic(xmlCatalogPtr catal, const xmlChar *pubID) { if ((pubID == NULL) || (catal == NULL)) return(NULL); - + if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Resolve pubID %s\n", pubID); @@ -2932,7 +2933,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) { } else { xmlHashScan(catal->sgml, (xmlHashScanner) xmlCatalogDumpEntry, out); - } + } } #endif /* LIBXML_OUTPUT_ENABLED */ @@ -2940,7 +2941,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) { * xmlACatalogAdd: * @catal: a Catalog * @type: the type of record to add to the catalog - * @orig: the system, public or prefix to match + * @orig: the system, public or prefix to match * @replace: the replacement value for the match * * Add an entry in the catalog, it may overwrite existing but @@ -2999,7 +3000,7 @@ xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) { (xmlHashDeallocator) xmlFreeCatalogEntry); if (res == 0) res = 1; - } + } return(res); } @@ -3058,7 +3059,7 @@ xmlCatalogIsEmpty(xmlCatalogPtr catal) { return(1); if (res < 0) return(-1); - } + } return(0); } @@ -3081,7 +3082,7 @@ xmlInitializeCatalogData(void) { if (xmlCatalogInitialized != 0) return; - if (getenv("XML_DEBUG_CATALOG")) + if (getenv("XML_DEBUG_CATALOG")) xmlDebugCatalogs = 1; xmlCatalogMutex = xmlNewRMutex(); @@ -3102,7 +3103,7 @@ xmlInitializeCatalog(void) { xmlInitializeCatalogData(); xmlRMutexLock(xmlCatalogMutex); - if (getenv("XML_DEBUG_CATALOG")) + if (getenv("XML_DEBUG_CATALOG")) xmlDebugCatalogs = 1; if (xmlDefaultCatalog == NULL) { @@ -3125,12 +3126,12 @@ xmlInitializeCatalog(void) { unsigned long len = GetModuleFileNameA(hmodule, buf, 255); if (len != 0) { char* p = &(buf[len]); - while (*p != '\\' && p > buf) + while (*p != '\\' && p > buf) p--; if (p != buf) { xmlChar* uri; strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf)); - uri = xmlCanonicPath(buf); + uri = xmlCanonicPath((const xmlChar*)buf); if (uri != NULL) { strncpy(XML_XML_DEFAULT_CATALOG, uri, 255); xmlFree(uri); @@ -3144,15 +3145,15 @@ xmlInitializeCatalog(void) { catalogs = XML_XML_DEFAULT_CATALOG; #endif - catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, + catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer); if (catal != NULL) { - /* the XML_CATALOG_FILES envvar is allowed to contain a + /* the XML_CATALOG_FILES envvar is allowed to contain a space-separated list of entries. */ cur = catalogs; nextent = &catal->xml; while (*cur != '\0') { - while (xmlIsBlank_ch(*cur)) + while (xmlIsBlank_ch(*cur)) cur++; if (*cur != 0) { paths = cur; @@ -3245,7 +3246,7 @@ xmlLoadCatalogs(const char *pathss) { cur++; path = xmlStrndup((const xmlChar *)paths, cur - paths); #ifdef _WIN32 - iLen = strlen(path); + iLen = strlen((const char*)path); for(i = 0; i < iLen; i++) { if(path[i] == '\\') { path[i] = '/'; @@ -3277,7 +3278,7 @@ xmlCatalogCleanup(void) { xmlGenericError(xmlGenericErrorContext, "Catalogs cleanup\n"); if (xmlCatalogXMLFiles != NULL) - xmlHashFree(xmlCatalogXMLFiles, + xmlHashFree(xmlCatalogXMLFiles, (xmlHashDeallocator)xmlFreeCatalogHashEntryList); xmlCatalogXMLFiles = NULL; if (xmlDefaultCatalog != NULL) @@ -3392,7 +3393,7 @@ xmlCatalogDump(FILE *out) { /** * xmlCatalogAdd: * @type: the type of record to add to the catalog - * @orig: the system, public or prefix to match + * @orig: the system, public or prefix to match * @replace: the replacement value for the match * * Add an entry in the catalog, it may overwrite existing but @@ -3423,7 +3424,7 @@ xmlCatalogAdd(const xmlChar *type, const xmlChar *orig, const xmlChar *replace) xmlRMutexUnlock(xmlCatalogMutex); return(0); - } + } res = xmlACatalogAdd(xmlDefaultCatalog, type, orig, replace); xmlRMutexUnlock(xmlCatalogMutex); @@ -3611,7 +3612,7 @@ xmlCatalogFreeLocal(void *catalogs) { * * Returns the updated list */ -void * +void * xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) { xmlCatalogEntryPtr catal, add; @@ -3631,7 +3632,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) { return(catalogs); catal = (xmlCatalogEntryPtr) catalogs; - if (catal == NULL) + if (catal == NULL) return((void *) add); while (catal->next != NULL) @@ -3646,7 +3647,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) { * @pubID: the public ID string * @sysID: the system ID string * - * Do a complete resolution lookup of an External Identifier using a + * Do a complete resolution lookup of an External Identifier using a * document's private catalog list * * Returns the URI of the resource or NULL if not found, it must be freed @@ -3691,7 +3692,7 @@ xmlCatalogLocalResolve(void *catalogs, const xmlChar *pubID, * @catalogs: a document's list of catalogs * @URI: the URI * - * Do a complete resolution lookup of an URI using a + * Do a complete resolution lookup of an URI using a * document's private catalog list * * Returns the URI of the resource or NULL if not found, it must be freed @@ -3752,7 +3753,7 @@ xmlCatalogGetSystem(const xmlChar *sysID) { if (sysID == NULL) return(NULL); - + /* * Check first the XML catalogs */ @@ -3796,7 +3797,7 @@ xmlCatalogGetPublic(const xmlChar *pubID) { if (pubID == NULL) return(NULL); - + /* * Check first the XML catalogs */ diff --git a/chvalid.c b/chvalid.c old mode 100755 new mode 100644 index 00dd962..06e8db0 --- a/chvalid.c +++ b/chvalid.c @@ -46,109 +46,109 @@ const unsigned char xmlIsPubidChar_tab[256] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131}, - {0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3}, - {0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8}, - {0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c}, - {0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da}, - {0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3}, - {0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481}, - {0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb}, - {0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559}, - {0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, - {0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce}, - {0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939}, - {0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, - {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, - {0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a}, - {0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, - {0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, - {0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91}, - {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, - {0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10}, - {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39}, - {0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a}, - {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c}, - {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5}, - {0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, - {0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c}, - {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, - {0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, - {0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e}, - {0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82}, - {0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, - {0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, - {0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0}, - {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47}, - {0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100}, - {0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c}, - {0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140}, - {0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155}, - {0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165}, - {0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173}, - {0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab}, - {0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2}, - {0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b}, - {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, - {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, - {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, - {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, - {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, - {0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182}, +static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131}, + {0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3}, + {0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8}, + {0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c}, + {0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da}, + {0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3}, + {0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481}, + {0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb}, + {0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559}, + {0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, + {0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce}, + {0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939}, + {0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, + {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, + {0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a}, + {0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, + {0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, + {0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91}, + {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, + {0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10}, + {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39}, + {0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a}, + {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c}, + {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5}, + {0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, + {0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c}, + {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, + {0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, + {0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e}, + {0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82}, + {0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, + {0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, + {0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0}, + {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47}, + {0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100}, + {0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c}, + {0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140}, + {0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155}, + {0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165}, + {0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173}, + {0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab}, + {0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2}, + {0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b}, + {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, + {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, + {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, + {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, + {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, + {0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182}, {0x3041, 0x3094}, {0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}}; const xmlChRangeGroup xmlIsBaseCharGroup = {197, 0, xmlIsBaseChar_srng, (xmlChLRangePtr)0}; -static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff}, +static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff}, {0xe000, 0xfffd}}; static const xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}}; const xmlChRangeGroup xmlIsCharGroup = {2, 1, xmlIsChar_srng, xmlIsChar_lrng}; -static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345}, - {0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9}, - {0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4}, - {0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df}, - {0x6e0, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x901, 0x903}, - {0x93c, 0x93c}, {0x93e, 0x94c}, {0x94d, 0x94d}, {0x951, 0x954}, - {0x962, 0x963}, {0x981, 0x983}, {0x9bc, 0x9bc}, {0x9be, 0x9be}, - {0x9bf, 0x9bf}, {0x9c0, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd}, - {0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa02, 0xa02}, {0xa3c, 0xa3c}, - {0xa3e, 0xa3e}, {0xa3f, 0xa3f}, {0xa40, 0xa42}, {0xa47, 0xa48}, - {0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa83}, {0xabc, 0xabc}, - {0xabe, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd}, {0xb01, 0xb03}, - {0xb3c, 0xb3c}, {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d}, - {0xb56, 0xb57}, {0xb82, 0xb83}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8}, - {0xbca, 0xbcd}, {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44}, - {0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83}, - {0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6}, - {0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d}, - {0xd57, 0xd57}, {0xe31, 0xe31}, {0xe34, 0xe3a}, {0xe47, 0xe4e}, - {0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc}, {0xec8, 0xecd}, - {0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39}, - {0xf3e, 0xf3e}, {0xf3f, 0xf3f}, {0xf71, 0xf84}, {0xf86, 0xf8b}, - {0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7}, - {0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f}, +static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345}, + {0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9}, + {0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4}, + {0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df}, + {0x6e0, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x901, 0x903}, + {0x93c, 0x93c}, {0x93e, 0x94c}, {0x94d, 0x94d}, {0x951, 0x954}, + {0x962, 0x963}, {0x981, 0x983}, {0x9bc, 0x9bc}, {0x9be, 0x9be}, + {0x9bf, 0x9bf}, {0x9c0, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd}, + {0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa02, 0xa02}, {0xa3c, 0xa3c}, + {0xa3e, 0xa3e}, {0xa3f, 0xa3f}, {0xa40, 0xa42}, {0xa47, 0xa48}, + {0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa83}, {0xabc, 0xabc}, + {0xabe, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd}, {0xb01, 0xb03}, + {0xb3c, 0xb3c}, {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d}, + {0xb56, 0xb57}, {0xb82, 0xb83}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8}, + {0xbca, 0xbcd}, {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44}, + {0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83}, + {0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6}, + {0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d}, + {0xd57, 0xd57}, {0xe31, 0xe31}, {0xe34, 0xe3a}, {0xe47, 0xe4e}, + {0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc}, {0xec8, 0xecd}, + {0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39}, + {0xf3e, 0xf3e}, {0xf3f, 0xf3f}, {0xf71, 0xf84}, {0xf86, 0xf8b}, + {0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7}, + {0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f}, {0x3099, 0x3099}, {0x309a, 0x309a}}; const xmlChRangeGroup xmlIsCombiningGroup = {95, 0, xmlIsCombining_srng, (xmlChLRangePtr)0}; -static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669}, - {0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f}, - {0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f}, - {0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9}, +static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669}, + {0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f}, + {0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f}, + {0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9}, {0xf20, 0xf29}}; const xmlChRangeGroup xmlIsDigitGroup = {14, 0, xmlIsDigit_srng, (xmlChLRangePtr)0}; -static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0}, - {0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46}, - {0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e}, +static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0}, + {0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46}, + {0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e}, {0x30fc, 0x30fe}}; const xmlChRangeGroup xmlIsExtenderGroup = {10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0}; -static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007}, +static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007}, {0x3021, 0x3029}, {0x4e00, 0x9fa5}}; const xmlChRangeGroup xmlIsIdeographicGroup = {3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0}; diff --git a/config.guess b/config.guess index dc84c68..d622a44 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2009-11-20' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ timestamp='2009-11-20' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -56,8 +54,9 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -180,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -223,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -394,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -480,8 +482,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -494,7 +496,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -551,7 +553,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -594,52 +596,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -730,22 +732,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -769,14 +771,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -788,13 +790,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -803,15 +804,18 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -857,6 +861,13 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -866,7 +877,7 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} @@ -878,20 +889,29 @@ EOF then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -933,7 +953,7 @@ EOF test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -959,7 +979,7 @@ EOF echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -967,14 +987,17 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -983,11 +1006,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1019,7 +1042,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1047,13 +1070,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1088,8 +1111,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1132,10 +1155,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1161,11 +1184,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1230,6 +1253,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1275,13 +1301,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1299,6 +1325,9 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1321,11 +1350,11 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/config.h.in b/config.h.in index 4b080ba..a564b6c 100644 --- a/config.h.in +++ b/config.h.in @@ -69,6 +69,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `isascii' function. */ +#undef HAVE_ISASCII + /* Define if isinf is there */ #undef HAVE_ISINF @@ -111,6 +114,17 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `mmap' function. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the `munmap' function. */ +#undef HAVE_MUNMAP + +/* mmap() is no good without munmap() */ +#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP) +# undef /**/ HAVE_MMAP +#endif + /* Define to 1 if you have the header file. */ #undef HAVE_NAN_H @@ -132,6 +146,9 @@ /* Define if is there */ #undef HAVE_PTHREAD_H +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + /* Define to 1 if you have the `rand' function. */ #undef HAVE_RAND @@ -291,8 +308,17 @@ /* Determine what socket length (socklen_t) data type is */ #undef XML_SOCKLEN_T +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +#undef _UINT32_T + /* Using the Win32 Socket implementation */ #undef _WINSOCKAPI_ /* ss_family is not defined here, use __ss_family instead */ #undef ss_family + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +#undef uint32_t diff --git a/config.sub b/config.sub index 2a55a50..c894da4 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2009-11-20' +timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ timestamp='2009-11-20' # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -75,8 +73,9 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,13 +122,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -156,8 +160,8 @@ case $os in os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -173,10 +177,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -245,17 +249,22 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -281,29 +290,39 @@ case $basic_machine in | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -313,6 +332,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -327,21 +361,25 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -367,25 +405,29 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -410,7 +452,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -480,11 +522,20 @@ case $basic_machine in basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -516,7 +567,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -674,7 +725,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -732,7 +782,7 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze) basic_machine=microblaze-xilinx ;; mingw32) @@ -771,10 +821,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -839,6 +897,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -921,9 +985,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -1017,6 +1082,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1073,20 +1141,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1156,6 +1212,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1253,11 +1312,11 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1293,8 +1352,9 @@ case $os in | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1341,7 +1401,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1390,7 +1450,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1435,6 +1495,8 @@ case $os in -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1457,10 +1519,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1472,8 +1534,17 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1493,14 +1564,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1527,7 +1595,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/configure b/configure index e152273..80dd0fc 100755 --- a/configure +++ b/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -220,21 +244,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -645,6 +665,7 @@ WITH_SCHEMAS TEST_SCHEMATRON WITH_SCHEMATRON WITH_ISO8859X +ICU_LIBS WITH_ICU WITH_ICONV WITH_OUTPUT @@ -675,6 +696,8 @@ WITH_HTML TEST_PUSH WITH_PUSH TEST_SAX +WITH_SAX1_SOURCES_FALSE +WITH_SAX1_SOURCES_TRUE WITH_SAX1 TEST_PATTERN WITH_PATTERN @@ -687,7 +710,9 @@ WITH_HTTP FTP_OBJ WITH_FTP WITH_TREE -THREADS_W32 +THREADS_W32_FALSE +THREADS_W32_TRUE +WITH_THREAD_ALLOC TEST_THREADS THREAD_CFLAGS WITH_THREADS @@ -728,7 +753,8 @@ MANIFEST_TOOL RANLIB ac_ct_AR AR -LN_S +DLLTOOL +OBJDUMP NM ac_ct_DUMPBIN DUMPBIN @@ -738,20 +764,18 @@ EGREP GREP SED LIBTOOL -OBJDUMP -DLLTOOL -AS XSLTPROC XMLLINT WGET PERL TAR MV -RM CPP +LN_S am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -767,6 +791,8 @@ CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -1362,8 +1388,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1534,13 +1558,13 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-rebuild-docs[=yes/no] rebuild some generated docs [default=yes] + --enable-rebuild-docs[=yes/no] rebuild some generated docs [default=no] --enable-ipv6[=yes/no] enables compilation of IPv6 code [default=yes] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -1665,9 +1689,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1780,7 +1804,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2025,12 +2049,66 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel + +# ac_fn_c_find_uintX_t LINENO BITS VAR +# ------------------------------------ +# Finds an unsigned integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_uintX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + case $ac_type in #( + uint$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_find_uintX_t cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2377,6 +2455,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_config_headers="$ac_config_headers config.h" @@ -2482,8 +2561,8 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac LIBXML_MAJOR_VERSION=2 -LIBXML_MINOR_VERSION=8 -LIBXML_MICRO_VERSION=0 +LIBXML_MINOR_VERSION=9 +LIBXML_MICRO_VERSION=1 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -2563,7 +2642,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2732,7 +2811,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2772,7 +2851,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2823,7 +2902,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2876,7 +2955,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2992,11 +3071,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3016,6 +3095,33 @@ yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' @@ -3041,7 +3147,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3081,7 +3187,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3134,7 +3240,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3175,7 +3281,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3233,7 +3339,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3277,7 +3383,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3723,8 +3829,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3860,6 +3965,7 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3884,6 +3990,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3943,7 +4050,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -3999,6 +4106,17 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4137,47 +4255,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_RM+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $RM in - [\\/]* | ?:[\\/]*) - ac_cv_path_RM="$RM" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_RM" && ac_cv_path_RM="/bin/rm" - ;; -esac -fi -RM=$ac_cv_path_RM -if test -n "$RM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 -$as_echo "$RM" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -4196,7 +4273,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4237,7 +4314,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4278,7 +4355,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4319,7 +4396,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4335,303 +4412,33 @@ fi WGET=$ac_cv_path_WGET if test -n "$WGET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5 -$as_echo "$WGET" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "xmllint", so it can be a program name with args. -set dummy xmllint; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XMLLINT+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $XMLLINT in - [\\/]* | ?:[\\/]*) - ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT="/usr/bin/xmllint" - ;; -esac -fi -XMLLINT=$ac_cv_path_XMLLINT -if test -n "$XMLLINT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 -$as_echo "$XMLLINT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "xsltproc", so it can be a program name with args. -set dummy xsltproc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XSLTPROC+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $XSLTPROC in - [\\/]* | ?:[\\/]*) - ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="/usr/bin/xsltproc" - ;; -esac -fi -XSLTPROC=$ac_cv_path_XSLTPROC -if test -n "$XSLTPROC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 -$as_echo "$XSLTPROC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } +$as_echo "$WGET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 +# Extract the first word of "xmllint", so it can be a program name with args. +set dummy xmllint; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : +if ${ac_cv_path_XMLLINT+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $XMLLINT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4639,39 +4446,40 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT="/usr/bin/xmllint" + ;; +esac fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } +XMLLINT=$ac_cv_path_XMLLINT +if test -n "$XMLLINT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 +$as_echo "$XMLLINT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 +# Extract the first word of "xsltproc", so it can be a program name with args. +set dummy xsltproc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : +if ${ac_cv_path_XSLTPROC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $XSLTPROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4679,53 +4487,19 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="/usr/bin/xsltproc" + ;; +esac fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } +XSLTPROC=$ac_cv_path_XSLTPROC +if test -n "$XSLTPROC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - case `pwd` in @@ -4736,8 +4510,8 @@ esac -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -4844,7 +4618,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4920,7 +4694,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4986,7 +4760,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -5053,7 +4827,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5309,7 +5083,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5353,7 +5127,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5434,17 +5208,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } @@ -5511,6 +5274,11 @@ else lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -5550,7 +5318,7 @@ else # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -5772,7 +5540,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5812,7 +5580,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5854,6 +5622,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : @@ -5976,7 +5747,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -6115,7 +5886,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6155,7 +5926,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6198,6 +5969,9 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : @@ -6256,7 +6030,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6300,7 +6074,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6425,7 +6199,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6465,7 +6239,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6524,7 +6298,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6564,7 +6338,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6614,13 +6388,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -6767,6 +6541,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -7155,7 +6930,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -7166,7 +6941,20 @@ sparc*-*solaris*) case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -7199,7 +6987,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7239,7 +7027,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7319,7 +7107,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7359,7 +7147,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7411,7 +7199,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7451,7 +7239,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7503,7 +7291,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7543,7 +7331,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7595,7 +7383,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7635,7 +7423,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7687,7 +7475,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7727,7 +7515,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7806,7 +7594,13 @@ else $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7817,6 +7611,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -7849,6 +7644,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -7870,7 +7666,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -8070,6 +7868,8 @@ done enable_dlopen=no + enable_win32_dll=no + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : @@ -8136,7 +7936,22 @@ fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -8214,6 +8029,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + test -z "$LN_S" && LN_S="ln -s" @@ -8673,7 +8492,9 @@ lt_prog_compiler_static= case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -8764,18 +8585,33 @@ lt_prog_compiler_static= ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -9137,7 +8973,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -9387,8 +9222,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -9767,6 +9601,7 @@ fi # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -9812,6 +9647,7 @@ fi hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -9840,10 +9676,6 @@ fi hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -9856,7 +9688,7 @@ fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9895,7 +9727,6 @@ fi fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -10519,11 +10350,6 @@ esac - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -10613,7 +10439,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -10622,7 +10448,7 @@ aix3*) ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -10687,7 +10513,7 @@ beos*) ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -10826,7 +10652,7 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -10834,10 +10660,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -10845,7 +10667,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10863,7 +10685,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -10883,17 +10705,18 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -10954,7 +10777,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -10970,7 +10793,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -11007,9 +10830,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11095,7 +10918,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -11164,7 +10987,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11189,7 +11012,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -11213,7 +11036,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -11244,7 +11067,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11254,7 +11077,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -12036,6 +11859,8 @@ CC="$lt_save_CC" + + ac_config_commands="$ac_config_commands libtool" @@ -12066,7 +11891,7 @@ fi _cppflags="${CPPFLAGS}" -_ldflags="${LDFLAGS}" +_libs="${LIBS}" # Check whether --with-c14n was given. @@ -12213,7 +12038,7 @@ if test "${with_readline+set}" = set; then : if test "$withval" != "no" -a "$withval" != "yes"; then RDL_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" + LIBS="${LIBS} -L$withval/lib" fi fi @@ -12309,7 +12134,7 @@ if test "${with_zlib+set}" = set; then : if test "$withval" != "no" -a "$withval" != "yes"; then Z_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" + LIBS="${LIBS} -L$withval/lib" fi fi @@ -12321,7 +12146,7 @@ if test "${with_lzma+set}" = set; then : if test "$withval" != "no" -a "$withval" != "yes"; then LZMA_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" + LIBS="${LIBS} -L$withval/lib" fi fi @@ -12338,7 +12163,10 @@ if test "${enable_rebuild_docs+set}" = set; then : enableval=$enable_rebuild_docs; fi - if test "$enable_rebuild_docs" = "no"; then +if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then + as_fn_error $? "cannot rebuild docs when builddir != srcdir" "$LINENO" 5 +fi + if test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"; then REBUILD_DOCS_TRUE= REBUILD_DOCS_FALSE='#' else @@ -12661,7 +12489,7 @@ fi CPPFLAGS=${_cppflags} -LDFLAGS=${_ldflags} +LIBS=${_libs} echo Checking headers @@ -13374,6 +13202,24 @@ done +echo Checking types + +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT32_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + + + echo Checking libraries for ac_func in strftime @@ -13491,6 +13337,20 @@ _ACEOF fi done +for ac_func in isascii mmap munmap putenv +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 $as_echo_n "checking for va_copy... " >&6; } @@ -13722,7 +13582,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of socket length (socklen_t)" >&5 $as_echo_n "checking for type of socket length (socklen_t)... " >&6; } cat > conftest.$ac_ext < @@ -13733,7 +13593,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL) ; return 0; } EOF -if { (eval echo configure:13736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:13596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: socklen_t *" >&5 @@ -13745,7 +13605,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -13756,7 +13616,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL) ; return 0; } EOF -if { (eval echo configure:13759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:13619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t *" >&5 @@ -13768,7 +13628,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -13779,7 +13639,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (int *)NULL) ; return 0; } EOF -if { (eval echo configure:13782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:13642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: int *" >&5 @@ -13824,8 +13684,8 @@ if test $enable_ipv6 = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include +# include +# include int main () @@ -13859,8 +13719,8 @@ $as_echo_n "checking struct sockaddr::ss_family... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include +# include +# include int main () @@ -13888,8 +13748,8 @@ $as_echo_n "checking broken struct sockaddr::ss_family... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include +# include +# include int main () @@ -14175,7 +14035,7 @@ if test "$with_python" != "no" ; then if test -x "$PYTHON" then echo Found python in environment PYTHON=$PYTHON - with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` + with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"` else # Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args. set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2 @@ -14195,7 +14055,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14223,50 +14083,53 @@ fi fi if test "$PYTHON" != "" then - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[0:3]"` + PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"` + PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"` +# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python +# +# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` echo Found Python version $PYTHON_VERSION fi - if test "$PYTHON_VERSION" != "" + if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = "" then - if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ - -d $with_python/lib/python$PYTHON_VERSION/site-packages + if test -r $with_python/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else if test -r $prefix/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else if test -r /usr/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else - if test -r $with_python/include/Python.h -a \ - -d $with_python/lib/site-packages + if test -r $with_python/include/Python.h then PYTHON_INCLUDES=$with_python/include - PYTHON_SITE_PACKAGES=$with_python/lib/site-packages else echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h fi fi fi - if test ! -d "$PYTHON_SITE_PACKAGES" - then - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` - fi fi - PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` fi - if test "$with_python" != "" + if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" then - pythondir='$(PYTHON_SITE_PACKAGES)' - else - pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages' + if test -d $libdir/python$PYTHON_VERSION/site-packages + then + PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages + else + if test -d $with_python/lib/site-packages + then + PYTHON_SITE_PACKAGES=$with_python/lib/site-packages + else + PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` + fi + fi fi + pythondir='$(PYTHON_SITE_PACKAGES)' + PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` else PYTHON= fi @@ -14534,6 +14397,7 @@ WITH_THREADS=0 THREAD_CFLAGS="" TEST_THREADS="" THREADS_W32="" +WITH_THREAD_ALLOC=0 if test "$with_threads" = "no" ; then echo Disabling multithreaded support @@ -14543,7 +14407,7 @@ else case $host_os in *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then WITH_THREADS="1" - THREADS_W32="Win32" + THREADS_W32="1" THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" fi ;; @@ -14642,7 +14506,7 @@ fi fi fi if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then - THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" + WITH_THREAD_ALLOC=1 fi @@ -14651,6 +14515,14 @@ fi + if test -n "$THREADS_W32"; then + THREADS_W32_TRUE= + THREADS_W32_FALSE='#' +else + THREADS_W32_TRUE='#' + THREADS_W32_FALSE= +fi + if test "$with_history" = "yes" ; then echo Enabling xmllint shell history @@ -14897,6 +14769,14 @@ else TEST_SAX=SAXtests fi + if test "${WITH_TRIO}" = "1"; then + WITH_SAX1_SOURCES_TRUE= + WITH_SAX1_SOURCES_FALSE='#' +else + WITH_SAX1_SOURCES_TRUE='#' + WITH_SAX1_SOURCES_FALSE= +fi + if test "$with_push" = "no" ; then @@ -15196,14 +15076,14 @@ XML_LIBTOOLLIBS="libxml2.la" WITH_ICU=0 +ICU_LIBS="" if test "$with_icu" != "yes" ; then echo Disabling ICU support else ICU_CONFIG=icu-config if ${ICU_CONFIG} --cflags >/dev/null 2>&1 then - ICU_LIBS=`icu-config --ldflags` - LDFLAGS="$LDFLAGS $ICU_LIBS" + ICU_LIBS=`${ICU_CONFIG} --ldflags` WITH_ICU=1 echo Enabling ICU support else @@ -15212,6 +15092,7 @@ else fi + WITH_ISO8859X=1 if test "$WITH_ICONV" != "1" ; then if test "$with_iso8859x" = "no" ; then @@ -15379,7 +15260,7 @@ RELDATE=`date +'%a %b %e %Y'` rm -f COPYING.LIB COPYING -ln -s Copyright COPYING +ln -s $srcdir/Copyright COPYING # keep on one line for cygwin c.f. #130896 ac_config_files="$ac_config_files libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py" @@ -15525,6 +15406,14 @@ if test -z "${WITH_TRIO_SOURCES_TRUE}" && test -z "${WITH_TRIO_SOURCES_FALSE}"; as_fn_error $? "conditional \"WITH_TRIO_SOURCES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${THREADS_W32_TRUE}" && test -z "${THREADS_W32_FALSE}"; then + as_fn_error $? "conditional \"THREADS_W32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SAX1_SOURCES_TRUE}" && test -z "${WITH_SAX1_SOURCES_FALSE}"; then + as_fn_error $? "conditional \"WITH_SAX1_SOURCES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -15823,16 +15712,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -15892,28 +15781,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -15935,7 +15812,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16001,10 +15878,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -16095,7 +15972,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -16129,9 +16006,6 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' @@ -16140,6 +16014,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -16164,10 +16039,12 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' @@ -16220,7 +16097,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -16274,11 +16150,9 @@ _LTECHO_EOF' } # Quote evaled strings. -for var in AS \ -DLLTOOL \ -OBJDUMP \ -SHELL \ +for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -16289,10 +16163,12 @@ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ +OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ +DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ @@ -16327,7 +16203,6 @@ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -17138,8 +17013,8 @@ $as_echo X"$file" | # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -17171,15 +17046,6 @@ available_tags="" # ### BEGIN LIBTOOL CONFIG -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision @@ -17202,6 +17068,9 @@ SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -17257,6 +17126,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -17269,6 +17141,9 @@ file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd @@ -17497,10 +17372,6 @@ no_undefined_flag=$lt_no_undefined_flag # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator diff --git a/configure.in b/configure.in index 0fb4983..d449b11 100644 --- a/configure.in +++ b/configure.in @@ -1,13 +1,14 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.59) -AC_INIT(entities.c) -AM_CONFIG_HEADER(config.h) +AC_PREREQ([2.63]) +AC_INIT +AC_CONFIG_SRCDIR([entities.c]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_HOST LIBXML_MAJOR_VERSION=2 -LIBXML_MINOR_VERSION=8 -LIBXML_MICRO_VERSION=0 +LIBXML_MINOR_VERSION=9 +LIBXML_MICRO_VERSION=1 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -58,9 +59,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL +AC_PROG_LN_S AC_PROG_MKDIR_P AC_PROG_CPP -AC_PATH_PROG(RM, rm, /bin/rm) AC_PATH_PROG(MV, mv, /bin/mv) AC_PATH_PROG(TAR, tar, /bin/tar) AC_PATH_PROG(PERL, perl, /usr/bin/perl) @@ -68,8 +69,7 @@ AC_PATH_PROG(WGET, wget, /usr/bin/wget) AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint) AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc) -AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL +LT_INIT dnl dnl if the system support linker version scripts for symbol versioning @@ -97,7 +97,7 @@ dnl dnl zlib option might change flags, so we save them initially dnl _cppflags="${CPPFLAGS}" -_ldflags="${LDFLAGS}" +_libs="${LIBS}" AC_ARG_WITH(c14n, [ --with-c14n add the Canonicalization support (on)]) @@ -116,11 +116,11 @@ AC_ARG_WITH(history, AC_ARG_WITH(html, [ --with-html add the HTML support (on)]) dnl Specific dir for HTML output ? -AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path], +AC_ARG_WITH(html-dir, AS_HELP_STRING([--with-html-dir=path], [path to base html directory, default $datadir/doc/html]), [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc']) -AC_ARG_WITH(html-subdir, AC_HELP_STRING([--with-html-subdir=path], +AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path], [directory used under html-dir, default $PACKAGE-$VERSION/html]), [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"], [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"]) @@ -154,7 +154,7 @@ AC_ARG_WITH(readline, if test "$withval" != "no" -a "$withval" != "yes"; then RDL_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" + LIBS="${LIBS} -L$withval/lib" fi ]) AC_ARG_WITH(regexps, @@ -190,7 +190,7 @@ AC_ARG_WITH(zlib, if test "$withval" != "no" -a "$withval" != "yes"; then Z_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" + LIBS="${LIBS} -L$withval/lib" fi ]) AC_ARG_WITH(lzma, @@ -198,15 +198,18 @@ AC_ARG_WITH(lzma, if test "$withval" != "no" -a "$withval" != "yes"; then LZMA_DIR=$withval CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" + LIBS="${LIBS} -L$withval/lib" fi ]) AC_ARG_WITH(coverage, [ --with-coverage build for code coverage with GCC (off)]) AC_ARG_ENABLE(rebuild-docs, -[ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=yes]]]) -AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "no"]) +[ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=no]]]) +if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then + AC_MSG_ERROR([cannot rebuild docs when builddir != srcdir]) +fi +AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"]) dnl dnl hard dependancies on options @@ -428,7 +431,7 @@ AC_SUBST(LZMA_LIBS) AC_SUBST(WITH_LZMA) CPPFLAGS=${_cppflags} -LDFLAGS=${_ldflags} +LIBS=${_libs} echo Checking headers @@ -500,6 +503,11 @@ AC_CHECK_HEADERS([dl.h]) AC_CHECK_HEADERS([dlfcn.h]) +echo Checking types + +AC_TYPE_UINT32_T + + echo Checking libraries dnl Checks for library functions. @@ -509,11 +517,17 @@ AC_CHECK_FUNCS(finite isnand fp_class class fpclass) AC_CHECK_FUNCS(strftime localtime gettimeofday ftime) AC_CHECK_FUNCS(stat _stat signal) AC_CHECK_FUNCS(rand rand_r srand time) +AC_CHECK_FUNCS(isascii mmap munmap putenv) + +AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */ +#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP) +# undef /**/ HAVE_MMAP +#endif]) dnl Checking for va_copy availability AC_MSG_CHECKING([for va_copy]) -AC_TRY_LINK([#include -va_list ap1,ap2;], [va_copy(ap1,ap2);], +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])], have_va_copy=yes, have_va_copy=no) AC_MSG_RESULT($have_va_copy) @@ -521,8 +535,8 @@ if test x"$have_va_copy" = x"yes"; then AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) else AC_MSG_CHECKING([for __va_copy]) - AC_TRY_LINK([#include - va_list ap1,ap2;], [__va_copy(ap1,ap2);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include + va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])], have___va_copy=yes, have___va_copy=no) AC_MSG_RESULT($have___va_copy) @@ -573,13 +587,13 @@ then fi if test $enable_ipv6 = yes; then have_ipv6=no - AC_TRY_COMPILE([ - #include - #include - ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +# include +# include + ]], [[ struct sockaddr_storage ss; socket(AF_INET6, SOCK_STREAM, 0) - ], + ]])], have_ipv6=yes, have_ipv6=no ) @@ -597,26 +611,26 @@ if test $enable_ipv6 = yes; then dnl present. dnl ******************************************************************** AC_MSG_CHECKING([struct sockaddr::ss_family]) - AC_TRY_COMPILE([ - #include - #include - ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +# include +# include + ]], [[ struct sockaddr_storage ss ; ss.ss_family = 0 ; - ], + ]])], have_ss_family=yes, have_ss_family=no ) AC_MSG_RESULT($have_ss_family) if test x$have_ss_family = xno ; then AC_MSG_CHECKING([broken struct sockaddr::ss_family]) - AC_TRY_COMPILE([ - #include - #include - ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +# include +# include + ]], [[ struct sockaddr_storage ss ; ss.__ss_family = 0 ; - ], + ]])], have_broken_ss_family=yes, have_broken_ss_family=no ) @@ -752,7 +766,7 @@ if test "$with_python" != "no" ; then if test -x "$PYTHON" then echo Found python in environment PYTHON=$PYTHON - with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` + with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"` else AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) fi @@ -761,50 +775,53 @@ if test "$with_python" != "no" ; then fi if test "$PYTHON" != "" then - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` + PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"` + PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"` +# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python +# +# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` echo Found Python version $PYTHON_VERSION fi - if test "$PYTHON_VERSION" != "" + if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = "" then - if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ - -d $with_python/lib/python$PYTHON_VERSION/site-packages + if test -r $with_python/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else if test -r $prefix/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else if test -r /usr/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else - if test -r $with_python/include/Python.h -a \ - -d $with_python/lib/site-packages + if test -r $with_python/include/Python.h then PYTHON_INCLUDES=$with_python/include - PYTHON_SITE_PACKAGES=$with_python/lib/site-packages else echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h fi fi fi - if test ! -d "$PYTHON_SITE_PACKAGES" - then - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` - fi fi - PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` fi - if test "$with_python" != "" + if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" then - pythondir='$(PYTHON_SITE_PACKAGES)' - else - pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages' + if test -d $libdir/python$PYTHON_VERSION/site-packages + then + PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages + else + if test -d $with_python/lib/site-packages + then + PYTHON_SITE_PACKAGES=$with_python/lib/site-packages + else + PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` + fi + fi fi + pythondir='$(PYTHON_SITE_PACKAGES)' + PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` else PYTHON= fi @@ -939,6 +956,7 @@ WITH_THREADS=0 THREAD_CFLAGS="" TEST_THREADS="" THREADS_W32="" +WITH_THREAD_ALLOC=0 if test "$with_threads" = "no" ; then echo Disabling multithreaded support @@ -949,7 +967,7 @@ else case $host_os in *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then WITH_THREADS="1" - THREADS_W32="Win32" + THREADS_W32="1" THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" fi ;; @@ -1002,7 +1020,7 @@ else fi fi if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then - THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" + WITH_THREAD_ALLOC=1 fi AC_SUBST(THREAD_LIBS) @@ -1010,7 +1028,8 @@ AC_SUBST(BASE_THREAD_LIBS) AC_SUBST(WITH_THREADS) AC_SUBST(THREAD_CFLAGS) AC_SUBST(TEST_THREADS) -AC_SUBST(THREADS_W32) +AC_SUBST(WITH_THREAD_ALLOC) +AM_CONDITIONAL([THREADS_W32],[test -n "$THREADS_W32"]) dnl dnl xmllint shell history @@ -1134,6 +1153,7 @@ else TEST_SAX=SAXtests fi AC_SUBST(WITH_SAX1) +AM_CONDITIONAL(WITH_SAX1_SOURCES, test "${WITH_TRIO}" = "1") AC_SUBST(TEST_SAX) if test "$with_push" = "no" ; then @@ -1300,10 +1320,10 @@ else AC_CHECK_HEADER(iconv.h, AC_MSG_CHECKING(for iconv) - AC_TRY_LINK([#include -#include ],[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]],[[ iconv_t cd = iconv_open ("",""); -iconv (cd, NULL, NULL, NULL, NULL);],[ +iconv (cd, NULL, NULL, NULL, NULL);]])],[ AC_MSG_RESULT(yes) WITH_ICONV=1],[ AC_MSG_RESULT(no) @@ -1314,10 +1334,10 @@ iconv (cd, NULL, NULL, NULL, NULL);],[ LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" LIBS="${LIBS} -liconv" - AC_TRY_LINK([#include -#include ],[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]],[[ iconv_t cd = iconv_open ("",""); -iconv (cd, NULL, NULL, NULL, NULL);],[ +iconv (cd, NULL, NULL, NULL, NULL);]])],[ AC_MSG_RESULT(yes) WITH_ICONV=1 ICONV_LIBS="${ICONV_LIBS} -liconv" @@ -1330,7 +1350,7 @@ iconv (cd, NULL, NULL, NULL, NULL);],[ if test "$WITH_ICONV" = "1" ; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(xml_cv_iconv_arg2, [ - AC_TRY_COMPILE([#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include extern #ifdef __cplusplus @@ -1341,7 +1361,7 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si #else size_t iconv(); #endif -], [], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")]) +]], [])], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")]) xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" AC_MSG_RESULT([${xml_xxx:- @@ -1365,14 +1385,14 @@ XML_LIBTOOLLIBS="libxml2.la" AC_SUBST(WITH_ICONV) WITH_ICU=0 +ICU_LIBS="" if test "$with_icu" != "yes" ; then echo Disabling ICU support else ICU_CONFIG=icu-config if ${ICU_CONFIG} --cflags >/dev/null 2>&1 then - ICU_LIBS=`icu-config --ldflags` - LDFLAGS="$LDFLAGS $ICU_LIBS" + ICU_LIBS=`${ICU_CONFIG} --ldflags` WITH_ICU=1 echo Enabling ICU support else @@ -1380,6 +1400,7 @@ else fi fi AC_SUBST(WITH_ICU) +AC_SUBST(ICU_LIBS) WITH_ISO8859X=1 if test "$WITH_ICONV" != "1" ; then @@ -1550,10 +1571,11 @@ AC_SUBST(RELDATE) AC_SUBST(PYTHON_TESTS) rm -f COPYING.LIB COPYING -ln -s Copyright COPYING +ln -s $srcdir/Copyright COPYING # keep on one line for cygwin c.f. #130896 -AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py) +AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py]) +AC_OUTPUT chmod +x xml2-config python/setup.py echo Done configuring diff --git a/debugXML.c b/debugXML.c index 3e9ec7a..c8efe6a 100644 --- a/debugXML.c +++ b/debugXML.c @@ -85,7 +85,7 @@ xmlCtxtDumpCleanCtxt(xmlDebugCtxtPtr ctxt ATTRIBUTE_UNUSED) * * Check that a given namespace is in scope on a node. * - * Returns 1 if in scope, -1 in case of argument error, + * Returns 1 if in scope, -1 in case of argument error, * -2 if the namespace is not in scope, and -3 if not on * an ancestor node. */ @@ -311,7 +311,7 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) { (node != (xmlNodePtr) node->parent->properties)) xmlDebugErr(ctxt, XML_CHECK_NO_PREV, "Attr has no prev and not first of attr list\n"); - + } else if ((node->parent != NULL) && (node->parent->children != node)) xmlDebugErr(ctxt, XML_CHECK_NO_PREV, "Node has no prev and not first of parent list\n"); @@ -354,7 +354,6 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) { (node->type != XML_ELEMENT_DECL) && (node->type != XML_ATTRIBUTE_DECL) && (node->type != XML_DTD_NODE) && - (node->type != XML_ELEMENT_DECL) && (node->type != XML_HTML_DOCUMENT_NODE) && (node->type != XML_DOCUMENT_NODE)) { if (node->content != NULL) @@ -1068,7 +1067,7 @@ xmlCtxtDumpNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node) return; } xmlCtxtDumpOneNode(ctxt, node); - if ((node->type != XML_NAMESPACE_DECL) && + if ((node->type != XML_NAMESPACE_DECL) && (node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) { ctxt->depth++; xmlCtxtDumpNodeList(ctxt, node->children); @@ -1603,7 +1602,7 @@ int xmlLsCountNode(xmlNodePtr node) { int ret = 0; xmlNodePtr list = NULL; - + if (node == NULL) return(0); @@ -1644,7 +1643,7 @@ xmlLsCountNode(xmlNodePtr node) { ret = 1; break; } - for (;list != NULL;ret++) + for (;list != NULL;ret++) list = list->next; return(ret); } @@ -1712,11 +1711,11 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) { if (node->type != XML_NAMESPACE_DECL) { if (node->properties != NULL) fprintf(output, "a"); - else + else fprintf(output, "-"); - if (node->nsDef != NULL) + if (node->nsDef != NULL) fprintf(output, "n"); - else + else fprintf(output, "-"); } @@ -1786,7 +1785,7 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) { * xmlBoolToText: * @boolval: a bool to turn into text * - * Convenient way to turn bool into text + * Convenient way to turn bool into text * * Returns a pointer to either "True" or "False" */ @@ -1802,7 +1801,7 @@ xmlBoolToText(int boolval) #ifdef LIBXML_XPATH_ENABLED /**************************************************************** * * - * The XML shell related functions * + * The XML shell related functions * * * ****************************************************************/ @@ -2053,7 +2052,7 @@ xmlShellBase(xmlShellCtxtPtr ctxt, if (node == NULL) { fprintf(ctxt->output, "NULL\n"); return (0); - } + } base = xmlNodeGetBase(node->doc, node); @@ -2280,7 +2279,7 @@ xmlShellDir(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, if (node == NULL) { fprintf(ctxt->output, "NULL\n"); return (0); - } + } if ((node->type == XML_DOCUMENT_NODE) || (node->type == XML_HTML_DOCUMENT_NODE)) { xmlDebugDumpDocumentHead(ctxt->output, (xmlDocPtr) node); @@ -2415,7 +2414,7 @@ xmlShellCat(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED, if (node == NULL) { fprintf(ctxt->output, "NULL\n"); return (0); - } + } if (ctxt->doc->type == XML_HTML_DOCUMENT_NODE) { #ifdef LIBXML_HTML_ENABLED if (node->type == XML_HTML_DOCUMENT_NODE) @@ -2753,7 +2752,7 @@ xmlShellDu(xmlShellCtxtPtr ctxt, * xmlShellPwd: * @ctxt: the shell context * @buffer: the output buffer - * @node: a node + * @node: a node * @node2: unused * * Implements the XML shell function "pwd" @@ -2798,7 +2797,7 @@ xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer, * @input: the line reading function * @output: the output FILE*, defaults to stdout if NULL * - * Implements the XML shell + * Implements the XML shell * This allow to load, validate, view, modify and save a document * using a environment similar to a UNIX commandline. */ diff --git a/depcomp b/depcomp index df8eea7..25a39e6 100755 --- a/depcomp +++ b/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-03-27.16; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ scriptversion=2009-04-28.21; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,11 +40,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +57,12 @@ EOF ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -90,10 +96,24 @@ if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -148,20 +168,21 @@ gcc) ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -193,18 +214,15 @@ sgi) # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -216,10 +234,17 @@ sgi) rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -249,12 +274,11 @@ aix) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -265,23 +289,26 @@ aix) ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -290,15 +317,21 @@ icc) exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -334,7 +367,7 @@ hp2) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -349,9 +382,9 @@ hp2) tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -397,14 +430,59 @@ tru64) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -422,7 +500,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,15 +520,14 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -503,9 +580,10 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -525,7 +603,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -594,8 +672,8 @@ msvisualcpp) sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/dict.c b/dict.c index 6de2f03..5f71d55 100644 --- a/dict.c +++ b/dict.c @@ -19,6 +19,7 @@ #define IN_LIBXML #include "libxml.h" +#include #ifdef HAVE_STDLIB_H #include #endif @@ -93,7 +94,7 @@ typedef xmlDictEntry *xmlDictEntryPtr; struct _xmlDictEntry { struct _xmlDictEntry *next; const xmlChar *name; - int len; + unsigned int len; int valid; unsigned long okey; }; @@ -104,8 +105,8 @@ struct _xmlDictStrings { xmlDictStringsPtr next; xmlChar *free; xmlChar *end; - int size; - int nbStrings; + size_t size; + size_t nbStrings; xmlChar array[1]; }; /* @@ -115,13 +116,15 @@ struct _xmlDict { int ref_counter; struct _xmlDictEntry *dict; - int size; - int nbElems; + size_t size; + unsigned int nbElems; xmlDictStringsPtr strings; struct _xmlDict *subdict; /* used for randomization */ int seed; + /* used to impose a limit on size */ + size_t limit; }; /* @@ -140,7 +143,7 @@ static int xmlDictInitialized = 0; /* * Internal data for random function, protected by xmlDictMutex */ -unsigned int rand_seed = 0; +static unsigned int rand_seed = 0; #endif #endif @@ -148,13 +151,28 @@ unsigned int rand_seed = 0; * xmlInitializeDict: * * Do the dictionary mutex initialization. - * this function is not thread safe, initialization should - * preferably be done once at startup + * this function is deprecated * * Returns 0 if initialization was already done, and 1 if that * call led to the initialization */ int xmlInitializeDict(void) { + return(0); +} + +/** + * __xmlInitializeDict: + * + * This function is not public + * Do the dictionary mutex initialization. + * this function is not thread safe, initialization should + * normally be done once at setup when called from xmlOnceInit() + * we may also land in this code if thread support is not compiled in + * + * Returns 0 if initialization was already done, and 1 if that + * call led to the initialization + */ +int __xmlInitializeDict(void) { if (xmlDictInitialized) return(1); @@ -180,7 +198,7 @@ int __xmlRandom(void) { int ret; if (xmlDictInitialized == 0) - xmlInitializeDict(); + __xmlInitializeDict(); xmlRMutexLock(xmlDictMutex); #ifdef HAVE_RAND_R @@ -213,17 +231,18 @@ xmlDictCleanup(void) { * xmlDictAddString: * @dict: the dictionnary * @name: the name of the userdata - * @len: the length of the name, if -1 it is recomputed + * @len: the length of the name * * Add the string to the array[s] * * Returns the pointer of the local string, or NULL in case of error. */ static const xmlChar * -xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) { +xmlDictAddString(xmlDictPtr dict, const xmlChar *name, unsigned int namelen) { xmlDictStringsPtr pool; const xmlChar *ret; - int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */ + size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */ + size_t limit = 0; #ifdef DICT_DEBUG_PATTERNS fprintf(stderr, "-"); @@ -233,15 +252,20 @@ xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) { if (pool->end - pool->free > namelen) goto found_pool; if (pool->size > size) size = pool->size; + limit += pool->size; pool = pool->next; } /* * Not found, need to allocate */ if (pool == NULL) { + if ((dict->limit > 0) && (limit > dict->limit)) { + return(NULL); + } + if (size == 0) size = 1000; else size *= 4; /* exponential growth */ - if (size < 4 * namelen) + if (size < 4 * namelen) size = 4 * namelen; /* just in case ! */ pool = (xmlDictStringsPtr) xmlMalloc(sizeof(xmlDictStrings) + size); if (pool == NULL) @@ -271,19 +295,20 @@ found_pool: * @prefix: the prefix of the userdata * @plen: the prefix length * @name: the name of the userdata - * @len: the length of the name, if -1 it is recomputed + * @len: the length of the name * * Add the QName to the array[s] * * Returns the pointer of the local string, or NULL in case of error. */ static const xmlChar * -xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, int plen, - const xmlChar *name, int namelen) +xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, unsigned int plen, + const xmlChar *name, unsigned int namelen) { xmlDictStringsPtr pool; const xmlChar *ret; - int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */ + size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */ + size_t limit = 0; if (prefix == NULL) return(xmlDictAddString(dict, name, namelen)); @@ -295,12 +320,17 @@ xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, int plen, if (pool->end - pool->free > namelen + plen + 1) goto found_pool; if (pool->size > size) size = pool->size; + limit += pool->size; pool = pool->next; } /* * Not found, need to allocate */ if (pool == NULL) { + if ((dict->limit > 0) && (limit > dict->limit)) { + return(NULL); + } + if (size == 0) size = 1000; else size *= 4; /* exponential growth */ if (size < 4 * (namelen + plen + 1)) @@ -507,7 +537,7 @@ xmlDictCreate(void) { xmlDictPtr dict; if (!xmlDictInitialized) - if (!xmlInitializeDict()) + if (!__xmlInitializeDict()) return(NULL); #ifdef DICT_DEBUG_PATTERNS @@ -517,6 +547,7 @@ xmlDictCreate(void) { dict = xmlMalloc(sizeof(xmlDict)); if (dict) { dict->ref_counter = 1; + dict->limit = 0; dict->size = MIN_DICT_SIZE; dict->nbElems = 0; @@ -574,7 +605,7 @@ xmlDictCreateSub(xmlDictPtr sub) { int xmlDictReference(xmlDictPtr dict) { if (!xmlDictInitialized) - if (!xmlInitializeDict()) + if (!__xmlInitializeDict()) return(-1); if (dict == NULL) return -1; @@ -594,9 +625,9 @@ xmlDictReference(xmlDictPtr dict) { * Returns 0 in case of success, -1 in case of failure */ static int -xmlDictGrow(xmlDictPtr dict, int size) { +xmlDictGrow(xmlDictPtr dict, size_t size) { unsigned long key, okey; - int oldsize, i; + size_t oldsize, i; xmlDictEntryPtr iter, next; struct _xmlDictEntry *olddict; #ifdef DEBUG_GROW @@ -713,7 +744,7 @@ xmlDictGrow(xmlDictPtr dict, int size) { #ifdef DEBUG_GROW xmlGenericError(xmlGenericErrorContext, - "xmlDictGrow : from %d to %d, %d elems\n", oldsize, size, nbElem); + "xmlDictGrow : from %lu to %lu, %u elems\n", oldsize, size, nbElem); #endif return(ret); @@ -728,7 +759,7 @@ xmlDictGrow(xmlDictPtr dict, int size) { */ void xmlDictFree(xmlDictPtr dict) { - int i; + size_t i; xmlDictEntryPtr iter; xmlDictEntryPtr next; int inside_dict = 0; @@ -738,7 +769,7 @@ xmlDictFree(xmlDictPtr dict) { return; if (!xmlDictInitialized) - if (!xmlInitializeDict()) + if (!__xmlInitializeDict()) return; /* decrement the counter, it may be shared by a parser and docs */ @@ -797,17 +828,24 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) { xmlDictEntryPtr entry; xmlDictEntryPtr insert; const xmlChar *ret; + unsigned int l; if ((dict == NULL) || (name == NULL)) return(NULL); if (len < 0) - len = strlen((const char *) name); + l = strlen((const char *) name); + else + l = len; + + if (((dict->limit > 0) && (l >= dict->limit)) || + (l > INT_MAX / 2)) + return(NULL); /* * Check for duplicate and insertion location. */ - okey = xmlDictComputeKey(dict, name, len); + okey = xmlDictComputeKey(dict, name, l); key = okey % dict->size; if (dict->dict[key].valid == 0) { insert = NULL; @@ -815,25 +853,25 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) { for (insert = &(dict->dict[key]); insert->next != NULL; insert = insert->next) { #ifdef __GNUC__ - if ((insert->okey == okey) && (insert->len == len)) { - if (!memcmp(insert->name, name, len)) + if ((insert->okey == okey) && (insert->len == l)) { + if (!memcmp(insert->name, name, l)) return(insert->name); } #else - if ((insert->okey == okey) && (insert->len == len) && - (!xmlStrncmp(insert->name, name, len))) + if ((insert->okey == okey) && (insert->len == l) && + (!xmlStrncmp(insert->name, name, l))) return(insert->name); #endif nbi++; } #ifdef __GNUC__ - if ((insert->okey == okey) && (insert->len == len)) { - if (!memcmp(insert->name, name, len)) + if ((insert->okey == okey) && (insert->len == l)) { + if (!memcmp(insert->name, name, l)) return(insert->name); } #else - if ((insert->okey == okey) && (insert->len == len) && - (!xmlStrncmp(insert->name, name, len))) + if ((insert->okey == okey) && (insert->len == l) && + (!xmlStrncmp(insert->name, name, l))) return(insert->name); #endif } @@ -846,7 +884,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) { (dict->subdict->size != MIN_DICT_SIZE)) || ((dict->size != MIN_DICT_SIZE) && (dict->subdict->size == MIN_DICT_SIZE))) - skey = xmlDictComputeKey(dict->subdict, name, len); + skey = xmlDictComputeKey(dict->subdict, name, l); else skey = okey; @@ -857,32 +895,32 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) { for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL; tmp = tmp->next) { #ifdef __GNUC__ - if ((tmp->okey == skey) && (tmp->len == len)) { - if (!memcmp(tmp->name, name, len)) + if ((tmp->okey == skey) && (tmp->len == l)) { + if (!memcmp(tmp->name, name, l)) return(tmp->name); } #else - if ((tmp->okey == skey) && (tmp->len == len) && - (!xmlStrncmp(tmp->name, name, len))) + if ((tmp->okey == skey) && (tmp->len == l) && + (!xmlStrncmp(tmp->name, name, l))) return(tmp->name); #endif nbi++; } #ifdef __GNUC__ - if ((tmp->okey == skey) && (tmp->len == len)) { - if (!memcmp(tmp->name, name, len)) + if ((tmp->okey == skey) && (tmp->len == l)) { + if (!memcmp(tmp->name, name, l)) return(tmp->name); } #else - if ((tmp->okey == skey) && (tmp->len == len) && - (!xmlStrncmp(tmp->name, name, len))) + if ((tmp->okey == skey) && (tmp->len == l) && + (!xmlStrncmp(tmp->name, name, l))) return(tmp->name); #endif } key = okey % dict->size; } - ret = xmlDictAddString(dict, name, len); + ret = xmlDictAddString(dict, name, l); if (ret == NULL) return(NULL); if (insert == NULL) { @@ -893,13 +931,13 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) { return(NULL); } entry->name = ret; - entry->len = len; + entry->len = l; entry->next = NULL; entry->valid = 1; entry->okey = okey; - if (insert != NULL) + if (insert != NULL) insert->next = entry; dict->nbElems++; @@ -928,17 +966,23 @@ const xmlChar * xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { unsigned long key, okey, nbi = 0; xmlDictEntryPtr insert; + unsigned int l; if ((dict == NULL) || (name == NULL)) return(NULL); if (len < 0) - len = strlen((const char *) name); + l = strlen((const char *) name); + else + l = len; + if (((dict->limit > 0) && (l >= dict->limit)) || + (l > INT_MAX / 2)) + return(NULL); /* * Check for duplicate and insertion location. */ - okey = xmlDictComputeKey(dict, name, len); + okey = xmlDictComputeKey(dict, name, l); key = okey % dict->size; if (dict->dict[key].valid == 0) { insert = NULL; @@ -946,25 +990,25 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { for (insert = &(dict->dict[key]); insert->next != NULL; insert = insert->next) { #ifdef __GNUC__ - if ((insert->okey == okey) && (insert->len == len)) { - if (!memcmp(insert->name, name, len)) + if ((insert->okey == okey) && (insert->len == l)) { + if (!memcmp(insert->name, name, l)) return(insert->name); } #else - if ((insert->okey == okey) && (insert->len == len) && - (!xmlStrncmp(insert->name, name, len))) + if ((insert->okey == okey) && (insert->len == l) && + (!xmlStrncmp(insert->name, name, l))) return(insert->name); #endif nbi++; } #ifdef __GNUC__ - if ((insert->okey == okey) && (insert->len == len)) { - if (!memcmp(insert->name, name, len)) + if ((insert->okey == okey) && (insert->len == l)) { + if (!memcmp(insert->name, name, l)) return(insert->name); } #else - if ((insert->okey == okey) && (insert->len == len) && - (!xmlStrncmp(insert->name, name, len))) + if ((insert->okey == okey) && (insert->len == l) && + (!xmlStrncmp(insert->name, name, l))) return(insert->name); #endif } @@ -977,7 +1021,7 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { (dict->subdict->size != MIN_DICT_SIZE)) || ((dict->size != MIN_DICT_SIZE) && (dict->subdict->size == MIN_DICT_SIZE))) - skey = xmlDictComputeKey(dict->subdict, name, len); + skey = xmlDictComputeKey(dict->subdict, name, l); else skey = okey; @@ -988,25 +1032,25 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL; tmp = tmp->next) { #ifdef __GNUC__ - if ((tmp->okey == skey) && (tmp->len == len)) { - if (!memcmp(tmp->name, name, len)) + if ((tmp->okey == skey) && (tmp->len == l)) { + if (!memcmp(tmp->name, name, l)) return(tmp->name); } #else - if ((tmp->okey == skey) && (tmp->len == len) && - (!xmlStrncmp(tmp->name, name, len))) + if ((tmp->okey == skey) && (tmp->len == l) && + (!xmlStrncmp(tmp->name, name, l))) return(tmp->name); #endif nbi++; } #ifdef __GNUC__ - if ((tmp->okey == skey) && (tmp->len == len)) { - if (!memcmp(tmp->name, name, len)) + if ((tmp->okey == skey) && (tmp->len == l)) { + if (!memcmp(tmp->name, name, l)) return(tmp->name); } #else - if ((tmp->okey == skey) && (tmp->len == len) && - (!xmlStrncmp(tmp->name, name, len))) + if ((tmp->okey == skey) && (tmp->len == l) && + (!xmlStrncmp(tmp->name, name, l))) return(tmp->name); #endif } @@ -1032,7 +1076,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) { xmlDictEntryPtr entry; xmlDictEntryPtr insert; const xmlChar *ret; - int len, plen, l; + unsigned int len, plen, l; if ((dict == NULL) || (name == NULL)) return(NULL); @@ -1108,7 +1152,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) { entry->valid = 1; entry->okey = okey; - if (insert != NULL) + if (insert != NULL) insert->next = entry; dict->nbElems++; @@ -1166,6 +1210,50 @@ xmlDictSize(xmlDictPtr dict) { return(dict->nbElems); } +/** + * xmlDictSetLimit: + * @dict: the dictionnary + * @limit: the limit in bytes + * + * Set a size limit for the dictionary + * Added in 2.9.0 + * + * Returns the previous limit of the dictionary or 0 + */ +size_t +xmlDictSetLimit(xmlDictPtr dict, size_t limit) { + size_t ret; + + if (dict == NULL) + return(0); + ret = dict->limit; + dict->limit = limit; + return(ret); +} + +/** + * xmlDictGetUsage: + * @dict: the dictionnary + * + * Get how much memory is used by a dictionary for strings + * Added in 2.9.0 + * + * Returns the amount of strings allocated + */ +size_t +xmlDictGetUsage(xmlDictPtr dict) { + xmlDictStringsPtr pool; + size_t limit = 0; + + if (dict == NULL) + return(0); + pool = dict->strings; + while (pool != NULL) { + limit += pool->size; + pool = pool->next; + } + return(limit); +} #define bottom_dict #include "elfgcchack.h" diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html index 25f473e..c90e042 100644 --- a/doc/APIchunk0.html +++ b/doc/APIchunk0.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -46,6 +46,7 @@ A:link, A:visited, A:active { text-decoration: underline }
ANY
xmlIsMixedElement
xmlParseElementContentDecl
APIs
LIBXML_LEGACY_ENABLED
+xmlSchemaValidateSetFilename
ARRAY
xmlStrlen
xmlUTF8Strsize
ASCII
UTF8ToHtml
@@ -55,6 +56,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDelEncodingAlias
xmlEncodeEntitiesReentrant
xmlGetEncodingAlias
+xmlModuleOpen
+xmlModuleSymbol
xmlNewCharEncodingHandler
xmlParseCharEncoding
ATTLIST
xmlTextWriterStartDTDAttlist
@@ -95,6 +98,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlHashUpdateEntry
xmlHashUpdateEntry2
xmlHashUpdateEntry3
+
Added
xmlDictGetUsage
+xmlDictSetLimit
Additional
_htmlElemDesc
xmlCleanupGlobals
xmlInitGlobals
@@ -117,6 +122,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaNewStringValue
Allocates
xmlDOMWrapNewCtxt
Allows
xmlCatalogSetDefaultPrefer
+xmlSchemaValidateSetLocator
AlphabeticPresentationForms
xmlUCSIsAlphabeticPresentationForms
Also
xmlCheckUTF8
xmlParseAttribute
@@ -271,8 +277,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html index 51d331e..7947196 100644 --- a/doc/APIchunk1.html +++ b/doc/APIchunk1.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -358,8 +358,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index 116605d..22d5061 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index Z-a for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index Z-a for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index Y-a for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index Y-a for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -37,7 +37,11 @@ A:link, A:visited, A:active { text-decoration: underline } w-w x-x y-z -

Letter Z:

ZLIB
docbCreateFileParserCtxt
+

Letter Y:

YES
htmlNodeStatus
+
YiRadicals
xmlUCSIsYiRadicals
+
YiSyllables
xmlUCSIsYiSyllables
+
YijingHexagramSymbols
xmlUCSIsYijingHexagramSymbols
+

Letter Z:

ZLIB
docbCreateFileParserCtxt
docbParseFile
docbSAXParseFile
htmlCreateFileParserCtxt
@@ -149,7 +153,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
activates
xmlXPathContextSetCache
-
activation
xmlGetLineNo
acts
xmlGetProp
actual
xmlGetUTF8Char
xmlSchemaValidateLengthFacet
@@ -251,6 +254,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAddPrevSibling
xmlAddSibling
affect
xmlKeepBlanksDefault
+
affected
xmlSchemaValidityLocatorFunc
affiliation
_xmlSchemaElement
afraid
xmlEncodeEntities
after
UTF8ToHtml
@@ -287,8 +291,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchematronValidateDoc
xmlShellValidate
xmlValidateDtd
-
aggregate
xmlNodeBufGetContent
+
aggregate
xmlBufGetNodeContent
+xmlNodeBufGetContent
xmlNodeGetContent
+
ahead
XML_MAX_LOOKUP_LIMIT
algebraic
xmlExpExpDerive
alias
xmlAddEncodingAlias
xmlDelEncodingAlias
@@ -308,7 +314,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewRMutex
xmlReallocLoc
xmlXPathObjectCopy
-
allocation
htmlNewParserCtxt
+
allocation
LIBXML_THREAD_ALLOC_ENABLED
+htmlNewParserCtxt
xmlBufferSetAllocationScheme
xmlGetBufferAllocationScheme
xmlMallocAtomicLoc
@@ -351,7 +358,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidateName
xmlValidateQName
allowable
xmlSkipBlankChars
-
allowed
XML_MAX_TEXT_LENGTH
+
allowed
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
_htmlElemDesc
_xmlElement
_xmlSchemaWildcard
@@ -360,6 +370,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlNodeStatus
xmlAutomataNewAllTrans
xmlAutomataNewCounterTrans
+xmlBufNodeDump
xmlIsLetter
xmlNodeAddContent
xmlNodeAddContentLen
@@ -399,7 +410,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseCharEncoding
xmlParseNotationType
xmlParserInputGrow
-xmlParserInputRead
xmlReallocFunc
xmlReplaceNode
xmlXPathNodeSetAddUnique
@@ -431,10 +441,12 @@ A:link, A:visited, A:active { text-decoration: underline }
amd
xmlCatalogIsEmpty
amount
INPUT_CHUNK
_xmlParserInputBuffer
+xmlDictGetUsage
xmlMemDisplayLast
xmlMemUsed
xmlParserInputBufferGrow
xmlParserInputBufferRead
+xmlParserInputGrow
amp
xmlParseEntityRef
xmlParseSDDecl
xmlParserHandleReference
@@ -623,7 +635,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrncatNew
automaton
_xmlSchemaType
autoreference
_xmlDoc
-
avoid
xmlCleanupParser
+
avoid
XML_MAX_LOOKUP_LIMIT
+xmlCleanupParser
xmlCleanupThreads
xmlGetBufferAllocationScheme
avoiding
xmlTextReaderNext
@@ -638,8 +651,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index a594514..c1336cb 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -49,6 +49,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlPreviousElementSibling
xmlRelaxNGDump
xmlSetEntityReferenceFunc
+
bad
XML_MAX_LOOKUP_LIMIT
badly
xmlParseExternalID
bahaviour
xmlTextReaderNormalization
balanced
xmlParseBalancedChunkMemory
@@ -100,7 +101,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCleanupThreads
xmlCurrentChar
xmlGcMemSetup
-xmlGetLineNo
xmlInitParser
xmlMemSetup
xmlTextReaderRelaxNGSetSchema
@@ -113,7 +113,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidGetValidElements
xmlXPathNextPreceding
xmlXPathStringFunction
-
beginning
xmlBufferAddHead
+
beginning
xmlBufShrink
+xmlBufferAddHead
xmlBufferShrink
xmlByteConsumed
xmlListInsert
@@ -127,16 +128,21 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCurrentChar
xmlKeepBlanksDefault
xmlSubstituteEntitiesDefault
-
behaviour
htmlNodeDump
+
behaviour
XML_MAX_LOOKUP_LIMIT
+htmlNodeDump
htmlNodeDumpFile
htmlNodeDumpFileFormat
htmlNodeDumpFormatOutput
htmlNodeDumpOutput
resolveEntity
resolveEntitySAXFunc
+xmlBufNodeDump
+xmlBufShrink
xmlElemDump
xmlFreeNode
xmlFreeNodeList
+xmlModuleOpen
+xmlModuleSymbol
xmlNodeDump
xmlNodeDumpOutput
xmlNodeGetSpacePreserve
@@ -171,6 +177,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextWriterWriteBinHex
bindings
_xmlSchema
bit
xmlStrEqual
+
bits
xmlGetLineNo
blanks
xmlKeepBlanksDefault
xmlSkipBlankChars
bloc
xmlParseBalancedChunkMemory
@@ -206,7 +213,10 @@ A:link, A:visited, A:active { text-decoration: underline }
bound
xmlExpNewRange
boundaries
_xmlParserCtxt
xmlSearchNs
-
boundary
XML_MAX_TEXT_LENGTH
+
boundary
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
xmlParseElementChildrenContentDecl
xmlParseElementMixedContentDecl
bracket
xmlParseCharData
@@ -249,7 +259,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserInputBufferPush
xmlParserInputBufferRead
xmlTextReaderGetRemainder
-
buffers
xmlBufferDetach
+
buffers
LIBXML2_NEW_BUFFER
+xmlBufferDetach
builded
XML_SCHEMAS_ATTRGROUP_GLOBAL
XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
building
XML_MAX_TEXT_LENGTH
@@ -304,8 +315,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index 7985825..113385b 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -52,7 +52,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCheckFilename
xmlCleanupParser
xmlCleanupThreads
-xmlGetLineNo
xmlTextReaderCurrentDoc
xmlXPathAddValues
xmlXPathDivValues
@@ -87,10 +86,13 @@ A:link, A:visited, A:active { text-decoration: underline } xmlC14NDocSave
xmlC14NDocSaveTo
xmlC14NExecute
+
canot
xmlModuleOpen
+xmlModuleSymbol
capable
xmlCheckUTF8
caracters
xmlOutputBufferWriteEscape
cardinality
xmlExpParse
-
carried
xmlNewDocProp
+
carried
xmlBufGetNodeContent
+xmlNewDocProp
xmlNewNsProp
xmlNewNsPropEatName
xmlNewProp
@@ -139,7 +141,8 @@ A:link, A:visited, A:active { text-decoration: underline }
ceiling
xmlXPathCeilingFunction
certainly
xmlTextReaderGetRemainder
chained
xmlFreeNsList
-
change
htmlSetMetaEncoding
+
change
LIBXML2_NEW_BUFFER
+htmlSetMetaEncoding
xmlCtxtResetLastError
xmlNanoFTPCwd
xmlParseSDDecl
@@ -581,6 +584,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserInputBufferRead
xmlXPathSubstringFunction
consist
xmlXPathNextAncestor
+
const
xmlModuleOpen
+xmlModuleSymbol
constant
XML_SAX2_MAGIC
xmlByteConsumed
constraint
_xmlSchemaAttribute
@@ -652,6 +657,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathDistinct
xmlXPathDistinctSorted
contains
XML_SCHEMAS_ATTRGROUP_HAS_REFS
+_xmlEntity
xmlCurrentChar
xmlParseEntityRef
xmlParsePEReference
@@ -881,6 +887,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlMemGet
xmlMemUsed
xmlOutputBufferCreateFilename
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlSchemaValidateFile
xmlXPathContextSetCache
custom
xmlDOMWrapAdoptNode
@@ -896,8 +904,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index 21eaffe..b1f069d 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -242,7 +242,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCheckLanguageID
xmlCreateEntitiesTable
xmlDecodeEntities
+xmlInitializeDict
+xmlNodeDump
xmlParserHandleReference
+xmlParserInputRead
xmlScanName
depth
_xmlParserCtxt
_xmlValidCtxt
@@ -379,12 +382,16 @@ A:link, A:visited, A:active { text-decoration: underline }
determinist
xmlAutomataIsDeterminist
xmlRegexpIsDeterminist
dict
_xmlDoc
-
dictionary
_xmlParserCtxt
+
dictionaries
XML_MAX_NAME_LENGTH
+
dictionary
XML_MAX_DICTIONARY_LIMIT
+_xmlParserCtxt
_xmlXPathContext
xmlDictCleanup
xmlDictCreate
xmlDictCreateSub
+xmlDictGetUsage
xmlDictReference
+xmlDictSetLimit
xmlHashCreateDict
xmlInitializeDict
xmlPatterncompile
@@ -396,10 +403,12 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
xmlExpNewCtxt
did
XML_SCHEMAS_TYPE_BLOCK_DEFAULT
@@ -420,7 +429,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrQEqual
differentiate
xmlXPathOrderDocElems
differently
xmlTextReaderGetRemainder
-
differs
xmlNewEntity
+
differs
xmlBufShrink
+xmlNewEntity
digit
xmlXPathStringFunction
digits
xmlXPathStringFunction
dir
xmlShellDir
@@ -443,7 +453,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNextPreceding
xmlXPathNextPrecedingSibling
xmlXPathNextSelf
-
directly
xmlNodeBufGetContent
+
directly
xmlBufGetNodeContent
+xmlNodeBufGetContent
xmlNodeGetContent
xmlNormalizeURIPath
xmlParseAttribute
@@ -466,6 +477,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserGetDirectory
xmlShellList
disable
xmlCatalogSetDebug
+xmlSchemaValidateSetLocator
disabled
XML_CAST_FPTR
_xmlParserCtxt
xmlParseURIRaw
@@ -474,8 +486,7 @@ A:link, A:visited, A:active { text-decoration: underline }
disallowed
XML_SCHEMAS_ELEM_BLOCK_EXTENSION
XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION
-
discard
xmlParserInputRead
-xmlUnlinkNode
+
discard
xmlUnlinkNode
discarded
xmlDeregisterNodeFunc
discarding
xmlParseAttValue
xmlValidCtxtNormalizeAttributeValue
@@ -532,7 +543,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlInitCharEncodingHandlers
xmlKeepBlanksDefault
xmlNodeListGetRawString
-xmlParserInputRead
xmlPatternMatch
xmlRemoveProp
xmlUTF8Strlen
@@ -601,7 +611,11 @@ A:link, A:visited, A:active { text-decoration: underline }
dtds
getSystemId
xmlSAX2GetSystemId
xmlValidateDtdFinal
-
dump
xmlBufferAdd
+
due
xmlBufShrink
+xmlModuleOpen
+xmlModuleSymbol
+
dump
xmlBufShrink
+xmlBufferAdd
xmlBufferCCat
xmlBufferDump
xmlBufferShrink
@@ -643,8 +657,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index ce82237..2eac2f6 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlLoadCatalogs
efficiency
xmlBuildRelativeURI
either
xmlBoolToText
+xmlBufGetNodeContent
xmlCurrentChar
xmlLoadACatalog
xmlNodeBufGetContent
@@ -170,6 +171,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPtrNewRangePoints
ends
_xmlParserNodeInfo
xmlNanoHTTPClose
+
enforced
XML_MAX_LOOKUP_LIMIT
engine
xmlXPathAxisFunc
xmlXPathFuncLookupFunc
xmlXPathVariableLookupFunc
@@ -311,6 +313,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathEvalFunc
xmlXPathEvalPredicate
xmlXPathEvaluatePredicateResult
+xmlXPathNodeEval
xmlXPtrBuildNodeList
xmlXPtrEval
evaulation
xmlRegFreeExecCtxt
@@ -395,6 +398,7 @@ A:link, A:visited, A:active { text-decoration: underline }
explicitly
xmlSAXDefaultVersion
explored
xmlXPathAxisFunc
exposing
xmlTextReaderRead
+
express
LIBXML2_NEW_BUFFER
expressing
xmlPathToURI
expressions
LIBXML_EXPR_ENABLED
LIBXML_REGEXP_ENABLED
@@ -432,6 +436,8 @@ A:link, A:visited, A:active { text-decoration: underline }
extlang
xmlCheckLanguageID
extract
XML_GET_CONTENT
XML_GET_LINE
+xmlBufContent
+xmlBufEnd
xmlBufferContent

A-B C-C @@ -442,8 +448,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index bbf22e5..163d67b 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -38,6 +38,7 @@ A:link, A:visited, A:active { text-decoration: underline } x-x y-z

Letter f:

fTP
xmlNanoFTPConnectTo
+
face
XML_MAX_NAME_LENGTH
facet
XML_SCHEMAS_FACET_COLLAPSE
XML_SCHEMAS_FACET_PRESERVE
XML_SCHEMAS_FACET_REPLACE
@@ -114,7 +115,9 @@ A:link, A:visited, A:active { text-decoration: underline }
fatal
fatalErrorSAXFunc
fatalError
fatalErrorSAXFunc
favor
xmlNewElementContent
-
feature
XML_MAX_TEXT_LENGTH
+
feature
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
xmlGetFeature
xmlGetFeaturesList
xmlHasFeature
@@ -177,6 +180,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_FINAL_DEFAULT_UNION
find
xmlGetThreadId
xmlIsXHTML
+xmlSchemaValidityLocatorFunc
finding
xmlNanoFTPScanProxy
xmlNanoFTPUpdateURL
xmlNanoHTTPScanProxy
@@ -233,6 +237,7 @@ A:link, A:visited, A:active { text-decoration: underline }
flow
xmlScanName
xmlSchemaSAXPlug
xmlSchemaSAXUnplug
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
flushed
xmlTextWriterEndDocument
flushes
xmlOutputBufferClose
@@ -305,6 +310,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlNodeDumpOutput
htmlSaveFileEnc
htmlSaveFileFormat
+xmlBufNodeDump
xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
@@ -424,8 +430,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html index 0912b93..92d3845 100644 --- a/doc/APIchunk16.html +++ b/doc/APIchunk16.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -110,6 +110,7 @@ A:link, A:visited, A:active { text-decoration: underline }
get
_xmlSAXHandler
_xmlSAXHandlerV1
fatalErrorSAXFunc
+xmlBufUse
xmlBufferLength
xmlCatalogGetDefaults
xmlGetCompressMode
@@ -178,6 +179,10 @@ A:link, A:visited, A:active { text-decoration: underline }
grows
xmlBufferWriteCHAR
xmlBufferWriteChar
xmlBufferWriteQuotedString
+
guarantee
xmlModuleOpen
+xmlModuleSymbol
+
guaranteed
xmlModuleOpen
+xmlModuleSymbol
guess
xmlCleanupParser
xmlCleanupThreads

Letter h:

had
xmlNewGlobalNs
@@ -246,6 +251,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoHTTPMethodRedir
xmlNanoHTTPMimeType
heading
xmlCharEncodingOutputFunc
+
held
xmlOutputBufferGetContent
+xmlOutputBufferGetSize
helper
XML_SCHEMAS_ELEM_CIRCULAR
here
_xmlXPathContext
htmlNodeStatus
@@ -274,6 +281,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewNsPropEatName
xmlNewProp
holds
xmlBufferWriteQuotedString
+
hooks
LIBXML_THREAD_ALLOC_ENABLED
host
xmlNanoFTPProxy
xmlNanoFTPScanProxy
xmlNanoFTPUpdateURL
@@ -285,6 +293,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoFTPUpdateURL
hour
ftpListCallback
how
_xmlError
+xmlDictGetUsage
href
XINCLUDE_HREF
href==NULL
xmlNewNs
hrefs
xlinkExtendedLinkFunk
@@ -342,8 +351,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html index 6936af2..070f8ce 100644 --- a/doc/APIchunk17.html +++ b/doc/APIchunk17.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -42,6 +42,7 @@ A:link, A:visited, A:active { text-decoration: underline } LIBXML_ISO8859X_ENABLED
icu
LIBXML_ICU_ENABLED
identify
xmlParseAttributeType
+
identitier
XML_MAX_NAME_LENGTH
identity-constraint
_xmlSchema
_xmlSchemaElement
ignorable
ignorableWhitespace
@@ -59,7 +60,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlC14NDocSave
xmlC14NDocSaveTo
xmlC14NExecute
-
imbrication
xmlNodeDump
+
imbrication
xmlBufNodeDump
+xmlNodeDump
xmlNodeDumpOutput
img
xmlBuildRelativeURI
immediately
xmlCheckVersion
@@ -191,7 +193,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathDebugDumpObject
indentation?
xmlTextWriterSetIndent
indented
xmlSaveFormatFile
-
indenting
xmlDocDumpFormatMemory
+
indenting
xmlBufNodeDump
+xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
xmlNodeDump
@@ -218,7 +221,6 @@ A:link, A:visited, A:active { text-decoration: underline } LIBXML_ATTR_FORMAT
xmlParseExternalID
xmlParserInputGrow
-xmlParserInputRead
xmlRegExecPushString
xmlRegExecPushString2
xmlURIUnescapeString
@@ -302,7 +304,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewTextReader
xmlRelaxNGGetParserErrors
xmlSchemaGetParserErrors
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
+xmlSchemaValidityLocatorFunc
xmlTextReaderByteConsumed
xmlXPathOrderDocElems
informations
_xmlAttr
@@ -329,6 +334,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAX2StartElementNs
xmlSchemaGetValidErrors
xmlSchemaSetValidErrors
+xmlSchemaValidityLocatorFunc
xmlShellDir
xmlXIncludeProcessNode
informative
_xmlError
@@ -417,6 +423,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAddChild
xmlAddNextSibling
xmlAddPrevSibling
+xmlBufShrink
xmlCopyElementContent
xmlDocSetRootElement
xmlFreeElementContent
@@ -429,6 +436,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlIsIdeographic
xmlIsPubidChar
xmlKeepBlanksDefault
+xmlNodeDump
xmlRegisterHTTPPostCallbacks
xmlSaveDoc
xmlSaveTree
@@ -497,17 +505,20 @@ A:link, A:visited, A:active { text-decoration: underline }
interprestation
xmlXPathFunction
interpreter
xmlXPathAxisFunc
intersection
xmlXPathIntersection
+
introduced
LIBXML2_NEW_BUFFER
+
ints
xmlGetLineNo
invalid
XML_SCHEMAS_TYPE_INTERNAL_INVALID
xmlParseSDDecl
xmlReconciliateNs
xmlValidateDtdFinal
invited
xmlValidGetValidElements
-
invoking
xmlGetLineNo
isinf
xmlXPathIsInf
isn
xmlRegisterCharEncodingHandler
isnan
xmlXPathIsNaN
issue
xmlEncodeEntities
issued
xlinkIsLink
+
issues
xmlModuleOpen
+xmlModuleSymbol
item
XML_SCHEMAS_TYPE_BLOCK_DEFAULT
XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE
XML_SCHEMAS_TYPE_MARKED
@@ -545,8 +556,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index 5de97d8..90249a1 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -184,12 +184,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrndup
xmlUTF8Strndup
xmlUTF8Strsize
-
lenght
xmlExpGetLanguage
-xmlExpGetStart
-xmlExpNewAtom
-xmlRelaxNGValidatePushCData
-xmlSplitQName3
-xmlValidatePushCData
length-1
xmlXPathNodeSetItem
less
xmlExpExpDerive
xmlSaveToFilename
@@ -199,6 +193,7 @@ A:link, A:visited, A:active { text-decoration: underline }
less-than
xmlNewTextChild
level
XML_SCHEMAS_ELEM_TOPLEVEL
_xmlDoc
+xmlBufNodeDump
xmlC14NDocSave
xmlCatalogSetDebug
xmlCleanupMemory
@@ -299,15 +294,22 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidityErrorFunc
xmlValidityWarningFunc
likely
xmlGetThreadId
-
limit
_xmlXPathParserContext
+
limit
XML_MAX_NAME_LENGTH
+_xmlXPathParserContext
xmlCharEncFirstLine
xmlDecodeEntities
+xmlDictSetLimit
xmlPatternMaxDepth
-
limitation
XML_MAX_TEXT_LENGTH
+
limitation
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
+xmlGetLineNo
limited
_htmlElemDesc
+xmlNodeDump
linear
htmlEntityLookup
htmlEntityValueLookup
xmlExpExpDerive
+
lines
xmlGetLineNo
linked
_xmlSchemaAttributeLink
_xmlSchemaFacetLink
_xmlSchemaTypeLink
@@ -372,6 +374,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCanonicPath
xmlPathToURI
xmlSAX2SetDocumentLocator
+xmlSchemaValidateSetLocator
+xmlSchemaValidityLocatorFunc
xmlTextReaderErrorFunc
xmlTextReaderLocatorBaseURI
xmlTextReaderLocatorLineNumber
@@ -429,8 +433,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index 0f302d0..23f434e 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -97,7 +97,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStringLenDecodeEntities
marking
xmlParseCharData
marks
xmlParseCharData
-
markup
xmlParseMarkupDecl
+
markup
XML_MAX_NAME_LENGTH
+xmlParseMarkupDecl
xmlParseSDDecl
xmlTextReaderReadInnerXml
xmlTextReaderReadOuterXml
@@ -289,6 +290,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDOMWrapRemoveNode
month
ftpListCallback
more
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
xmlExpGetLanguage
xmlExpGetStart
xmlParseAttributeType
@@ -308,7 +310,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGetFeaturesList
move
xmlDOMWrapAdoptNode
moved
xmlTextReaderMoveToElement
-
much
xmlReconciliateNs
+
much
xmlDictGetUsage
+xmlReconciliateNs
multi-threaded
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
multi-threading
xmlCleanupGlobals
@@ -346,8 +349,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html index 5c70d09..1d10f93 100644 --- a/doc/APIchunk2.html +++ b/doc/APIchunk2.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -208,7 +208,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseEntityValue
xmlValidateAttributeValue
xmlValidateDtdFinal
-
ENTITY_REF
xmlNodeBufGetContent
+
ENTITY_REF
xmlBufGetNodeContent
+xmlNodeBufGetContent
xmlNodeGetContent
ENTITY_REFs
xmlNewChild
xmlNodeListGetRawString
@@ -287,6 +288,7 @@ A:link, A:visited, A:active { text-decoration: underline }
EntitiesTable
htmlEntityLookup
htmlEntityValueLookup
Entity
_xmlEntity
+xmlBufGetNodeContent
xmlNewEntityInputStream
xmlNodeBufGetContent
xmlNodeGetBase
@@ -328,6 +330,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathEvalExpression
xmlXPathEvalPredicate
xmlXPathEvaluatePredicateResult
+xmlXPathNodeEval
xmlXPtrEval
xmlXPtrEvalRangePredicate
Evaluates
xmlExpExpDerive
@@ -389,8 +392,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index 72ed431..0317066 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -306,8 +306,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index 2f98a8c..c655198 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -135,7 +135,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlEncodeEntities
xmlInitParser
xmlInitializeCatalog
-xmlInitializeDict
xmlLoadCatalog
xmlLoadCatalogs
xmlParseAttributeType
@@ -231,7 +230,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathValueFlipSign
opposite
xmlCleanupParser
optimized
xmlXPathNodeSetAddUnique
-
option
XML_MAX_TEXT_LENGTH
+
option
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
xmlDOMWrapAdoptNode
xmlDOMWrapCloneNode
xmlDOMWrapReconcileNamespaces
@@ -322,6 +323,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlLockLibrary
xmlParseEntity
xmlSAXParseEntity
+xmlSchemaValidityLocatorFunc
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
xmlTextReaderNormalization
@@ -337,11 +339,15 @@ A:link, A:visited, A:active { text-decoration: underline }
outside
xmlReconciliateNs
over
xmlExpCtxtNbCons
overflow
_xmlParserInput
-
override
XML_MAX_TEXT_LENGTH
+
override
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
resolveEntity
resolveEntitySAXFunc
xmlCatalogAdd
+xmlGetLineNo
xmlSAX2ResolveEntity
+
overriding
XML_MAX_NAME_LENGTH
overwrite
xmlACatalogAdd
xmlCatalogAdd
overwritten
xmlAddEncodingAlias
@@ -369,8 +375,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index 94d0248..2f20018 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -151,6 +151,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseAttributeType
xmlValidateElementDecl
xmlXPathContextSetCache
+
per-thread
LIBXML_THREAD_ALLOC_ENABLED
performance
xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
performed
htmlNodeStatus
@@ -189,7 +190,6 @@ A:link, A:visited, A:active { text-decoration: underline }
pnetlib-doc
xmlTextReaderNodeType
pointed
xmlPopInput
pointers
xmlParserInputGrow
-xmlParserInputRead
xmlReconciliateNs
xmlRegExecErrInfo
xmlRegExecNextValues
@@ -208,6 +208,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoHTTPScanProxy
portability
INVALID_SOCKET
SOCKET
+xmlModuleOpen
+xmlModuleSymbol
portable
xmlXPathIsInf
xmlXPathIsNaN
pos
xmlUTF8Strsub
@@ -294,7 +296,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathEvaluatePredicateResult
xmlXPtrEvalRangePredicate
preferably
xmlInitializeCatalog
-xmlInitializeDict
xmlLoadCatalog
xmlLoadCatalogs
xmlNewPI
@@ -331,7 +332,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNodeGetSpacePreserve
xmlNodeSetSpacePreserve
xmlParserInputGrow
-xmlParserInputRead
xmlTextReaderPreserve
xmlTextReaderPreservePattern
preserved
HTML_PRESERVE_NODE
@@ -355,6 +355,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCatalogSetDebug
xmlCatalogSetDefaultPrefer
xmlDeregisterNodeDefault
+xmlDictSetLimit
xmlKeepBlanksDefault
xmlLineNumbersDefault
xmlPedanticParserDefault
@@ -373,6 +374,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlNodeDumpFileFormat
htmlNodeDumpFormatOutput
htmlNodeDumpOutput
+xmlBufNodeDump
xmlElemDump
xmlNodeDump
xmlNodeDumpOutput
@@ -508,6 +510,7 @@ A:link, A:visited, A:active { text-decoration: underline }
provenance
xmlEntityReferenceFunc
provide
INVALID_SOCKET
SOCKET
+xmlBufNodeDump
xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
@@ -517,6 +520,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlOutputMatchCallback
xmlSaveFormatFile
xmlSaveFormatFileEnc
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlUTF8Strloc
xmlUTF8Strpos
@@ -570,8 +575,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index c7e04e3..16c7c21 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -59,8 +59,10 @@ A:link, A:visited, A:active { text-decoration: underline }
quote
docbEncodeEntities
htmlEncodeEntities
xmlBufferWriteQuotedString
+xmlTextWriterSetQuoteChar
quoted
xmlBufferWriteQuotedString
quotes
xmlParseQuotedString
+
quoting
xmlTextWriterSetQuoteChar

Letter r:

raise
XP_ERROR
XP_ERROR0
raised
_xmlError
@@ -190,6 +192,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlNodeDumpFormatOutput
htmlNodeDumpOutput
htmlParseElement
+xmlBufNodeDump
xmlCopyDoc
xmlCopyEnumeration
xmlCopyNode
@@ -244,7 +247,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGetParameterEntity
referred
xmlParseAttribute
xmlParseCharRef
-
refresh
xmlParserInputRead
refs
_xmlDoc
_xmlParserCtxt
refuse
xmlNewNs
@@ -335,6 +337,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlHashRemoveEntry2
xmlHashRemoveEntry3
remove
xmlACatalogRemove
+xmlBufShrink
xmlBufferShrink
xmlCatalogRemove
xmlDecodeEntities
@@ -352,6 +355,7 @@ A:link, A:visited, A:active { text-decoration: underline } nodePop
valuePop
xmlACatalogRemove
+xmlBufShrink
xmlBufferShrink
xmlCatalogRemove
xmlCheckLanguageID
@@ -403,6 +407,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNormalizeFunction
reporting
INPUT_CHUNK
_xmlXPathContext
+xmlSchemaValidateSetFilename
xmlStructuredErrorFunc
reports
docbCreatePushParserCtxt
htmlCreatePushParserCtxt
@@ -447,7 +452,6 @@ A:link, A:visited, A:active { text-decoration: underline }
requires
_htmlElemDesc
xmlC14NDocSaveTo
xmlC14NExecute
-xmlGetLineNo
xmlRelaxNGValidatePushElement
requred
xmlC14NDocSave
reserved
xmlCheckLanguageID
@@ -518,6 +522,7 @@ A:link, A:visited, A:active { text-decoration: underline }
restored
xmlSchemaSAXUnplug
xmlTextReaderSetErrorHandler
xmlTextReaderSetStructuredErrorHandler
+xmlXPathNodeEval
restrict
xmlParseExternalID
restriction
XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION
XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
@@ -628,6 +633,7 @@ A:link, A:visited, A:active { text-decoration: underline }
running
xmlKeepBlanksDefault
runtime
LIBXML_DEBUG_RUNTIME
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
xmlMemDisplayLast

A-B C-C @@ -638,8 +644,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html index 9067279..e81f34d 100644 --- a/doc/APIchunk24.html +++ b/doc/APIchunk24.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -40,10 +40,11 @@ A:link, A:visited, A:active { text-decoration: underline }

Letter s:

s390
XML_CAST_FPTR
safe
BAD_CAST
xmlInitializeCatalog
-xmlInitializeDict
xmlLoadCatalog
xmlLoadCatalogs
-
safety
XML_MAX_TEXT_LENGTH
+
safety
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
same
HTML_COMMENT_NODE
HTML_ENTITY_REF_NODE
HTML_PI_NODE
@@ -66,6 +67,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNextFollowing
xmlXPathNextPreceding
xmlXPathNormalizeFunction
+xmlXPathSetContextNode
save
htmlNodeDumpFileFormat
xmlGcMemGet
xmlMemGet
@@ -135,6 +137,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaValidateFacetWhtsp
xmlSchemaValidateFile
xmlSchemaValidateStream
+xmlSchemaValidityLocatorFunc
xmlSchematronNewMemParserCtxt
xmlTextReaderRelaxNGValidate
xmlTextReaderRelaxNGValidateCtxt
@@ -384,6 +387,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseExternalID
xmlPreviousElementSibling
xmlRelaxNGNewDocParserCtxt
+xmlSchemaValidateSetLocator
single
IS_DIGIT_CH
XML_MAX_TEXT_LENGTH
xmlCurrentChar
@@ -407,6 +411,7 @@ A:link, A:visited, A:active { text-decoration: underline }
singleton
xmlCheckLanguageID
site1
xmlBuildRelativeURI
site2
xmlBuildRelativeURI
+
size_t
xmlBufShrink
sizes
xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
skip
xmlSkipBlankChars
@@ -453,6 +458,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
xmlXIncludeProcessTreeFlagsData
+
somehow
xmlNodeDump
sometimes
xmlCheckLanguageID
xmlCleanupParser
xmlCleanupThreads
@@ -639,7 +645,6 @@ A:link, A:visited, A:active { text-decoration: underline }
startup
setDocumentLocator
setDocumentLocatorSAXFunc
xmlInitializeCatalog
-xmlInitializeDict
xmlLoadCatalog
xmlLoadCatalogs
xmlSAX2SetDocumentLocator
@@ -688,6 +693,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlExpGetLanguage
xmlExpGetStart
xmlGetFeature
+xmlGetLineNo
xmlInputReadCallback
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
@@ -703,6 +709,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAXParseFileWithData
xmlSAXParseMemoryWithData
xmlXPathOrderDocElems
+
stores
xmlBufNodeDump
str
htmlParseEntityRef
xmlBufferAdd
strcasecmp
xmlStrcasecmp
@@ -735,6 +742,7 @@ A:link, A:visited, A:active { text-decoration: underline }
stringi
xmlXPathSubstringAfterFunction
strings
_xmlParserCtxt
xmlDictCreateSub
+xmlDictGetUsage
xmlExpGetLanguage
xmlExpGetStart
xmlExpParse
@@ -776,6 +784,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlFreeNsList
xmlLoadACatalog
xmlNewRMutex
+xmlNodeDump
xmlRegFreeExecCtxt
struture
xmlRelaxNGParse
xmlSchemaParse
@@ -808,6 +817,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SUBSTITUTE_NONE
XML_SUBSTITUTE_PEREF
XML_SUBSTITUTE_REF
+xmlBufGetNodeContent
xmlNodeBufGetContent
xmlNodeGetContent
xmlParseEntityValue
@@ -891,6 +901,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderSetParserProp
xmlUnsetNsProp
xmlUnsetProp
+xmlXPathSetContextNode
successfully
xmlTextReaderNext
xmlTextReaderNextSibling
xmlTextReaderRead
@@ -966,8 +977,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index dc8dc79..dec65ba 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -117,6 +117,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNodeListGetRawString
xmlNodeListGetString
xmlParseEntityRef
+xmlUnlinkNode
xmlXPathAddValues
xmlXPathDivValues
xmlXPathIdFunction
@@ -144,6 +145,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrQEqual
xmlStrcat
xmlStrdup
+xmlUnlinkNode
third
xmlHashAddEntry3
xmlHashLookup3
xmlHashQLookup3
@@ -158,6 +160,7 @@ A:link, A:visited, A:active { text-decoration: underline }
those
xmlCheckLanguageID
xmlKeepBlanksDefault
xmlParseSDDecl
+xmlSchemaValidateSetLocator
xmlSearchNs
xmlXPathSubstringFunction
though
xmlDocDumpMemory
@@ -170,7 +173,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGetThreadId
xmlInitThreads
xmlInitializeCatalog
-xmlInitializeDict
xmlIsMainThread
xmlLoadCatalog
xmlLoadCatalogs
@@ -217,6 +219,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlNodeDumpFileFormat
htmlNodeDumpFormatOutput
htmlNodeDumpOutput
+xmlBufNodeDump
xmlCheckLanguageID
xmlCopyDoc
xmlElemDump
@@ -365,7 +368,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoHTTPMethodRedir
xmlNanoHTTPOpen
xmlNanoHTTPOpenRedir
-xmlParserInputRead
xmlReconciliateNs
xmlURIEscape
xmlValidateRoot
@@ -425,8 +427,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html index 646acdb..17666cf 100644 --- a/doc/APIchunk26.html +++ b/doc/APIchunk26.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -62,6 +62,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNodeAddContentLen
xmlURIUnescapeString
unescaping
xmlParseURIRaw
+
unfriendly
XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
unicode
htmlEntityValueLookup
xmlIsLetter
unimplemented
htmlCtxtUseOptions
@@ -111,6 +113,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAddSibling
xmlNewEntity
xmlReplaceNode
+xmlUnlinkNode
unload
xmlModuleClose
xmlModuleFree
unloaded
xmlModuleClose
@@ -185,10 +188,12 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSplitQName2
upon
checkNamespace
xlinkNodeDetectFunc
-
upper
xmlExpNewRange
+
upper
XML_MAX_LOOKUP_LIMIT
+xmlExpNewRange
xmlIsRef
uri
xmlNormalizeWindowsPath
-
usage
xmlGetBufferAllocationScheme
+
usage
XML_MAX_NAME_LENGTH
+xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
used:
XML_DEFAULT_VERSION
used?
_xmlSchemaAttribute
@@ -239,6 +244,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGValidatePushElement
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
+
validator
xmlSchemaValidityLocatorFunc
validity
_xmlParserCtxt
_xmlValidCtxt
xlinkIsLink
@@ -292,6 +298,7 @@ A:link, A:visited, A:active { text-decoration: underline }
void
XML_CAST_FPTR
xmlSAXParseFileWithData
xmlSAXParseMemoryWithData
+
volume
_xmlParserCtxt

A-B C-C D-E @@ -301,8 +308,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk27.html b/doc/APIchunk27.html index 7123c06..cabaa27 100644 --- a/doc/APIchunk27.html +++ b/doc/APIchunk27.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -132,6 +132,7 @@ A:link, A:visited, A:active { text-decoration: underline }

what
xmlCatalogGetDefaults
xmlCatalogSetDefaults
xmlParseNamespace
+xmlSchemaValidityLocatorFunc
xmlTextReaderGetRemainder
xmlTextWriterWriteRawLen
where
_htmlElemDesc
@@ -188,6 +189,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAutomataNewOnceTrans
xmlAutomataNewOnceTrans2
xmlTextReaderLookupNamespace
+
why
xmlModuleOpen
+xmlModuleSymbol
wierd
xmlBuildRelativeURI
wildcard
XML_SCHEMAS_ATTRGROUP_GLOBAL
XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
@@ -255,6 +258,8 @@ A:link, A:visited, A:active { text-decoration: underline }
words
xmlXPathNormalizeFunction
xmlXPathStringLengthFunction
work
xmlBufferDetach
+xmlModuleOpen
+xmlModuleSymbol
xmlNodeGetBase
xmlPatternStreamable
xmlRemoveProp
@@ -270,6 +275,8 @@ A:link, A:visited, A:active { text-decoration: underline }
worthwhile
xmlBuildRelativeURI
would
_xmlError
htmlAutoCloseTag
+xmlModuleOpen
+xmlModuleSymbol
xmlTextReaderGetRemainder
wrapper
xmlDOMWrapAcquireNsFunction
xmlDOMWrapReconcileNamespaces
@@ -318,8 +325,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html index 5653024..c5993f9 100644 --- a/doc/APIchunk28.html +++ b/doc/APIchunk28.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -107,12 +107,16 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlAttributePtr
xmlGetDtdAttrDesc
xmlGetDtdQAttrDesc
xmlAttributeTablePtr
xmlCopyAttributeTable
+
xmlBufNodeDump
xmlNodeDump
+
xmlBufPtr
xmlBufGetNodeContent
xmlBuffer
xmlCharEncFirstLine
xmlCharEncInFunc
xmlCharEncOutFunc
+xmlNodeDump
xmlOutputBufferCreateBuffer
xmlBufferPtr
xmlNewTextWriterMemory
xmlOutputBufferCreateBuffer
+
xmlBufferShrink
xmlBufShrink
xmlBuildURI
xmlBuildRelativeURI
xmlBytesConsumed
xmlTextReaderByteConsumed
xmlCatalogAllow
xmlCatalogGetDefaults
@@ -129,8 +133,6 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlCharEncodingOutputFunc
xmlNewCharEncodingHandler
xmlChars
_xmlParserInput
xmlBufferWriteCHAR
-xmlParserInputGrow
-xmlParserInputRead
xmlCleanupParser
xmlCleanupParser
xmlCleanupThreads
xmlCleanupThreads
xmlCopyDocElementContent
xmlCopyElementContent
@@ -216,7 +218,8 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlHashTablePtr
xmlHashCreate
xmlHashCreateDict
xmlIDPtr
xmlAddID
-
xmlIndentTreeOutput
xmlDocDumpFormatMemory
+
xmlIndentTreeOutput
xmlBufNodeDump
+xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
xmlNodeDump
@@ -248,14 +251,14 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlIsMainThread
xmlIsMainThread
xmlIsPubidCharQ
xmlIsPubidChar
xmlIsPubidChar_ch
xmlIsPubidChar
-
xmlKeepBlanksDefault
xmlDocDumpFormatMemory
+
xmlKeepBlanksDefault
xmlBufNodeDump
+xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
xmlNodeDump
xmlNodeDumpOutput
xmlSaveFormatFile
xmlSaveFormatFileEnc
-
xmlLineNumbersDefault
xmlGetLineNo
xmlListWalk
xmlListWalker
xmlLoadExtDtdDefaultValue
XML_COMPLETE_ATTRS
XML_DETECT_IDS
@@ -311,10 +314,13 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCopyNamespaceList
xmlDOMWrapAcquireNsFunction
xmlGetNsList
+
xmlOutputBuffer
LIBXML2_NEW_BUFFER
xmlOutputBufferClose
xmlSaveFileTo
xmlSaveFormatFileTo
xmlOutputBufferPtr
xmlNewTextWriter
xmlOutputBufferCreateFilenameFunc
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputCloseCallback
xmlRegisterOutputCallbacks
xmlOutputMatchCallback
xmlRegisterOutputCallbacks
xmlOutputOpenCallback
xmlRegisterOutputCallbacks
@@ -338,6 +344,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseChunk
xmlParserFindNodeInfoIndex
xmlParserFindNodeInfoIndex
xmlParserHandleReference
xmlScanName
+
xmlParserInputBuffer
LIBXML2_NEW_BUFFER
xmlParserInputBufferPtr
xmlNewTextReader
xmlParserInputBufferCreateFilenameFunc
xmlTextReaderGetRemainder
@@ -491,6 +498,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNewNodeSetList
xmlXPathNewString
xmlXPathNewValueTree
+xmlXPathNodeEval
xmlXPathWrapNodeSet
xmlXPtrEval
xmlXPtrLocationSetAdd
@@ -533,8 +541,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk29.html b/doc/APIchunk29.html index d293408..2aaa21b 100644 --- a/doc/APIchunk29.html +++ b/doc/APIchunk29.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -107,8 +107,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html index 946863a..515118a 100644 --- a/doc/APIchunk3.html +++ b/doc/APIchunk3.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -57,7 +57,8 @@ A:link, A:visited, A:active { text-decoration: underline }
False
xmlBoolToText
Fetch
xmlNanoFTPGet
File
xmlTextReaderGetRemainder
-
Fills
xmlNodeBufGetContent
+
Fills
xmlBufGetNodeContent
+xmlNodeBufGetContent
Find
xmlExpGetLanguage
xmlExpGetStart
xmlGetRefs
@@ -120,7 +121,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDOMWrapFreeCtxt
xmlNanoFTPFreeCtxt
Front-end
xmlCharEncFirstLine
-
Function
xmlBufferContent
+
Function
xmlBufContent
+xmlBufEnd
+xmlBufUse
+xmlBufferContent
xmlBufferLength
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
@@ -140,7 +144,9 @@ A:link, A:visited, A:active { text-decoration: underline }
GeometricShapes
xmlUCSIsGeometricShapes
Georgian
xmlUCSIsGeorgian
Gets
xmlTextReaderReadState
-
Gives
xmlSchemaGetBuiltInType
+
Gives
xmlOutputBufferGetContent
+xmlOutputBufferGetSize
+xmlSchemaGetBuiltInType
Global
_xmlDoc
Gothic
xmlUCSIsGothic
Greek
xmlUCSIsGreek
@@ -316,6 +322,10 @@ A:link, A:visited, A:active { text-decoration: underline }
Intended
xmlSnprintfElementContent
Internal
_xmlDOMWrapCtxt
xmlParseMarkupDecl
+
Introduced
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
Irregular
xmlCheckLanguageID

A-B C-C @@ -326,8 +336,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html index 8220fff..d26883b 100644 --- a/doc/APIchunk4.html +++ b/doc/APIchunk4.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -91,6 +91,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSplitQName
xmlSplitQName2
Location
xmlXPathEval
+xmlXPathNodeEval
xmlXPtrEval
xmlXPtrEvalRangePredicate
LocationSet
xmlXPtrFreeLocationSet
@@ -134,7 +135,10 @@ A:link, A:visited, A:active { text-decoration: underline }
MathematicalOperators
xmlUCSIsMathematicalOperators
Max
_xmlParserCtxt
_xmlValidCtxt
-
Maximum
XML_MAX_TEXT_LENGTH
+
Maximum
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
May
xmlURIEscape
Memory
xmlDocDumpFormatMemoryEnc
xmlDocDumpMemoryEnc
@@ -193,7 +197,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaGetCanonValue
xmlSchemaNewNOTATIONValue
xmlValidateDtdFinal
-
NOTE
xmlCtxtReadFd
+
NOTE
xmlBufShrink
+xmlCtxtReadFd
xmlParseExternalID
xmlParseNotationDecl
xmlReadFd
@@ -207,6 +212,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDOMWrapRemoveNode
xmlGetProp
xmlInitCharEncodingHandlers
+xmlModuleOpen
+xmlModuleSymbol
xmlNewChild
xmlNewDocNode
xmlNewDocNodeEatName
@@ -320,8 +327,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html index fcbe54a..da60d1a 100644 --- a/doc/APIchunk5.html +++ b/doc/APIchunk5.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -149,6 +149,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaGetBuiltInListSimpleTypeItemType
Path
xmlGetNodePath
xmlXPathEval
+xmlXPathNodeEval
xmlXPtrEval
People
xmlEncodeEntities
PhoneticExtensions
xmlUCSIsPhoneticExtensions
@@ -268,8 +269,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html index 315c8bd..346e7e5 100644 --- a/doc/APIchunk6.html +++ b/doc/APIchunk6.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -82,7 +82,8 @@ A:link, A:visited, A:active { text-decoration: underline }
Raises
xmlXPathSetArityError
xmlXPathSetError
xmlXPathSetTypeError
-
Read
xmlFileRead
+
Read
xmlBufGetNodeContent
+xmlFileRead
xmlGetFeature
xmlGetUTF8Char
xmlIOFTPRead
@@ -201,6 +202,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGNewParserCtxt
xmlRelaxNGNewValidCtxt
Remove
xmlACatalogRemove
+xmlBufShrink
xmlBufferDetach
xmlBufferShrink
xmlCatalogRemove
@@ -268,8 +270,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index 452b9a7..3f46f99 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -185,8 +185,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNodeLeadingSorted
xmlXPathNodeTrailing
xmlXPathNodeTrailingSorted
+xmlXPathSetContextNode
xmlXPathTrailing
xmlXPathTrailingSorted
+
Setting
xmlSchemaValidateSetLocator
Setup
xmlNanoFTPProxy
xmlReaderNewDoc
xmlReaderNewFd
@@ -229,7 +231,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderErrorFunc
Similarly
xmlParseEntityRef
Simply
xmlCreateURI
-
Since
xmlStrcat
+
Since
xmlNodeDump
+xmlStrcat
xmlStrdup
xmlTextReaderNormalization
Single
xmlCheckLanguageID
@@ -303,8 +306,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html index 8fca400..934e39d 100644 --- a/doc/APIchunk8.html +++ b/doc/APIchunk8.html @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -41,6 +41,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAddChildList
xmlAddPrevSibling
xmlAddSibling
+xmlBufGetNodeContent
xmlNewTextChild
xmlNodeBufGetContent
xmlNodeGetContent
@@ -152,6 +153,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCatalogGetSystem
xmlCatalogResolvePublic
xmlCatalogResolveSystem
+xmlGetLineNo
xmlIsXHTML
xmlNanoFTPGetConnection
xmlValidateAttributeDecl
@@ -281,8 +283,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index 5cb56e3..8c4ac1f 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index V-Y for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index V-Y for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index V-X for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index V-X for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -132,6 +132,7 @@ A:link, A:visited, A:active { text-decoration: underline }
With
xmlParseAttribute
xmlParseEndTag
xmlParseStartTag
+
Workaround
xmlSchemaValidateSetFilename
Working
xmlParseNamespace
Wrap
xmlXPathWrapNodeSet
xmlXPtrWrapLocationSet
@@ -195,7 +196,10 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_ELEMENT_TYPE_xxx
xmlParseElementContentDecl
XML_ENTITY_DECL
_xmlEntity
XML_ERR_OK
xmlParseInNodeContext
-
XML_PARSE_HUGE
XML_MAX_TEXT_LENGTH
+
XML_PARSE_BIG_LINES
xmlGetLineNo
+
XML_PARSE_HUGE
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
XML_SCHEMAS_ELEM_GLOBAL
XML_SCHEMAS_ELEM_TOPLEVEL
XML_SCHEMAS_FACET_PRESERVE
_xmlSchemaFacet
XML_SCHEMAS_STRING
xmlSchemaNewStringValue
@@ -236,10 +240,6 @@ A:link, A:visited, A:active { text-decoration: underline } XINCLUDE_OLD_NS
Xml
xmlTextReaderNodeType
XmlNodeType
xmlTextReaderNodeType
-

Letter Y:

YES
htmlNodeStatus
-
YiRadicals
xmlUCSIsYiRadicals
-
YiSyllables
xmlUCSIsYiSyllables
-
YijingHexagramSymbols
xmlUCSIsYijingHexagramSymbols

A-B C-C D-E @@ -249,8 +249,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index 35bb017..d5ca488 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -24,6 +24,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDictLookup
xmlDictQLookup
xmlEncodeEntities
+xmlOutputBufferGetContent
xmlParseAttribute
xmlParseEncodingDecl
xmlParseName
@@ -91,6 +92,12 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSaveTree
xmlTextReaderByteConsumed
xmlXPathOrderDocElems
+

Type size_t:

xmlBufNodeDump
+xmlBufShrink
+xmlBufUse
+xmlDictGetUsage
+xmlDictSetLimit
+xmlOutputBufferGetSize

Type unsigned long:

xmlChildElementCount
xmlParserFindNodeInfoIndex
xmlSchemaGetFacetValueAsULong
@@ -173,6 +180,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlACatalogResolvePublic
xmlACatalogResolveSystem
xmlACatalogResolveURI
+xmlBufContent
+xmlBufEnd
xmlBufferDetach
xmlBuildQName
xmlBuildRelativeURI
@@ -562,6 +571,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNewNodeSetList
xmlXPathNewString
xmlXPathNewValueTree
+xmlXPathNodeEval
xmlXPathObjectCopy
xmlXPathVariableLookup
xmlXPathVariableLookupFunc
diff --git a/doc/APIfiles.html b/doc/APIfiles.html index 3911d92..65e004b 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -331,11 +331,13 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictPtr
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
xmlInitializeDict

Module encoding:

UTF8Toisolat1
@@ -610,6 +612,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_PARSER_START
XML_PARSER_START_TAG
XML_PARSER_SYSTEM_LITERAL
+XML_PARSE_BIG_LINES
XML_PARSE_COMPACT
XML_PARSE_DOM
XML_PARSE_DTDATTR
@@ -816,7 +819,10 @@ A:link, A:visited, A:active { text-decoration: underline } MOVETO_ENDTAG
MOVETO_STARTTAG
SKIP_EOL
+XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
XML_MAX_TEXT_LENGTH
XML_SUBSTITUTE_BOTH
XML_SUBSTITUTE_NONE
@@ -1286,6 +1292,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRMutexUnlock
xmlUnlockLibrary

Module tree:

BASE_BUFFER_SIZE
+LIBXML2_NEW_BUFFER
XML_ATTRIBUTE_CDATA
XML_ATTRIBUTE_DECL
XML_ATTRIBUTE_ENTITIES
@@ -1378,6 +1385,14 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAttributeDefault
xmlAttributePtr
xmlAttributeType
+xmlBuf
+xmlBufContent
+xmlBufEnd
+xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufPtr
+xmlBufShrink
+xmlBufUse
xmlBuffer
xmlBufferAdd
xmlBufferAddHead
@@ -1771,6 +1786,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlOutputBufferCreateFilename
xmlOutputBufferCreateIO
xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
xmlOutputBufferWriteString
@@ -1817,7 +1834,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAutomataStatePtr
xmlFreeAutomata
xmlNewAutomata
-

Module xmlerror:

XML_C14N_CREATE_CTXT
+

Module xmlerror:

XML_BUF_OVERFLOW
+XML_C14N_CREATE_CTXT
XML_C14N_CREATE_STACK
XML_C14N_INVALID_NODE
XML_C14N_RELATIVE_NAMESPACE
@@ -1828,7 +1846,6 @@ A:link, A:visited, A:active { text-decoration: underline } XML_CATALOG_NOT_CATALOG
XML_CATALOG_PREFER_VALUE
XML_CATALOG_RECURSION
-XML_CHECK_
XML_CHECK_ENTITY_TYPE
XML_CHECK_FOUND_ATTRIBUTE
XML_CHECK_FOUND_CDATA
@@ -1867,7 +1884,6 @@ A:link, A:visited, A:active { text-decoration: underline } XML_CHECK_WRONG_NEXT
XML_CHECK_WRONG_PARENT
XML_CHECK_WRONG_PREV
-XML_CHECK_X
XML_DTD_ATTRIBUTE_DEFAULT
XML_DTD_ATTRIBUTE_REDEFINED
XML_DTD_ATTRIBUTE_VALUE
@@ -1973,6 +1989,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_ERR_MIXED_NOT_FINISHED
XML_ERR_MIXED_NOT_STARTED
XML_ERR_NAME_REQUIRED
+XML_ERR_NAME_TOO_LONG
XML_ERR_NMTOKEN_REQUIRED
XML_ERR_NONE
XML_ERR_NOTATION_NOT_FINISHED
@@ -2009,12 +2026,14 @@ A:link, A:visited, A:active { text-decoration: underline } XML_ERR_UNSUPPORTED_ENCODING
XML_ERR_URI_FRAGMENT
XML_ERR_URI_REQUIRED
+XML_ERR_USER_STOP
XML_ERR_VALUE_REQUIRED
XML_ERR_VERSION_MISMATCH
XML_ERR_VERSION_MISSING
XML_ERR_WARNING
XML_ERR_XMLDECL_NOT_FINISHED
XML_ERR_XMLDECL_NOT_STARTED
+XML_FROM_BUFFER
XML_FROM_C14N
XML_FROM_CATALOG
XML_FROM_CHECK
@@ -2038,6 +2057,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_FROM_SCHEMASV
XML_FROM_SCHEMATRONV
XML_FROM_TREE
+XML_FROM_URI
XML_FROM_VALID
XML_FROM_WRITER
XML_FROM_XINCLUDE
@@ -2906,8 +2926,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaValidateDoc
xmlSchemaValidateFile
xmlSchemaValidateOneElement
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
+xmlSchemaValidityLocatorFunc
xmlSchemaValidityWarningFunc

Module xmlschemastypes:

XML_SCHEMA_WHITESPACE_COLLAPSE
XML_SCHEMA_WHITESPACE_PRESERVE
@@ -3177,6 +3200,7 @@ A:link, A:visited, A:active { text-decoration: underline } LIBXML_SCHEMAS_ENABLED
LIBXML_SCHEMATRON_ENABLED
LIBXML_TEST_VERSION
+LIBXML_THREAD_ALLOC_ENABLED
LIBXML_THREAD_ENABLED
LIBXML_TREE_ENABLED
LIBXML_UNICODE_ENABLED
@@ -3215,6 +3239,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextWriterPtr
xmlTextWriterSetIndent
xmlTextWriterSetIndentString
+xmlTextWriterSetQuoteChar
xmlTextWriterStartAttribute
xmlTextWriterStartAttributeNS
xmlTextWriterStartCDATA
@@ -3281,6 +3306,7 @@ A:link, A:visited, A:active { text-decoration: underline } XPATH_ENCODING_ERROR
XPATH_EXPRESSION_OK
XPATH_EXPR_ERROR
+XPATH_FORBID_VARIABLE_ERROR
XPATH_INVALID_ARITY
XPATH_INVALID_CHAR_ERROR
XPATH_INVALID_CTXT
@@ -3372,6 +3398,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNAN
xmlXPathNINF
xmlXPathNewContext
+xmlXPathNodeEval
xmlXPathNodeSetCreate
xmlXPathNodeSetGetLength
xmlXPathNodeSetIsEmpty
@@ -3384,6 +3411,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathPINF
xmlXPathParserContext
xmlXPathParserContextPtr
+xmlXPathSetContextNode
xmlXPathType
xmlXPathTypePtr
xmlXPathVariable
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index dbe89e8..3c47863 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -81,6 +81,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlOutputMatchCallback
xmlOutputOpenCallback

Type const char **:

xmlGetFeaturesList
+xmlSchemaValidityLocatorFunc

Type const htmlElemDesc *:

htmlAttrAllowed
htmlElementAllowedHere
htmlElementStatusHere
@@ -108,6 +109,9 @@ A:link, A:visited, A:active { text-decoration: underline }

Type const xlinkTitle:

xlinkSimpleLinkFunk

Type const xlinkTitle *:

xlinkExtendedLinkFunk
xlinkExtendedLinkSetFunk
+

Type const xmlBufPtr:

xmlBufContent
+xmlBufEnd
+xmlBufUse

Type const xmlBufferPtr:

xmlBufferContent
xmlBufferLength

Type const xmlChRangeGroup *:

xmlCharInRange
@@ -485,6 +489,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathIsNodeType
xmlXPathNewParserContext
xmlXPathNewString
+xmlXPathNodeEval
xmlXPathNsLookup
xmlXPathRegisterFunc
xmlXPathRegisterFuncNS
@@ -581,8 +586,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStringCurrentChar
xmlValidGetPotentialChildren

Type long:

xmlMemDisplayLast
-

Type size_t:

xmlBufferCreateSize
+

Type size_t:

xmlBufShrink
+xmlBufferCreateSize
xmlBufferCreateStatic
+xmlDictSetLimit
xmlMallocAtomicLoc
xmlMallocFunc
xmlMallocLoc
@@ -616,6 +623,7 @@ A:link, A:visited, A:active { text-decoration: underline }

Type unsigned long *:

xmlSchemaValidateLengthFacet
xmlSchemaValidateLengthFacetWhtsp
xmlSchemaValidateListSimpleTypeFacet
+xmlSchemaValidityLocatorFunc

Type va_list:

xmlStrVPrintf
xmlTextWriterWriteVFormatAttribute
xmlTextWriterWriteVFormatAttributeNS
@@ -853,8 +861,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidErrors
xmlSchemaSetValidStructuredErrors
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
+xmlSchemaValidityLocatorFunc
xmlSchemaValidityWarningFunc
xmlSchematronSetValidStructuredErrors
xmlSchematronValidityErrorFunc
@@ -941,6 +951,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAutomataNewTransition
xmlAutomataNewTransition2
xmlAutomataSetFinalState
+

Type xmlBufPtr:

xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufShrink

Type xmlBufferAllocationScheme:

xmlBufferSetAllocationScheme
xmlSetBufferAllocationScheme
xmlThrDefBufferAllocScheme
@@ -995,6 +1008,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrchr
xmlStringDecodeEntities
xmlStringLenDecodeEntities
+xmlTextWriterSetQuoteChar

Type xmlChar *:

checkNamespace
docbParseDoc
docbSAXParseDoc
@@ -1085,10 +1099,12 @@ A:link, A:visited, A:active { text-decoration: underline }

Type xmlDictPtr:

xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
xmlExpNewCtxt
xmlHashCreateDict
@@ -1111,6 +1127,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAddID
xmlAddRef
xmlAttrSerializeTxtContent
+xmlBufNodeDump
xmlC14NDocDumpMemory
xmlC14NDocSave
xmlC14NDocSaveTo
@@ -1437,6 +1454,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAddNextSibling
xmlAddPrevSibling
xmlAddSibling
+xmlBufGetNodeContent
+xmlBufNodeDump
xmlC14NIsVisibleCallback
xmlChildElementCount
xmlCopyProp
@@ -1564,6 +1583,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNextPreceding
xmlXPathNextPrecedingSibling
xmlXPathNextSelf
+xmlXPathNodeEval
xmlXPathNodeLeading
xmlXPathNodeLeadingSorted
xmlXPathNodeSetAdd
@@ -1574,6 +1594,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNodeSetDel
xmlXPathNodeTrailing
xmlXPathNodeTrailingSorted
+xmlXPathSetContextNode
xmlXPtrNewCollapsedRange
xmlXPtrNewContext
xmlXPtrNewLocationSetNodes
@@ -1655,6 +1676,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNodeDumpOutput
xmlOutputBufferClose
xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
xmlOutputBufferWriteString
@@ -1950,12 +1973,15 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaValidateDoc
xmlSchemaValidateFile
xmlSchemaValidateOneElement
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlTextReaderSchemaValidateCtxt

Type xmlSchemaValidityErrorFunc:

xmlSchemaSetParserErrors
xmlSchemaSetValidErrors

Type xmlSchemaValidityErrorFunc *:

xmlSchemaGetParserErrors
xmlSchemaGetValidErrors
+

Type xmlSchemaValidityLocatorFunc:

xmlSchemaValidateSetLocator

Type xmlSchemaValidityWarningFunc:

xmlSchemaSetParserErrors
xmlSchemaSetValidErrors

Type xmlSchemaValidityWarningFunc *:

xmlSchemaGetParserErrors
@@ -2098,6 +2124,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextWriterFullEndElement
xmlTextWriterSetIndent
xmlTextWriterSetIndentString
+xmlTextWriterSetQuoteChar
xmlTextWriterStartAttribute
xmlTextWriterStartAttributeNS
xmlTextWriterStartCDATA
@@ -2202,6 +2229,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathFunctionLookup
xmlXPathFunctionLookupNS
xmlXPathNewParserContext
+xmlXPathNodeEval
xmlXPathNsLookup
xmlXPathRegisterAllFunctions
xmlXPathRegisterFunc
@@ -2214,6 +2242,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathRegisteredFuncsCleanup
xmlXPathRegisteredNsCleanup
xmlXPathRegisteredVariablesCleanup
+xmlXPathSetContextNode
xmlXPathVariableLookup
xmlXPathVariableLookupNS
xmlXPtrEval
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index 49a8737..c2b82e7 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -61,7 +61,8 @@ A:link, A:visited, A:active { text-decoration: underline } IS_LETTER_CH
IS_PUBIDCHAR
IS_PUBIDCHAR_CH
-

Letter L:

LIBXML_ATTR_ALLOC_SIZE
+

Letter L:

LIBXML2_NEW_BUFFER
+LIBXML_ATTR_ALLOC_SIZE
LIBXML_ATTR_FORMAT
LIBXML_AUTOMATA_ENABLED
LIBXML_C14N_ENABLED
@@ -91,6 +92,7 @@ A:link, A:visited, A:active { text-decoration: underline } LIBXML_SCHEMAS_ENABLED
LIBXML_SCHEMATRON_ENABLED
LIBXML_TEST_VERSION
+LIBXML_THREAD_ALLOC_ENABLED
LIBXML_THREAD_ENABLED
LIBXML_TREE_ENABLED
LIBXML_UNICODE_ENABLED
@@ -157,6 +159,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_BUFFER_ALLOC_HYBRID
XML_BUFFER_ALLOC_IMMUTABLE
XML_BUFFER_ALLOC_IO
+XML_BUF_OVERFLOW
XML_C14N_1_0
XML_C14N_1_1
XML_C14N_CREATE_CTXT
@@ -206,7 +209,6 @@ A:link, A:visited, A:active { text-decoration: underline } XML_CHAR_ENCODING_UTF16BE
XML_CHAR_ENCODING_UTF16LE
XML_CHAR_ENCODING_UTF8
-XML_CHECK_
XML_CHECK_ENTITY_TYPE
XML_CHECK_FOUND_ATTRIBUTE
XML_CHECK_FOUND_CDATA
@@ -245,7 +247,6 @@ A:link, A:visited, A:active { text-decoration: underline } XML_CHECK_WRONG_NEXT
XML_CHECK_WRONG_PARENT
XML_CHECK_WRONG_PREV
-XML_CHECK_X
XML_COMMENT_NODE
XML_COMPLETE_ATTRS
XML_CTXT_FINISH_DTD_0
@@ -388,6 +389,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_ERR_MIXED_NOT_FINISHED
XML_ERR_MIXED_NOT_STARTED
XML_ERR_NAME_REQUIRED
+XML_ERR_NAME_TOO_LONG
XML_ERR_NMTOKEN_REQUIRED
XML_ERR_NONE
XML_ERR_NOTATION_NOT_FINISHED
@@ -424,6 +426,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_ERR_UNSUPPORTED_ENCODING
XML_ERR_URI_FRAGMENT
XML_ERR_URI_REQUIRED
+XML_ERR_USER_STOP
XML_ERR_VALUE_REQUIRED
XML_ERR_VERSION_MISMATCH
XML_ERR_VERSION_MISSING
@@ -439,6 +442,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_EXTERNAL_GENERAL_PARSED_ENTITY
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY
XML_EXTERNAL_PARAMETER_ENTITY
+XML_FROM_BUFFER
XML_FROM_C14N
XML_FROM_CATALOG
XML_FROM_CHECK
@@ -462,6 +466,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_FROM_SCHEMASV
XML_FROM_SCHEMATRONV
XML_FROM_TREE
+XML_FROM_URI
XML_FROM_VALID
XML_FROM_WRITER
XML_FROM_XINCLUDE
@@ -546,7 +551,10 @@ A:link, A:visited, A:active { text-decoration: underline } XML_IO_UNKNOWN
XML_IO_WRITE
XML_LOCAL_NAMESPACE
+XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
XML_MAX_TEXT_LENGTH
XML_MODULE_CLOSE
XML_MODULE_LAZY
@@ -586,6 +594,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_PARSER_SUBST_ENTITIES
XML_PARSER_SYSTEM_LITERAL
XML_PARSER_VALIDATE
+XML_PARSE_BIG_LINES
XML_PARSE_COMPACT
XML_PARSE_DOM
XML_PARSE_DTDATTR
@@ -1420,6 +1429,7 @@ A:link, A:visited, A:active { text-decoration: underline } XPATH_ENCODING_ERROR
XPATH_EXPRESSION_OK
XPATH_EXPR_ERROR
+XPATH_FORBID_VARIABLE_ERROR
XPATH_INVALID_ARITY
XPATH_INVALID_CHAR_ERROR
XPATH_INVALID_CTXT
@@ -1761,6 +1771,14 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAutomataState
xmlAutomataStatePtr
xmlBoolToText
+xmlBuf
+xmlBufContent
+xmlBufEnd
+xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufPtr
+xmlBufShrink
+xmlBufUse
xmlBuffer
xmlBufferAdd
xmlBufferAddHead
@@ -1934,11 +1952,13 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictPtr
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
xmlDllMain
xmlDoValidityCheckingDefaultValue
@@ -2414,6 +2434,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlOutputBufferCreateFilenameValue
xmlOutputBufferCreateIO
xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputBufferPtr
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
@@ -2812,8 +2834,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaValidateListSimpleTypeFacet
xmlSchemaValidateOneElement
xmlSchemaValidatePredefinedType
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
+xmlSchemaValidityLocatorFunc
xmlSchemaValidityWarningFunc
xmlSchemaValueAppend
xmlSchemaValueGetAsBoolean
@@ -3021,6 +3046,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextWriterPtr
xmlTextWriterSetIndent
xmlTextWriterSetIndentString
+xmlTextWriterSetQuoteChar
xmlTextWriterStartAttribute
xmlTextWriterStartAttributeNS
xmlTextWriterStartCDATA
@@ -3443,6 +3469,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNextPreceding
xmlXPathNextPrecedingSibling
xmlXPathNextSelf
+xmlXPathNodeEval
xmlXPathNodeLeading
xmlXPathNodeLeadingSorted
xmlXPathNodeSetAdd
@@ -3504,6 +3531,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathRoot
xmlXPathRoundFunction
xmlXPathSetArityError
+xmlXPathSetContextNode
xmlXPathSetError
xmlXPathSetTypeError
xmlXPathStackIsExternal
diff --git a/doc/Makefile.am b/doc/Makefile.am index dd39f69..0cc0a50 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS=devhelp examples +SUBDIRS = . devhelp examples # The top-level SGML file. DOC_MAIN_XML_FILE=gnome-xml.xml @@ -16,21 +16,230 @@ PAGES= architecture.html bugs.html contribs.html docs.html DOM.html \ tree.html xmldtd.html XMLinfo.html XSLT.html APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \ APIsymbols.html APIchunk0.html -EXTRA_DIST=xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \ - tutorial/images/*.png tutorial/images/callouts/*.png \ - API*.html *.1 *.xsl *.html *.gif w3c.png html/*.html \ - html/*.png libxml2-api.xml index.py search.php \ - apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \ - README.docs symbols.xml +if REBUILD_DOCS +EXTRA_DIST_wc = xmlcatalog_man.xml $(wildcard tutorial/*.html) \ + $(wildcard tutorial/*.c) $(wildcard tutorial/*.pdf) \ + $(wildcard tutorial/images/*.png) \ + $(wildcard tutorial/images/callouts/*.png) $(wildcard API*.html) \ + $(wildcard *.1) $(wildcard *.xsl) $(wildcard *.html) \ + $(wildcard *.gif) w3c.png $(wildcard html/*.html) \ + $(wildcard html/*.png) libxml2-api.xml index.py search.php \ + apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \ + README.docs symbols.xml +endif + +# Expanded form of EXTRA_DIST_wc +# +EXTRA_DIST = \ + APIchunk0.html \ + APIchunk1.html \ + APIchunk2.html \ + APIchunk3.html \ + APIchunk4.html \ + APIchunk5.html \ + APIchunk6.html \ + APIchunk7.html \ + APIchunk8.html \ + APIchunk9.html \ + APIchunk10.html \ + APIchunk11.html \ + APIchunk12.html \ + APIchunk13.html \ + APIchunk14.html \ + APIchunk15.html \ + APIchunk16.html \ + APIchunk17.html \ + APIchunk18.html \ + APIchunk19.html \ + APIchunk20.html \ + APIchunk21.html \ + APIchunk22.html \ + APIchunk23.html \ + APIchunk24.html \ + APIchunk25.html \ + APIchunk26.html \ + APIchunk27.html \ + APIchunk28.html \ + APIchunk29.html \ + APIconstructors.html \ + APIfiles.html \ + APIfunctions.html \ + APIsymbols.html \ + ChangeLog.xsl \ + DOM.gif \ + DOM.html \ + FAQ.html \ + Libxml2-Logo-180x168.gif \ + Libxml2-Logo-90x34.gif \ + README.docs \ + XMLinfo.html \ + XSLT.html \ + api.xsl \ + apibuild.py \ + architecture.html \ + bugs.html \ + catalog.gif \ + catalog.html \ + checkapisym.xsl \ + contribs.html \ + docs.html \ + downloads.html \ + elfgcchack.xsl \ + encoding.html \ + entities.html \ + example.html \ + guidelines.html \ + help.html \ + html/book1.html \ + html/home.png \ + html/index.html \ + html/left.png \ + html/libxml-DOCBparser.html \ + html/libxml-HTMLparser.html \ + html/libxml-HTMLtree.html \ + html/libxml-SAX.html \ + html/libxml-SAX2.html \ + html/libxml-c14n.html \ + html/libxml-catalog.html \ + html/libxml-chvalid.html \ + html/libxml-debugXML.html \ + html/libxml-dict.html \ + html/libxml-encoding.html \ + html/libxml-entities.html \ + html/libxml-globals.html \ + html/libxml-hash.html \ + html/libxml-lib.html \ + html/libxml-list.html \ + html/libxml-nanoftp.html \ + html/libxml-nanohttp.html \ + html/libxml-parser.html \ + html/libxml-parserInternals.html \ + html/libxml-pattern.html \ + html/libxml-relaxng.html \ + html/libxml-schemasInternals.html \ + html/libxml-schematron.html \ + html/libxml-threads.html \ + html/libxml-tree.html \ + html/libxml-uri.html \ + html/libxml-valid.html \ + html/libxml-xinclude.html \ + html/libxml-xlink.html \ + html/libxml-xmlIO.html \ + html/libxml-xmlautomata.html \ + html/libxml-xmlerror.html \ + html/libxml-xmlexports.html \ + html/libxml-xmlmemory.html \ + html/libxml-xmlmodule.html \ + html/libxml-xmlreader.html \ + html/libxml-xmlregexp.html \ + html/libxml-xmlsave.html \ + html/libxml-xmlschemas.html \ + html/libxml-xmlschemastypes.html \ + html/libxml-xmlstring.html \ + html/libxml-xmlunicode.html \ + html/libxml-xmlversion.html \ + html/libxml-xmlwriter.html \ + html/libxml-xpath.html \ + html/libxml-xpathInternals.html \ + html/libxml-xpointer.html \ + html/libxml-xzlib.html \ + html/right.png \ + html/up.png \ + index.html \ + index.py \ + interface.html \ + intro.html \ + library.html \ + libxml.gif \ + libxml2-api.xml \ + libxml2.xsa \ + namespaces.html \ + newapi.xsl \ + news.html \ + news.xsl \ + python.html \ + redhat.gif \ + search.php \ + searches.html \ + searches.xsl \ + site.xsl \ + smallfootonly.gif \ + structure.gif \ + symbols.xml \ + syms.xsl \ + threads.html \ + tree.html \ + tutorial/apa.html \ + tutorial/apb.html \ + tutorial/apc.html \ + tutorial/apd.html \ + tutorial/ape.html \ + tutorial/apf.html \ + tutorial/apg.html \ + tutorial/aph.html \ + tutorial/api.html \ + tutorial/ar01s02.html \ + tutorial/ar01s03.html \ + tutorial/ar01s04.html \ + tutorial/ar01s05.html \ + tutorial/ar01s06.html \ + tutorial/ar01s07.html \ + tutorial/ar01s08.html \ + tutorial/ar01s09.html \ + tutorial/images/blank.png \ + tutorial/images/callouts/1.png \ + tutorial/images/callouts/10.png \ + tutorial/images/callouts/2.png \ + tutorial/images/callouts/3.png \ + tutorial/images/callouts/4.png \ + tutorial/images/callouts/5.png \ + tutorial/images/callouts/6.png \ + tutorial/images/callouts/7.png \ + tutorial/images/callouts/8.png \ + tutorial/images/callouts/9.png \ + tutorial/images/caution.png \ + tutorial/images/draft.png \ + tutorial/images/home.png \ + tutorial/images/important.png \ + tutorial/images/next.png \ + tutorial/images/note.png \ + tutorial/images/prev.png \ + tutorial/images/tip.png \ + tutorial/images/toc-blank.png \ + tutorial/images/toc-minus.png \ + tutorial/images/toc-plus.png \ + tutorial/images/up.png \ + tutorial/images/warning.png \ + tutorial/includeaddattribute.c \ + tutorial/includeaddkeyword.c \ + tutorial/includeconvert.c \ + tutorial/includegetattribute.c \ + tutorial/includekeyword.c \ + tutorial/includexpath.c \ + tutorial/index.html \ + tutorial/ix01.html \ + tutorial/xmltutorial.pdf \ + upgrade.html \ + w3c.png \ + wiki.xsl \ + xml.html \ + xmlcatalog.1 \ + xmlcatalog_man.html \ + xmlcatalog_man.xml \ + xmldtd.html \ + xmlio.html \ + xmllint.1 \ + xmllint.html \ + xmllint.xml \ + xmlmem.html \ + xmlreader.html \ + xsa.xsl man_MANS = xmllint.1 xmlcatalog.1 if REBUILD_DOCS -all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS) -else -all: -endif +docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS) api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl @@ -48,25 +257,25 @@ web: $(PAGES) $(PAGES): xml.html $(srcdir)/site.xsl -@(if [ -x $(XSLTPROC) ] ; then \ echo "Rebuilding the HTML Web pages from xml.html" ; \ - $(XSLTPROC) --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/xml.html > index.html ; fi ); + $(XSLTPROC) --nonet --html --path $(srcdir) $(srcdir)/site.xsl $(srcdir)/xml.html > index.html ; fi ); -@(if [ -x $(XMLLINT) ] ; then \ echo "Validating the HTML Web pages" ; \ $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi ); -$(top_builddir)/NEWS: $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html +$(top_builddir)/NEWS: $(srcdir)/news.xsl $(srcdir)/news.html -@(if [ -x $(XSLTPROC) ] ; then \ - $(XSLTPROC) --nonet $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html > $(top_builddir)/NEWS ; fi ); + $(XSLTPROC) --nonet $(srcdir)/news.xsl $(srcdir)/news.html > $(top_builddir)/NEWS ; fi ); -libxml2.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html +libxml2.xsa: $(srcdir)/xsa.xsl $(srcdir)/news.html -@(if [ -x $(XSLTPROC) ] ; then \ echo "Rebuilding the NEWS file" ; \ - $(XSLTPROC) --nonet $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxml2.xsa ; fi ); + $(XSLTPROC) --nonet $(srcdir)/xsa.xsl $(srcdir)/news.html > libxml2.xsa ; fi ); -$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/api.xsl +$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(srcdir)/site.xsl $(srcdir)/api.xsl -@(if [ -x $(XSLTPROC) ] ; then \ echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \ - $(XSLTPROC) --nonet --html $(top_srcdir)/doc/api.xsl \ - $(top_srcdir)/doc/xml.html ; fi ); + $(XSLTPROC) --nonet --html $(srcdir)/api.xsl \ + $(srcdir)/xml.html ; fi ); -@(if [ -x $(XMLLINT) ] ; then \ echo "Validating the HTML API pages" ; \ $(XMLLINT) --nonet --valid --noout API*.html ; fi ); @@ -74,7 +283,7 @@ $(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_s $(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl -@(if [ -x $(XSLTPROC) ] ; then \ echo "Rebuilding the HTML pages from the XML API" ; \ - $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libxml2-api.xml ; fi ) + $(XSLTPROC) --nonet $(srcdir)/newapi.xsl $(srcdir)/libxml2-api.xml ; fi ) -@(if [ -x $(XMLLINT) ] ; then \ echo "Validating the resulting XHTML pages" ; \ $(XMLLINT) --nonet --valid --noout html/*.html ; fi ); @@ -82,17 +291,23 @@ $(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl wiki: libxml2-api.xml $(srcdir)/wiki.xsl -@(if [ -x $(XSLTPROC) ] ; then \ echo "Rebuilding the wiki HTML pages from the XML API" ; \ - $(XSLTPROC) --nonet $(srcdir)/wiki.xsl libxml2-api.xml; fi ) + $(XSLTPROC) --nonet $(srcdir)/wiki.xsl $(srcdir)/libxml2-api.xml; fi ) $(WIN32_DIR)/libxml2.def.src: libxml2-api.xml -@(if [ -x $(XSLTPROC) ] ; then \ $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \ --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi ) -libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl ../include/libxml/*.h ../*.c - -(./apibuild.py) - ($(XSLTPROC) checkapisym.xsl libxml2-api.xml) - ($(XSLTPROC) -o ../libxml2.syms syms.xsl symbols.xml) +source_file_deps = \ + $(filter-out %/xmlversion.h, $(wildcard $(top_srcdir)/include/libxml/*.h)) \ + $(top_srcdir)/include/libxml/xmlversion.h.in \ + $(wildcard $(top_srcdir)/*.c) + +libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl $(source_file_deps) + test -f $(top_srcdir)/include/libxml/xmlversion.h + (cd $(srcdir) && ./apibuild.py) + ($(XSLTPROC) $(srcdir)/checkapisym.xsl $(srcdir)/libxml2-api.xml) + ($(XSLTPROC) -o ../libxml2.syms $(srcdir)/syms.xsl $(srcdir)/symbols.xml) -@(cd .. ; $(MAKE) rebuild_testapi) @@ -102,28 +317,35 @@ xmllint.1: xmllint.xml xmlcatalog.1: xmlcatalog_man.xml -@($(XSLTPROC) --nonet xmlcatalog_man.xml) +check-extra-dist: + for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc + for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST + diff -u tmp.EXTRA_DIST_wc tmp.EXTRA_DIST + rm -f tmp.EXTRA_DIST_wc tmp.EXTRA_DIST +endif + clean-local: rm -f *~ *.bak *.hierarchy *.signals *-unused.txt maintainer-clean-local: clean-local rm -rf libxml-decl-list.txt libxml-decl.txt -rebuild: api all +rebuild: api docs install-data-local: - @MKDIR_P@ $(DESTDIR)$(HTML_DIR) - -@INSTALL@ -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR) - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/tutorial - -@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \ + $(MKDIR_P) $(DESTDIR)$(HTML_DIR) + -$(INSTALL) -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR) + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/html + -$(INSTALL) -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html + -$(INSTALL) -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial + -$(INSTALL) -m 0644 $(srcdir)/tutorial/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/tutorial/images - -@INSTALL@ -m 0644 $(srcdir)/tutorial/images/*.* \ + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images + -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial/images - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts - -@INSTALL@ -m 0644 $(srcdir)/tutorial/images/callouts/*.* \ + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts + -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts -.PHONY : html xml templates scan +.PHONY: docs api web wiki rebuild diff --git a/doc/Makefile.in b/doc/Makefile.in index ebeca2a..997026a 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -46,11 +63,11 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = @@ -61,6 +78,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -82,6 +104,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff @@ -124,7 +152,6 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -161,6 +188,7 @@ HTML_DIR = @HTML_DIR@ HTML_OBJ = @HTML_OBJ@ HTTP_OBJ = @HTTP_OBJ@ ICONV_LIBS = @ICONV_LIBS@ +ICU_LIBS = @ICU_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -216,7 +244,6 @@ RANLIB = @RANLIB@ RDL_LIBS = @RDL_LIBS@ READER_TEST = @READER_TEST@ RELDATE = @RELDATE@ -RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -241,7 +268,6 @@ TEST_VTIME = @TEST_VTIME@ TEST_XINCLUDE = @TEST_XINCLUDE@ TEST_XPATH = @TEST_XPATH@ TEST_XPTR = @TEST_XPTR@ -THREADS_W32 = @THREADS_W32@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ VERSION = @VERSION@ @@ -274,6 +300,7 @@ WITH_SAX1 = @WITH_SAX1@ WITH_SCHEMAS = @WITH_SCHEMAS@ WITH_SCHEMATRON = @WITH_SCHEMATRON@ WITH_THREADS = @WITH_THREADS@ +WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@ WITH_TREE = @WITH_TREE@ WITH_TRIO = @WITH_TRIO@ WITH_VALID = @WITH_VALID@ @@ -347,7 +374,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = devhelp examples +SUBDIRS = . devhelp examples # The top-level SGML file. DOC_MAIN_XML_FILE = gnome-xml.xml @@ -365,14 +392,230 @@ PAGES = architecture.html bugs.html contribs.html docs.html DOM.html \ APIPAGES = APIconstructors.html APIfiles.html APIfunctions.html \ APIsymbols.html APIchunk0.html -EXTRA_DIST = xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \ - tutorial/images/*.png tutorial/images/callouts/*.png \ - API*.html *.1 *.xsl *.html *.gif w3c.png html/*.html \ - html/*.png libxml2-api.xml index.py search.php \ - apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \ - README.docs symbols.xml +@REBUILD_DOCS_TRUE@EXTRA_DIST_wc = xmlcatalog_man.xml $(wildcard tutorial/*.html) \ +@REBUILD_DOCS_TRUE@ $(wildcard tutorial/*.c) $(wildcard tutorial/*.pdf) \ +@REBUILD_DOCS_TRUE@ $(wildcard tutorial/images/*.png) \ +@REBUILD_DOCS_TRUE@ $(wildcard tutorial/images/callouts/*.png) $(wildcard API*.html) \ +@REBUILD_DOCS_TRUE@ $(wildcard *.1) $(wildcard *.xsl) $(wildcard *.html) \ +@REBUILD_DOCS_TRUE@ $(wildcard *.gif) w3c.png $(wildcard html/*.html) \ +@REBUILD_DOCS_TRUE@ $(wildcard html/*.png) libxml2-api.xml index.py search.php \ +@REBUILD_DOCS_TRUE@ apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \ +@REBUILD_DOCS_TRUE@ README.docs symbols.xml + + +# Expanded form of EXTRA_DIST_wc +# +EXTRA_DIST = \ + APIchunk0.html \ + APIchunk1.html \ + APIchunk2.html \ + APIchunk3.html \ + APIchunk4.html \ + APIchunk5.html \ + APIchunk6.html \ + APIchunk7.html \ + APIchunk8.html \ + APIchunk9.html \ + APIchunk10.html \ + APIchunk11.html \ + APIchunk12.html \ + APIchunk13.html \ + APIchunk14.html \ + APIchunk15.html \ + APIchunk16.html \ + APIchunk17.html \ + APIchunk18.html \ + APIchunk19.html \ + APIchunk20.html \ + APIchunk21.html \ + APIchunk22.html \ + APIchunk23.html \ + APIchunk24.html \ + APIchunk25.html \ + APIchunk26.html \ + APIchunk27.html \ + APIchunk28.html \ + APIchunk29.html \ + APIconstructors.html \ + APIfiles.html \ + APIfunctions.html \ + APIsymbols.html \ + ChangeLog.xsl \ + DOM.gif \ + DOM.html \ + FAQ.html \ + Libxml2-Logo-180x168.gif \ + Libxml2-Logo-90x34.gif \ + README.docs \ + XMLinfo.html \ + XSLT.html \ + api.xsl \ + apibuild.py \ + architecture.html \ + bugs.html \ + catalog.gif \ + catalog.html \ + checkapisym.xsl \ + contribs.html \ + docs.html \ + downloads.html \ + elfgcchack.xsl \ + encoding.html \ + entities.html \ + example.html \ + guidelines.html \ + help.html \ + html/book1.html \ + html/home.png \ + html/index.html \ + html/left.png \ + html/libxml-DOCBparser.html \ + html/libxml-HTMLparser.html \ + html/libxml-HTMLtree.html \ + html/libxml-SAX.html \ + html/libxml-SAX2.html \ + html/libxml-c14n.html \ + html/libxml-catalog.html \ + html/libxml-chvalid.html \ + html/libxml-debugXML.html \ + html/libxml-dict.html \ + html/libxml-encoding.html \ + html/libxml-entities.html \ + html/libxml-globals.html \ + html/libxml-hash.html \ + html/libxml-lib.html \ + html/libxml-list.html \ + html/libxml-nanoftp.html \ + html/libxml-nanohttp.html \ + html/libxml-parser.html \ + html/libxml-parserInternals.html \ + html/libxml-pattern.html \ + html/libxml-relaxng.html \ + html/libxml-schemasInternals.html \ + html/libxml-schematron.html \ + html/libxml-threads.html \ + html/libxml-tree.html \ + html/libxml-uri.html \ + html/libxml-valid.html \ + html/libxml-xinclude.html \ + html/libxml-xlink.html \ + html/libxml-xmlIO.html \ + html/libxml-xmlautomata.html \ + html/libxml-xmlerror.html \ + html/libxml-xmlexports.html \ + html/libxml-xmlmemory.html \ + html/libxml-xmlmodule.html \ + html/libxml-xmlreader.html \ + html/libxml-xmlregexp.html \ + html/libxml-xmlsave.html \ + html/libxml-xmlschemas.html \ + html/libxml-xmlschemastypes.html \ + html/libxml-xmlstring.html \ + html/libxml-xmlunicode.html \ + html/libxml-xmlversion.html \ + html/libxml-xmlwriter.html \ + html/libxml-xpath.html \ + html/libxml-xpathInternals.html \ + html/libxml-xpointer.html \ + html/libxml-xzlib.html \ + html/right.png \ + html/up.png \ + index.html \ + index.py \ + interface.html \ + intro.html \ + library.html \ + libxml.gif \ + libxml2-api.xml \ + libxml2.xsa \ + namespaces.html \ + newapi.xsl \ + news.html \ + news.xsl \ + python.html \ + redhat.gif \ + search.php \ + searches.html \ + searches.xsl \ + site.xsl \ + smallfootonly.gif \ + structure.gif \ + symbols.xml \ + syms.xsl \ + threads.html \ + tree.html \ + tutorial/apa.html \ + tutorial/apb.html \ + tutorial/apc.html \ + tutorial/apd.html \ + tutorial/ape.html \ + tutorial/apf.html \ + tutorial/apg.html \ + tutorial/aph.html \ + tutorial/api.html \ + tutorial/ar01s02.html \ + tutorial/ar01s03.html \ + tutorial/ar01s04.html \ + tutorial/ar01s05.html \ + tutorial/ar01s06.html \ + tutorial/ar01s07.html \ + tutorial/ar01s08.html \ + tutorial/ar01s09.html \ + tutorial/images/blank.png \ + tutorial/images/callouts/1.png \ + tutorial/images/callouts/10.png \ + tutorial/images/callouts/2.png \ + tutorial/images/callouts/3.png \ + tutorial/images/callouts/4.png \ + tutorial/images/callouts/5.png \ + tutorial/images/callouts/6.png \ + tutorial/images/callouts/7.png \ + tutorial/images/callouts/8.png \ + tutorial/images/callouts/9.png \ + tutorial/images/caution.png \ + tutorial/images/draft.png \ + tutorial/images/home.png \ + tutorial/images/important.png \ + tutorial/images/next.png \ + tutorial/images/note.png \ + tutorial/images/prev.png \ + tutorial/images/tip.png \ + tutorial/images/toc-blank.png \ + tutorial/images/toc-minus.png \ + tutorial/images/toc-plus.png \ + tutorial/images/up.png \ + tutorial/images/warning.png \ + tutorial/includeaddattribute.c \ + tutorial/includeaddkeyword.c \ + tutorial/includeconvert.c \ + tutorial/includegetattribute.c \ + tutorial/includekeyword.c \ + tutorial/includexpath.c \ + tutorial/index.html \ + tutorial/ix01.html \ + tutorial/xmltutorial.pdf \ + upgrade.html \ + w3c.png \ + wiki.xsl \ + xml.html \ + xmlcatalog.1 \ + xmlcatalog_man.html \ + xmlcatalog_man.xml \ + xmldtd.html \ + xmlio.html \ + xmllint.1 \ + xmllint.html \ + xmllint.xml \ + xmlmem.html \ + xmlreader.html \ + xsa.xsl man_MANS = xmllint.1 xmlcatalog.1 +@REBUILD_DOCS_TRUE@source_file_deps = \ +@REBUILD_DOCS_TRUE@ $(filter-out %/xmlversion.h, $(wildcard $(top_srcdir)/include/libxml/*.h)) \ +@REBUILD_DOCS_TRUE@ $(top_srcdir)/include/libxml/xmlversion.h.in \ +@REBUILD_DOCS_TRUE@ $(wildcard $(top_srcdir)/*.c) + all: all-recursive .SUFFIXES: @@ -414,11 +657,18 @@ clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -447,9 +697,7 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -631,13 +879,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -675,10 +920,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -778,77 +1028,83 @@ uninstall-man: uninstall-man1 uninstall uninstall-am uninstall-man uninstall-man1 -@REBUILD_DOCS_TRUE@all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS) -@REBUILD_DOCS_FALSE@all: - -api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl - -web: $(PAGES) - -../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml - -@(if [ -x $(XSLTPROC) ] ; then \ - echo "Rebuilding the elfgcchack.h header" ; \ - $(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \ - if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \ - echo "updating ../elfgcchack.h"; \ - cp elfgcchack.h ../elfgcchack.h; \ - fi ; rm -f elfgcchack.h ; fi ); - -$(PAGES): xml.html $(srcdir)/site.xsl - -@(if [ -x $(XSLTPROC) ] ; then \ - echo "Rebuilding the HTML Web pages from xml.html" ; \ - $(XSLTPROC) --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/xml.html > index.html ; fi ); - -@(if [ -x $(XMLLINT) ] ; then \ - echo "Validating the HTML Web pages" ; \ - $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi ); - -$(top_builddir)/NEWS: $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html - -@(if [ -x $(XSLTPROC) ] ; then \ - $(XSLTPROC) --nonet $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html > $(top_builddir)/NEWS ; fi ); - -libxml2.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html - -@(if [ -x $(XSLTPROC) ] ; then \ - echo "Rebuilding the NEWS file" ; \ - $(XSLTPROC) --nonet $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxml2.xsa ; fi ); - -$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/api.xsl - -@(if [ -x $(XSLTPROC) ] ; then \ - echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \ - $(XSLTPROC) --nonet --html $(top_srcdir)/doc/api.xsl \ - $(top_srcdir)/doc/xml.html ; fi ); - -@(if [ -x $(XMLLINT) ] ; then \ - echo "Validating the HTML API pages" ; \ - $(XMLLINT) --nonet --valid --noout API*.html ; fi ); - -$(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl - -@(if [ -x $(XSLTPROC) ] ; then \ - echo "Rebuilding the HTML pages from the XML API" ; \ - $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libxml2-api.xml ; fi ) - -@(if [ -x $(XMLLINT) ] ; then \ - echo "Validating the resulting XHTML pages" ; \ - $(XMLLINT) --nonet --valid --noout html/*.html ; fi ); - -wiki: libxml2-api.xml $(srcdir)/wiki.xsl - -@(if [ -x $(XSLTPROC) ] ; then \ - echo "Rebuilding the wiki HTML pages from the XML API" ; \ - $(XSLTPROC) --nonet $(srcdir)/wiki.xsl libxml2-api.xml; fi ) - -$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml - -@(if [ -x $(XSLTPROC) ] ; then \ - $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \ - --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi ) - -libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl ../include/libxml/*.h ../*.c - -(./apibuild.py) - ($(XSLTPROC) checkapisym.xsl libxml2-api.xml) - ($(XSLTPROC) -o ../libxml2.syms syms.xsl symbols.xml) - -@(cd .. ; $(MAKE) rebuild_testapi) - -xmllint.1: xmllint.xml - -@($(XSLTPROC) --nonet xmllint.xml) - -xmlcatalog.1: xmlcatalog_man.xml - -@($(XSLTPROC) --nonet xmlcatalog_man.xml) +@REBUILD_DOCS_TRUE@docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS) + +@REBUILD_DOCS_TRUE@api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl + +@REBUILD_DOCS_TRUE@web: $(PAGES) + +@REBUILD_DOCS_TRUE@../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Rebuilding the elfgcchack.h header" ; \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \ +@REBUILD_DOCS_TRUE@ if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \ +@REBUILD_DOCS_TRUE@ echo "updating ../elfgcchack.h"; \ +@REBUILD_DOCS_TRUE@ cp elfgcchack.h ../elfgcchack.h; \ +@REBUILD_DOCS_TRUE@ fi ; rm -f elfgcchack.h ; fi ); + +@REBUILD_DOCS_TRUE@$(PAGES): xml.html $(srcdir)/site.xsl +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Rebuilding the HTML Web pages from xml.html" ; \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet --html --path $(srcdir) $(srcdir)/site.xsl $(srcdir)/xml.html > index.html ; fi ); +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XMLLINT) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Validating the HTML Web pages" ; \ +@REBUILD_DOCS_TRUE@ $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi ); + +@REBUILD_DOCS_TRUE@$(top_builddir)/NEWS: $(srcdir)/news.xsl $(srcdir)/news.html +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/news.xsl $(srcdir)/news.html > $(top_builddir)/NEWS ; fi ); + +@REBUILD_DOCS_TRUE@libxml2.xsa: $(srcdir)/xsa.xsl $(srcdir)/news.html +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Rebuilding the NEWS file" ; \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/xsa.xsl $(srcdir)/news.html > libxml2.xsa ; fi ); + +@REBUILD_DOCS_TRUE@$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(srcdir)/site.xsl $(srcdir)/api.xsl +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet --html $(srcdir)/api.xsl \ +@REBUILD_DOCS_TRUE@ $(srcdir)/xml.html ; fi ); +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XMLLINT) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Validating the HTML API pages" ; \ +@REBUILD_DOCS_TRUE@ $(XMLLINT) --nonet --valid --noout API*.html ; fi ); + +@REBUILD_DOCS_TRUE@$(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Rebuilding the HTML pages from the XML API" ; \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/newapi.xsl $(srcdir)/libxml2-api.xml ; fi ) +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XMLLINT) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Validating the resulting XHTML pages" ; \ +@REBUILD_DOCS_TRUE@ $(XMLLINT) --nonet --valid --noout html/*.html ; fi ); + +@REBUILD_DOCS_TRUE@wiki: libxml2-api.xml $(srcdir)/wiki.xsl +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ echo "Rebuilding the wiki HTML pages from the XML API" ; \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/wiki.xsl $(srcdir)/libxml2-api.xml; fi ) + +@REBUILD_DOCS_TRUE@$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \ +@REBUILD_DOCS_TRUE@ --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi ) + +@REBUILD_DOCS_TRUE@libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl $(source_file_deps) +@REBUILD_DOCS_TRUE@ test -f $(top_srcdir)/include/libxml/xmlversion.h +@REBUILD_DOCS_TRUE@ (cd $(srcdir) && ./apibuild.py) +@REBUILD_DOCS_TRUE@ ($(XSLTPROC) $(srcdir)/checkapisym.xsl $(srcdir)/libxml2-api.xml) +@REBUILD_DOCS_TRUE@ ($(XSLTPROC) -o ../libxml2.syms $(srcdir)/syms.xsl $(srcdir)/symbols.xml) +@REBUILD_DOCS_TRUE@ -@(cd .. ; $(MAKE) rebuild_testapi) + +@REBUILD_DOCS_TRUE@xmllint.1: xmllint.xml +@REBUILD_DOCS_TRUE@ -@($(XSLTPROC) --nonet xmllint.xml) + +@REBUILD_DOCS_TRUE@xmlcatalog.1: xmlcatalog_man.xml +@REBUILD_DOCS_TRUE@ -@($(XSLTPROC) --nonet xmlcatalog_man.xml) + +@REBUILD_DOCS_TRUE@check-extra-dist: +@REBUILD_DOCS_TRUE@ for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc +@REBUILD_DOCS_TRUE@ for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST +@REBUILD_DOCS_TRUE@ diff -u tmp.EXTRA_DIST_wc tmp.EXTRA_DIST +@REBUILD_DOCS_TRUE@ rm -f tmp.EXTRA_DIST_wc tmp.EXTRA_DIST clean-local: rm -f *~ *.bak *.hierarchy *.signals *-unused.txt @@ -856,25 +1112,25 @@ clean-local: maintainer-clean-local: clean-local rm -rf libxml-decl-list.txt libxml-decl.txt -rebuild: api all +rebuild: api docs install-data-local: - @MKDIR_P@ $(DESTDIR)$(HTML_DIR) - -@INSTALL@ -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR) - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/tutorial - -@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \ + $(MKDIR_P) $(DESTDIR)$(HTML_DIR) + -$(INSTALL) -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR) + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/html + -$(INSTALL) -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html + -$(INSTALL) -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial + -$(INSTALL) -m 0644 $(srcdir)/tutorial/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/tutorial/images - -@INSTALL@ -m 0644 $(srcdir)/tutorial/images/*.* \ + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images + -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial/images - @MKDIR_P@ $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts - -@INSTALL@ -m 0644 $(srcdir)/tutorial/images/callouts/*.* \ + $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts + -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts -.PHONY : html xml templates scan +.PHONY: docs api web wiki rebuild # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/doc/apibuild.py b/doc/apibuild.py index c2dff84..b5b669a 100755 --- a/doc/apibuild.py +++ b/doc/apibuild.py @@ -52,7 +52,11 @@ ignored_files = { "test.c": "not part of the library", "testdso.c": "test for dynamid shared libraries", "testrecurse.c": "test for entities recursions", - "xzlib.h": "Internal API only", + "xzlib.h": "Internal API only 2.8.0", + "buf.h": "Internal API only 2.9.0", + "enc.h": "Internal API only 2.9.0", + "/save.h": "Internal API only 2.9.0", + "timsort.h": "Internal header only for xpath.c 2.9.0", } ignored_words = { @@ -80,51 +84,51 @@ ignored_words = { } def escape(raw): - raw = string.replace(raw, '&', '&') - raw = string.replace(raw, '<', '<') - raw = string.replace(raw, '>', '>') - raw = string.replace(raw, "'", ''') - raw = string.replace(raw, '"', '"') + raw = raw.replace('&', '&') + raw = raw.replace('<', '<') + raw = raw.replace('>', '>') + raw = raw.replace("'", ''') + raw = raw.replace('"', '"') return raw def uniq(items): d = {} for item in items: d[item]=1 - return d.keys() + return list(d.keys()) class identifier: def __init__(self, name, header=None, module=None, type=None, lineno = 0, info=None, extra=None, conditionals = None): self.name = name - self.header = header - self.module = module - self.type = type - self.info = info - self.extra = extra - self.lineno = lineno - self.static = 0 - if conditionals == None or len(conditionals) == 0: - self.conditionals = None - else: - self.conditionals = conditionals[:] - if self.name == debugsym: - print "=> define %s : %s" % (debugsym, (module, type, info, - extra, conditionals)) + self.header = header + self.module = module + self.type = type + self.info = info + self.extra = extra + self.lineno = lineno + self.static = 0 + if conditionals == None or len(conditionals) == 0: + self.conditionals = None + else: + self.conditionals = conditionals[:] + if self.name == debugsym: + print("=> define %s : %s" % (debugsym, (module, type, info, + extra, conditionals))) def __repr__(self): r = "%s %s:" % (self.type, self.name) - if self.static: - r = r + " static" - if self.module != None: - r = r + " from %s" % (self.module) - if self.info != None: - r = r + " " + `self.info` - if self.extra != None: - r = r + " " + `self.extra` - if self.conditionals != None: - r = r + " " + `self.conditionals` - return r + if self.static: + r = r + " static" + if self.module != None: + r = r + " from %s" % (self.module) + if self.info != None: + r = r + " " + repr(self.info) + if self.extra != None: + r = r + " " + repr(self.extra) + if self.conditionals != None: + r = r + " " + repr(self.conditionals) + return r def set_header(self, header): @@ -142,10 +146,10 @@ class identifier: def set_static(self, static): self.static = static def set_conditionals(self, conditionals): - if conditionals == None or len(conditionals) == 0: - self.conditionals = None - else: - self.conditionals = conditionals[:] + if conditionals == None or len(conditionals) == 0: + self.conditionals = None + else: + self.conditionals = conditionals[:] def get_name(self): return self.name @@ -168,231 +172,231 @@ class identifier: def update(self, header, module, type = None, info = None, extra=None, conditionals=None): - if self.name == debugsym: - print "=> update %s : %s" % (debugsym, (module, type, info, - extra, conditionals)) + if self.name == debugsym: + print("=> update %s : %s" % (debugsym, (module, type, info, + extra, conditionals))) if header != None and self.header == None: - self.set_header(module) + self.set_header(module) if module != None and (self.module == None or self.header == self.module): - self.set_module(module) + self.set_module(module) if type != None and self.type == None: - self.set_type(type) + self.set_type(type) if info != None: - self.set_info(info) + self.set_info(info) if extra != None: - self.set_extra(extra) + self.set_extra(extra) if conditionals != None: - self.set_conditionals(conditionals) + self.set_conditionals(conditionals) class index: def __init__(self, name = "noname"): self.name = name self.identifiers = {} self.functions = {} - self.variables = {} - self.includes = {} - self.structs = {} - self.enums = {} - self.typedefs = {} - self.macros = {} - self.references = {} - self.info = {} + self.variables = {} + self.includes = {} + self.structs = {} + self.enums = {} + self.typedefs = {} + self.macros = {} + self.references = {} + self.info = {} def add_ref(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals = None): if name[0:2] == '__': - return None + return None d = None try: - d = self.identifiers[name] - d.update(header, module, type, lineno, info, extra, conditionals) - except: - d = identifier(name, header, module, type, lineno, info, extra, conditionals) - self.identifiers[name] = d + d = self.identifiers[name] + d.update(header, module, type, lineno, info, extra, conditionals) + except: + d = identifier(name, header, module, type, lineno, info, extra, conditionals) + self.identifiers[name] = d - if d != None and static == 1: - d.set_static(1) + if d != None and static == 1: + d.set_static(1) - if d != None and name != None and type != None: - self.references[name] = d + if d != None and name != None and type != None: + self.references[name] = d - if name == debugsym: - print "New ref: %s" % (d) + if name == debugsym: + print("New ref: %s" % (d)) - return d + return d def add(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals = None): if name[0:2] == '__': - return None + return None d = None try: - d = self.identifiers[name] - d.update(header, module, type, lineno, info, extra, conditionals) - except: - d = identifier(name, header, module, type, lineno, info, extra, conditionals) - self.identifiers[name] = d - - if d != None and static == 1: - d.set_static(1) - - if d != None and name != None and type != None: - if type == "function": - self.functions[name] = d - elif type == "functype": - self.functions[name] = d - elif type == "variable": - self.variables[name] = d - elif type == "include": - self.includes[name] = d - elif type == "struct": - self.structs[name] = d - elif type == "enum": - self.enums[name] = d - elif type == "typedef": - self.typedefs[name] = d - elif type == "macro": - self.macros[name] = d - else: - print "Unable to register type ", type - - if name == debugsym: - print "New symbol: %s" % (d) - - return d + d = self.identifiers[name] + d.update(header, module, type, lineno, info, extra, conditionals) + except: + d = identifier(name, header, module, type, lineno, info, extra, conditionals) + self.identifiers[name] = d + + if d != None and static == 1: + d.set_static(1) + + if d != None and name != None and type != None: + if type == "function": + self.functions[name] = d + elif type == "functype": + self.functions[name] = d + elif type == "variable": + self.variables[name] = d + elif type == "include": + self.includes[name] = d + elif type == "struct": + self.structs[name] = d + elif type == "enum": + self.enums[name] = d + elif type == "typedef": + self.typedefs[name] = d + elif type == "macro": + self.macros[name] = d + else: + print("Unable to register type ", type) + + if name == debugsym: + print("New symbol: %s" % (d)) + + return d def merge(self, idx): - for id in idx.functions.keys(): + for id in list(idx.functions.keys()): # # macro might be used to override functions or variables # definitions # - if self.macros.has_key(id): - del self.macros[id] - if self.functions.has_key(id): - print "function %s from %s redeclared in %s" % ( - id, self.functions[id].header, idx.functions[id].header) - else: - self.functions[id] = idx.functions[id] - self.identifiers[id] = idx.functions[id] - for id in idx.variables.keys(): + if id in self.macros: + del self.macros[id] + if id in self.functions: + print("function %s from %s redeclared in %s" % ( + id, self.functions[id].header, idx.functions[id].header)) + else: + self.functions[id] = idx.functions[id] + self.identifiers[id] = idx.functions[id] + for id in list(idx.variables.keys()): # # macro might be used to override functions or variables # definitions # - if self.macros.has_key(id): - del self.macros[id] - if self.variables.has_key(id): - print "variable %s from %s redeclared in %s" % ( - id, self.variables[id].header, idx.variables[id].header) - else: - self.variables[id] = idx.variables[id] - self.identifiers[id] = idx.variables[id] - for id in idx.structs.keys(): - if self.structs.has_key(id): - print "struct %s from %s redeclared in %s" % ( - id, self.structs[id].header, idx.structs[id].header) - else: - self.structs[id] = idx.structs[id] - self.identifiers[id] = idx.structs[id] - for id in idx.typedefs.keys(): - if self.typedefs.has_key(id): - print "typedef %s from %s redeclared in %s" % ( - id, self.typedefs[id].header, idx.typedefs[id].header) - else: - self.typedefs[id] = idx.typedefs[id] - self.identifiers[id] = idx.typedefs[id] - for id in idx.macros.keys(): + if id in self.macros: + del self.macros[id] + if id in self.variables: + print("variable %s from %s redeclared in %s" % ( + id, self.variables[id].header, idx.variables[id].header)) + else: + self.variables[id] = idx.variables[id] + self.identifiers[id] = idx.variables[id] + for id in list(idx.structs.keys()): + if id in self.structs: + print("struct %s from %s redeclared in %s" % ( + id, self.structs[id].header, idx.structs[id].header)) + else: + self.structs[id] = idx.structs[id] + self.identifiers[id] = idx.structs[id] + for id in list(idx.typedefs.keys()): + if id in self.typedefs: + print("typedef %s from %s redeclared in %s" % ( + id, self.typedefs[id].header, idx.typedefs[id].header)) + else: + self.typedefs[id] = idx.typedefs[id] + self.identifiers[id] = idx.typedefs[id] + for id in list(idx.macros.keys()): # # macro might be used to override functions or variables # definitions # - if self.variables.has_key(id): + if id in self.variables: continue - if self.functions.has_key(id): + if id in self.functions: continue - if self.enums.has_key(id): + if id in self.enums: continue - if self.macros.has_key(id): - print "macro %s from %s redeclared in %s" % ( - id, self.macros[id].header, idx.macros[id].header) - else: - self.macros[id] = idx.macros[id] - self.identifiers[id] = idx.macros[id] - for id in idx.enums.keys(): - if self.enums.has_key(id): - print "enum %s from %s redeclared in %s" % ( - id, self.enums[id].header, idx.enums[id].header) - else: - self.enums[id] = idx.enums[id] - self.identifiers[id] = idx.enums[id] + if id in self.macros: + print("macro %s from %s redeclared in %s" % ( + id, self.macros[id].header, idx.macros[id].header)) + else: + self.macros[id] = idx.macros[id] + self.identifiers[id] = idx.macros[id] + for id in list(idx.enums.keys()): + if id in self.enums: + print("enum %s from %s redeclared in %s" % ( + id, self.enums[id].header, idx.enums[id].header)) + else: + self.enums[id] = idx.enums[id] + self.identifiers[id] = idx.enums[id] def merge_public(self, idx): - for id in idx.functions.keys(): - if self.functions.has_key(id): - # check that function condition agrees with header - if idx.functions[id].conditionals != \ - self.functions[id].conditionals: - print "Header condition differs from Function for %s:" \ - % id - print " H: %s" % self.functions[id].conditionals - print " C: %s" % idx.functions[id].conditionals - up = idx.functions[id] - self.functions[id].update(None, up.module, up.type, up.info, up.extra) - # else: - # print "Function %s from %s is not declared in headers" % ( - # id, idx.functions[id].module) - # TODO: do the same for variables. + for id in list(idx.functions.keys()): + if id in self.functions: + # check that function condition agrees with header + if idx.functions[id].conditionals != \ + self.functions[id].conditionals: + print("Header condition differs from Function for %s:" \ + % id) + print(" H: %s" % self.functions[id].conditionals) + print(" C: %s" % idx.functions[id].conditionals) + up = idx.functions[id] + self.functions[id].update(None, up.module, up.type, up.info, up.extra) + # else: + # print "Function %s from %s is not declared in headers" % ( + # id, idx.functions[id].module) + # TODO: do the same for variables. def analyze_dict(self, type, dict): count = 0 - public = 0 - for name in dict.keys(): - id = dict[name] - count = count + 1 - if id.static == 0: - public = public + 1 + public = 0 + for name in list(dict.keys()): + id = dict[name] + count = count + 1 + if id.static == 0: + public = public + 1 if count != public: - print " %d %s , %d public" % (count, type, public) - elif count != 0: - print " %d public %s" % (count, type) + print(" %d %s , %d public" % (count, type, public)) + elif count != 0: + print(" %d public %s" % (count, type)) def analyze(self): - self.analyze_dict("functions", self.functions) - self.analyze_dict("variables", self.variables) - self.analyze_dict("structs", self.structs) - self.analyze_dict("typedefs", self.typedefs) - self.analyze_dict("macros", self.macros) + self.analyze_dict("functions", self.functions) + self.analyze_dict("variables", self.variables) + self.analyze_dict("structs", self.structs) + self.analyze_dict("typedefs", self.typedefs) + self.analyze_dict("macros", self.macros) class CLexer: """A lexer for the C language, tokenize the input by reading and analyzing it line by line""" def __init__(self, input): self.input = input - self.tokens = [] - self.line = "" - self.lineno = 0 + self.tokens = [] + self.line = "" + self.lineno = 0 def getline(self): line = '' - while line == '': - line = self.input.readline() - if not line: - return None - self.lineno = self.lineno + 1 - line = string.lstrip(line) - line = string.rstrip(line) - if line == '': - continue - while line[-1] == '\\': - line = line[:-1] - n = self.input.readline() - self.lineno = self.lineno + 1 - n = string.lstrip(n) - n = string.rstrip(n) - if not n: - break - else: - line = line + n + while line == '': + line = self.input.readline() + if not line: + return None + self.lineno = self.lineno + 1 + line = line.lstrip() + line = line.rstrip() + if line == '': + continue + while line[-1] == '\\': + line = line[:-1] + n = self.input.readline() + self.lineno = self.lineno + 1 + n = n.lstrip() + n = n.rstrip() + if not n: + break + else: + line = line + n return line def getlineno(self): @@ -402,194 +406,194 @@ class CLexer: self.tokens.insert(0, token); def debug(self): - print "Last token: ", self.last - print "Token queue: ", self.tokens - print "Line %d end: " % (self.lineno), self.line + print("Last token: ", self.last) + print("Token queue: ", self.tokens) + print("Line %d end: " % (self.lineno), self.line) def token(self): while self.tokens == []: - if self.line == "": - line = self.getline() - else: - line = self.line - self.line = "" - if line == None: - return None - - if line[0] == '#': - self.tokens = map((lambda x: ('preproc', x)), - string.split(line)) - break; - l = len(line) - if line[0] == '"' or line[0] == "'": - end = line[0] - line = line[1:] - found = 0 - tok = "" - while found == 0: - i = 0 - l = len(line) - while i < l: - if line[i] == end: - self.line = line[i+1:] - line = line[:i] - l = i - found = 1 - break - if line[i] == '\\': - i = i + 1 - i = i + 1 - tok = tok + line - if found == 0: - line = self.getline() - if line == None: - return None - self.last = ('string', tok) - return self.last - - if l >= 2 and line[0] == '/' and line[1] == '*': - line = line[2:] - found = 0 - tok = "" - while found == 0: - i = 0 - l = len(line) - while i < l: - if line[i] == '*' and i+1 < l and line[i+1] == '/': - self.line = line[i+2:] - line = line[:i-1] - l = i - found = 1 - break - i = i + 1 - if tok != "": - tok = tok + "\n" - tok = tok + line - if found == 0: - line = self.getline() - if line == None: - return None - self.last = ('comment', tok) - return self.last - if l >= 2 and line[0] == '/' and line[1] == '/': - line = line[2:] - self.last = ('comment', line) - return self.last - i = 0 - while i < l: - if line[i] == '/' and i+1 < l and line[i+1] == '/': - self.line = line[i:] - line = line[:i] - break - if line[i] == '/' and i+1 < l and line[i+1] == '*': - self.line = line[i:] - line = line[:i] - break - if line[i] == '"' or line[i] == "'": - self.line = line[i:] - line = line[:i] - break - i = i + 1 - l = len(line) - i = 0 - while i < l: - if line[i] == ' ' or line[i] == '\t': - i = i + 1 - continue - o = ord(line[i]) - if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ - (o >= 48 and o <= 57): - s = i - while i < l: - o = ord(line[i]) - if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ - (o >= 48 and o <= 57) or string.find( - " \t(){}:;,+-*/%&!|[]=><", line[i]) == -1: - i = i + 1 - else: - break - self.tokens.append(('name', line[s:i])) - continue - if string.find("(){}:;,[]", line[i]) != -1: + if self.line == "": + line = self.getline() + else: + line = self.line + self.line = "" + if line == None: + return None + + if line[0] == '#': + self.tokens = list(map((lambda x: ('preproc', x)), + line.split())) + break; + l = len(line) + if line[0] == '"' or line[0] == "'": + end = line[0] + line = line[1:] + found = 0 + tok = "" + while found == 0: + i = 0 + l = len(line) + while i < l: + if line[i] == end: + self.line = line[i+1:] + line = line[:i] + l = i + found = 1 + break + if line[i] == '\\': + i = i + 1 + i = i + 1 + tok = tok + line + if found == 0: + line = self.getline() + if line == None: + return None + self.last = ('string', tok) + return self.last + + if l >= 2 and line[0] == '/' and line[1] == '*': + line = line[2:] + found = 0 + tok = "" + while found == 0: + i = 0 + l = len(line) + while i < l: + if line[i] == '*' and i+1 < l and line[i+1] == '/': + self.line = line[i+2:] + line = line[:i-1] + l = i + found = 1 + break + i = i + 1 + if tok != "": + tok = tok + "\n" + tok = tok + line + if found == 0: + line = self.getline() + if line == None: + return None + self.last = ('comment', tok) + return self.last + if l >= 2 and line[0] == '/' and line[1] == '/': + line = line[2:] + self.last = ('comment', line) + return self.last + i = 0 + while i < l: + if line[i] == '/' and i+1 < l and line[i+1] == '/': + self.line = line[i:] + line = line[:i] + break + if line[i] == '/' and i+1 < l and line[i+1] == '*': + self.line = line[i:] + line = line[:i] + break + if line[i] == '"' or line[i] == "'": + self.line = line[i:] + line = line[:i] + break + i = i + 1 + l = len(line) + i = 0 + while i < l: + if line[i] == ' ' or line[i] == '\t': + i = i + 1 + continue + o = ord(line[i]) + if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ + (o >= 48 and o <= 57): + s = i + while i < l: + o = ord(line[i]) + if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ + (o >= 48 and o <= 57) or \ + (" \t(){}:;,+-*/%&!|[]=><".find(line[i])) == -1: + i = i + 1 + else: + break + self.tokens.append(('name', line[s:i])) + continue + if "(){}:;,[]".find(line[i]) != -1: # if line[i] == '(' or line[i] == ')' or line[i] == '{' or \ -# line[i] == '}' or line[i] == ':' or line[i] == ';' or \ -# line[i] == ',' or line[i] == '[' or line[i] == ']': - self.tokens.append(('sep', line[i])) - i = i + 1 - continue - if string.find("+-*><=/%&!|.", line[i]) != -1: +# line[i] == '}' or line[i] == ':' or line[i] == ';' or \ +# line[i] == ',' or line[i] == '[' or line[i] == ']': + self.tokens.append(('sep', line[i])) + i = i + 1 + continue + if "+-*><=/%&!|.".find(line[i]) != -1: # if line[i] == '+' or line[i] == '-' or line[i] == '*' or \ -# line[i] == '>' or line[i] == '<' or line[i] == '=' or \ -# line[i] == '/' or line[i] == '%' or line[i] == '&' or \ -# line[i] == '!' or line[i] == '|' or line[i] == '.': - if line[i] == '.' and i + 2 < l and \ - line[i+1] == '.' and line[i+2] == '.': - self.tokens.append(('name', '...')) - i = i + 3 - continue - - j = i + 1 - if j < l and ( - string.find("+-*><=/%&!|", line[j]) != -1): -# line[j] == '+' or line[j] == '-' or line[j] == '*' or \ -# line[j] == '>' or line[j] == '<' or line[j] == '=' or \ -# line[j] == '/' or line[j] == '%' or line[j] == '&' or \ -# line[j] == '!' or line[j] == '|'): - self.tokens.append(('op', line[i:j+1])) - i = j + 1 - else: - self.tokens.append(('op', line[i])) - i = i + 1 - continue - s = i - while i < l: - o = ord(line[i]) - if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ - (o >= 48 and o <= 57) or ( - string.find(" \t(){}:;,+-*/%&!|[]=><", line[i]) == -1): -# line[i] != ' ' and line[i] != '\t' and -# line[i] != '(' and line[i] != ')' and -# line[i] != '{' and line[i] != '}' and -# line[i] != ':' and line[i] != ';' and -# line[i] != ',' and line[i] != '+' and -# line[i] != '-' and line[i] != '*' and -# line[i] != '/' and line[i] != '%' and -# line[i] != '&' and line[i] != '!' and -# line[i] != '|' and line[i] != '[' and -# line[i] != ']' and line[i] != '=' and -# line[i] != '*' and line[i] != '>' and -# line[i] != '<'): - i = i + 1 - else: - break - self.tokens.append(('name', line[s:i])) - - tok = self.tokens[0] - self.tokens = self.tokens[1:] - self.last = tok - return tok +# line[i] == '>' or line[i] == '<' or line[i] == '=' or \ +# line[i] == '/' or line[i] == '%' or line[i] == '&' or \ +# line[i] == '!' or line[i] == '|' or line[i] == '.': + if line[i] == '.' and i + 2 < l and \ + line[i+1] == '.' and line[i+2] == '.': + self.tokens.append(('name', '...')) + i = i + 3 + continue + + j = i + 1 + if j < l and ( + "+-*><=/%&!|".find(line[j]) != -1): +# line[j] == '+' or line[j] == '-' or line[j] == '*' or \ +# line[j] == '>' or line[j] == '<' or line[j] == '=' or \ +# line[j] == '/' or line[j] == '%' or line[j] == '&' or \ +# line[j] == '!' or line[j] == '|'): + self.tokens.append(('op', line[i:j+1])) + i = j + 1 + else: + self.tokens.append(('op', line[i])) + i = i + 1 + continue + s = i + while i < l: + o = ord(line[i]) + if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ + (o >= 48 and o <= 57) or ( + " \t(){}:;,+-*/%&!|[]=><".find(line[i]) == -1): +# line[i] != ' ' and line[i] != '\t' and +# line[i] != '(' and line[i] != ')' and +# line[i] != '{' and line[i] != '}' and +# line[i] != ':' and line[i] != ';' and +# line[i] != ',' and line[i] != '+' and +# line[i] != '-' and line[i] != '*' and +# line[i] != '/' and line[i] != '%' and +# line[i] != '&' and line[i] != '!' and +# line[i] != '|' and line[i] != '[' and +# line[i] != ']' and line[i] != '=' and +# line[i] != '*' and line[i] != '>' and +# line[i] != '<'): + i = i + 1 + else: + break + self.tokens.append(('name', line[s:i])) + + tok = self.tokens[0] + self.tokens = self.tokens[1:] + self.last = tok + return tok class CParser: """The C module parser""" def __init__(self, filename, idx = None): self.filename = filename - if len(filename) > 2 and filename[-2:] == '.h': - self.is_header = 1 - else: - self.is_header = 0 + if len(filename) > 2 and filename[-2:] == '.h': + self.is_header = 1 + else: + self.is_header = 0 self.input = open(filename) - self.lexer = CLexer(self.input) - if idx == None: - self.index = index() - else: - self.index = idx - self.top_comment = "" - self.last_comment = "" - self.comment = None - self.collect_ref = 0 - self.no_error = 0 - self.conditionals = [] - self.defines = [] + self.lexer = CLexer(self.input) + if idx == None: + self.index = index() + else: + self.index = idx + self.top_comment = "" + self.last_comment = "" + self.comment = None + self.collect_ref = 0 + self.no_error = 0 + self.conditionals = [] + self.defines = [] def collect_references(self): self.collect_ref = 1 @@ -604,203 +608,203 @@ class CParser: return self.lexer.getlineno() def index_add(self, name, module, static, type, info=None, extra = None): - if self.is_header == 1: - self.index.add(name, module, module, static, type, self.lineno(), - info, extra, self.conditionals) - else: - self.index.add(name, None, module, static, type, self.lineno(), - info, extra, self.conditionals) + if self.is_header == 1: + self.index.add(name, module, module, static, type, self.lineno(), + info, extra, self.conditionals) + else: + self.index.add(name, None, module, static, type, self.lineno(), + info, extra, self.conditionals) def index_add_ref(self, name, module, static, type, info=None, extra = None): - if self.is_header == 1: - self.index.add_ref(name, module, module, static, type, - self.lineno(), info, extra, self.conditionals) - else: - self.index.add_ref(name, None, module, static, type, self.lineno(), - info, extra, self.conditionals) + if self.is_header == 1: + self.index.add_ref(name, module, module, static, type, + self.lineno(), info, extra, self.conditionals) + else: + self.index.add_ref(name, None, module, static, type, self.lineno(), + info, extra, self.conditionals) def warning(self, msg): if self.no_error: - return - print msg + return + print(msg) def error(self, msg, token=-1): if self.no_error: - return + return - print "Parse Error: " + msg - if token != -1: - print "Got token ", token - self.lexer.debug() - sys.exit(1) + print("Parse Error: " + msg) + if token != -1: + print("Got token ", token) + self.lexer.debug() + sys.exit(1) def debug(self, msg, token=-1): - print "Debug: " + msg - if token != -1: - print "Got token ", token - self.lexer.debug() + print("Debug: " + msg) + if token != -1: + print("Got token ", token) + self.lexer.debug() def parseTopComment(self, comment): - res = {} - lines = string.split(comment, "\n") - item = None - for line in lines: - while line != "" and (line[0] == ' ' or line[0] == '\t'): - line = line[1:] - while line != "" and line[0] == '*': - line = line[1:] - while line != "" and (line[0] == ' ' or line[0] == '\t'): - line = line[1:] - try: - (it, line) = string.split(line, ":", 1) - item = it - while line != "" and (line[0] == ' ' or line[0] == '\t'): - line = line[1:] - if res.has_key(item): - res[item] = res[item] + " " + line - else: - res[item] = line - except: - if item != None: - if res.has_key(item): - res[item] = res[item] + " " + line - else: - res[item] = line - self.index.info = res + res = {} + lines = comment.split("\n") + item = None + for line in lines: + while line != "" and (line[0] == ' ' or line[0] == '\t'): + line = line[1:] + while line != "" and line[0] == '*': + line = line[1:] + while line != "" and (line[0] == ' ' or line[0] == '\t'): + line = line[1:] + try: + (it, line) = line.split(":", 1) + item = it + while line != "" and (line[0] == ' ' or line[0] == '\t'): + line = line[1:] + if item in res: + res[item] = res[item] + " " + line + else: + res[item] = line + except: + if item != None: + if item in res: + res[item] = res[item] + " " + line + else: + res[item] = line + self.index.info = res def parseComment(self, token): if self.top_comment == "": - self.top_comment = token[1] - if self.comment == None or token[1][0] == '*': - self.comment = token[1]; - else: - self.comment = self.comment + token[1] - token = self.lexer.token() + self.top_comment = token[1] + if self.comment == None or token[1][0] == '*': + self.comment = token[1]; + else: + self.comment = self.comment + token[1] + token = self.lexer.token() - if string.find(self.comment, "DOC_DISABLE") != -1: - self.stop_error() + if self.comment.find("DOC_DISABLE") != -1: + self.stop_error() - if string.find(self.comment, "DOC_ENABLE") != -1: - self.start_error() + if self.comment.find("DOC_ENABLE") != -1: + self.start_error() - return token + return token # # Parse a comment block associate to a typedef # def parseTypeComment(self, name, quiet = 0): if name[0:2] == '__': - quiet = 1 + quiet = 1 args = [] - desc = "" + desc = "" if self.comment == None: - if not quiet: - self.warning("Missing comment for type %s" % (name)) - return((args, desc)) + if not quiet: + self.warning("Missing comment for type %s" % (name)) + return((args, desc)) if self.comment[0] != '*': - if not quiet: - self.warning("Missing * in type comment for %s" % (name)) - return((args, desc)) - lines = string.split(self.comment, '\n') - if lines[0] == '*': - del lines[0] - if lines[0] != "* %s:" % (name): - if not quiet: - self.warning("Misformatted type comment for %s" % (name)) - self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0])) - return((args, desc)) - del lines[0] - while len(lines) > 0 and lines[0] == '*': - del lines[0] - desc = "" - while len(lines) > 0: - l = lines[0] - while len(l) > 0 and l[0] == '*': - l = l[1:] - l = string.strip(l) - desc = desc + " " + l - del lines[0] - - desc = string.strip(desc) - - if quiet == 0: - if desc == "": - self.warning("Type comment for %s lack description of the macro" % (name)) - - return(desc) + if not quiet: + self.warning("Missing * in type comment for %s" % (name)) + return((args, desc)) + lines = self.comment.split('\n') + if lines[0] == '*': + del lines[0] + if lines[0] != "* %s:" % (name): + if not quiet: + self.warning("Misformatted type comment for %s" % (name)) + self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0])) + return((args, desc)) + del lines[0] + while len(lines) > 0 and lines[0] == '*': + del lines[0] + desc = "" + while len(lines) > 0: + l = lines[0] + while len(l) > 0 and l[0] == '*': + l = l[1:] + l = l.strip() + desc = desc + " " + l + del lines[0] + + desc = desc.strip() + + if quiet == 0: + if desc == "": + self.warning("Type comment for %s lack description of the macro" % (name)) + + return(desc) # # Parse a comment block associate to a macro # def parseMacroComment(self, name, quiet = 0): if name[0:2] == '__': - quiet = 1 + quiet = 1 args = [] - desc = "" + desc = "" if self.comment == None: - if not quiet: - self.warning("Missing comment for macro %s" % (name)) - return((args, desc)) + if not quiet: + self.warning("Missing comment for macro %s" % (name)) + return((args, desc)) if self.comment[0] != '*': - if not quiet: - self.warning("Missing * in macro comment for %s" % (name)) - return((args, desc)) - lines = string.split(self.comment, '\n') - if lines[0] == '*': - del lines[0] - if lines[0] != "* %s:" % (name): - if not quiet: - self.warning("Misformatted macro comment for %s" % (name)) - self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0])) - return((args, desc)) - del lines[0] - while lines[0] == '*': - del lines[0] - while len(lines) > 0 and lines[0][0:3] == '* @': - l = lines[0][3:] - try: - (arg, desc) = string.split(l, ':', 1) - desc=string.strip(desc) - arg=string.strip(arg) + if not quiet: + self.warning("Missing * in macro comment for %s" % (name)) + return((args, desc)) + lines = self.comment.split('\n') + if lines[0] == '*': + del lines[0] + if lines[0] != "* %s:" % (name): + if not quiet: + self.warning("Misformatted macro comment for %s" % (name)) + self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0])) + return((args, desc)) + del lines[0] + while lines[0] == '*': + del lines[0] + while len(lines) > 0 and lines[0][0:3] == '* @': + l = lines[0][3:] + try: + (arg, desc) = l.split(':', 1) + desc=desc.strip() + arg=arg.strip() except: - if not quiet: - self.warning("Misformatted macro comment for %s" % (name)) - self.warning(" problem with '%s'" % (lines[0])) - del lines[0] - continue - del lines[0] - l = string.strip(lines[0]) - while len(l) > 2 and l[0:3] != '* @': - while l[0] == '*': - l = l[1:] - desc = desc + ' ' + string.strip(l) - del lines[0] - if len(lines) == 0: - break - l = lines[0] + if not quiet: + self.warning("Misformatted macro comment for %s" % (name)) + self.warning(" problem with '%s'" % (lines[0])) + del lines[0] + continue + del lines[0] + l = lines[0].strip() + while len(l) > 2 and l[0:3] != '* @': + while l[0] == '*': + l = l[1:] + desc = desc + ' ' + l.strip() + del lines[0] + if len(lines) == 0: + break + l = lines[0] args.append((arg, desc)) - while len(lines) > 0 and lines[0] == '*': - del lines[0] - desc = "" - while len(lines) > 0: - l = lines[0] - while len(l) > 0 and l[0] == '*': - l = l[1:] - l = string.strip(l) - desc = desc + " " + l - del lines[0] + while len(lines) > 0 and lines[0] == '*': + del lines[0] + desc = "" + while len(lines) > 0: + l = lines[0] + while len(l) > 0 and l[0] == '*': + l = l[1:] + l = l.strip() + desc = desc + " " + l + del lines[0] - desc = string.strip(desc) + desc = desc.strip() - if quiet == 0: - if desc == "": - self.warning("Macro comment for %s lack description of the macro" % (name)) + if quiet == 0: + if desc == "": + self.warning("Macro comment for %s lack description of the macro" % (name)) - return((args, desc)) + return((args, desc)) # # Parse a comment block and merge the informations found in the @@ -809,206 +813,206 @@ class CParser: # def mergeFunctionComment(self, name, description, quiet = 0): if name == 'main': - quiet = 1 + quiet = 1 if name[0:2] == '__': - quiet = 1 + quiet = 1 - (ret, args) = description - desc = "" - retdesc = "" + (ret, args) = description + desc = "" + retdesc = "" if self.comment == None: - if not quiet: - self.warning("Missing comment for function %s" % (name)) - return(((ret[0], retdesc), args, desc)) + if not quiet: + self.warning("Missing comment for function %s" % (name)) + return(((ret[0], retdesc), args, desc)) if self.comment[0] != '*': - if not quiet: - self.warning("Missing * in function comment for %s" % (name)) - return(((ret[0], retdesc), args, desc)) - lines = string.split(self.comment, '\n') - if lines[0] == '*': - del lines[0] - if lines[0] != "* %s:" % (name): - if not quiet: - self.warning("Misformatted function comment for %s" % (name)) - self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0])) - return(((ret[0], retdesc), args, desc)) - del lines[0] - while lines[0] == '*': - del lines[0] - nbargs = len(args) - while len(lines) > 0 and lines[0][0:3] == '* @': - l = lines[0][3:] - try: - (arg, desc) = string.split(l, ':', 1) - desc=string.strip(desc) - arg=string.strip(arg) + if not quiet: + self.warning("Missing * in function comment for %s" % (name)) + return(((ret[0], retdesc), args, desc)) + lines = self.comment.split('\n') + if lines[0] == '*': + del lines[0] + if lines[0] != "* %s:" % (name): + if not quiet: + self.warning("Misformatted function comment for %s" % (name)) + self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0])) + return(((ret[0], retdesc), args, desc)) + del lines[0] + while lines[0] == '*': + del lines[0] + nbargs = len(args) + while len(lines) > 0 and lines[0][0:3] == '* @': + l = lines[0][3:] + try: + (arg, desc) = l.split(':', 1) + desc=desc.strip() + arg=arg.strip() except: - if not quiet: - self.warning("Misformatted function comment for %s" % (name)) - self.warning(" problem with '%s'" % (lines[0])) - del lines[0] - continue - del lines[0] - l = string.strip(lines[0]) - while len(l) > 2 and l[0:3] != '* @': - while l[0] == '*': - l = l[1:] - desc = desc + ' ' + string.strip(l) - del lines[0] - if len(lines) == 0: - break - l = lines[0] - i = 0 - while i < nbargs: - if args[i][1] == arg: - args[i] = (args[i][0], arg, desc) - break; - i = i + 1 - if i >= nbargs: - if not quiet: - self.warning("Unable to find arg %s from function comment for %s" % ( - arg, name)) - while len(lines) > 0 and lines[0] == '*': - del lines[0] - desc = "" - while len(lines) > 0: - l = lines[0] - while len(l) > 0 and l[0] == '*': - l = l[1:] - l = string.strip(l) - if len(l) >= 6 and l[0:6] == "return" or l[0:6] == "Return": - try: - l = string.split(l, ' ', 1)[1] - except: - l = "" - retdesc = string.strip(l) - del lines[0] - while len(lines) > 0: - l = lines[0] - while len(l) > 0 and l[0] == '*': - l = l[1:] - l = string.strip(l) - retdesc = retdesc + " " + l - del lines[0] - else: - desc = desc + " " + l - del lines[0] - - retdesc = string.strip(retdesc) - desc = string.strip(desc) - - if quiet == 0: - # - # report missing comments - # - i = 0 - while i < nbargs: - if args[i][2] == None and args[i][0] != "void" and \ - ((args[i][1] != None) or (args[i][1] == '')): - self.warning("Function comment for %s lacks description of arg %s" % (name, args[i][1])) - i = i + 1 - if retdesc == "" and ret[0] != "void": - self.warning("Function comment for %s lacks description of return value" % (name)) - if desc == "": - self.warning("Function comment for %s lacks description of the function" % (name)) - - return(((ret[0], retdesc), args, desc)) + if not quiet: + self.warning("Misformatted function comment for %s" % (name)) + self.warning(" problem with '%s'" % (lines[0])) + del lines[0] + continue + del lines[0] + l = lines[0].strip() + while len(l) > 2 and l[0:3] != '* @': + while l[0] == '*': + l = l[1:] + desc = desc + ' ' + l.strip() + del lines[0] + if len(lines) == 0: + break + l = lines[0] + i = 0 + while i < nbargs: + if args[i][1] == arg: + args[i] = (args[i][0], arg, desc) + break; + i = i + 1 + if i >= nbargs: + if not quiet: + self.warning("Unable to find arg %s from function comment for %s" % ( + arg, name)) + while len(lines) > 0 and lines[0] == '*': + del lines[0] + desc = "" + while len(lines) > 0: + l = lines[0] + while len(l) > 0 and l[0] == '*': + l = l[1:] + l = l.strip() + if len(l) >= 6 and l[0:6] == "return" or l[0:6] == "Return": + try: + l = l.split(' ', 1)[1] + except: + l = "" + retdesc = l.strip() + del lines[0] + while len(lines) > 0: + l = lines[0] + while len(l) > 0 and l[0] == '*': + l = l[1:] + l = l.strip() + retdesc = retdesc + " " + l + del lines[0] + else: + desc = desc + " " + l + del lines[0] + + retdesc = retdesc.strip() + desc = desc.strip() + + if quiet == 0: + # + # report missing comments + # + i = 0 + while i < nbargs: + if args[i][2] == None and args[i][0] != "void" and \ + ((args[i][1] != None) or (args[i][1] == '')): + self.warning("Function comment for %s lacks description of arg %s" % (name, args[i][1])) + i = i + 1 + if retdesc == "" and ret[0] != "void": + self.warning("Function comment for %s lacks description of return value" % (name)) + if desc == "": + self.warning("Function comment for %s lacks description of the function" % (name)) + + return(((ret[0], retdesc), args, desc)) def parsePreproc(self, token): - if debug: - print "=> preproc ", token, self.lexer.tokens + if debug: + print("=> preproc ", token, self.lexer.tokens) name = token[1] - if name == "#include": - token = self.lexer.token() - if token == None: - return None - if token[0] == 'preproc': - self.index_add(token[1], self.filename, not self.is_header, - "include") - return self.lexer.token() - return token - if name == "#define": - token = self.lexer.token() - if token == None: - return None - if token[0] == 'preproc': - # TODO macros with arguments - name = token[1] - lst = [] - token = self.lexer.token() - while token != None and token[0] == 'preproc' and \ - token[1][0] != '#': - lst.append(token[1]) - token = self.lexer.token() + if name == "#include": + token = self.lexer.token() + if token == None: + return None + if token[0] == 'preproc': + self.index_add(token[1], self.filename, not self.is_header, + "include") + return self.lexer.token() + return token + if name == "#define": + token = self.lexer.token() + if token == None: + return None + if token[0] == 'preproc': + # TODO macros with arguments + name = token[1] + lst = [] + token = self.lexer.token() + while token != None and token[0] == 'preproc' and \ + token[1][0] != '#': + lst.append(token[1]) + token = self.lexer.token() try: - name = string.split(name, '(') [0] + name = name.split('(') [0] except: pass info = self.parseMacroComment(name, not self.is_header) - self.index_add(name, self.filename, not self.is_header, - "macro", info) - return token - - # - # Processing of conditionals modified by Bill 1/1/05 - # - # We process conditionals (i.e. tokens from #ifdef, #ifndef, - # #if, #else and #endif) for headers and mainline code, - # store the ones from the header in libxml2-api.xml, and later - # (in the routine merge_public) verify that the two (header and - # mainline code) agree. - # - # There is a small problem with processing the headers. Some of - # the variables are not concerned with enabling / disabling of - # library functions (e.g. '__XML_PARSER_H__'), and we don't want - # them to be included in libxml2-api.xml, or involved in - # the check between the header and the mainline code. To - # accomplish this, we ignore any conditional which doesn't include - # the string 'ENABLED' - # - if name == "#ifdef": - apstr = self.lexer.tokens[0][1] - try: - self.defines.append(apstr) - if string.find(apstr, 'ENABLED') != -1: - self.conditionals.append("defined(%s)" % apstr) - except: - pass - elif name == "#ifndef": - apstr = self.lexer.tokens[0][1] - try: - self.defines.append(apstr) - if string.find(apstr, 'ENABLED') != -1: - self.conditionals.append("!defined(%s)" % apstr) - except: - pass - elif name == "#if": - apstr = "" - for tok in self.lexer.tokens: - if apstr != "": - apstr = apstr + " " - apstr = apstr + tok[1] - try: - self.defines.append(apstr) - if string.find(apstr, 'ENABLED') != -1: - self.conditionals.append(apstr) - except: - pass - elif name == "#else": - if self.conditionals != [] and \ - string.find(self.defines[-1], 'ENABLED') != -1: - self.conditionals[-1] = "!(%s)" % self.conditionals[-1] - elif name == "#endif": - if self.conditionals != [] and \ - string.find(self.defines[-1], 'ENABLED') != -1: - self.conditionals = self.conditionals[:-1] - self.defines = self.defines[:-1] - token = self.lexer.token() - while token != None and token[0] == 'preproc' and \ - token[1][0] != '#': - token = self.lexer.token() - return token + self.index_add(name, self.filename, not self.is_header, + "macro", info) + return token + + # + # Processing of conditionals modified by Bill 1/1/05 + # + # We process conditionals (i.e. tokens from #ifdef, #ifndef, + # #if, #else and #endif) for headers and mainline code, + # store the ones from the header in libxml2-api.xml, and later + # (in the routine merge_public) verify that the two (header and + # mainline code) agree. + # + # There is a small problem with processing the headers. Some of + # the variables are not concerned with enabling / disabling of + # library functions (e.g. '__XML_PARSER_H__'), and we don't want + # them to be included in libxml2-api.xml, or involved in + # the check between the header and the mainline code. To + # accomplish this, we ignore any conditional which doesn't include + # the string 'ENABLED' + # + if name == "#ifdef": + apstr = self.lexer.tokens[0][1] + try: + self.defines.append(apstr) + if apstr.find('ENABLED') != -1: + self.conditionals.append("defined(%s)" % apstr) + except: + pass + elif name == "#ifndef": + apstr = self.lexer.tokens[0][1] + try: + self.defines.append(apstr) + if apstr.find('ENABLED') != -1: + self.conditionals.append("!defined(%s)" % apstr) + except: + pass + elif name == "#if": + apstr = "" + for tok in self.lexer.tokens: + if apstr != "": + apstr = apstr + " " + apstr = apstr + tok[1] + try: + self.defines.append(apstr) + if apstr.find('ENABLED') != -1: + self.conditionals.append(apstr) + except: + pass + elif name == "#else": + if self.conditionals != [] and \ + self.defines[-1].find('ENABLED') != -1: + self.conditionals[-1] = "!(%s)" % self.conditionals[-1] + elif name == "#endif": + if self.conditionals != [] and \ + self.defines[-1].find('ENABLED') != -1: + self.conditionals = self.conditionals[:-1] + self.defines = self.defines[:-1] + token = self.lexer.token() + while token != None and token[0] == 'preproc' and \ + token[1][0] != '#': + token = self.lexer.token() + return token # # token acquisition on top of the lexer, it handle internally @@ -1019,89 +1023,89 @@ class CParser: global ignored_words token = self.lexer.token() - while token != None: - if token[0] == 'comment': - token = self.parseComment(token) - continue - elif token[0] == 'preproc': - token = self.parsePreproc(token) - continue - elif token[0] == "name" and token[1] == "__const": - token = ("name", "const") - return token - elif token[0] == "name" and token[1] == "__attribute": - token = self.lexer.token() - while token != None and token[1] != ";": - token = self.lexer.token() - return token - elif token[0] == "name" and ignored_words.has_key(token[1]): - (n, info) = ignored_words[token[1]] - i = 0 - while i < n: - token = self.lexer.token() - i = i + 1 - token = self.lexer.token() - continue - else: - if debug: - print "=> ", token - return token - return None + while token != None: + if token[0] == 'comment': + token = self.parseComment(token) + continue + elif token[0] == 'preproc': + token = self.parsePreproc(token) + continue + elif token[0] == "name" and token[1] == "__const": + token = ("name", "const") + return token + elif token[0] == "name" and token[1] == "__attribute": + token = self.lexer.token() + while token != None and token[1] != ";": + token = self.lexer.token() + return token + elif token[0] == "name" and token[1] in ignored_words: + (n, info) = ignored_words[token[1]] + i = 0 + while i < n: + token = self.lexer.token() + i = i + 1 + token = self.lexer.token() + continue + else: + if debug: + print("=> ", token) + return token + return None # # Parse a typedef, it records the type and its name. # def parseTypedef(self, token): if token == None: - return None - token = self.parseType(token) - if token == None: - self.error("parsing typedef") - return None - base_type = self.type - type = base_type - #self.debug("end typedef type", token) - while token != None: - if token[0] == "name": - name = token[1] - signature = self.signature - if signature != None: - type = string.split(type, '(')[0] - d = self.mergeFunctionComment(name, - ((type, None), signature), 1) - self.index_add(name, self.filename, not self.is_header, - "functype", d) - else: - if base_type == "struct": - self.index_add(name, self.filename, not self.is_header, - "struct", type) - base_type = "struct " + name - else: - # TODO report missing or misformatted comments - info = self.parseTypeComment(name, 1) - self.index_add(name, self.filename, not self.is_header, - "typedef", type, info) - token = self.token() - else: - self.error("parsing typedef: expecting a name") - return token - #self.debug("end typedef", token) - if token != None and token[0] == 'sep' and token[1] == ',': - type = base_type - token = self.token() - while token != None and token[0] == "op": - type = type + token[1] - token = self.token() - elif token != None and token[0] == 'sep' and token[1] == ';': - break; - elif token != None and token[0] == 'name': - type = base_type - continue; - else: - self.error("parsing typedef: expecting ';'", token) - return token - token = self.token() - return token + return None + token = self.parseType(token) + if token == None: + self.error("parsing typedef") + return None + base_type = self.type + type = base_type + #self.debug("end typedef type", token) + while token != None: + if token[0] == "name": + name = token[1] + signature = self.signature + if signature != None: + type = type.split('(')[0] + d = self.mergeFunctionComment(name, + ((type, None), signature), 1) + self.index_add(name, self.filename, not self.is_header, + "functype", d) + else: + if base_type == "struct": + self.index_add(name, self.filename, not self.is_header, + "struct", type) + base_type = "struct " + name + else: + # TODO report missing or misformatted comments + info = self.parseTypeComment(name, 1) + self.index_add(name, self.filename, not self.is_header, + "typedef", type, info) + token = self.token() + else: + self.error("parsing typedef: expecting a name") + return token + #self.debug("end typedef", token) + if token != None and token[0] == 'sep' and token[1] == ',': + type = base_type + token = self.token() + while token != None and token[0] == "op": + type = type + token[1] + token = self.token() + elif token != None and token[0] == 'sep' and token[1] == ';': + break; + elif token != None and token[0] == 'name': + type = base_type + continue; + else: + self.error("parsing typedef: expecting ';'", token) + return token + token = self.token() + return token # # Parse a C code block, used for functions it parse till @@ -1109,138 +1113,138 @@ class CParser: # def parseBlock(self, token): while token != None: - if token[0] == "sep" and token[1] == "{": - token = self.token() - token = self.parseBlock(token) - elif token[0] == "sep" and token[1] == "}": - self.comment = None - token = self.token() - return token - else: - if self.collect_ref == 1: - oldtok = token - token = self.token() - if oldtok[0] == "name" and oldtok[1][0:3] == "xml": - if token[0] == "sep" and token[1] == "(": - self.index_add_ref(oldtok[1], self.filename, - 0, "function") - token = self.token() - elif token[0] == "name": - token = self.token() - if token[0] == "sep" and (token[1] == ";" or - token[1] == "," or token[1] == "="): - self.index_add_ref(oldtok[1], self.filename, - 0, "type") - elif oldtok[0] == "name" and oldtok[1][0:4] == "XML_": - self.index_add_ref(oldtok[1], self.filename, - 0, "typedef") - elif oldtok[0] == "name" and oldtok[1][0:7] == "LIBXML_": - self.index_add_ref(oldtok[1], self.filename, - 0, "typedef") - - else: - token = self.token() - return token + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseBlock(token) + elif token[0] == "sep" and token[1] == "}": + self.comment = None + token = self.token() + return token + else: + if self.collect_ref == 1: + oldtok = token + token = self.token() + if oldtok[0] == "name" and oldtok[1][0:3] == "xml": + if token[0] == "sep" and token[1] == "(": + self.index_add_ref(oldtok[1], self.filename, + 0, "function") + token = self.token() + elif token[0] == "name": + token = self.token() + if token[0] == "sep" and (token[1] == ";" or + token[1] == "," or token[1] == "="): + self.index_add_ref(oldtok[1], self.filename, + 0, "type") + elif oldtok[0] == "name" and oldtok[1][0:4] == "XML_": + self.index_add_ref(oldtok[1], self.filename, + 0, "typedef") + elif oldtok[0] == "name" and oldtok[1][0:7] == "LIBXML_": + self.index_add_ref(oldtok[1], self.filename, + 0, "typedef") + + else: + token = self.token() + return token # # Parse a C struct definition till the balancing } # def parseStruct(self, token): fields = [] - #self.debug("start parseStruct", token) + #self.debug("start parseStruct", token) while token != None: - if token[0] == "sep" and token[1] == "{": - token = self.token() - token = self.parseTypeBlock(token) - elif token[0] == "sep" and token[1] == "}": - self.struct_fields = fields - #self.debug("end parseStruct", token) - #print fields - token = self.token() - return token - else: - base_type = self.type - #self.debug("before parseType", token) - token = self.parseType(token) - #self.debug("after parseType", token) - if token != None and token[0] == "name": - fname = token[1] - token = self.token() - if token[0] == "sep" and token[1] == ";": - self.comment = None - token = self.token() - fields.append((self.type, fname, self.comment)) - self.comment = None - else: - self.error("parseStruct: expecting ;", token) - elif token != None and token[0] == "sep" and token[1] == "{": - token = self.token() - token = self.parseTypeBlock(token) - if token != None and token[0] == "name": - token = self.token() - if token != None and token[0] == "sep" and token[1] == ";": - token = self.token() - else: - self.error("parseStruct: expecting ;", token) - else: - self.error("parseStruct: name", token) - token = self.token() - self.type = base_type; + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + elif token[0] == "sep" and token[1] == "}": + self.struct_fields = fields + #self.debug("end parseStruct", token) + #print fields + token = self.token() + return token + else: + base_type = self.type + #self.debug("before parseType", token) + token = self.parseType(token) + #self.debug("after parseType", token) + if token != None and token[0] == "name": + fname = token[1] + token = self.token() + if token[0] == "sep" and token[1] == ";": + self.comment = None + token = self.token() + fields.append((self.type, fname, self.comment)) + self.comment = None + else: + self.error("parseStruct: expecting ;", token) + elif token != None and token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + if token != None and token[0] == "name": + token = self.token() + if token != None and token[0] == "sep" and token[1] == ";": + token = self.token() + else: + self.error("parseStruct: expecting ;", token) + else: + self.error("parseStruct: name", token) + token = self.token() + self.type = base_type; self.struct_fields = fields - #self.debug("end parseStruct", token) - #print fields - return token + #self.debug("end parseStruct", token) + #print fields + return token # # Parse a C enum block, parse till the balancing } # def parseEnumBlock(self, token): self.enums = [] - name = None - self.comment = None - comment = "" - value = "0" + name = None + self.comment = None + comment = "" + value = "0" while token != None: - if token[0] == "sep" and token[1] == "{": - token = self.token() - token = self.parseTypeBlock(token) - elif token[0] == "sep" and token[1] == "}": - if name != None: - if self.comment != None: - comment = self.comment - self.comment = None - self.enums.append((name, value, comment)) - token = self.token() - return token - elif token[0] == "name": - if name != None: - if self.comment != None: - comment = string.strip(self.comment) - self.comment = None - self.enums.append((name, value, comment)) - name = token[1] - comment = "" - token = self.token() - if token[0] == "op" and token[1][0] == "=": - value = "" - if len(token[1]) > 1: - value = token[1][1:] - token = self.token() - while token[0] != "sep" or (token[1] != ',' and - token[1] != '}'): - value = value + token[1] - token = self.token() - else: - try: - value = "%d" % (int(value) + 1) - except: - self.warning("Failed to compute value of enum %s" % (name)) - value="" - if token[0] == "sep" and token[1] == ",": - token = self.token() - else: - token = self.token() - return token + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + elif token[0] == "sep" and token[1] == "}": + if name != None: + if self.comment != None: + comment = self.comment + self.comment = None + self.enums.append((name, value, comment)) + token = self.token() + return token + elif token[0] == "name": + if name != None: + if self.comment != None: + comment = self.comment.strip() + self.comment = None + self.enums.append((name, value, comment)) + name = token[1] + comment = "" + token = self.token() + if token[0] == "op" and token[1][0] == "=": + value = "" + if len(token[1]) > 1: + value = token[1][1:] + token = self.token() + while token[0] != "sep" or (token[1] != ',' and + token[1] != '}'): + value = value + token[1] + token = self.token() + else: + try: + value = "%d" % (int(value) + 1) + except: + self.warning("Failed to compute value of enum %s" % (name)) + value="" + if token[0] == "sep" and token[1] == ",": + token = self.token() + else: + token = self.token() + return token # # Parse a C definition block, used for structs it parse till @@ -1248,15 +1252,15 @@ class CParser: # def parseTypeBlock(self, token): while token != None: - if token[0] == "sep" and token[1] == "{": - token = self.token() - token = self.parseTypeBlock(token) - elif token[0] == "sep" and token[1] == "}": - token = self.token() - return token - else: - token = self.token() - return token + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + elif token[0] == "sep" and token[1] == "}": + token = self.token() + return token + else: + token = self.token() + return token # # Parse a type: the fact that the type name can either occur after @@ -1265,200 +1269,200 @@ class CParser: # def parseType(self, token): self.type = "" - self.struct_fields = [] + self.struct_fields = [] self.signature = None - if token == None: - return token - - while token[0] == "name" and ( - token[1] == "const" or \ - token[1] == "unsigned" or \ - token[1] == "signed"): - if self.type == "": - self.type = token[1] - else: - self.type = self.type + " " + token[1] - token = self.token() + if token == None: + return token + + while token[0] == "name" and ( + token[1] == "const" or \ + token[1] == "unsigned" or \ + token[1] == "signed"): + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + token = self.token() if token[0] == "name" and (token[1] == "long" or token[1] == "short"): - if self.type == "": - self.type = token[1] - else: - self.type = self.type + " " + token[1] - if token[0] == "name" and token[1] == "int": - if self.type == "": - self.type = tmp[1] - else: - self.type = self.type + " " + tmp[1] + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + if token[0] == "name" and token[1] == "int": + if self.type == "": + self.type = tmp[1] + else: + self.type = self.type + " " + tmp[1] elif token[0] == "name" and token[1] == "struct": - if self.type == "": - self.type = token[1] - else: - self.type = self.type + " " + token[1] - token = self.token() - nametok = None - if token[0] == "name": - nametok = token - token = self.token() - if token != None and token[0] == "sep" and token[1] == "{": - token = self.token() - token = self.parseStruct(token) - elif token != None and token[0] == "op" and token[1] == "*": - self.type = self.type + " " + nametok[1] + " *" - token = self.token() - while token != None and token[0] == "op" and token[1] == "*": - self.type = self.type + " *" - token = self.token() - if token[0] == "name": - nametok = token - token = self.token() - else: - self.error("struct : expecting name", token) - return token - elif token != None and token[0] == "name" and nametok != None: - self.type = self.type + " " + nametok[1] - return token - - if nametok != None: - self.lexer.push(token) - token = nametok - return token + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + token = self.token() + nametok = None + if token[0] == "name": + nametok = token + token = self.token() + if token != None and token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseStruct(token) + elif token != None and token[0] == "op" and token[1] == "*": + self.type = self.type + " " + nametok[1] + " *" + token = self.token() + while token != None and token[0] == "op" and token[1] == "*": + self.type = self.type + " *" + token = self.token() + if token[0] == "name": + nametok = token + token = self.token() + else: + self.error("struct : expecting name", token) + return token + elif token != None and token[0] == "name" and nametok != None: + self.type = self.type + " " + nametok[1] + return token + + if nametok != None: + self.lexer.push(token) + token = nametok + return token elif token[0] == "name" and token[1] == "enum": - if self.type == "": - self.type = token[1] - else: - self.type = self.type + " " + token[1] - self.enums = [] - token = self.token() - if token != None and token[0] == "sep" and token[1] == "{": - token = self.token() - token = self.parseEnumBlock(token) - else: - self.error("parsing enum: expecting '{'", token) - enum_type = None - if token != None and token[0] != "name": - self.lexer.push(token) - token = ("name", "enum") - else: - enum_type = token[1] - for enum in self.enums: - self.index_add(enum[0], self.filename, - not self.is_header, "enum", - (enum[1], enum[2], enum_type)) - return token - - elif token[0] == "name": - if self.type == "": - self.type = token[1] - else: - self.type = self.type + " " + token[1] - else: - self.error("parsing type %s: expecting a name" % (self.type), - token) - return token - token = self.token() + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + self.enums = [] + token = self.token() + if token != None and token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseEnumBlock(token) + else: + self.error("parsing enum: expecting '{'", token) + enum_type = None + if token != None and token[0] != "name": + self.lexer.push(token) + token = ("name", "enum") + else: + enum_type = token[1] + for enum in self.enums: + self.index_add(enum[0], self.filename, + not self.is_header, "enum", + (enum[1], enum[2], enum_type)) + return token + + elif token[0] == "name": + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + else: + self.error("parsing type %s: expecting a name" % (self.type), + token) + return token + token = self.token() while token != None and (token[0] == "op" or - token[0] == "name" and token[1] == "const"): - self.type = self.type + " " + token[1] - token = self.token() - - # - # if there is a parenthesis here, this means a function type - # - if token != None and token[0] == "sep" and token[1] == '(': - self.type = self.type + token[1] - token = self.token() - while token != None and token[0] == "op" and token[1] == '*': - self.type = self.type + token[1] - token = self.token() - if token == None or token[0] != "name" : - self.error("parsing function type, name expected", token); - return token - self.type = self.type + token[1] - nametok = token - token = self.token() - if token != None and token[0] == "sep" and token[1] == ')': - self.type = self.type + token[1] - token = self.token() - if token != None and token[0] == "sep" and token[1] == '(': - token = self.token() - type = self.type; - token = self.parseSignature(token); - self.type = type; - else: - self.error("parsing function type, '(' expected", token); - return token - else: - self.error("parsing function type, ')' expected", token); - return token - self.lexer.push(token) - token = nametok - return token + token[0] == "name" and token[1] == "const"): + self.type = self.type + " " + token[1] + token = self.token() + + # + # if there is a parenthesis here, this means a function type + # + if token != None and token[0] == "sep" and token[1] == '(': + self.type = self.type + token[1] + token = self.token() + while token != None and token[0] == "op" and token[1] == '*': + self.type = self.type + token[1] + token = self.token() + if token == None or token[0] != "name" : + self.error("parsing function type, name expected", token); + return token + self.type = self.type + token[1] + nametok = token + token = self.token() + if token != None and token[0] == "sep" and token[1] == ')': + self.type = self.type + token[1] + token = self.token() + if token != None and token[0] == "sep" and token[1] == '(': + token = self.token() + type = self.type; + token = self.parseSignature(token); + self.type = type; + else: + self.error("parsing function type, '(' expected", token); + return token + else: + self.error("parsing function type, ')' expected", token); + return token + self.lexer.push(token) + token = nametok + return token # - # do some lookahead for arrays - # - if token != None and token[0] == "name": - nametok = token - token = self.token() - if token != None and token[0] == "sep" and token[1] == '[': - self.type = self.type + nametok[1] - while token != None and token[0] == "sep" and token[1] == '[': - self.type = self.type + token[1] - token = self.token() - while token != None and token[0] != 'sep' and \ - token[1] != ']' and token[1] != ';': - self.type = self.type + token[1] - token = self.token() - if token != None and token[0] == 'sep' and token[1] == ']': - self.type = self.type + token[1] - token = self.token() - else: - self.error("parsing array type, ']' expected", token); - return token - elif token != None and token[0] == "sep" and token[1] == ':': - # remove :12 in case it's a limited int size - token = self.token() - token = self.token() - self.lexer.push(token) - token = nametok - - return token + # do some lookahead for arrays + # + if token != None and token[0] == "name": + nametok = token + token = self.token() + if token != None and token[0] == "sep" and token[1] == '[': + self.type = self.type + nametok[1] + while token != None and token[0] == "sep" and token[1] == '[': + self.type = self.type + token[1] + token = self.token() + while token != None and token[0] != 'sep' and \ + token[1] != ']' and token[1] != ';': + self.type = self.type + token[1] + token = self.token() + if token != None and token[0] == 'sep' and token[1] == ']': + self.type = self.type + token[1] + token = self.token() + else: + self.error("parsing array type, ']' expected", token); + return token + elif token != None and token[0] == "sep" and token[1] == ':': + # remove :12 in case it's a limited int size + token = self.token() + token = self.token() + self.lexer.push(token) + token = nametok + + return token # # Parse a signature: '(' has been parsed and we scan the type definition # up to the ')' included def parseSignature(self, token): signature = [] - if token != None and token[0] == "sep" and token[1] == ')': - self.signature = [] - token = self.token() - return token - while token != None: - token = self.parseType(token) - if token != None and token[0] == "name": - signature.append((self.type, token[1], None)) - token = self.token() - elif token != None and token[0] == "sep" and token[1] == ',': - token = self.token() - continue - elif token != None and token[0] == "sep" and token[1] == ')': - # only the type was provided - if self.type == "...": - signature.append((self.type, "...", None)) - else: - signature.append((self.type, None, None)) - if token != None and token[0] == "sep": - if token[1] == ',': - token = self.token() - continue - elif token[1] == ')': - token = self.token() - break - self.signature = signature - return token + if token != None and token[0] == "sep" and token[1] == ')': + self.signature = [] + token = self.token() + return token + while token != None: + token = self.parseType(token) + if token != None and token[0] == "name": + signature.append((self.type, token[1], None)) + token = self.token() + elif token != None and token[0] == "sep" and token[1] == ',': + token = self.token() + continue + elif token != None and token[0] == "sep" and token[1] == ')': + # only the type was provided + if self.type == "...": + signature.append((self.type, "...", None)) + else: + signature.append((self.type, None, None)) + if token != None and token[0] == "sep": + if token[1] == ',': + token = self.token() + continue + elif token[1] == ')': + token = self.token() + break + self.signature = signature + return token # # Parse a global definition, be it a type, variable or function @@ -1467,134 +1471,134 @@ class CParser: def parseGlobal(self, token): static = 0 if token[1] == 'extern': - token = self.token() - if token == None: - return token - if token[0] == 'string': - if token[1] == 'C': - token = self.token() - if token == None: - return token - if token[0] == 'sep' and token[1] == "{": - token = self.token() -# print 'Entering extern "C line ', self.lineno() - while token != None and (token[0] != 'sep' or - token[1] != "}"): - if token[0] == 'name': - token = self.parseGlobal(token) - else: - self.error( - "token %s %s unexpected at the top level" % ( - token[0], token[1])) - token = self.parseGlobal(token) -# print 'Exiting extern "C" line', self.lineno() - token = self.token() - return token - else: - return token - elif token[1] == 'static': - static = 1 - token = self.token() - if token == None or token[0] != 'name': - return token - - if token[1] == 'typedef': - token = self.token() - return self.parseTypedef(token) - else: - token = self.parseType(token) - type_orig = self.type - if token == None or token[0] != "name": - return token - type = type_orig - self.name = token[1] - token = self.token() - while token != None and (token[0] == "sep" or token[0] == "op"): - if token[0] == "sep": - if token[1] == "[": - type = type + token[1] - token = self.token() - while token != None and (token[0] != "sep" or \ - token[1] != ";"): - type = type + token[1] - token = self.token() - - if token != None and token[0] == "op" and token[1] == "=": - # - # Skip the initialization of the variable - # - token = self.token() - if token[0] == 'sep' and token[1] == '{': - token = self.token() - token = self.parseBlock(token) - else: - self.comment = None - while token != None and (token[0] != "sep" or \ - (token[1] != ';' and token[1] != ',')): - token = self.token() - self.comment = None - if token == None or token[0] != "sep" or (token[1] != ';' and - token[1] != ','): - self.error("missing ';' or ',' after value") - - if token != None and token[0] == "sep": - if token[1] == ";": - self.comment = None - token = self.token() - if type == "struct": - self.index_add(self.name, self.filename, - not self.is_header, "struct", self.struct_fields) - else: - self.index_add(self.name, self.filename, - not self.is_header, "variable", type) - break - elif token[1] == "(": - token = self.token() - token = self.parseSignature(token) - if token == None: - return None - if token[0] == "sep" and token[1] == ";": - d = self.mergeFunctionComment(self.name, - ((type, None), self.signature), 1) - self.index_add(self.name, self.filename, static, - "function", d) - token = self.token() - elif token[0] == "sep" and token[1] == "{": - d = self.mergeFunctionComment(self.name, - ((type, None), self.signature), static) - self.index_add(self.name, self.filename, static, - "function", d) - token = self.token() - token = self.parseBlock(token); - elif token[1] == ',': - self.comment = None - self.index_add(self.name, self.filename, static, - "variable", type) - type = type_orig - token = self.token() - while token != None and token[0] == "sep": - type = type + token[1] - token = self.token() - if token != None and token[0] == "name": - self.name = token[1] - token = self.token() - else: - break - - return token + token = self.token() + if token == None: + return token + if token[0] == 'string': + if token[1] == 'C': + token = self.token() + if token == None: + return token + if token[0] == 'sep' and token[1] == "{": + token = self.token() +# print 'Entering extern "C line ', self.lineno() + while token != None and (token[0] != 'sep' or + token[1] != "}"): + if token[0] == 'name': + token = self.parseGlobal(token) + else: + self.error( + "token %s %s unexpected at the top level" % ( + token[0], token[1])) + token = self.parseGlobal(token) +# print 'Exiting extern "C" line', self.lineno() + token = self.token() + return token + else: + return token + elif token[1] == 'static': + static = 1 + token = self.token() + if token == None or token[0] != 'name': + return token + + if token[1] == 'typedef': + token = self.token() + return self.parseTypedef(token) + else: + token = self.parseType(token) + type_orig = self.type + if token == None or token[0] != "name": + return token + type = type_orig + self.name = token[1] + token = self.token() + while token != None and (token[0] == "sep" or token[0] == "op"): + if token[0] == "sep": + if token[1] == "[": + type = type + token[1] + token = self.token() + while token != None and (token[0] != "sep" or \ + token[1] != ";"): + type = type + token[1] + token = self.token() + + if token != None and token[0] == "op" and token[1] == "=": + # + # Skip the initialization of the variable + # + token = self.token() + if token[0] == 'sep' and token[1] == '{': + token = self.token() + token = self.parseBlock(token) + else: + self.comment = None + while token != None and (token[0] != "sep" or \ + (token[1] != ';' and token[1] != ',')): + token = self.token() + self.comment = None + if token == None or token[0] != "sep" or (token[1] != ';' and + token[1] != ','): + self.error("missing ';' or ',' after value") + + if token != None and token[0] == "sep": + if token[1] == ";": + self.comment = None + token = self.token() + if type == "struct": + self.index_add(self.name, self.filename, + not self.is_header, "struct", self.struct_fields) + else: + self.index_add(self.name, self.filename, + not self.is_header, "variable", type) + break + elif token[1] == "(": + token = self.token() + token = self.parseSignature(token) + if token == None: + return None + if token[0] == "sep" and token[1] == ";": + d = self.mergeFunctionComment(self.name, + ((type, None), self.signature), 1) + self.index_add(self.name, self.filename, static, + "function", d) + token = self.token() + elif token[0] == "sep" and token[1] == "{": + d = self.mergeFunctionComment(self.name, + ((type, None), self.signature), static) + self.index_add(self.name, self.filename, static, + "function", d) + token = self.token() + token = self.parseBlock(token); + elif token[1] == ',': + self.comment = None + self.index_add(self.name, self.filename, static, + "variable", type) + type = type_orig + token = self.token() + while token != None and token[0] == "sep": + type = type + token[1] + token = self.token() + if token != None and token[0] == "name": + self.name = token[1] + token = self.token() + else: + break + + return token def parse(self): self.warning("Parsing %s" % (self.filename)) token = self.token() - while token != None: + while token != None: if token[0] == 'name': - token = self.parseGlobal(token) + token = self.parseGlobal(token) else: - self.error("token %s %s unexpected at the top level" % ( - token[0], token[1])) - token = self.parseGlobal(token) - return - self.parseTopComment(self.top_comment) + self.error("token %s %s unexpected at the top level" % ( + token[0], token[1])) + token = self.parseGlobal(token) + return + self.parseTopComment(self.top_comment) return self.index @@ -1603,488 +1607,490 @@ class docBuilder: def __init__(self, name, directories=['.'], excludes=[]): self.name = name self.directories = directories - self.excludes = excludes + ignored_files.keys() - self.modules = {} - self.headers = {} - self.idx = index() + self.excludes = excludes + list(ignored_files.keys()) + self.modules = {} + self.headers = {} + self.idx = index() self.xref = {} - self.index = {} - if name == 'libxml2': - self.basename = 'libxml' - else: - self.basename = name + self.index = {} + if name == 'libxml2': + self.basename = 'libxml' + else: + self.basename = name def indexString(self, id, str): - if str == None: - return - str = string.replace(str, "'", ' ') - str = string.replace(str, '"', ' ') - str = string.replace(str, "/", ' ') - str = string.replace(str, '*', ' ') - str = string.replace(str, "[", ' ') - str = string.replace(str, "]", ' ') - str = string.replace(str, "(", ' ') - str = string.replace(str, ")", ' ') - str = string.replace(str, "<", ' ') - str = string.replace(str, '>', ' ') - str = string.replace(str, "&", ' ') - str = string.replace(str, '#', ' ') - str = string.replace(str, ",", ' ') - str = string.replace(str, '.', ' ') - str = string.replace(str, ';', ' ') - tokens = string.split(str) - for token in tokens: - try: - c = token[0] - if string.find(string.letters, c) < 0: - pass - elif len(token) < 3: - pass - else: - lower = string.lower(token) - # TODO: generalize this a bit - if lower == 'and' or lower == 'the': - pass - elif self.xref.has_key(token): - self.xref[token].append(id) - else: - self.xref[token] = [id] - except: - pass + if str == None: + return + str = str.replace("'", ' ') + str = str.replace('"', ' ') + str = str.replace("/", ' ') + str = str.replace('*', ' ') + str = str.replace("[", ' ') + str = str.replace("]", ' ') + str = str.replace("(", ' ') + str = str.replace(")", ' ') + str = str.replace("<", ' ') + str = str.replace('>', ' ') + str = str.replace("&", ' ') + str = str.replace('#', ' ') + str = str.replace(",", ' ') + str = str.replace('.', ' ') + str = str.replace(';', ' ') + tokens = str.split() + for token in tokens: + try: + c = token[0] + if string.ascii_letters.find(c) < 0: + pass + elif len(token) < 3: + pass + else: + lower = token.lower() + # TODO: generalize this a bit + if lower == 'and' or lower == 'the': + pass + elif token in self.xref: + self.xref[token].append(id) + else: + self.xref[token] = [id] + except: + pass def analyze(self): - print "Project %s : %d headers, %d modules" % (self.name, len(self.headers.keys()), len(self.modules.keys())) - self.idx.analyze() + print("Project %s : %d headers, %d modules" % (self.name, len(list(self.headers.keys())), len(list(self.modules.keys())))) + self.idx.analyze() def scanHeaders(self): - for header in self.headers.keys(): - parser = CParser(header) - idx = parser.parse() - self.headers[header] = idx; - self.idx.merge(idx) + for header in list(self.headers.keys()): + parser = CParser(header) + idx = parser.parse() + self.headers[header] = idx; + self.idx.merge(idx) def scanModules(self): - for module in self.modules.keys(): - parser = CParser(module) - idx = parser.parse() - # idx.analyze() - self.modules[module] = idx - self.idx.merge_public(idx) + for module in list(self.modules.keys()): + parser = CParser(module) + idx = parser.parse() + # idx.analyze() + self.modules[module] = idx + self.idx.merge_public(idx) def scan(self): for directory in self.directories: - files = glob.glob(directory + "/*.c") - for file in files: - skip = 0 - for excl in self.excludes: - if string.find(file, excl) != -1: - skip = 1; - break - if skip == 0: - self.modules[file] = None; - files = glob.glob(directory + "/*.h") - for file in files: - skip = 0 - for excl in self.excludes: - if string.find(file, excl) != -1: - skip = 1; - break - if skip == 0: - self.headers[file] = None; - self.scanHeaders() - self.scanModules() + files = glob.glob(directory + "/*.c") + for file in files: + skip = 0 + for excl in self.excludes: + if file.find(excl) != -1: + print("Skipping %s" % file) + skip = 1 + break + if skip == 0: + self.modules[file] = None; + files = glob.glob(directory + "/*.h") + for file in files: + skip = 0 + for excl in self.excludes: + if file.find(excl) != -1: + print("Skipping %s" % file) + skip = 1 + break + if skip == 0: + self.headers[file] = None; + self.scanHeaders() + self.scanModules() def modulename_file(self, file): module = os.path.basename(file) - if module[-2:] == '.h': - module = module[:-2] - elif module[-2:] == '.c': - module = module[:-2] - return module + if module[-2:] == '.h': + module = module[:-2] + elif module[-2:] == '.c': + module = module[:-2] + return module def serialize_enum(self, output, name): id = self.idx.enums[name] output.write(" \n") def serialize_macro(self, output, name): id = self.idx.macros[name] output.write(" \n" % (name, - self.modulename_file(id.header))) - if id.info != None: + self.modulename_file(id.header))) + if id.info != None: try: - (args, desc) = id.info - if desc != None and desc != "": - output.write(" %s\n" % (escape(desc))) - self.indexString(name, desc) - for arg in args: - (name, desc) = arg - if desc != None and desc != "": - output.write(" \n" % ( - name, escape(desc))) - self.indexString(name, desc) - else: - output.write(" \n" % (name)) + (args, desc) = id.info + if desc != None and desc != "": + output.write(" %s\n" % (escape(desc))) + self.indexString(name, desc) + for arg in args: + (name, desc) = arg + if desc != None and desc != "": + output.write(" \n" % ( + name, escape(desc))) + self.indexString(name, desc) + else: + output.write(" \n" % (name)) except: pass output.write(" \n") def serialize_typedef(self, output, name): id = self.idx.typedefs[name] - if id.info[0:7] == 'struct ': - output.write(" \n"); - try: - for field in self.idx.structs[name].info: - desc = field[2] - self.indexString(name, desc) - if desc == None: - desc = '' - else: - desc = escape(desc) - output.write(" \n" % (field[1] , field[0], desc)) - except: - print "Failed to serialize struct %s" % (name) - output.write(" \n") - else: - output.write("/>\n"); - else : - output.write(" \n"); + try: + for field in self.idx.structs[name].info: + desc = field[2] + self.indexString(name, desc) + if desc == None: + desc = '' + else: + desc = escape(desc) + output.write(" \n" % (field[1] , field[0], desc)) + except: + print("Failed to serialize struct %s" % (name)) + output.write(" \n") + else: + output.write("/>\n"); + else : + output.write(" \n %s\n" % (escape(desc))) - output.write(" \n") - else: - output.write("/>\n") - except: - output.write("/>\n") + desc = id.extra + if desc != None and desc != "": + output.write(">\n %s\n" % (escape(desc))) + output.write(" \n") + else: + output.write("/>\n") + except: + output.write("/>\n") def serialize_variable(self, output, name): id = self.idx.variables[name] - if id.info != None: - output.write(" \n" % ( - name, self.modulename_file(id.header), id.info)) - else: - output.write(" \n" % ( - name, self.modulename_file(id.header))) + if id.info != None: + output.write(" \n" % ( + name, self.modulename_file(id.header), id.info)) + else: + output.write(" \n" % ( + name, self.modulename_file(id.header))) def serialize_function(self, output, name): id = self.idx.functions[name] - if name == debugsym: - print "=>", id + if name == debugsym: + print("=>", id) output.write(" <%s name='%s' file='%s' module='%s'>\n" % (id.type, - name, self.modulename_file(id.header), - self.modulename_file(id.module))) - # - # Processing of conditionals modified by Bill 1/1/05 - # - if id.conditionals != None: - apstr = "" - for cond in id.conditionals: - if apstr != "": - apstr = apstr + " && " - apstr = apstr + cond - output.write(" %s\n"% (apstr)); - try: - (ret, params, desc) = id.info - if (desc == None or desc == '') and \ - name[0:9] != "xmlThrDef" and name != "xmlDllMain": - print "%s %s from %s has no description" % (id.type, name, - self.modulename_file(id.module)) - - output.write(" %s\n" % (escape(desc))) - self.indexString(name, desc) - if ret[0] != None: - if ret[0] == "void": - output.write(" \n") - else: - output.write(" \n" % ( - ret[0], escape(ret[1]))) - self.indexString(name, ret[1]) - for param in params: - if param[0] == 'void': - continue - if param[2] == None: - output.write(" \n" % (param[1], param[0])) - else: - output.write(" \n" % (param[1], param[0], escape(param[2]))) - self.indexString(name, param[2]) - except: - print "Failed to save function %s info: " % name, `id.info` + name, self.modulename_file(id.header), + self.modulename_file(id.module))) + # + # Processing of conditionals modified by Bill 1/1/05 + # + if id.conditionals != None: + apstr = "" + for cond in id.conditionals: + if apstr != "": + apstr = apstr + " && " + apstr = apstr + cond + output.write(" %s\n"% (apstr)); + try: + (ret, params, desc) = id.info + if (desc == None or desc == '') and \ + name[0:9] != "xmlThrDef" and name != "xmlDllMain": + print("%s %s from %s has no description" % (id.type, name, + self.modulename_file(id.module))) + + output.write(" %s\n" % (escape(desc))) + self.indexString(name, desc) + if ret[0] != None: + if ret[0] == "void": + output.write(" \n") + else: + output.write(" \n" % ( + ret[0], escape(ret[1]))) + self.indexString(name, ret[1]) + for param in params: + if param[0] == 'void': + continue + if param[2] == None: + output.write(" \n" % (param[1], param[0])) + else: + output.write(" \n" % (param[1], param[0], escape(param[2]))) + self.indexString(name, param[2]) + except: + print("Failed to save function %s info: " % name, repr(id.info)) output.write(" \n" % (id.type)) def serialize_exports(self, output, file): module = self.modulename_file(file) - output.write(" \n" % (module)) - dict = self.headers[file] - if dict.info != None: - for data in ('Summary', 'Description', 'Author'): - try: - output.write(" <%s>%s\n" % ( - string.lower(data), - escape(dict.info[data]), - string.lower(data))) - except: - print "Header %s lacks a %s description" % (module, data) - if dict.info.has_key('Description'): - desc = dict.info['Description'] - if string.find(desc, "DEPRECATED") != -1: - output.write(" \n") - - ids = dict.macros.keys() - ids.sort() - for id in uniq(ids): - # Macros are sometime used to masquerade other types. - if dict.functions.has_key(id): - continue - if dict.variables.has_key(id): - continue - if dict.typedefs.has_key(id): - continue - if dict.structs.has_key(id): - continue - if dict.enums.has_key(id): - continue - output.write(" \n" % (id)) - ids = dict.enums.keys() - ids.sort() - for id in uniq(ids): - output.write(" \n" % (id)) - ids = dict.typedefs.keys() - ids.sort() - for id in uniq(ids): - output.write(" \n" % (id)) - ids = dict.structs.keys() - ids.sort() - for id in uniq(ids): - output.write(" \n" % (id)) - ids = dict.variables.keys() - ids.sort() - for id in uniq(ids): - output.write(" \n" % (id)) - ids = dict.functions.keys() - ids.sort() - for id in uniq(ids): - output.write(" \n" % (id)) - output.write(" \n") + output.write(" \n" % (module)) + dict = self.headers[file] + if dict.info != None: + for data in ('Summary', 'Description', 'Author'): + try: + output.write(" <%s>%s\n" % ( + data.lower(), + escape(dict.info[data]), + data.lower())) + except: + print("Header %s lacks a %s description" % (module, data)) + if 'Description' in dict.info: + desc = dict.info['Description'] + if desc.find("DEPRECATED") != -1: + output.write(" \n") + + ids = list(dict.macros.keys()) + ids.sort() + for id in uniq(ids): + # Macros are sometime used to masquerade other types. + if id in dict.functions: + continue + if id in dict.variables: + continue + if id in dict.typedefs: + continue + if id in dict.structs: + continue + if id in dict.enums: + continue + output.write(" \n" % (id)) + ids = list(dict.enums.keys()) + ids.sort() + for id in uniq(ids): + output.write(" \n" % (id)) + ids = list(dict.typedefs.keys()) + ids.sort() + for id in uniq(ids): + output.write(" \n" % (id)) + ids = list(dict.structs.keys()) + ids.sort() + for id in uniq(ids): + output.write(" \n" % (id)) + ids = list(dict.variables.keys()) + ids.sort() + for id in uniq(ids): + output.write(" \n" % (id)) + ids = list(dict.functions.keys()) + ids.sort() + for id in uniq(ids): + output.write(" \n" % (id)) + output.write(" \n") def serialize_xrefs_files(self, output): - headers = self.headers.keys() + headers = list(self.headers.keys()) headers.sort() for file in headers: - module = self.modulename_file(file) - output.write(" \n" % (module)) - dict = self.headers[file] - ids = uniq(dict.functions.keys() + dict.variables.keys() + \ - dict.macros.keys() + dict.typedefs.keys() + \ - dict.structs.keys() + dict.enums.keys()) - ids.sort() - for id in ids: - output.write(" \n" % (id)) - output.write(" \n") + module = self.modulename_file(file) + output.write(" \n" % (module)) + dict = self.headers[file] + ids = uniq(list(dict.functions.keys()) + list(dict.variables.keys()) + \ + list(dict.macros.keys()) + list(dict.typedefs.keys()) + \ + list(dict.structs.keys()) + list(dict.enums.keys())) + ids.sort() + for id in ids: + output.write(" \n" % (id)) + output.write(" \n") pass def serialize_xrefs_functions(self, output): funcs = {} - for name in self.idx.functions.keys(): - id = self.idx.functions[name] - try: - (ret, params, desc) = id.info - for param in params: - if param[0] == 'void': - continue - if funcs.has_key(param[0]): - funcs[param[0]].append(name) - else: - funcs[param[0]] = [name] - except: - pass - typ = funcs.keys() - typ.sort() - for type in typ: - if type == '' or type == 'void' or type == "int" or \ - type == "char *" or type == "const char *" : - continue - output.write(" \n" % (type)) - ids = funcs[type] - ids.sort() - pid = '' # not sure why we have dups, but get rid of them! - for id in ids: - if id != pid: - output.write(" \n" % (id)) - pid = id - output.write(" \n") + for name in list(self.idx.functions.keys()): + id = self.idx.functions[name] + try: + (ret, params, desc) = id.info + for param in params: + if param[0] == 'void': + continue + if param[0] in funcs: + funcs[param[0]].append(name) + else: + funcs[param[0]] = [name] + except: + pass + typ = list(funcs.keys()) + typ.sort() + for type in typ: + if type == '' or type == 'void' or type == "int" or \ + type == "char *" or type == "const char *" : + continue + output.write(" \n" % (type)) + ids = funcs[type] + ids.sort() + pid = '' # not sure why we have dups, but get rid of them! + for id in ids: + if id != pid: + output.write(" \n" % (id)) + pid = id + output.write(" \n") def serialize_xrefs_constructors(self, output): funcs = {} - for name in self.idx.functions.keys(): - id = self.idx.functions[name] - try: - (ret, params, desc) = id.info - if ret[0] == "void": - continue - if funcs.has_key(ret[0]): - funcs[ret[0]].append(name) - else: - funcs[ret[0]] = [name] - except: - pass - typ = funcs.keys() - typ.sort() - for type in typ: - if type == '' or type == 'void' or type == "int" or \ - type == "char *" or type == "const char *" : - continue - output.write(" \n" % (type)) - ids = funcs[type] - ids.sort() - for id in ids: - output.write(" \n" % (id)) - output.write(" \n") + for name in list(self.idx.functions.keys()): + id = self.idx.functions[name] + try: + (ret, params, desc) = id.info + if ret[0] == "void": + continue + if ret[0] in funcs: + funcs[ret[0]].append(name) + else: + funcs[ret[0]] = [name] + except: + pass + typ = list(funcs.keys()) + typ.sort() + for type in typ: + if type == '' or type == 'void' or type == "int" or \ + type == "char *" or type == "const char *" : + continue + output.write(" \n" % (type)) + ids = funcs[type] + ids.sort() + for id in ids: + output.write(" \n" % (id)) + output.write(" \n") def serialize_xrefs_alpha(self, output): - letter = None - ids = self.idx.identifiers.keys() - ids.sort() - for id in ids: - if id[0] != letter: - if letter != None: - output.write(" \n") - letter = id[0] - output.write(" \n" % (letter)) - output.write(" \n" % (id)) - if letter != None: - output.write(" \n") + letter = None + ids = list(self.idx.identifiers.keys()) + ids.sort() + for id in ids: + if id[0] != letter: + if letter != None: + output.write(" \n") + letter = id[0] + output.write(" \n" % (letter)) + output.write(" \n" % (id)) + if letter != None: + output.write(" \n") def serialize_xrefs_references(self, output): - typ = self.idx.identifiers.keys() - typ.sort() - for id in typ: - idf = self.idx.identifiers[id] - module = idf.header - output.write(" \n" % (id, - 'html/' + self.basename + '-' + - self.modulename_file(module) + '.html#' + - id)) + typ = list(self.idx.identifiers.keys()) + typ.sort() + for id in typ: + idf = self.idx.identifiers[id] + module = idf.header + output.write(" \n" % (id, + 'html/' + self.basename + '-' + + self.modulename_file(module) + '.html#' + + id)) def serialize_xrefs_index(self, output): index = self.xref - typ = index.keys() - typ.sort() - letter = None - count = 0 - chunk = 0 - chunks = [] - for id in typ: - if len(index[id]) > 30: - continue - if id[0] != letter: - if letter == None or count > 200: - if letter != None: - output.write(" \n") - output.write(" \n") - count = 0 - chunks.append(["chunk%s" % (chunk -1), first_letter, letter]) - output.write(" \n" % (chunk)) - first_letter = id[0] - chunk = chunk + 1 - elif letter != None: - output.write(" \n") - letter = id[0] - output.write(" \n" % (letter)) - output.write(" \n" % (id)) - tokens = index[id]; - tokens.sort() - tok = None - for token in tokens: - if tok == token: - continue - tok = token - output.write(" \n" % (token)) - count = count + 1 - output.write(" \n") - if letter != None: - output.write(" \n") - output.write(" \n") - if count != 0: - chunks.append(["chunk%s" % (chunk -1), first_letter, letter]) - output.write(" \n") - for ch in chunks: - output.write(" \n" % ( - ch[0], ch[1], ch[2])) - output.write(" \n") + typ = list(index.keys()) + typ.sort() + letter = None + count = 0 + chunk = 0 + chunks = [] + for id in typ: + if len(index[id]) > 30: + continue + if id[0] != letter: + if letter == None or count > 200: + if letter != None: + output.write(" \n") + output.write(" \n") + count = 0 + chunks.append(["chunk%s" % (chunk -1), first_letter, letter]) + output.write(" \n" % (chunk)) + first_letter = id[0] + chunk = chunk + 1 + elif letter != None: + output.write(" \n") + letter = id[0] + output.write(" \n" % (letter)) + output.write(" \n" % (id)) + tokens = index[id]; + tokens.sort() + tok = None + for token in tokens: + if tok == token: + continue + tok = token + output.write(" \n" % (token)) + count = count + 1 + output.write(" \n") + if letter != None: + output.write(" \n") + output.write(" \n") + if count != 0: + chunks.append(["chunk%s" % (chunk -1), first_letter, letter]) + output.write(" \n") + for ch in chunks: + output.write(" \n" % ( + ch[0], ch[1], ch[2])) + output.write(" \n") def serialize_xrefs(self, output): - output.write(" \n") - self.serialize_xrefs_references(output) - output.write(" \n") - output.write(" \n") - self.serialize_xrefs_alpha(output) - output.write(" \n") - output.write(" \n") - self.serialize_xrefs_constructors(output) - output.write(" \n") - output.write(" \n") - self.serialize_xrefs_functions(output) - output.write(" \n") - output.write(" \n") - self.serialize_xrefs_files(output) - output.write(" \n") - output.write(" \n") - self.serialize_xrefs_index(output) - output.write(" \n") + output.write(" \n") + self.serialize_xrefs_references(output) + output.write(" \n") + output.write(" \n") + self.serialize_xrefs_alpha(output) + output.write(" \n") + output.write(" \n") + self.serialize_xrefs_constructors(output) + output.write(" \n") + output.write(" \n") + self.serialize_xrefs_functions(output) + output.write(" \n") + output.write(" \n") + self.serialize_xrefs_files(output) + output.write(" \n") + output.write(" \n") + self.serialize_xrefs_index(output) + output.write(" \n") def serialize(self): filename = "%s-api.xml" % self.name - print "Saving XML description %s" % (filename) + print("Saving XML description %s" % (filename)) output = open(filename, "w") output.write('\n') output.write("\n" % self.name) output.write(" \n") - headers = self.headers.keys() + headers = list(self.headers.keys()) headers.sort() for file in headers: self.serialize_exports(output, file) output.write(" \n") output.write(" \n") - macros = self.idx.macros.keys() + macros = list(self.idx.macros.keys()) macros.sort() for macro in macros: self.serialize_macro(output, macro) - enums = self.idx.enums.keys() + enums = list(self.idx.enums.keys()) enums.sort() for enum in enums: self.serialize_enum(output, enum) - typedefs = self.idx.typedefs.keys() + typedefs = list(self.idx.typedefs.keys()) typedefs.sort() for typedef in typedefs: self.serialize_typedef(output, typedef) - variables = self.idx.variables.keys() + variables = list(self.idx.variables.keys()) variables.sort() for variable in variables: self.serialize_variable(output, variable) - functions = self.idx.functions.keys() + functions = list(self.idx.functions.keys()) functions.sort() for function in functions: self.serialize_function(output, function) @@ -2093,7 +2099,7 @@ class docBuilder: output.close() filename = "%s-refs.xml" % self.name - print "Saving XML Cross References %s" % (filename) + print("Saving XML Cross References %s" % (filename)) output = open(filename, "w") output.write('\n') output.write("\n" % self.name) @@ -2105,28 +2111,28 @@ class docBuilder: def rebuild(): builder = None if glob.glob("parser.c") != [] : - print "Rebuilding API description for libxml2" - builder = docBuilder("libxml2", [".", "."], - ["xmlwin32version.h", "tst.c"]) + print("Rebuilding API description for libxml2") + builder = docBuilder("libxml2", [".", "."], + ["xmlwin32version.h", "tst.c"]) elif glob.glob("../parser.c") != [] : - print "Rebuilding API description for libxml2" - builder = docBuilder("libxml2", ["..", "../include/libxml"], - ["xmlwin32version.h", "tst.c"]) + print("Rebuilding API description for libxml2") + builder = docBuilder("libxml2", ["..", "../include/libxml"], + ["xmlwin32version.h", "tst.c"]) elif glob.glob("../libxslt/transform.c") != [] : - print "Rebuilding API description for libxslt" - builder = docBuilder("libxslt", ["../libxslt"], - ["win32config.h", "libxslt.h", "tst.c"]) + print("Rebuilding API description for libxslt") + builder = docBuilder("libxslt", ["../libxslt"], + ["win32config.h", "libxslt.h", "tst.c"]) else: - print "rebuild() failed, unable to guess the module" - return None + print("rebuild() failed, unable to guess the module") + return None builder.scan() builder.analyze() builder.serialize() if glob.glob("../libexslt/exslt.c") != [] : extra = docBuilder("libexslt", ["../libexslt"], ["libexslt.h"]) - extra.scan() - extra.analyze() - extra.serialize() + extra.scan() + extra.analyze() + extra.serialize() return builder # @@ -2142,4 +2148,4 @@ if __name__ == "__main__": debug = 1 parse(sys.argv[1]) else: - rebuild() + rebuild() diff --git a/doc/devhelp/Makefile.am b/doc/devhelp/Makefile.am index 36852f9..dad7975 100644 --- a/doc/devhelp/Makefile.am +++ b/doc/devhelp/Makefile.am @@ -1,5 +1,15 @@ -DEVHELP_DIR=$(datadir)/gtk-doc/html/libxml2 -HTML_FILES=index.html general.html $(HTML_MODULES) +devhelpdir = $(datadir)/gtk-doc/html/libxml2 + +dist_devhelp_DATA = \ + libxml2.devhelp \ + $(HTML_FILES) \ + $(EXTRA_FORMAT) + +HTML_FILES = \ + general.html \ + index.html \ + $(HTML_MODULES) + HTML_MODULES= \ libxml2-c14n.html \ libxml2-catalog.html \ @@ -56,18 +66,14 @@ EXTRA_FORMAT= \ up.png \ style.css -EXTRA_DIST=devhelp.xsl html.xsl libxml2.devhelp $(HTML_FILES) $(EXTRA_FORMAT) +EXTRA_DIST = devhelp.xsl html.xsl -all: libxml2.devhelp $(HTML_FILES) +if REBUILD_DOCS +rebuild: libxml2.devhelp $(HTML_FILES) +.PHONY: rebuild libxml2.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/doc/libxml2-api.xml - -@(echo Rebuilding devhelp files) -@(if [ -x $(XSLTPROC) ] ; then \ - $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi ); - -install-data-local: - -@MKDIR_P@ $(DESTDIR)$(DEVHELP_DIR) - -@INSTALL@ -m 0644 $(srcdir)/libxml2.devhelp $(DESTDIR)$(DEVHELP_DIR) - -@INSTALL@ -m 0644 $(EXTRA_FORMAT:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR) - -@INSTALL@ -m 0644 $(HTML_FILES:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR) - + echo Rebuilding devhelp files ; \ + $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp $(srcdir)/devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi ); +endif diff --git a/doc/devhelp/Makefile.in b/doc/devhelp/Makefile.in index 2c87ff3..5d09d76 100644 --- a/doc/devhelp/Makefile.in +++ b/doc/devhelp/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,7 +14,25 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,7 +52,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc/devhelp -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(dist_devhelp_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -46,20 +65,53 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(devhelpdir)" +DATA = $(dist_devhelp_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -96,6 +148,7 @@ HTML_DIR = @HTML_DIR@ HTML_OBJ = @HTML_OBJ@ HTTP_OBJ = @HTTP_OBJ@ ICONV_LIBS = @ICONV_LIBS@ +ICU_LIBS = @ICU_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -151,7 +204,6 @@ RANLIB = @RANLIB@ RDL_LIBS = @RDL_LIBS@ READER_TEST = @READER_TEST@ RELDATE = @RELDATE@ -RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -176,7 +228,6 @@ TEST_VTIME = @TEST_VTIME@ TEST_XINCLUDE = @TEST_XINCLUDE@ TEST_XPATH = @TEST_XPATH@ TEST_XPTR = @TEST_XPTR@ -THREADS_W32 = @THREADS_W32@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ VERSION = @VERSION@ @@ -209,6 +260,7 @@ WITH_SAX1 = @WITH_SAX1@ WITH_SCHEMAS = @WITH_SCHEMAS@ WITH_SCHEMATRON = @WITH_SCHEMATRON@ WITH_THREADS = @WITH_THREADS@ +WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@ WITH_TREE = @WITH_TREE@ WITH_TRIO = @WITH_TRIO@ WITH_VALID = @WITH_VALID@ @@ -282,8 +334,17 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -DEVHELP_DIR = $(datadir)/gtk-doc/html/libxml2 -HTML_FILES = index.html general.html $(HTML_MODULES) +devhelpdir = $(datadir)/gtk-doc/html/libxml2 +dist_devhelp_DATA = \ + libxml2.devhelp \ + $(HTML_FILES) \ + $(EXTRA_FORMAT) + +HTML_FILES = \ + general.html \ + index.html \ + $(HTML_MODULES) + HTML_MODULES = \ libxml2-c14n.html \ libxml2-catalog.html \ @@ -340,7 +401,7 @@ EXTRA_FORMAT = \ up.png \ style.css -EXTRA_DIST = devhelp.xsl html.xsl libxml2.devhelp $(HTML_FILES) $(EXTRA_FORMAT) +EXTRA_DIST = devhelp.xsl html.xsl all: all-am .SUFFIXES: @@ -380,6 +441,27 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +install-dist_devhelpDATA: $(dist_devhelp_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_devhelp_DATA)'; test -n "$(devhelpdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(devhelpdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(devhelpdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(devhelpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(devhelpdir)" || exit $$?; \ + done + +uninstall-dist_devhelpDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_devhelp_DATA)'; test -n "$(devhelpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(devhelpdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -419,8 +501,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(DATA) installdirs: + for dir in "$(DESTDIR)$(devhelpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -431,10 +516,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -466,7 +556,7 @@ info: info-am info-am: -install-data-am: install-data-local +install-data-am: install-dist_devhelpDATA install-dvi: install-dvi-am @@ -510,35 +600,30 @@ ps: ps-am ps-am: -uninstall-am: +uninstall-am: uninstall-dist_devhelpDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am - - -all: libxml2.devhelp $(HTML_FILES) - -libxml2.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/doc/libxml2-api.xml - -@(echo Rebuilding devhelp files) - -@(if [ -x $(XSLTPROC) ] ; then \ - $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi ); - -install-data-local: - -@MKDIR_P@ $(DESTDIR)$(DEVHELP_DIR) - -@INSTALL@ -m 0644 $(srcdir)/libxml2.devhelp $(DESTDIR)$(DEVHELP_DIR) - -@INSTALL@ -m 0644 $(EXTRA_FORMAT:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR) - -@INSTALL@ -m 0644 $(HTML_FILES:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR) + install-data install-data-am install-dist_devhelpDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-dist_devhelpDATA + + +@REBUILD_DOCS_TRUE@rebuild: libxml2.devhelp $(HTML_FILES) +@REBUILD_DOCS_TRUE@.PHONY: rebuild + +@REBUILD_DOCS_TRUE@libxml2.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/doc/libxml2-api.xml +@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \ +@REBUILD_DOCS_TRUE@ echo Rebuilding devhelp files ; \ +@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp $(srcdir)/devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi ); # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/doc/devhelp/general.html b/doc/devhelp/general.html index 6122ffe..68f9380 100644 --- a/doc/devhelp/general.html +++ b/doc/devhelp/general.html @@ -33,6 +33,6 @@

libxml2 API Modules

-

DOCBparser - old DocBook SGML parser
HTMLparser - interface for an HTML 4.0 non-verifying parser
HTMLtree - specific APIs to process HTML tree, especially serialization
SAX - Old SAX version 1 handler, deprecated
SAX2 - SAX2 parser interface used to build the DOM tree
c14n - Provide Canonical XML and Exclusive XML Canonicalization
catalog - interfaces to the Catalog handling system
chvalid - Unicode character range checking
debugXML - Tree debugging APIs
dict - string dictionnary
encoding - interface for the encoding conversion functions
entities - interface for the XML entities handling
globals - interface for all global variables of the library
hash - Chained hash tables
list - lists interfaces
nanoftp - minimal FTP implementation
nanohttp - minimal HTTP implementation
parser - the core parser module
parserInternals - internals routines exported by the parser.
pattern - pattern expression handling
relaxng - implementation of the Relax-NG validation
schemasInternals - internal interfaces for XML Schemas
schematron - XML Schemastron implementation
threads - interfaces for thread handling
tree - interfaces for tree manipulation
uri - library of generic URI related routines
valid - The DTD validation
xinclude - implementation of XInclude
xlink - unfinished XLink detection module
xmlIO - interface for the I/O interfaces used by the parser
xmlautomata - API to build regexp automata
xmlerror - error handling
xmlexports - macros for marking symbols as exportable/importable.
xmlmemory - interface for the memory allocator
xmlmodule - dynamic module loading
xmlreader - the XMLReader implementation
xmlregexp - regular expressions handling
xmlsave - the XML document serializer
xmlschemas - incomplete XML Schemas structure implementation
xmlschemastypes - implementation of XML Schema Datatypes
xmlstring - set of routines to process strings
xmlunicode - Unicode character APIs
xmlversion - compile-time version informations
xmlwriter - text writing API for XML
xpath - XML Path Language implementation
xpathInternals - internal interfaces for XML Path Language implementation
xpointer - API to handle XML Pointers

+

DOCBparser - old DocBook SGML parser
HTMLparser - interface for an HTML 4.0 non-verifying parser
HTMLtree - specific APIs to process HTML tree, especially serialization
SAX - Old SAX version 1 handler, deprecated
SAX2 - SAX2 parser interface used to build the DOM tree
c14n - Provide Canonical XML and Exclusive XML Canonicalization
catalog - interfaces to the Catalog handling system
chvalid - Unicode character range checking
debugXML - Tree debugging APIs
dict - string dictionnary
encoding - interface for the encoding conversion functions
entities - interface for the XML entities handling
globals - interface for all global variables of the library
hash - Chained hash tables
list - lists interfaces
nanoftp - minimal FTP implementation
nanohttp - minimal HTTP implementation
parser - the core parser module
parserInternals - internals routines and limits exported by the parser.
pattern - pattern expression handling
relaxng - implementation of the Relax-NG validation
schemasInternals - internal interfaces for XML Schemas
schematron - XML Schemastron implementation
threads - interfaces for thread handling
tree - interfaces for tree manipulation
uri - library of generic URI related routines
valid - The DTD validation
xinclude - implementation of XInclude
xlink - unfinished XLink detection module
xmlIO - interface for the I/O interfaces used by the parser
xmlautomata - API to build regexp automata
xmlerror - error handling
xmlexports - macros for marking symbols as exportable/importable.
xmlmemory - interface for the memory allocator
xmlmodule - dynamic module loading
xmlreader - the XMLReader implementation
xmlregexp - regular expressions handling
xmlsave - the XML document serializer
xmlschemas - incomplete XML Schemas structure implementation
xmlschemastypes - implementation of XML Schema Datatypes
xmlstring - set of routines to process strings
xmlunicode - Unicode character APIs
xmlversion - compile-time version informations
xmlwriter - text writing API for XML
xpath - XML Path Language implementation
xpathInternals - internal interfaces for XML Path Language implementation
xpointer - API to handle XML Pointers

diff --git a/doc/devhelp/libxml2-dict.html b/doc/devhelp/libxml2-dict.html index 818121d..fd5f6b9 100644 --- a/doc/devhelp/libxml2-dict.html +++ b/doc/devhelp/libxml2-dict.html @@ -45,10 +45,12 @@

Synopsis

typedef struct _xmlDict xmlDict;
 typedef xmlDict * xmlDictPtr;
+size_t	xmlDictGetUsage			(xmlDictPtr dict);
 int	xmlDictReference		(xmlDictPtr dict);
 void	xmlDictCleanup			(void);
 int	xmlDictSize			(xmlDictPtr dict);
 const xmlChar *	xmlDictExists		(xmlDictPtr dict, 
const xmlChar * name,
int len); +size_t xmlDictSetLimit (xmlDictPtr dict,
size_t limit); int xmlDictOwns (xmlDictPtr dict,
const xmlChar * str); const xmlChar * xmlDictQLookup (xmlDictPtr dict,
const xmlChar * prefix,
const xmlChar * name); int xmlInitializeDict (void); @@ -94,6 +96,10 @@ The content of this structure is not made public by the API.

Free the hash @dict and its contents. The userdata is deallocated with @f if provided.

dict:the dictionnary

+

xmlDictGetUsage ()

size_t	xmlDictGetUsage			(xmlDictPtr dict)
+

Get how much memory is used by a dictionary for strings Added in 2.9.0

+
dict:the dictionnary
Returns:the amount of strings allocated
+

xmlDictLookup ()

const xmlChar *	xmlDictLookup		(xmlDictPtr dict, 
const xmlChar * name,
int len)

Add the @name to the dictionnary @dict if not present.

dict:the dictionnary
name:the name of the userdata
len:the length of the name, if -1 it is recomputed
Returns:the internal copy of the name or NULL in case of internal error
@@ -110,12 +116,16 @@ The content of this structure is not made public by the API.

Increment the reference counter of a dictionary

dict:the dictionnary
Returns:0 in case of success and -1 in case of error

+

xmlDictSetLimit ()

size_t	xmlDictSetLimit			(xmlDictPtr dict, 
size_t limit)
+

Set a size limit for the dictionary Added in 2.9.0

+
dict:the dictionnary
limit:the limit in bytes
Returns:the previous limit of the dictionary or 0
+

xmlDictSize ()

int	xmlDictSize			(xmlDictPtr dict)

Query the number of elements installed in the hash @dict.

dict:the dictionnary
Returns:the number of elements in the dictionnary or -1 in case of error


diff --git a/doc/devhelp/libxml2-parser.html b/doc/devhelp/libxml2-parser.html index 6c66e5f..357c14a 100644 --- a/doc/devhelp/libxml2-parser.html +++ b/doc/devhelp/libxml2-parser.html @@ -309,7 +309,8 @@ void
xmlSetExternalEntityLoader (XML_PARSE_NOBASEFIX = 262144 /* do not fixup XINCLUDE xml:base uris */ XML_PARSE_HUGE = 524288 /* relax any hardcoded limit from the parser */ XML_PARSE_OLDSAX = 1048576 /* parse using SAX2 interface before 2.7.0 */ - XML_PARSE_IGNORE_ENC = 2097152 /* ignore internal document encoding hint */ + XML_PARSE_IGNORE_ENC = 2097152 /* ignore internal document encoding hint */ + XML_PARSE_BIG_LINES = 4194304 /* Store big lines numbers in text PSVI field */ };

@@ -661,11 +662,11 @@ void xmlSetExternalEntityLoader (

xmlParserInputGrow ()

int	xmlParserInputGrow		(xmlParserInputPtr in, 
int len)

This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data

-
in:an XML parser input
len:an indicative size for the lookahead
Returns:the number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity
+
in:an XML parser input
len:an indicative size for the lookahead
Returns:the amount of char read, or -1 in case of error, 0 indicate the end of this entity

xmlParserInputRead ()

int	xmlParserInputRead		(xmlParserInputPtr in, 
int len)
-

This function refresh the input for the parser. It doesn't try to preserve pointers to the input buffer, and discard already read data

-
in:an XML parser input
len:an indicative size for the lookahead
Returns:the number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity
+

This function was internal and is deprecated.

+
in:an XML parser input
len:an indicative size for the lookahead
Returns:-1 as this is an error to use it.


+

Macro XML_MAX_DICTIONARY_LIMIT

#define XML_MAX_DICTIONARY_LIMIT;
+

Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0

+
+
+

Macro XML_MAX_LOOKUP_LIMIT

#define XML_MAX_LOOKUP_LIMIT;
+

Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on "unfriendly' content Introduced in 2.9.0

+
+

Macro XML_MAX_NAMELEN

#define XML_MAX_NAMELEN;
 

Identifiers can be longer, but this will be more costly at runtime.


+

Macro XML_MAX_NAME_LENGTH

#define XML_MAX_NAME_LENGTH;
+

Maximum size allowed for a markup identitier This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of "unfriendly' content Introduced in 2.9.0

+
+

Macro XML_MAX_TEXT_LENGTH

#define XML_MAX_TEXT_LENGTH;
-

Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it.

+

Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0


Macro XML_SUBSTITUTE_BOTH

#define XML_SUBSTITUTE_BOTH;
diff --git a/doc/devhelp/libxml2-relaxng.html b/doc/devhelp/libxml2-relaxng.html
index a89b58f..23905d0 100644
--- a/doc/devhelp/libxml2-relaxng.html
+++ b/doc/devhelp/libxml2-relaxng.html
@@ -262,7 +262,7 @@ The content of this structure is not made public by the API.
         

xmlRelaxNGValidatePushCData ()

int	xmlRelaxNGValidatePushCData	(xmlRelaxNGValidCtxtPtr ctxt, 
const xmlChar * data,
int len)

check the CData parsed for validation in the current stack

-
ctxt:the RelaxNG validation context
data:some character data read
len:the lenght of the data
Returns:1 if no validation problem was found or -1 otherwise
+
ctxt:the RelaxNG validation context
data:some character data read
len:the length of the data
Returns:1 if no validation problem was found or -1 otherwise

xmlRelaxNGValidatePushElement ()

int	xmlRelaxNGValidatePushElement	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)

Push a new element start on the RelaxNG validation stack.

diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html index af1f654..90c3903 100644 --- a/doc/devhelp/libxml2-tree.html +++ b/doc/devhelp/libxml2-tree.html @@ -44,15 +44,16 @@

Synopsis

#define XML_LOCAL_NAMESPACE;
-#define XML_XML_NAMESPACE;
+#define BASE_BUFFER_SIZE;
 #define XML_XML_ID;
 #define xmlRootNode;
 #define XML_GET_LINE;
 #define XML_GET_CONTENT;
 #define xmlChildrenNode;
-#define BASE_BUFFER_SIZE;
+#define XML_XML_NAMESPACE;
+#define LIBXML2_NEW_BUFFER;
 typedef struct _xmlNs xmlNs;
-typedef xmlBuffer * xmlBufferPtr;
+typedef struct _xmlElementContent xmlElementContent;
 typedef xmlEnumeration * xmlEnumerationPtr;
 typedef struct _xmlBuffer xmlBuffer;
 typedef xmlParserInput * xmlParserInputPtr;
@@ -63,7 +64,7 @@ typedef xmlElementType xmlBufferAllocationScheme;
 typedef struct _xmlNode xmlNode;
 typedef xmlDoc * xmlDocPtr;
-typedef struct _xmlElementContent xmlElementContent;
+typedef xmlBuffer * xmlBufferPtr;
 typedef xmlDOMWrapCtxt * xmlDOMWrapCtxtPtr;
 typedef xmlRef * xmlRefPtr;
 typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
@@ -73,6 +74,7 @@ typedef xmlNode * 
 typedef struct _xmlParserCtxt xmlParserCtxt;
 typedef xmlDtd * xmlDtdPtr;
 typedef enum xmlAttributeDefault;
+typedef struct _xmlBuf xmlBuf;
 typedef struct _xmlNotation xmlNotation;
 typedef enum xmlElementType;
 typedef struct _xmlEntity xmlEntity;
@@ -81,6 +83,7 @@ typedef xmlAttribute * xmlElementTypeVal;
 typedef xmlNotation * xmlNotationPtr;
 typedef xmlElement * xmlElementPtr;
+typedef xmlBuf * xmlBufPtr;
 typedef enum xmlElementContentOccur;
 typedef xmlAttr * xmlAttrPtr;
 typedef struct _xmlDoc xmlDoc;
@@ -104,8 +107,9 @@ typedef xmlOutputBuffer * xmlSAXHandler * xmlSAXHandlerPtr;
 xmlNodePtr	xmlDocCopyNode		(const xmlNodePtr node, 
xmlDocPtr doc,
int extended); xmlNodePtr xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); -xmlChar * xmlGetProp (xmlNodePtr node,
const xmlChar * name); +xmlChar * xmlBufContent (const xmlBufPtr buf); xmlAttrPtr xmlNewNsPropEatName (xmlNodePtr node,
xmlNsPtr ns,
xmlChar * name,
const xmlChar * value); +xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar * value); xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar * content,
int len); void xmlBufferWriteCHAR (xmlBufferPtr buf,
const xmlChar * string); xmlChar * xmlNodeGetBase (xmlDocPtr doc,
xmlNodePtr cur); @@ -117,15 +121,16 @@ int xmlSaveFormatFileEnc (const char * file xmlBufferPtr xmlBufferCreate (void); xmlNodePtr xmlNewDocFragment (xmlDocPtr doc); xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc); -xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar * value); +xmlChar * xmlGetProp (xmlNodePtr node,
const xmlChar * name); int xmlValidateName (const xmlChar * value,
int space); -void xmlSetBufferAllocationScheme (xmlBufferAllocationScheme scheme); +xmlChar * xmlBufEnd (const xmlBufPtr buf); int xmlValidateQName (const xmlChar * value,
int space); xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * nameSpace); xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem); int xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar * str,
int len); xmlNodePtr xmlNewPI (const xmlChar * name,
const xmlChar * content); void xmlDocDumpFormatMemoryEnc (xmlDocPtr out_doc,
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding,
int format); +xmlAttrPtr xmlSetProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * value); unsigned long xmlChildElementCount (xmlNodePtr parent); void xmlElemDump (FILE * f,
xmlDocPtr doc,
xmlNodePtr cur); int xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char * encoding,
int format); @@ -171,6 +176,7 @@ int xmlBufferDump (FILE * file,
xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
int recursive); xmlDOMWrapCtxtPtr xmlDOMWrapNewCtxt (void); void xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding); +int xmlBufGetNodeContent (xmlBufPtr buf,
xmlNodePtr cur); xmlNodePtr xmlTextMerge (xmlNodePtr first,
xmlNodePtr second); void xmlDocDumpMemory (xmlDocPtr cur,
xmlChar ** mem,
int * size); xmlNodePtr xmlNewDocPI (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * content); @@ -194,6 +200,7 @@ void xmlSetDocCompressMode (xmlUnlinkNode (xmlNodePtr cur); const xmlChar * xmlSplitQName3 (const xmlChar * name,
int * len); typedef xmlNsPtr xmlDOMWrapAcquireNsFunction (xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr node,
const xmlChar * nsName,
const xmlChar * nsPrefix); +size_t xmlBufUse (const xmlBufPtr buf); xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root); long xmlGetLineNo (xmlNodePtr node); const xmlChar * xmlBufferContent (const xmlBufferPtr buf); @@ -201,6 +208,7 @@ int xmlRemoveProp (xmlNodePtr xmlLastElementChild (xmlNodePtr parent); xmlChar * xmlNodeGetLang (xmlNodePtr cur); int xmlGetDocCompressMode (xmlDocPtr doc); +size_t xmlBufNodeDump (xmlBufPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format); xmlChar * xmlGetNsProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * nameSpace); xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * value); void xmlFreeNode (xmlNodePtr cur); @@ -245,12 +253,13 @@ int xmlBufferCCat (xmlNsPtr * xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node); int xmlBufferGrow (xmlBufferPtr buf,
unsigned int len); int xmlNodeIsText (xmlNodePtr node); -xmlAttrPtr xmlSetProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * value); +void xmlSetBufferAllocationScheme (xmlBufferAllocationScheme scheme); int xmlIsXHTML (const xmlChar * systemID,
const xmlChar * publicID); void xmlNodeSetLang (xmlNodePtr cur,
const xmlChar * lang); void xmlFreeDtd (xmlDtdPtr cur); void xmlFreeNodeList (xmlNodePtr cur); void xmlFreeDoc (xmlDocPtr cur); +size_t xmlBufShrink (xmlBufPtr buf,
size_t len); xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); int xmlSaveFileEnc (const char * filename,
xmlDocPtr cur,
const char * encoding); xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * value); @@ -273,6 +282,10 @@ void xmlFreeNsList (

Macro LIBXML2_NEW_BUFFER

#define LIBXML2_NEW_BUFFER;
+

Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0.

+
+

Macro XML_GET_CONTENT

#define XML_GET_CONTENT;
 

Macro to extract the content pointer of a node.

@@ -371,6 +384,16 @@ void xmlFreeNsList (

Structure xmlBuf

struct _xmlBuf {
+The content of this structure is not made public by the API.
+} xmlBuf;
+

+

+
+

Typedef xmlBufPtr

xmlBuf * xmlBufPtr;
+

A pointer to a buffer structure, the actual structure internals are not public

+
+

Structure xmlBuffer

struct _xmlBuffer {
     xmlChar *	content	: The buffer content UTF8
     unsigned int	use	: The buffer size used
@@ -688,8 +711,8 @@ void	xmlFreeNsList			(xmlOutputWriteCallback	writecallback
     xmlOutputCloseCallback	closecallback
     xmlCharEncodingHandlerPtr	encoder	: I18N conversions to UTF-8
-    xmlBufferPtr	buffer	: Local buffer encoded in UTF-8 or ISOLatin
-    xmlBufferPtr	conv	: if encoder != NULL buffer for output
+    xmlBufPtr	buffer	: Local buffer encoded in UTF-8 or ISOLatin
+    xmlBufPtr	conv	: if encoder != NULL buffer for output
     int	written	: total number of byte written
     int	error
 } xmlOutputBuffer;
@@ -789,6 +812,7 @@ void	xmlFreeNsList			(xmlParserNodeInfo *	nodeInfoTab	: array of nodeInfos
     int	input_id	: we need to label inputs
+    unsigned long	sizeentcopy	: volume of entity copy
 } xmlParserCtxt;
 

@@ -822,8 +846,8 @@ void xmlFreeNsList (xmlInputReadCallback readcallback xmlInputCloseCallback closecallback xmlCharEncodingHandlerPtr encoder : I18N conversions to UTF-8 - xmlBufferPtr buffer : Local buffer encoded in UTF-8 - xmlBufferPtr raw : if encoder != NULL buffer for raw input + xmlBufPtr buffer : Local buffer encoded in UTF-8 + xmlBufPtr raw : if encoder != NULL buffer for raw input int compressed : -1=unknown, 0=not compressed, 1=compressed int error unsigned long rawconsumed : amount consumed from raw @@ -935,6 +959,30 @@ void xmlFreeNsList (attribute values to an xml simple buffer

buf:the XML buffer output
doc:the document
attr:the attribute node
string:the text content

+

xmlBufContent ()

xmlChar *	xmlBufContent		(const xmlBufPtr buf)
+

Function to extract the content of a buffer

+
buf:the buffer
Returns:the internal content
+
+

xmlBufEnd ()

xmlChar *	xmlBufEnd		(const xmlBufPtr buf)
+

Function to extract the end of the content of a buffer

+
buf:the buffer
Returns:the end of the internal content or NULL in case of error
+
+

xmlBufGetNodeContent ()

int	xmlBufGetNodeContent		(xmlBufPtr buf, 
xmlNodePtr cur)
+

Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value

+
buf:a buffer xmlBufPtr
cur:the node being read
Returns:0 in case of success and -1 in case of error.
+
+

xmlBufNodeDump ()

size_t	xmlBufNodeDump			(xmlBufPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)
+

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

+
buf:the XML buffer output
doc:the document
cur:the current node
level:the imbrication level for indenting
format:is formatting allowed
Returns:the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error
+
+

xmlBufShrink ()

size_t	xmlBufShrink			(xmlBufPtr buf, 
size_t len)
+

Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.

+
buf:the buffer to dump
len:the number of xmlChar to remove
Returns:the number of byte removed or 0 in case of failure
+
+

xmlBufUse ()

size_t	xmlBufUse			(const xmlBufPtr buf)
+

Function to get the length of a buffer

+
buf:the buffer
Returns:the length of data in the internal content
+

xmlBufferAdd ()

int	xmlBufferAdd			(xmlBufferPtr buf, 
const xmlChar * str,
int len)

Add a string range to an XML buffer. if len == -1, the length of str is recomputed.

buf:the buffer to dump
str:the #xmlChar string
len:the number of #xmlChar to add
Returns:0 successful, a positive error code number otherwise and -1 in case of internal or API error.
@@ -1184,7 +1232,7 @@ void xmlFreeNsList (
parent:the parent node
Returns:the last child or NULL if none.

xmlGetLineNo ()

long	xmlGetLineNo			(xmlNodePtr node)
-

Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)

+

Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used

node:valid node
Returns:the line number if successful, -1 otherwise


xmlNodeDump ()

int	xmlNodeDump			(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)
-

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

+

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.

buf:the XML buffer output
doc:the document
cur:the current node
level:the imbrication level for indenting
format:is formatting allowed
Returns:the number of bytes written to the buffer or -1 in case of error

xmlNodeDumpOutput ()

void	xmlNodeDumpOutput		(xmlOutputBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char * encoding)
@@ -1497,7 +1545,7 @@ void xmlFreeNsList (

xmlSplitQName3 ()

const xmlChar *	xmlSplitQName3		(const xmlChar * name, 
int * len)

parse an XML qualified name string,i

-
name:the full QName
len:an int *
Returns:NULL if it is not a Qualified Name, otherwise, update len with the lenght in byte of the prefix and return a pointer to the start of the name without the prefix
+
name:the full QName
len:an int *
Returns:NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix

xmlStringGetNodeList ()

xmlNodePtr	xmlStringGetNodeList	(xmlDocPtr doc, 
const xmlChar * value)

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

@@ -1516,7 +1564,7 @@ void xmlFreeNsList (
first:the first text node
second:the second text node being merged
Returns:the first text node augmented

xmlUnlinkNode ()

void	xmlUnlinkNode			(xmlNodePtr cur)
-

Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it.

+

Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.

cur:the node

xmlUnsetNsProp ()

int	xmlUnsetNsProp			(xmlNodePtr node, 
xmlNsPtr ns,
const xmlChar * name)
diff --git a/doc/devhelp/libxml2-valid.html b/doc/devhelp/libxml2-valid.html index 3480214..fcb68e7 100644 --- a/doc/devhelp/libxml2-valid.html +++ b/doc/devhelp/libxml2-valid.html @@ -512,7 +512,7 @@ The content of this structure is not made public by the API.

xmlValidatePushCData ()

int	xmlValidatePushCData		(xmlValidCtxtPtr ctxt, 
const xmlChar * data,
int len)

check the CData parsed for validation in the current stack

-
ctxt:the validation context
data:some character data read
len:the lenght of the data
Returns:1 if no validation problem was found or 0 otherwise
+
ctxt:the validation context
data:some character data read
len:the length of the data
Returns:1 if no validation problem was found or 0 otherwise

xmlValidatePushElement ()

int	xmlValidatePushElement		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * qname)

Push a new element start on the validation stack.

diff --git a/doc/devhelp/libxml2-xmlIO.html b/doc/devhelp/libxml2-xmlIO.html index 8c41d1d..5bccc27 100644 --- a/doc/devhelp/libxml2-xmlIO.html +++ b/doc/devhelp/libxml2-xmlIO.html @@ -82,9 +82,11 @@ void * xmlIOHTTPOpen (const char * filename); xmlChar * xmlNormalizeWindowsPath (const xmlChar * path); typedef int xmlInputReadCallback (void * context,
char * buffer,
int len); xmlParserInputBufferPtr xmlParserInputBufferCreateStatic (const char * mem,
int size,
xmlCharEncoding enc); +const xmlChar * xmlOutputBufferGetContent (xmlOutputBufferPtr out); int xmlIOHTTPClose (void * context); int xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar * str,
xmlCharEncodingOutputFunc escaping); xmlOutputBufferPtr xmlOutputBufferCreateFilename (const char * URI,
xmlCharEncodingHandlerPtr encoder,
int compression); +size_t xmlOutputBufferGetSize (xmlOutputBufferPtr out); void xmlCleanupOutputCallbacks (void); typedef void * xmlInputOpenCallback (char const * filename); int xmlParserInputBufferRead (xmlParserInputBufferPtr in,
int len); @@ -255,6 +257,14 @@ void * xmlIOHTTPOpenW (const char * post_uri,

flushes the output I/O channel

out:a buffered output
Returns:the number of byte written or -1 in case of error.

+

xmlOutputBufferGetContent ()

const xmlChar *	xmlOutputBufferGetContent	(xmlOutputBufferPtr out)
+

Gives a pointer to the data currently held in the output buffer

+
out:an xmlOutputBufferPtr
Returns:a pointer to the data or NULL in case of error
+
+

xmlOutputBufferGetSize ()

size_t	xmlOutputBufferGetSize		(xmlOutputBufferPtr out)
+

Gives the length of the data currently held in the output buffer

+
out:an xmlOutputBufferPtr
Returns:0 in case or error or no data is held, the size otherwise
+

xmlOutputBufferWrite ()

int	xmlOutputBufferWrite		(xmlOutputBufferPtr out, 
int len,
const char * buf)

Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

out:a buffered parser output
len:the size in bytes of the array.
buf:an char array
Returns:the number of chars immediately written, or -1 in case of error.
diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html index cf445dd..27f7836 100644 --- a/doc/devhelp/libxml2-xmlerror.html +++ b/doc/devhelp/libxml2-xmlerror.html @@ -120,7 +120,9 @@ void xmlResetError (XML_FROM_WRITER = 25 /* The xmlwriter module */ XML_FROM_MODULE = 26 /* The dynamically loaded module modul */ XML_FROM_I18N = 27 /* The module handling character conversion */ - XML_FROM_SCHEMATRONV = 28 /* The Schematron validator module */ + XML_FROM_SCHEMATRONV = 28 /* The Schematron validator module */ + XML_FROM_BUFFER = 29 /* The buffers module */ + XML_FROM_URI = 30 /* The URI module */ };

@@ -249,6 +251,8 @@ void xmlResetError (XML_WAR_ENTITY_REDEFINED = 107 /* 107 */ XML_ERR_UNKNOWN_VERSION = 108 /* 108 */ XML_ERR_VERSION_MISMATCH = 109 /* 109 */ + XML_ERR_NAME_TOO_LONG = 110 /* 110 */ + XML_ERR_USER_STOP = 111 /* 111 */ XML_NS_ERR_XML_NAMESPACE = 200 XML_NS_ERR_UNDEFINED_NAMESPACE = 201 /* 201 */ XML_NS_ERR_QNAME = 202 /* 202 */ @@ -870,8 +874,7 @@ void xmlResetError (XML_I18N_EXCESS_HANDLER = 6002 /* 6002 */ XML_I18N_CONV_FAILED = 6003 /* 6003 */ XML_I18N_NO_OUTPUT = 6004 /* 6004 */ - XML_CHECK_ = 6005 /* 5033 */ - XML_CHECK_X = 6006 /* 503 */ + XML_BUF_OVERFLOW = 7000 };

diff --git a/doc/devhelp/libxml2-xmlmodule.html b/doc/devhelp/libxml2-xmlmodule.html index 554cd91..08bb4ef 100644 --- a/doc/devhelp/libxml2-xmlmodule.html +++ b/doc/devhelp/libxml2-xmlmodule.html @@ -84,11 +84,11 @@ The content of this structure is not made public by the API.

module:the module handle
Returns:0 in case of success, -1 in case of argument error

xmlModuleOpen ()

xmlModulePtr	xmlModuleOpen		(const char * name, 
int options)
-

Opens a module/shared library given its name or path TODO: options are not yet implemented.

+

Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * . TODO: options are not yet implemented.

name:the module name
options:a set of xmlModuleOption
Returns:a handle for the module or NULL in case of error

xmlModuleSymbol ()

int	xmlModuleSymbol			(xmlModulePtr module, 
const char * name,
void ** symbol)
-

Lookup for a symbol address in the given module

+

Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * .

module:the module
name:the name of the symbol
symbol:the resulting symbol address
Returns:0 if the symbol was found, or -1 in case of error

diff --git a/doc/devhelp/libxml2-xmlregexp.html b/doc/devhelp/libxml2-xmlregexp.html index 4d11966..9427a34 100644 --- a/doc/devhelp/libxml2-xmlregexp.html +++ b/doc/devhelp/libxml2-xmlregexp.html @@ -180,11 +180,11 @@ The content of this structure is not made public by the API.

xmlExpGetLanguage ()

int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** langList,
int len)

Find all the strings used in @exp and store them in @list

-
ctxt:the expression context
exp:the expression
langList:where to store the tokens
len:the allocated lenght of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings
+
ctxt:the expression context
exp:the expression
langList:where to store the tokens
len:the allocated length of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

xmlExpGetStart ()

int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** tokList,
int len)

Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]

-
ctxt:the expression context
exp:the expression
tokList:where to store the tokens
len:the allocated lenght of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings
+
ctxt:the expression context
exp:the expression
tokList:where to store the tokens
len:the allocated length of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

xmlExpIsNillable ()

int	xmlExpIsNillable		(xmlExpNodePtr exp)

Finds if the expression is nillable, i.e. if it accepts the empty sequqnce

@@ -196,7 +196,7 @@ The content of this structure is not made public by the API.

xmlExpNewAtom ()

xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
const xmlChar * name,
int len)

Get the atom associated to this name from that context

-
ctxt:the expression context
name:the atom name
len:the atom name lenght in byte (or -1);
Returns:the node or NULL in case of error
+
ctxt:the expression context
name:the atom name
len:the atom name length in byte (or -1);
Returns:the node or NULL in case of error

xmlExpNewCtxt ()

xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
xmlDictPtr dict)

Creates a new context for manipulating expressions

diff --git a/doc/devhelp/libxml2-xmlschemas.html b/doc/devhelp/libxml2-xmlschemas.html index cc49dfa..533c114 100644 --- a/doc/devhelp/libxml2-xmlschemas.html +++ b/doc/devhelp/libxml2-xmlschemas.html @@ -57,12 +57,14 @@ typedef struct _xmlSchemaValidCtxt xmlSchemaValidC int xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug); xmlSchemaPtr xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt); void xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt); +void xmlSchemaValidateSetFilename (xmlSchemaValidCtxtPtr vctxt,
const char * filename); xmlSchemaParserCtxtPtr xmlSchemaNewParserCtxt (const char * URL); int xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt); typedef void xmlSchemaValidityErrorFunc (void * ctx,
const char * msg,
... ...); xmlSchemaSAXPlugPtr xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
xmlSAXHandlerPtr * sax,
void ** user_data); int xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data); int xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx); +void xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
xmlSchemaValidityLocatorFunc f,
void * ctxt); int xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
xmlNodePtr elem); void xmlSchemaSetValidStructuredErrors (xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx); void xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx); @@ -71,6 +73,7 @@ int xmlSchemaValidateFile (xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr doc); void xmlSchemaFree (xmlSchemaPtr schema); xmlSchemaParserCtxtPtr xmlSchemaNewMemParserCtxt (const char * buffer,
int size); +typedef int xmlSchemaValidityLocatorFunc (void * ctx,
const char ** file,
unsigned long * line); int xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx); int xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
int options); void xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx); @@ -189,6 +192,10 @@ The content of this structure is not made public by the API.

Signature of an error callback from an XSD validation

ctx:the validation context
msg:the message
...:extra arguments

+ +
@@ -289,6 +296,14 @@ The content of this structure is not made public by the API.

Validate a branch of a tree, starting with the given @elem.

ctxt:a schema validation context
elem:an element node
Returns:0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.

+

xmlSchemaValidateSetFilename ()

void	xmlSchemaValidateSetFilename	(xmlSchemaValidCtxtPtr vctxt, 
const char * filename)
+

Workaround to provide file error reporting information when this is not provided by current APIs

+
vctxt:the schema validation context
filename:the file name
+
+

xmlSchemaValidateSetLocator ()

void	xmlSchemaValidateSetLocator	(xmlSchemaValidCtxtPtr vctxt, 
xmlSchemaValidityLocatorFunc f,
void * ctxt)
+

Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.

+
vctxt:a schema validation context
f:the locator function pointer
ctxt:the locator context
+

xmlSchemaValidateStream ()

int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)

Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.

ctxt:a schema validation context
input:the input to use for reading the data
enc:an optional encoding information
sax:a SAX handler for the resulting events
user_data:the context to provide to the SAX handler.
Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.
diff --git a/doc/devhelp/libxml2-xmlversion.html b/doc/devhelp/libxml2-xmlversion.html index 69a04e2..8178614 100644 --- a/doc/devhelp/libxml2-xmlversion.html +++ b/doc/devhelp/libxml2-xmlversion.html @@ -83,6 +83,7 @@ #define DEBUG_MEMORY_LOCATION; #define LIBXML_ATTR_FORMAT; #define LIBXML_TEST_VERSION; +#define LIBXML_THREAD_ALLOC_ENABLED; #define LIBXML_XPATH_ENABLED; #define LIBXML_PATTERN_ENABLED; #define LIBXML_VALID_ENABLED; @@ -221,6 +222,10 @@ void xmlCheckVersion (int version);

Macro to check that the libxml version in use is compatible with the version the software has been compiled against


+

Macro LIBXML_THREAD_ALLOC_ENABLED

#define LIBXML_THREAD_ALLOC_ENABLED;
+

Whether the allocation hooks are per-thread

+
+

Macro LIBXML_THREAD_ENABLED

#define LIBXML_THREAD_ENABLED;
 

Whether the thread support is configured in

diff --git a/doc/devhelp/libxml2-xmlwriter.html b/doc/devhelp/libxml2-xmlwriter.html index 358c9e6..7c2be92 100644 --- a/doc/devhelp/libxml2-xmlwriter.html +++ b/doc/devhelp/libxml2-xmlwriter.html @@ -51,7 +51,7 @@ int xmlTextWriterStartDocument (xmlTextWriterEndPI (xmlTextWriterPtr writer); int xmlTextWriterWriteBase64 (xmlTextWriterPtr writer,
const char * data,
int start,
int len); int xmlTextWriterSetIndentString (xmlTextWriterPtr writer,
const xmlChar * str); -void xmlFreeTextWriter (xmlTextWriterPtr writer); +int xmlTextWriterStartAttribute (xmlTextWriterPtr writer,
const xmlChar * name); int xmlTextWriterEndComment (xmlTextWriterPtr writer); int xmlTextWriterWriteRawLen (xmlTextWriterPtr writer,
const xmlChar * content,
int len); int xmlTextWriterWriteDTDExternalEntityContents (xmlTextWriterPtr writer,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid); @@ -73,7 +73,7 @@ int xmlTextWriterEndCDATA (xmlTextWriterStartElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI); int xmlTextWriterEndDTDEntity (xmlTextWriterPtr writer); xmlTextWriterPtr xmlNewTextWriter (xmlOutputBufferPtr out); -int xmlTextWriterStartAttribute (xmlTextWriterPtr writer,
const xmlChar * name); +void xmlFreeTextWriter (xmlTextWriterPtr writer); int xmlTextWriterWriteVFormatDTDAttlist (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
va_list argptr); int xmlTextWriterStartPI (xmlTextWriterPtr writer,
const xmlChar * target); int xmlTextWriterStartElement (xmlTextWriterPtr writer,
const xmlChar * name); @@ -99,8 +99,9 @@ int xmlTextWriterWriteDTDInternal int xmlTextWriterWriteVFormatElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
va_list argptr); int xmlTextWriterWriteDTDNotation (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid); int xmlTextWriterWriteFormatElement (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
... ...); -int xmlTextWriterWriteElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const xmlChar * content); +int xmlTextWriterSetQuoteChar (xmlTextWriterPtr writer,
xmlChar quotechar); int xmlTextWriterWriteString (xmlTextWriterPtr writer,
const xmlChar * content); +int xmlTextWriterWriteElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const xmlChar * content); int xmlTextWriterFullEndElement (xmlTextWriterPtr writer); int xmlTextWriterWriteVFormatAttributeNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
va_list argptr); int xmlTextWriterFlush (xmlTextWriterPtr writer); @@ -236,6 +237,10 @@ The content of this structure is not made public by the API.

Set string indentation.

writer:the xmlTextWriterPtr
str:the xmlChar string
Returns:-1 on error or 0 otherwise.

+

xmlTextWriterSetQuoteChar ()

int	xmlTextWriterSetQuoteChar	(xmlTextWriterPtr writer, 
xmlChar quotechar)
+

Set the character used for quoting attributes.

+
writer:the xmlTextWriterPtr
quotechar:the quote character
Returns:-1 on error or 0 otherwise.
+

xmlTextWriterStartAttribute ()

int	xmlTextWriterStartAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name)

Start an xml attribute.

writer:the xmlTextWriterPtr
name:element name
Returns:the bytes written (may be 0 because of buffering) or -1 in case of error
diff --git a/doc/devhelp/libxml2-xpath.html b/doc/devhelp/libxml2-xpath.html index 7efa7bc..640c715 100644 --- a/doc/devhelp/libxml2-xpath.html +++ b/doc/devhelp/libxml2-xpath.html @@ -70,6 +70,7 @@ typedef xmlXPathAxis * xmlXPathParserContext; int xmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns); typedef xmlXPathFunction xmlXPathFuncLookupFunc (void * ctxt,
const xmlChar * name,
const xmlChar * ns_uri); +xmlXPathObjectPtr xmlXPathNodeEval (xmlNodePtr node,
const xmlChar * str,
xmlXPathContextPtr ctx); xmlChar * xmlXPathCastNodeToString (xmlNodePtr node); int xmlXPathIsNaN (double val); int xmlXPathContextSetCache (xmlXPathContextPtr ctxt,
int active,
int value,
int options); @@ -104,6 +105,7 @@ int xmlXPathCmpNodes (xmlXPathCompExprPtr xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
const xmlChar * str); typedef void xmlXPathEvalFunc (xmlXPathParserContextPtr ctxt,
int nargs); xmlChar * xmlXPathCastBooleanToString (int val); +int xmlXPathSetContextNode (xmlNodePtr node,
xmlXPathContextPtr ctx); int xmlXPathCastNumberToBoolean (double val); void xmlXPathFreeNodeSet (xmlNodeSetPtr obj); void xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp); @@ -246,6 +248,7 @@ The content of this structure is not made public by the API. XPATH_INVALID_CHAR_ERROR = 21 XPATH_INVALID_CTXT = 22 XPATH_STACK_ERROR = 23 + XPATH_FORBID_VARIABLE_ERROR = 24 };

@@ -513,6 +516,10 @@ The content of this structure is not made public by the API.

Create a new xmlXPathContext

doc:the XML document
Returns:the xmlXPathContext just allocated. The caller will need to free it.

+

xmlXPathNodeEval ()

xmlXPathObjectPtr	xmlXPathNodeEval	(xmlNodePtr node, 
const xmlChar * str,
xmlXPathContextPtr ctx)
+

Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.

+
node:the node to to use as the context node
str:the XPath expression
ctx:the XPath context
Returns:the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.
+

xmlXPathNodeSetCreate ()

xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)

Create a new xmlNodeSetPtr of type double and of value @val

val:an initial xmlNodePtr, or NULL
Returns:the newly created object.
@@ -525,6 +532,10 @@ The content of this structure is not made public by the API.

Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element->content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.

doc:an input document
Returns:the number of elements found in the document or -1 in case of error.

+

xmlXPathSetContextNode ()

int	xmlXPathSetContextNode		(xmlNodePtr node, 
xmlXPathContextPtr ctx)
+

Sets 'node' as the context node. The node must be in the same document as that associated with the context.

+
node:the node to to use as the context node
ctx:the XPath context
Returns:-1 in case of error or 0 if successful
+
diff --git a/doc/devhelp/libxml2-xpathInternals.html b/doc/devhelp/libxml2-xpathInternals.html index 6200688..0597343 100644 --- a/doc/devhelp/libxml2-xpathInternals.html +++ b/doc/devhelp/libxml2-xpathInternals.html @@ -153,7 +153,7 @@ void xmlXPathModValues (xmlXPathObjectPtr xmlXPathWrapString (xmlChar * val); void xmlXPathLangFunction (xmlXPathParserContextPtr ctxt,
int nargs); int xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
const xmlChar * name,
const xmlChar * ns_uri,
xmlXPathFunction f); -void xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns); +int xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns); void xmlXPathLocalNameFunction (xmlXPathParserContextPtr ctxt,
int nargs); xmlNodeSetPtr xmlXPathDifference (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); @@ -171,8 +171,8 @@ void xmlXPathSubstringAfterFunctionxmlXPathObjectPtr xmlXPathWrapCString (char * val); void xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt); xmlNodeSetPtr xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
xmlNodePtr node); -void xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val); -void xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val); +int xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val); +int xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val); xmlXPathObjectPtr xmlXPathNewValueTree (xmlNodePtr val); xmlNodeSetPtr xmlXPathDistinct (xmlNodeSetPtr nodes); xmlXPathObjectPtr xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
const xmlChar * name); @@ -549,17 +549,17 @@ void xmlXPathDebugDumpObject (FILE * out

Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)

nodes:a node-set, sorted by document order
node:a node
Returns:the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

-

xmlXPathNodeSetAdd ()

void	xmlXPathNodeSetAdd		(xmlNodeSetPtr cur, 
xmlNodePtr val)
+

xmlXPathNodeSetAdd ()

int	xmlXPathNodeSetAdd		(xmlNodeSetPtr cur, 
xmlNodePtr val)

add a new xmlNodePtr to an existing NodeSet

-
cur:the initial node set
val:a new xmlNodePtr
+
cur:the initial node set
val:a new xmlNodePtr
Returns:0 in case of success, and -1 in case of error

-

xmlXPathNodeSetAddNs ()

void	xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
xmlNodePtr node,
xmlNsPtr ns)
+

xmlXPathNodeSetAddNs ()

int	xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
xmlNodePtr node,
xmlNsPtr ns)

add a new namespace node to an existing NodeSet

-
cur:the initial node set
node:the hosting node
ns:a the namespace node
+
cur:the initial node set
node:the hosting node
ns:a the namespace node
Returns:0 in case of success and -1 in case of error

-

xmlXPathNodeSetAddUnique ()

void	xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur, 
xmlNodePtr val)
+

xmlXPathNodeSetAddUnique ()

int	xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur, 
xmlNodePtr val)

add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set.

-
cur:the initial node set
val:a new xmlNodePtr
+
cur:the initial node set
val:a new xmlNodePtr
Returns:0 in case of success and -1 in case of failure

xmlXPathNodeSetContains ()

int	xmlXPathNodeSetContains		(xmlNodeSetPtr cur, 
xmlNodePtr val)

checks whether @cur contains @val

diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp index e564951..282546a 100644 --- a/doc/devhelp/libxml2.devhelp +++ b/doc/devhelp/libxml2.devhelp @@ -91,6 +91,7 @@ + @@ -121,6 +122,7 @@ + @@ -164,7 +166,10 @@ + + + @@ -351,6 +356,7 @@ + @@ -397,7 +403,6 @@ - @@ -436,7 +441,6 @@ - @@ -574,6 +578,7 @@ + @@ -610,6 +615,7 @@ + @@ -625,6 +631,7 @@ + @@ -648,6 +655,7 @@ + @@ -767,6 +775,7 @@ + @@ -1509,6 +1518,7 @@ + @@ -1573,6 +1583,7 @@ + @@ -1710,6 +1721,7 @@ + @@ -1868,6 +1880,7 @@ + @@ -2097,6 +2110,12 @@ + + + + + + @@ -2238,10 +2257,12 @@ + + @@ -2602,6 +2623,8 @@ + + @@ -2897,6 +2920,8 @@ + + @@ -3069,6 +3094,7 @@ + @@ -3457,6 +3483,7 @@ + @@ -3499,6 +3526,7 @@ + diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index bdac7bb..57af9c2 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -1,134 +1,135 @@ -# Beware this is autogenerated by index.py -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ -DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ +## +## This file is auto-generated by index.py +## DO NOT EDIT !!! +## +AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include +AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) +LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) + +CLEANFILES = *.tmp + +if REBUILD_DOCS rebuild: examples.xml index.html +.PHONY: rebuild -examples.xml: index.py *.c - -@($(srcdir)/index.py) +examples.xml: index.py $(noinst_PROGRAMS:=.c) + cd $(srcdir) && $(PYTHON) index.py + $(MAKE) Makefile index.html: examples.xml examples.xsl - -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) + cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page" + -cd $(srcdir) && xmllint --valid --noout index.html +endif install-data-local: - @MKDIR_P@ $(DESTDIR)$(HTML_DIR) - -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) - -EXTRA_DIST=examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res - -noinst_PROGRAMS=xpath2 reader1 reader4 parse2 reader2 parse3 reader3 tree2 parse4 io2 testWriter io1 xpath1 parse1 tree1 - -xpath2_SOURCES=xpath2.c -xpath2_LDFLAGS= -xpath2_DEPENDENCIES= $(DEPS) -xpath2_LDADD= @RDL_LIBS@ $(LDADDS) - -reader1_SOURCES=reader1.c -reader1_LDFLAGS= -reader1_DEPENDENCIES= $(DEPS) -reader1_LDADD= @RDL_LIBS@ $(LDADDS) - -reader4_SOURCES=reader4.c -reader4_LDFLAGS= -reader4_DEPENDENCIES= $(DEPS) -reader4_LDADD= @RDL_LIBS@ $(LDADDS) - -parse2_SOURCES=parse2.c -parse2_LDFLAGS= -parse2_DEPENDENCIES= $(DEPS) -parse2_LDADD= @RDL_LIBS@ $(LDADDS) - -reader2_SOURCES=reader2.c -reader2_LDFLAGS= -reader2_DEPENDENCIES= $(DEPS) -reader2_LDADD= @RDL_LIBS@ $(LDADDS) - -parse3_SOURCES=parse3.c -parse3_LDFLAGS= -parse3_DEPENDENCIES= $(DEPS) -parse3_LDADD= @RDL_LIBS@ $(LDADDS) - -reader3_SOURCES=reader3.c -reader3_LDFLAGS= -reader3_DEPENDENCIES= $(DEPS) -reader3_LDADD= @RDL_LIBS@ $(LDADDS) - -tree2_SOURCES=tree2.c -tree2_LDFLAGS= -tree2_DEPENDENCIES= $(DEPS) -tree2_LDADD= @RDL_LIBS@ $(LDADDS) - -parse4_SOURCES=parse4.c -parse4_LDFLAGS= -parse4_DEPENDENCIES= $(DEPS) -parse4_LDADD= @RDL_LIBS@ $(LDADDS) - -io2_SOURCES=io2.c -io2_LDFLAGS= -io2_DEPENDENCIES= $(DEPS) -io2_LDADD= @RDL_LIBS@ $(LDADDS) - -testWriter_SOURCES=testWriter.c -testWriter_LDFLAGS= -testWriter_DEPENDENCIES= $(DEPS) -testWriter_LDADD= @RDL_LIBS@ $(LDADDS) - -io1_SOURCES=io1.c -io1_LDFLAGS= -io1_DEPENDENCIES= $(DEPS) -io1_LDADD= @RDL_LIBS@ $(LDADDS) - -xpath1_SOURCES=xpath1.c -xpath1_LDFLAGS= -xpath1_DEPENDENCIES= $(DEPS) -xpath1_LDADD= @RDL_LIBS@ $(LDADDS) - -parse1_SOURCES=parse1.c -parse1_LDFLAGS= -parse1_DEPENDENCIES= $(DEPS) -parse1_LDADD= @RDL_LIBS@ $(LDADDS) - -tree1_SOURCES=tree1.c -tree1_LDFLAGS= -tree1_DEPENDENCIES= $(DEPS) -tree1_LDADD= @RDL_LIBS@ $(LDADDS) + $(MKDIR_P) $(DESTDIR)$(HTML_DIR) + -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) + +clean-local: + test -f Makefile.am || rm -f test?.xml + +EXTRA_DIST = \ + examples.xml \ + examples.xsl \ + index.html \ + index.py \ + io1.res \ + io2.res \ + reader1.res \ + reader3.res \ + reader4.res \ + test1.xml \ + test2.xml \ + test3.xml \ + tree1.res \ + tree2.res \ + tst.xml \ + writer.xml \ + xpath1.res \ + xpath2.res + +noinst_PROGRAMS = \ + io1 \ + io2 \ + parse1 \ + parse2 \ + parse3 \ + parse4 \ + reader1 \ + reader2 \ + reader3 \ + reader4 \ + testWriter \ + tree1 \ + tree2 \ + xpath1 \ + xpath2 + +io1_SOURCES = io1.c + +io2_SOURCES = io2.c + +parse1_SOURCES = parse1.c + +parse2_SOURCES = parse2.c + +parse3_SOURCES = parse3.c + +parse4_SOURCES = parse4.c + +reader1_SOURCES = reader1.c + +reader2_SOURCES = reader2.c + +reader3_SOURCES = reader3.c + +reader4_SOURCES = reader4.c + +testWriter_SOURCES = testWriter.c + +tree1_SOURCES = tree1.c + +tree2_SOURCES = tree2.c + +xpath1_SOURCES = xpath1.c + +xpath2_SOURCES = xpath2.c valgrind: $(MAKE) CHECKER='valgrind' tests tests: $(noinst_PROGRAMS) + test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml . @(echo '## examples regression tests') @(echo > .memdump) - @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) - @(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) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) - @(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) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) - @(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) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) - @(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) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - - + $(CHECKER) ./io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res + @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 > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in index 9d08434..cbb7e34 100644 --- a/doc/examples/Makefile.in +++ b/doc/examples/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,11 +51,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -noinst_PROGRAMS = xpath2$(EXEEXT) reader1$(EXEEXT) reader4$(EXEEXT) \ - parse2$(EXEEXT) reader2$(EXEEXT) parse3$(EXEEXT) \ - reader3$(EXEEXT) tree2$(EXEEXT) parse4$(EXEEXT) io2$(EXEEXT) \ - testWriter$(EXEEXT) io1$(EXEEXT) xpath1$(EXEEXT) \ - parse1$(EXEEXT) tree1$(EXEEXT) +noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \ + parse2$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) \ + reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \ + reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \ + tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT) subdir = doc/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -55,84 +72,113 @@ CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_io1_OBJECTS = io1.$(OBJEXT) io1_OBJECTS = $(am_io1_OBJECTS) +io1_LDADD = $(LDADD) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +io1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent -io1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(io1_LDFLAGS) $(LDFLAGS) -o $@ am_io2_OBJECTS = io2.$(OBJEXT) io2_OBJECTS = $(am_io2_OBJECTS) -io2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(io2_LDFLAGS) $(LDFLAGS) -o $@ +io2_LDADD = $(LDADD) +io2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_parse1_OBJECTS = parse1.$(OBJEXT) parse1_OBJECTS = $(am_parse1_OBJECTS) -parse1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(parse1_LDFLAGS) $(LDFLAGS) -o $@ +parse1_LDADD = $(LDADD) +parse1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_parse2_OBJECTS = parse2.$(OBJEXT) parse2_OBJECTS = $(am_parse2_OBJECTS) -parse2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(parse2_LDFLAGS) $(LDFLAGS) -o $@ +parse2_LDADD = $(LDADD) +parse2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_parse3_OBJECTS = parse3.$(OBJEXT) parse3_OBJECTS = $(am_parse3_OBJECTS) -parse3_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(parse3_LDFLAGS) $(LDFLAGS) -o $@ +parse3_LDADD = $(LDADD) +parse3_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_parse4_OBJECTS = parse4.$(OBJEXT) parse4_OBJECTS = $(am_parse4_OBJECTS) -parse4_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(parse4_LDFLAGS) $(LDFLAGS) -o $@ +parse4_LDADD = $(LDADD) +parse4_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_reader1_OBJECTS = reader1.$(OBJEXT) reader1_OBJECTS = $(am_reader1_OBJECTS) -reader1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(reader1_LDFLAGS) $(LDFLAGS) -o $@ +reader1_LDADD = $(LDADD) +reader1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_reader2_OBJECTS = reader2.$(OBJEXT) reader2_OBJECTS = $(am_reader2_OBJECTS) -reader2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(reader2_LDFLAGS) $(LDFLAGS) -o $@ +reader2_LDADD = $(LDADD) +reader2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_reader3_OBJECTS = reader3.$(OBJEXT) reader3_OBJECTS = $(am_reader3_OBJECTS) -reader3_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(reader3_LDFLAGS) $(LDFLAGS) -o $@ +reader3_LDADD = $(LDADD) +reader3_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_reader4_OBJECTS = reader4.$(OBJEXT) reader4_OBJECTS = $(am_reader4_OBJECTS) -reader4_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(reader4_LDFLAGS) $(LDFLAGS) -o $@ +reader4_LDADD = $(LDADD) +reader4_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_testWriter_OBJECTS = testWriter.$(OBJEXT) testWriter_OBJECTS = $(am_testWriter_OBJECTS) -testWriter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(testWriter_LDFLAGS) $(LDFLAGS) -o $@ +testWriter_LDADD = $(LDADD) +testWriter_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_tree1_OBJECTS = tree1.$(OBJEXT) tree1_OBJECTS = $(am_tree1_OBJECTS) -tree1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tree1_LDFLAGS) $(LDFLAGS) -o $@ +tree1_LDADD = $(LDADD) +tree1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_tree2_OBJECTS = tree2.$(OBJEXT) tree2_OBJECTS = $(am_tree2_OBJECTS) -tree2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tree2_LDFLAGS) $(LDFLAGS) -o $@ +tree2_LDADD = $(LDADD) +tree2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_xpath1_OBJECTS = xpath1.$(OBJEXT) xpath1_OBJECTS = $(am_xpath1_OBJECTS) -xpath1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(xpath1_LDFLAGS) $(LDFLAGS) -o $@ +xpath1_LDADD = $(LDADD) +xpath1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_xpath2_OBJECTS = xpath2.$(OBJEXT) xpath2_OBJECTS = $(am_xpath2_OBJECTS) -xpath2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(xpath2_LDFLAGS) $(LDFLAGS) -o $@ +xpath2_LDADD = $(LDADD) +xpath2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -143,21 +189,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \ $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) \ @@ -169,6 +215,11 @@ DIST_SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \ $(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) \ $(reader4_SOURCES) $(testWriter_SOURCES) $(tree1_SOURCES) \ $(tree2_SOURCES) $(xpath1_SOURCES) $(xpath2_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -176,7 +227,6 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -213,6 +263,7 @@ HTML_DIR = @HTML_DIR@ HTML_OBJ = @HTML_OBJ@ HTTP_OBJ = @HTTP_OBJ@ ICONV_LIBS = @ICONV_LIBS@ +ICU_LIBS = @ICU_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -268,7 +319,6 @@ RANLIB = @RANLIB@ RDL_LIBS = @RDL_LIBS@ READER_TEST = @READER_TEST@ RELDATE = @RELDATE@ -RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -293,7 +343,6 @@ TEST_VTIME = @TEST_VTIME@ TEST_XINCLUDE = @TEST_XINCLUDE@ TEST_XPATH = @TEST_XPATH@ TEST_XPTR = @TEST_XPTR@ -THREADS_W32 = @THREADS_W32@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ VERSION = @VERSION@ @@ -326,6 +375,7 @@ WITH_SAX1 = @WITH_SAX1@ WITH_SCHEMAS = @WITH_SCHEMAS@ WITH_SCHEMATRON = @WITH_SCHEMATRON@ WITH_THREADS = @WITH_THREADS@ +WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@ WITH_TREE = @WITH_TREE@ WITH_TRIO = @WITH_TRIO@ WITH_VALID = @WITH_VALID@ @@ -399,72 +449,45 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include +AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) +LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) +CLEANFILES = *.tmp +EXTRA_DIST = \ + examples.xml \ + examples.xsl \ + index.html \ + index.py \ + io1.res \ + io2.res \ + reader1.res \ + reader3.res \ + reader4.res \ + test1.xml \ + test2.xml \ + test3.xml \ + tree1.res \ + tree2.res \ + tst.xml \ + writer.xml \ + xpath1.res \ + xpath2.res -# Beware this is autogenerated by index.py -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ -DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ -EXTRA_DIST = examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res -xpath2_SOURCES = xpath2.c -xpath2_LDFLAGS = -xpath2_DEPENDENCIES = $(DEPS) -xpath2_LDADD = @RDL_LIBS@ $(LDADDS) -reader1_SOURCES = reader1.c -reader1_LDFLAGS = -reader1_DEPENDENCIES = $(DEPS) -reader1_LDADD = @RDL_LIBS@ $(LDADDS) -reader4_SOURCES = reader4.c -reader4_LDFLAGS = -reader4_DEPENDENCIES = $(DEPS) -reader4_LDADD = @RDL_LIBS@ $(LDADDS) +io1_SOURCES = io1.c +io2_SOURCES = io2.c +parse1_SOURCES = parse1.c parse2_SOURCES = parse2.c -parse2_LDFLAGS = -parse2_DEPENDENCIES = $(DEPS) -parse2_LDADD = @RDL_LIBS@ $(LDADDS) -reader2_SOURCES = reader2.c -reader2_LDFLAGS = -reader2_DEPENDENCIES = $(DEPS) -reader2_LDADD = @RDL_LIBS@ $(LDADDS) parse3_SOURCES = parse3.c -parse3_LDFLAGS = -parse3_DEPENDENCIES = $(DEPS) -parse3_LDADD = @RDL_LIBS@ $(LDADDS) -reader3_SOURCES = reader3.c -reader3_LDFLAGS = -reader3_DEPENDENCIES = $(DEPS) -reader3_LDADD = @RDL_LIBS@ $(LDADDS) -tree2_SOURCES = tree2.c -tree2_LDFLAGS = -tree2_DEPENDENCIES = $(DEPS) -tree2_LDADD = @RDL_LIBS@ $(LDADDS) parse4_SOURCES = parse4.c -parse4_LDFLAGS = -parse4_DEPENDENCIES = $(DEPS) -parse4_LDADD = @RDL_LIBS@ $(LDADDS) -io2_SOURCES = io2.c -io2_LDFLAGS = -io2_DEPENDENCIES = $(DEPS) -io2_LDADD = @RDL_LIBS@ $(LDADDS) +reader1_SOURCES = reader1.c +reader2_SOURCES = reader2.c +reader3_SOURCES = reader3.c +reader4_SOURCES = reader4.c testWriter_SOURCES = testWriter.c -testWriter_LDFLAGS = -testWriter_DEPENDENCIES = $(DEPS) -testWriter_LDADD = @RDL_LIBS@ $(LDADDS) -io1_SOURCES = io1.c -io1_LDFLAGS = -io1_DEPENDENCIES = $(DEPS) -io1_LDADD = @RDL_LIBS@ $(LDADDS) -xpath1_SOURCES = xpath1.c -xpath1_LDFLAGS = -xpath1_DEPENDENCIES = $(DEPS) -xpath1_LDADD = @RDL_LIBS@ $(LDADDS) -parse1_SOURCES = parse1.c -parse1_LDFLAGS = -parse1_DEPENDENCIES = $(DEPS) -parse1_LDADD = @RDL_LIBS@ $(LDADDS) tree1_SOURCES = tree1.c -tree1_LDFLAGS = -tree1_DEPENDENCIES = $(DEPS) -tree1_LDADD = @RDL_LIBS@ $(LDADDS) +tree2_SOURCES = tree2.c +xpath1_SOURCES = xpath1.c +xpath2_SOURCES = xpath2.c all: all-am .SUFFIXES: @@ -508,51 +531,51 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES) +io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES) $(EXTRA_io1_DEPENDENCIES) @rm -f io1$(EXEEXT) - $(AM_V_CCLD)$(io1_LINK) $(io1_OBJECTS) $(io1_LDADD) $(LIBS) -io2$(EXEEXT): $(io2_OBJECTS) $(io2_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(io1_OBJECTS) $(io1_LDADD) $(LIBS) +io2$(EXEEXT): $(io2_OBJECTS) $(io2_DEPENDENCIES) $(EXTRA_io2_DEPENDENCIES) @rm -f io2$(EXEEXT) - $(AM_V_CCLD)$(io2_LINK) $(io2_OBJECTS) $(io2_LDADD) $(LIBS) -parse1$(EXEEXT): $(parse1_OBJECTS) $(parse1_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(io2_OBJECTS) $(io2_LDADD) $(LIBS) +parse1$(EXEEXT): $(parse1_OBJECTS) $(parse1_DEPENDENCIES) $(EXTRA_parse1_DEPENDENCIES) @rm -f parse1$(EXEEXT) - $(AM_V_CCLD)$(parse1_LINK) $(parse1_OBJECTS) $(parse1_LDADD) $(LIBS) -parse2$(EXEEXT): $(parse2_OBJECTS) $(parse2_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(parse1_OBJECTS) $(parse1_LDADD) $(LIBS) +parse2$(EXEEXT): $(parse2_OBJECTS) $(parse2_DEPENDENCIES) $(EXTRA_parse2_DEPENDENCIES) @rm -f parse2$(EXEEXT) - $(AM_V_CCLD)$(parse2_LINK) $(parse2_OBJECTS) $(parse2_LDADD) $(LIBS) -parse3$(EXEEXT): $(parse3_OBJECTS) $(parse3_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(parse2_OBJECTS) $(parse2_LDADD) $(LIBS) +parse3$(EXEEXT): $(parse3_OBJECTS) $(parse3_DEPENDENCIES) $(EXTRA_parse3_DEPENDENCIES) @rm -f parse3$(EXEEXT) - $(AM_V_CCLD)$(parse3_LINK) $(parse3_OBJECTS) $(parse3_LDADD) $(LIBS) -parse4$(EXEEXT): $(parse4_OBJECTS) $(parse4_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(parse3_OBJECTS) $(parse3_LDADD) $(LIBS) +parse4$(EXEEXT): $(parse4_OBJECTS) $(parse4_DEPENDENCIES) $(EXTRA_parse4_DEPENDENCIES) @rm -f parse4$(EXEEXT) - $(AM_V_CCLD)$(parse4_LINK) $(parse4_OBJECTS) $(parse4_LDADD) $(LIBS) -reader1$(EXEEXT): $(reader1_OBJECTS) $(reader1_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(parse4_OBJECTS) $(parse4_LDADD) $(LIBS) +reader1$(EXEEXT): $(reader1_OBJECTS) $(reader1_DEPENDENCIES) $(EXTRA_reader1_DEPENDENCIES) @rm -f reader1$(EXEEXT) - $(AM_V_CCLD)$(reader1_LINK) $(reader1_OBJECTS) $(reader1_LDADD) $(LIBS) -reader2$(EXEEXT): $(reader2_OBJECTS) $(reader2_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(reader1_OBJECTS) $(reader1_LDADD) $(LIBS) +reader2$(EXEEXT): $(reader2_OBJECTS) $(reader2_DEPENDENCIES) $(EXTRA_reader2_DEPENDENCIES) @rm -f reader2$(EXEEXT) - $(AM_V_CCLD)$(reader2_LINK) $(reader2_OBJECTS) $(reader2_LDADD) $(LIBS) -reader3$(EXEEXT): $(reader3_OBJECTS) $(reader3_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(reader2_OBJECTS) $(reader2_LDADD) $(LIBS) +reader3$(EXEEXT): $(reader3_OBJECTS) $(reader3_DEPENDENCIES) $(EXTRA_reader3_DEPENDENCIES) @rm -f reader3$(EXEEXT) - $(AM_V_CCLD)$(reader3_LINK) $(reader3_OBJECTS) $(reader3_LDADD) $(LIBS) -reader4$(EXEEXT): $(reader4_OBJECTS) $(reader4_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(reader3_OBJECTS) $(reader3_LDADD) $(LIBS) +reader4$(EXEEXT): $(reader4_OBJECTS) $(reader4_DEPENDENCIES) $(EXTRA_reader4_DEPENDENCIES) @rm -f reader4$(EXEEXT) - $(AM_V_CCLD)$(reader4_LINK) $(reader4_OBJECTS) $(reader4_LDADD) $(LIBS) -testWriter$(EXEEXT): $(testWriter_OBJECTS) $(testWriter_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(reader4_OBJECTS) $(reader4_LDADD) $(LIBS) +testWriter$(EXEEXT): $(testWriter_OBJECTS) $(testWriter_DEPENDENCIES) $(EXTRA_testWriter_DEPENDENCIES) @rm -f testWriter$(EXEEXT) - $(AM_V_CCLD)$(testWriter_LINK) $(testWriter_OBJECTS) $(testWriter_LDADD) $(LIBS) -tree1$(EXEEXT): $(tree1_OBJECTS) $(tree1_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(testWriter_OBJECTS) $(testWriter_LDADD) $(LIBS) +tree1$(EXEEXT): $(tree1_OBJECTS) $(tree1_DEPENDENCIES) $(EXTRA_tree1_DEPENDENCIES) @rm -f tree1$(EXEEXT) - $(AM_V_CCLD)$(tree1_LINK) $(tree1_OBJECTS) $(tree1_LDADD) $(LIBS) -tree2$(EXEEXT): $(tree2_OBJECTS) $(tree2_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(tree1_OBJECTS) $(tree1_LDADD) $(LIBS) +tree2$(EXEEXT): $(tree2_OBJECTS) $(tree2_DEPENDENCIES) $(EXTRA_tree2_DEPENDENCIES) @rm -f tree2$(EXEEXT) - $(AM_V_CCLD)$(tree2_LINK) $(tree2_OBJECTS) $(tree2_LDADD) $(LIBS) -xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(tree2_OBJECTS) $(tree2_LDADD) $(LIBS) +xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES) $(EXTRA_xpath1_DEPENDENCIES) @rm -f xpath1$(EXEEXT) - $(AM_V_CCLD)$(xpath1_LINK) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS) -xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS) +xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES) $(EXTRA_xpath2_DEPENDENCIES) @rm -f xpath2$(EXEEXT) - $(AM_V_CCLD)$(xpath2_LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -579,26 +602,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -702,13 +722,19 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -719,7 +745,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ +clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am @@ -791,7 +817,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ + clean-libtool clean-local clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ @@ -805,54 +831,61 @@ uninstall-am: tags uninstall uninstall-am -rebuild: examples.xml index.html +@REBUILD_DOCS_TRUE@rebuild: examples.xml index.html +@REBUILD_DOCS_TRUE@.PHONY: rebuild -examples.xml: index.py *.c - -@($(srcdir)/index.py) +@REBUILD_DOCS_TRUE@examples.xml: index.py $(noinst_PROGRAMS:=.c) +@REBUILD_DOCS_TRUE@ cd $(srcdir) && $(PYTHON) index.py +@REBUILD_DOCS_TRUE@ $(MAKE) Makefile -index.html: examples.xml examples.xsl - -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) +@REBUILD_DOCS_TRUE@index.html: examples.xml examples.xsl +@REBUILD_DOCS_TRUE@ cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page" +@REBUILD_DOCS_TRUE@ -cd $(srcdir) && xmllint --valid --noout index.html install-data-local: - @MKDIR_P@ $(DESTDIR)$(HTML_DIR) - -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) + $(MKDIR_P) $(DESTDIR)$(HTML_DIR) + -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) + +clean-local: + test -f Makefile.am || rm -f test?.xml valgrind: $(MAKE) CHECKER='valgrind' tests tests: $(noinst_PROGRAMS) + test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml . @(echo '## examples regression tests') @(echo > .memdump) - @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) - @(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) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) - @(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) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) - @(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) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) - @(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) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + $(CHECKER) ./io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res + @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 > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 + $(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res + @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml index a237a0e..28929cc 100644 --- a/doc/examples/examples.xml +++ b/doc/examples/examples.xml @@ -1,74 +1,9 @@ - - Parse and validate an XML file with an xmlReader - Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.) - reader2 <valid_xml_filename> - reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp - Daniel Veillard - see Copyright for the status of this software. -
xmlReader
- - <libxml/xmlreader.h> - - - - - - - - - - - - - - - - - - - - - -
- - Load a document, locate subelements with XPath, modify said elements and save the resulting document. - Shows how to make a full round-trip from a load/edit/save - xpath2 <xml-file> <xpath-expr> <new-value> - xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp - Aleksey Sanin and Daniel Veillard - see Copyright for the status of this software. -
XPath
- - <libxml/parser.h> - <libxml/xpath.h> - <libxml/xpathInternals.h> - <libxml/tree.h> - - - - - - - - - - - - - - - - - - - -
Evaluate XPath expression and prints result node set. Shows how to evaluate XPath expression and register known namespaces in XPath context. xpath1 <xml-file> <xpath-expr> [<known-ns-list>] - ./xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp + xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res Aleksey Sanin see Copyright for the status of this software.
XPath
@@ -123,34 +58,43 @@
- - Output to char buffer - Demonstrate the use of xmlDocDumpMemory to output document to a character buffer - io2 - io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp - John Fleck + + Parse and validate an XML file with an xmlReader + Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.) + reader2 <valid_xml_filename> + reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res + Daniel Veillard see Copyright for the status of this software. -
InputOutput
+
xmlReader
- <libxml/parser.h> + <libxml/xmlreader.h> - - - - - - - - - + + + + + + + + + + + + + + + + + +
Creates a tree Shows how to create document, nodes and dump it to stdout or file. tree2 <filename> -Default output: stdout - tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp + tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res Lucas Brasilino <brasilino@recife.pe.gov.br> see Copyright for the status of this software
Tree
@@ -174,11 +118,113 @@
+ + Example of custom Input/Output + Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way. + io1 + io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res + Daniel Veillard + see Copyright for the status of this software. +
InputOutput
+ + <libxml/parser.h> + <libxml/xmlIO.h> + <libxml/xinclude.h> + <libxml/tree.h> + + + + + + + + + + + + +
+ + Parse an XML document chunk by chunk to a tree and free it + Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree + parse4 test3.xml + parse4 test3.xml + Daniel Veillard + see Copyright for the status of this software. +
Parsing
+ + <libxml/tree.h> + <libxml/parser.h> + + + + + + + + + + + + +
+ + Load a document, locate subelements with XPath, modify said elements and save the resulting document. + Shows how to make a full round-trip from a load/edit/save + xpath2 <xml-file> <xpath-expr> <new-value> + xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res + Aleksey Sanin and Daniel Veillard + see Copyright for the status of this software. +
XPath
+ + <libxml/parser.h> + <libxml/xpath.h> + <libxml/xpathInternals.h> + <libxml/tree.h> + + + + + + + + + + + + + + + + +
+ + Output to char buffer + Demonstrate the use of xmlDocDumpMemory to output document to a character buffer + io2 + io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res + John Fleck + see Copyright for the status of this software. +
InputOutput
+ + <libxml/parser.h> + + + + + + + + + + + +
Parse an XML file with an xmlReader Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader1 <filename> - reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp + reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res Daniel Veillard see Copyright for the status of this software.
xmlReader
@@ -187,14 +233,11 @@ - - - @@ -202,77 +245,29 @@
- - use various APIs for the xmlWriter - tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized. - testWriter - testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res - Alfred Mickautsch - see Copyright for the status of this software. -
xmlWriter
- - <libxml/encoding.h> - <libxml/xmlwriter.h> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Parse an XML document chunk by chunk to a tree and free it - Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree - parse4 test3.xml - parse4 test3.xml - Daniel Veillard + + Navigates a tree to print element names + Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order. + tree1 filename_or_URL + tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res + Dodji Seketeli see Copyright for the status of this software. -
Parsing
+
Tree
<libxml/tree.h> <libxml/parser.h> - - - - - + + +
Show how to extract subdocuments with xmlReader Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader3 - reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp + reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res Daniel Veillard see Copyright for the status of this software.
xmlReader
@@ -289,25 +284,24 @@
- - Example of custom Input/Output - Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way. - io1 - io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp + + Parse and validate an XML file to a tree and free the result + Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree. + parse2 test2.xml + parse2 test2.xml Daniel Veillard see Copyright for the status of this software. -
InputOutput
+
Parsing
- <libxml/parser.h> - <libxml/xmlIO.h> - <libxml/xinclude.h> <libxml/tree.h> + <libxml/parser.h> - - - - + + + + +
@@ -326,29 +320,11 @@ - - Navigates a tree to print element names - Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order. - tree1 filename_or_URL - tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp - Dodji Seketeli - see Copyright for the status of this software. -
Tree
- - <libxml/tree.h> - <libxml/parser.h> - - - - - - -
Parse multiple XML files reusing an xmlReader Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.) reader4 <filename> [ filename ... ] - reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp + reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res Graham Bennett see Copyright for the status of this software.
xmlReader
@@ -364,34 +340,58 @@
- - Parse and validate an XML file to a tree and free the result - Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree. - parse2 test2.xml - parse2 test2.xml - Daniel Veillard + + use various APIs for the xmlWriter + tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized. + testWriter + testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done + Alfred Mickautsch see Copyright for the status of this software. -
Parsing
+
xmlWriter
- <libxml/tree.h> - <libxml/parser.h> + <libxml/encoding.h> + <libxml/xmlwriter.h> - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - + - + + @@ -401,8 +401,8 @@ - + @@ -430,12 +430,12 @@ - - + - + + @@ -447,9 +447,9 @@ + - @@ -458,16 +458,16 @@ - - - + + + - + @@ -479,12 +479,12 @@ - - - + + + @@ -500,34 +500,34 @@ - + - - + - + + - + - + @@ -566,16 +566,16 @@ - + - + @@ -692,28 +692,28 @@ - + - + - + - + - + - + @@ -721,22 +721,22 @@
- +
- +
- +
diff --git a/doc/examples/index.html b/doc/examples/index.html new file mode 100644 index 0000000..c9314a3 --- /dev/null +++ b/doc/examples/index.html @@ -0,0 +1,14 @@ + + +Libxml2 set of examples
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Libxml2 set of examples

Examples Menu
Related links

The examples are stored per section depending on the main focus + of the example:

  • xmlWriter :

  • InputOutput :

    • io1.c: Example of custom Input/Output
    • io2.c: Output to char buffer
  • Tree :

    • tree2.c: Creates a tree
    • tree1.c: Navigates a tree to print element names
  • XPath :

    • xpath1.c: Evaluate XPath expression and prints result node set.
    • xpath2.c: Load a document, locate subelements with XPath, modify said elements and save the resulting document.
  • Parsing :

    • parse3.c: Parse an XML document in memory to a tree and free it
    • parse4.c: Parse an XML document chunk by chunk to a tree and free it
    • parse2.c: Parse and validate an XML file to a tree and free the result
    • parse1.c: Parse an XML file to a tree and free it
  • xmlReader :

    • reader2.c: Parse and validate an XML file with an xmlReader
    • reader1.c: Parse an XML file with an xmlReader
    • reader3.c: Show how to extract subdocuments with xmlReader
    • reader4.c: Parse multiple XML files reusing an xmlReader

Getting the compilation options and libraries dependancies needed +to generate binaries from the examples is best done on Linux/Unix by using +the xml2-config script which should have been installed as part of make +install step or when installing the libxml2 development package:

gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`

InputOutput Examples

io1.c: Example of custom Input/Output

Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.

Includes:

Uses:

Usage:

io1

Author: Daniel Veillard

io2.c: Output to char buffer

Demonstrate the use of xmlDocDumpMemory to output document to a character buffer

Includes:

Uses:

Usage:

io2

Author: John Fleck

Parsing Examples

parse3.c: Parse an XML document in memory to a tree and free it

Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree

Includes:

Uses:

Usage:

parse3

Author: Daniel Veillard

parse4.c: Parse an XML document chunk by chunk to a tree and free it

Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree

Includes:

Uses:

Usage:

parse4 test3.xml

Author: Daniel Veillard

parse2.c: Parse and validate an XML file to a tree and free the result

Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.

Includes:

Uses:

Usage:

parse2 test2.xml

Author: Daniel Veillard

parse1.c: Parse an XML file to a tree and free it

Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree

Includes:

Uses:

Usage:

parse1 test1.xml

Author: Daniel Veillard

Tree Examples

tree2.c: Creates a tree

Shows how to create document, nodes and dump it to stdout or file.

Includes:

Uses:

Usage:

tree2 <filename> -Default output: stdout

Author: Lucas Brasilino <brasilino@recife.pe.gov.br>

tree1.c: Navigates a tree to print element names

Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.

Includes:

Uses:

Usage:

tree1 filename_or_URL

Author: Dodji Seketeli

XPath Examples

xpath1.c: Evaluate XPath expression and prints result node set.

Shows how to evaluate XPath expression and register known namespaces in XPath context.

Includes:

Uses:

Usage:

xpath1 <xml-file> <xpath-expr> [<known-ns-list>]

Author: Aleksey Sanin

xpath2.c: Load a document, locate subelements with XPath, modify said elements and save the resulting document.

Shows how to make a full round-trip from a load/edit/save

Includes:

Uses:

Usage:

xpath2 <xml-file> <xpath-expr> <new-value>

Author: Aleksey Sanin and Daniel Veillard

xmlReader Examples

reader2.c: Parse and validate an XML file with an xmlReader

Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader2 <valid_xml_filename>

Author: Daniel Veillard

reader1.c: Parse an XML file with an xmlReader

Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader1 <filename>

Author: Daniel Veillard

reader3.c: Show how to extract subdocuments with xmlReader

Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader3

Author: Daniel Veillard

reader4.c: Parse multiple XML files reusing an xmlReader

Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)

Includes:

Uses:

Usage:

reader4 <filename> [ filename ... ]

Author: Graham Bennett

xmlWriter Examples

testWriter.c: use various APIs for the xmlWriter

tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized.

Includes:

Uses:

Usage:

testWriter

Author: Alfred Mickautsch

Daniel Veillard

diff --git a/doc/examples/index.py b/doc/examples/index.py index 11df6f0..7e0efaa 100755 --- a/doc/examples/index.py +++ b/doc/examples/index.py @@ -13,7 +13,7 @@ sys.path.insert(0, "..") from apibuild import CParser, escape examples = [] -extras = ['examples.xsl', 'index.py'] +extras = ['examples.xsl', 'index.html', 'index.py'] tests = [] sections = {} symbols = {} @@ -177,10 +177,10 @@ def parse(filename, output): type = id.get_type() output.write(" <%s line='%d' name='%s'/>\n" % (type, line, name)) - + output.write(" \n") output.write("
\n") - + return idx def dump_symbols(output): @@ -220,43 +220,59 @@ def dump_Makefile(): extras.append(file) for file in glob.glob('*.res'): extras.append(file) - Makefile="""# Beware this is autogenerated by index.py -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ -DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ + Makefile="""## +## This file is auto-generated by index.py +## DO NOT EDIT !!! +## + +AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include +AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) +LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) +CLEANFILES = *.tmp + +if REBUILD_DOCS rebuild: examples.xml index.html +.PHONY: rebuild -examples.xml: index.py *.c - -@($(srcdir)/index.py) +examples.xml: index.py $(noinst_PROGRAMS:=.c) + cd $(srcdir) && $(PYTHON) index.py + $(MAKE) Makefile index.html: examples.xml examples.xsl - -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) + cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page" + -cd $(srcdir) && xmllint --valid --noout index.html +endif install-data-local: - $(mkinstalldirs) $(DESTDIR)$(HTML_DIR) - -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) + $(MKDIR_P) $(DESTDIR)$(HTML_DIR) + -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) + +clean-local: + test -f Makefile.am || rm -f test?.xml """ + examples.sort() + extras.sort() + tests.sort() EXTRA_DIST="" for extra in extras: - EXTRA_DIST = EXTRA_DIST + extra + " " - Makefile = Makefile + "EXTRA_DIST=%s\n\n" % (EXTRA_DIST) + EXTRA_DIST = EXTRA_DIST + " \\\n\t" + extra + Makefile = Makefile + "EXTRA_DIST =%s\n\n" % (EXTRA_DIST) noinst_PROGRAMS="" for example in examples: - noinst_PROGRAMS = noinst_PROGRAMS + example + " " - Makefile = Makefile + "noinst_PROGRAMS=%s\n\n" % (noinst_PROGRAMS) + noinst_PROGRAMS = noinst_PROGRAMS + " \\\n\t" + example + Makefile = Makefile + "noinst_PROGRAMS =%s\n\n" % (noinst_PROGRAMS) for example in examples: - Makefile = Makefile + "%s_SOURCES=%s.c\n%s_LDFLAGS=\n%s_DEPENDENCIES= $(DEPS)\n%s_LDADD= @RDL_LIBS@ $(LDADDS)\n\n" % (example, example, example, - example, example) + Makefile = Makefile + "%s_SOURCES = %s.c\n\n" % (example, example) Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind' tests\n\n" Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n" + Makefile = Makefile + "\ttest -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 + "\n\n" + Makefile = Makefile + "\t$(CHECKER) %s\n" % (test) + Makefile = Makefile + '\t@grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0\n' try: old = open("Makefile.am", "r").read() if old != Makefile: @@ -264,23 +280,23 @@ install-data-local: print "Updated Makefile.am" except: print "Failed to read or save Makefile.am" - # - # Autogenerate the .cvsignore too ... - # - ignore = """.memdump -Makefile.in -Makefile -""" - for example in examples: - ignore = ignore + "%s\n" % (example) - try: - old = open(".cvsignore", "r").read() - if old != ignore: - n = open(".cvsignore", "w").write(ignore) - print "Updated .cvsignore" - except: - print "Failed to read or save .cvsignore" - +# # +# # Autogenerate the .cvsignore too ... DEPRECATED +# # +# ignore = """.memdump +#Makefile.in +#Makefile +#""" +# for example in examples: +# ignore = ignore + "%s\n" % (example) +# try: +# old = open(".cvsignore", "r").read() +# if old != ignore: +# n = open(".cvsignore", "w").write(ignore) +# print "Updated .cvsignore" +# except: +# print "Failed to read or save .cvsignore" + if __name__ == "__main__": load_api() output = open("examples.xml", "w") diff --git a/doc/examples/io1.c b/doc/examples/io1.c index c8a47e3..d077cd8 100644 --- a/doc/examples/io1.c +++ b/doc/examples/io1.c @@ -6,7 +6,7 @@ * XInclude method context to show how dynamic document can * be built in a clean way. * usage: io1 - * test: io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp + * test: io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/io1.res b/doc/examples/io1.res index 4a4c036..adf65c7 100644 --- a/doc/examples/io1.res +++ b/doc/examples/io1.res @@ -1,5 +1,5 @@

List of people:

- ab + ab
diff --git a/doc/examples/io2.c b/doc/examples/io2.c index 814a27e..4676f4a 100644 --- a/doc/examples/io2.c +++ b/doc/examples/io2.c @@ -4,7 +4,7 @@ * purpose: Demonstrate the use of xmlDocDumpMemory * to output document to a character buffer * usage: io2 - * test: io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp + * test: io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res * author: John Fleck * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader1.c b/doc/examples/reader1.c index 90db2a1..e8a005a 100644 --- a/doc/examples/reader1.c +++ b/doc/examples/reader1.c @@ -6,7 +6,7 @@ * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader1 - * test: reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp + * test: reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader2.c b/doc/examples/reader2.c index c32ada5..043b137 100644 --- a/doc/examples/reader2.c +++ b/doc/examples/reader2.c @@ -7,7 +7,7 @@ * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader2 - * test: reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp + * test: reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader3.c b/doc/examples/reader3.c index 51f9d3b..3eeb61f 100644 --- a/doc/examples/reader3.c +++ b/doc/examples/reader3.c @@ -7,7 +7,7 @@ * (Note that the XMLReader functions require libxml2 version later * than 2.6.) * usage: reader3 - * test: reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp + * test: reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res * author: Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/reader4.c b/doc/examples/reader4.c index ed2726a..1289d0d 100644 --- a/doc/examples/reader4.c +++ b/doc/examples/reader4.c @@ -6,7 +6,7 @@ * and parser context. (Note that the XMLReader functions require * libxml2 version later than 2.6.) * usage: reader4 [ filename ... ] - * test: reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp + * test: reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res * author: Graham Bennett * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c index 9bf590f..f662f76 100644 --- a/doc/examples/testWriter.c +++ b/doc/examples/testWriter.c @@ -7,7 +7,7 @@ * do encoding string conversions too. The resulting * documents are then serialized. * usage: testWriter - * test: testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res + * test: testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done * author: Alfred Mickautsch * copy: see Copyright for the status of this software. */ @@ -37,16 +37,16 @@ main(void) LIBXML_TEST_VERSION /* first, the file version */ - testXmlwriterFilename("writer1.res"); + testXmlwriterFilename("writer1.tmp"); /* next, the memory version */ - testXmlwriterMemory("writer2.res"); + testXmlwriterMemory("writer2.tmp"); /* next, the DOM version */ - testXmlwriterDoc("writer3.res"); + testXmlwriterDoc("writer3.tmp"); /* next, the tree version */ - testXmlwriterTree("writer4.res"); + testXmlwriterTree("writer4.tmp"); /* * Cleanup function for the XML library. diff --git a/doc/examples/tree1.c b/doc/examples/tree1.c index 8644cf1..e6faefc 100644 --- a/doc/examples/tree1.c +++ b/doc/examples/tree1.c @@ -5,7 +5,7 @@ * get the root element, then walk the document and print * all the element name in document order. * usage: tree1 filename_or_URL - * test: tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp + * test: tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res * author: Dodji Seketeli * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/tree2.c b/doc/examples/tree2.c index c40fc55..1cd1abe 100644 --- a/doc/examples/tree2.c +++ b/doc/examples/tree2.c @@ -3,7 +3,7 @@ * synopsis: Creates a tree * purpose: Shows how to create document, nodes and dump it to stdout or file. * usage: tree2 -Default output: stdout - * test: tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp + * test: tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res * author: Lucas Brasilino * copy: see Copyright for the status of this software */ diff --git a/doc/examples/xpath1.c b/doc/examples/xpath1.c index f2f7406..0a31650 100644 --- a/doc/examples/xpath1.c +++ b/doc/examples/xpath1.c @@ -4,7 +4,7 @@ * purpose: Shows how to evaluate XPath expression and register * known namespaces in XPath context. * usage: xpath1 [] - * test: ./xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp + * test: xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res * author: Aleksey Sanin * copy: see Copyright for the status of this software. */ diff --git a/doc/examples/xpath2.c b/doc/examples/xpath2.c index 6ff4008..f604114 100644 --- a/doc/examples/xpath2.c +++ b/doc/examples/xpath2.c @@ -4,7 +4,7 @@ * said elements and save the resulting document. * purpose: Shows how to make a full round-trip from a load/edit/save * usage: xpath2 - * test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp + * test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res * author: Aleksey Sanin and Daniel Veillard * copy: see Copyright for the status of this software. */ diff --git a/doc/html/book1.html b/doc/html/book1.html index 6771189..1a58210 100644 --- a/doc/html/book1.html +++ b/doc/html/book1.html @@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline } Reference Manual for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Reference Manual for libxml2

API Menu
API Indexes
Related links

Table of Contents

  • DOCBparser: old DocBook SGML parser
  • HTMLparser: interface for an HTML 4.0 non-verifying parser
  • HTMLtree: specific APIs to process HTML tree, especially serialization
  • SAX: Old SAX version 1 handler, deprecated
  • SAX2: SAX2 parser interface used to build the DOM tree
  • c14n: Provide Canonical XML and Exclusive XML Canonicalization
  • catalog: interfaces to the Catalog handling system
  • chvalid: Unicode character range checking
  • debugXML: Tree debugging APIs
  • dict: string dictionnary
  • encoding: interface for the encoding conversion functions
  • entities: interface for the XML entities handling
  • globals: interface for all global variables of the library
  • hash: Chained hash tables
  • list: lists interfaces
  • nanoftp: minimal FTP implementation
  • nanohttp: minimal HTTP implementation
  • parser: the core parser module
  • parserInternals: internals routines exported by the parser.
  • pattern: pattern expression handling
  • relaxng: implementation of the Relax-NG validation
  • schemasInternals: internal interfaces for XML Schemas
  • schematron: XML Schemastron implementation
  • threads: interfaces for thread handling
  • tree: interfaces for tree manipulation
  • uri: library of generic URI related routines
  • valid: The DTD validation
  • xinclude: implementation of XInclude
  • xlink: unfinished XLink detection module
  • xmlIO: interface for the I/O interfaces used by the parser
  • xmlautomata: API to build regexp automata
  • xmlerror: error handling
  • xmlexports: macros for marking symbols as exportable/importable.
  • xmlmemory: interface for the memory allocator
  • xmlmodule: dynamic module loading
  • xmlreader: the XMLReader implementation
  • xmlregexp: regular expressions handling
  • xmlsave: the XML document serializer
  • xmlschemas: incomplete XML Schemas structure implementation
  • xmlschemastypes: implementation of XML Schema Datatypes
  • xmlstring: set of routines to process strings
  • xmlunicode: Unicode character APIs
  • xmlversion: compile-time version informations
  • xmlwriter: text writing API for XML
  • xpath: XML Path Language implementation
  • xpathInternals: internal interfaces for XML Path Language implementation
  • xpointer: API to handle XML Pointers

Daniel Veillard

+ Reference Manual for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Reference Manual for libxml2

API Menu
API Indexes
Related links

Table of Contents

  • DOCBparser: old DocBook SGML parser
  • HTMLparser: interface for an HTML 4.0 non-verifying parser
  • HTMLtree: specific APIs to process HTML tree, especially serialization
  • SAX: Old SAX version 1 handler, deprecated
  • SAX2: SAX2 parser interface used to build the DOM tree
  • c14n: Provide Canonical XML and Exclusive XML Canonicalization
  • catalog: interfaces to the Catalog handling system
  • chvalid: Unicode character range checking
  • debugXML: Tree debugging APIs
  • dict: string dictionnary
  • encoding: interface for the encoding conversion functions
  • entities: interface for the XML entities handling
  • globals: interface for all global variables of the library
  • hash: Chained hash tables
  • list: lists interfaces
  • nanoftp: minimal FTP implementation
  • nanohttp: minimal HTTP implementation
  • parser: the core parser module
  • parserInternals: internals routines and limits exported by the parser.
  • pattern: pattern expression handling
  • relaxng: implementation of the Relax-NG validation
  • schemasInternals: internal interfaces for XML Schemas
  • schematron: XML Schemastron implementation
  • threads: interfaces for thread handling
  • tree: interfaces for tree manipulation
  • uri: library of generic URI related routines
  • valid: The DTD validation
  • xinclude: implementation of XInclude
  • xlink: unfinished XLink detection module
  • xmlIO: interface for the I/O interfaces used by the parser
  • xmlautomata: API to build regexp automata
  • xmlerror: error handling
  • xmlexports: macros for marking symbols as exportable/importable.
  • xmlmemory: interface for the memory allocator
  • xmlmodule: dynamic module loading
  • xmlreader: the XMLReader implementation
  • xmlregexp: regular expressions handling
  • xmlsave: the XML document serializer
  • xmlschemas: incomplete XML Schemas structure implementation
  • xmlschemastypes: implementation of XML Schema Datatypes
  • xmlstring: set of routines to process strings
  • xmlunicode: Unicode character APIs
  • xmlversion: compile-time version informations
  • xmlwriter: text writing API for XML
  • xpath: XML Path Language implementation
  • xpathInternals: internal interfaces for XML Path Language implementation
  • xpointer: API to handle XML Pointers

Daniel Veillard

diff --git a/doc/html/index.html b/doc/html/index.html index 6771189..1a58210 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline } Reference Manual for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Reference Manual for libxml2

API Menu
API Indexes
Related links

Table of Contents

  • DOCBparser: old DocBook SGML parser
  • HTMLparser: interface for an HTML 4.0 non-verifying parser
  • HTMLtree: specific APIs to process HTML tree, especially serialization
  • SAX: Old SAX version 1 handler, deprecated
  • SAX2: SAX2 parser interface used to build the DOM tree
  • c14n: Provide Canonical XML and Exclusive XML Canonicalization
  • catalog: interfaces to the Catalog handling system
  • chvalid: Unicode character range checking
  • debugXML: Tree debugging APIs
  • dict: string dictionnary
  • encoding: interface for the encoding conversion functions
  • entities: interface for the XML entities handling
  • globals: interface for all global variables of the library
  • hash: Chained hash tables
  • list: lists interfaces
  • nanoftp: minimal FTP implementation
  • nanohttp: minimal HTTP implementation
  • parser: the core parser module
  • parserInternals: internals routines exported by the parser.
  • pattern: pattern expression handling
  • relaxng: implementation of the Relax-NG validation
  • schemasInternals: internal interfaces for XML Schemas
  • schematron: XML Schemastron implementation
  • threads: interfaces for thread handling
  • tree: interfaces for tree manipulation
  • uri: library of generic URI related routines
  • valid: The DTD validation
  • xinclude: implementation of XInclude
  • xlink: unfinished XLink detection module
  • xmlIO: interface for the I/O interfaces used by the parser
  • xmlautomata: API to build regexp automata
  • xmlerror: error handling
  • xmlexports: macros for marking symbols as exportable/importable.
  • xmlmemory: interface for the memory allocator
  • xmlmodule: dynamic module loading
  • xmlreader: the XMLReader implementation
  • xmlregexp: regular expressions handling
  • xmlsave: the XML document serializer
  • xmlschemas: incomplete XML Schemas structure implementation
  • xmlschemastypes: implementation of XML Schema Datatypes
  • xmlstring: set of routines to process strings
  • xmlunicode: Unicode character APIs
  • xmlversion: compile-time version informations
  • xmlwriter: text writing API for XML
  • xpath: XML Path Language implementation
  • xpathInternals: internal interfaces for XML Path Language implementation
  • xpointer: API to handle XML Pointers

Daniel Veillard

+ Reference Manual for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Reference Manual for libxml2

API Menu
API Indexes
Related links

Table of Contents

  • DOCBparser: old DocBook SGML parser
  • HTMLparser: interface for an HTML 4.0 non-verifying parser
  • HTMLtree: specific APIs to process HTML tree, especially serialization
  • SAX: Old SAX version 1 handler, deprecated
  • SAX2: SAX2 parser interface used to build the DOM tree
  • c14n: Provide Canonical XML and Exclusive XML Canonicalization
  • catalog: interfaces to the Catalog handling system
  • chvalid: Unicode character range checking
  • debugXML: Tree debugging APIs
  • dict: string dictionnary
  • encoding: interface for the encoding conversion functions
  • entities: interface for the XML entities handling
  • globals: interface for all global variables of the library
  • hash: Chained hash tables
  • list: lists interfaces
  • nanoftp: minimal FTP implementation
  • nanohttp: minimal HTTP implementation
  • parser: the core parser module
  • parserInternals: internals routines and limits exported by the parser.
  • pattern: pattern expression handling
  • relaxng: implementation of the Relax-NG validation
  • schemasInternals: internal interfaces for XML Schemas
  • schematron: XML Schemastron implementation
  • threads: interfaces for thread handling
  • tree: interfaces for tree manipulation
  • uri: library of generic URI related routines
  • valid: The DTD validation
  • xinclude: implementation of XInclude
  • xlink: unfinished XLink detection module
  • xmlIO: interface for the I/O interfaces used by the parser
  • xmlautomata: API to build regexp automata
  • xmlerror: error handling
  • xmlexports: macros for marking symbols as exportable/importable.
  • xmlmemory: interface for the memory allocator
  • xmlmodule: dynamic module loading
  • xmlreader: the XMLReader implementation
  • xmlregexp: regular expressions handling
  • xmlsave: the XML document serializer
  • xmlschemas: incomplete XML Schemas structure implementation
  • xmlschemastypes: implementation of XML Schema Datatypes
  • xmlstring: set of routines to process strings
  • xmlunicode: Unicode character APIs
  • xmlversion: compile-time version informations
  • xmlwriter: text writing API for XML
  • xpath: XML Path Language implementation
  • xpathInternals: internal interfaces for XML Path Language implementation
  • xpointer: API to handle XML Pointers

Daniel Veillard

diff --git a/doc/html/libxml-dict.html b/doc/html/libxml-dict.html index 2de32b0..bdd21f4 100644 --- a/doc/html/libxml-dict.html +++ b/doc/html/libxml-dict.html @@ -18,10 +18,12 @@ The content of this structure is not made public by the API.
xmlDictPtr	xmlDictCreateSub	(xmlDictPtr sub)
const xmlChar *	xmlDictExists		(xmlDictPtr dict, 
const xmlChar * name,
int len)
void	xmlDictFree			(xmlDictPtr dict)
+
size_t	xmlDictGetUsage			(xmlDictPtr dict)
const xmlChar *	xmlDictLookup		(xmlDictPtr dict, 
const xmlChar * name,
int len)
int	xmlDictOwns			(xmlDictPtr dict, 
const xmlChar * str)
const xmlChar *	xmlDictQLookup		(xmlDictPtr dict, 
const xmlChar * prefix,
const xmlChar * name)
int	xmlDictReference		(xmlDictPtr dict)
+
size_t	xmlDictSetLimit			(xmlDictPtr dict, 
size_t limit)
int	xmlDictSize			(xmlDictPtr dict)
int	xmlInitializeDict		(void)

Description

@@ -37,7 +39,9 @@ The content of this structure is not made public by the API.

Check if the @name exists in the dictionnary @dict.

dict:the dictionnary
name:the name of the userdata
len:the length of the name, if -1 it is recomputed
Returns:the internal copy of the name or NULL if not found.

Function: xmlDictFree

void	xmlDictFree			(xmlDictPtr dict)

Free the hash @dict and its contents. The userdata is deallocated with @f if provided.

-
dict:the dictionnary

Function: xmlDictLookup

const xmlChar *	xmlDictLookup		(xmlDictPtr dict, 
const xmlChar * name,
int len)
+
dict:the dictionnary

Function: xmlDictGetUsage

size_t	xmlDictGetUsage			(xmlDictPtr dict)
+

Get how much memory is used by a dictionary for strings Added in 2.9.0

+
dict:the dictionnary
Returns:the amount of strings allocated

Function: xmlDictLookup

const xmlChar *	xmlDictLookup		(xmlDictPtr dict, 
const xmlChar * name,
int len)

Add the @name to the dictionnary @dict if not present.

dict:the dictionnary
name:the name of the userdata
len:the length of the name, if -1 it is recomputed
Returns:the internal copy of the name or NULL in case of internal error

Function: xmlDictOwns

int	xmlDictOwns			(xmlDictPtr dict, 
const xmlChar * str)

check if a string is owned by the disctionary

@@ -45,8 +49,10 @@ The content of this structure is not made public by the API.

Add the QName @prefix:@name to the hash @dict if not present.

dict:the dictionnary
prefix:the prefix
name:the name
Returns:the internal copy of the QName or NULL in case of internal error

Function: xmlDictReference

int	xmlDictReference		(xmlDictPtr dict)

Increment the reference counter of a dictionary

-
dict:the dictionnary
Returns:0 in case of success and -1 in case of error

Function: xmlDictSize

int	xmlDictSize			(xmlDictPtr dict)
+
dict:the dictionnary
Returns:0 in case of success and -1 in case of error

Function: xmlDictSetLimit

size_t	xmlDictSetLimit			(xmlDictPtr dict, 
size_t limit)
+

Set a size limit for the dictionary Added in 2.9.0

+
dict:the dictionnary
limit:the limit in bytes
Returns:the previous limit of the dictionary or 0

Function: xmlDictSize

int	xmlDictSize			(xmlDictPtr dict)

Query the number of elements installed in the hash @dict.

dict:the dictionnary
Returns:the number of elements in the dictionnary or -1 in case of error

Function: xmlInitializeDict

int	xmlInitializeDict		(void)
-

Do the dictionary mutex initialization. this function is not thread safe, initialization should preferably be done once at startup

+

Do the dictionary mutex initialization. this function is deprecated

Returns:0 if initialization was already done, and 1 if that call led to the initialization

Daniel Veillard

diff --git a/doc/html/libxml-lib.html b/doc/html/libxml-lib.html index 6771189..1a58210 100644 --- a/doc/html/libxml-lib.html +++ b/doc/html/libxml-lib.html @@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline } Reference Manual for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Reference Manual for libxml2

API Menu
API Indexes
Related links

Table of Contents

  • DOCBparser: old DocBook SGML parser
  • HTMLparser: interface for an HTML 4.0 non-verifying parser
  • HTMLtree: specific APIs to process HTML tree, especially serialization
  • SAX: Old SAX version 1 handler, deprecated
  • SAX2: SAX2 parser interface used to build the DOM tree
  • c14n: Provide Canonical XML and Exclusive XML Canonicalization
  • catalog: interfaces to the Catalog handling system
  • chvalid: Unicode character range checking
  • debugXML: Tree debugging APIs
  • dict: string dictionnary
  • encoding: interface for the encoding conversion functions
  • entities: interface for the XML entities handling
  • globals: interface for all global variables of the library
  • hash: Chained hash tables
  • list: lists interfaces
  • nanoftp: minimal FTP implementation
  • nanohttp: minimal HTTP implementation
  • parser: the core parser module
  • parserInternals: internals routines exported by the parser.
  • pattern: pattern expression handling
  • relaxng: implementation of the Relax-NG validation
  • schemasInternals: internal interfaces for XML Schemas
  • schematron: XML Schemastron implementation
  • threads: interfaces for thread handling
  • tree: interfaces for tree manipulation
  • uri: library of generic URI related routines
  • valid: The DTD validation
  • xinclude: implementation of XInclude
  • xlink: unfinished XLink detection module
  • xmlIO: interface for the I/O interfaces used by the parser
  • xmlautomata: API to build regexp automata
  • xmlerror: error handling
  • xmlexports: macros for marking symbols as exportable/importable.
  • xmlmemory: interface for the memory allocator
  • xmlmodule: dynamic module loading
  • xmlreader: the XMLReader implementation
  • xmlregexp: regular expressions handling
  • xmlsave: the XML document serializer
  • xmlschemas: incomplete XML Schemas structure implementation
  • xmlschemastypes: implementation of XML Schema Datatypes
  • xmlstring: set of routines to process strings
  • xmlunicode: Unicode character APIs
  • xmlversion: compile-time version informations
  • xmlwriter: text writing API for XML
  • xpath: XML Path Language implementation
  • xpathInternals: internal interfaces for XML Path Language implementation
  • xpointer: API to handle XML Pointers

Daniel Veillard

+ Reference Manual for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Reference Manual for libxml2

API Menu
API Indexes
Related links

Table of Contents

  • DOCBparser: old DocBook SGML parser
  • HTMLparser: interface for an HTML 4.0 non-verifying parser
  • HTMLtree: specific APIs to process HTML tree, especially serialization
  • SAX: Old SAX version 1 handler, deprecated
  • SAX2: SAX2 parser interface used to build the DOM tree
  • c14n: Provide Canonical XML and Exclusive XML Canonicalization
  • catalog: interfaces to the Catalog handling system
  • chvalid: Unicode character range checking
  • debugXML: Tree debugging APIs
  • dict: string dictionnary
  • encoding: interface for the encoding conversion functions
  • entities: interface for the XML entities handling
  • globals: interface for all global variables of the library
  • hash: Chained hash tables
  • list: lists interfaces
  • nanoftp: minimal FTP implementation
  • nanohttp: minimal HTTP implementation
  • parser: the core parser module
  • parserInternals: internals routines and limits exported by the parser.
  • pattern: pattern expression handling
  • relaxng: implementation of the Relax-NG validation
  • schemasInternals: internal interfaces for XML Schemas
  • schematron: XML Schemastron implementation
  • threads: interfaces for thread handling
  • tree: interfaces for tree manipulation
  • uri: library of generic URI related routines
  • valid: The DTD validation
  • xinclude: implementation of XInclude
  • xlink: unfinished XLink detection module
  • xmlIO: interface for the I/O interfaces used by the parser
  • xmlautomata: API to build regexp automata
  • xmlerror: error handling
  • xmlexports: macros for marking symbols as exportable/importable.
  • xmlmemory: interface for the memory allocator
  • xmlmodule: dynamic module loading
  • xmlreader: the XMLReader implementation
  • xmlregexp: regular expressions handling
  • xmlsave: the XML document serializer
  • xmlschemas: incomplete XML Schemas structure implementation
  • xmlschemastypes: implementation of XML Schema Datatypes
  • xmlstring: set of routines to process strings
  • xmlunicode: Unicode character APIs
  • xmlversion: compile-time version informations
  • xmlwriter: text writing API for XML
  • xpath: XML Path Language implementation
  • xpathInternals: internal interfaces for XML Path Language implementation
  • xpointer: API to handle XML Pointers

Daniel Veillard

diff --git a/doc/html/libxml-parser.html b/doc/html/libxml-parser.html index 461b3fb..98123f7 100644 --- a/doc/html/libxml-parser.html +++ b/doc/html/libxml-parser.html @@ -289,6 +289,7 @@ void xmlParserInputDeallocate (XML_PARSE_HUGE = 524288 : relax any hardcoded limit from the parser XML_PARSE_OLDSAX = 1048576 : parse using SAX2 interface before 2.7.0 XML_PARSE_IGNORE_ENC = 2097152 : ignore internal document encoding hint + XML_PARSE_BIG_LINES = 4194304 : Store big lines numbers in text PSVI field }

Structure xmlSAXHandlerV1

Structure xmlSAXHandlerV1
struct _xmlSAXHandlerV1 { internalSubsetSAXFunc internalSubset @@ -507,9 +508,9 @@ void xmlParserInputDeallocate (xmlChar

Callback for freeing some parser input allocations.

str:the string to deallocate

Function: xmlParserInputGrow

int	xmlParserInputGrow		(xmlParserInputPtr in, 
int len)

This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data

-
in:an XML parser input
len:an indicative size for the lookahead
Returns:the number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity

Function: xmlParserInputRead

int	xmlParserInputRead		(xmlParserInputPtr in, 
int len)
-

This function refresh the input for the parser. It doesn't try to preserve pointers to the input buffer, and discard already read data

-
in:an XML parser input
len:an indicative size for the lookahead
Returns:the number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity

Function: xmlPedanticParserDefault

int	xmlPedanticParserDefault	(int val)
+
in:an XML parser input
len:an indicative size for the lookahead
Returns:the amount of char read, or -1 in case of error, 0 indicate the end of this entity

Function: xmlParserInputRead

int	xmlParserInputRead		(xmlParserInputPtr in, 
int len)
+

This function was internal and is deprecated.

+
in:an XML parser input
len:an indicative size for the lookahead
Returns:-1 as this is an error to use it.

Function: xmlPedanticParserDefault

int	xmlPedanticParserDefault	(int val)

Set and return the previous value for enabling pedantic warnings.

val:int 0 or 1
Returns:the last value for 0 for no substitution, 1 for substitution.

Function: xmlReadDoc

xmlDocPtr	xmlReadDoc		(const xmlChar * cur, 
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree.

diff --git a/doc/html/libxml-parserInternals.html b/doc/html/libxml-parserInternals.html index 681057f..4d1292b 100644 --- a/doc/html/libxml-parserInternals.html +++ b/doc/html/libxml-parserInternals.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module parserInternals from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module parserInternals from libxml2

API Menu
API Indexes
Related links

this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing.

Table of Contents

#define INPUT_CHUNK
#define IS_ASCII_DIGIT
#define IS_ASCII_LETTER
#define IS_BASECHAR
#define IS_BLANK
#define IS_BLANK_CH
#define IS_BYTE_CHAR
#define IS_CHAR
#define IS_CHAR_CH
#define IS_COMBINING
#define IS_COMBINING_CH
#define IS_DIGIT
#define IS_DIGIT_CH
#define IS_EXTENDER
#define IS_EXTENDER_CH
#define IS_IDEOGRAPHIC
#define IS_LETTER
#define IS_LETTER_CH
#define IS_PUBIDCHAR
#define IS_PUBIDCHAR_CH
#define MOVETO_ENDTAG
#define MOVETO_STARTTAG
#define SKIP_EOL
#define XML_MAX_NAMELEN
#define XML_MAX_TEXT_LENGTH
#define XML_SUBSTITUTE_BOTH
#define XML_SUBSTITUTE_NONE
#define XML_SUBSTITUTE_PEREF
#define XML_SUBSTITUTE_REF
htmlParserCtxtPtr	htmlCreateFileParserCtxt	(const char * filename, 
const char * encoding)
+ Module parserInternals from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module parserInternals from libxml2

API Menu
API Indexes
Related links

this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing.

Table of Contents

#define INPUT_CHUNK
#define IS_ASCII_DIGIT
#define IS_ASCII_LETTER
#define IS_BASECHAR
#define IS_BLANK
#define IS_BLANK_CH
#define IS_BYTE_CHAR
#define IS_CHAR
#define IS_CHAR_CH
#define IS_COMBINING
#define IS_COMBINING_CH
#define IS_DIGIT
#define IS_DIGIT_CH
#define IS_EXTENDER
#define IS_EXTENDER_CH
#define IS_IDEOGRAPHIC
#define IS_LETTER
#define IS_LETTER_CH
#define IS_PUBIDCHAR
#define IS_PUBIDCHAR_CH
#define MOVETO_ENDTAG
#define MOVETO_STARTTAG
#define SKIP_EOL
#define XML_MAX_DICTIONARY_LIMIT
#define XML_MAX_LOOKUP_LIMIT
#define XML_MAX_NAMELEN
#define XML_MAX_NAME_LENGTH
#define XML_MAX_TEXT_LENGTH
#define XML_SUBSTITUTE_BOTH
#define XML_SUBSTITUTE_NONE
#define XML_SUBSTITUTE_PEREF
#define XML_SUBSTITUTE_REF
htmlParserCtxtPtr	htmlCreateFileParserCtxt	(const char * filename, 
const char * encoding)
void	htmlInitAutoClose		(void)
xmlParserInputPtr	inputPop	(xmlParserCtxtPtr ctxt)
int	inputPush			(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr value)
@@ -127,8 +127,11 @@ void xmlEntityReferenceFunc (Macro: MOVETO_ENDTAG
#define MOVETO_ENDTAG

Skips to the next '>' char.

Macro: MOVETO_STARTTAG

#define MOVETO_STARTTAG

Skips to the next '<' char.

Macro: SKIP_EOL

#define SKIP_EOL

Skips the end of line chars.

+

Macro: XML_MAX_DICTIONARY_LIMIT

#define XML_MAX_DICTIONARY_LIMIT

Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0

+

Macro: XML_MAX_LOOKUP_LIMIT

#define XML_MAX_LOOKUP_LIMIT

Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on "unfriendly' content Introduced in 2.9.0

Macro: XML_MAX_NAMELEN

#define XML_MAX_NAMELEN

Identifiers can be longer, but this will be more costly at runtime.

-

Macro: XML_MAX_TEXT_LENGTH

#define XML_MAX_TEXT_LENGTH

Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it.

+

Macro: XML_MAX_NAME_LENGTH

#define XML_MAX_NAME_LENGTH

Maximum size allowed for a markup identitier This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of "unfriendly' content Introduced in 2.9.0

+

Macro: XML_MAX_TEXT_LENGTH

#define XML_MAX_TEXT_LENGTH

Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0

Macro: XML_SUBSTITUTE_BOTH

#define XML_SUBSTITUTE_BOTH

Both general and parameter entities need to be substituted.

Macro: XML_SUBSTITUTE_NONE

#define XML_SUBSTITUTE_NONE

If no entities need to be substituted.

Macro: XML_SUBSTITUTE_PEREF

#define XML_SUBSTITUTE_PEREF

Whether parameter entities need to be substituted.

diff --git a/doc/html/libxml-relaxng.html b/doc/html/libxml-relaxng.html index 6d0ce42..1ec3192 100644 --- a/doc/html/libxml-relaxng.html +++ b/doc/html/libxml-relaxng.html @@ -149,7 +149,7 @@ The content of this structure is not made public by the API.

Pop the element end from the RelaxNG validation stack.

ctxt:the RelaxNG validation context
doc:a document instance
elem:an element instance
Returns:1 if no validation problem was found or 0 otherwise

Function: xmlRelaxNGValidatePushCData

int	xmlRelaxNGValidatePushCData	(xmlRelaxNGValidCtxtPtr ctxt, 
const xmlChar * data,
int len)

check the CData parsed for validation in the current stack

-
ctxt:the RelaxNG validation context
data:some character data read
len:the lenght of the data
Returns:1 if no validation problem was found or -1 otherwise

Function: xmlRelaxNGValidatePushElement

int	xmlRelaxNGValidatePushElement	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)
+
ctxt:the RelaxNG validation context
data:some character data read
len:the length of the data
Returns:1 if no validation problem was found or -1 otherwise

Function: xmlRelaxNGValidatePushElement

int	xmlRelaxNGValidatePushElement	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)

Push a new element start on the RelaxNG validation stack.

ctxt:the validation context
doc:a document instance
elem:an element instance
Returns:1 if no validation problem was found or 0 if validating the element requires a full node, and -1 in case of error.

Function type: xmlRelaxNGValidityErrorFunc

Function type: xmlRelaxNGValidityErrorFunc
 void	xmlRelaxNGValidityErrorFunc	(void * ctx, 
const char * msg,
... ...) diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html index eb7c2bc..5d932cb 100644 --- a/doc/html/libxml-tree.html +++ b/doc/html/libxml-tree.html @@ -10,12 +10,15 @@ A:link, A:visited, A:active { text-decoration: underline } Module tree from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module tree from libxml2

API Menu
API Indexes
Related links

this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

Table of Contents

#define BASE_BUFFER_SIZE
#define XML_GET_CONTENT
#define XML_GET_LINE
#define XML_LOCAL_NAMESPACE
#define XML_XML_ID
#define XML_XML_NAMESPACE
#define xmlChildrenNode
#define xmlRootNode
Structure xmlAttr
struct _xmlAttr + Module tree from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module tree from libxml2

API Menu
API Indexes
Related links

this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

Table of Contents

#define BASE_BUFFER_SIZE
#define LIBXML2_NEW_BUFFER
#define XML_GET_CONTENT
#define XML_GET_LINE
#define XML_LOCAL_NAMESPACE
#define XML_XML_ID
#define XML_XML_NAMESPACE
#define xmlChildrenNode
#define xmlRootNode
Structure xmlAttr
struct _xmlAttr
Typedef xmlAttr * xmlAttrPtr
 
Structure xmlAttribute
struct _xmlAttribute
Enum xmlAttributeDefault
 
Typedef xmlAttribute * xmlAttributePtr
 
Enum xmlAttributeType
+
Structure xmlBuf
struct _xmlBuf +The content of this structure is not made public by the API. +
Typedef xmlBuf * xmlBufPtr
 
Structure xmlBuffer
struct _xmlBuffer
Enum xmlBufferAllocationScheme
 
Typedef xmlBuffer * xmlBufferPtr
@@ -67,6 +70,12 @@ A:link, A:visited, A:active { text-decoration: underline }
 
xmlNodePtr	xmlAddPrevSibling	(xmlNodePtr cur, 
xmlNodePtr elem)
xmlNodePtr	xmlAddSibling		(xmlNodePtr cur, 
xmlNodePtr elem)
void	xmlAttrSerializeTxtContent	(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar * string)
+
xmlChar *	xmlBufContent		(const xmlBufPtr buf)
+
xmlChar *	xmlBufEnd		(const xmlBufPtr buf)
+
int	xmlBufGetNodeContent		(xmlBufPtr buf, 
xmlNodePtr cur)
+
size_t	xmlBufNodeDump			(xmlBufPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)
+
size_t	xmlBufShrink			(xmlBufPtr buf, 
size_t len)
+
size_t	xmlBufUse			(const xmlBufPtr buf)
int	xmlBufferAdd			(xmlBufferPtr buf, 
const xmlChar * str,
int len)
int	xmlBufferAddHead		(xmlBufferPtr buf, 
const xmlChar * str,
int len)
int	xmlBufferCCat			(xmlBufferPtr buf, 
const char * str)
@@ -224,6 +233,7 @@ A:link, A:visited, A:active { text-decoration: underline }
int	xmlValidateQName		(const xmlChar * value, 
int space)

Description

Macro: BASE_BUFFER_SIZE

#define BASE_BUFFER_SIZE

default buffer size 4000.

+

Macro: LIBXML2_NEW_BUFFER

#define LIBXML2_NEW_BUFFER

Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0.

Macro: XML_GET_CONTENT

#define XML_GET_CONTENT

Macro to extract the content pointer of a node.

Macro: XML_GET_LINE

#define XML_GET_LINE

Macro to extract the line number of an element node.

Macro: XML_LOCAL_NAMESPACE

#define XML_LOCAL_NAMESPACE

A namespace declaration node.

@@ -279,7 +289,11 @@ A:link, A:visited, A:active { text-decoration: underline } XML_ATTRIBUTE_ENUMERATION = 9 XML_ATTRIBUTE_NOTATION = 10 } -

Structure xmlBuffer

Structure xmlBuffer
struct _xmlBuffer { +

Structure xmlBuf

Structure xmlBuf
struct _xmlBuf { +The content of this structure is not made public by the API. +}
+ A pointer to a buffer structure, the actual structure internals are not public +

Structure xmlBuffer

Structure xmlBuffer
struct _xmlBuffer { xmlChar * content : The buffer content UTF8 unsigned int use : The buffer size used unsigned int size : The buffer size @@ -478,8 +492,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlOutputWriteCallback writecallback xmlOutputCloseCallback closecallback xmlCharEncodingHandlerPtr encoder : I18N conversions to UTF-8 - xmlBufferPtr buffer : Local buffer encoded in UTF-8 or ISOLat - xmlBufferPtr conv : if encoder != NULL buffer for output + xmlBufPtr buffer : Local buffer encoded in UTF-8 or ISOLat + xmlBufPtr conv : if encoder != NULL buffer for output int written : total number of byte written int error }

Structure xmlParserCtxt

Structure xmlParserCtxt
struct _xmlParserCtxt { @@ -571,6 +585,7 @@ A:link, A:visited, A:active { text-decoration: underline } int nodeInfoMax : Max depth of the parsing stack xmlParserNodeInfo * nodeInfoTab : array of nodeInfos int input_id : we need to label inputs + unsigned long sizeentcopy : volume of entity copy }

Structure xmlParserInput

Structure xmlParserInput
struct _xmlParserInput { xmlParserInputBufferPtr buf : UTF-8 encoded buffer const char * filename : The file analyzed, if any @@ -592,8 +607,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlInputReadCallback readcallback xmlInputCloseCallback closecallback xmlCharEncodingHandlerPtr encoder : I18N conversions to UTF-8 - xmlBufferPtr buffer : Local buffer encoded in UTF-8 - xmlBufferPtr raw : if encoder != NULL buffer for raw input + xmlBufPtr buffer : Local buffer encoded in UTF-8 + xmlBufPtr raw : if encoder != NULL buffer for raw input int compressed : -1=unknown, 0=not compressed, 1=compres int error unsigned long rawconsumed : amount consumed from raw @@ -653,7 +668,19 @@ A:link, A:visited, A:active { text-decoration: underline }

Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context.

cur:the child node
elem:the new node
Returns:the new element or NULL in case of error.

Function: xmlAttrSerializeTxtContent

void	xmlAttrSerializeTxtContent	(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar * string)

Serialize text attribute values to an xml simple buffer

-
buf:the XML buffer output
doc:the document
attr:the attribute node
string:the text content

Function: xmlBufferAdd

int	xmlBufferAdd			(xmlBufferPtr buf, 
const xmlChar * str,
int len)
+
buf:the XML buffer output
doc:the document
attr:the attribute node
string:the text content

Function: xmlBufContent

xmlChar *	xmlBufContent		(const xmlBufPtr buf)
+

Function to extract the content of a buffer

+
buf:the buffer
Returns:the internal content

Function: xmlBufEnd

xmlChar *	xmlBufEnd		(const xmlBufPtr buf)
+

Function to extract the end of the content of a buffer

+
buf:the buffer
Returns:the end of the internal content or NULL in case of error

Function: xmlBufGetNodeContent

int	xmlBufGetNodeContent		(xmlBufPtr buf, 
xmlNodePtr cur)
+

Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value

+
buf:a buffer xmlBufPtr
cur:the node being read
Returns:0 in case of success and -1 in case of error.

Function: xmlBufNodeDump

size_t	xmlBufNodeDump			(xmlBufPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)
+

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

+
buf:the XML buffer output
doc:the document
cur:the current node
level:the imbrication level for indenting
format:is formatting allowed
Returns:the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error

Function: xmlBufShrink

size_t	xmlBufShrink			(xmlBufPtr buf, 
size_t len)
+

Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.

+
buf:the buffer to dump
len:the number of xmlChar to remove
Returns:the number of byte removed or 0 in case of failure

Function: xmlBufUse

size_t	xmlBufUse			(const xmlBufPtr buf)
+

Function to get the length of a buffer

+
buf:the buffer
Returns:the length of data in the internal content

Function: xmlBufferAdd

int	xmlBufferAdd			(xmlBufferPtr buf, 
const xmlChar * str,
int len)

Add a string range to an XML buffer. if len == -1, the length of str is recomputed.

buf:the buffer to dump
str:the #xmlChar string
len:the number of #xmlChar to add
Returns:0 successful, a positive error code number otherwise and -1 in case of internal or API error.

Function: xmlBufferAddHead

int	xmlBufferAddHead		(xmlBufferPtr buf, 
const xmlChar * str,
int len)

Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.

@@ -781,7 +808,7 @@ A:link, A:visited, A:active { text-decoration: underline }
doc:the document pointer
Returns:a pointer to the DTD structure or NULL if not found

Function: xmlGetLastChild

xmlNodePtr	xmlGetLastChild		(xmlNodePtr parent)

Search the last child of a node.

parent:the parent node
Returns:the last child or NULL if none.

Function: xmlGetLineNo

long	xmlGetLineNo			(xmlNodePtr node)
-

Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)

+

Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used

node:valid node
Returns:the line number if successful, -1 otherwise

Function: xmlGetNoNsProp

xmlChar *	xmlGetNoNsProp		(xmlNodePtr node, 
const xmlChar * name)

Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to xmlGetProp except it will accept only an attribute in no namespace.

node:the node
name:the attribute name
Returns:the attribute value or NULL if not found. It's up to the caller to free the memory with xmlFree().

Function: xmlGetNodePath

xmlChar *	xmlGetNodePath		(xmlNodePtr node)
@@ -865,7 +892,7 @@ A:link, A:visited, A:active { text-decoration: underline }
cur:the node being modified
content:extra content
len:the size of @content

Function: xmlNodeBufGetContent

int	xmlNodeBufGetContent		(xmlBufferPtr buffer, 
xmlNodePtr cur)

Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value

buffer:a buffer
cur:the node being read
Returns:0 in case of success and -1 in case of error.

Function: xmlNodeDump

int	xmlNodeDump			(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)
-

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

+

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.

buf:the XML buffer output
doc:the document
cur:the current node
level:the imbrication level for indenting
format:is formatting allowed
Returns:the number of bytes written to the buffer or -1 in case of error

Function: xmlNodeDumpOutput

void	xmlNodeDumpOutput		(xmlOutputBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char * encoding)

Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

buf:the XML buffer output
doc:the document
cur:the current node
level:the imbrication level for indenting
format:is formatting allowed
encoding:an optional encoding string

Function: xmlNodeGetBase

xmlChar *	xmlNodeGetBase		(xmlDocPtr doc, 
xmlNodePtr cur)
@@ -938,7 +965,7 @@ A:link, A:visited, A:active { text-decoration: underline }

parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName

name:the full QName
prefix:a xmlChar **
Returns:NULL if not a QName, otherwise the local part, and prefix is updated to get the Prefix if any.

Function: xmlSplitQName3

const xmlChar *	xmlSplitQName3		(const xmlChar * name, 
int * len)

parse an XML qualified name string,i

-
name:the full QName
len:an int *
Returns:NULL if it is not a Qualified Name, otherwise, update len with the lenght in byte of the prefix and return a pointer to the start of the name without the prefix

Function: xmlStringGetNodeList

xmlNodePtr	xmlStringGetNodeList	(xmlDocPtr doc, 
const xmlChar * value)
+
name:the full QName
len:an int *
Returns:NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix

Function: xmlStringGetNodeList

xmlNodePtr	xmlStringGetNodeList	(xmlDocPtr doc, 
const xmlChar * value)

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

doc:the document
value:the value of the attribute
Returns:a pointer to the first child

Function: xmlStringLenGetNodeList

xmlNodePtr	xmlStringLenGetNodeList	(xmlDocPtr doc, 
const xmlChar * value,
int len)

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

@@ -947,7 +974,7 @@ A:link, A:visited, A:active { text-decoration: underline }
node:the node
content:the content
len:@content length
Returns:-1 in case of error, 0 otherwise

Function: xmlTextMerge

xmlNodePtr	xmlTextMerge		(xmlNodePtr first, 
xmlNodePtr second)

Merge two text nodes into one

first:the first text node
second:the second text node being merged
Returns:the first text node augmented

Function: xmlUnlinkNode

void	xmlUnlinkNode			(xmlNodePtr cur)
-

Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it.

+

Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.

cur:the node

Function: xmlUnsetNsProp

int	xmlUnsetNsProp			(xmlNodePtr node, 
xmlNsPtr ns,
const xmlChar * name)

Remove an attribute carried by a node.

node:the node
ns:the namespace definition
name:the attribute name
Returns:0 if successful, -1 if not found

Function: xmlUnsetProp

int	xmlUnsetProp			(xmlNodePtr node, 
const xmlChar * name)
diff --git a/doc/html/libxml-valid.html b/doc/html/libxml-valid.html index 5c15ace..94df436 100644 --- a/doc/html/libxml-valid.html +++ b/doc/html/libxml-valid.html @@ -276,7 +276,7 @@ The content of this structure is not made public by the API.

Pop the element end from the validation stack.

ctxt:the validation context
doc:a document instance
elem:an element instance
qname:the qualified name as appearing in the serialization
Returns:1 if no validation problem was found or 0 otherwise

Function: xmlValidatePushCData

int	xmlValidatePushCData		(xmlValidCtxtPtr ctxt, 
const xmlChar * data,
int len)

check the CData parsed for validation in the current stack

-
ctxt:the validation context
data:some character data read
len:the lenght of the data
Returns:1 if no validation problem was found or 0 otherwise

Function: xmlValidatePushElement

int	xmlValidatePushElement		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * qname)
+
ctxt:the validation context
data:some character data read
len:the length of the data
Returns:1 if no validation problem was found or 0 otherwise

Function: xmlValidatePushElement

int	xmlValidatePushElement		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * qname)

Push a new element start on the validation stack.

ctxt:the validation context
doc:a document instance
elem:an element instance
qname:the qualified name as appearing in the serialization
Returns:1 if no validation problem was found or 0 otherwise

Function: xmlValidateRoot

int	xmlValidateRoot			(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Try to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element

diff --git a/doc/html/libxml-xmlIO.html b/doc/html/libxml-xmlIO.html index e296535..2d2724c 100644 --- a/doc/html/libxml-xmlIO.html +++ b/doc/html/libxml-xmlIO.html @@ -51,6 +51,8 @@ int xmlInputReadCallback (void * context, <
xmlOutputBufferPtr	xmlOutputBufferCreateFilename	(const char * URI, 
xmlCharEncodingHandlerPtr encoder,
int compression)
xmlOutputBufferPtr	xmlOutputBufferCreateIO	(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
xmlCharEncodingHandlerPtr encoder)
int	xmlOutputBufferFlush		(xmlOutputBufferPtr out)
+
const xmlChar *	xmlOutputBufferGetContent	(xmlOutputBufferPtr out)
+
size_t	xmlOutputBufferGetSize		(xmlOutputBufferPtr out)
int	xmlOutputBufferWrite		(xmlOutputBufferPtr out, 
int len,
const char * buf)
int	xmlOutputBufferWriteEscape	(xmlOutputBufferPtr out, 
const xmlChar * str,
xmlCharEncodingOutputFunc escaping)
int	xmlOutputBufferWriteString	(xmlOutputBufferPtr out, 
const char * str)
@@ -153,7 +155,11 @@ int xmlInputReadCallback (void * context,
char * buffer,

Create a buffered output for the progressive saving to an I/O handler

iowrite:an I/O write function
ioclose:an I/O close function
ioctx:an I/O handler
encoder:the charset encoding if known
Returns:the new parser output or NULL

Function: xmlOutputBufferFlush

int	xmlOutputBufferFlush		(xmlOutputBufferPtr out)

flushes the output I/O channel

-
out:a buffered output
Returns:the number of byte written or -1 in case of error.

Function: xmlOutputBufferWrite

int	xmlOutputBufferWrite		(xmlOutputBufferPtr out, 
int len,
const char * buf)
+
out:a buffered output
Returns:the number of byte written or -1 in case of error.

Function: xmlOutputBufferGetContent

const xmlChar *	xmlOutputBufferGetContent	(xmlOutputBufferPtr out)
+

Gives a pointer to the data currently held in the output buffer

+
out:an xmlOutputBufferPtr
Returns:a pointer to the data or NULL in case of error

Function: xmlOutputBufferGetSize

size_t	xmlOutputBufferGetSize		(xmlOutputBufferPtr out)
+

Gives the length of the data currently held in the output buffer

+
out:an xmlOutputBufferPtr
Returns:0 in case or error or no data is held, the size otherwise

Function: xmlOutputBufferWrite

int	xmlOutputBufferWrite		(xmlOutputBufferPtr out, 
int len,
const char * buf)

Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

out:a buffered parser output
len:the size in bytes of the array.
buf:an char array
Returns:the number of chars immediately written, or -1 in case of error.

Function: xmlOutputBufferWriteEscape

int	xmlOutputBufferWriteEscape	(xmlOutputBufferPtr out, 
const xmlChar * str,
xmlCharEncodingOutputFunc escaping)

Write the content of the string in the output I/O buffer This routine escapes the caracters and then handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html index c0ccb53..919d8de 100644 --- a/doc/html/libxml-xmlerror.html +++ b/doc/html/libxml-xmlerror.html @@ -81,6 +81,8 @@ void xmlStructuredErrorFunc (void * userD XML_FROM_MODULE = 26 : The dynamically loaded module modul XML_FROM_I18N = 27 : The module handling character conversion XML_FROM_SCHEMATRONV = 28 : The Schematron validator module + XML_FROM_BUFFER = 29 : The buffers module + XML_FROM_URI = 30 : The URI module }

Enum xmlErrorLevel

Enum xmlErrorLevel {
     XML_ERR_NONE = 0
@@ -199,6 +201,8 @@ void	xmlStructuredErrorFunc		(void * userD
     XML_WAR_ENTITY_REDEFINED = 107 : 107
     XML_ERR_UNKNOWN_VERSION = 108 : 108
     XML_ERR_VERSION_MISMATCH = 109 : 109
+    XML_ERR_NAME_TOO_LONG = 110 : 110
+    XML_ERR_USER_STOP = 111 : 111
     XML_NS_ERR_XML_NAMESPACE = 200
     XML_NS_ERR_UNDEFINED_NAMESPACE = 201 : 201
     XML_NS_ERR_QNAME = 202 : 202
@@ -820,8 +824,7 @@ void	xmlStructuredErrorFunc		(void * userD
     XML_I18N_EXCESS_HANDLER = 6002 : 6002
     XML_I18N_CONV_FAILED = 6003 : 6003
     XML_I18N_NO_OUTPUT = 6004 : 6004
-    XML_CHECK_ = 6005 : 5033
-    XML_CHECK_X = 6006 : 503
+    XML_BUF_OVERFLOW = 7000
 }
 

Function: initGenericErrorDefaultFunc

void	initGenericErrorDefaultFunc	(xmlGenericErrorFunc * handler)

Set or reset (if NULL) the default handler for generic errors to the builtin error function.

diff --git a/doc/html/libxml-xmlmodule.html b/doc/html/libxml-xmlmodule.html index c28c54b..1e25a92 100644 --- a/doc/html/libxml-xmlmodule.html +++ b/doc/html/libxml-xmlmodule.html @@ -32,7 +32,7 @@ The content of this structure is not made public by the API.
module:the module handle
Returns:0 in case of success, -1 in case of argument error and -2 if the module could not be closed/unloaded.

Function: xmlModuleFree

int	xmlModuleFree			(xmlModulePtr module)

The free operations free the data associated to the module but does not unload the associated shared library which may still be in use.

module:the module handle
Returns:0 in case of success, -1 in case of argument error

Function: xmlModuleOpen

xmlModulePtr	xmlModuleOpen		(const char * name, 
int options)
-

Opens a module/shared library given its name or path TODO: options are not yet implemented.

+

Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * . TODO: options are not yet implemented.

name:the module name
options:a set of xmlModuleOption
Returns:a handle for the module or NULL in case of error

Function: xmlModuleSymbol

int	xmlModuleSymbol			(xmlModulePtr module, 
const char * name,
void ** symbol)
-

Lookup for a symbol address in the given module

+

Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * .

module:the module
name:the name of the symbol
symbol:the resulting symbol address
Returns:0 if the symbol was found, or -1 in case of error

Daniel Veillard

diff --git a/doc/html/libxml-xmlregexp.html b/doc/html/libxml-xmlregexp.html index f69cdab..8dda699 100644 --- a/doc/html/libxml-xmlregexp.html +++ b/doc/html/libxml-xmlregexp.html @@ -91,15 +91,15 @@ The content of this structure is not made public by the API.

Free an expression context

ctxt:an expression context

Function: xmlExpGetLanguage

int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** langList,
int len)

Find all the strings used in @exp and store them in @list

-
ctxt:the expression context
exp:the expression
langList:where to store the tokens
len:the allocated lenght of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

Function: xmlExpGetStart

int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** tokList,
int len)
+
ctxt:the expression context
exp:the expression
langList:where to store the tokens
len:the allocated length of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

Function: xmlExpGetStart

int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** tokList,
int len)

Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]

-
ctxt:the expression context
exp:the expression
tokList:where to store the tokens
len:the allocated lenght of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

Function: xmlExpIsNillable

int	xmlExpIsNillable		(xmlExpNodePtr exp)
+
ctxt:the expression context
exp:the expression
tokList:where to store the tokens
len:the allocated length of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

Function: xmlExpIsNillable

int	xmlExpIsNillable		(xmlExpNodePtr exp)

Finds if the expression is nillable, i.e. if it accepts the empty sequqnce

exp:the expression
Returns:1 if nillable, 0 if not and -1 in case of error

Function: xmlExpMaxToken

int	xmlExpMaxToken			(xmlExpNodePtr expr)

Indicate the maximum number of input a expression can accept

expr:a compiled expression
Returns:the maximum length or -1 in case of error

Function: xmlExpNewAtom

xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
const xmlChar * name,
int len)

Get the atom associated to this name from that context

-
ctxt:the expression context
name:the atom name
len:the atom name lenght in byte (or -1);
Returns:the node or NULL in case of error

Function: xmlExpNewCtxt

xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
xmlDictPtr dict)
+
ctxt:the expression context
name:the atom name
len:the atom name length in byte (or -1);
Returns:the node or NULL in case of error

Function: xmlExpNewCtxt

xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
xmlDictPtr dict)

Creates a new context for manipulating expressions

maxNodes:the maximum number of nodes
dict:optional dictionnary to use internally
Returns:the context or NULL in case of error

Function: xmlExpNewOr

xmlExpNodePtr	xmlExpNewOr		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr left,
xmlExpNodePtr right)

Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).

diff --git a/doc/html/libxml-xmlschemas.html b/doc/html/libxml-xmlschemas.html index 18402a0..8cb42a1 100644 --- a/doc/html/libxml-xmlschemas.html +++ b/doc/html/libxml-xmlschemas.html @@ -47,10 +47,15 @@ The content of this structure is not made public by the API.
int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
xmlDocPtr doc)
int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
const char * filename,
int options)
int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
xmlNodePtr elem)
+
void	xmlSchemaValidateSetFilename	(xmlSchemaValidCtxtPtr vctxt, 
const char * filename)
+
void	xmlSchemaValidateSetLocator	(xmlSchemaValidCtxtPtr vctxt, 
xmlSchemaValidityLocatorFunc f,
void * ctxt)
int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)
Function type: xmlSchemaValidityErrorFunc
 void	xmlSchemaValidityErrorFunc	(void * ctx, 
const char * msg,
... ...)
+
Function type: xmlSchemaValidityLocatorFunc
+int	xmlSchemaValidityLocatorFunc	(void * ctx, 
const char ** file,
unsigned long * line) +
Function type: xmlSchemaValidityWarningFunc
 void	xmlSchemaValidityWarningFunc	(void * ctx, 
const char * msg,
... ...)
@@ -162,11 +167,18 @@ The content of this structure is not made public by the API.

Do a schemas validation of the given resource, it will use the SAX streamable validation internally.

ctxt:a schema validation context
filename:the URI of the instance
options:a future set of options, currently unused
Returns:0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.

Function: xmlSchemaValidateOneElement

int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
xmlNodePtr elem)

Validate a branch of a tree, starting with the given @elem.

-
ctxt:a schema validation context
elem:an element node
Returns:0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.

Function: xmlSchemaValidateStream

int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)
+
ctxt:a schema validation context
elem:an element node
Returns:0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.

Function: xmlSchemaValidateSetFilename

void	xmlSchemaValidateSetFilename	(xmlSchemaValidCtxtPtr vctxt, 
const char * filename)
+

Workaround to provide file error reporting information when this is not provided by current APIs

+
vctxt:the schema validation context
filename:the file name

Function: xmlSchemaValidateSetLocator

void	xmlSchemaValidateSetLocator	(xmlSchemaValidCtxtPtr vctxt, 
xmlSchemaValidityLocatorFunc f,
void * ctxt)
+

Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.

+
vctxt:a schema validation context
f:the locator function pointer
ctxt:the locator context

Function: xmlSchemaValidateStream

int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)

Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.

ctxt:a schema validation context
input:the input to use for reading the data
enc:an optional encoding information
sax:a SAX handler for the resulting events
user_data:the context to provide to the SAX handler.
Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

Function type: xmlSchemaValidityErrorFunc

Function type: xmlSchemaValidityErrorFunc
 void	xmlSchemaValidityErrorFunc	(void * ctx, 
const char * msg,
... ...)

Signature of an error callback from an XSD validation

ctx:the validation context
msg:the message
...:extra arguments

+

Function type: xmlSchemaValidityLocatorFunc

Function type: xmlSchemaValidityLocatorFunc
+int	xmlSchemaValidityLocatorFunc	(void * ctx, 
const char ** file,
unsigned long * line) +

A schemas validation locator, a callback called by the validator. This is used when file or node informations are not available to find out what file and line number are affected

ctx:user provided context
file:returned file information
line:returned line information
Returns:0 in case of success and -1 in case of error

Function type: xmlSchemaValidityWarningFunc

Function type: xmlSchemaValidityWarningFunc
 void	xmlSchemaValidityWarningFunc	(void * ctx, 
const char * msg,
... ...)

Signature of a warning callback from an XSD validation

ctx:the validation context
msg:the message
...:extra arguments

diff --git a/doc/html/libxml-xmlversion.html b/doc/html/libxml-xmlversion.html index 2da967c..30e9f0e 100644 --- a/doc/html/libxml-xmlversion.html +++ b/doc/html/libxml-xmlversion.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlversion from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlversion from libxml2

API Menu
API Indexes
Related links

compile-time version informations for the XML library

Table of Contents

#define ATTRIBUTE_UNUSED
#define DEBUG_MEMORY_LOCATION
#define LIBXML_ATTR_ALLOC_SIZE
#define LIBXML_ATTR_FORMAT
#define LIBXML_AUTOMATA_ENABLED
#define LIBXML_C14N_ENABLED
#define LIBXML_CATALOG_ENABLED
#define LIBXML_DEBUG_ENABLED
#define LIBXML_DEBUG_RUNTIME
#define LIBXML_DOCB_ENABLED
#define LIBXML_DOTTED_VERSION
#define LIBXML_EXPR_ENABLED
#define LIBXML_FTP_ENABLED
#define LIBXML_HTML_ENABLED
#define LIBXML_HTTP_ENABLED
#define LIBXML_ICONV_ENABLED
#define LIBXML_ICU_ENABLED
#define LIBXML_ISO8859X_ENABLED
#define LIBXML_LEGACY_ENABLED
#define LIBXML_LZMA_ENABLED
#define LIBXML_MODULES_ENABLED
#define LIBXML_MODULE_EXTENSION
#define LIBXML_OUTPUT_ENABLED
#define LIBXML_PATTERN_ENABLED
#define LIBXML_PUSH_ENABLED
#define LIBXML_READER_ENABLED
#define LIBXML_REGEXP_ENABLED
#define LIBXML_SAX1_ENABLED
#define LIBXML_SCHEMAS_ENABLED
#define LIBXML_SCHEMATRON_ENABLED
#define LIBXML_TEST_VERSION
#define LIBXML_THREAD_ENABLED
#define LIBXML_TREE_ENABLED
#define LIBXML_UNICODE_ENABLED
#define LIBXML_VALID_ENABLED
#define LIBXML_VERSION
#define LIBXML_VERSION_EXTRA
#define LIBXML_VERSION_STRING
#define LIBXML_WRITER_ENABLED
#define LIBXML_XINCLUDE_ENABLED
#define LIBXML_XPATH_ENABLED
#define LIBXML_XPTR_ENABLED
#define LIBXML_ZLIB_ENABLED
#define WITHOUT_TRIO
#define WITH_TRIO
void	xmlCheckVersion			(int version)
+ Module xmlversion from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlversion from libxml2

API Menu
API Indexes
Related links

compile-time version informations for the XML library

Table of Contents

#define ATTRIBUTE_UNUSED
#define DEBUG_MEMORY_LOCATION
#define LIBXML_ATTR_ALLOC_SIZE
#define LIBXML_ATTR_FORMAT
#define LIBXML_AUTOMATA_ENABLED
#define LIBXML_C14N_ENABLED
#define LIBXML_CATALOG_ENABLED
#define LIBXML_DEBUG_ENABLED
#define LIBXML_DEBUG_RUNTIME
#define LIBXML_DOCB_ENABLED
#define LIBXML_DOTTED_VERSION
#define LIBXML_EXPR_ENABLED
#define LIBXML_FTP_ENABLED
#define LIBXML_HTML_ENABLED
#define LIBXML_HTTP_ENABLED
#define LIBXML_ICONV_ENABLED
#define LIBXML_ICU_ENABLED
#define LIBXML_ISO8859X_ENABLED
#define LIBXML_LEGACY_ENABLED
#define LIBXML_LZMA_ENABLED
#define LIBXML_MODULES_ENABLED
#define LIBXML_MODULE_EXTENSION
#define LIBXML_OUTPUT_ENABLED
#define LIBXML_PATTERN_ENABLED
#define LIBXML_PUSH_ENABLED
#define LIBXML_READER_ENABLED
#define LIBXML_REGEXP_ENABLED
#define LIBXML_SAX1_ENABLED
#define LIBXML_SCHEMAS_ENABLED
#define LIBXML_SCHEMATRON_ENABLED
#define LIBXML_TEST_VERSION
#define LIBXML_THREAD_ALLOC_ENABLED
#define LIBXML_THREAD_ENABLED
#define LIBXML_TREE_ENABLED
#define LIBXML_UNICODE_ENABLED
#define LIBXML_VALID_ENABLED
#define LIBXML_VERSION
#define LIBXML_VERSION_EXTRA
#define LIBXML_VERSION_STRING
#define LIBXML_WRITER_ENABLED
#define LIBXML_XINCLUDE_ENABLED
#define LIBXML_XPATH_ENABLED
#define LIBXML_XPTR_ENABLED
#define LIBXML_ZLIB_ENABLED
#define WITHOUT_TRIO
#define WITH_TRIO
void	xmlCheckVersion			(int version)

Description

Macro: ATTRIBUTE_UNUSED

#define ATTRIBUTE_UNUSED

Macro used to signal to GCC unused function parameters

Macro: DEBUG_MEMORY_LOCATION

#define DEBUG_MEMORY_LOCATION

Whether the memory debugging is configured in

@@ -43,6 +43,7 @@ A:link, A:visited, A:active { text-decoration: underline }

Macro: LIBXML_SCHEMAS_ENABLED

#define LIBXML_SCHEMAS_ENABLED

Whether the Schemas validation interfaces are compiled in

Macro: LIBXML_SCHEMATRON_ENABLED

#define LIBXML_SCHEMATRON_ENABLED

Whether the Schematron validation interfaces are compiled in

Macro: LIBXML_TEST_VERSION

#define LIBXML_TEST_VERSION

Macro to check that the libxml version in use is compatible with the version the software has been compiled against

+

Macro: LIBXML_THREAD_ALLOC_ENABLED

#define LIBXML_THREAD_ALLOC_ENABLED

Whether the allocation hooks are per-thread

Macro: LIBXML_THREAD_ENABLED

#define LIBXML_THREAD_ENABLED

Whether the thread support is configured in

Macro: LIBXML_TREE_ENABLED

#define LIBXML_TREE_ENABLED

Whether the DOM like tree manipulation API support is configured in

Macro: LIBXML_UNICODE_ENABLED

#define LIBXML_UNICODE_ENABLED

Whether the Unicode related interfaces are compiled in

diff --git a/doc/html/libxml-xmlwriter.html b/doc/html/libxml-xmlwriter.html index 3fef445..e09ff59 100644 --- a/doc/html/libxml-xmlwriter.html +++ b/doc/html/libxml-xmlwriter.html @@ -34,6 +34,7 @@ The content of this structure is not made public by the API.
int	xmlTextWriterFullEndElement	(xmlTextWriterPtr writer)
int	xmlTextWriterSetIndent		(xmlTextWriterPtr writer, 
int indent)
int	xmlTextWriterSetIndentString	(xmlTextWriterPtr writer, 
const xmlChar * str)
+
int	xmlTextWriterSetQuoteChar	(xmlTextWriterPtr writer, 
xmlChar quotechar)
int	xmlTextWriterStartAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name)
int	xmlTextWriterStartAttributeNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI)
int	xmlTextWriterStartCDATA		(xmlTextWriterPtr writer)
@@ -139,7 +140,9 @@ The content of this structure is not made public by the API.

Set indentation output. indent = 0 do not indentation. indent > 0 do indentation.

writer:the xmlTextWriterPtr
indent:do indentation?
Returns:-1 on error or 0 otherwise.

Function: xmlTextWriterSetIndentString

int	xmlTextWriterSetIndentString	(xmlTextWriterPtr writer, 
const xmlChar * str)

Set string indentation.

-
writer:the xmlTextWriterPtr
str:the xmlChar string
Returns:-1 on error or 0 otherwise.

Function: xmlTextWriterStartAttribute

int	xmlTextWriterStartAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name)
+
writer:the xmlTextWriterPtr
str:the xmlChar string
Returns:-1 on error or 0 otherwise.

Function: xmlTextWriterSetQuoteChar

int	xmlTextWriterSetQuoteChar	(xmlTextWriterPtr writer, 
xmlChar quotechar)
+

Set the character used for quoting attributes.

+
writer:the xmlTextWriterPtr
quotechar:the quote character
Returns:-1 on error or 0 otherwise.

Function: xmlTextWriterStartAttribute

int	xmlTextWriterStartAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name)

Start an xml attribute.

writer:the xmlTextWriterPtr
name:element name
Returns:the bytes written (may be 0 because of buffering) or -1 in case of error

Function: xmlTextWriterStartAttributeNS

int	xmlTextWriterStartAttributeNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI)

Start an xml attribute with namespace support.

diff --git a/doc/html/libxml-xpath.html b/doc/html/libxml-xpath.html index 1731b2a..e47e600 100644 --- a/doc/html/libxml-xpath.html +++ b/doc/html/libxml-xpath.html @@ -81,9 +81,11 @@ void xmlXPathFunction (int xmlXPathIsInf (double val)
int	xmlXPathIsNaN			(double val)
xmlXPathContextPtr	xmlXPathNewContext	(xmlDocPtr doc)
+
xmlXPathObjectPtr	xmlXPathNodeEval	(xmlNodePtr node, 
const xmlChar * str,
xmlXPathContextPtr ctx)
xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)
xmlXPathObjectPtr	xmlXPathObjectCopy	(xmlXPathObjectPtr val)
long	xmlXPathOrderDocElems		(xmlDocPtr doc)
+
int	xmlXPathSetContextNode		(xmlNodePtr node, 
xmlXPathContextPtr ctx)
Function type: xmlXPathVariableLookupFunc
 xmlXPathObjectPtr	xmlXPathVariableLookupFunc	(void * ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)
@@ -167,6 +169,7 @@ The content of this structure is not made public by the API. XPATH_INVALID_CHAR_ERROR = 21 XPATH_INVALID_CTXT = 22 XPATH_STACK_ERROR = 23 + XPATH_FORBID_VARIABLE_ERROR = 24 }

Structure xmlXPathFunct

Structure xmlXPathFunct
struct _xmlXPathFunct { const xmlChar * name : the function name @@ -297,13 +300,17 @@ void xmlXPathFunction (xml

Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/

val:a double value
Returns:1 if the value is a NaN, 0 otherwise

Function: xmlXPathNewContext

xmlXPathContextPtr	xmlXPathNewContext	(xmlDocPtr doc)

Create a new xmlXPathContext

-
doc:the XML document
Returns:the xmlXPathContext just allocated. The caller will need to free it.

Function: xmlXPathNodeSetCreate

xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)
+
doc:the XML document
Returns:the xmlXPathContext just allocated. The caller will need to free it.

Function: xmlXPathNodeEval

xmlXPathObjectPtr	xmlXPathNodeEval	(xmlNodePtr node, 
const xmlChar * str,
xmlXPathContextPtr ctx)
+

Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.

+
node:the node to to use as the context node
str:the XPath expression
ctx:the XPath context
Returns:the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

Function: xmlXPathNodeSetCreate

xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)

Create a new xmlNodeSetPtr of type double and of value @val

val:an initial xmlNodePtr, or NULL
Returns:the newly created object.

Function: xmlXPathObjectCopy

xmlXPathObjectPtr	xmlXPathObjectCopy	(xmlXPathObjectPtr val)

allocate a new copy of a given object

val:the original object
Returns:the newly created object.

Function: xmlXPathOrderDocElems

long	xmlXPathOrderDocElems		(xmlDocPtr doc)

Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element->content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.

-
doc:an input document
Returns:the number of elements found in the document or -1 in case of error.

Function type: xmlXPathVariableLookupFunc

Function type: xmlXPathVariableLookupFunc
+
doc:an input document
Returns:the number of elements found in the document or -1 in case of error.

Function: xmlXPathSetContextNode

int	xmlXPathSetContextNode		(xmlNodePtr node, 
xmlXPathContextPtr ctx)
+

Sets 'node' as the context node. The node must be in the same document as that associated with the context.

+
node:the node to to use as the context node
ctx:the XPath context
Returns:-1 in case of error or 0 if successful

Function type: xmlXPathVariableLookupFunc

Function type: xmlXPathVariableLookupFunc
 xmlXPathObjectPtr	xmlXPathVariableLookupFunc	(void * ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)

Prototype for callbacks used to plug variable lookup in the XPath engine.

ctxt:an XPath context
name:name of the variable
ns_uri:the namespace name hosting this variable
Returns:the XPath object value or NULL if not found.

Daniel Veillard

diff --git a/doc/html/libxml-xpathInternals.html b/doc/html/libxml-xpathInternals.html index 4a6bb2e..f12d808 100644 --- a/doc/html/libxml-xpathInternals.html +++ b/doc/html/libxml-xpathInternals.html @@ -69,9 +69,9 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlNodePtr	xmlXPathNextSelf	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)
xmlNodeSetPtr	xmlXPathNodeLeading	(xmlNodeSetPtr nodes, 
xmlNodePtr node)
xmlNodeSetPtr	xmlXPathNodeLeadingSorted	(xmlNodeSetPtr nodes, 
xmlNodePtr node)
-
void	xmlXPathNodeSetAdd		(xmlNodeSetPtr cur, 
xmlNodePtr val)
-
void	xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
xmlNodePtr node,
xmlNsPtr ns)
-
void	xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur, 
xmlNodePtr val)
+
int	xmlXPathNodeSetAdd		(xmlNodeSetPtr cur, 
xmlNodePtr val)
+
int	xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
xmlNodePtr node,
xmlNsPtr ns)
+
int	xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur, 
xmlNodePtr val)
int	xmlXPathNodeSetContains		(xmlNodeSetPtr cur, 
xmlNodePtr val)
void	xmlXPathNodeSetDel		(xmlNodeSetPtr cur, 
xmlNodePtr val)
void	xmlXPathNodeSetFreeNs		(xmlNsPtr ns)
@@ -275,13 +275,13 @@ A:link, A:visited, A:active { text-decoration: underline }

Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called.

nodes:a node-set
node:a node
Returns:the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

Function: xmlXPathNodeLeadingSorted

xmlNodeSetPtr	xmlXPathNodeLeadingSorted	(xmlNodeSetPtr nodes, 
xmlNodePtr node)

Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)

-
nodes:a node-set, sorted by document order
node:a node
Returns:the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

Function: xmlXPathNodeSetAdd

void	xmlXPathNodeSetAdd		(xmlNodeSetPtr cur, 
xmlNodePtr val)
+
nodes:a node-set, sorted by document order
node:a node
Returns:the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

Function: xmlXPathNodeSetAdd

int	xmlXPathNodeSetAdd		(xmlNodeSetPtr cur, 
xmlNodePtr val)

add a new xmlNodePtr to an existing NodeSet

-
cur:the initial node set
val:a new xmlNodePtr

Function: xmlXPathNodeSetAddNs

void	xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
xmlNodePtr node,
xmlNsPtr ns)
+
cur:the initial node set
val:a new xmlNodePtr
Returns:0 in case of success, and -1 in case of error

Function: xmlXPathNodeSetAddNs

int	xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
xmlNodePtr node,
xmlNsPtr ns)

add a new namespace node to an existing NodeSet

-
cur:the initial node set
node:the hosting node
ns:a the namespace node

Function: xmlXPathNodeSetAddUnique

void	xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur, 
xmlNodePtr val)
+
cur:the initial node set
node:the hosting node
ns:a the namespace node
Returns:0 in case of success and -1 in case of error

Function: xmlXPathNodeSetAddUnique

int	xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur, 
xmlNodePtr val)

add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set.

-
cur:the initial node set
val:a new xmlNodePtr

Function: xmlXPathNodeSetContains

int	xmlXPathNodeSetContains		(xmlNodeSetPtr cur, 
xmlNodePtr val)
+
cur:the initial node set
val:a new xmlNodePtr
Returns:0 in case of success and -1 in case of failure

Function: xmlXPathNodeSetContains

int	xmlXPathNodeSetContains		(xmlNodeSetPtr cur, 
xmlNodePtr val)

checks whether @cur contains @val

cur:the node-set
val:the node
Returns:true (1) if @cur contains @val, false (0) otherwise

Function: xmlXPathNodeSetDel

void	xmlXPathNodeSetDel		(xmlNodeSetPtr cur, 
xmlNodePtr val)

Removes an xmlNodePtr from an existing NodeSet

diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 3bca246..45bceb5 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -372,10 +372,12 @@ Daniel Veillard + + @@ -715,10 +717,11 @@ + - + @@ -880,7 +883,7 @@ - internals routines exported by the parser. + internals routines and limits exported by the parser. this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing. Daniel Veillard @@ -895,14 +898,17 @@ + + + @@ -1406,13 +1412,14 @@ this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree Daniel Veillard - + - + + @@ -1475,7 +1482,7 @@ - + @@ -1486,7 +1493,7 @@ - + @@ -1496,6 +1503,7 @@ + @@ -1504,6 +1512,7 @@ + @@ -1541,8 +1550,9 @@ - + + @@ -1554,15 +1564,16 @@ - + - + + @@ -1608,6 +1619,7 @@ + @@ -1631,6 +1643,7 @@ + @@ -1638,6 +1651,7 @@ + @@ -1682,12 +1696,13 @@ - + + @@ -1922,9 +1937,11 @@ + + @@ -2030,7 +2047,7 @@ - + @@ -2274,6 +2291,7 @@ + @@ -2379,7 +2397,6 @@ - @@ -2449,7 +2466,7 @@ - + @@ -2576,6 +2593,7 @@ + @@ -2591,7 +2609,7 @@ - + @@ -2666,7 +2684,6 @@ - @@ -2674,6 +2691,7 @@ + @@ -2688,6 +2706,7 @@ + @@ -2730,6 +2749,7 @@ + @@ -3076,12 +3096,14 @@ + + @@ -3090,6 +3112,7 @@ + @@ -3396,6 +3419,7 @@ + @@ -3415,7 +3439,7 @@ - + @@ -3437,7 +3461,7 @@ - + @@ -3463,8 +3487,9 @@ - + + @@ -3527,6 +3552,7 @@ + @@ -3567,6 +3593,7 @@ + @@ -3601,6 +3628,7 @@ + @@ -3931,6 +3959,9 @@ Same as IS_PUBIDCHAR but for single-byte value + + Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0. + Macro used to indicate to GCC this is an allocator function @@ -4020,6 +4051,9 @@ Macro to check that the libxml version in use is compatible with the version the software has been compiled against + + Whether the allocation hooks are per-thread + Whether the thread support is configured in @@ -4149,11 +4183,20 @@ A namespace declaration node. + + Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0 + + + Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on "unfriendly' content Introduced in 2.9.0 + Identifiers can be longer, but this will be more costly at runtime. + + Maximum size allowed for a markup identitier This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of "unfriendly' content Introduced in 2.9.0 + - Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. + Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0 Special constant found in SAX2 blocks initialized fields @@ -4664,6 +4707,7 @@ + @@ -4710,7 +4754,6 @@ - @@ -4749,7 +4792,6 @@ - @@ -4888,6 +4930,7 @@ and not by parsing an instance'/> + @@ -4924,6 +4967,7 @@ and not by parsing an instance'/> + @@ -4939,6 +4983,7 @@ and not by parsing an instance'/> + @@ -4960,8 +5005,9 @@ and not by parsing an instance'/> - + + @@ -5081,6 +5127,7 @@ and not by parsing an instance'/> + @@ -5089,7 +5136,7 @@ crash if you try to modify the tree)'/> - + @@ -5827,6 +5874,7 @@ crash if you try to modify the tree)'/> + @@ -5970,6 +6018,10 @@ if necessary or NULL'/> A state int the automata description, + + + A pointer to a buffer structure, the actual structure internals are not public + @@ -6140,7 +6192,8 @@ set at the end of parsing'/> +* references done from that entity +* and if it contains '<''/> @@ -6287,8 +6340,8 @@ set at the end of parsing'/> - - + + @@ -6390,6 +6443,7 @@ actually an xmlCharEncoding'/> + @@ -6418,8 +6472,8 @@ actually an xmlCharEncoding'/> - - + + @@ -8507,6 +8561,43 @@ Could we use @subtypes for this?'/> + + Function to extract the content of a buffer + + + + + Function to extract the end of the content of a buffer + + + + + Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value + + + + + + defined(LIBXML_OUTPUT_ENABLED) + Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called + + + + + + + + + Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type. + + + + + + Function to get the length of a buffer + + + Add a string range to an XML buffer. if len == -1, the length of str is recomputed. @@ -9430,6 +9521,11 @@ Could we use @subtypes for this?'/> + + Get how much memory is used by a dictionary for strings Added in 2.9.0 + + + Add the @name to the dictionnary @dict if not present. @@ -9455,6 +9551,12 @@ Could we use @subtypes for this?'/> + + Set a size limit for the dictionary Added in 2.9.0 + + + + Query the number of elements installed in the hash @dict. @@ -9687,7 +9789,7 @@ Could we use @subtypes for this?'/> - + defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED) @@ -9696,7 +9798,7 @@ Could we use @subtypes for this?'/> - + defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED) @@ -9716,7 +9818,7 @@ Could we use @subtypes for this?'/> - + defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED) @@ -10132,7 +10234,7 @@ Could we use @subtypes for this?'/> - Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1) + Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used @@ -10536,7 +10638,7 @@ Could we use @subtypes for this?'/> - Do the dictionary mutex initialization. this function is not thread safe, initialization should preferably be done once at startup + Do the dictionary mutex initialization. this function is deprecated @@ -10984,14 +11086,14 @@ Could we use @subtypes for this?'/> defined(LIBXML_MODULES_ENABLED) - Opens a module/shared library given its name or path TODO: options are not yet implemented. + Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * . TODO: options are not yet implemented. defined(LIBXML_MODULES_ENABLED) - Lookup for a symbol address in the given module + Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * . @@ -11661,7 +11763,7 @@ Could we use @subtypes for this?'/> defined(LIBXML_OUTPUT_ENABLED) - Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called + Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead. @@ -11835,6 +11937,18 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_OUTPUT_ENABLED) + Gives a pointer to the data currently held in the output buffer + + + + + defined(LIBXML_OUTPUT_ENABLED) + Gives the length of the data currently held in the output buffer + + + defined(LIBXML_OUTPUT_ENABLED) Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes. @@ -12382,13 +12496,13 @@ Could we use @subtypes for this?'/> This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data - + - This function refresh the input for the parser. It doesn't try to preserve pointers to the input buffer, and discard already read data - + This function was internal and is deprecated. + @@ -13008,7 +13122,7 @@ Could we use @subtypes for this?'/> - + defined(LIBXML_SCHEMAS_ENABLED) @@ -13917,6 +14031,21 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_SCHEMAS_ENABLED) + Workaround to provide file error reporting information when this is not provided by current APIs + + + + + + defined(LIBXML_SCHEMAS_ENABLED) + Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator. + + + + + defined(LIBXML_SCHEMAS_ENABLED) Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one. @@ -13935,6 +14064,14 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_SCHEMAS_ENABLED) + A schemas validation locator, a callback called by the validator. This is used when file or node informations are not available to find out what file and line number are affected + + + + + defined(LIBXML_SCHEMAS_ENABLED) Signature of a warning callback from an XSD validation @@ -14320,7 +14457,7 @@ Could we use @subtypes for this?'/> parse an XML qualified name string,i - + @@ -15133,6 +15270,13 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_WRITER_ENABLED) + Set the character used for quoting attributes. + + + + defined(LIBXML_WRITER_ENABLED) Start an xml attribute. @@ -16799,7 +16943,7 @@ Could we use @subtypes for this?'/> - Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. + Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent. @@ -17031,7 +17175,7 @@ Could we use @subtypes for this?'/> - + defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) @@ -17765,6 +17909,14 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_XPATH_ENABLED) + Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored. + + + + + defined(LIBXML_XPATH_ENABLED) Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called. @@ -17782,14 +17934,14 @@ Could we use @subtypes for this?'/> defined(LIBXML_XPATH_ENABLED) add a new xmlNodePtr to an existing NodeSet - + defined(LIBXML_XPATH_ENABLED) add a new namespace node to an existing NodeSet - + @@ -17797,7 +17949,7 @@ Could we use @subtypes for this?'/> defined(LIBXML_XPATH_ENABLED) add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set. - + @@ -18051,6 +18203,13 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_XPATH_ENABLED) + Sets 'node' as the context node. The node must be in the same document as that associated with the context. + + + + defined(LIBXML_XPATH_ENABLED) Implement the starts-with() XPath function boolean starts-with(string, string) The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false. diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa index 574f83b..ee6203d 100644 --- a/doc/libxml2.xsa +++ b/doc/libxml2.xsa @@ -8,59 +8,142 @@ libxml2 - 2.7.8 - Nov 4 2010 + 2.8.0 + May 23 2012 http://xmlsoft.org/ - - Features: - 480323 add code to plug in ICU converters by default (Giuseppe Iuculano), - Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg) + - Features: + add lzma compression support (Anders F Bjorklund) - - Documentation: - Fix devhelp documentation installation (Mike Hommey), - Fix web site encoding problems (Daniel Veillard), - Fix a couple of typo in HTML parser error messages (Michael Day), - Forgot to update the news page for 0.7.7 (Daniel Veillard) + - Documentation: + xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä), + Update README.tests (Daniel Veillard), + URI handling code is not OOM resilient (Daniel Veillard), + Fix an error in comment (Daniel Veillard), + Fixed bug #617016 (Daniel Mustieles), + Fixed two typos in the README document (Daniel Neel), + add generated html files (Anders F Bjorklund), + Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard), + Improve documentation a bit (Daniel Veillard), + Updated URL for lxml python bindings (Daniel Veillard) - - Portability: - 607273 Fix python detection on MSys/Windows (LRN), - 614087 Fix Socket API usage to allow Windows64 compilation (Ozkan Sezer), - Fix compilation with Clang (Koop Mast), - Fix Win32 build (Rob Richards) + - Portability: + Restore code for Windows compilation (Daniel Veillard), + Remove git error message during configure (Christian Dywan), + xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer), + remove a bashism in confgure.in (John Hein), + undef ERROR if already defined (Patrick R. Gansterer), + Fix library problems with mingw-w64 (Michael Cronenworth), + fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards), + prefer native threads on win32 (Sam Thursfield), + Allow to compile with Visual Studio 2010 (Thomas Lemm), + Fix mingw's snprintf configure check (Andoni Morales), + fixed a 64bit big endian issue (Marcus Meissner), + Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard), + Fix windows build from lzma addition (Rob Richards), + autogen: Only check for libtoolize (Colin Walters), + Fix the Windows build files (Patrick von Reth), + 634846 Remove a linking option breaking Windows VC10 (Daniel Veillard), + 599241 fix an initialization problem on Win64 (Andrew W. Nosenko), + fix win build (Rob Richards) - - Bug Fixes: - 595789 fix a remaining potential Solaris problem (Daniel Veillard), - 617468 fix progressive HTML parsing with style using "'" (Denis Pauk), - 616478 Fix xmllint shell write command (Gwenn Kahz), - 614005 Possible erroneous HTML parsing on unterminated script (Pierre Belzile), - 627987 Fix XSD IDC errors in imported schemas (Jim Panetta), - 629325 XPath rounding errors first cleanup (Phil Shafer), - 630140 fix iso995x encoding error (Daniel Veillard), - make sure htmlCtxtReset do reset the disableSAX field (Daniel Veillard), - Fix a change of semantic on XPath preceding and following axis (Daniel Veillard), - Fix a potential segfault due to weak symbols on pthreads (Mike Hommey), - Fix a leak in XPath compilation (Daniel Veillard), - Fix the semantic of XPath axis for namespace/attribute context nodes (Daniel Veillard), - Avoid a descriptor leak in catalog loading code (Carlo Bramini), - Fix a small bug in XPath evaluation code (Marius Wachtler), - Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard), - Fix errors in XSD double validation check (Csaba Raduly), - Fix handling of apos in URIs (Daniel Veillard), - xmlTextReaderReadOuterXml should handle DTD (Rob Richards), - Autogen.sh needs to create m4 directory (Rob Richards) + - Bug fixes: + Part for rand_r checking missing (Daniel Veillard), + Cleanup on randomization (Daniel Veillard), + Fix undefined reference in python module (Pacho Ramos), + Fix a race in xmlNewInputStream (Daniel Veillard), + Fix weird streaming RelaxNG errors (Noam), + Fix various bugs in new code raised by the API checking (Daniel Veillard), + Fix various problems with "make dist" (Daniel Veillard), + Fix a memory leak in the xzlib code (Daniel Veillard), + HTML parser error with <noscript> in the <head> (Denis Pauk), + XSD: optional element in complex type extension (Remi Gacogne), + Fix html serialization error and htmlSetMetaEncoding() (Daniel Veillard), + Fix a wrong return value in previous patch (Daniel Veillard), + Fix an uninitialized variable use (Daniel Veillard), + Fix a compilation problem with --minimum (Brandon Slack), + Remove redundant and ungarded include of resolv.h (Daniel Veillard), + xinclude with parse="text" does not use the entity loader (Shaun McCance), + Allow to parse 1 byte HTML files (Denis Pauk), + Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag (Martin Schröder), + Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li), + Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott), + xmlParseNodeInContext problems with an empty document (Tim Elliott), + HTML element position is not detected propperly (Pavel Andrejs), + Fix an off by one pointer access (Jüri Aedla), + Try to fix a problem with entities in SAX mode (Daniel Veillard), + Fix a crash with xmllint --path on empty results (Daniel Veillard), + Fixed bug #667946 (Daniel Mustieles), + Fix a logic error in Schemas Component Constraints (Ryan Sleevi), + Fix a wrong enum type use in Schemas Types (Nico Weber), + Fix SAX2 builder in case of undefined attributes namespace (Daniel Veillard), + Fix SAX2 builder in case of undefined element namespaces (Daniel Veillard), + fix reference to STDOUT_FILENO on MSVC (Tay Ray Chuan), + fix a pair of possible out of array char references (Daniel Veillard), + Fix an allocation error when copying entities (Daniel Veillard), + Make sure the parser returns when getting a Stop order (Chris Evans), + Fix some potential problems on reallocation failures(parser.c) (Xia Xinfeng), + Fix a schema type duration comparison overflow (Daniel Veillard), + Fix an unimplemented part in RNG value validation (Daniel Veillard), + Fix missing error status in XPath evaluation (Daniel Veillard), + Hardening of XPath evaluation (Daniel Veillard), + Fix an off by one error in encoding (Daniel Veillard), + Fix RELAX NG include bug #655288 (Shaun McCance), + Fix XSD validation bug #630130 (Toyoda Eizi), + Fix some potential problems on reallocation failures (Chris Evans), + __xmlRaiseError: fix use of the structured callback channel (Dmitry V. Levin), + __xmlRaiseError: fix the structured callback channel's data initialization (Dmitry V. Levin), + Fix memory corruption when xmlParseBalancedChunkMemoryInternal is called from xmlParseBalancedChunk (Rob Richards), + Small fix for previous commit (Daniel Veillard), + Fix a potential freeing error in XPath (Daniel Veillard), + Fix a potential memory access error (Daniel Veillard), + Reactivate the shared library versionning script (Daniel Veillard) - - Improvements: - 606592 update language ID parser to RFC 5646 (Daniel Veillard), - Sort python generated stubs (Mike Hommey), - Add an HTML parser option to avoid a default doctype (Daniel Veillard) + - Improvements: + use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime (Roumen Petrov), + New symbols added for the next release (Daniel Veillard), + xmlTextReader bails too quickly on error (Andy Lutomirski), + Use a hybrid allocation scheme in xmlNodeSetContent (Conrad Irwin), + Use buffers when constructing string node lists. (Conrad Irwin), + Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk), + wrong message for double hyphen in comment XML error (Bryan Henderson), + Fix "make tst" to grab lzma lib too (Daniel Veillard), + Add "whereis" command to xmllint shell (Ryan), + Improve xmllint shell (Ryan), + add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky), + Add --system support to autogen.sh (Daniel Veillard), + Add hash randomization to hash and dict structures (Daniel Veillard), + included xzlib in dist (Anders F Bjorklund), + move xz/lzma helpers to separate included files (Anders F Bjorklund), + add generated devhelp files (Anders F Bjorklund), + add XML_WITH_LZMA to api (Anders F Bjorklund), + autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters), + Improve the error report on undefined REFs (Daniel Veillard), + Add exception for new W3C PI xml-model (Daniel Veillard), + Add options to ignore the internal encoding (Daniel Veillard), + testapi: use the right type for the check (Stefan Kost), + various: handle return values of write calls (Stefan Kost), + testWriter: xmlTextWriterWriteFormatElement wants an int instead of a long int (Stefan Kost), + runxmlconf: update to latest testsuite version (Stefan Kost), + configure: add -Wno-long-long to CFLAGS (Stefan Kost), + configure: support silent automake rules if possible (Stefan Kost), + xmlmemory: add a cast as size_t has no portable printf modifier (Stefan Kost), + __xmlRaiseError: remove redundant schannel initialization (Dmitry V. Levin), + __xmlRaiseError: do cheap code check early (Dmitry V. Levin) - - Cleanups: - 618831 don't ship generated files in git (Adrian Bunk), - Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P (Adrian Bunk), - Various cleanups on encoding handling (Daniel Veillard), - Fix xmllint to use format=1 for default formatting (Adam Spragg), - Force _xmlSaveCtxt.format to be 0 or 1 (Adam Spragg), - Cleanup encoding pointer comparison (Nikolay Sivov), - Small code cleanup on previous patch (Daniel Veillard) + - Cleanups: + Cleanups before 2.8.0-rc2 (Daniel Veillard), + Avoid an extra operation (Daniel Veillard), + Remove vestigial de-ANSI-fication support. (Javier Jardón), + autogen.sh: Fix typo (Javier Jardón), + Do not use unsigned but unsigned int (Daniel Veillard), + Remove two references to u_short (Daniel Veillard), + Fix -Wempty-body warning from clang (Nico Weber), + Cleanups of lzma support (Daniel Veillard), + Augment the list of ignored files (Daniel Veillard), + python: remove unused variable (Stefan Kost), + python: flag two unused args (Stefan Kost), + configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost), + xpath: remove unused variable (Stefan Kost) diff --git a/doc/news.html b/doc/news.html index 1e7da8e..dcea8e7 100644 --- a/doc/news.html +++ b/doc/news.html @@ -7,13 +7,136 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Releases
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

Releases

Main Menu
Related links

Items not finished and worked on, get in touch with the list if you want -to help those

The change log describes the recents commits -to the SVN code base.

Here is the list of public releases:

2.8.0: May 23 2012