From 3ff6041e9008069022d32ebe3bdaaf916bf46653 Mon Sep 17 00:00:00 2001 From: Karl Waclawek Date: Sun, 26 Nov 2006 17:34:46 +0000 Subject: [PATCH] Change for MS VC++: Added #ifdefs to allow for passing xmltok_impl.c and xmltok_ns.c to the compiler (to make them visible in IDE). --- expat/lib/expat.dsp | 8 ++++++++ expat/lib/xmltok.c | 10 ++++++++++ expat/lib/xmltok_impl.c | 4 ++++ expat/lib/xmltok_ns.c | 9 +++++++++ 4 files changed, 31 insertions(+) diff --git a/expat/lib/expat.dsp b/expat/lib/expat.dsp index ffe307fb..66374f30 100644 --- a/expat/lib/expat.dsp +++ b/expat/lib/expat.dsp @@ -115,6 +115,14 @@ SOURCE=.\xmlrole.c SOURCE=.\xmltok.c # End Source File +# Begin Source File + +SOURCE=.\xmltok_impl.c +# End Source File +# Begin Source File + +SOURCE=.\xmltok_ns.c +# End Source File # End Group # Begin Group "Header Files" diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c index d1810a58..068afdec 100644 --- a/expat/lib/xmltok.c +++ b/expat/lib/xmltok.c @@ -297,7 +297,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 @@ -694,7 +696,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 @@ -833,7 +837,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 @@ -1612,7 +1618,9 @@ initScan(const ENCODING * const *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 @@ -1621,7 +1629,9 @@ initScan(const ENCODING * const *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 diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c index 0ee57abb..12688192 100644 --- a/expat/lib/xmltok_impl.c +++ b/expat/lib/xmltok_impl.c @@ -2,6 +2,9 @@ See the file COPYING for copying permission. */ +/* This file is included! */ +#ifdef XML_TOK_IMPL_C + #ifndef IS_INVALID_CHAR #define IS_INVALID_CHAR(enc, ptr, n) (0) #endif @@ -1777,3 +1780,4 @@ PREFIX(updatePosition)(const ENCODING *enc, #undef CHECK_NMSTRT_CASE #undef CHECK_NMSTRT_CASES +#endif /* XML_TOK_IMPL_C */ diff --git a/expat/lib/xmltok_ns.c b/expat/lib/xmltok_ns.c index d2f89383..c3b88fdf 100644 --- a/expat/lib/xmltok_ns.c +++ b/expat/lib/xmltok_ns.c @@ -1,3 +1,10 @@ +/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd + See the file COPYING for copying permission. +*/ + +/* This file is included! */ +#ifdef XML_TOK_NS_C + const ENCODING * NS(XmlGetUtf8InternalEncoding)(void) { @@ -104,3 +111,5 @@ NS(XmlParseXmlDecl)(int isGeneralTextEntity, encoding, standalone); } + +#endif /* XML_TOK_NS_C */