aboutsummaryrefslogtreecommitdiffstats
path: root/xmlIO.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-10-29 20:21:47 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-10-29 20:21:47 +0000
commitacf7ff0a658ad8c213cc87763f4ab48124459587 (patch)
tree65c9d70fe874afb47b827716e53bee31e3b6ed4b /xmlIO.c
parent635ef72a94db9f647dcff11d33f50115564ce091 (diff)
downloadandroid_external_libxml2-acf7ff0a658ad8c213cc87763f4ab48124459587.tar.gz
android_external_libxml2-acf7ff0a658ad8c213cc87763f4ab48124459587.tar.bz2
android_external_libxml2-acf7ff0a658ad8c213cc87763f4ab48124459587.zip
a few VMS updates from John A Fotheringham added
* vms/readme.vms vms/build_libxml.com nanoftp.c include/libxml/xmlversion.h.in: a few VMS updates from John A Fotheringham * include/libxml/xmlIO.h xmlIO.c: added xmlCleanupInputCallbacks() and xmlCleanupOutputCallbacks() for the Perl binding people. Daniel
Diffstat (limited to 'xmlIO.c')
-rw-r--r--xmlIO.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/xmlIO.c b/xmlIO.c
index 86b47015..fac91324 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -122,6 +122,56 @@ static xmlOutputCallback xmlOutputCallbackTable[MAX_OUTPUT_CALLBACK];
static int xmlOutputCallbackNr = 0;
static int xmlOutputCallbackInitialized = 0;
+/**
+ * xmlCleanupInputCallbacks:
+ *
+ * clears the entire input callback table. this includes the
+ * compiled-in I/O.
+ */
+void
+xmlCleanupInputCallbacks(void)
+{
+ int i;
+
+ if (!xmlInputCallbackInitialized)
+ return;
+
+ for (i = xmlInputCallbackNr - 1; i <= 0; i--) {
+ xmlInputCallbackTable[i].matchcallback = NULL;
+ xmlInputCallbackTable[i].opencallback = NULL;
+ xmlInputCallbackTable[i].readcallback = NULL;
+ xmlInputCallbackTable[i].closecallback = NULL;
+ }
+
+ xmlInputCallbackNr = 0;
+ xmlInputCallbackInitialized = 0;
+}
+
+/**
+ * xmlCleanupOutputCallbacks:
+ *
+ * clears the entire output callback table. this includes the
+ * compiled-in I/O callbacks.
+ */
+void
+xmlCleanupOutputCallbacks(void)
+{
+ int i;
+
+ if (!xmlOutputCallbackInitialized)
+ return;
+
+ for (i = xmlOutputCallbackNr - 1; i <= 0; i--) {
+ xmlOutputCallbackTable[i].matchcallback = NULL;
+ xmlOutputCallbackTable[i].opencallback = NULL;
+ xmlOutputCallbackTable[i].writecallback = NULL;
+ xmlOutputCallbackTable[i].closecallback = NULL;
+ }
+
+ xmlOutputCallbackNr = 0;
+ xmlOutputCallbackInitialized = 0;
+}
+
/************************************************************************
* *
* Standard I/O for file accesses *