}
*eventEndPP = end;
if (characterDataHandler) {
- XML_Char c = XML_T('\n');
+ XML_Char c = 0xA;
characterDataHandler(handlerArg, &c, 1);
}
else if (defaultHandler)
return XML_ERROR_MISPLACED_XML_PI;
case XML_TOK_DATA_NEWLINE:
if (characterDataHandler) {
- XML_Char c = XML_T('\n');
+ XML_Char c = 0xA;
characterDataHandler(handlerArg, &c, 1);
}
else if (defaultHandler)
return XML_ERROR_NONE;
case XML_TOK_DATA_NEWLINE:
if (characterDataHandler) {
- XML_Char c = XML_T('\n');
+ XML_Char c = 0xA;
characterDataHandler(handlerArg, &c, 1);
}
else if (defaultHandler)
enum XML_Error result = appendAttributeValue(parser, enc, isCdata, ptr, end, pool);
if (result)
return result;
- if (!isCdata && poolLength(pool) && poolLastChar(pool) == XML_T(' '))
+ if (!isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
poolChop(pool);
if (!poolAppendChar(pool, XML_T('\0')))
return XML_ERROR_NO_MEMORY;
}
if (!isCdata
&& n == 0x20 /* space */
- && (poolLength(pool) == 0 || poolLastChar(pool) == XML_T(' ')))
+ && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
break;
n = XmlEncode(n, (ICHAR *)buf);
if (!n) {
/* fall through */
case XML_TOK_ATTRIBUTE_VALUE_S:
case XML_TOK_DATA_NEWLINE:
- if (!isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == XML_T(' ')))
+ if (!isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
break;
- if (!poolAppendChar(pool, XML_T(' ')))
+ if (!poolAppendChar(pool, 0x20))
return XML_ERROR_NO_MEMORY;
break;
case XML_TOK_ENTITY_REF:
case XML_TOK_DATA_NEWLINE:
if (pool->end == pool->ptr && !poolGrow(pool))
return XML_ERROR_NO_MEMORY;
- *(pool->ptr)++ = XML_T('\n');
+ *(pool->ptr)++ = 0xA;
break;
case XML_TOK_CHAR_REF:
{
for (;; s++) {
if (*s == XML_T('\0'))
return;
- if (*s == XML_T('\r'))
+ if (*s == 0xD)
break;
}
p = s;
do {
- if (*s == XML_T('\r')) {
- *p++ = XML_T('\n');
- if (*++s == XML_T('\n'))
+ if (*s == 0xD) {
+ *p++ = 0xA;
+ if (*++s == 0xA)
s++;
}
else
XML_Char *s;
for (s = publicId; *s; s++) {
switch (*s) {
- case XML_T(' '):
- case XML_T('\r'):
- case XML_T('\n'):
- if (p != publicId && p[-1] != XML_T(' '))
- *p++ = XML_T(' ');
+ case 0x20:
+ case 0xD:
+ case 0xA:
+ if (p != publicId && p[-1] != 0x20)
+ *p++ = 0x20;
break;
default:
*p++ = *s;
}
}
- if (p != publicId && p[-1] == XML_T(' '))
+ if (p != publicId && p[-1] == 0x20)
--p;
*p = XML_T('\0');
}