summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2013-06-09 00:17:44 +0800
committerAron Xu <aron@debian.org>2013-06-09 00:17:44 +0800
commit2c8fe012ef1ff6e0613480dd182dec099aa9636e (patch)
treef220f4e6733d3204aef57831a8dee2dd8551ed40 /doc
parent3c845c4be476dc0ecb93388de9cfedb3f611e6a8 (diff)
downloadlibxml2-2c8fe012ef1ff6e0613480dd182dec099aa9636e.tar.gz
Imported Upstream version 2.9.1upstream/2.9.1
Diffstat (limited to 'doc')
-rw-r--r--doc/APIchunk10.html3
-rw-r--r--doc/APIchunk12.html1
-rw-r--r--doc/APIchunk13.html1
-rw-r--r--doc/APIchunk14.html1
-rw-r--r--doc/APIchunk16.html1
-rw-r--r--doc/APIchunk18.html6
-rw-r--r--doc/APIchunk2.html1
-rw-r--r--doc/APIchunk21.html1
-rw-r--r--doc/APIchunk22.html2
-rw-r--r--doc/APIchunk23.html1
-rw-r--r--doc/APIchunk24.html4
-rw-r--r--doc/APIchunk25.html1
-rw-r--r--doc/APIchunk26.html1
-rw-r--r--doc/APIchunk28.html1
-rw-r--r--doc/APIchunk4.html1
-rw-r--r--doc/APIchunk5.html1
-rw-r--r--doc/APIchunk7.html1
-rw-r--r--doc/APIconstructors.html1
-rw-r--r--doc/APIfiles.html4
-rw-r--r--doc/APIfunctions.html5
-rw-r--r--doc/APIsymbols.html4
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/Makefile.in55
-rwxr-xr-xdoc/apibuild.py3258
-rw-r--r--doc/devhelp/Makefile.in31
-rw-r--r--doc/devhelp/libxml2-dict.html2
-rw-r--r--doc/devhelp/libxml2-relaxng.html2
-rw-r--r--doc/devhelp/libxml2-tree.html3
-rw-r--r--doc/devhelp/libxml2-valid.html2
-rw-r--r--doc/devhelp/libxml2-xmlerror.html1
-rw-r--r--doc/devhelp/libxml2-xmlregexp.html6
-rw-r--r--doc/devhelp/libxml2-xmlversion.html5
-rw-r--r--doc/devhelp/libxml2-xpath.html10
-rw-r--r--doc/devhelp/libxml2.devhelp4
-rw-r--r--doc/examples/Makefile.in26
-rw-r--r--doc/html/libxml-dict.html2
-rw-r--r--doc/html/libxml-relaxng.html2
-rw-r--r--doc/html/libxml-tree.html3
-rw-r--r--doc/html/libxml-valid.html2
-rw-r--r--doc/html/libxml-xmlerror.html1
-rw-r--r--doc/html/libxml-xmlregexp.html6
-rw-r--r--doc/html/libxml-xmlversion.html3
-rw-r--r--doc/html/libxml-xpath.html10
-rw-r--r--doc/html/libxml-xzlib.html16
-rw-r--r--doc/libxml2-api.xml41
-rw-r--r--doc/symbols.xml4
-rw-r--r--doc/xml.html2
-rw-r--r--doc/xmllint.1611
-rw-r--r--doc/xmllint.xml14
49 files changed, 2285 insertions, 1880 deletions
diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html
index 4c9f892..22d5061 100644
--- a/doc/APIchunk10.html
+++ b/doc/APIchunk10.html
@@ -314,7 +314,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
-</dd><dt>allocation</dt><dd><a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+</dd><dt>allocation</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html
index 05a6b80..113385b 100644
--- a/doc/APIchunk12.html
+++ b/doc/APIchunk12.html
@@ -657,6 +657,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
</dd><dt>contains</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html
index c5d3e6a..b1f069d 100644
--- a/doc/APIchunk13.html
+++ b/doc/APIchunk13.html
@@ -242,6 +242,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html
index b30962c..2eac2f6 100644
--- a/doc/APIchunk14.html
+++ b/doc/APIchunk14.html
@@ -313,6 +313,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a><br />
<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
</dd><dt>evaulation</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a><br />
diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html
index 20e90a7..92d3845 100644
--- a/doc/APIchunk16.html
+++ b/doc/APIchunk16.html
@@ -281,6 +281,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
</dd><dt>holds</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+</dd><dt>hooks</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
</dd><dt>host</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html
index c7eb589..90249a1 100644
--- a/doc/APIchunk18.html
+++ b/doc/APIchunk18.html
@@ -184,12 +184,6 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlstring.html#xmlStrndup">xmlStrndup</a><br />
<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
-</dd><dt>lenght</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
-<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
-<a href="html/libxml-xmlregexp.html#xmlExpNewAtom">xmlExpNewAtom</a><br />
-<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
-<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
-<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
</dd><dt>length-1</dt><dd><a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
</dd><dt>less</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html
index 7fba0b5..1d10f93 100644
--- a/doc/APIchunk2.html
+++ b/doc/APIchunk2.html
@@ -330,6 +330,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
</dd><dt>Evaluates</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html
index 9c03080..c655198 100644
--- a/doc/APIchunk21.html
+++ b/doc/APIchunk21.html
@@ -135,7 +135,6 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
-<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html
index bf76a9c..2f20018 100644
--- a/doc/APIchunk22.html
+++ b/doc/APIchunk22.html
@@ -151,6 +151,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>per-thread</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
</dd><dt>performance</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
</dd><dt>performed</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
@@ -295,7 +296,6 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
</dd><dt>preferably</dt><dd><a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
-<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html
index 2908b82..16c7c21 100644
--- a/doc/APIchunk23.html
+++ b/doc/APIchunk23.html
@@ -522,6 +522,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>restored</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
</dd><dt>restrict</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
</dd><dt>restriction</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a><br />
<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a><br />
diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html
index cd45121..e81f34d 100644
--- a/doc/APIchunk24.html
+++ b/doc/APIchunk24.html
@@ -40,7 +40,6 @@ A:link, A:visited, A:active { text-decoration: underline }
</h2><h2>Letter s:</h2><dl><dt>s390</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
</dd><dt>safe</dt><dd><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br />
<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
-<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
</dd><dt>safety</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
@@ -68,6 +67,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
</dd><dt>save</dt><dd><a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
@@ -645,7 +645,6 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>startup</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
-<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
@@ -902,6 +901,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
</dd><dt>successfully</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html
index de57ec4..dec65ba 100644
--- a/doc/APIchunk25.html
+++ b/doc/APIchunk25.html
@@ -173,7 +173,6 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
-<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
<a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html
index 50e814f..17666cf 100644
--- a/doc/APIchunk26.html
+++ b/doc/APIchunk26.html
@@ -298,6 +298,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>void</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>volume</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
<a href="APIchunk1.html">C-C</a>
<a href="APIchunk2.html">D-E</a>
diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html
index a009f5f..c5993f9 100644
--- a/doc/APIchunk28.html
+++ b/doc/APIchunk28.html
@@ -498,6 +498,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html
index cbafa23..d26883b 100644
--- a/doc/APIchunk4.html
+++ b/doc/APIchunk4.html
@@ -91,6 +91,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
</dd><dt>Location</dt><dd><a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
</dd><dt>LocationSet</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html
index e4c9550..da60d1a 100644
--- a/doc/APIchunk5.html
+++ b/doc/APIchunk5.html
@@ -149,6 +149,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
</dd><dt>Path</dt><dd><a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
</dd><dt>People</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
</dd><dt>PhoneticExtensions</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a><br />
diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html
index c556bb2..3f46f99 100644
--- a/doc/APIchunk7.html
+++ b/doc/APIchunk7.html
@@ -185,6 +185,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
</dd><dt>Setting</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html
index c6c4475..d5ca488 100644
--- a/doc/APIconstructors.html
+++ b/doc/APIconstructors.html
@@ -571,6 +571,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
diff --git a/doc/APIfiles.html b/doc/APIfiles.html
index 498f6e4..65e004b 100644
--- a/doc/APIfiles.html
+++ b/doc/APIfiles.html
@@ -2026,6 +2026,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_ERR_UNSUPPORTED_ENCODING">XML_ERR_UNSUPPORTED_ENCODING</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_URI_FRAGMENT">XML_ERR_URI_FRAGMENT</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_URI_REQUIRED">XML_ERR_URI_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_USER_STOP">XML_ERR_USER_STOP</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_VALUE_REQUIRED">XML_ERR_VALUE_REQUIRED</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISSING">XML_ERR_VERSION_MISSING</a><br />
@@ -3199,6 +3200,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
@@ -3396,6 +3398,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpath.html#xmlXPathNAN">xmlXPathNAN</a><br />
<a href="html/libxml-xpath.html#xmlXPathNINF">xmlXPathNINF</a><br />
<a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
<a href="html/libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a><br />
<a href="html/libxml-xpath.html#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a><br />
@@ -3408,6 +3411,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpath.html#xmlXPathPINF">xmlXPathPINF</a><br />
<a href="html/libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a><br />
<a href="html/libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
<a href="html/libxml-xpath.html#xmlXPathType">xmlXPathType</a><br />
<a href="html/libxml-xpath.html#xmlXPathTypePtr">xmlXPathTypePtr</a><br />
<a href="html/libxml-xpath.html#xmlXPathVariable">xmlXPathVariable</a><br />
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html
index 68eeb14..3c47863 100644
--- a/doc/APIfunctions.html
+++ b/doc/APIfunctions.html
@@ -489,6 +489,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
@@ -1582,6 +1583,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
@@ -1592,6 +1594,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
@@ -2226,6 +2229,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
@@ -2238,6 +2242,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html
index fa9f4c8..c2b82e7 100644
--- a/doc/APIsymbols.html
+++ b/doc/APIsymbols.html
@@ -92,6 +92,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a><br />
<a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
@@ -425,6 +426,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_ERR_UNSUPPORTED_ENCODING">XML_ERR_UNSUPPORTED_ENCODING</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_URI_FRAGMENT">XML_ERR_URI_FRAGMENT</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_URI_REQUIRED">XML_ERR_URI_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_USER_STOP">XML_ERR_USER_STOP</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_VALUE_REQUIRED">XML_ERR_VALUE_REQUIRED</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a><br />
<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISSING">XML_ERR_VERSION_MISSING</a><br />
@@ -3467,6 +3469,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
@@ -3528,6 +3531,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathSetArityError">xmlXPathSetArityError</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathSetError">xmlXPathSetError</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathSetTypeError">xmlXPathSetTypeError</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a><br />
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 08c0b45..0cc0a50 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -143,6 +143,7 @@ EXTRA_DIST = \
html/libxml-xpath.html \
html/libxml-xpathInternals.html \
html/libxml-xpointer.html \
+ html/libxml-xzlib.html \
html/right.png \
html/up.png \
index.html \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 92e08cd..997026a 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 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,
@@ -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@
@@ -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/||"`;; \
@@ -222,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@
@@ -279,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@
@@ -495,6 +517,7 @@ EXTRA_DIST = \
html/libxml-xpath.html \
html/libxml-xpathInternals.html \
html/libxml-xpointer.html \
+ html/libxml-xzlib.html \
html/right.png \
html/up.png \
index.html \
@@ -634,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"; \
@@ -849,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; \
diff --git a/doc/apibuild.py b/doc/apibuild.py
index 25f0210..b5b669a 100755
--- a/doc/apibuild.py
+++ b/doc/apibuild.py
@@ -84,51 +84,51 @@ ignored_words = {
}
def escape(raw):
- raw = string.replace(raw, '&', '&amp;')
- raw = string.replace(raw, '<', '&lt;')
- raw = string.replace(raw, '>', '&gt;')
- raw = string.replace(raw, "'", '&apos;')
- raw = string.replace(raw, '"', '&quot;')
+ raw = raw.replace('&', '&amp;')
+ raw = raw.replace('<', '&lt;')
+ raw = raw.replace('>', '&gt;')
+ raw = raw.replace("'", '&apos;')
+ raw = raw.replace('"', '&quot;')
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):
@@ -146,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
@@ -172,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):
@@ -406,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
@@ -608,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
@@ -813,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
@@ -1023,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
@@ -1113,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
@@ -1252,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
@@ -1269,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
@@ -1471,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
@@ -1607,490 +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:
- 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 string.find(file, excl) != -1:
- print "Skipping %s" % file
- 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(" <enum name='%s' file='%s'" % (name,
- self.modulename_file(id.header)))
- if id.info != None:
- info = id.info
- if info[0] != None and info[0] != '':
- try:
- val = eval(info[0])
- except:
- val = info[0]
- output.write(" value='%s'" % (val));
- if info[2] != None and info[2] != '':
- output.write(" type='%s'" % info[2]);
- if info[1] != None and info[1] != '':
- output.write(" info='%s'" % escape(info[1]));
+ self.modulename_file(id.header)))
+ if id.info != None:
+ info = id.info
+ if info[0] != None and info[0] != '':
+ try:
+ val = eval(info[0])
+ except:
+ val = info[0]
+ output.write(" value='%s'" % (val));
+ if info[2] != None and info[2] != '':
+ output.write(" type='%s'" % info[2]);
+ if info[1] != None and info[1] != '':
+ output.write(" info='%s'" % escape(info[1]));
output.write("/>\n")
def serialize_macro(self, output, name):
id = self.idx.macros[name]
output.write(" <macro name='%s' file='%s'>\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(" <info>%s</info>\n" % (escape(desc)))
- self.indexString(name, desc)
- for arg in args:
- (name, desc) = arg
- if desc != None and desc != "":
- output.write(" <arg name='%s' info='%s'/>\n" % (
- name, escape(desc)))
- self.indexString(name, desc)
- else:
- output.write(" <arg name='%s'/>\n" % (name))
+ (args, desc) = id.info
+ if desc != None and desc != "":
+ output.write(" <info>%s</info>\n" % (escape(desc)))
+ self.indexString(name, desc)
+ for arg in args:
+ (name, desc) = arg
+ if desc != None and desc != "":
+ output.write(" <arg name='%s' info='%s'/>\n" % (
+ name, escape(desc)))
+ self.indexString(name, desc)
+ else:
+ output.write(" <arg name='%s'/>\n" % (name))
except:
pass
output.write(" </macro>\n")
def serialize_typedef(self, output, name):
id = self.idx.typedefs[name]
- if id.info[0:7] == 'struct ':
- output.write(" <struct name='%s' file='%s' type='%s'" % (
- name, self.modulename_file(id.header), id.info))
- name = id.info[7:]
- if self.idx.structs.has_key(name) and ( \
- type(self.idx.structs[name].info) == type(()) or
- type(self.idx.structs[name].info) == type([])):
- 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(" <field name='%s' type='%s' info='%s'/>\n" % (field[1] , field[0], desc))
- except:
- print "Failed to serialize struct %s" % (name)
- output.write(" </struct>\n")
- else:
- output.write("/>\n");
- else :
- output.write(" <typedef name='%s' file='%s' type='%s'" % (
- name, self.modulename_file(id.header), id.info))
+ if id.info[0:7] == 'struct ':
+ output.write(" <struct name='%s' file='%s' type='%s'" % (
+ name, self.modulename_file(id.header), id.info))
+ name = id.info[7:]
+ if name in self.idx.structs and ( \
+ type(self.idx.structs[name].info) == type(()) or
+ type(self.idx.structs[name].info) == type([])):
+ 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(" <field name='%s' type='%s' info='%s'/>\n" % (field[1] , field[0], desc))
+ except:
+ print("Failed to serialize struct %s" % (name))
+ output.write(" </struct>\n")
+ else:
+ output.write("/>\n");
+ else :
+ output.write(" <typedef name='%s' file='%s' type='%s'" % (
+ name, self.modulename_file(id.header), id.info))
try:
- desc = id.extra
- if desc != None and desc != "":
- output.write(">\n <info>%s</info>\n" % (escape(desc)))
- output.write(" </typedef>\n")
- else:
- output.write("/>\n")
- except:
- output.write("/>\n")
+ desc = id.extra
+ if desc != None and desc != "":
+ output.write(">\n <info>%s</info>\n" % (escape(desc)))
+ output.write(" </typedef>\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(" <variable name='%s' file='%s' type='%s'/>\n" % (
- name, self.modulename_file(id.header), id.info))
- else:
- output.write(" <variable name='%s' file='%s'/>\n" % (
- name, self.modulename_file(id.header)))
+ if id.info != None:
+ output.write(" <variable name='%s' file='%s' type='%s'/>\n" % (
+ name, self.modulename_file(id.header), id.info))
+ else:
+ output.write(" <variable name='%s' file='%s'/>\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 + " &amp;&amp; "
- apstr = apstr + cond
- output.write(" <cond>%s</cond>\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(" <info>%s</info>\n" % (escape(desc)))
- self.indexString(name, desc)
- if ret[0] != None:
- if ret[0] == "void":
- output.write(" <return type='void'/>\n")
- else:
- output.write(" <return type='%s' info='%s'/>\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(" <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
- else:
- output.write(" <arg name='%s' type='%s' info='%s'/>\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 + " &amp;&amp; "
+ apstr = apstr + cond
+ output.write(" <cond>%s</cond>\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(" <info>%s</info>\n" % (escape(desc)))
+ self.indexString(name, desc)
+ if ret[0] != None:
+ if ret[0] == "void":
+ output.write(" <return type='void'/>\n")
+ else:
+ output.write(" <return type='%s' info='%s'/>\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(" <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
+ else:
+ output.write(" <arg name='%s' type='%s' info='%s'/>\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(" </%s>\n" % (id.type))
def serialize_exports(self, output, file):
module = self.modulename_file(file)
- output.write(" <file name='%s'>\n" % (module))
- dict = self.headers[file]
- if dict.info != None:
- for data in ('Summary', 'Description', 'Author'):
- try:
- output.write(" <%s>%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(" <deprecated/>\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(" <exports symbol='%s' type='macro'/>\n" % (id))
- ids = dict.enums.keys()
- ids.sort()
- for id in uniq(ids):
- output.write(" <exports symbol='%s' type='enum'/>\n" % (id))
- ids = dict.typedefs.keys()
- ids.sort()
- for id in uniq(ids):
- output.write(" <exports symbol='%s' type='typedef'/>\n" % (id))
- ids = dict.structs.keys()
- ids.sort()
- for id in uniq(ids):
- output.write(" <exports symbol='%s' type='struct'/>\n" % (id))
- ids = dict.variables.keys()
- ids.sort()
- for id in uniq(ids):
- output.write(" <exports symbol='%s' type='variable'/>\n" % (id))
- ids = dict.functions.keys()
- ids.sort()
- for id in uniq(ids):
- output.write(" <exports symbol='%s' type='function'/>\n" % (id))
- output.write(" </file>\n")
+ output.write(" <file name='%s'>\n" % (module))
+ dict = self.headers[file]
+ if dict.info != None:
+ for data in ('Summary', 'Description', 'Author'):
+ try:
+ output.write(" <%s>%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(" <deprecated/>\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(" <exports symbol='%s' type='macro'/>\n" % (id))
+ ids = list(dict.enums.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='enum'/>\n" % (id))
+ ids = list(dict.typedefs.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='typedef'/>\n" % (id))
+ ids = list(dict.structs.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='struct'/>\n" % (id))
+ ids = list(dict.variables.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='variable'/>\n" % (id))
+ ids = list(dict.functions.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='function'/>\n" % (id))
+ output.write(" </file>\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(" <file name='%s'>\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(" <ref name='%s'/>\n" % (id))
- output.write(" </file>\n")
+ module = self.modulename_file(file)
+ output.write(" <file name='%s'>\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(" <ref name='%s'/>\n" % (id))
+ output.write(" </file>\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(" <type name='%s'>\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(" <ref name='%s'/>\n" % (id))
- pid = id
- output.write(" </type>\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(" <type name='%s'>\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(" <ref name='%s'/>\n" % (id))
+ pid = id
+ output.write(" </type>\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(" <type name='%s'>\n" % (type))
- ids = funcs[type]
- ids.sort()
- for id in ids:
- output.write(" <ref name='%s'/>\n" % (id))
- output.write(" </type>\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(" <type name='%s'>\n" % (type))
+ ids = funcs[type]
+ ids.sort()
+ for id in ids:
+ output.write(" <ref name='%s'/>\n" % (id))
+ output.write(" </type>\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(" </letter>\n")
- letter = id[0]
- output.write(" <letter name='%s'>\n" % (letter))
- output.write(" <ref name='%s'/>\n" % (id))
- if letter != None:
- output.write(" </letter>\n")
+ letter = None
+ ids = list(self.idx.identifiers.keys())
+ ids.sort()
+ for id in ids:
+ if id[0] != letter:
+ if letter != None:
+ output.write(" </letter>\n")
+ letter = id[0]
+ output.write(" <letter name='%s'>\n" % (letter))
+ output.write(" <ref name='%s'/>\n" % (id))
+ if letter != None:
+ output.write(" </letter>\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(" <reference name='%s' href='%s'/>\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(" <reference name='%s' href='%s'/>\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(" </letter>\n")
- output.write(" </chunk>\n")
- count = 0
- chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
- output.write(" <chunk name='chunk%s'>\n" % (chunk))
- first_letter = id[0]
- chunk = chunk + 1
- elif letter != None:
- output.write(" </letter>\n")
- letter = id[0]
- output.write(" <letter name='%s'>\n" % (letter))
- output.write(" <word name='%s'>\n" % (id))
- tokens = index[id];
- tokens.sort()
- tok = None
- for token in tokens:
- if tok == token:
- continue
- tok = token
- output.write(" <ref name='%s'/>\n" % (token))
- count = count + 1
- output.write(" </word>\n")
- if letter != None:
- output.write(" </letter>\n")
- output.write(" </chunk>\n")
- if count != 0:
- chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
- output.write(" <chunks>\n")
- for ch in chunks:
- output.write(" <chunk name='%s' start='%s' end='%s'/>\n" % (
- ch[0], ch[1], ch[2]))
- output.write(" </chunks>\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(" </letter>\n")
+ output.write(" </chunk>\n")
+ count = 0
+ chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+ output.write(" <chunk name='chunk%s'>\n" % (chunk))
+ first_letter = id[0]
+ chunk = chunk + 1
+ elif letter != None:
+ output.write(" </letter>\n")
+ letter = id[0]
+ output.write(" <letter name='%s'>\n" % (letter))
+ output.write(" <word name='%s'>\n" % (id))
+ tokens = index[id];
+ tokens.sort()
+ tok = None
+ for token in tokens:
+ if tok == token:
+ continue
+ tok = token
+ output.write(" <ref name='%s'/>\n" % (token))
+ count = count + 1
+ output.write(" </word>\n")
+ if letter != None:
+ output.write(" </letter>\n")
+ output.write(" </chunk>\n")
+ if count != 0:
+ chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+ output.write(" <chunks>\n")
+ for ch in chunks:
+ output.write(" <chunk name='%s' start='%s' end='%s'/>\n" % (
+ ch[0], ch[1], ch[2]))
+ output.write(" </chunks>\n")
def serialize_xrefs(self, output):
- output.write(" <references>\n")
- self.serialize_xrefs_references(output)
- output.write(" </references>\n")
- output.write(" <alpha>\n")
- self.serialize_xrefs_alpha(output)
- output.write(" </alpha>\n")
- output.write(" <constructors>\n")
- self.serialize_xrefs_constructors(output)
- output.write(" </constructors>\n")
- output.write(" <functions>\n")
- self.serialize_xrefs_functions(output)
- output.write(" </functions>\n")
- output.write(" <files>\n")
- self.serialize_xrefs_files(output)
- output.write(" </files>\n")
- output.write(" <index>\n")
- self.serialize_xrefs_index(output)
- output.write(" </index>\n")
+ output.write(" <references>\n")
+ self.serialize_xrefs_references(output)
+ output.write(" </references>\n")
+ output.write(" <alpha>\n")
+ self.serialize_xrefs_alpha(output)
+ output.write(" </alpha>\n")
+ output.write(" <constructors>\n")
+ self.serialize_xrefs_constructors(output)
+ output.write(" </constructors>\n")
+ output.write(" <functions>\n")
+ self.serialize_xrefs_functions(output)
+ output.write(" </functions>\n")
+ output.write(" <files>\n")
+ self.serialize_xrefs_files(output)
+ output.write(" </files>\n")
+ output.write(" <index>\n")
+ self.serialize_xrefs_index(output)
+ output.write(" </index>\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('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
output.write("<api name='%s'>\n" % self.name)
output.write(" <files>\n")
- headers = self.headers.keys()
+ headers = list(self.headers.keys())
headers.sort()
for file in headers:
self.serialize_exports(output, file)
output.write(" </files>\n")
output.write(" <symbols>\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)
@@ -2099,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('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
output.write("<apirefs name='%s'>\n" % self.name)
@@ -2111,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
#
@@ -2148,4 +2148,4 @@ if __name__ == "__main__":
debug = 1
parse(sys.argv[1])
else:
- rebuild()
+ rebuild()
diff --git a/doc/devhelp/Makefile.in b/doc/devhelp/Makefile.in
index 711f2cd..5d09d76 100644
--- a/doc/devhelp/Makefile.in
+++ b/doc/devhelp/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 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,
@@ -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@
@@ -56,6 +73,11 @@ 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/||"`;; \
@@ -182,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@
@@ -239,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@
@@ -421,8 +443,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dist_devhelpDATA: $(dist_devhelp_DATA)
@$(NORMAL_INSTALL)
- test -z "$(devhelpdir)" || $(MKDIR_P) "$(DESTDIR)$(devhelpdir)"
@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"; \
diff --git a/doc/devhelp/libxml2-dict.html b/doc/devhelp/libxml2-dict.html
index dd42a01..fd5f6b9 100644
--- a/doc/devhelp/libxml2-dict.html
+++ b/doc/devhelp/libxml2-dict.html
@@ -125,7 +125,7 @@ The content of this structure is not made public by the API.
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionnary or -1 in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlInitializeDict"/>xmlInitializeDict ()</h3><pre class="programlisting">int xmlInitializeDict (void)<br/>
-</pre><p>Do the dictionary mutex initialization. this function is not thread safe, initialization should preferably be done once at startup</p>
+</pre><p>Do the dictionary mutex initialization. this function is deprecated</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if initialization was already done, and 1 if that call led to the initialization</td></tr></tbody></table></div></div>
<hr/>
</div>
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.
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushCData"/>xmlRelaxNGValidatePushCData ()</h3><pre class="programlisting">int xmlRelaxNGValidatePushCData (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len)<br/>
</pre><p>check the CData parsed for validation in the current stack</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the lenght of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 otherwise</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushElement"/>xmlRelaxNGValidatePushElement ()</h3><pre class="programlisting">int xmlRelaxNGValidatePushElement (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
</pre><p>Push a new element start on the RelaxNG validation stack.</p>
diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html
index ca76d03..90c3903 100644
--- a/doc/devhelp/libxml2-tree.html
+++ b/doc/devhelp/libxml2-tree.html
@@ -812,6 +812,7 @@ The content of this structure is not made public by the API.
int nodeInfoMax : Max depth of the parsing stack
<a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfoTab : array of nodeInfos
int input_id : we need to label inputs
+ unsigned long sizeentcopy : volume of entity copy
} xmlParserCtxt;
</pre><p/>
</div>
@@ -1544,7 +1545,7 @@ The content of this structure is not made public by the API.
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSplitQName3"/>xmlSplitQName3 ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName3 (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int * len)<br/>
</pre><p>parse an XML qualified name string,i</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an int *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>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</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an int *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>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</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlStringGetNodeList"/>xmlStringGetNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringGetNodeList (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
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.
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlValidatePushCData"/>xmlValidatePushCData ()</h3><pre class="programlisting">int xmlValidatePushCData (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len)<br/>
</pre><p>check the CData parsed for validation in the current stack</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the lenght of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlValidatePushElement"/>xmlValidatePushElement ()</h3><pre class="programlisting">int xmlValidatePushElement (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname)<br/>
</pre><p>Push a new element start on the validation stack.</p>
diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html
index 4ebaa60..27f7836 100644
--- a/doc/devhelp/libxml2-xmlerror.html
+++ b/doc/devhelp/libxml2-xmlerror.html
@@ -252,6 +252,7 @@ void <a href="#xmlResetError">xmlResetError</a> (<a href="libxml2-xmlerror.htm
<a name="XML_ERR_UNKNOWN_VERSION">XML_ERR_UNKNOWN_VERSION</a> = 108 /* 108 */
<a name="XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a> = 109 /* 109 */
<a name="XML_ERR_NAME_TOO_LONG">XML_ERR_NAME_TOO_LONG</a> = 110 /* 110 */
+ <a name="XML_ERR_USER_STOP">XML_ERR_USER_STOP</a> = 111 /* 111 */
<a name="XML_NS_ERR_XML_NAMESPACE">XML_NS_ERR_XML_NAMESPACE</a> = 200
<a name="XML_NS_ERR_UNDEFINED_NAMESPACE">XML_NS_ERR_UNDEFINED_NAMESPACE</a> = 201 /* 201 */
<a name="XML_NS_ERR_QNAME">XML_NS_ERR_QNAME</a> = 202 /* 202 */
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.
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlExpGetLanguage"/>xmlExpGetLanguage ()</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br/> int len)<br/>
</pre><p>Find all the strings used in @exp and store them in @list</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlExpGetStart"/>xmlExpGetStart ()</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br/> int len)<br/>
</pre><p>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]</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlExpIsNillable"/>xmlExpIsNillable ()</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br/>
</pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p>
@@ -196,7 +196,7 @@ The content of this structure is not made public by the API.
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlExpNewAtom"/>xmlExpNewAtom ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewAtom (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len)<br/>
</pre><p>Get the atom associated to this name from that context</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the atom name</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the atom name lenght in byte (or -1);</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the atom name</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the atom name length in byte (or -1);</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlExpNewCtxt"/>xmlExpNewCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> xmlExpNewCtxt (int maxNodes, <br/> <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
</pre><p>Creates a new context for manipulating expressions</p>
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 <a href="#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a>;
#define <a href="#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a>;
#define <a href="#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a>;
+#define <a href="#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a>;
#define <a href="#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a>;
#define <a href="#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a>;
#define <a href="#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a>;
@@ -221,6 +222,10 @@ void <a href="#xmlCheckVersion">xmlCheckVersion</a> (int version);
</pre><p>Macro to check that the libxml version in use is compatible with the version the software has been compiled against</p>
</div>
<hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_THREAD_ALLOC_ENABLED">Macro </a>LIBXML_THREAD_ALLOC_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a>;
+</pre><p>Whether the allocation hooks are per-thread</p>
+</div>
+ <hr/>
<div class="refsect2" lang="en"><h3><a name="LIBXML_THREAD_ENABLED">Macro </a>LIBXML_THREAD_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a>;
</pre><p>Whether the thread support is configured in</p>
</div>
diff --git a/doc/devhelp/libxml2-xpath.html b/doc/devhelp/libxml2-xpath.html
index d2a0afc..640c715 100644
--- a/doc/devhelp/libxml2-xpath.html
+++ b/doc/devhelp/libxml2-xpath.html
@@ -70,6 +70,7 @@ typedef <a href="libxml2-xpath.html#xmlXPathAxis">xmlXPathAxis</a> * <a href="#x
typedef struct _xmlXPathParserContext <a href="#xmlXPathParserContext">xmlXPathParserContext</a>;
int <a href="#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);
typedef <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNodeEval">xmlXPathNodeEval</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
int <a href="#xmlXPathIsNaN">xmlXPathIsNaN</a> (double val);
int <a href="#xmlXPathContextSetCache">xmlXPathContextSetCache</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> int active, <br/> int value, <br/> int options);
@@ -104,6 +105,7 @@ int <a href="#xmlXPathCmpNodes">xmlXPathCmpNodes</a> (<a href="libxml2-tree.htm
<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
typedef void <a href="#xmlXPathEvalFunc">xmlXPathEvalFunc</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a> (int val);
+int <a href="#xmlXPathSetContextNode">xmlXPathSetContextNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
int <a href="#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a> (double val);
void <a href="#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj);
void <a href="#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a> (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp);
@@ -514,6 +516,10 @@ The content of this structure is not made public by the API.
</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated. The caller will need to free it.</td></tr></tbody></table></div></div>
<hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeEval"/>xmlXPathNodeEval ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNodeEval (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
+</pre><p>Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
<div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetCreate"/>xmlXPathNodeSetCreate ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetCreate (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
</pre><p>Create a new <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> of type double and of value @val</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlNodePtr, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
@@ -526,6 +532,10 @@ The content of this structure is not made public by the API.
</pre><p>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-&gt;content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an input document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements found in the document or -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSetContextNode"/>xmlXPathSetContextNode ()</h3><pre class="programlisting">int xmlXPathSetContextNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
+</pre><p>Sets 'node' as the context node. The node must be in the same document as that associated with the context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error or 0 if successful</td></tr></tbody></table></div></div>
+ <hr/>
</div>
</div>
</body>
diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp
index 3005571..282546a 100644
--- a/doc/devhelp/libxml2.devhelp
+++ b/doc/devhelp/libxml2.devhelp
@@ -122,6 +122,7 @@
<function name="LIBXML_SCHEMAS_ENABLED" link="libxml2-xmlversion.html#LIBXML_SCHEMAS_ENABLED"/>
<function name="LIBXML_SCHEMATRON_ENABLED" link="libxml2-xmlversion.html#LIBXML_SCHEMATRON_ENABLED"/>
<function name="LIBXML_TEST_VERSION" link="libxml2-xmlversion.html#LIBXML_TEST_VERSION"/>
+ <function name="LIBXML_THREAD_ALLOC_ENABLED" link="libxml2-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED"/>
<function name="LIBXML_THREAD_ENABLED" link="libxml2-xmlversion.html#LIBXML_THREAD_ENABLED"/>
<function name="LIBXML_TREE_ENABLED" link="libxml2-xmlversion.html#LIBXML_TREE_ENABLED"/>
<function name="LIBXML_UNICODE_ENABLED" link="libxml2-xmlversion.html#LIBXML_UNICODE_ENABLED"/>
@@ -614,6 +615,7 @@
<function name="XML_ERR_UNSUPPORTED_ENCODING" link="libxml2-xmlerror.html#XML_ERR_UNSUPPORTED_ENCODING"/>
<function name="XML_ERR_URI_FRAGMENT" link="libxml2-xmlerror.html#XML_ERR_URI_FRAGMENT"/>
<function name="XML_ERR_URI_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_URI_REQUIRED"/>
+ <function name="XML_ERR_USER_STOP" link="libxml2-xmlerror.html#XML_ERR_USER_STOP"/>
<function name="XML_ERR_VALUE_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_VALUE_REQUIRED"/>
<function name="XML_ERR_VERSION_MISMATCH" link="libxml2-xmlerror.html#XML_ERR_VERSION_MISMATCH"/>
<function name="XML_ERR_VERSION_MISSING" link="libxml2-xmlerror.html#XML_ERR_VERSION_MISSING"/>
@@ -3481,6 +3483,7 @@
<function name="xmlXPathNextPreceding ()" link="libxml2-xpathInternals.html#xmlXPathNextPreceding"/>
<function name="xmlXPathNextPrecedingSibling ()" link="libxml2-xpathInternals.html#xmlXPathNextPrecedingSibling"/>
<function name="xmlXPathNextSelf ()" link="libxml2-xpathInternals.html#xmlXPathNextSelf"/>
+ <function name="xmlXPathNodeEval ()" link="libxml2-xpath.html#xmlXPathNodeEval"/>
<function name="xmlXPathNodeLeading ()" link="libxml2-xpathInternals.html#xmlXPathNodeLeading"/>
<function name="xmlXPathNodeLeadingSorted ()" link="libxml2-xpathInternals.html#xmlXPathNodeLeadingSorted"/>
<function name="xmlXPathNodeSetAdd ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetAdd"/>
@@ -3523,6 +3526,7 @@
<function name="xmlXPathRegisteredVariablesCleanup ()" link="libxml2-xpathInternals.html#xmlXPathRegisteredVariablesCleanup"/>
<function name="xmlXPathRoot ()" link="libxml2-xpathInternals.html#xmlXPathRoot"/>
<function name="xmlXPathRoundFunction ()" link="libxml2-xpathInternals.html#xmlXPathRoundFunction"/>
+ <function name="xmlXPathSetContextNode ()" link="libxml2-xpath.html#xmlXPathSetContextNode"/>
<function name="xmlXPathStartsWithFunction ()" link="libxml2-xpathInternals.html#xmlXPathStartsWithFunction"/>
<function name="xmlXPathStringEvalNumber ()" link="libxml2-xpathInternals.html#xmlXPathStringEvalNumber"/>
<function name="xmlXPathStringFunction ()" link="libxml2-xpathInternals.html#xmlXPathStringFunction"/>
diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in
index dc0cbd7..cbb7e34 100644
--- a/doc/examples/Makefile.in
+++ b/doc/examples/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 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,
@@ -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@
@@ -198,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)
@@ -297,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@
@@ -354,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@
diff --git a/doc/html/libxml-dict.html b/doc/html/libxml-dict.html
index 81afd15..bdd21f4 100644
--- a/doc/html/libxml-dict.html
+++ b/doc/html/libxml-dict.html
@@ -54,5 +54,5 @@ The content of this structure is not made public by the API.
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>limit</tt></i>:</span></td><td>the limit in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous limit of the dictionary or 0</td></tr></tbody></table></div><h3><a name="xmlDictSize" id="xmlDictSize"></a>Function: xmlDictSize</h3><pre class="programlisting">int xmlDictSize (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
</pre><p>Query the number of elements installed in the hash @dict.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionnary or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlInitializeDict" id="xmlInitializeDict"></a>Function: xmlInitializeDict</h3><pre class="programlisting">int xmlInitializeDict (void)<br />
-</pre><p>Do the dictionary mutex initialization. this function is not thread safe, initialization should preferably be done once at startup</p>
+</pre><p>Do the dictionary mutex initialization. this function is deprecated</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if initialization was already done, and 1 if that call led to the initialization</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
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.
</pre><p>Pop the element end from the RelaxNG validation stack.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidatePushCData" id="xmlRelaxNGValidatePushCData"></a>Function: xmlRelaxNGValidatePushCData</h3><pre class="programlisting">int xmlRelaxNGValidatePushCData (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data, <br /> int len)<br />
</pre><p>check the CData parsed for validation in the current stack</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the lenght of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidatePushElement" id="xmlRelaxNGValidatePushElement"></a>Function: xmlRelaxNGValidatePushElement</h3><pre class="programlisting">int xmlRelaxNGValidatePushElement (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidatePushElement" id="xmlRelaxNGValidatePushElement"></a>Function: xmlRelaxNGValidatePushElement</h3><pre class="programlisting">int xmlRelaxNGValidatePushElement (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
</pre><p>Push a new element start on the RelaxNG validation stack.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 if validating the element requires a full node, and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidityErrorFunc" id="xmlRelaxNGValidityErrorFunc"></a>Function type: xmlRelaxNGValidityErrorFunc</h3><pre class="programlisting">Function type: xmlRelaxNGValidityErrorFunc
void xmlRelaxNGValidityErrorFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html
index 25c7a45..5d932cb 100644
--- a/doc/html/libxml-tree.html
+++ b/doc/html/libxml-tree.html
@@ -585,6 +585,7 @@ The content of this structure is not made public by the API.
int nodeInfoMax : Max depth of the parsing stack
<a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfoTab : array of nodeInfos
int input_id : we need to label inputs
+ unsigned long sizeentcopy : volume of entity copy
}</pre><h3><a name="xmlParserInput" id="xmlParserInput">Structure xmlParserInput</a></h3><pre class="programlisting">Structure xmlParserInput<br />struct _xmlParserInput {
<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> buf : UTF-8 encoded buffer
const char * filename : The file analyzed, if any
@@ -964,7 +965,7 @@ The content of this structure is not made public by the API.
</pre><p>parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not a QName, otherwise the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div><h3><a name="xmlSplitQName3" id="xmlSplitQName3"></a>Function: xmlSplitQName3</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName3 (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int * len)<br />
</pre><p>parse an XML qualified name string,i</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an int *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>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</td></tr></tbody></table></div><h3><a name="xmlStringGetNodeList" id="xmlStringGetNodeList"></a>Function: xmlStringGetNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringGetNodeList (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an int *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>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</td></tr></tbody></table></div><h3><a name="xmlStringGetNodeList" id="xmlStringGetNodeList"></a>Function: xmlStringGetNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringGetNodeList (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the first child</td></tr></tbody></table></div><h3><a name="xmlStringLenGetNodeList" id="xmlStringLenGetNodeList"></a>Function: xmlStringLenGetNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringLenGetNodeList (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)<br />
</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
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.
</pre><p>Pop the element end from the validation stack.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>qname</tt></i>:</span></td><td>the qualified name as appearing in the serialization</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidatePushCData" id="xmlValidatePushCData"></a>Function: xmlValidatePushCData</h3><pre class="programlisting">int xmlValidatePushCData (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data, <br /> int len)<br />
</pre><p>check the CData parsed for validation in the current stack</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the lenght of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidatePushElement" id="xmlValidatePushElement"></a>Function: xmlValidatePushElement</h3><pre class="programlisting">int xmlValidatePushElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * qname)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidatePushElement" id="xmlValidatePushElement"></a>Function: xmlValidatePushElement</h3><pre class="programlisting">int xmlValidatePushElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * qname)<br />
</pre><p>Push a new element start on the validation stack.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>qname</tt></i>:</span></td><td>the qualified name as appearing in the serialization</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateRoot" id="xmlValidateRoot"></a>Function: xmlValidateRoot</h3><pre class="programlisting">int xmlValidateRoot (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
</pre><p>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</p>
diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html
index 528a61d..919d8de 100644
--- a/doc/html/libxml-xmlerror.html
+++ b/doc/html/libxml-xmlerror.html
@@ -202,6 +202,7 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD
<a name="XML_ERR_UNKNOWN_VERSION" id="XML_ERR_UNKNOWN_VERSION">XML_ERR_UNKNOWN_VERSION</a> = 108 : 108
<a name="XML_ERR_VERSION_MISMATCH" id="XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a> = 109 : 109
<a name="XML_ERR_NAME_TOO_LONG" id="XML_ERR_NAME_TOO_LONG">XML_ERR_NAME_TOO_LONG</a> = 110 : 110
+ <a name="XML_ERR_USER_STOP" id="XML_ERR_USER_STOP">XML_ERR_USER_STOP</a> = 111 : 111
<a name="XML_NS_ERR_XML_NAMESPACE" id="XML_NS_ERR_XML_NAMESPACE">XML_NS_ERR_XML_NAMESPACE</a> = 200
<a name="XML_NS_ERR_UNDEFINED_NAMESPACE" id="XML_NS_ERR_UNDEFINED_NAMESPACE">XML_NS_ERR_UNDEFINED_NAMESPACE</a> = 201 : 201
<a name="XML_NS_ERR_QNAME" id="XML_NS_ERR_QNAME">XML_NS_ERR_QNAME</a> = 202 : 202
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.
</pre><p>Free an expression context</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div><h3><a name="xmlExpGetLanguage" id="xmlExpGetLanguage"></a>Function: xmlExpGetLanguage</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br /> int len)<br />
</pre><p>Find all the strings used in @exp and store them in @list</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br /> int len)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br /> int len)<br />
</pre><p>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]</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />
</pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if nillable, 0 if not and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpMaxToken" id="xmlExpMaxToken"></a>Function: xmlExpMaxToken</h3><pre class="programlisting">int xmlExpMaxToken (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br />
</pre><p>Indicate the maximum number of input a expression can accept</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>a compiled expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the maximum length or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewAtom" id="xmlExpNewAtom"></a>Function: xmlExpNewAtom</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewAtom (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)<br />
</pre><p>Get the atom associated to this name from that context</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the atom name</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the atom name lenght in byte (or -1);</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewCtxt" id="xmlExpNewCtxt"></a>Function: xmlExpNewCtxt</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> xmlExpNewCtxt (int maxNodes, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the atom name</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the atom name length in byte (or -1);</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewCtxt" id="xmlExpNewCtxt"></a>Function: xmlExpNewCtxt</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> xmlExpNewCtxt (int maxNodes, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
</pre><p>Creates a new context for manipulating expressions</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>maxNodes</tt></i>:</span></td><td>the maximum number of nodes</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>optional dictionnary to use internally</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewOr" id="xmlExpNewOr"></a>Function: xmlExpNewOr</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewOr (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br />
</pre><p>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).</p>
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 }
</style><style type="text/css">
div.deprecated pre.programlisting {border-style: double;border-color:red}
pre.programlisting {border-style: double;background: #EECFA1}
- </style><title>Module xmlversion from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlversion from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlunicode.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlunicode.html">xmlunicode</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlwriter.html">xmlwriter</a></th><td><a accesskey="n" href="libxml-xmlwriter.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>compile-time version informations for the XML library </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a></pre><pre class="programlisting">#define <a href="#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a></pre><pre class="programlisting">#define <a href="#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a></pre><pre class="programlisting">#define <a href="#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a></pre><pre class="programlisting">#define <a href="#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a></pre><pre class="programlisting">#define <a href="#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION">LIBXML_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION_STRING">LIBXML_VERSION_STRING</a></pre><pre class="programlisting">#define <a href="#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a></pre><pre class="programlisting">#define <a href="#WITHOUT_TRIO">WITHOUT_TRIO</a></pre><pre class="programlisting">#define <a href="#WITH_TRIO">WITH_TRIO</a></pre><pre class="programlisting">void <a href="#xmlCheckVersion">xmlCheckVersion</a> (int version)</pre>
+ </style><title>Module xmlversion from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlversion from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlunicode.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlunicode.html">xmlunicode</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlwriter.html">xmlwriter</a></th><td><a accesskey="n" href="libxml-xmlwriter.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>compile-time version informations for the XML library </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a></pre><pre class="programlisting">#define <a href="#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a></pre><pre class="programlisting">#define <a href="#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a></pre><pre class="programlisting">#define <a href="#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a></pre><pre class="programlisting">#define <a href="#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a></pre><pre class="programlisting">#define <a href="#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION">LIBXML_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION_STRING">LIBXML_VERSION_STRING</a></pre><pre class="programlisting">#define <a href="#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a></pre><pre class="programlisting">#define <a href="#WITHOUT_TRIO">WITHOUT_TRIO</a></pre><pre class="programlisting">#define <a href="#WITH_TRIO">WITH_TRIO</a></pre><pre class="programlisting">void <a href="#xmlCheckVersion">xmlCheckVersion</a> (int version)</pre>
<h2>Description</h2>
<h3><a name="ATTRIBUTE_UNUSED" id="ATTRIBUTE_UNUSED"></a>Macro: ATTRIBUTE_UNUSED</h3><pre>#define ATTRIBUTE_UNUSED</pre><p>Macro used to signal to GCC unused function parameters</p>
<h3><a name="DEBUG_MEMORY_LOCATION" id="DEBUG_MEMORY_LOCATION"></a>Macro: DEBUG_MEMORY_LOCATION</h3><pre>#define DEBUG_MEMORY_LOCATION</pre><p>Whether the memory debugging is configured in</p>
@@ -43,6 +43,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<h3><a name="LIBXML_SCHEMAS_ENABLED" id="LIBXML_SCHEMAS_ENABLED"></a>Macro: LIBXML_SCHEMAS_ENABLED</h3><pre>#define LIBXML_SCHEMAS_ENABLED</pre><p>Whether the Schemas validation interfaces are compiled in</p>
<h3><a name="LIBXML_SCHEMATRON_ENABLED" id="LIBXML_SCHEMATRON_ENABLED"></a>Macro: LIBXML_SCHEMATRON_ENABLED</h3><pre>#define LIBXML_SCHEMATRON_ENABLED</pre><p>Whether the Schematron validation interfaces are compiled in</p>
<h3><a name="LIBXML_TEST_VERSION" id="LIBXML_TEST_VERSION"></a>Macro: LIBXML_TEST_VERSION</h3><pre>#define LIBXML_TEST_VERSION</pre><p>Macro to check that the libxml version in use is compatible with the version the software has been compiled against</p>
+<h3><a name="LIBXML_THREAD_ALLOC_ENABLED" id="LIBXML_THREAD_ALLOC_ENABLED"></a>Macro: LIBXML_THREAD_ALLOC_ENABLED</h3><pre>#define LIBXML_THREAD_ALLOC_ENABLED</pre><p>Whether the allocation hooks are per-thread</p>
<h3><a name="LIBXML_THREAD_ENABLED" id="LIBXML_THREAD_ENABLED"></a>Macro: LIBXML_THREAD_ENABLED</h3><pre>#define LIBXML_THREAD_ENABLED</pre><p>Whether the thread support is configured in</p>
<h3><a name="LIBXML_TREE_ENABLED" id="LIBXML_TREE_ENABLED"></a>Macro: LIBXML_TREE_ENABLED</h3><pre>#define LIBXML_TREE_ENABLED</pre><p>Whether the DOM like tree manipulation API support is configured in</p>
<h3><a name="LIBXML_UNICODE_ENABLED" id="LIBXML_UNICODE_ENABLED"></a>Macro: LIBXML_UNICODE_ENABLED</h3><pre>#define LIBXML_UNICODE_ENABLED</pre><p>Whether the Unicode related interfaces are compiled in</p>
diff --git a/doc/html/libxml-xpath.html b/doc/html/libxml-xpath.html
index a51b864..e47e600 100644
--- a/doc/html/libxml-xpath.html
+++ b/doc/html/libxml-xpath.html
@@ -81,9 +81,11 @@ void <a href="#xmlXPathFunction">xmlXPathFunction</a> (<a href="libxml-xpath.ht
<pre class="programlisting">int <a href="#xmlXPathIsInf">xmlXPathIsInf</a> (double val)</pre>
<pre class="programlisting">int <a href="#xmlXPathIsNaN">xmlXPathIsNaN</a> (double val)</pre>
<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> <a href="#xmlXPathNewContext">xmlXPathNewContext</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNodeEval">xmlXPathNodeEval</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)</pre>
<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathObjectCopy">xmlXPathObjectCopy</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
<pre class="programlisting">long <a href="#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlXPathSetContextNode">xmlXPathSetContextNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)</pre>
<pre class="programlisting">Function type: <a href="#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a>
<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> (void * ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)
</pre>
@@ -298,13 +300,17 @@ void xmlXPathFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xml
</pre><p>Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the value is a NaN, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathNewContext" id="xmlXPathNewContext"></a>Function: xmlXPathNewContext</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> xmlXPathNewContext (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated. The caller will need to free it.</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetCreate" id="xmlXPathNodeSetCreate"></a>Function: xmlXPathNodeSetCreate</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetCreate (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated. The caller will need to free it.</td></tr></tbody></table></div><h3><a name="xmlXPathNodeEval" id="xmlXPathNodeEval"></a>Function: xmlXPathNodeEval</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNodeEval (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br />
+</pre><p>Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetCreate" id="xmlXPathNodeSetCreate"></a>Function: xmlXPathNodeSetCreate</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetCreate (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
</pre><p>Create a new <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> of type double and of value @val</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlNodePtr, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathObjectCopy" id="xmlXPathObjectCopy"></a>Function: xmlXPathObjectCopy</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathObjectCopy (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
</pre><p>allocate a new copy of a given object</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the original object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathOrderDocElems" id="xmlXPathOrderDocElems"></a>Function: xmlXPathOrderDocElems</h3><pre class="programlisting">long xmlXPathOrderDocElems (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
</pre><p>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-&gt;content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an input document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements found in the document or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlXPathVariableLookupFunc" id="xmlXPathVariableLookupFunc"></a>Function type: xmlXPathVariableLookupFunc</h3><pre class="programlisting">Function type: xmlXPathVariableLookupFunc
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an input document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements found in the document or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlXPathSetContextNode" id="xmlXPathSetContextNode"></a>Function: xmlXPathSetContextNode</h3><pre class="programlisting">int xmlXPathSetContextNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br />
+</pre><p>Sets 'node' as the context node. The node must be in the same document as that associated with the context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error or 0 if successful</td></tr></tbody></table></div><h3><a name="xmlXPathVariableLookupFunc" id="xmlXPathVariableLookupFunc"></a>Function type: xmlXPathVariableLookupFunc</h3><pre class="programlisting">Function type: xmlXPathVariableLookupFunc
<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookupFunc (void * ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)
</pre><p>Prototype for callbacks used to plug variable lookup in the XPath engine.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the variable</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this variable</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath object value or NULL if not found.</td></tr></tbody></table></div><br />
<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xzlib.html b/doc/html/libxml-xzlib.html
new file mode 100644
index 0000000..c4dfdc3
--- /dev/null
+++ b/doc/html/libxml-xzlib.html
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+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 }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xzlib from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xzlib from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xpointer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xpointer.html">xpointer</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th></tr></table><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBXML2_XZLIB_H">LIBXML2_XZLIB_H</a></pre><pre class="programlisting">Typedef void * <a name="xzFile" id="xzFile">xzFile</a>
+</pre><h2>Description</h2>
+<h3><a name="LIBXML2_XZLIB_H" id="LIBXML2_XZLIB_H"></a>Macro: LIBXML2_XZLIB_H</h3><pre>#define LIBXML2_XZLIB_H</pre><p></p>
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index f14ed01..45bceb5 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -2706,6 +2706,7 @@
<exports symbol='XML_RNGP_FOREIGN_ELEMENT' type='enum'/>
<exports symbol='XML_SCHEMAP_DEF_AND_PREFIX' type='enum'/>
<exports symbol='XML_ERR_MIXED_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_ERR_USER_STOP' type='enum'/>
<exports symbol='XML_CHECK_FOUND_CDATA' type='enum'/>
<exports symbol='XML_SCHEMAP_INTERNAL' type='enum'/>
<exports symbol='XML_SCHEMAV_INVALIDELEM' type='enum'/>
@@ -3418,6 +3419,7 @@
<exports symbol='DEBUG_MEMORY_LOCATION' type='macro'/>
<exports symbol='LIBXML_ATTR_FORMAT' type='macro'/>
<exports symbol='LIBXML_TEST_VERSION' type='macro'/>
+ <exports symbol='LIBXML_THREAD_ALLOC_ENABLED' type='macro'/>
<exports symbol='LIBXML_XPATH_ENABLED' type='macro'/>
<exports symbol='LIBXML_PATTERN_ENABLED' type='macro'/>
<exports symbol='LIBXML_VALID_ENABLED' type='macro'/>
@@ -3591,6 +3593,7 @@
<exports symbol='xmlXPathNINF' type='variable'/>
<exports symbol='xmlXPathCastNodeSetToBoolean' type='function'/>
<exports symbol='xmlXPathFuncLookupFunc' type='function'/>
+ <exports symbol='xmlXPathNodeEval' type='function'/>
<exports symbol='xmlXPathCastNodeToString' type='function'/>
<exports symbol='xmlXPathIsNaN' type='function'/>
<exports symbol='xmlXPathContextSetCache' type='function'/>
@@ -3625,6 +3628,7 @@
<exports symbol='xmlXPathCtxtCompile' type='function'/>
<exports symbol='xmlXPathEvalFunc' type='function'/>
<exports symbol='xmlXPathCastBooleanToString' type='function'/>
+ <exports symbol='xmlXPathSetContextNode' type='function'/>
<exports symbol='xmlXPathCastNumberToBoolean' type='function'/>
<exports symbol='xmlXPathFreeNodeSet' type='function'/>
<exports symbol='xmlXPathFreeCompExpr' type='function'/>
@@ -4047,6 +4051,9 @@
<macro name='LIBXML_TEST_VERSION' file='xmlversion'>
<info>Macro to check that the libxml version in use is compatible with the version the software has been compiled against</info>
</macro>
+ <macro name='LIBXML_THREAD_ALLOC_ENABLED' file='xmlversion'>
+ <info>Whether the allocation hooks are per-thread</info>
+ </macro>
<macro name='LIBXML_THREAD_ENABLED' file='xmlversion'>
<info>Whether the thread support is configured in</info>
</macro>
@@ -4960,6 +4967,7 @@ and not by parsing an instance'/>
<enum name='XML_ERR_UNSUPPORTED_ENCODING' file='xmlerror' value='32' type='xmlParserErrors' info='32'/>
<enum name='XML_ERR_URI_FRAGMENT' file='xmlerror' value='92' type='xmlParserErrors' info='92'/>
<enum name='XML_ERR_URI_REQUIRED' file='xmlerror' value='70' type='xmlParserErrors' info='70'/>
+ <enum name='XML_ERR_USER_STOP' file='xmlerror' value='111' type='xmlParserErrors' info='111'/>
<enum name='XML_ERR_VALUE_REQUIRED' file='xmlerror' value='84' type='xmlParserErrors' info='84'/>
<enum name='XML_ERR_VERSION_MISMATCH' file='xmlerror' value='109' type='xmlParserErrors' info='109'/>
<enum name='XML_ERR_VERSION_MISSING' file='xmlerror' value='96' type='xmlParserErrors' info='96'/>
@@ -6184,7 +6192,8 @@ set at the end of parsing'/>
<field name='URI' type='const xmlChar *' info=' the full URI as computed'/>
<field name='owner' type='int' info=' does the entity own the childrens'/>
<field name='checked' type='int' info=' was the entity content checked this is also used to count entites
-* references done from that entity'/>
+* references done from that entity
+* and if it contains &apos;&lt;&apos;'/>
</struct>
<typedef name='xmlEntityPtr' file='tree' type='xmlEntity *'/>
<typedef name='xmlEntityType' file='entities' type='enum'/>
@@ -6434,6 +6443,7 @@ actually an xmlCharEncoding'/>
<field name='nodeInfoMax' type='int' info=' Max depth of the parsing stack'/>
<field name='nodeInfoTab' type='xmlParserNodeInfo *' info=' array of nodeInfos'/>
<field name='input_id' type='int' info=' we need to label inputs'/>
+ <field name='sizeentcopy' type='unsigned long' info=' volume of entity copy'/>
</struct>
<typedef name='xmlParserCtxtPtr' file='tree' type='xmlParserCtxt *'/>
<typedef name='xmlParserErrors' file='xmlerror' type='enum'/>
@@ -9779,7 +9789,7 @@ Could we use @subtypes for this?'/>
<arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
<arg name='exp' type='xmlExpNodePtr' info='the expression'/>
<arg name='langList' type='const xmlChar **' info='where to store the tokens'/>
- <arg name='len' type='int' info='the allocated lenght of @list'/>
+ <arg name='len' type='int' info='the allocated length of @list'/>
</function>
<function name='xmlExpGetStart' file='xmlregexp' module='xmlregexp'>
<cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
@@ -9788,7 +9798,7 @@ Could we use @subtypes for this?'/>
<arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
<arg name='exp' type='xmlExpNodePtr' info='the expression'/>
<arg name='tokList' type='const xmlChar **' info='where to store the tokens'/>
- <arg name='len' type='int' info='the allocated lenght of @list'/>
+ <arg name='len' type='int' info='the allocated length of @list'/>
</function>
<function name='xmlExpIsNillable' file='xmlregexp' module='xmlregexp'>
<cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
@@ -9808,7 +9818,7 @@ Could we use @subtypes for this?'/>
<return type='xmlExpNodePtr' info='the node or NULL in case of error'/>
<arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
<arg name='name' type='const xmlChar *' info='the atom name'/>
- <arg name='len' type='int' info='the atom name lenght in byte (or -1);'/>
+ <arg name='len' type='int' info='the atom name length in byte (or -1);'/>
</function>
<function name='xmlExpNewCtxt' file='xmlregexp' module='xmlregexp'>
<cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
@@ -10628,7 +10638,7 @@ Could we use @subtypes for this?'/>
<return type='void'/>
</function>
<function name='xmlInitializeDict' file='dict' module='dict'>
- <info>Do the dictionary mutex initialization. this function is not thread safe, initialization should preferably be done once at startup</info>
+ <info>Do the dictionary mutex initialization. this function is deprecated</info>
<return type='int' info='0 if initialization was already done, and 1 if that call led to the initialization'/>
</function>
<function name='xmlInitializeGlobalState' file='globals' module='globals'>
@@ -13112,7 +13122,7 @@ Could we use @subtypes for this?'/>
<return type='int' info='1 if no validation problem was found or -1 otherwise'/>
<arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='the RelaxNG validation context'/>
<arg name='data' type='const xmlChar *' info='some character data read'/>
- <arg name='len' type='int' info='the lenght of the data'/>
+ <arg name='len' type='int' info='the length of the data'/>
</function>
<function name='xmlRelaxNGValidatePushElement' file='relaxng' module='relaxng'>
<cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
@@ -14447,7 +14457,7 @@ Could we use @subtypes for this?'/>
</function>
<function name='xmlSplitQName3' file='tree' module='tree'>
<info>parse an XML qualified name string,i</info>
- <return type='const xmlChar *' info='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'/>
+ <return type='const xmlChar *' info='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'/>
<arg name='name' type='const xmlChar *' info='the full QName'/>
<arg name='len' type='int *' info='an int *'/>
</function>
@@ -17165,7 +17175,7 @@ Could we use @subtypes for this?'/>
<return type='int' info='1 if no validation problem was found or 0 otherwise'/>
<arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
<arg name='data' type='const xmlChar *' info='some character data read'/>
- <arg name='len' type='int' info='the lenght of the data'/>
+ <arg name='len' type='int' info='the length of the data'/>
</function>
<function name='xmlValidatePushElement' file='valid' module='valid'>
<cond>defined(LIBXML_VALID_ENABLED) &amp;&amp; defined(LIBXML_REGEXP_ENABLED)</cond>
@@ -17899,6 +17909,14 @@ Could we use @subtypes for this?'/>
<arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
<arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
</function>
+ <function name='xmlXPathNodeEval' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Evaluate the XPath Location Path in the given context. The node &apos;node&apos; is set as the context node. The context node is not restored.</info>
+ <return type='xmlXPathObjectPtr' info='the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.'/>
+ <arg name='node' type='xmlNodePtr' info='the node to to use as the context node'/>
+ <arg name='str' type='const xmlChar *' info='the XPath expression'/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
<function name='xmlXPathNodeLeading' file='xpathInternals' module='xpath'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called.</info>
@@ -18185,6 +18203,13 @@ Could we use @subtypes for this?'/>
<arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
<arg name='nargs' type='int' info='the number of arguments'/>
</function>
+ <function name='xmlXPathSetContextNode' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Sets &apos;node&apos; as the context node. The node must be in the same document as that associated with the context.</info>
+ <return type='int' info='-1 in case of error or 0 if successful'/>
+ <arg name='node' type='xmlNodePtr' info='the node to to use as the context node'/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
<function name='xmlXPathStartsWithFunction' file='xpathInternals' module='xpath'>
<cond>defined(LIBXML_XPATH_ENABLED)</cond>
<info>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.</info>
diff --git a/doc/symbols.xml b/doc/symbols.xml
index 08dcfaa..ec275e7 100644
--- a/doc/symbols.xml
+++ b/doc/symbols.xml
@@ -1761,4 +1761,8 @@
<symbol file="xmlIO">xmlOutputBufferGetSize</symbol>
<symbol file="xmlwriter">xmlTextWriterSetQuoteChar</symbol>
</release>
+ <release version="2.9.1">
+ <symbol file="xpath">xmlXPathNodeEval</symbol>
+ <symbol file="xpath">xmlXPathSetContextNode</symbol>
+ </release>
</symbols>
diff --git a/doc/xml.html b/doc/xml.html
index d2cc00d..d6abd50 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -508,7 +508,7 @@ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
<li>If you need to parse large files, check the <a
href="xmlreader.html">xmlReader</a> API tutorial</li>
<li><a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a
- href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice
+ href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">some nice
documentation</a> explaining how to use the libxml SAX interface.</li>
<li>George Lebl wrote <a
href="http://www-106.ibm.com/developerworks/library/l-gnome3/">an article
diff --git a/doc/xmllint.1 b/doc/xmllint.1
index 10caf40..c647763 100644
--- a/doc/xmllint.1
+++ b/doc/xmllint.1
@@ -1,18 +1,38 @@
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XMLLINT" "1" "$Date$" "libxml2" ""
+'\" t
+.\" Title: xmllint
+.\" Author: John Fleck <jfleck@inkstain.net>
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: $Date$
+.\" Manual: xmllint Manual
+.\" Source: libxml2
+.\" Language: English
+.\"
+.TH "XMLLINT" "1" "$Date$" "libxml2" "xmllint Manual"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
.SH "NAME"
xmllint \- command line XML tool
.SH "SYNOPSIS"
-.HP 8
-\fBxmllint\fR [\fB\-\-version\fR \fB\-\-debug\fR \fB\-\-shell\fR \fB\-\-debugent\fR \fB\-\-copy\fR \fB\-\-recover\fR \fB\-\-noent\fR \fB\-\-noout\fR \fB\-\-nonet\fR \fB\-\-path\ "\fR\fB\fIPATH(S)\fR\fR\fB"\fR \fB\-\-load\-trace\fR \fB\-\-htmlout\fR \fB\-\-nowrap\fR \fB\-\-valid\fR \fB\-\-postvalid\fR \fB\-\-dtdvalid\ \fR\fB\fIURL\fR\fR \fB\-\-dtdvalidfpi\ \fR\fB\fIFPI\fR\fR \fB\-\-timing\fR \fB\-\-output\ \fR\fB\fIFILE\fR\fR \fB\-\-repeat\fR \fB\-\-insert\fR \fB\-\-compress\fR \fB\-\-html\fR \fB\-\-xmlout\fR \fB\-\-push\fR \fB\-\-memory\fR \fB\-\-maxmem\ \fR\fB\fINBBYTES\fR\fR \fB\-\-nowarning\fR \fB\-\-noblanks\fR \fB\-\-nocdata\fR \fB\-\-format\fR \fB\-\-encode\ \fR\fB\fIENCODING\fR\fR \fB\-\-dropdtd\fR \fB\-\-nsclean\fR \fB\-\-testIO\fR \fB\-\-catalogs\fR \fB\-\-nocatalogs\fR \fB\-\-auto\fR \fB\-\-xinclude\fR \fB\-\-noxincludenode\fR \fB\-\-loaddtd\fR \fB\-\-dtdattr\fR \fB\-\-stream\fR \fB\-\-walker\fR \fB\-\-pattern\ \fR\fB\fIPATTERNVALUE\fR\fR \fB\-\-chkregister\fR \fB\-\-relaxng\ \fR\fB\fISCHEMA\fR\fR \fB\-\-schema\ \fR\fB\fISCHEMA\fR\fR \fB\-\-c14n\fR] {\fIXML\-FILE(S)\fR... \-}
-.HP 8
+.HP \w'\fBxmllint\fR\ 'u
+\fBxmllint\fR [\fB\-\-version\fR | \fB\-\-debug\fR | \fB\-\-shell\fR | \fB\-\-xpath\ "\fR\fB\fIXPath_expression\fR\fR\fB"\fR | \fB\-\-debugent\fR | \fB\-\-copy\fR | \fB\-\-recover\fR | \fB\-\-noent\fR | \fB\-\-noout\fR | \fB\-\-nonet\fR | \fB\-\-path\ "\fR\fB\fIPATH(S)\fR\fR\fB"\fR | \fB\-\-load\-trace\fR | \fB\-\-htmlout\fR | \fB\-\-nowrap\fR | \fB\-\-valid\fR | \fB\-\-postvalid\fR | \fB\-\-dtdvalid\ \fR\fB\fIURL\fR\fR | \fB\-\-dtdvalidfpi\ \fR\fB\fIFPI\fR\fR | \fB\-\-timing\fR | \fB\-\-output\ \fR\fB\fIFILE\fR\fR | \fB\-\-repeat\fR | \fB\-\-insert\fR | \fB\-\-compress\fR | \fB\-\-html\fR | \fB\-\-xmlout\fR | \fB\-\-push\fR | \fB\-\-memory\fR | \fB\-\-maxmem\ \fR\fB\fINBBYTES\fR\fR | \fB\-\-nowarning\fR | \fB\-\-noblanks\fR | \fB\-\-nocdata\fR | \fB\-\-format\fR | \fB\-\-encode\ \fR\fB\fIENCODING\fR\fR | \fB\-\-dropdtd\fR | \fB\-\-nsclean\fR | \fB\-\-testIO\fR | \fB\-\-catalogs\fR | \fB\-\-nocatalogs\fR | \fB\-\-auto\fR | \fB\-\-xinclude\fR | \fB\-\-noxincludenode\fR | \fB\-\-loaddtd\fR | \fB\-\-dtdattr\fR | \fB\-\-stream\fR | \fB\-\-walker\fR | \fB\-\-pattern\ \fR\fB\fIPATTERNVALUE\fR\fR | \fB\-\-chkregister\fR | \fB\-\-relaxng\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-schema\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-c14n\fR] {\fIXML\-FILE(S)\fR... | \-}
+.HP \w'\fBxmllint\fR\ 'u
\fBxmllint\fR \fB\-\-help\fR
.SH "DESCRIPTION"
.PP
@@ -24,404 +44,607 @@ files, specified on the command line as
\fIXML\-FILE\fR
(or the standard input if the filename provided is
\fB\-\fR
-). It prints various types of output, depending upon the options selected. It is useful for detecting errors both in
+)\&. It prints various types of output, depending upon the options selected\&. It is useful for detecting errors both in
XML
code and in the
XML
-parser itself.
+parser itself\&.
.PP
\fBxmllint\fR
is included in
-\fBlibxml\fR(3).
+\fBlibxml\fR(3)\&.
.SH "OPTIONS"
.PP
+
\fBxmllint\fR
accepts the following options (in alphabetical order):
-.TP
+.PP
\fB\-\-auto\fR
-Generate a small document for testing purposes.
-.TP
+.RS 4
+Generate a small document for testing purposes\&.
+.RE
+.PP
\fB\-\-catalogs\fR
+.RS 4
Use the
SGML
catalog(s) from
-\fBSGML_CATALOG_FILES\fR. Otherwise
+\fBSGML_CATALOG_FILES\fR\&. Otherwise
XML
catalogs starting from
-\fI/etc/xml/catalog\fR
-are used by default.
-.TP
+/etc/xml/catalog
+are used by default\&.
+.RE
+.PP
\fB\-\-chkregister\fR
-Turn on node registration. Useful for developers testing
+.RS 4
+Turn on node registration\&. Useful for developers testing
\fBlibxml\fR(3)
-node tracking code.
-.TP
+node tracking code\&.
+.RE
+.PP
\fB\-\-compress\fR
+.RS 4
Turn on
\fBgzip\fR(1)
-compression of output.
-.TP
+compression of output\&.
+.RE
+.PP
\fB\-\-copy\fR
-Test the internal copy implementation.
-.TP
+.RS 4
+Test the internal copy implementation\&.
+.RE
+.PP
\fB\-\-c14n\fR
+.RS 4
Use the W3C
XML
Canonicalisation (C14N) to serialize the result of parsing to
-\fIstdout\fR. It keeps comments in the result.
-.TP
+stdout\&. It keeps comments in the result\&.
+.RE
+.PP
\fB\-\-dtdvalid \fR\fB\fIURL\fR\fR
+.RS 4
Use the
DTD
specified by an
\fIURL\fR
-for validation.
-.TP
+for validation\&.
+.RE
+.PP
\fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR
+.RS 4
Use the
DTD
specified by a Formal Public Identifier
\fIFPI\fR
-for validation, note that this will require a catalog exporting that Formal Public Identifier to work.
-.TP
+for validation, note that this will require a catalog exporting that Formal Public Identifier to work\&.
+.RE
+.PP
\fB\-\-debug\fR
-Parse a file and output an annotated tree of the in\-memory version of the document.
-.TP
+.RS 4
+Parse a file and output an annotated tree of the in\-memory version of the document\&.
+.RE
+.PP
\fB\-\-debugent\fR
-Debug the entities defined in the document.
-.TP
+.RS 4
+Debug the entities defined in the document\&.
+.RE
+.PP
\fB\-\-dropdtd\fR
+.RS 4
Remove
DTD
-from output.
-.TP
+from output\&.
+.RE
+.PP
\fB\-\-dtdattr\fR
+.RS 4
Fetch external
DTD
-and populate the tree with inherited attributes.
-.TP
+and populate the tree with inherited attributes\&.
+.RE
+.PP
\fB\-\-encode \fR\fB\fIENCODING\fR\fR
-Output in the given encoding.
-.TP
+.RS 4
+Output in the given encoding\&.
+.RE
+.PP
\fB\-\-format\fR
-Reformat and reindent the output. The
+.RS 4
+Reformat and reindent the output\&. The
\fBXMLLINT_INDENT\fR
-environment variable controls the indentation. The default value is two spaces " ").
-.TP
+environment variable controls the indentation\&. The default value is two spaces " ")\&.
+.RE
+.PP
\fB\-\-help\fR
+.RS 4
Print out a short usage summary for
-\fBxmllint\fR.
-.TP
+\fBxmllint\fR\&.
+.RE
+.PP
\fB\-\-html\fR
+.RS 4
Use the
HTML
-parser.
-.TP
+parser\&.
+.RE
+.PP
\fB\-\-htmlout\fR
+.RS 4
Output results as an
HTML
-file. This causes
+file\&. This causes
\fBxmllint\fR
to output the necessary
HTML
-tags surrounding the result tree output so the results can be displayed/viewed in a browser.
-.TP
+tags surrounding the result tree output so the results can be displayed/viewed in a browser\&.
+.RE
+.PP
\fB\-\-insert\fR
-Test for valid insertions.
-.TP
+.RS 4
+Test for valid insertions\&.
+.RE
+.PP
\fB\-\-loaddtd\fR
+.RS 4
Fetch an external
-DTD.
-.TP
+DTD\&.
+.RE
+.PP
\fB\-\-load\-trace\fR
+.RS 4
Display all the documents loaded during the processing to
-\fIstderr\fR.
-.TP
+stderr\&.
+.RE
+.PP
\fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
-Test the parser memory support.
+.RS 4
+Test the parser memory support\&.
\fINNBYTES\fR
-is the maximum number of bytes the library is allowed to allocate. This can also be used to make sure batch processing of
+is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of
XML
-files will not exhaust the virtual memory of the server running them.
-.TP
+files will not exhaust the virtual memory of the server running them\&.
+.RE
+.PP
\fB\-\-memory\fR
-Parse from memory.
-.TP
+.RS 4
+Parse from memory\&.
+.RE
+.PP
\fB\-\-noblanks\fR
-Drop ignorable blank spaces.
-.TP
+.RS 4
+Drop ignorable blank spaces\&.
+.RE
+.PP
\fB\-\-nocatalogs\fR
-Do not use any catalogs.
-.TP
+.RS 4
+Do not use any catalogs\&.
+.RE
+.PP
\fB\-\-nocdata\fR
-Substitute CDATA section by equivalent text nodes.
-.TP
+.RS 4
+Substitute CDATA section by equivalent text nodes\&.
+.RE
+.PP
\fB\-\-noent\fR
-Substitute entity values for entity references. By default,
+.RS 4
+Substitute entity values for entity references\&. By default,
\fBxmllint\fR
-leaves entity references in place.
-.TP
+leaves entity references in place\&.
+.RE
+.PP
\fB\-\-nonet\fR
+.RS 4
Do not use the Internet to fetch
-DTDs or entities.
-.TP
+DTDs or entities\&.
+.RE
+.PP
\fB\-\-noout\fR
-Suppress output. By default,
+.RS 4
+Suppress output\&. By default,
\fBxmllint\fR
-outputs the result tree.
-.TP
+outputs the result tree\&.
+.RE
+.PP
\fB\-\-nowarning\fR
-Do not emit warnings from the parser and/or validator.
-.TP
+.RS 4
+Do not emit warnings from the parser and/or validator\&.
+.RE
+.PP
\fB\-\-nowrap\fR
+.RS 4
Do not output
HTML
-doc wrapper.
-.TP
+doc wrapper\&.
+.RE
+.PP
\fB\-\-noxincludenode\fR
-Do XInclude processing but do not generate XInclude start and end nodes.
-.TP
+.RS 4
+Do XInclude processing but do not generate XInclude start and end nodes\&.
+.RE
+.PP
\fB\-\-nsclean\fR
-Remove redundant namespace declarations.
-.TP
+.RS 4
+Remove redundant namespace declarations\&.
+.RE
+.PP
\fB\-\-output \fR\fB\fIFILE\fR\fR
+.RS 4
Define a file path where
\fBxmllint\fR
-will save the result of parsing. Usually the programs build a tree and save it on
-\fIstdout\fR, with this option the result
+will save the result of parsing\&. Usually the programs build a tree and save it on
+stdout, with this option the result
XML
-instance will be saved onto a file.
-.TP
+instance will be saved onto a file\&.
+.RE
+.PP
\fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
+.RS 4
Use the (space\- or colon\-separated) list of filesystem paths specified by
\fIPATHS\fR
to load
-DTDs or entities. Enclose space\-separated lists by quotation marks.
-.TP
+DTDs or entities\&. Enclose space\-separated lists by quotation marks\&.
+.RE
+.PP
\fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
-Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser. It allows to select some nodes in the document based on an XPath (subset) expression. Used for debugging.
-.TP
+.RS 4
+Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser\&. It allows to select some nodes in the document based on an XPath (subset) expression\&. Used for debugging\&.
+.RE
+.PP
\fB\-\-postvalid\fR
-Validate after parsing has completed.
-.TP
+.RS 4
+Validate after parsing has completed\&.
+.RE
+.PP
\fB\-\-push\fR
-Use the push mode of the parser.
-.TP
+.RS 4
+Use the push mode of the parser\&.
+.RE
+.PP
\fB\-\-recover\fR
-Output any parsable portions of an invalid document.
-.TP
+.RS 4
+Output any parsable portions of an invalid document\&.
+.RE
+.PP
\fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR
+.RS 4
Use RelaxNG file named
\fISCHEMA\fR
-for validation.
-.TP
+for validation\&.
+.RE
+.PP
\fB\-\-repeat\fR
-Repeat 100 times, for timing or profiling.
-.TP
+.RS 4
+Repeat 100 times, for timing or profiling\&.
+.RE
+.PP
\fB\-\-schema \fR\fB\fISCHEMA\fR\fR
+.RS 4
Use a W3C
XML
Schema file named
\fISCHEMA\fR
-for validation.
-.TP
+for validation\&.
+.RE
+.PP
\fB\-\-shell\fR
-Run a navigating shell. Details on available commands in shell mode are below (see
-the section called \(lqSHELL COMMANDS\(rq).
-.TP
+.RS 4
+Run a navigating shell\&. Details on available commands in shell mode are below (see
+the section called \(lqSHELL COMMANDS\(rq)\&.
+.RE
+.PP
+\fB\-\-xpath "\fR\fB\fIXPath_expression\fR\fR\fB"\fR
+.RS 4
+Run an XPath expression given as argument and print the result\&. In case of a nodeset result, each node in the node set is serialized in full in the output\&. In case of an empty node set the "XPath set is empty" result will be shown and an error exit code will be returned\&.
+.RE
+.PP
\fB\-\-stream\fR
+.RS 4
Use streaming
API
\- useful when used in combination with
\fB\-\-relaxng\fR
or
\fB\-\-valid\fR
-options for validation of files that are too large to be held in memory.
-.TP
+options for validation of files that are too large to be held in memory\&.
+.RE
+.PP
\fB\-\-testIO\fR
-Test user input/output support.
-.TP
+.RS 4
+Test user input/output support\&.
+.RE
+.PP
\fB\-\-timing\fR
+.RS 4
Output information about the time it takes
\fBxmllint\fR
-to perform the various steps.
-.TP
+to perform the various steps\&.
+.RE
+.PP
\fB\-\-valid\fR
-Determine if the document is a valid instance of the included Document Type Definition (DTD). A
+.RS 4
+Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A
DTD
to be validated against also can be specified at the command line using the
\fB\-\-dtdvalid\fR
-option. By default,
+option\&. By default,
\fBxmllint\fR
-also checks to determine if the document is well\-formed.
-.TP
+also checks to determine if the document is well\-formed\&.
+.RE
+.PP
\fB\-\-version\fR
+.RS 4
Display the version of
\fBlibxml\fR(3)
-used.
-.TP
+used\&.
+.RE
+.PP
\fB\-\-walker\fR
+.RS 4
Test the walker module, which is a reader interface but for a document tree, instead of using the reader
API
-on an unparsed document it works on an existing in\-memory tree. Used for debugging.
-.TP
+on an unparsed document it works on an existing in\-memory tree\&. Used for debugging\&.
+.RE
+.PP
\fB\-\-xinclude\fR
-Do XInclude processing.
-.TP
+.RS 4
+Do XInclude processing\&.
+.RE
+.PP
\fB\-\-xmlout\fR
+.RS 4
Used in conjunction with
-\fB\-\-html\fR. Usually when
+\fB\-\-html\fR\&. Usually when
HTML
is parsed the document is saved with the
HTML
-serializer. But with this option the resulting document is saved with the
+serializer\&. But with this option the resulting document is saved with the
XML
-serializer. This is primarily used to generate
+serializer\&. This is primarily used to generate
XHTML
from
HTML
-input.
+input\&.
+.RE
.SH "SHELL COMMANDS"
.PP
+
\fBxmllint\fR
offers an interactive shell mode invoked with the
\fB\-\-shell\fR
-command. Available commands in shell mode include (in alphabetical order):
-.TP
+command\&. Available commands in shell mode include (in alphabetical order):
+.PP
\fBbase\fR
+.RS 4
Display
XML
-base of the node.
-.TP
+base of the node\&.
+.RE
+.PP
\fBbye\fR
-Leave the shell.
-.TP
+.RS 4
+Leave the shell\&.
+.RE
+.PP
\fBcat \fR\fB\fINODE\fR\fR
-Display the given node or the current one.
-.TP
+.RS 4
+Display the given node or the current one\&.
+.RE
+.PP
\fBcd \fR\fB\fIPATH\fR\fR
-Change the current node to the given path (if unique) or root if no argument is given.
-.TP
+.RS 4
+Change the current node to the given path (if unique) or root if no argument is given\&.
+.RE
+.PP
\fBdir \fR\fB\fIPATH\fR\fR
-Dumps information about the node (namespace, attributes, content).
-.TP
+.RS 4
+Dumps information about the node (namespace, attributes, content)\&.
+.RE
+.PP
\fBdu \fR\fB\fIPATH\fR\fR
-Show the structure of the subtree under the given path or the current node.
-.TP
+.RS 4
+Show the structure of the subtree under the given path or the current node\&.
+.RE
+.PP
\fBexit\fR
-Leave the shell.
-.TP
+.RS 4
+Leave the shell\&.
+.RE
+.PP
\fBhelp\fR
-Show this help.
-.TP
+.RS 4
+Show this help\&.
+.RE
+.PP
\fBfree\fR
-Display memory usage.
-.TP
+.RS 4
+Display memory usage\&.
+.RE
+.PP
\fBload \fR\fB\fIFILENAME\fR\fR
-Load a new document with the given filename.
-.TP
+.RS 4
+Load a new document with the given filename\&.
+.RE
+.PP
\fBls \fR\fB\fIPATH\fR\fR
-List contents of the given path or the current directory.
-.TP
+.RS 4
+List contents of the given path or the current directory\&.
+.RE
+.PP
\fBpwd\fR
-Display the path to the current node.
-.TP
+.RS 4
+Display the path to the current node\&.
+.RE
+.PP
\fBquit\fR
-Leave the shell.
-.TP
+.RS 4
+Leave the shell\&.
+.RE
+.PP
\fBsave \fR\fB\fIFILENAME\fR\fR
-Save the current document to the given filename or to the original name.
-.TP
+.RS 4
+Save the current document to the given filename or to the original name\&.
+.RE
+.PP
\fBvalidate\fR
-Check the document for errors.
-.TP
+.RS 4
+Check the document for errors\&.
+.RE
+.PP
\fBwrite \fR\fB\fIFILENAME\fR\fR
-Write the current node to the given filename.
+.RS 4
+Write the current node to the given filename\&.
+.RE
.SH "ENVIRONMENT"
-.TP
+.PP
\fBSGML_CATALOG_FILES\fR
+.RS 4
SGML
-catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
+catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
\fBSGML_CATALOG_FILES\fR
-environment variable to a list of catalogs. An empty one should deactivate loading the default
-\fI/etc/sgml/catalog\fR
-catalog.
-.TP
+environment variable to a list of catalogs\&. An empty one should deactivate loading the default
+/etc/sgml/catalog
+catalog\&.
+.RE
+.PP
\fBXML_CATALOG_FILES\fR
+.RS 4
XML
-catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
+catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
\fBXML_CATALOG_FILES\fR
-environment variable to a list of catalogs. An empty one should deactivate loading the default
-\fI/etc/xml/catalog\fR
-catalog.
-.TP
+environment variable to a list of catalogs\&. An empty one should deactivate loading the default
+/etc/xml/catalog
+catalog\&.
+.RE
+.PP
\fBXML_DEBUG_CATALOG\fR
+.RS 4
Setting the environment variable
\fBXML_DEBUG_CATALOG\fR
to
\fInon\-zero\fR
using the
\fBexport\fR
-command outputs debugging information related to catalog operations.
-.TP
+command outputs debugging information related to catalog operations\&.
+.RE
+.PP
\fBXMLLINT_INDENT\fR
+.RS 4
Setting the environment variable
\fBXMLLINT_INDENT\fR
-controls the indentation. The default value is two spaces " ".
+controls the indentation\&. The default value is two spaces " "\&.
+.RE
.SH "DIAGNOSTICS"
.PP
+
\fBxmllint\fR
-return codes provide information that can be used when calling it from scripts.
-.TP
+return codes provide information that can be used when calling it from scripts\&.
+.PP
\fB0\fR
+.RS 4
No error
-.TP
+.RE
+.PP
\fB1\fR
+.RS 4
Unclassified
-.TP
+.RE
+.PP
\fB2\fR
+.RS 4
Error in
DTD
-.TP
+.RE
+.PP
\fB3\fR
+.RS 4
Validation error
-.TP
+.RE
+.PP
\fB4\fR
+.RS 4
Validation error
-.TP
+.RE
+.PP
\fB5\fR
+.RS 4
Error in schema compilation
-.TP
+.RE
+.PP
\fB6\fR
+.RS 4
Error writing output
-.TP
+.RE
+.PP
\fB7\fR
+.RS 4
Error in pattern (generated when
\fB\-\-pattern\fR
option is used)
-.TP
+.RE
+.PP
\fB8\fR
+.RS 4
Error in Reader registration (generated when
\fB\-\-chkregister\fR
option is used)
-.TP
+.RE
+.PP
\fB9\fR
+.RS 4
Out of memory error
+.RE
.SH "SEE ALSO"
.PP
\fBlibxml\fR(3)
.PP
More information can be found at
-.TP 3
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
\fBlibxml\fR(3)
web page
-\fI\%http://www.xmlsoft.org/\fR
-.TP
-\(bu
+\m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
W3C
XSLT
page
-\fI\%http://www.w3.org/TR/xslt\fR
-.SH "AUTHOR"
-John Fleck <jfleck@inkstain.net>, Ziying Sherwin <sherwin@nlm.nih.gov>, Heiko Rupp <hwr@pilhuhn.de>.
+\m[blue]\fB\%http://www.w3.org/TR/xslt\fR\m[]
+.RE
+.sp
+.SH "AUTHORS"
+.PP
+\fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
+.RS 4
+Author.
+.RE
+.PP
+\fBZiying Sherwin\fR <\&sherwin@nlm\&.nih\&.gov\&>
+.RS 4
+Author.
+.RE
+.PP
+\fBHeiko Rupp\fR <\&hwr@pilhuhn\&.de\&>
+.RS 4
+Author.
+.RE
+.SH "COPYRIGHT"
+.br
+Copyright \(co 2001, 2004
+.br
diff --git a/doc/xmllint.xml b/doc/xmllint.xml
index 9a41b4e..5f0f000 100644
--- a/doc/xmllint.xml
+++ b/doc/xmllint.xml
@@ -69,6 +69,7 @@
<arg choice="plain"><option>--version</option></arg>
<arg choice="plain"><option>--debug</option></arg>
<arg choice="plain"><option>--shell</option></arg>
+ <arg choice="plain"><option>--xpath "<replaceable class="option">XPath_expression</replaceable>"</option></arg>
<arg choice="plain"><option>--debugent</option></arg>
<arg choice="plain"><option>--copy</option></arg>
<arg choice="plain"><option>--recover</option></arg>
@@ -528,6 +529,19 @@
</varlistentry>
<varlistentry>
+ <term><option>--xpath "<replaceable class="option">XPath_expression</replaceable>"</option></term>
+ <listitem>
+ <para>
+ Run an XPath expression given as argument and print the
+ result. In case of a nodeset result, each node in the
+ node set is serialized in full in the output. In case
+ of an empty node set the "XPath set is empty" result
+ will be shown and an error exit code will be returned.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--stream</option></term>
<listitem>
<para>