Huge cleanup, I switched to compile with
-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit
-Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat
-Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow
-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
- HTMLparser.[ch] HTMLtree.c SAX.c debugXML.c encoding.[ch]
encoding.h entities.c error.c list.[ch] nanoftp.c
nanohttp.c parser.[ch] parserInternals.[ch] testHTML.c
testSAX.c testURI.c testXPath.c tree.[ch] uri.c
valid.[ch] xinclude.c xmlIO.[ch] xmllint.c xmlmemory.c
xpath.c xpathInternals.h xpointer.[ch] example/gjobread.c:
Cleanup, staticfied a number of non-exported functions,
detected and cleaned up a dozen of problem found this way,
avoided a lot of public function name/typedef/system names clashes
- doc/xml.html: updated
- configure.in: switched private flags to the really pedantic ones.
Daniel
diff --git a/parserInternals.h b/parserInternals.h
index 3fdb8f6..f343cdb 100644
--- a/parserInternals.h
+++ b/parserInternals.h
@@ -14,6 +14,7 @@
#define __XML_PARSER_INTERNALS_H__
#include <libxml/parser.h>
+#include <libxml/HTMLparser.h>
#ifdef __cplusplus
extern "C" {
@@ -157,6 +158,8 @@
/**
* Input Streams
*/
+xmlParserInputPtr xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
+ const xmlChar *buffer);
xmlParserInputPtr xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
void xmlPushInput (xmlParserCtxtPtr ctxt,
@@ -278,6 +281,9 @@
int inputPush (xmlParserCtxtPtr ctxt,
xmlParserInputPtr value);
xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
+xmlChar *namePop (xmlParserCtxtPtr ctxt);
+int namePush (xmlParserCtxtPtr ctxt,
+ xmlChar *value);
/*
* other comodities shared between parser.c and parserInternals
@@ -288,7 +294,6 @@
int *len);
void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
-xmlChar *namePop (xmlParserCtxtPtr ctxt);
int xmlCheckLanguageID (const xmlChar *lang);
/*
@@ -296,6 +301,8 @@
*/
int xmlCurrentChar (xmlParserCtxtPtr ctxt,
int *len);
+int xmlCopyCharMultiByte (xmlChar *out,
+ int val);
int xmlCopyChar (int len,
xmlChar *out,
int val);
@@ -307,6 +314,8 @@
* Actually comes from the HTML parser but launched from the init stuff
*/
void htmlInitAutoClose (void);
+htmlParserCtxtPtr htmlCreateFileParserCtxt(const char *filename,
+ const char *encoding);
#endif
#ifdef __cplusplus
}