diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2000-01-14 14:45:24 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2000-01-14 14:45:24 +0000 |
commit | 0142b84bbfd75ae0696604f4f12a1f6383205185 (patch) | |
tree | 2d79e7a427860d4b6a95cdc5ba84046aafb15532 /entities.c | |
parent | 2eac5039948f9eb591e968162538bc71957a7381 (diff) | |
download | android_external_libxml2-0142b84bbfd75ae0696604f4f12a1f6383205185.tar.gz android_external_libxml2-0142b84bbfd75ae0696604f4f12a1f6383205185.tar.bz2 android_external_libxml2-0142b84bbfd75ae0696604f4f12a1f6383205185.zip |
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
Diffstat (limited to 'entities.c')
-rw-r--r-- | entities.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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; |