mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-01 10:06:59 +03:00
Bugfix - parser.c xmlIO.c xmlIO.h: fixed bug 26650, and improved the
Bugfix - parser.c xmlIO.c xmlIO.h: fixed bug 26650, and improved the global init function. Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Wed Oct 4 14:39:01 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
|
* parser.c xmlIO.c xmlIO.h: fixed bug 26650, and improved
|
||||||
|
the global init function.
|
||||||
|
|
||||||
Tue Oct 3 11:28:52 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
Tue Oct 3 11:28:52 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
* HTMLparser.c: Doohhh, attribute name parsing was still case
|
* HTMLparser.c: Doohhh, attribute name parsing was still case
|
||||||
|
@ -71,6 +71,7 @@ struct _xmlOutputBuffer {
|
|||||||
* Interfaces for input
|
* Interfaces for input
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void xmlRegisterDefaultInputCallbacks (void);
|
||||||
xmlParserInputBufferPtr
|
xmlParserInputBufferPtr
|
||||||
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
||||||
|
|
||||||
@ -108,6 +109,7 @@ int xmlRegisterInputCallbacks (xmlInputMatchCallback match,
|
|||||||
/*
|
/*
|
||||||
* Interfaces for output
|
* Interfaces for output
|
||||||
*/
|
*/
|
||||||
|
void xmlRegisterDefaultOutputCallbacks(void);
|
||||||
xmlOutputBufferPtr
|
xmlOutputBufferPtr
|
||||||
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
||||||
|
|
||||||
|
9
parser.c
9
parser.c
@ -9499,6 +9499,10 @@ xmlParseDoc(xmlChar *cur) {
|
|||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#ifdef LIBXML_XPATH_ENABLED
|
||||||
|
#include <libxml/xpath.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static int xmlParserInitialized = 0;
|
static int xmlParserInitialized = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -9516,9 +9520,14 @@ xmlInitParser(void) {
|
|||||||
xmlInitCharEncodingHandlers();
|
xmlInitCharEncodingHandlers();
|
||||||
xmlInitializePredefinedEntities();
|
xmlInitializePredefinedEntities();
|
||||||
xmlDefaultSAXHandlerInit();
|
xmlDefaultSAXHandlerInit();
|
||||||
|
xmlRegisterDefaultInputCallbacks();
|
||||||
|
xmlRegisterDefaultOutputCallbacks();
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
htmlInitAutoClose();
|
htmlInitAutoClose();
|
||||||
htmlDefaultSAXHandlerInit();
|
htmlDefaultSAXHandlerInit();
|
||||||
|
#endif
|
||||||
|
#ifdef LIBXML_XPATH_ENABLED
|
||||||
|
xmlXPathInit();
|
||||||
#endif
|
#endif
|
||||||
xmlParserInitialized = 1;
|
xmlParserInitialized = 1;
|
||||||
}
|
}
|
||||||
|
8
xmlIO.c
8
xmlIO.c
@ -644,6 +644,9 @@ xmlRegisterOutputCallbacks(xmlOutputMatchCallback match,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlRegisterDefaultInputCallbacks(void) {
|
xmlRegisterDefaultInputCallbacks(void) {
|
||||||
|
if (xmlInputCallbackInitialized)
|
||||||
|
return;
|
||||||
|
|
||||||
xmlRegisterInputCallbacks(xmlFileMatch, xmlFileOpen,
|
xmlRegisterInputCallbacks(xmlFileMatch, xmlFileOpen,
|
||||||
xmlFileRead, xmlFileClose);
|
xmlFileRead, xmlFileClose);
|
||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
@ -660,6 +663,7 @@ xmlRegisterDefaultInputCallbacks(void) {
|
|||||||
xmlRegisterInputCallbacks(xmlIOFTPMatch, xmlIOFTPOpen,
|
xmlRegisterInputCallbacks(xmlIOFTPMatch, xmlIOFTPOpen,
|
||||||
xmlIOFTPRead, xmlIOFTPClose);
|
xmlIOFTPRead, xmlIOFTPClose);
|
||||||
#endif /* LIBXML_FTP_ENABLED */
|
#endif /* LIBXML_FTP_ENABLED */
|
||||||
|
xmlInputCallbackInitialized = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -669,6 +673,9 @@ xmlRegisterDefaultInputCallbacks(void) {
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlRegisterDefaultOutputCallbacks(void) {
|
xmlRegisterDefaultOutputCallbacks(void) {
|
||||||
|
if (xmlOutputCallbackInitialized)
|
||||||
|
return;
|
||||||
|
|
||||||
xmlRegisterOutputCallbacks(xmlFileMatch, xmlFileOpenW,
|
xmlRegisterOutputCallbacks(xmlFileMatch, xmlFileOpenW,
|
||||||
xmlFileWrite, xmlFileClose);
|
xmlFileWrite, xmlFileClose);
|
||||||
/*********************************
|
/*********************************
|
||||||
@ -693,6 +700,7 @@ xmlRegisterDefaultOutputCallbacks(void) {
|
|||||||
xmlIOFTPWrite, xmlIOFTPClose);
|
xmlIOFTPWrite, xmlIOFTPClose);
|
||||||
#endif
|
#endif
|
||||||
**********************************/
|
**********************************/
|
||||||
|
xmlOutputCallbackInitialized = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
2
xmlIO.h
2
xmlIO.h
@ -71,6 +71,7 @@ struct _xmlOutputBuffer {
|
|||||||
* Interfaces for input
|
* Interfaces for input
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void xmlRegisterDefaultInputCallbacks (void);
|
||||||
xmlParserInputBufferPtr
|
xmlParserInputBufferPtr
|
||||||
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
||||||
|
|
||||||
@ -108,6 +109,7 @@ int xmlRegisterInputCallbacks (xmlInputMatchCallback match,
|
|||||||
/*
|
/*
|
||||||
* Interfaces for output
|
* Interfaces for output
|
||||||
*/
|
*/
|
||||||
|
void xmlRegisterDefaultOutputCallbacks(void);
|
||||||
xmlOutputBufferPtr
|
xmlOutputBufferPtr
|
||||||
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user