From 40962ad8af77ef8f783262e20e91a1fb3d624e3c Mon Sep 17 00:00:00 2001 From: James Clark Date: Sun, 31 May 1998 08:39:35 +0000 Subject: [PATCH] Make XML_ErrorString return XML_Char * --- expat/xmlparse/xmlparse.c | 46 +++++++++++++++++++-------------------- expat/xmlparse/xmlparse.h | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/expat/xmlparse/xmlparse.c b/expat/xmlparse/xmlparse.c index 1404d369..15117f56 100755 --- a/expat/xmlparse/xmlparse.c +++ b/expat/xmlparse/xmlparse.c @@ -551,31 +551,31 @@ long XML_GetErrorByteIndex(XML_Parser parser) return errorByteIndex; } -const char *XML_ErrorString(int code) +const XML_Char *XML_ErrorString(int code) { - static const char *message[] = { + static const XML_Char *message[] = { 0, - "out of memory", - "syntax error", - "no element found", - "not well-formed", - "unclosed token", - "unclosed token", - "mismatched tag", - "duplicate attribute", - "junk after document element", - "illegal parameter entity reference", - "undefined entity", - "recursive entity reference", - "asynchronous entity", - "reference to invalid character number", - "reference to binary entity", - "reference to external entity in attribute", - "xml processing instruction not at start of external entity", - "unknown encoding", - "encoding specified in XML declaration is incorrect", - "unclosed CDATA section", - "error in processing external entity reference" + XML_T("out of memory"), + XML_T("syntax error"), + XML_T("no element found"), + XML_T("not well-formed"), + XML_T("unclosed token"), + XML_T("unclosed token"), + XML_T("mismatched tag"), + XML_T("duplicate attribute"), + XML_T("junk after document element"), + XML_T("illegal parameter entity reference"), + XML_T("undefined entity"), + XML_T("recursive entity reference"), + XML_T("asynchronous entity"), + XML_T("reference to invalid character number"), + XML_T("reference to binary entity"), + XML_T("reference to external entity in attribute"), + XML_T("xml processing instruction not at start of external entity"), + XML_T("unknown encoding"), + XML_T("encoding specified in XML declaration is incorrect"), + XML_T("unclosed CDATA section"), + XML_T("error in processing external entity reference") }; if (code > 0 && code < sizeof(message)/sizeof(message[0])) return message[code]; diff --git a/expat/xmlparse/xmlparse.h b/expat/xmlparse/xmlparse.h index 29d126f7..10cf0775 100755 --- a/expat/xmlparse/xmlparse.h +++ b/expat/xmlparse/xmlparse.h @@ -194,7 +194,7 @@ long XMLPARSEAPI XML_GetErrorByteIndex(XML_Parser parser); void XMLPARSEAPI XML_ParserFree(XML_Parser parser); -const char XMLPARSEAPI * +const XML_Char XMLPARSEAPI * XML_ErrorString(int code); #ifdef __cplusplus -- 2.40.0