different types of function calls - see comments in internal.h.
Internal definitions used by Expat. This is not needed to compile
client code.
- The following definitions are made:
+ The following calling convention macros are defined for frequently
+ called functions:
- FASTCALL -- Used for most internal functions to specify that the
- fastest possible calling convention be used.
+ FASTCALL - Used for those internal functions that have a simple
+ body and a low number of arguments and local variables.
- inline -- Used for selected internal functions for which inlining
- may improve performance on some platforms.
+ PTRCALL - Used for functions called though function pointers.
+
+ PTRFASTCALL - Like PTRCALL, but for low number of arguments.
+
+ inline - Used for selected internal functions for which inlining
+ may improve performance on some platforms.
+
+ Note: Use of these macros is based on judgement, not hard rules,
+ and therefore subject to change.
*/
#if defined(__GNUC__)
-/* Last minute instability reported with egcs on a RedHat Linux 7.3
- box; argh!
+/* Instability reported with egcs on a RedHat Linux 7.3.
+ Let's comment it out:
+ #define FASTCALL __attribute__((stdcall, regparm(3)))
+ and let's try this:
*/
-/* #define FASTCALL __attribute__((stdcall, regparm(3))) */
+#define FASTCALL __attribute__((regparm(3)))
+#define PTRCALL
+#define PTRFASTCALL __attribute__((regparm(3)))
+
#elif defined(WIN32)
-/* XXX This seems to have an unexpected negative effect on Windows so
- we'll disable it for now on that platform. It may be reconsidered
- for a future release if it can be made more effective.
+/* Using __fastcall seems to have an unexpected negative effect under
+ MS VC++, especially for function pointers, so we won't use it for
+ now on that platform. It may be reconsidered for a future release
+ if it can be made more effective.
+ Likely reason: __fastcall on Windows is like stdcall, therefore
+ the compiler cannot perform stack optimizations for call clusters.
*/
-/* #define FASTCALL __fastcall */
+#define FASTCALL
+#define PTRCALL
+#define PTRFASTCALL
+
#endif
#ifndef FASTCALL
#define FASTCALL
#endif
+#ifndef PTRCALL
+#define PTRCALL
+#endif
+
+#ifndef PTRFASTCALL
+#define PTRFASTCALL
+#endif
+
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
ENTITY *entity;
} OPEN_INTERNAL_ENTITY;
-typedef enum XML_Error FASTCALL Processor(XML_Parser parser,
- const char *start,
- const char *end,
- const char **endPtr);
+typedef enum XML_Error PTRCALL Processor(XML_Parser parser,
+ const char *start,
+ const char *end,
+ const char **endPtr);
static Processor prologProcessor;
static Processor prologInitProcessor;
static Processor externalEntityInitProcessor3;
static Processor externalEntityContentProcessor;
-static enum XML_Error FASTCALL
+static enum XML_Error
handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName);
-static enum XML_Error FASTCALL
+static enum XML_Error
processXmlDecl(XML_Parser parser, int isGeneralTextEntity,
const char *, const char *);
-static enum XML_Error FASTCALL
+static enum XML_Error
initializeEncoding(XML_Parser parser);
-static enum XML_Error FASTCALL
+static enum XML_Error
doProlog(XML_Parser parser, const ENCODING *enc, const char *s,
const char *end, int tok, const char *next, const char **nextPtr);
-static enum XML_Error FASTCALL
+static enum XML_Error
processInternalParamEntity(XML_Parser parser, ENTITY *entity);
-static enum XML_Error FASTCALL
+static enum XML_Error
doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
const char *start, const char *end, const char **endPtr);
-static enum XML_Error FASTCALL
+static enum XML_Error
doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr,
const char *end, const char **nextPtr);
#ifdef XML_DTD
-static enum XML_Error FASTCALL
+static enum XML_Error
doIgnoreSection(XML_Parser parser, const ENCODING *, const char **startPtr,
const char *end, const char **nextPtr);
#endif /* XML_DTD */
-static enum XML_Error FASTCALL
+static enum XML_Error
storeAtts(XML_Parser parser, const ENCODING *,
const char *s, TAG_NAME *tagNamePtr, BINDING **bindingsPtr);
-static int FASTCALL
+static int
addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
const XML_Char *uri, BINDING **bindingsPtr);
-static int FASTCALL
+static int
defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *,
XML_Bool isCdata, XML_Bool isId, const XML_Char *dfltValue,
XML_Parser parser);
-static enum XML_Error FASTCALL
+static enum XML_Error
storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata,
const char *, const char *, STRING_POOL *);
-static enum XML_Error FASTCALL
+static enum XML_Error
appendAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata,
const char *, const char *, STRING_POOL *);
-static ATTRIBUTE_ID * FASTCALL
+static ATTRIBUTE_ID *
getAttributeId(XML_Parser parser, const ENCODING *enc, const char *start,
const char *end);
-static int FASTCALL
+static int
setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *);
-static enum XML_Error FASTCALL
+static enum XML_Error
storeEntityValue(XML_Parser parser, const ENCODING *enc, const char *start,
const char *end);
-static int FASTCALL
+static int
reportProcessingInstruction(XML_Parser parser, const ENCODING *enc,
const char *start, const char *end);
-static int FASTCALL
+static int
reportComment(XML_Parser parser, const ENCODING *enc, const char *start,
const char *end);
-static void FASTCALL
+static void
reportDefault(XML_Parser parser, const ENCODING *enc, const char *start,
const char *end);
-static const XML_Char * FASTCALL getContext(XML_Parser parser);
-static XML_Bool FASTCALL
+static const XML_Char * getContext(XML_Parser parser);
+static XML_Bool
setContext(XML_Parser parser, const XML_Char *context);
static void FASTCALL normalizePublicId(XML_Char *s);
-static void FASTCALL dtdInit(DTD *, XML_Parser parser);
+static void dtdInit(DTD *, XML_Parser parser);
/* do not call if parentParser != NULL */
-static void FASTCALL dtdReset(DTD *, XML_Parser parser);
-static void FASTCALL dtdDestroy(DTD *, XML_Parser parser);
+static void dtdReset(DTD *, XML_Parser parser);
+static void dtdDestroy(DTD *, XML_Parser parser);
-static int FASTCALL dtdCopy(DTD *newDtd, const DTD *oldDtd, XML_Parser parser);
+static int dtdCopy(DTD *newDtd, const DTD *oldDtd, XML_Parser parser);
-static int FASTCALL copyEntityTable(HASH_TABLE *, STRING_POOL *,
- const HASH_TABLE *, XML_Parser parser);
+static int copyEntityTable(HASH_TABLE *, STRING_POOL *,
+ const HASH_TABLE *, XML_Parser parser);
#ifdef XML_DTD
static void FASTCALL dtdSwap(DTD *, DTD *);
#endif /* XML_DTD */
-static NAMED * FASTCALL
+static NAMED *
lookup(HASH_TABLE *table, KEY name, size_t createSize);
static void FASTCALL
static void FASTCALL poolInit(STRING_POOL *, XML_Memory_Handling_Suite *ms);
static void FASTCALL poolClear(STRING_POOL *);
static void FASTCALL poolDestroy(STRING_POOL *);
-static XML_Char * FASTCALL
+static XML_Char *
poolAppend(STRING_POOL *pool, const ENCODING *enc,
const char *ptr, const char *end);
-static XML_Char * FASTCALL
+static XML_Char *
poolStoreString(STRING_POOL *pool, const ENCODING *enc,
const char *ptr, const char *end);
static XML_Bool FASTCALL poolGrow(STRING_POOL *pool);
static int FASTCALL nextScaffoldPart(XML_Parser parser);
-static XML_Content * FASTCALL build_model(XML_Parser parser);
+static XML_Content * build_model(XML_Parser parser);
static const XML_Char * FASTCALL
poolCopyString(STRING_POOL *pool, const XML_Char *s);
-static const XML_Char * FASTCALL
+static const XML_Char *
poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n);
static const XML_Char * FASTCALL
poolAppendString(STRING_POOL *pool, const XML_Char *s);
-static ELEMENT_TYPE * FASTCALL
+static ELEMENT_TYPE *
getElementType(XML_Parser Paraser, const ENCODING *enc,
const char *ptr, const char *end);
-static void FASTCALL
+static void
parserInit(XML_Parser parser, const XML_Char *encodingName);
#define poolStart(pool) ((pool)->start)
return parser;
}
-static void FASTCALL
+static void
parserInit(XML_Parser parser, const XML_Char *encodingName)
{
processor = prologInitProcessor;
processed, and not yet closed, we need to store tag->rawName in a more
permanent location, since the parse buffer is about to be discarded.
*/
-static XML_Bool FASTCALL
+static XML_Bool
storeRawNames(XML_Parser parser)
{
TAG *tag = tagStack;
return XML_TRUE;
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
contentProcessor(XML_Parser parser,
const char *start,
const char *end,
return result;
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
externalEntityInitProcessor(XML_Parser parser,
const char *start,
const char *end,
return externalEntityInitProcessor2(parser, start, end, endPtr);
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
externalEntityInitProcessor2(XML_Parser parser,
const char *start,
const char *end,
return externalEntityInitProcessor3(parser, start, end, endPtr);
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
externalEntityInitProcessor3(XML_Parser parser,
const char *start,
const char *end,
return externalEntityContentProcessor(parser, start, end, endPtr);
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
externalEntityContentProcessor(XML_Parser parser,
const char *start,
const char *end,
return result;
}
-static enum XML_Error FASTCALL
+static enum XML_Error
doContent(XML_Parser parser,
int startTagLevel,
const ENCODING *enc,
/* If tagNamePtr is non-null, build a real list of attributes,
otherwise just check the attributes for well-formedness.
*/
-static enum XML_Error FASTCALL
+static enum XML_Error
storeAtts(XML_Parser parser, const ENCODING *enc,
const char *attStr, TAG_NAME *tagNamePtr,
BINDING **bindingsPtr)
return XML_ERROR_NONE;
}
-static int FASTCALL
+static int
addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
const XML_Char *uri, BINDING **bindingsPtr)
{
/* The idea here is to avoid using stack for each CDATA section when
the whole file is parsed with one call.
*/
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
cdataSectionProcessor(XML_Parser parser,
const char *start,
const char *end,
/* startPtr gets set to non-null is the section is closed, and to null if
the section is not yet closed.
*/
-static enum XML_Error FASTCALL
+static enum XML_Error
doCdataSection(XML_Parser parser,
const ENCODING *enc,
const char **startPtr,
/* The idea here is to avoid using stack for each IGNORE section when
the whole file is parsed with one call.
*/
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
ignoreSectionProcessor(XML_Parser parser,
const char *start,
const char *end,
/* startPtr gets set to non-null is the section is closed, and to null
if the section is not yet closed.
*/
-static enum XML_Error FASTCALL
+static enum XML_Error
doIgnoreSection(XML_Parser parser,
const ENCODING *enc,
const char **startPtr,
#endif /* XML_DTD */
-static enum XML_Error FASTCALL
+static enum XML_Error
initializeEncoding(XML_Parser parser)
{
const char *s;
return handleUnknownEncoding(parser, protocolEncodingName);
}
-static enum XML_Error FASTCALL
+static enum XML_Error
processXmlDecl(XML_Parser parser, int isGeneralTextEntity,
const char *s, const char *next)
{
return XML_ERROR_NONE;
}
-static enum XML_Error FASTCALL
+static enum XML_Error
handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName)
{
if (unknownEncodingHandler) {
return XML_ERROR_UNKNOWN_ENCODING;
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
prologInitProcessor(XML_Parser parser,
const char *s,
const char *end,
#ifdef XML_DTD
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
externalParEntInitProcessor(XML_Parser parser,
const char *s,
const char *end,
}
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
entityValueInitProcessor(XML_Parser parser,
const char *s,
const char *end,
}
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
externalParEntProcessor(XML_Parser parser,
const char *s,
const char *end,
return doProlog(parser, encoding, s, end, tok, next, nextPtr);
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
entityValueProcessor(XML_Parser parser,
const char *s,
const char *end,
#endif /* XML_DTD */
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
prologProcessor(XML_Parser parser,
const char *s,
const char *end,
return doProlog(parser, encoding, s, end, tok, next, nextPtr);
}
-static enum XML_Error FASTCALL
+static enum XML_Error
doProlog(XML_Parser parser,
const ENCODING *enc,
const char *s,
/* not reached */
}
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
epilogProcessor(XML_Parser parser,
const char *s,
const char *end,
#ifdef XML_DTD
-static enum XML_Error FASTCALL
+static enum XML_Error
processInternalParamEntity(XML_Parser parser, ENTITY *entity)
{
const char *s, *end, *next;
#endif /* XML_DTD */
-static enum XML_Error FASTCALL
+static enum XML_Error PTRCALL
errorProcessor(XML_Parser parser,
const char *s,
const char *end,
return errorCode;
}
-static enum XML_Error FASTCALL
+static enum XML_Error
storeAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
const char *ptr, const char *end,
STRING_POOL *pool)
return XML_ERROR_NONE;
}
-static enum XML_Error FASTCALL
+static enum XML_Error
appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
const char *ptr, const char *end,
STRING_POOL *pool)
/* not reached */
}
-static enum XML_Error FASTCALL
+static enum XML_Error
storeEntityValue(XML_Parser parser,
const ENCODING *enc,
const char *entityTextPtr,
*p = XML_T('\0');
}
-static int FASTCALL
+static int
reportProcessingInstruction(XML_Parser parser, const ENCODING *enc,
const char *start, const char *end)
{
return 1;
}
-static int FASTCALL
+static int
reportComment(XML_Parser parser, const ENCODING *enc,
const char *start, const char *end)
{
return 1;
}
-static void FASTCALL
+static void
reportDefault(XML_Parser parser, const ENCODING *enc,
const char *s, const char *end)
{
}
-static int FASTCALL
+static int
defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *attId, XML_Bool isCdata,
XML_Bool isId, const XML_Char *value, XML_Parser parser)
{
return 1;
}
-static int FASTCALL
+static int
setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType)
{
const XML_Char *name;
return 1;
}
-static ATTRIBUTE_ID * FASTCALL
+static ATTRIBUTE_ID *
getAttributeId(XML_Parser parser, const ENCODING *enc,
const char *start, const char *end)
{
#define CONTEXT_SEP XML_T('\f')
-static const XML_Char * FASTCALL
+static const XML_Char *
getContext(XML_Parser parser)
{
HASH_TABLE_ITER iter;
return tempPool.start;
}
-static XML_Bool FASTCALL
+static XML_Bool
setContext(XML_Parser parser, const XML_Char *context)
{
const XML_Char *s = context;
*p = XML_T('\0');
}
-static void FASTCALL
+static void
dtdInit(DTD *p, XML_Parser parser)
{
XML_Memory_Handling_Suite *ms = &parser->m_mem;
#endif /* XML_DTD */
-static void FASTCALL
+static void
dtdReset(DTD *p, XML_Parser parser)
{
HASH_TABLE_ITER iter;
p->standalone = XML_FALSE;
}
-static void FASTCALL
+static void
dtdDestroy(DTD *p, XML_Parser parser)
{
HASH_TABLE_ITER iter;
/* Do a deep copy of the DTD. Return 0 for out of memory; non-zero otherwise.
The new DTD has already been initialized.
*/
-static int FASTCALL
+static int
dtdCopy(DTD *newDtd, const DTD *oldDtd, XML_Parser parser)
{
HASH_TABLE_ITER iter;
return 1;
} /* End dtdCopy */
-static int FASTCALL
+static int
copyEntityTable(HASH_TABLE *newTable,
STRING_POOL *newPool,
const HASH_TABLE *oldTable,
return h;
}
-static NAMED * FASTCALL
+static NAMED *
lookup(HASH_TABLE *table, KEY name, size_t createSize)
{
size_t i;
}
}
-static XML_Char * FASTCALL
+static XML_Char *
poolAppend(STRING_POOL *pool, const ENCODING *enc,
const char *ptr, const char *end)
{
return s;
}
-static const XML_Char * FASTCALL
+static const XML_Char *
poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n)
{
if (!pool->ptr && !poolGrow(pool))
return pool->start;
}
-static XML_Char * FASTCALL
+static XML_Char *
poolStoreString(STRING_POOL *pool, const ENCODING *enc,
const char *ptr, const char *end)
{
return next;
}
-static void FASTCALL
+static void
build_node(XML_Parser parser,
int src_node,
XML_Content *dest,
}
}
-static XML_Content * FASTCALL
+static XML_Content *
build_model (XML_Parser parser)
{
XML_Content *ret;
return ret;
}
-static ELEMENT_TYPE * FASTCALL
+static ELEMENT_TYPE *
getElementType(XML_Parser parser,
const ENCODING *enc,
const char *ptr,
#define setTopLevel(state) ((state)->handler = internalSubset)
#endif /* not XML_DTD */
-typedef int FASTCALL PROLOG_HANDLER(PROLOG_STATE *state,
- int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc);
+typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state,
+ int tok,
+ const char *ptr,
+ const char *end,
+ const ENCODING *enc);
static PROLOG_HANDLER
prolog0, prolog1, prolog2,
static int FASTCALL common(PROLOG_STATE *state, int tok);
-static int FASTCALL
+static int PTRCALL
prolog0(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
prolog1(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
prolog2(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
doctype0(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
doctype1(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
doctype2(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
doctype3(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
doctype4(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
doctype5(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
internalSubset(PROLOG_STATE *state,
int tok,
const char *ptr,
#ifdef XML_DTD
-static int FASTCALL
+static int PTRCALL
externalSubset0(PROLOG_STATE *state,
int tok,
const char *ptr,
return externalSubset1(state, tok, ptr, end, enc);
}
-static int FASTCALL
+static int PTRCALL
externalSubset1(PROLOG_STATE *state,
int tok,
const char *ptr,
#endif /* XML_DTD */
-static int FASTCALL
+static int PTRCALL
entity0(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity1(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity2(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity3(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity4(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity5(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity6(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity7(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity8(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity9(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
entity10(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
notation0(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
notation1(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
notation2(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
notation3(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
notation4(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist0(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist1(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist2(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist3(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist4(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist5(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist6(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist7(PROLOG_STATE *state,
int tok,
const char *ptr,
}
/* default value */
-static int FASTCALL
+static int PTRCALL
attlist8(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
attlist9(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element0(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element1(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element2(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element3(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element4(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element5(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element6(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
element7(PROLOG_STATE *state,
int tok,
const char *ptr,
#ifdef XML_DTD
-static int FASTCALL
+static int PTRCALL
condSect0(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
condSect1(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
condSect2(PROLOG_STATE *state,
int tok,
const char *ptr,
#endif /* XML_DTD */
-static int FASTCALL
+static int PTRCALL
declClose(PROLOG_STATE *state,
int tok,
const char *ptr,
return common(state, tok);
}
-static int FASTCALL
+static int PTRCALL
error(PROLOG_STATE *state,
int tok,
const char *ptr,
};
typedef struct prolog_state {
- int (FASTCALL *handler) (struct prolog_state *state,
+ int (PTRCALL *handler) (struct prolog_state *state,
int tok,
const char *ptr,
const char *end,
|| \
((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
-static int FASTCALL
+static int PTRFASTCALL
isNever(const ENCODING *enc, const char *p)
{
return 0;
}
-static int FASTCALL
+static int PTRFASTCALL
utf8_isName2(const ENCODING *enc, const char *p)
{
return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
}
-static int FASTCALL
+static int PTRFASTCALL
utf8_isName3(const ENCODING *enc, const char *p)
{
return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
#define utf8_isName4 isNever
-static int FASTCALL
+static int PTRFASTCALL
utf8_isNmstrt2(const ENCODING *enc, const char *p)
{
return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
}
-static int FASTCALL
+static int PTRFASTCALL
utf8_isNmstrt3(const ENCODING *enc, const char *p)
{
return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
#define utf8_isNmstrt4 isNever
-static int FASTCALL
+static int PTRFASTCALL
utf8_isInvalid2(const ENCODING *enc, const char *p)
{
return UTF8_INVALID2((const unsigned char *)p);
}
-static int FASTCALL
+static int PTRFASTCALL
utf8_isInvalid3(const ENCODING *enc, const char *p)
{
return UTF8_INVALID3((const unsigned char *)p);
}
-static int FASTCALL
+static int PTRFASTCALL
utf8_isInvalid4(const ENCODING *enc, const char *p)
{
return UTF8_INVALID4((const unsigned char *)p);
ENCODING enc;
unsigned char type[256];
#ifdef XML_MIN_SIZE
- 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);
+ int (PTRFASTCALL *byteType)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isNameMin)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isNmstrtMin)(const ENCODING *, const char *);
+ int (PTRFASTCALL *byteToAscii)(const ENCODING *, const char *);
+ int (PTRCALL *charMatches)(const ENCODING *, const char *, int);
#endif /* XML_MIN_SIZE */
- 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 *);
+ int (PTRFASTCALL *isName2)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isName3)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isName4)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isNmstrt2)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isNmstrt3)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isNmstrt4)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isInvalid2)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isInvalid3)(const ENCODING *, const char *);
+ int (PTRFASTCALL *isInvalid4)(const ENCODING *, const char *);
};
#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *) (enc))
(((struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
#ifdef XML_MIN_SIZE
-static int FASTCALL
+static int PTRFASTCALL
sb_byteType(const ENCODING *enc, const char *p)
{
return SB_BYTE_TYPE(enc, p);
#ifdef XML_MIN_SIZE
#define BYTE_TO_ASCII(enc, p) \
(AS_NORMAL_ENCODING(enc)->byteToAscii(enc, p))
-static int FASTCALL
+static int PTRFASTCALL
sb_byteToAscii(const ENCODING *enc, const char *p)
{
return *p;
#ifdef XML_MIN_SIZE
#define CHAR_MATCHES(enc, p, c) \
(AS_NORMAL_ENCODING(enc)->charMatches(enc, p, c))
-static int FASTCALL
+static int PTRCALL
sb_charMatches(const ENCODING *enc, const char *p, int c)
{
return *p == c;
UTF8_cval4 = 0xf0
};
-static void FASTCALL
+static void PTRCALL
utf8_toUtf8(const ENCODING *enc,
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
*toP = to;
}
-static void FASTCALL
+static void PTRCALL
utf8_toUtf16(const ENCODING *enc,
const char **fromP, const char *fromLim,
unsigned short **toP, const unsigned short *toLim)
STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_)
};
-static void FASTCALL
+static void PTRCALL
latin1_toUtf8(const ENCODING *enc,
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
}
}
-static void FASTCALL
+static void PTRCALL
latin1_toUtf16(const ENCODING *enc,
const char **fromP, const char *fromLim,
unsigned short **toP, const unsigned short *toLim)
STANDARD_VTABLE(sb_)
};
-static void FASTCALL
+static void PTRCALL
ascii_toUtf8(const ENCODING *enc,
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
STANDARD_VTABLE(sb_)
};
-static int FASTCALL
+static int PTRFASTCALL
unicode_byte_type(char hi, char lo)
{
switch ((unsigned char)hi) {
}
#define DEFINE_UTF16_TO_UTF8(E) \
-static void FASTCALL \
+static void PTRCALL \
E ## toUtf8(const ENCODING *enc, \
const char **fromP, const char *fromLim, \
char **toP, const char *toLim) \
}
#define DEFINE_UTF16_TO_UTF16(E) \
-static void FASTCALL \
+static void PTRCALL \
E ## toUtf16(const ENCODING *enc, \
const char **fromP, const char *fromLim, \
unsigned short **toP, const unsigned short *toLim) \
#ifdef XML_MIN_SIZE
-static int FASTCALL
+static int PTRFASTCALL
little2_byteType(const ENCODING *enc, const char *p)
{
return LITTLE2_BYTE_TYPE(enc, p);
}
-static int FASTCALL
+static int PTRFASTCALL
little2_byteToAscii(const ENCODING *enc, const char *p)
{
return LITTLE2_BYTE_TO_ASCII(enc, p);
}
-static int FASTCALL
+static int PTRCALL
little2_charMatches(const ENCODING *enc, const char *p, int c)
{
return LITTLE2_CHAR_MATCHES(enc, p, c);
}
-static int FASTCALL
+static int PTRFASTCALL
little2_isNameMin(const ENCODING *enc, const char *p)
{
return LITTLE2_IS_NAME_CHAR_MINBPC(enc, p);
}
-static int FASTCALL
+static int PTRFASTCALL
little2_isNmstrtMin(const ENCODING *enc, const char *p)
{
return LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p);
#ifdef XML_MIN_SIZE
-static int FASTCALL
+static int PTRFASTCALL
big2_byteType(const ENCODING *enc, const char *p)
{
return BIG2_BYTE_TYPE(enc, p);
}
-static int FASTCALL
+static int PTRFASTCALL
big2_byteToAscii(const ENCODING *enc, const char *p)
{
return BIG2_BYTE_TO_ASCII(enc, p);
}
-static int FASTCALL
+static int PTRCALL
big2_charMatches(const ENCODING *enc, const char *p, int c)
{
return BIG2_CHAR_MATCHES(enc, p, c);
}
-static int FASTCALL
+static int PTRFASTCALL
big2_isNameMin(const ENCODING *enc, const char *p)
{
return BIG2_IS_NAME_CHAR_MINBPC(enc, p);
}
-static int FASTCALL
+static int PTRFASTCALL
big2_isNmstrtMin(const ENCODING *enc, const char *p)
{
return BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p);
return 1;
}
-static void FASTCALL
+static void PTRCALL
initUpdatePosition(const ENCODING *enc, const char *ptr,
const char *end, POSITION *pos)
{
normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
}
-static int FASTCALL
+static int
toAscii(const ENCODING *enc, const char *ptr, const char *end)
{
char buf[1];
/* Return 1 if there's just optional white space or there's an S
followed by name=val.
*/
-static int FASTCALL
+static int
parsePseudoAttribute(const ENCODING *enc,
const char *ptr,
const char *end,
return result;
}
-int
+int FASTCALL
XmlUtf8Encode(int c, char *buf)
{
enum {
return 0;
}
-int
+int FASTCALL
XmlUtf16Encode(int charNum, unsigned short *buf)
{
if (charNum < 0)
return sizeof(struct unknown_encoding);
}
-static int FASTCALL
+static int PTRFASTCALL
unknown_isName(const ENCODING *enc, const char *p)
{
const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
return UCS2_GET_NAMING(namePages, c >> 8, c & 0xFF);
}
-static int FASTCALL
+static int PTRFASTCALL
unknown_isNmstrt(const ENCODING *enc, const char *p)
{
const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
return UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xFF);
}
-static int FASTCALL
+static int PTRFASTCALL
unknown_isInvalid(const ENCODING *enc, const char *p)
{
const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
return (c & ~0xFFFF) || checkCharRefNumber(c) < 0;
}
-static void FASTCALL
+static void PTRCALL
unknown_toUtf8(const ENCODING *enc,
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
}
}
-static void FASTCALL
+static void PTRCALL
unknown_toUtf16(const ENCODING *enc,
const char **fromP, const char *fromLim,
unsigned short **toP, const unsigned short *toLim)
*/
-static int FASTCALL
+static int
initScan(const ENCODING **encodingTable,
const INIT_ENCODING *enc,
int state,
struct encoding;
typedef struct encoding ENCODING;
-typedef int (FASTCALL *SCANNER)(const ENCODING *,
- const char *,
- const char *,
- const char **);
+typedef int (PTRCALL *SCANNER)(const ENCODING *,
+ const char *,
+ const char *,
+ const char **);
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,
+ int (PTRCALL *sameName)(const ENCODING *,
+ const char *,
+ const char *);
+ int (PTRCALL *nameMatchesAscii)(const ENCODING *,
+ const char *,
+ const char *,
+ const char *);
+ int (PTRFASTCALL *nameLength)(const ENCODING *, const char *);
+ const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
+ int (PTRCALL *getAtts)(const ENCODING *enc,
+ const char *ptr,
+ int attsMax,
+ ATTRIBUTE *atts);
+ int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
+ int (PTRCALL *predefinedEntityName)(const ENCODING *,
+ const char *,
+ const char *);
+ void (PTRCALL *updatePosition)(const ENCODING *,
+ const char *ptr,
+ const char *end,
+ POSITION *);
+ int (PTRCALL *isPublicId)(const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ const char **badPtr);
+ void (PTRCALL *utf8Convert)(const ENCODING *enc,
+ const char **fromP,
+ const char *fromLim,
+ char **toP,
+ const char *toLim);
+ void (PTRCALL *utf16Convert)(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);
+ unsigned short **toP,
+ const unsigned short *toLim);
int minBytesPerChar;
char isUtf8;
char isUtf16;
const ENCODING **encPtr;
} INIT_ENCODING;
-int XmlParseXmlDecl(int isGeneralTextEntity,
- const ENCODING *enc,
- const char *ptr,
- const char *end,
- const char **badPtr,
- const char **versionPtr,
- const char **versionEndPtr,
- 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 XmlUtf8Encode(int charNumber, char *buf);
-int XmlUtf16Encode(int charNumber, unsigned short *buf);
-
-int XmlSizeOfUnknownEncoding(void);
-ENCODING *
+int XmlParseXmlDecl(int isGeneralTextEntity,
+ const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ const char **badPtr,
+ const char **versionPtr,
+ const char **versionEndPtr,
+ 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);
+ENCODING *
XmlInitUnknownEncoding(void *mem,
int *table,
int (*conv)(void *userData, const char *p),
void *userData);
-int XmlParseXmlDeclNS(int isGeneralTextEntity,
- const ENCODING *enc,
- const char *ptr,
- const char *end,
- const char **badPtr,
- const char **versionPtr,
- const char **versionEndPtr,
- 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 *
+int XmlParseXmlDeclNS(int isGeneralTextEntity,
+ const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ const char **badPtr,
+ const char **versionPtr,
+ const char **versionEndPtr,
+ 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),
/* ptr points to character following "<!-" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanComment)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
/* ptr points to character following "<!" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
return XML_TOK_PARTIAL;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr,
const char *end, int *tokPtr)
{
/* ptr points to character following "<?" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
return XML_TOK_PARTIAL;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
return XML_TOK_CDATA_SECT_OPEN;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
/* ptr points to character following "</" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
/* ptr points to character following "&#X" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
/* ptr points to character following "&#" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
/* ptr points to character following "&" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
/* ptr points to character following first character of attribute name */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
/* ptr points to character following "<" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return XML_TOK_PARTIAL;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
/* ptr points to character following "%" */
-static int FASTCALL
+static int PTRCALL
PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return XML_TOK_PARTIAL;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return -XML_TOK_POUND_NAME;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(scanLit)(int open, const ENCODING *enc,
const char *ptr, const char *end,
const char **nextTokPtr)
return XML_TOK_PARTIAL;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return -tok;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
return XML_TOK_DATA_CHARS;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
#ifdef XML_DTD
-static int FASTCALL
+static int PTRCALL
PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
#endif /* XML_DTD */
-static int FASTCALL
+static int PTRCALL
PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
const char **badPtr)
{
first attsMax attributes are stored in atts.
*/
-static int FASTCALL
+static int PTRCALL
PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
int attsMax, ATTRIBUTE *atts)
{
/* not reached */
}
-static int FASTCALL
+static int PTRFASTCALL
PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr)
{
int result = 0;
return checkCharRefNumber(result);
}
-static int FASTCALL
+static int PTRCALL
PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr,
const char *end)
{
return 0;
}
-static int FASTCALL
+static int PTRCALL
PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2)
{
for (;;) {
/* not reached */
}
-static int FASTCALL
+static int PTRCALL
PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1,
const char *end1, const char *ptr2)
{
return ptr1 == end1;
}
-static int FASTCALL
+static int PTRFASTCALL
PREFIX(nameLength)(const ENCODING *enc, const char *ptr)
{
const char *start = ptr;
}
}
-static const char * FASTCALL
+static const char * PTRFASTCALL
PREFIX(skipS)(const ENCODING *enc, const char *ptr)
{
for (;;) {
}
}
-static void FASTCALL
+static void PTRCALL
PREFIX(updatePosition)(const ENCODING *enc,
const char *ptr,
const char *end,
#undef CHECK_NAME_CASES
#undef CHECK_NMSTRT_CASE
#undef CHECK_NMSTRT_CASES
+
&ns(utf8_encoding).enc /* NO_ENC */
};
-static int FASTCALL
+static int PTRCALL
NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
XML_PROLOG_STATE, ptr, end, nextTokPtr);
}
-static int FASTCALL
+static int PTRCALL
NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{