mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-06 13:45:00 +00:00
Fred and I added FASTCALL directives to xmltok.c and related files.
This commit is contained in:
parent
6483b5cbdd
commit
633caf8040
5 changed files with 131 additions and 122 deletions
|
@ -94,8 +94,8 @@ typedef char ICHAR;
|
|||
#endif /* HAVE_BCOPY */
|
||||
#endif /* HAVE_MEMMOVE */
|
||||
|
||||
#include "xmltok.h"
|
||||
#include "internal.h"
|
||||
#include "xmltok.h"
|
||||
#include "xmlrole.h"
|
||||
|
||||
typedef const XML_Char *KEY;
|
||||
|
@ -899,7 +899,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser,
|
|||
int oldParamEntityParsing = paramEntityParsing;
|
||||
int oldInEntityValue = prologState.inEntityValue;
|
||||
#endif
|
||||
int oldns_triplets = ns_triplets;
|
||||
XML_Bool oldns_triplets = ns_triplets;
|
||||
|
||||
/* Note that the magical uses of the pre-processor to make field
|
||||
access look more like C++ require that `parser' be overwritten
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <expat_config.h>
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include "internal.h"
|
||||
#include "xmltok.h"
|
||||
#include "nametab.h"
|
||||
|
||||
|
@ -111,19 +112,19 @@
|
|||
|| \
|
||||
((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
isNever(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
utf8_isName2(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
utf8_isName3(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
|
||||
|
@ -131,13 +132,13 @@ utf8_isName3(const ENCODING *enc, const char *p)
|
|||
|
||||
#define utf8_isName4 isNever
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
utf8_isNmstrt2(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
utf8_isNmstrt3(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
|
||||
|
@ -145,19 +146,19 @@ utf8_isNmstrt3(const ENCODING *enc, const char *p)
|
|||
|
||||
#define utf8_isNmstrt4 isNever
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
utf8_isInvalid2(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return UTF8_INVALID2((const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
utf8_isInvalid3(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return UTF8_INVALID3((const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
utf8_isInvalid4(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return UTF8_INVALID4((const unsigned char *)p);
|
||||
|
@ -167,21 +168,21 @@ struct normal_encoding {
|
|||
ENCODING enc;
|
||||
unsigned char type[256];
|
||||
#ifdef XML_MIN_SIZE
|
||||
int (*byteType)(const ENCODING *, const char *);
|
||||
int (*isNameMin)(const ENCODING *, const char *);
|
||||
int (*isNmstrtMin)(const ENCODING *, const char *);
|
||||
int (*byteToAscii)(const ENCODING *, const char *);
|
||||
int (*charMatches)(const ENCODING *, const char *, int);
|
||||
int (FASTCALL *byteType)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isNameMin)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isNmstrtMin)(const ENCODING *, const char *);
|
||||
int (FASTCALL *byteToAscii)(const ENCODING *, const char *);
|
||||
int (FASTCALL *charMatches)(const ENCODING *, const char *, int);
|
||||
#endif /* XML_MIN_SIZE */
|
||||
int (*isName2)(const ENCODING *, const char *);
|
||||
int (*isName3)(const ENCODING *, const char *);
|
||||
int (*isName4)(const ENCODING *, const char *);
|
||||
int (*isNmstrt2)(const ENCODING *, const char *);
|
||||
int (*isNmstrt3)(const ENCODING *, const char *);
|
||||
int (*isNmstrt4)(const ENCODING *, const char *);
|
||||
int (*isInvalid2)(const ENCODING *, const char *);
|
||||
int (*isInvalid3)(const ENCODING *, const char *);
|
||||
int (*isInvalid4)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isName2)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isName3)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isName4)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isNmstrt2)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isNmstrt3)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isNmstrt4)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isInvalid2)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isInvalid3)(const ENCODING *, const char *);
|
||||
int (FASTCALL *isInvalid4)(const ENCODING *, const char *);
|
||||
};
|
||||
|
||||
#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *) (enc))
|
||||
|
@ -212,7 +213,7 @@ struct normal_encoding {
|
|||
E ## isInvalid3, \
|
||||
E ## isInvalid4
|
||||
|
||||
static int checkCharRefNumber(int);
|
||||
static int FASTCALL checkCharRefNumber(int);
|
||||
|
||||
#include "xmltok_impl.h"
|
||||
#include "ascii.h"
|
||||
|
@ -233,7 +234,7 @@ static int checkCharRefNumber(int);
|
|||
(((struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
|
||||
|
||||
#ifdef XML_MIN_SIZE
|
||||
static int
|
||||
static int FASTCALL
|
||||
sb_byteType(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return SB_BYTE_TYPE(enc, p);
|
||||
|
@ -247,7 +248,7 @@ sb_byteType(const ENCODING *enc, const char *p)
|
|||
#ifdef XML_MIN_SIZE
|
||||
#define BYTE_TO_ASCII(enc, p) \
|
||||
(AS_NORMAL_ENCODING(enc)->byteToAscii(enc, p))
|
||||
static int
|
||||
static int FASTCALL
|
||||
sb_byteToAscii(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return *p;
|
||||
|
@ -276,7 +277,7 @@ sb_byteToAscii(const ENCODING *enc, const char *p)
|
|||
#ifdef XML_MIN_SIZE
|
||||
#define CHAR_MATCHES(enc, p, c) \
|
||||
(AS_NORMAL_ENCODING(enc)->charMatches(enc, p, c))
|
||||
static int
|
||||
static int FASTCALL
|
||||
sb_charMatches(const ENCODING *enc, const char *p, int c)
|
||||
{
|
||||
return *p == c;
|
||||
|
@ -306,7 +307,7 @@ enum { /* UTF8_cvalN is value of masked first byte of N byte sequence */
|
|||
UTF8_cval4 = 0xf0
|
||||
};
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
utf8_toUtf8(const ENCODING *enc,
|
||||
const char **fromP, const char *fromLim,
|
||||
char **toP, const char *toLim)
|
||||
|
@ -325,7 +326,7 @@ utf8_toUtf8(const ENCODING *enc,
|
|||
*toP = to;
|
||||
}
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
utf8_toUtf16(const ENCODING *enc,
|
||||
const char **fromP, const char *fromLim,
|
||||
unsigned short **toP, const unsigned short *toLim)
|
||||
|
@ -413,7 +414,7 @@ static const struct normal_encoding internal_utf8_encoding = {
|
|||
STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_)
|
||||
};
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
latin1_toUtf8(const ENCODING *enc,
|
||||
const char **fromP, const char *fromLim,
|
||||
char **toP, const char *toLim)
|
||||
|
@ -438,7 +439,7 @@ latin1_toUtf8(const ENCODING *enc,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
latin1_toUtf16(const ENCODING *enc,
|
||||
const char **fromP, const char *fromLim,
|
||||
unsigned short **toP, const unsigned short *toLim)
|
||||
|
@ -471,7 +472,7 @@ static const struct normal_encoding latin1_encoding = {
|
|||
STANDARD_VTABLE(sb_)
|
||||
};
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
ascii_toUtf8(const ENCODING *enc,
|
||||
const char **fromP, const char *fromLim,
|
||||
char **toP, const char *toLim)
|
||||
|
@ -504,7 +505,7 @@ static const struct normal_encoding ascii_encoding = {
|
|||
STANDARD_VTABLE(sb_)
|
||||
};
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
unicode_byte_type(char hi, char lo)
|
||||
{
|
||||
switch ((unsigned char)hi) {
|
||||
|
@ -524,7 +525,7 @@ unicode_byte_type(char hi, char lo)
|
|||
}
|
||||
|
||||
#define DEFINE_UTF16_TO_UTF8(E) \
|
||||
static void \
|
||||
static void FASTCALL \
|
||||
E ## toUtf8(const ENCODING *enc, \
|
||||
const char **fromP, const char *fromLim, \
|
||||
char **toP, const char *toLim) \
|
||||
|
@ -587,7 +588,7 @@ E ## toUtf8(const ENCODING *enc, \
|
|||
}
|
||||
|
||||
#define DEFINE_UTF16_TO_UTF16(E) \
|
||||
static void \
|
||||
static void FASTCALL \
|
||||
E ## toUtf16(const ENCODING *enc, \
|
||||
const char **fromP, const char *fromLim, \
|
||||
unsigned short **toP, const unsigned short *toLim) \
|
||||
|
@ -637,31 +638,31 @@ DEFINE_UTF16_TO_UTF16(big2_)
|
|||
|
||||
#ifdef XML_MIN_SIZE
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
little2_byteType(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return LITTLE2_BYTE_TYPE(enc, p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
little2_byteToAscii(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return LITTLE2_BYTE_TO_ASCII(enc, p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
little2_charMatches(const ENCODING *enc, const char *p, int c)
|
||||
{
|
||||
return LITTLE2_CHAR_MATCHES(enc, p, c);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
little2_isNameMin(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return LITTLE2_IS_NAME_CHAR_MINBPC(enc, p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
little2_isNmstrtMin(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p);
|
||||
|
@ -776,31 +777,31 @@ static const struct normal_encoding internal_little2_encoding = {
|
|||
|
||||
#ifdef XML_MIN_SIZE
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
big2_byteType(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return BIG2_BYTE_TYPE(enc, p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
big2_byteToAscii(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return BIG2_BYTE_TO_ASCII(enc, p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
big2_charMatches(const ENCODING *enc, const char *p, int c)
|
||||
{
|
||||
return BIG2_CHAR_MATCHES(enc, p, c);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
big2_isNameMin(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return BIG2_IS_NAME_CHAR_MINBPC(enc, p);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
big2_isNmstrtMin(const ENCODING *enc, const char *p)
|
||||
{
|
||||
return BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p);
|
||||
|
@ -903,7 +904,7 @@ static const struct normal_encoding internal_big2_encoding = {
|
|||
|
||||
#undef PREFIX
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
streqci(const char *s1, const char *s2)
|
||||
{
|
||||
for (;;) {
|
||||
|
@ -921,14 +922,14 @@ streqci(const char *s1, const char *s2)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
initUpdatePosition(const ENCODING *enc, const char *ptr,
|
||||
const char *end, POSITION *pos)
|
||||
{
|
||||
normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
toAscii(const ENCODING *enc, const char *ptr, const char *end)
|
||||
{
|
||||
char buf[1];
|
||||
|
@ -940,7 +941,7 @@ toAscii(const ENCODING *enc, const char *ptr, const char *end)
|
|||
return buf[0];
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
isSpace(int c)
|
||||
{
|
||||
switch (c) {
|
||||
|
@ -956,7 +957,7 @@ isSpace(int c)
|
|||
/* Return 1 if there's just optional white space or there's an S
|
||||
followed by name=val.
|
||||
*/
|
||||
static int
|
||||
static int FASTCALL
|
||||
parsePseudoAttribute(const ENCODING *enc,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
|
@ -1154,7 +1155,7 @@ doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
checkCharRefNumber(int result)
|
||||
{
|
||||
switch (result >> 8) {
|
||||
|
@ -1244,7 +1245,7 @@ XmlSizeOfUnknownEncoding(void)
|
|||
return sizeof(struct unknown_encoding);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
unknown_isName(const ENCODING *enc, const char *p)
|
||||
{
|
||||
const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
|
||||
|
@ -1254,7 +1255,7 @@ unknown_isName(const ENCODING *enc, const char *p)
|
|||
return UCS2_GET_NAMING(namePages, c >> 8, c & 0xFF);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
unknown_isNmstrt(const ENCODING *enc, const char *p)
|
||||
{
|
||||
const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
|
||||
|
@ -1264,7 +1265,7 @@ unknown_isNmstrt(const ENCODING *enc, const char *p)
|
|||
return UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xFF);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
unknown_isInvalid(const ENCODING *enc, const char *p)
|
||||
{
|
||||
const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
|
||||
|
@ -1272,7 +1273,7 @@ unknown_isInvalid(const ENCODING *enc, const char *p)
|
|||
return (c & ~0xFFFF) || checkCharRefNumber(c) < 0;
|
||||
}
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
unknown_toUtf8(const ENCODING *enc,
|
||||
const char **fromP, const char *fromLim,
|
||||
char **toP, const char *toLim)
|
||||
|
@ -1306,7 +1307,7 @@ unknown_toUtf8(const ENCODING *enc,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
unknown_toUtf16(const ENCODING *enc,
|
||||
const char **fromP, const char *fromLim,
|
||||
unsigned short **toP, const unsigned short *toLim)
|
||||
|
@ -1442,7 +1443,7 @@ static const char KW_UTF_16LE[] = {
|
|||
'\0'
|
||||
};
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
getEncodingIndex(const char *name)
|
||||
{
|
||||
static const char *encodingNames[] = {
|
||||
|
@ -1477,7 +1478,7 @@ getEncodingIndex(const char *name)
|
|||
*/
|
||||
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
initScan(const ENCODING **encodingTable,
|
||||
const INIT_ENCODING *enc,
|
||||
int state,
|
||||
|
|
|
@ -125,41 +125,49 @@ typedef struct {
|
|||
struct encoding;
|
||||
typedef struct encoding ENCODING;
|
||||
|
||||
struct encoding {
|
||||
int (*scanners[XML_N_STATES])(const ENCODING *,
|
||||
typedef int (FASTCALL *SCANNER)(const ENCODING *,
|
||||
const char *,
|
||||
const char *,
|
||||
const char **);
|
||||
int (*literalScanners[XML_N_LITERAL_TYPES])(const ENCODING *,
|
||||
const char *,
|
||||
const char *,
|
||||
const char **);
|
||||
int (*sameName)(const ENCODING *,
|
||||
const char *, const char *);
|
||||
int (*nameMatchesAscii)(const ENCODING *,
|
||||
const char *, const char *, const char *);
|
||||
int (*nameLength)(const ENCODING *, const char *);
|
||||
const char *(*skipS)(const ENCODING *, const char *);
|
||||
int (*getAtts)(const ENCODING *enc, const char *ptr,
|
||||
int attsMax, ATTRIBUTE *atts);
|
||||
int (*charRefNumber)(const ENCODING *enc, const char *ptr);
|
||||
int (*predefinedEntityName)(const ENCODING *, const char *, const char *);
|
||||
void (*updatePosition)(const ENCODING *,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
POSITION *);
|
||||
int (*isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **badPtr);
|
||||
void (*utf8Convert)(const ENCODING *enc,
|
||||
const char **fromP,
|
||||
const char *fromLim,
|
||||
char **toP,
|
||||
const char *toLim);
|
||||
void (*utf16Convert)(const ENCODING *enc,
|
||||
const char **fromP,
|
||||
const char *fromLim,
|
||||
unsigned short **toP,
|
||||
const unsigned short *toLim);
|
||||
|
||||
struct encoding {
|
||||
SCANNER scanners[XML_N_STATES];
|
||||
SCANNER literalScanners[XML_N_LITERAL_TYPES];
|
||||
int (FASTCALL *sameName)(const ENCODING *,
|
||||
const char *,
|
||||
const char *);
|
||||
int (FASTCALL *nameMatchesAscii)(const ENCODING *,
|
||||
const char *,
|
||||
const char *,
|
||||
const char *);
|
||||
int (FASTCALL *nameLength)(const ENCODING *, const char *);
|
||||
const char *(FASTCALL *skipS)(const ENCODING *, const char *);
|
||||
int (FASTCALL *getAtts)(const ENCODING *enc,
|
||||
const char *ptr,
|
||||
int attsMax,
|
||||
ATTRIBUTE *atts);
|
||||
int (FASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
|
||||
int (FASTCALL *predefinedEntityName)(const ENCODING *,
|
||||
const char *,
|
||||
const char *);
|
||||
void (FASTCALL *updatePosition)(const ENCODING *,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
POSITION *);
|
||||
int (FASTCALL *isPublicId)(const ENCODING *enc,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const char **badPtr);
|
||||
void (FASTCALL *utf8Convert)(const ENCODING *enc,
|
||||
const char **fromP,
|
||||
const char *fromLim,
|
||||
char **toP,
|
||||
const char *toLim);
|
||||
void (FASTCALL *utf16Convert)(const ENCODING *enc,
|
||||
const char **fromP,
|
||||
const char *fromLim,
|
||||
unsigned short **toP,
|
||||
const unsigned short *toLim);
|
||||
int minBytesPerChar;
|
||||
char isUtf8;
|
||||
char isUtf16;
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
/* ptr points to character following "<!-" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanComment)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ PREFIX(scanComment)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
/* ptr points to character following "<!" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
|
|||
return XML_TOK_PARTIAL;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, int *tokPtr)
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
/* ptr points to character following "<?" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
|
|||
return XML_TOK_PARTIAL;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -298,7 +298,7 @@ PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr,
|
|||
return XML_TOK_CDATA_SECT_OPEN;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -376,7 +376,7 @@ PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
/* ptr points to character following "</" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -425,7 +425,7 @@ PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
/* ptr points to character following "&#X" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -457,7 +457,7 @@ PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
/* ptr points to character following "&#" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -489,7 +489,7 @@ PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
/* ptr points to character following "&" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -519,7 +519,7 @@ PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
|
||||
/* ptr points to character following first character of attribute name */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -678,7 +678,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
|
||||
/* ptr points to character following "<" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -778,7 +778,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
return XML_TOK_PARTIAL;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -877,7 +877,7 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
|
||||
/* ptr points to character following "%" */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -906,7 +906,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
return XML_TOK_PARTIAL;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -933,7 +933,7 @@ PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
return -XML_TOK_POUND_NAME;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(scanLit)(int open, const ENCODING *enc,
|
||||
const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
|
@ -965,7 +965,7 @@ PREFIX(scanLit)(int open, const ENCODING *enc,
|
|||
return XML_TOK_PARTIAL;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -1196,7 +1196,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
return -tok;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -1254,7 +1254,7 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr,
|
|||
return XML_TOK_DATA_CHARS;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -1311,7 +1311,7 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
#ifdef XML_DTD
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
|
@ -1364,7 +1364,7 @@ PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr,
|
|||
|
||||
#endif /* XML_DTD */
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **badPtr)
|
||||
{
|
||||
|
@ -1424,7 +1424,7 @@ PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
first attsMax attributes are stored in atts.
|
||||
*/
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
|
||||
int attsMax, ATTRIBUTE *atts)
|
||||
{
|
||||
|
@ -1517,7 +1517,7 @@ PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
|
|||
/* not reached */
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr)
|
||||
{
|
||||
int result = 0;
|
||||
|
@ -1561,7 +1561,7 @@ PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr)
|
|||
return checkCharRefNumber(result);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr,
|
||||
const char *end)
|
||||
{
|
||||
|
@ -1615,7 +1615,7 @@ PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2)
|
||||
{
|
||||
for (;;) {
|
||||
|
@ -1679,7 +1679,7 @@ PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2)
|
|||
/* not reached */
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1,
|
||||
const char *end1, const char *ptr2)
|
||||
{
|
||||
|
@ -1692,7 +1692,7 @@ PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1,
|
|||
return ptr1 == end1;
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
PREFIX(nameLength)(const ENCODING *enc, const char *ptr)
|
||||
{
|
||||
const char *start = ptr;
|
||||
|
@ -1719,7 +1719,7 @@ PREFIX(nameLength)(const ENCODING *enc, const char *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
static const char * FASTCALL
|
||||
PREFIX(skipS)(const ENCODING *enc, const char *ptr)
|
||||
{
|
||||
for (;;) {
|
||||
|
@ -1735,7 +1735,7 @@ PREFIX(skipS)(const ENCODING *enc, const char *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void FASTCALL
|
||||
PREFIX(updatePosition)(const ENCODING *enc,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
|
|
|
@ -29,7 +29,7 @@ static const ENCODING *NS(encodings)[] = {
|
|||
&ns(utf8_encoding).enc /* NO_ENC */
|
||||
};
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
|
|||
XML_PROLOG_STATE, ptr, end, nextTokPtr);
|
||||
}
|
||||
|
||||
static int
|
||||
static int FASTCALL
|
||||
NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue