Skip to content

Commit 34a050c

Browse files
committed
Move some HTML functions to correct header file
1 parent ca3807d commit 34a050c

11 files changed

+127
-124
lines changed

doc/devhelp/libxml2-HTMLparser.html

+35
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ <h2>Synopsis</h2>
4242
int <a href="#UTF8ToHtml">UTF8ToHtml</a> (unsigned char * out, <br> int * outlen, <br> const unsigned char * in, <br> int * inlen);
4343
<a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlAttrAllowed">htmlAttrAllowed</a> (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * attr, <br> int legacy);
4444
int <a href="#htmlAutoCloseTag">htmlAutoCloseTag</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem);
45+
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a> (const char * filename, <br> const char * encoding);
4546
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a> (const char * buffer, <br> int size);
4647
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a> (<a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br> void * user_data, <br> const char * chunk, <br> int size, <br> const char * filename, <br> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
4748
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadDoc">htmlCtxtReadDoc</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br> const char * URL, <br> const char * encoding, <br> int options);
@@ -58,6 +59,7 @@ <h2>Synopsis</h2>
5859
const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityValueLookup">htmlEntityValueLookup</a> (unsigned int value);
5960
void <a href="#htmlFreeParserCtxt">htmlFreeParserCtxt</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
6061
int <a href="#htmlHandleOmittedElem">htmlHandleOmittedElem</a> (int val);
62+
void <a href="#htmlInitAutoClose">htmlInitAutoClose</a> (void);
6163
int <a href="#htmlIsAutoClosed">htmlIsAutoClosed</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem);
6264
int <a href="#htmlIsScriptAttribute">htmlIsScriptAttribute</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
6365
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlNewParserCtxt">htmlNewParserCtxt</a> (void);
@@ -386,6 +388,31 @@ <h3>
386388
<hr>
387389
<div class="refsect2" lang="en">
388390
<h3>
391+
<a name="htmlCreateFileParserCtxt"></a>htmlCreateFileParserCtxt ()</h3>
392+
<pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateFileParserCtxt (const char * filename, <br> const char * encoding)<br>
393+
</pre>
394+
<p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
395+
<div class="variablelist"><table border="0">
396+
<col align="left">
397+
<tbody>
398+
<tr>
399+
<td><span class="term"><i><tt>filename</tt></i>:</span></td>
400+
<td>the filename</td>
401+
</tr>
402+
<tr>
403+
<td><span class="term"><i><tt>encoding</tt></i>:</span></td>
404+
<td>a free form C string describing the HTML document encoding, or NULL</td>
405+
</tr>
406+
<tr>
407+
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
408+
<td>the new parser context or NULL</td>
409+
</tr>
410+
</tbody>
411+
</table></div>
412+
</div>
413+
<hr>
414+
<div class="refsect2" lang="en">
415+
<h3>
389416
<a name="htmlCreateMemoryParserCtxt"></a>htmlCreateMemoryParserCtxt ()</h3>
390417
<pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateMemoryParserCtxt (const char * buffer, <br> int size)<br>
391418
</pre>
@@ -851,6 +878,14 @@ <h3>
851878
<hr>
852879
<div class="refsect2" lang="en">
853880
<h3>
881+
<a name="htmlInitAutoClose"></a>htmlInitAutoClose ()</h3>
882+
<pre class="programlisting">void htmlInitAutoClose (void)<br>
883+
</pre>
884+
<p>DEPRECATED: This function will be made private. Call <a href="libxml2-parser.html#xmlInitParser">xmlInitParser</a> to initialize the library. This is a no-op now.</p>
885+
</div>
886+
<hr>
887+
<div class="refsect2" lang="en">
888+
<h3>
854889
<a name="htmlIsAutoClosed"></a>htmlIsAutoClosed ()</h3>
855890
<pre class="programlisting">int htmlIsAutoClosed (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)<br>
856891
</pre>

doc/devhelp/libxml2-parserInternals.html

-35
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ <h2>Synopsis</h2>
5454
#define <a href="#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a>;
5555
#define <a href="#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a>;
5656
#define <a href="#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a>;
57-
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a> (const char * filename, <br> const char * encoding);
58-
void <a href="#htmlInitAutoClose">htmlInitAutoClose</a> (void);
5957
<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#inputPop">inputPop</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
6058
int <a href="#inputPush">inputPush</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> value);
6159
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#namePop">namePop</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
@@ -620,39 +618,6 @@ <h3>
620618
<hr>
621619
<div class="refsect2" lang="en">
622620
<h3>
623-
<a name="htmlCreateFileParserCtxt"></a>htmlCreateFileParserCtxt ()</h3>
624-
<pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateFileParserCtxt (const char * filename, <br> const char * encoding)<br>
625-
</pre>
626-
<p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
627-
<div class="variablelist"><table border="0">
628-
<col align="left">
629-
<tbody>
630-
<tr>
631-
<td><span class="term"><i><tt>filename</tt></i>:</span></td>
632-
<td>the filename</td>
633-
</tr>
634-
<tr>
635-
<td><span class="term"><i><tt>encoding</tt></i>:</span></td>
636-
<td>a free form C string describing the HTML document encoding, or NULL</td>
637-
</tr>
638-
<tr>
639-
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
640-
<td>the new parser context or NULL</td>
641-
</tr>
642-
</tbody>
643-
</table></div>
644-
</div>
645-
<hr>
646-
<div class="refsect2" lang="en">
647-
<h3>
648-
<a name="htmlInitAutoClose"></a>htmlInitAutoClose ()</h3>
649-
<pre class="programlisting">void htmlInitAutoClose (void)<br>
650-
</pre>
651-
<p>DEPRECATED: This function will be made private. Call <a href="libxml2-parser.html#xmlInitParser">xmlInitParser</a> to initialize the library. This is a no-op now.</p>
652-
</div>
653-
<hr>
654-
<div class="refsect2" lang="en">
655-
<h3>
656621
<a name="inputPop"></a>inputPop ()</h3>
657622
<pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> inputPop (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br>
658623
</pre>

doc/devhelp/libxml2.devhelp2

+2-2
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@
19661966
<keyword type="function" name="hasInternalSubset ()" link="libxml2-SAX.html#hasInternalSubset"/>
19671967
<keyword type="function" name="htmlAttrAllowed ()" link="libxml2-HTMLparser.html#htmlAttrAllowed"/>
19681968
<keyword type="function" name="htmlAutoCloseTag ()" link="libxml2-HTMLparser.html#htmlAutoCloseTag"/>
1969-
<keyword type="function" name="htmlCreateFileParserCtxt ()" link="libxml2-parserInternals.html#htmlCreateFileParserCtxt"/>
1969+
<keyword type="function" name="htmlCreateFileParserCtxt ()" link="libxml2-HTMLparser.html#htmlCreateFileParserCtxt"/>
19701970
<keyword type="function" name="htmlCreateMemoryParserCtxt ()" link="libxml2-HTMLparser.html#htmlCreateMemoryParserCtxt"/>
19711971
<keyword type="function" name="htmlCreatePushParserCtxt ()" link="libxml2-HTMLparser.html#htmlCreatePushParserCtxt"/>
19721972
<keyword type="function" name="htmlCtxtReadDoc ()" link="libxml2-HTMLparser.html#htmlCtxtReadDoc"/>
@@ -1990,7 +1990,7 @@
19901990
<keyword type="function" name="htmlFreeParserCtxt ()" link="libxml2-HTMLparser.html#htmlFreeParserCtxt"/>
19911991
<keyword type="function" name="htmlGetMetaEncoding ()" link="libxml2-HTMLtree.html#htmlGetMetaEncoding"/>
19921992
<keyword type="function" name="htmlHandleOmittedElem ()" link="libxml2-HTMLparser.html#htmlHandleOmittedElem"/>
1993-
<keyword type="function" name="htmlInitAutoClose ()" link="libxml2-parserInternals.html#htmlInitAutoClose"/>
1993+
<keyword type="function" name="htmlInitAutoClose ()" link="libxml2-HTMLparser.html#htmlInitAutoClose"/>
19941994
<keyword type="function" name="htmlIsAutoClosed ()" link="libxml2-HTMLparser.html#htmlIsAutoClosed"/>
19951995
<keyword type="function" name="htmlIsBooleanAttr ()" link="libxml2-HTMLtree.html#htmlIsBooleanAttr"/>
19961996
<keyword type="function" name="htmlIsScriptAttribute ()" link="libxml2-HTMLparser.html#htmlIsScriptAttribute"/>

doc/libxml2-api.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<exports symbol='UTF8ToHtml' type='function'/>
4444
<exports symbol='htmlAttrAllowed' type='function'/>
4545
<exports symbol='htmlAutoCloseTag' type='function'/>
46+
<exports symbol='htmlCreateFileParserCtxt' type='function'/>
4647
<exports symbol='htmlCreateMemoryParserCtxt' type='function'/>
4748
<exports symbol='htmlCreatePushParserCtxt' type='function'/>
4849
<exports symbol='htmlCtxtReadDoc' type='function'/>
@@ -59,6 +60,7 @@
5960
<exports symbol='htmlEntityValueLookup' type='function'/>
6061
<exports symbol='htmlFreeParserCtxt' type='function'/>
6162
<exports symbol='htmlHandleOmittedElem' type='function'/>
63+
<exports symbol='htmlInitAutoClose' type='function'/>
6264
<exports symbol='htmlIsAutoClosed' type='function'/>
6365
<exports symbol='htmlIsScriptAttribute' type='function'/>
6466
<exports symbol='htmlNewParserCtxt' type='function'/>
@@ -898,8 +900,6 @@
898900
<exports symbol='xmlStringComment' type='variable'/>
899901
<exports symbol='xmlStringText' type='variable'/>
900902
<exports symbol='xmlStringTextNoenc' type='variable'/>
901-
<exports symbol='htmlCreateFileParserCtxt' type='function'/>
902-
<exports symbol='htmlInitAutoClose' type='function'/>
903903
<exports symbol='inputPop' type='function'/>
904904
<exports symbol='inputPush' type='function'/>
905905
<exports symbol='namePop' type='function'/>
@@ -7397,7 +7397,7 @@ Could we use @subtypes for this?'/>
73977397
<arg name='name' type='const xmlChar *' info='The tag name'/>
73987398
<arg name='elem' type='htmlNodePtr' info='the HTML element'/>
73997399
</function>
7400-
<function name='htmlCreateFileParserCtxt' file='parserInternals' module='HTMLparser'>
7400+
<function name='htmlCreateFileParserCtxt' file='HTMLparser' module='HTMLparser'>
74017401
<cond>defined(LIBXML_HTML_ENABLED)</cond>
74027402
<info>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
74037403
<return type='htmlParserCtxtPtr' info='the new parser context or NULL'/>
@@ -7587,7 +7587,7 @@ Could we use @subtypes for this?'/>
75877587
<return type='int' info='the last value for 0 for no handling, 1 for auto insertion.'/>
75887588
<arg name='val' type='int' info='int 0 or 1'/>
75897589
</function>
7590-
<function name='htmlInitAutoClose' file='parserInternals' module='HTMLparser'>
7590+
<function name='htmlInitAutoClose' file='HTMLparser' module='HTMLparser'>
75917591
<cond>defined(LIBXML_HTML_ENABLED)</cond>
75927592
<info>DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. This is a no-op now.</info>
75937593
<return type='void'/>

doc/symbols.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494
<symbol file="SAX">startElement</symbol>
9595
<symbol file="SAX">unparsedEntityDecl</symbol>
9696
<symbol file="SAX2">xmlDefaultSAXHandlerInit</symbol>
97-
<symbol file="parserInternals">htmlCreateFileParserCtxt</symbol>
98-
<symbol file="parserInternals">htmlInitAutoClose</symbol>
97+
<symbol file="HTMLparser">htmlCreateFileParserCtxt</symbol>
98+
<symbol file="HTMLparser">htmlInitAutoClose</symbol>
9999
<symbol file="parserInternals">inputPop</symbol>
100100
<symbol file="parserInternals">inputPush</symbol>
101101
<symbol file="parserInternals">namePop</symbol>

include/libxml/HTMLparser.h

+6
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ struct _htmlEntityDesc {
8383
/*
8484
* There is only few public functions.
8585
*/
86+
XML_DEPRECATED
87+
XMLPUBFUN void XMLCALL
88+
htmlInitAutoClose (void);
8689
XMLPUBFUN const htmlElemDesc * XMLCALL
8790
htmlTagLookup (const xmlChar *tag);
8891
XMLPUBFUN const htmlEntityDesc * XMLCALL
@@ -125,6 +128,9 @@ XMLPUBFUN htmlDocPtr XMLCALL
125128
XMLPUBFUN htmlDocPtr XMLCALL
126129
htmlParseDoc (const xmlChar *cur,
127130
const char *encoding);
131+
XMLPUBFUN htmlParserCtxtPtr XMLCALL
132+
htmlCreateFileParserCtxt(const char *filename,
133+
const char *encoding);
128134
XMLPUBFUN htmlDocPtr XMLCALL
129135
htmlSAXParseFile(const char *filename,
130136
const char *encoding,

include/libxml/parserInternals.h

-10
Original file line numberDiff line numberDiff line change
@@ -571,16 +571,6 @@ XMLPUBFUN int XMLCALL xmlCopyChar (int len,
571571
XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
572572
XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
573573

574-
#ifdef LIBXML_HTML_ENABLED
575-
/*
576-
* Actually comes from the HTML parser but launched from the init stuff.
577-
*/
578-
XML_DEPRECATED
579-
XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
580-
XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
581-
const char *encoding);
582-
#endif
583-
584574
/*
585575
* Specific function to keep track of entities references
586576
* and used by the XSLT debugger.

libxml2.syms

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ LIBXML2_2.4.30 {
119119
# SAX2
120120
xmlDefaultSAXHandlerInit;
121121

122-
# parserInternals
122+
# HTMLparser
123123
htmlCreateFileParserCtxt;
124124
htmlInitAutoClose;
125+
126+
# parserInternals
125127
inputPop;
126128
inputPush;
127129
namePop;

parser.c

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
#include <libxml/tree.h>
5858
#include <libxml/parser.h>
5959
#include <libxml/parserInternals.h>
60+
#include <libxml/HTMLparser.h>
6061
#include <libxml/valid.h>
6162
#include <libxml/entities.h>
6263
#include <libxml/xmlerror.h>

0 commit comments

Comments
 (0)