1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +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:
Daniel Veillard
2000-10-04 12:40:27 +00:00
parent 970112a914
commit 7cfce324d8
5 changed files with 26 additions and 0 deletions

View File

@ -644,6 +644,9 @@ xmlRegisterOutputCallbacks(xmlOutputMatchCallback match,
*/
void
xmlRegisterDefaultInputCallbacks(void) {
if (xmlInputCallbackInitialized)
return;
xmlRegisterInputCallbacks(xmlFileMatch, xmlFileOpen,
xmlFileRead, xmlFileClose);
#ifdef HAVE_ZLIB_H
@ -660,6 +663,7 @@ xmlRegisterDefaultInputCallbacks(void) {
xmlRegisterInputCallbacks(xmlIOFTPMatch, xmlIOFTPOpen,
xmlIOFTPRead, xmlIOFTPClose);
#endif /* LIBXML_FTP_ENABLED */
xmlInputCallbackInitialized = 1;
}
/**
@ -669,6 +673,9 @@ xmlRegisterDefaultInputCallbacks(void) {
*/
void
xmlRegisterDefaultOutputCallbacks(void) {
if (xmlOutputCallbackInitialized)
return;
xmlRegisterOutputCallbacks(xmlFileMatch, xmlFileOpenW,
xmlFileWrite, xmlFileClose);
/*********************************
@ -693,6 +700,7 @@ xmlRegisterDefaultOutputCallbacks(void) {
xmlIOFTPWrite, xmlIOFTPClose);
#endif
**********************************/
xmlOutputCallbackInitialized = 1;
}
/**