1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

Oops, it seems I forgot to commit 1.8.4 changes

- restored xmlNewGlobalNs since this seems used
- fixed a problem with INCLUDE_WINSOCK
- removed all calls to exit() from the library code.
- removed bugs detected by Windows compilers
- started adding interfaces for parsing well balanced XML fragments
- releasing 1.8.4
- rebuilt the docs
Daniel
This commit is contained in:
Daniel Veillard
2000-01-14 14:45:24 +00:00
parent 2eac503994
commit 0142b84bbf
25 changed files with 872 additions and 676 deletions

View File

@ -388,13 +388,14 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
static int buffer_size = 0;
static xmlChar *buffer = NULL;
void growBuffer(void) {
int growBuffer(void) {
buffer_size *= 2;
buffer = (xmlChar *) xmlRealloc(buffer, buffer_size * sizeof(xmlChar));
if (buffer == NULL) {
perror("realloc failed");
exit(1);
return(-1);
}
return(0);
}
@ -437,7 +438,7 @@ xmlEncodeEntities(xmlDocPtr doc, const xmlChar *input) {
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
if (buffer == NULL) {
perror("malloc failed");
exit(1);
return(NULL);
}
out = buffer;
}
@ -530,10 +531,11 @@ xmlEncodeEntities(xmlDocPtr doc, const xmlChar *input) {
*/
#define growBufferReentrant() { \
buffer_size *= 2; \
buffer = (xmlChar *) xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
buffer = (xmlChar *) \
xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
if (buffer == NULL) { \
perror("realloc failed"); \
exit(1); \
return(NULL); \
} \
}
@ -572,7 +574,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
if (buffer == NULL) {
perror("malloc failed");
exit(1);
return(NULL);
}
out = buffer;