X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/876fa7e46926cc8bb5c41b380e454f971d87d7e6..b9d880d6382e24156cdce4ae0390c843cc6208d9:/src/expat/lib/xmlparse.c diff --git a/src/expat/lib/xmlparse.c b/src/expat/lib/xmlparse.c index 09002dbbb9..7dbabe8124 100644 --- a/src/expat/lib/xmlparse.c +++ b/src/expat/lib/xmlparse.c @@ -10,6 +10,16 @@ #include "winconfig.h" #include "expat.h" +#elif defined(OS2_32) + +#include "os2config.h" +#include "expat.h" + +#elif defined(__MSDOS__) + +#include "dosconfig.h" +#include "expat.h" + #elif defined(MACOS_CLASSIC) #include "macconfig.h" @@ -17,7 +27,7 @@ #else -#include +#include "expat_config.h" #ifdef __declspec #define XMLPARSEAPI(type) type __cdecl @@ -4038,7 +4048,8 @@ doProlog(XML_Parser parser, name = el->name; dtd->scaffold[myindex].name = name; nameLen = 0; - for (; name[nameLen++]; ); + for (; name[nameLen++]; ) + ; dtd->contentStringLen += nameLen; if (elementDeclHandler) handleDefault = XML_FALSE; @@ -4670,7 +4681,7 @@ defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *attId, XML_Bool isCdata, if (type->nDefaultAtts == type->allocDefaultAtts) { if (type->allocDefaultAtts == 0) { type->allocDefaultAtts = 8; - type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts + type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); if (!type->defaultAtts) return 0; @@ -5534,8 +5545,8 @@ poolGrow(STRING_POOL *pool) int blockSize = (pool->end - pool->start)*2; pool->blocks = (BLOCK *) pool->mem->realloc_fcn(pool->blocks, - (offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char))); + (offsetof(BLOCK, s) + + blockSize * sizeof(XML_Char))); if (pool->blocks == NULL) return XML_FALSE; pool->blocks->size = blockSize; @@ -5551,7 +5562,7 @@ poolGrow(STRING_POOL *pool) else blockSize *= 2; tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char)); + + blockSize * sizeof(XML_Char)); if (!tem) return XML_FALSE; tem->size = blockSize;