summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwaclaw <kwaclaw>2006-11-26 17:34:46 +0000
committerkwaclaw <kwaclaw>2006-11-26 17:34:46 +0000
commit8a509279262f3be7e8d6fd1d3ee809ab9beb2958 (patch)
tree055e4c43f32445b21322e5a6283b47d3b04221c6
parent397b88f58676ac599cd9ea04f73d76fb7bdb4ec2 (diff)
downloadlibexpat-8a509279262f3be7e8d6fd1d3ee809ab9beb2958.tar.gz
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).
-rw-r--r--lib/expat.dsp8
-rw-r--r--lib/xmltok.c10
-rw-r--r--lib/xmltok_impl.c4
-rw-r--r--lib/xmltok_ns.c9
4 files changed, 31 insertions, 0 deletions
diff --git a/lib/expat.dsp b/lib/expat.dsp
index ffe307f..66374f3 100644
--- a/lib/expat.dsp
+++ b/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/lib/xmltok.c b/lib/xmltok.c
index d1810a5..068afde 100644
--- a/lib/xmltok.c
+++ b/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/lib/xmltok_impl.c b/lib/xmltok_impl.c
index 0ee57ab..1268819 100644
--- a/lib/xmltok_impl.c
+++ b/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/lib/xmltok_ns.c b/lib/xmltok_ns.c
index d2f8938..c3b88fd 100644
--- a/lib/xmltok_ns.c
+++ b/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 */