1
0

Updated expat

This commit is contained in:
Tiger Wang 2015-05-08 23:44:42 +01:00
parent 5a3c3447b7
commit abd5708e5c
6 changed files with 296 additions and 352 deletions

View File

@ -742,6 +742,29 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
XMLPARSEAPI(int)
XML_GetIdAttributeIndex(XML_Parser parser);
#ifdef XML_ATTR_INFO
/* Source file byte offsets for the start and end of attribute names and values.
The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
file an attribute value of "blah" will yield:
info->valueEnd - info->valueStart = 4 bytes.
*/
typedef struct {
XML_Index nameStart; /* Offset to beginning of the attribute name. */
XML_Index nameEnd; /* Offset after the attribute name's last byte. */
XML_Index valueStart; /* Offset to beginning of the attribute value. */
XML_Index valueEnd; /* Offset after the attribute value's last byte. */
} XML_AttrInfo;
/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
passed in last call to the XML_StartElementHandler that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
XML_GetSpecifiedAttributeCount(parser) / 2.
*/
XMLPARSEAPI(const XML_AttrInfo *)
XML_GetAttributeInfo(XML_Parser parser);
#endif
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
@ -883,6 +906,15 @@ XMLPARSEAPI(int)
XML_SetParamEntityParsing(XML_Parser parser,
enum XML_ParamEntityParsing parsing);
/* Sets the hash salt to use for internal hash calculations.
Helps in preventing DoS attacks based on predicting hash
function behavior. This must be called before parsing is started.
Returns 1 if successful, 0 when called after parsing has started.
*/
XMLPARSEAPI(int)
XML_SetHashSalt(XML_Parser parser,
unsigned long hash_salt);
/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
*/
@ -984,7 +1016,8 @@ enum XML_FeatureEnum {
XML_FEATURE_SIZEOF_XML_CHAR,
XML_FEATURE_SIZEOF_XML_LCHAR,
XML_FEATURE_NS,
XML_FEATURE_LARGE_SIZE
XML_FEATURE_LARGE_SIZE,
XML_FEATURE_ATTR_INFO
/* Additional features must be added to the end of this enum. */
};
@ -1004,8 +1037,8 @@ XML_GetFeatureList(void);
change to major or minor version.
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 0
#define XML_MICRO_VERSION 1
#define XML_MINOR_VERSION 1
#define XML_MICRO_VERSION 0
#ifdef __cplusplus
}

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos4__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
@ -199,10 +199,6 @@ prolog2(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
@ -224,10 +220,6 @@ doctype0(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_DOCTYPE_NONE;
@ -276,10 +268,6 @@ doctype2(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_DOCTYPE_NONE;
@ -297,10 +285,6 @@ doctype3(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_DOCTYPE_NONE;
@ -318,10 +302,6 @@ doctype4(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_DOCTYPE_NONE;
@ -342,10 +322,6 @@ doctype5(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_DOCTYPE_NONE;
@ -465,10 +441,6 @@ entity0(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -489,10 +461,6 @@ entity1(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -538,10 +506,6 @@ entity3(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -559,10 +523,6 @@ entity4(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -603,10 +563,6 @@ entity6(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -653,10 +609,6 @@ entity8(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -674,10 +626,6 @@ entity9(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -695,10 +643,6 @@ entity10(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
@ -716,10 +660,6 @@ notation0(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NOTATION_NONE;
@ -761,10 +701,6 @@ notation2(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NOTATION_NONE;
@ -782,10 +718,6 @@ notation3(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NOTATION_NONE;
@ -804,10 +736,6 @@ notation4(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NOTATION_NONE;
@ -829,10 +757,6 @@ attlist0(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -851,10 +775,6 @@ attlist1(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -917,10 +837,6 @@ attlist3(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -940,10 +856,6 @@ attlist4(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -964,10 +876,6 @@ attlist5(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -985,10 +893,6 @@ attlist6(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -1006,10 +910,6 @@ attlist7(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -1071,10 +971,6 @@ attlist9(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
@ -1092,10 +988,6 @@ element0(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ELEMENT_NONE;
@ -1184,10 +1076,6 @@ element3(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ELEMENT_NONE;
@ -1213,10 +1101,6 @@ element4(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ELEMENT_NONE;
@ -1235,10 +1119,6 @@ element5(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ELEMENT_NONE;
@ -1260,10 +1140,6 @@ element6(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ELEMENT_NONE;
@ -1294,10 +1170,6 @@ element7(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ELEMENT_NONE;
@ -1372,10 +1244,6 @@ condSect1(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
@ -1394,10 +1262,6 @@ condSect2(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
@ -1417,10 +1281,6 @@ declClose(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)ptr;
(void)end;
(void)enc;
switch (tok) {
case XML_TOK_PROLOG_S:
return state->role_none;
@ -1438,12 +1298,6 @@ error(PROLOG_STATE *state,
const char *end,
const ENCODING *enc)
{
(void)state;
(void)tok;
(void)ptr;
(void)end;
(void)enc;
return XML_ROLE_NONE;
}

View File

@ -8,7 +8,7 @@
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos4__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
@ -124,25 +124,18 @@
static int PTRFASTCALL
isNever(const ENCODING *enc, const char *p)
{
(void)enc;
(void)p;
return 0;
}
static int PTRFASTCALL
utf8_isName2(const ENCODING *enc, const char *p)
{
(void)enc;
return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
}
static int PTRFASTCALL
utf8_isName3(const ENCODING *enc, const char *p)
{
(void)enc;
return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
}
@ -151,16 +144,12 @@ utf8_isName3(const ENCODING *enc, const char *p)
static int PTRFASTCALL
utf8_isNmstrt2(const ENCODING *enc, const char *p)
{
(void)enc;
return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
}
static int PTRFASTCALL
utf8_isNmstrt3(const ENCODING *enc, const char *p)
{
(void)enc;
return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
}
@ -169,24 +158,18 @@ utf8_isNmstrt3(const ENCODING *enc, const char *p)
static int PTRFASTCALL
utf8_isInvalid2(const ENCODING *enc, const char *p)
{
(void)enc;
return UTF8_INVALID2((const unsigned char *)p);
}
static int PTRFASTCALL
utf8_isInvalid3(const ENCODING *enc, const char *p)
{
(void)enc;
return UTF8_INVALID3((const unsigned char *)p);
}
static int PTRFASTCALL
utf8_isInvalid4(const ENCODING *enc, const char *p)
{
(void)enc;
return UTF8_INVALID4((const unsigned char *)p);
}
@ -253,7 +236,7 @@ static int FASTCALL checkCharRefNumber(int);
#define MINBPC(enc) ((enc)->minBytesPerChar)
#else
/* minimum bytes per character */
#define MINBPC(enc) (((int)(enc) & 0) + 1)
#define MINBPC(enc) 1
#endif
#define SB_BYTE_TYPE(enc, p) \
@ -296,8 +279,8 @@ sb_byteToAscii(const ENCODING *enc, const char *p)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) \
(AS_NORMAL_ENCODING(enc)->isNmstrtMin(enc, p))
#else
#define IS_NAME_CHAR_MINBPC(enc, p) ((int)(enc) & 0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) ((int)(enc) & 0)
#define IS_NAME_CHAR_MINBPC(enc, p) (0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
#endif
#ifdef XML_MIN_SIZE
@ -342,9 +325,6 @@ utf8_toUtf8(const ENCODING *enc,
{
char *to;
const char *from;
(void)enc;
if (fromLim - *fromP > toLim - *toP) {
/* Avoid copying partial characters. */
for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--)
@ -450,8 +430,6 @@ latin1_toUtf8(const ENCODING *enc,
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
{
(void)enc;
for (;;) {
unsigned char c;
if (*fromP == fromLim)
@ -477,8 +455,6 @@ latin1_toUtf16(const ENCODING *enc,
const char **fromP, const char *fromLim,
unsigned short **toP, const unsigned short *toLim)
{
(void)enc;
while (*fromP != fromLim && *toP != toLim)
*(*toP)++ = (unsigned char)*(*fromP)++;
}
@ -512,8 +488,6 @@ ascii_toUtf8(const ENCODING *enc,
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
{
(void)enc;
while (*fromP != fromLim && *toP != toLim)
*(*toP)++ = *(*fromP)++;
}
@ -568,9 +542,6 @@ E ## toUtf8(const ENCODING *enc, \
char **toP, const char *toLim) \
{ \
const char *from; \
\
(void)enc; \
\
for (from = *fromP; from != fromLim; from += 2) { \
int plane; \
unsigned char lo2; \
@ -612,7 +583,7 @@ E ## toUtf8(const ENCODING *enc, \
return; \
} \
plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1; \
*(*toP)++ = (((char)((plane >> 2) & 0xff)) | UTF8_cval4); \
*(*toP)++ = ((plane >> 2) | UTF8_cval4); \
*(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80); \
from += 2; \
lo2 = GET_LO(from); \
@ -633,8 +604,6 @@ E ## toUtf16(const ENCODING *enc, \
const char **fromP, const char *fromLim, \
unsigned short **toP, const unsigned short *toLim) \
{ \
(void)enc; \
\
/* Avoid copying first half only of surrogate */ \
if (fromLim - *fromP > ((toLim - *toP) << 1) \
&& (GET_HI(fromLim - 2) & 0xF8) == 0xD8) \
@ -717,14 +686,14 @@ little2_isNmstrtMin(const ENCODING *enc, const char *p)
#undef PREFIX
#define PREFIX(ident) little2_ ## ident
#define MINBPC(enc) (((int)(enc) & 0) + 2)
#define MINBPC(enc) 2
/* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */
#define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
#define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(enc, p)
#define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(enc, p, c)
#define IS_NAME_CHAR(enc, p, n) ((int)(enc) & 0)
#define IS_NAME_CHAR(enc, p, n) 0
#define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(enc, p)
#define IS_NMSTRT_CHAR(enc, p, n) ((int)(enc) & 0)
#define IS_NMSTRT_CHAR(enc, p, n) (0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p)
#define XML_TOK_IMPL_C
@ -858,14 +827,14 @@ big2_isNmstrtMin(const ENCODING *enc, const char *p)
#undef PREFIX
#define PREFIX(ident) big2_ ## ident
#define MINBPC(enc) (((int)(enc) & 0) + 2)
#define MINBPC(enc) 2
/* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */
#define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
#define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(enc, p)
#define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(enc, p, c)
#define IS_NAME_CHAR(enc, p, n) ((int)(enc) & 0)
#define IS_NAME_CHAR(enc, p, n) 0
#define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(enc, p)
#define IS_NMSTRT_CHAR(enc, p, n) ((int)(enc) & 0)
#define IS_NMSTRT_CHAR(enc, p, n) (0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p)
#define XML_TOK_IMPL_C
@ -972,8 +941,6 @@ static void PTRCALL
initUpdatePosition(const ENCODING *enc, const char *ptr,
const char *end, POSITION *pos)
{
(void)enc;
normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
}
@ -1378,7 +1345,7 @@ unknown_toUtf16(const ENCODING *enc,
ENCODING *
XmlInitUnknownEncoding(void *mem,
int *table,
CONVERTER convert,
CONVERTER convert,
void *userData)
{
int i;
@ -1672,7 +1639,7 @@ initScan(const ENCODING * const *encodingTable,
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
int *table,
CONVERTER convert,
CONVERTER convert,
void *userData)
{
ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData);

View File

@ -6,7 +6,7 @@
#ifdef XML_TOK_IMPL_C
#ifndef IS_INVALID_CHAR
#define IS_INVALID_CHAR(enc, ptr, n) ((int)(enc) & 0)
#define IS_INVALID_CHAR(enc, ptr, n) (0)
#endif
#define INVALID_LEAD_CASE(n, ptr, nextTokPtr) \
@ -179,9 +179,6 @@ PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr,
const char *end, int *tokPtr)
{
int upper = 0;
(void)enc;
*tokPtr = XML_TOK_PI;
if (end - ptr != MINBPC(enc)*3)
return 1;
@ -291,9 +288,6 @@ PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr,
static const char CDATA_LSQB[] = { ASCII_C, ASCII_D, ASCII_A,
ASCII_T, ASCII_A, ASCII_LSQB };
int i;
(void)enc;
/* CDATA[ */
if (end - ptr < 6 * MINBPC(enc))
return XML_TOK_PARTIAL;
@ -891,7 +885,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
if (ptr == end)
return -XML_TOK_PERCENT;
return XML_TOK_PARTIAL;
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:
@ -1530,9 +1524,6 @@ static int PTRFASTCALL
PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr)
{
int result = 0;
(void)enc;
/* skip &# */
ptr += 2*MINBPC(enc);
if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
@ -1577,8 +1568,6 @@ static int PTRCALL
PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr,
const char *end)
{
(void)enc;
switch ((end - ptr)/MINBPC(enc)) {
case 2:
if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
@ -1697,8 +1686,6 @@ static int PTRCALL
PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1,
const char *end1, const char *ptr2)
{
(void)enc;
for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
if (ptr1 == end1)
return 0;
@ -1757,7 +1744,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
const char *end,
POSITION *pos)
{
while (ptr != end) {
while (ptr < end) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \
@ -1793,8 +1780,4 @@ PREFIX(updatePosition)(const ENCODING *enc,
#undef CHECK_NMSTRT_CASE
#undef CHECK_NMSTRT_CASES
#else /* XML_TOK_IMPL_C */
int xml_tok_impl_c;
#endif /* XML_TOK_IMPL_C */

View File

@ -112,8 +112,4 @@ NS(XmlParseXmlDecl)(int isGeneralTextEntity,
standalone);
}
#else /* XML_TOK_NS_C */
int xml_tok_ns_c;
#endif /* XML_TOK_NS_C */