1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

Applied the last patches from Gary, cleanup, activated threading all user

* include/libxml/SAX.h include/libxml/globals.h include/libxml/parser.h
  include/libxml/parserInternals.h include/libxml/tree.h
  include/libxml/xmlerror.h HTMLparser.c SAX.c error.c globals.c
  nanoftp.c nanohttp.c parser.c parserInternals.c testDocbook.c
  testHTML.c testSAX.c tree.c uri.c xlink.c xmlmemory.c:
  Applied the last patches from Gary, cleanup, activated threading
  all user accessible global variables are now handled in globals.[ch]
  Still a bit rought but make tests passes with either
  --with-threads defined at configure time or not.
* Makefile.am example/Makefile.am: added globals.[ch] and threads
  linking options
Daniel
This commit is contained in:
Daniel Veillard
2001-10-13 09:15:48 +00:00
parent b847864fc2
commit d046356030
25 changed files with 323 additions and 365 deletions

View File

@ -3557,6 +3557,8 @@ static int
htmlParseDocument(htmlParserCtxtPtr ctxt) {
xmlDtdPtr dtd;
xmlInitParser();
htmlDefaultSAXHandlerInit();
ctxt->html = 1;
@ -4669,6 +4671,8 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
htmlParserInputPtr inputStream;
xmlParserInputBufferPtr buf;
xmlInitParser();
buf = xmlAllocParserInputBuffer(enc);
if (buf == NULL) return(NULL);
@ -4745,6 +4749,8 @@ htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void
htmlDocPtr ret;
htmlParserCtxtPtr ctxt;
xmlInitParser();
if (cur == NULL) return(NULL);
@ -4869,6 +4875,8 @@ htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr s
htmlParserCtxtPtr ctxt;
htmlSAXHandlerPtr oldsax = NULL;
xmlInitParser();
ctxt = htmlCreateFileParserCtxt(filename, encoding);
if (ctxt == NULL) return(NULL);
if (sax != NULL) {