1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

avoid passing a char[] as snprintf first argument. implemented

* encoding.c parserInternals.c: avoid passing a char[] as snprintf
  first argument.
* threads.c include/libxml/threads.h: implemented xmlIsThreadsEnabled()
  based on Andrew W. Nosenko idea.
* doc/* elfgcchack.h: regenerated the API
Daniel
This commit is contained in:
Daniel Veillard
2005-09-02 12:28:34 +00:00
parent c2f7056adb
commit 2e7598cb06
19 changed files with 76 additions and 7 deletions

View File

@@ -1,3 +1,11 @@
Fri Sep 2 14:26:43 CEST 2005 Daniel Veillard <daniel@veillard.com>
* encoding.c parserInternals.c: avoid passing a char[] as snprintf
first argument.
* threads.c include/libxml/threads.h: implemented xmlIsThreadsEnabled()
based on Andrew W. Nosenko idea.
* doc/* elfgcchack.h: regenerated the API
Thu Sep 1 14:44:42 CEST 2005 Daniel Veillard <daniel@veillard.com> Thu Sep 1 14:44:42 CEST 2005 Daniel Veillard <daniel@veillard.com>
* configure.in: the use of AM_PATH_PYTHON is not portable enough * configure.in: the use of AM_PATH_PYTHON is not portable enough

View File

@@ -52,6 +52,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
</dd><dt>about</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> </dd><dt>about</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br /> <a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
<a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br /> <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
</dd><dt>above</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br /> </dd><dt>above</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />

View File

@@ -419,6 +419,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br /> <a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
<a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br /> <a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br /> <a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
<a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />

View File

@@ -113,7 +113,8 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>emitted</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br /> </dd><dt>emitted</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
</dd><dt>empty-element</dt><dd><a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br /> </dd><dt>empty-element</dt><dd><a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
</dd><dt>enable</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br /> </dd><dt>enable</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
</dd><dt>enabled</dt><dd><a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br /> </dd><dt>enabled</dt><dd><a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
<a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br /> <a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
</dd><dt>enabling</dt><dd><a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br /> </dd><dt>enabling</dt><dd><a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br /> <a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />

View File

@@ -279,6 +279,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br /> <a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br /> <a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br /> <a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
<a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />

View File

@@ -223,6 +223,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br /> <a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br /> <a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
<a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br /> <a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
<a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
<a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br /> <a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br /> <a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br /> <a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />

View File

@@ -307,6 +307,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>multiple</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br /> </dd><dt>multiple</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br /> <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
</dd><dt>multiply</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br /> </dd><dt>multiply</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
</dd><dt>multithread</dt><dd><a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
</dd><dt>multithreaded</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br /> </dd><dt>multithreaded</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br /> <a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
</dd><dt>mutex</dt><dd><a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br /> </dd><dt>mutex</dt><dd><a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />

View File

@@ -240,6 +240,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>Reverse</dt><dd><a href="html/libxml-list.html#xmlListReverse">xmlListReverse</a><br /> </dd><dt>Reverse</dt><dd><a href="html/libxml-list.html#xmlListReverse">xmlListReverse</a><br />
</dd><dt>Root</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br /> </dd><dt>Root</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br /> <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
</dd><dt>Run-time</dt><dd><a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
</dd><dt>Runic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsRunic">xmlUCSIsRunic</a><br /> </dd><dt>Runic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsRunic">xmlUCSIsRunic</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
<a href="APIchunk1.html">C-C</a> <a href="APIchunk1.html">C-C</a>

View File

@@ -1202,6 +1202,7 @@ 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#xmlGetThreadId">xmlGetThreadId</a><br />
<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br /> <a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
<a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br /> <a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
<a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
<a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br /> <a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
<a href="html/libxml-threads.html#xmlMutex">xmlMutex</a><br /> <a href="html/libxml-threads.html#xmlMutex">xmlMutex</a><br />
<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br /> <a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />

View File

@@ -2084,6 +2084,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a><br /> <a href="html/libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a><br />
<a href="html/libxml-chvalid.html#xmlIsPubidChar_tab">xmlIsPubidChar_tab</a><br /> <a href="html/libxml-chvalid.html#xmlIsPubidChar_tab">xmlIsPubidChar_tab</a><br />
<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br /> <a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
<a href="html/libxml-threads.html#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a><br />
<a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br /> <a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br /> <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
<a href="html/libxml-globals.html#xmlKeepBlanksDefaultValue">xmlKeepBlanksDefaultValue</a><br /> <a href="html/libxml-globals.html#xmlKeepBlanksDefaultValue">xmlKeepBlanksDefaultValue</a><br />

View File

@@ -23,6 +23,7 @@ The content of this structure is not made public by the API.
<pre class="programlisting">int <a href="#xmlGetThreadId">xmlGetThreadId</a> (void)</pre> <pre class="programlisting">int <a href="#xmlGetThreadId">xmlGetThreadId</a> (void)</pre>
<pre class="programlisting">void <a href="#xmlInitThreads">xmlInitThreads</a> (void)</pre> <pre class="programlisting">void <a href="#xmlInitThreads">xmlInitThreads</a> (void)</pre>
<pre class="programlisting">int <a href="#xmlIsMainThread">xmlIsMainThread</a> (void)</pre> <pre class="programlisting">int <a href="#xmlIsMainThread">xmlIsMainThread</a> (void)</pre>
<pre class="programlisting">int <a href="#xmlIsThreadsEnabled">xmlIsThreadsEnabled</a> (void)</pre>
<pre class="programlisting">void <a href="#xmlLockLibrary">xmlLockLibrary</a> (void)</pre> <pre class="programlisting">void <a href="#xmlLockLibrary">xmlLockLibrary</a> (void)</pre>
<pre class="programlisting">void <a href="#xmlMutexLock">xmlMutexLock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)</pre> <pre class="programlisting">void <a href="#xmlMutexLock">xmlMutexLock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)</pre>
<pre class="programlisting">void <a href="#xmlMutexUnlock">xmlMutexUnlock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)</pre> <pre class="programlisting">void <a href="#xmlMutexUnlock">xmlMutexUnlock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)</pre>
@@ -50,7 +51,9 @@ The content of this structure is not made public by the API.
</pre><p>xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.</p> </pre><p>xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.</p>
<h3><a name="xmlIsMainThread" id="xmlIsMainThread"></a>Function: xmlIsMainThread</h3><pre class="programlisting">int xmlIsMainThread (void)<br /> <h3><a name="xmlIsMainThread" id="xmlIsMainThread"></a>Function: xmlIsMainThread</h3><pre class="programlisting">int xmlIsMainThread (void)<br />
</pre><p>xmlIsMainThread() check whether the current thread is the main thread.</p> </pre><p>xmlIsMainThread() check whether the current thread is the main thread.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the current thread is the main thread, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlLockLibrary" id="xmlLockLibrary"></a>Function: xmlLockLibrary</h3><pre class="programlisting">void xmlLockLibrary (void)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the current thread is the main thread, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlIsThreadsEnabled" id="xmlIsThreadsEnabled"></a>Function: xmlIsThreadsEnabled</h3><pre class="programlisting">int xmlIsThreadsEnabled (void)<br />
</pre><p>Run-time information about whether multithread support is compiled in</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 (true) if library was compiled with multithread support enabled or 0 (false) otherwise.</td></tr></tbody></table></div><h3><a name="xmlLockLibrary" id="xmlLockLibrary"></a>Function: xmlLockLibrary</h3><pre class="programlisting">void xmlLockLibrary (void)<br />
</pre><p>xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.</p> </pre><p>xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.</p>
<h3><a name="xmlMutexLock" id="xmlMutexLock"></a>Function: xmlMutexLock</h3><pre class="programlisting">void xmlMutexLock (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br /> <h3><a name="xmlMutexLock" id="xmlMutexLock"></a>Function: xmlMutexLock</h3><pre class="programlisting">void xmlMutexLock (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br />
</pre><p>xmlMutexLock() is used to lock a libxml2 token.</p> </pre><p>xmlMutexLock() is used to lock a libxml2 token.</p>

View File

@@ -1329,6 +1329,7 @@
<exports symbol='xmlInitThreads' type='function'/> <exports symbol='xmlInitThreads' type='function'/>
<exports symbol='xmlUnlockLibrary' type='function'/> <exports symbol='xmlUnlockLibrary' type='function'/>
<exports symbol='xmlFreeMutex' type='function'/> <exports symbol='xmlFreeMutex' type='function'/>
<exports symbol='xmlIsThreadsEnabled' type='function'/>
</file> </file>
<file name='tree'> <file name='tree'>
<summary>interfaces for tree manipulation</summary> <summary>interfaces for tree manipulation</summary>
@@ -10254,6 +10255,10 @@ actually an xmlCharEncoding'/>
<arg name='elem' type='xmlNodePtr' info='the element carrying the attribute'/> <arg name='elem' type='xmlNodePtr' info='the element carrying the attribute'/>
<arg name='attr' type='xmlAttrPtr' info='the attribute'/> <arg name='attr' type='xmlAttrPtr' info='the attribute'/>
</function> </function>
<function name='xmlIsThreadsEnabled' file='threads' module='threads'>
<info>Run-time information about whether multithread support is compiled in</info>
<return type='int' info='1 (true) if library was compiled with multithread support enabled or 0 (false) otherwise.'/>
</function>
<function name='xmlIsXHTML' file='tree' module='xmlsave'> <function name='xmlIsXHTML' file='tree' module='xmlsave'>
<info>Try to find if the document correspond to an XHTML DTD</info> <info>Try to find if the document correspond to an XHTML DTD</info>
<return type='int' info='1 if true, 0 if not and -1 in case of error'/> <return type='int' info='1 if true, 0 if not and -1 in case of error'/>

View File

@@ -2078,6 +2078,7 @@
<reference name='xmlIsPubidChar_ch' href='html/libxml-chvalid.html#xmlIsPubidChar_ch'/> <reference name='xmlIsPubidChar_ch' href='html/libxml-chvalid.html#xmlIsPubidChar_ch'/>
<reference name='xmlIsPubidChar_tab' href='html/libxml-chvalid.html#xmlIsPubidChar_tab'/> <reference name='xmlIsPubidChar_tab' href='html/libxml-chvalid.html#xmlIsPubidChar_tab'/>
<reference name='xmlIsRef' href='html/libxml-valid.html#xmlIsRef'/> <reference name='xmlIsRef' href='html/libxml-valid.html#xmlIsRef'/>
<reference name='xmlIsThreadsEnabled' href='html/libxml-threads.html#xmlIsThreadsEnabled'/>
<reference name='xmlIsXHTML' href='html/libxml-tree.html#xmlIsXHTML'/> <reference name='xmlIsXHTML' href='html/libxml-tree.html#xmlIsXHTML'/>
<reference name='xmlKeepBlanksDefault' href='html/libxml-parser.html#xmlKeepBlanksDefault'/> <reference name='xmlKeepBlanksDefault' href='html/libxml-parser.html#xmlKeepBlanksDefault'/>
<reference name='xmlKeepBlanksDefaultValue' href='html/libxml-globals.html#xmlKeepBlanksDefaultValue'/> <reference name='xmlKeepBlanksDefaultValue' href='html/libxml-globals.html#xmlKeepBlanksDefaultValue'/>
@@ -5553,6 +5554,7 @@
<ref name='xmlIsPubidChar_ch'/> <ref name='xmlIsPubidChar_ch'/>
<ref name='xmlIsPubidChar_tab'/> <ref name='xmlIsPubidChar_tab'/>
<ref name='xmlIsRef'/> <ref name='xmlIsRef'/>
<ref name='xmlIsThreadsEnabled'/>
<ref name='xmlIsXHTML'/> <ref name='xmlIsXHTML'/>
<ref name='xmlKeepBlanksDefault'/> <ref name='xmlKeepBlanksDefault'/>
<ref name='xmlKeepBlanksDefaultValue'/> <ref name='xmlKeepBlanksDefaultValue'/>
@@ -11540,6 +11542,7 @@
<ref name='xmlGetThreadId'/> <ref name='xmlGetThreadId'/>
<ref name='xmlInitThreads'/> <ref name='xmlInitThreads'/>
<ref name='xmlIsMainThread'/> <ref name='xmlIsMainThread'/>
<ref name='xmlIsThreadsEnabled'/>
<ref name='xmlLockLibrary'/> <ref name='xmlLockLibrary'/>
<ref name='xmlMutex'/> <ref name='xmlMutex'/>
<ref name='xmlMutexLock'/> <ref name='xmlMutexLock'/>
@@ -16930,6 +16933,9 @@
<ref name='xmlParseDocTypeDecl'/> <ref name='xmlParseDocTypeDecl'/>
<ref name='xmlValidateRoot'/> <ref name='xmlValidateRoot'/>
</word> </word>
<word name='Run-time'>
<ref name='xmlIsThreadsEnabled'/>
</word>
<word name='Runic'> <word name='Runic'>
<ref name='xmlUCSIsRunic'/> <ref name='xmlUCSIsRunic'/>
</word> </word>
@@ -18081,6 +18087,7 @@
<word name='about'> <word name='about'>
<ref name='_xmlParserCtxt'/> <ref name='_xmlParserCtxt'/>
<ref name='xmlDebugDumpString'/> <ref name='xmlDebugDumpString'/>
<ref name='xmlIsThreadsEnabled'/>
<ref name='xmlShellDir'/> <ref name='xmlShellDir'/>
<ref name='xmlTextWriterWriteRawLen'/> <ref name='xmlTextWriterWriteRawLen'/>
</word> </word>
@@ -19752,6 +19759,7 @@
<ref name='xmlExpDump'/> <ref name='xmlExpDump'/>
<ref name='xmlExpMaxToken'/> <ref name='xmlExpMaxToken'/>
<ref name='xmlGetLastError'/> <ref name='xmlGetLastError'/>
<ref name='xmlIsThreadsEnabled'/>
<ref name='xmlPatterncompile'/> <ref name='xmlPatterncompile'/>
<ref name='xmlRegexpCompile'/> <ref name='xmlRegexpCompile'/>
<ref name='xmlRegexpExec'/> <ref name='xmlRegexpExec'/>
@@ -21300,6 +21308,7 @@
<ref name='xmlCatalogSetDebug'/> <ref name='xmlCatalogSetDebug'/>
</word> </word>
<word name='enabled'> <word name='enabled'>
<ref name='xmlIsThreadsEnabled'/>
<ref name='xmlSaveFile'/> <ref name='xmlSaveFile'/>
<ref name='xmlSaveFormatFile'/> <ref name='xmlSaveFormatFile'/>
</word> </word>
@@ -23115,6 +23124,7 @@
<ref name='xmlDebugDumpNode'/> <ref name='xmlDebugDumpNode'/>
<ref name='xmlDebugDumpNodeList'/> <ref name='xmlDebugDumpNodeList'/>
<ref name='xmlDebugDumpOneNode'/> <ref name='xmlDebugDumpOneNode'/>
<ref name='xmlIsThreadsEnabled'/>
<ref name='xmlNanoFTPUpdateURL'/> <ref name='xmlNanoFTPUpdateURL'/>
<ref name='xmlNanoHTTPFetch'/> <ref name='xmlNanoHTTPFetch'/>
<ref name='xmlNanoHTTPMethod'/> <ref name='xmlNanoHTTPMethod'/>
@@ -23748,6 +23758,7 @@
<ref name='xmlCleanupThreads'/> <ref name='xmlCleanupThreads'/>
<ref name='xmlInitThreads'/> <ref name='xmlInitThreads'/>
<ref name='xmlInitializeGlobalState'/> <ref name='xmlInitializeGlobalState'/>
<ref name='xmlIsThreadsEnabled'/>
<ref name='xmlLockLibrary'/> <ref name='xmlLockLibrary'/>
<ref name='xmlModuleFree'/> <ref name='xmlModuleFree'/>
<ref name='xmlModuleOpen'/> <ref name='xmlModuleOpen'/>
@@ -24429,6 +24440,9 @@
<word name='multiply'> <word name='multiply'>
<ref name='xmlXPathMultValues'/> <ref name='xmlXPathMultValues'/>
</word> </word>
<word name='multithread'>
<ref name='xmlIsThreadsEnabled'/>
</word>
<word name='multithreaded'> <word name='multithreaded'>
<ref name='htmlInitAutoClose'/> <ref name='htmlInitAutoClose'/>
<ref name='xmlInitParser'/> <ref name='xmlInitParser'/>

View File

@@ -4695,6 +4695,16 @@ extern __typeof (xmlIsRef) xmlIsRef__internal_alias __attribute((visibility("hid
#endif #endif
#endif #endif
#ifdef bottom_threads
#undef xmlIsThreadsEnabled
extern __typeof (xmlIsThreadsEnabled) xmlIsThreadsEnabled __attribute((alias("xmlIsThreadsEnabled__internal_alias")));
#else
#ifndef xmlIsThreadsEnabled
extern __typeof (xmlIsThreadsEnabled) xmlIsThreadsEnabled__internal_alias __attribute((visibility("hidden")));
#define xmlIsThreadsEnabled xmlIsThreadsEnabled__internal_alias
#endif
#endif
#ifdef bottom_xmlsave #ifdef bottom_xmlsave
#undef xmlIsXHTML #undef xmlIsXHTML
extern __typeof (xmlIsXHTML) xmlIsXHTML __attribute((alias("xmlIsXHTML__internal_alias"))); extern __typeof (xmlIsXHTML) xmlIsXHTML __attribute((alias("xmlIsXHTML__internal_alias")));

View File

@@ -1905,7 +1905,7 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
case -2: { case -2: {
char buf[50]; char buf[50];
snprintf(buf, 49, "0x%02X 0x%02X 0x%02X 0x%02X", snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
in->content[0], in->content[1], in->content[0], in->content[1],
in->content[2], in->content[3]); in->content[2], in->content[3]);
buf[49] = 0; buf[49] = 0;
@@ -2077,7 +2077,7 @@ retry:
* and continue the transcoding phase, hoping the error * and continue the transcoding phase, hoping the error
* did not mangle the encoder state. * did not mangle the encoder state.
*/ */
snprintf((char *) charref, sizeof(charref), "&#%d;", cur); snprintf((char *) &charref[0], sizeof(charref), "&#%d;", cur);
xmlBufferShrink(in, len); xmlBufferShrink(in, len);
xmlBufferAddHead(in, charref, -1); xmlBufferAddHead(in, charref, -1);
@@ -2085,7 +2085,7 @@ retry:
} else { } else {
char buf[50]; char buf[50];
snprintf(buf, 49, "0x%02X 0x%02X 0x%02X 0x%02X", snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
in->content[0], in->content[1], in->content[0], in->content[1],
in->content[2], in->content[3]); in->content[2], in->content[3]);
buf[49] = 0; buf[49] = 0;

