aboutsummaryrefslogtreecommitdiffstats
path: root/xmlIO.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2004-06-08 10:16:42 +0000
committerDaniel Veillard <veillard@src.gnome.org>2004-06-08 10:16:42 +0000
commit1b243b4fc9638312287fb5b4dd3ea209bf42bf6a (patch)
tree8df04a2b86c2b69af23899a5707042b1fd2c2db4 /xmlIO.c
parentabf598b548d02ee32c7bf67baf3813f4d36e1257 (diff)
downloadandroid_external_libxml2-1b243b4fc9638312287fb5b4dd3ea209bf42bf6a.tar.gz
android_external_libxml2-1b243b4fc9638312287fb5b4dd3ea209bf42bf6a.tar.bz2
android_external_libxml2-1b243b4fc9638312287fb5b4dd3ea209bf42bf6a.zip
applied patch from Rob Richards for the per thread I/O mappings Daniel
* globals.c xmlIO.c include/libxml/globals.h include/libxml/xmlIO.h: applied patch from Rob Richards for the per thread I/O mappings Daniel
Diffstat (limited to 'xmlIO.c')
-rw-r--r--xmlIO.c45
1 files changed, 43 insertions, 2 deletions
diff --git a/xmlIO.c b/xmlIO.c
index 6fddcfbf..a51bf642 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -2125,7 +2125,7 @@ xmlOutputBufferClose(xmlOutputBufferPtr out)
}
#endif /* LIBXML_OUTPUT_ENABLED */
-static xmlParserInputBufferPtr
+xmlParserInputBufferPtr
__xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
xmlParserInputBufferPtr ret;
int i = 0;
@@ -2205,7 +2205,7 @@ xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
}
#ifdef LIBXML_OUTPUT_ENABLED
-static xmlOutputBufferPtr
+xmlOutputBufferPtr
__xmlOutputBufferCreateFilename(const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression ATTRIBUTE_UNUSED) {
@@ -2599,6 +2599,47 @@ xmlOutputBufferCreateIO(xmlOutputWriteCallback iowrite,
#endif /* LIBXML_OUTPUT_ENABLED */
/**
+ * xmlParserInputBufferCreateFilenameDefault:
+ * @func: function pointer to the new ParserInputBufferCreateFilenameFunc
+ *
+ * Registers a callback for URI input file handling
+ *
+ * Returns the old value of the registration function
+ */
+xmlParserInputBufferCreateFilenameFunc
+xmlParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func)
+{
+ xmlParserInputBufferCreateFilenameFunc old = xmlParserInputBufferCreateFilenameValue;
+ if (old == NULL) {
+ old = __xmlParserInputBufferCreateFilename;
+ }
+
+ xmlParserInputBufferCreateFilenameValue = func;
+ return(old);
+}
+
+/**
+ * xmlOutputBufferCreateFilenameDefault:
+ * @func: function pointer to the new OutputBufferCreateFilenameFunc
+ *
+ * Registers a callback for URI output file handling
+ *
+ * Returns the old value of the registration function
+ */
+xmlOutputBufferCreateFilenameFunc
+xmlOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
+{
+ xmlOutputBufferCreateFilenameFunc old = xmlOutputBufferCreateFilenameValue;
+#ifdef LIBXML_OUTPUT_ENABLED
+ if (old == NULL) {
+ old = __xmlOutputBufferCreateFilename;
+ }
+#endif
+ xmlOutputBufferCreateFilenameValue = func;
+ return(old);
+}
+
+/**
* xmlParserInputBufferPush:
* @in: a buffered parser input
* @len: the size in bytes of the array.