From: Karl Waclawek Date: Sat, 14 Dec 2002 03:12:18 +0000 (+0000) Subject: Applied patch for bug #653449. X-Git-Tag: R_1_95_6~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed47baa513c497112521ad00929dd642ae4d28f6;p=libexpat Applied patch for bug #653449. --- diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c index 05bfa341..5f101afe 100644 --- a/expat/lib/xmltok.c +++ b/expat/lib/xmltok.c @@ -1330,7 +1330,7 @@ unknown_toUtf16(const ENCODING *enc, ENCODING * XmlInitUnknownEncoding(void *mem, int *table, - int (*convert)(void *userData, const char *p), + CONVERTER convert, void *userData) { int i; @@ -1620,7 +1620,7 @@ initScan(const ENCODING **encodingTable, ENCODING * XmlInitUnknownEncodingNS(void *mem, int *table, - int (*convert)(void *userData, const char *p), + CONVERTER convert, void *userData) { ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData); diff --git a/expat/lib/xmltok.h b/expat/lib/xmltok.h index 81a16bed..3d776be7 100644 --- a/expat/lib/xmltok.h +++ b/expat/lib/xmltok.h @@ -273,16 +273,20 @@ int XmlParseXmlDecl(int isGeneralTextEntity, const char **encodingNamePtr, const ENCODING **namedEncodingPtr, int *standalonePtr); + int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name); const ENCODING *XmlGetUtf8InternalEncoding(void); const ENCODING *XmlGetUtf16InternalEncoding(void); int FASTCALL XmlUtf8Encode(int charNumber, char *buf); int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf); int XmlSizeOfUnknownEncoding(void); + +typedef int (*CONVERTER)(void *userData, const char *p); + ENCODING * XmlInitUnknownEncoding(void *mem, int *table, - int (*conv)(void *userData, const char *p), + CONVERTER convert, void *userData); int XmlParseXmlDeclNS(int isGeneralTextEntity, @@ -295,13 +299,14 @@ int XmlParseXmlDeclNS(int isGeneralTextEntity, const char **encodingNamePtr, const ENCODING **namedEncodingPtr, int *standalonePtr); + int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name); const ENCODING *XmlGetUtf8InternalEncodingNS(void); const ENCODING *XmlGetUtf16InternalEncodingNS(void); ENCODING * XmlInitUnknownEncodingNS(void *mem, int *table, - int (*conv)(void *userData, const char *p), + CONVERTER convert, void *userData); #ifdef __cplusplus }