View File

@@ -36,7 +36,6 @@ typedef xmlRMutex *xmlRMutexPtr;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
XMLPUBFUN xmlMutexPtr XMLCALL XMLPUBFUN xmlMutexPtr XMLCALL
xmlNewMutex (void); xmlNewMutex (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
@@ -58,6 +57,8 @@ XMLPUBFUN void XMLCALL
/* /*
* Library wide APIs. * Library wide APIs.
*/ */
XMLPUBFUN int XMLCALL
xmlIsThreadsEnabled(void);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlInitThreads (void); xmlInitThreads (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL

View File

@@ -728,7 +728,7 @@ encoding_error:
{ {
char buffer[150]; char buffer[150];
snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n", snprintf(&buffer[0], 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
ctxt->input->cur[0], ctxt->input->cur[1], ctxt->input->cur[0], ctxt->input->cur[1],
ctxt->input->cur[2], ctxt->input->cur[3]); ctxt->input->cur[2], ctxt->input->cur[3]);
__xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR, __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,

View File

@@ -164,6 +164,24 @@ static xmlRMutexPtr xmlLibraryLock = NULL;
static void xmlOnceInit(void); static void xmlOnceInit(void);
#endif #endif
/**
* xmlIsThreadsEnabled:
*
* Run-time information about whether multithread support is compiled in
*
* Returns 1 (true) if library was compiled with multithread support
* enabled or 0 (false) otherwise.
*/
int
xmlIsThreadsEnabled(void)
{
#ifdef LIBXML_THREAD_ENABLED
return 1;
#else
return 0;
#endif
}
/** /**
* xmlNewMutex: * xmlNewMutex:
* *

View File

@@ -996,6 +996,7 @@ xmlIsMainThread
xmlIsMixedElement xmlIsMixedElement
xmlIsPubidChar xmlIsPubidChar
xmlIsRef xmlIsRef
xmlIsThreadsEnabled
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
xmlIsXHTML xmlIsXHTML
#endif #endif