]> granicus.if.org Git - libexpat/commitdiff
Applied patch for bug #653449.
authorKarl Waclawek <kwaclaw@users.sourceforge.net>
Sat, 14 Dec 2002 03:12:18 +0000 (03:12 +0000)
committerKarl Waclawek <kwaclaw@users.sourceforge.net>
Sat, 14 Dec 2002 03:12:18 +0000 (03:12 +0000)
expat/lib/xmltok.c
expat/lib/xmltok.h

index 05bfa341fcca46d9af38778e55e152da13d6ec49..5f101afe87eeb2ab343a2ae0b145e1805c665274 100644 (file)
@@ -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);
index 81a16bed98f05945224ddec36cf34db1ccb83f3b..3d776be71fc947114c7b9dbedd40cd15c6f378d3 100644 (file)
@@ -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
 }