mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 12:35:57 +00:00
[LIBXML2] Update to version 2.10.0. CORE-17766
This commit is contained in:
parent
608bbe1136
commit
911153da10
80 changed files with 2351 additions and 20735 deletions
39
sdk/lib/3rdparty/libxml2/xmlmemory.c
vendored
39
sdk/lib/3rdparty/libxml2/xmlmemory.c
vendored
|
@ -8,26 +8,9 @@
|
|||
#include "libxml.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CTYPE_H
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
/* #define DEBUG_MEMORY */
|
||||
|
||||
|
@ -759,11 +742,9 @@ xmlMemDisplay(FILE *fp)
|
|||
MEMHDR *p;
|
||||
unsigned idx;
|
||||
int nb = 0;
|
||||
#if defined(HAVE_LOCALTIME) && defined(HAVE_STRFTIME)
|
||||
time_t currentTime;
|
||||
char buf[500];
|
||||
struct tm * tstruct;
|
||||
#endif
|
||||
#endif
|
||||
FILE *old_fp = fp;
|
||||
|
||||
|
@ -774,12 +755,10 @@ xmlMemDisplay(FILE *fp)
|
|||
}
|
||||
|
||||
#ifdef MEM_LIST
|
||||
#if defined(HAVE_LOCALTIME) && defined(HAVE_STRFTIME)
|
||||
currentTime = time(NULL);
|
||||
tstruct = localtime(¤tTime);
|
||||
strftime(buf, sizeof(buf) - 1, "%I:%M:%S %p", tstruct);
|
||||
fprintf(fp," %s\n\n", buf);
|
||||
#endif
|
||||
|
||||
|
||||
fprintf(fp," MEMORY ALLOCATED : %lu, MAX was %lu\n",
|
||||
|
@ -956,6 +935,9 @@ xmlMemoryDump(void)
|
|||
/**
|
||||
* xmlInitMemory:
|
||||
*
|
||||
* DEPRECATED: This function will be made private. Call xmlInitParser to
|
||||
* initialize the library.
|
||||
*
|
||||
* Initialize the memory layer.
|
||||
*
|
||||
* Returns 0 on success
|
||||
|
@ -963,9 +945,7 @@ xmlMemoryDump(void)
|
|||
int
|
||||
xmlInitMemory(void)
|
||||
{
|
||||
#ifdef HAVE_STDLIB_H
|
||||
char *breakpoint;
|
||||
#endif
|
||||
#ifdef DEBUG_MEMORY
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlInitMemory()\n");
|
||||
|
@ -978,18 +958,14 @@ xmlInitMemory(void)
|
|||
xmlMemInitialized = 1;
|
||||
xmlMemMutex = xmlNewMutex();
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
breakpoint = getenv("XML_MEM_BREAKPOINT");
|
||||
if (breakpoint != NULL) {
|
||||
sscanf(breakpoint, "%ud", &xmlMemStopAtBlock);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
breakpoint = getenv("XML_MEM_TRACE");
|
||||
if (breakpoint != NULL) {
|
||||
sscanf(breakpoint, "%p", &xmlMemTraceBlockAt);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_MEMORY
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
|
@ -1001,6 +977,11 @@ xmlInitMemory(void)
|
|||
/**
|
||||
* xmlCleanupMemory:
|
||||
*
|
||||
* DEPRECATED: This function will be made private. Call xmlCleanupParser
|
||||
* to free global state but see the warnings there. xmlCleanupParser
|
||||
* should be only called once at program exit. In most cases, you don't
|
||||
* have call cleanup functions at all.
|
||||
*
|
||||
* Free up all the memory allocated by the library for its own
|
||||
* use. This should not be called by user level code.
|
||||
*/
|
||||
|
@ -1159,5 +1140,3 @@ xmlGcMemGet(xmlFreeFunc *freeFunc, xmlMallocFunc *mallocFunc,
|
|||
return(0);
|
||||
}
|
||||
|
||||
#define bottom_xmlmemory
|
||||
#include "elfgcchack.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue