diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2004-06-08 10:16:42 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2004-06-08 10:16:42 +0000 |
commit | 1b243b4fc9638312287fb5b4dd3ea209bf42bf6a (patch) | |
tree | 8df04a2b86c2b69af23899a5707042b1fd2c2db4 /xmlIO.c | |
parent | abf598b548d02ee32c7bf67baf3813f4d36e1257 (diff) | |
download | android_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.c | 45 |
1 files changed, 43 insertions, 2 deletions
@@ -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. |