mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 13:21:39 +00:00
[LIBXML2] Update to version 2.9.12. CORE-17766
This commit is contained in:
parent
271556e6f8
commit
40ee59d609
60 changed files with 3385 additions and 2832 deletions
55
sdk/lib/3rdparty/libxml2/xmlIO.c
vendored
55
sdk/lib/3rdparty/libxml2/xmlIO.c
vendored
|
@ -228,7 +228,7 @@ __xmlIOWin32UTF8ToWChar(const char *u8String)
|
|||
|
||||
/**
|
||||
* xmlIOErrMemory:
|
||||
* @extra: extra informations
|
||||
* @extra: extra information
|
||||
*
|
||||
* Handle an out of memory condition
|
||||
*/
|
||||
|
@ -242,7 +242,7 @@ xmlIOErrMemory(const char *extra)
|
|||
* __xmlIOErr:
|
||||
* @code: the error number
|
||||
* @
|
||||
* @extra: extra informations
|
||||
* @extra: extra information
|
||||
*
|
||||
* Handle an I/O error
|
||||
*/
|
||||
|
@ -420,7 +420,7 @@ __xmlIOErr(int domain, int code, const char *extra)
|
|||
/**
|
||||
* xmlIOErr:
|
||||
* @code: the error number
|
||||
* @extra: extra informations
|
||||
* @extra: extra information
|
||||
*
|
||||
* Handle an I/O error
|
||||
*/
|
||||
|
@ -433,7 +433,7 @@ xmlIOErr(int code, const char *extra)
|
|||
/**
|
||||
* __xmlLoaderErr:
|
||||
* @ctx: the parser context
|
||||
* @extra: extra informations
|
||||
* @extra: extra information
|
||||
*
|
||||
* Handle a resource access error
|
||||
*/
|
||||
|
@ -564,6 +564,33 @@ xmlCleanupOutputCallbacks(void)
|
|||
xmlOutputCallbackNr = 0;
|
||||
xmlOutputCallbackInitialized = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlPopOutputCallbacks:
|
||||
*
|
||||
* Remove the top output callbacks from the output stack. This includes the
|
||||
* compiled-in I/O.
|
||||
*
|
||||
* Returns the number of output callback registered or -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xmlPopOutputCallbacks(void)
|
||||
{
|
||||
if (!xmlOutputCallbackInitialized)
|
||||
return(-1);
|
||||
|
||||
if (xmlOutputCallbackNr <= 0)
|
||||
return(-1);
|
||||
|
||||
xmlOutputCallbackNr--;
|
||||
xmlOutputCallbackTable[xmlOutputCallbackNr].matchcallback = NULL;
|
||||
xmlOutputCallbackTable[xmlOutputCallbackNr].opencallback = NULL;
|
||||
xmlOutputCallbackTable[xmlOutputCallbackNr].writecallback = NULL;
|
||||
xmlOutputCallbackTable[xmlOutputCallbackNr].closecallback = NULL;
|
||||
|
||||
return(xmlOutputCallbackNr);
|
||||
}
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/************************************************************************
|
||||
|
@ -3378,18 +3405,12 @@ xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
|
|||
out->error = XML_IO_ENCODER;
|
||||
return(-1);
|
||||
}
|
||||
if (out->writecallback)
|
||||
nbchars = xmlBufUse(out->conv);
|
||||
else
|
||||
nbchars = ret;
|
||||
nbchars = ret >= 0 ? ret : 0;
|
||||
} else {
|
||||
ret = xmlBufAdd(out->buffer, (const xmlChar *) buf, chunk);
|
||||
if (ret != 0)
|
||||
return(-1);
|
||||
if (out->writecallback)
|
||||
nbchars = xmlBufUse(out->buffer);
|
||||
else
|
||||
nbchars = chunk;
|
||||
nbchars = chunk;
|
||||
}
|
||||
buf += chunk;
|
||||
len -= chunk;
|
||||
|
@ -3576,19 +3597,13 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
|
|||
out->error = XML_IO_ENCODER;
|
||||
return(-1);
|
||||
}
|
||||
if (out->writecallback)
|
||||
nbchars = xmlBufUse(out->conv);
|
||||
else
|
||||
nbchars = ret;
|
||||
nbchars = ret >= 0 ? ret : 0;
|
||||
} else {
|
||||
ret = escaping(xmlBufEnd(out->buffer), &chunk, str, &cons);
|
||||
if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
|
||||
return(-1);
|
||||
xmlBufAddLen(out->buffer, chunk);
|
||||
if (out->writecallback)
|
||||
nbchars = xmlBufUse(out->buffer);
|
||||
else
|
||||
nbchars = chunk;
|
||||
nbchars = chunk;
|
||||
}
|
||||
str += cons;
|
||||
len -= cons;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue