X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ce8835c060bd2fefff34414e03bb4e6ace9be8c..3d777efedc1e05bd6c2a7c34a00a65895b62bb13:/src/expat/lib/xmltok.c diff --git a/src/expat/lib/xmltok.c b/src/expat/lib/xmltok.c index 9188afebf1..c3f1c03384 100644 --- a/src/expat/lib/xmltok.c +++ b/src/expat/lib/xmltok.c @@ -2,16 +2,27 @@ See the file COPYING for copying permission. */ +#include + #ifdef COMPILED_FROM_DSP #include "winconfig.h" #elif defined(OS2_32) #include "os2config.h" +#elif defined(__MSDOS__) +#include "dosconfig.h" #elif defined(MACOS_CLASSIC) #include "macconfig.h" +#elif defined(__amigaos__) +#include "amigaconfig.h" +#elif defined(__WATCOMC__) +#include "watcomconfig.h" #else -#include "expat_config.h" +#ifdef HAVE_EXPAT_CONFIG_H +#include +#endif #endif /* ndef COMPILED_FROM_DSP */ +#include "expat_external.h" #include "internal.h" #include "xmltok.h" #include "nametab.h" @@ -290,7 +301,9 @@ sb_charMatches(const ENCODING *enc, const char *p, int c) #endif #define PREFIX(ident) normal_ ## ident +#define XML_TOK_IMPL_C #include "xmltok_impl.c" +#undef XML_TOK_IMPL_C #undef MINBPC #undef BYTE_TYPE @@ -687,7 +700,9 @@ little2_isNmstrtMin(const ENCODING *enc, const char *p) #define IS_NMSTRT_CHAR(enc, p, n) (0) #define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) +#define XML_TOK_IMPL_C #include "xmltok_impl.c" +#undef XML_TOK_IMPL_C #undef MINBPC #undef BYTE_TYPE @@ -826,7 +841,9 @@ big2_isNmstrtMin(const ENCODING *enc, const char *p) #define IS_NMSTRT_CHAR(enc, p, n) (0) #define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) +#define XML_TOK_IMPL_C #include "xmltok_impl.c" +#undef XML_TOK_IMPL_C #undef MINBPC #undef BYTE_TYPE @@ -1233,7 +1250,7 @@ XmlUtf16Encode(int charNum, unsigned short *buf) struct unknown_encoding { struct normal_encoding normal; - int (*convert)(void *userData, const char *p); + CONVERTER convert; void *userData; unsigned short utf16[256]; char utf8[256][4]; @@ -1448,7 +1465,7 @@ static const char KW_UTF_16LE[] = { static int FASTCALL getEncodingIndex(const char *name) { - static const char *encodingNames[] = { + static const char * const encodingNames[] = { KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, @@ -1481,7 +1498,7 @@ getEncodingIndex(const char *name) static int -initScan(const ENCODING **encodingTable, +initScan(const ENCODING * const *encodingTable, const INIT_ENCODING *enc, int state, const char *ptr, @@ -1605,7 +1622,9 @@ initScan(const ENCODING **encodingTable, #define NS(x) x #define ns(x) x +#define XML_TOK_NS_C #include "xmltok_ns.c" +#undef XML_TOK_NS_C #undef NS #undef ns @@ -1614,7 +1633,9 @@ initScan(const ENCODING **encodingTable, #define NS(x) x ## NS #define ns(x) x ## _ns +#define XML_TOK_NS_C #include "xmltok_ns.c" +#undef XML_TOK_NS_C #undef NS #undef ns