Lines Matching refs:enc
175 # define MUST_CONVERT(enc, s) (! (enc)->isUtf16 || (((uintptr_t)(s)) & 1))
183 # define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
479 static enum XML_Error doProlog(XML_Parser parser, const ENCODING *enc,
487 const ENCODING *enc, const char *start,
490 static enum XML_Error doCdataSection(XML_Parser parser, const ENCODING *enc,
495 static enum XML_Error doIgnoreSection(XML_Parser parser, const ENCODING *enc,
501 static enum XML_Error storeAtts(XML_Parser parser, const ENCODING *enc,
512 const ENCODING *enc, XML_Bool isCdata,
517 const ENCODING *enc,
521 static ATTRIBUTE_ID *getAttributeId(XML_Parser parser, const ENCODING *enc,
525 static enum XML_Error storeEntityValue(XML_Parser parser, const ENCODING *enc,
531 static int reportProcessingInstruction(XML_Parser parser, const ENCODING *enc,
533 static int reportComment(XML_Parser parser, const ENCODING *enc,
535 static void reportDefault(XML_Parser parser, const ENCODING *enc,
566 static XML_Char *poolAppend(STRING_POOL *pool, const ENCODING *enc,
568 static XML_Char *poolStoreString(STRING_POOL *pool, const ENCODING *enc,
580 static ELEMENT_TYPE *getElementType(XML_Parser parser, const ENCODING *enc,
2833 doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
2841 if (enc == parser->m_encoding) {
2852 int tok = XmlContentTok(enc, s, end, &next);
2876 reportDefault(parser, enc, s, end);
2917 enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
2930 reportDefault(parser, enc, s, next);
2933 name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
2934 next - enc->minBytesPerChar);
2952 reportDefault(parser, enc, s, next);
2966 reportDefault(parser, enc, s, next);
2985 reportDefault(parser, enc, s, next);
3013 tag->rawName = s + enc->minBytesPerChar;
3014 tag->rawNameLength = XmlNameLength(enc, tag->rawName);
3024 = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
3046 = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
3053 reportDefault(parser, enc, s, next);
3060 const char *rawName = s + enc->minBytesPerChar;
3065 name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
3066 rawName + XmlNameLength(enc, rawName));
3070 result = storeAtts(parser, enc, s, &name, &bindings,
3089 reportDefault(parser, enc, s, next);
3108 rawName = s + enc->minBytesPerChar * 2;
3109 len = XmlNameLength(enc, rawName);
3143 reportDefault(parser, enc, s, next);
3164 int n = XmlCharRefNumber(enc, s);
3172 reportDefault(parser, enc, s, next);
3181 reportDefault(parser, enc, s, next);
3205 reportDefault(parser, enc, s, next);
3207 = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
3221 if (MUST_CONVERT(enc, s)) {
3223 XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
3232 reportDefault(parser, enc, s, end);
3249 if (MUST_CONVERT(enc, s)) {
3253 enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
3266 reportDefault(parser, enc, s, next);
3269 if (! reportProcessingInstruction(parser, enc, s, next))
3273 if (! reportComment(parser, enc, s, next))
3285 reportDefault(parser, enc, s, next);
3335 storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr,
3368 n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
3429 XmlGetAttributes(enc, attStr, n, parser->m_atts);
3440 = getAttributeId(parser, enc, currAtt->name,
3441 currAtt->name + XmlNameLength(enc, currAtt->name));
3448 = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
3459 if (enc == parser->m_encoding)
3482 parser, enc, isCdata, parser->m_atts[i].valuePtr,
3490 appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
4108 doCdataSection(XML_Parser parser, const ENCODING *enc, const char **startPtr,
4114 if (enc == parser->m_encoding) {
4127 int tok = XmlCdataSectionTok(enc, s, end, &next);
4148 reportDefault(parser, enc, s, next);
4160 reportDefault(parser, enc, s, next);
4165 if (MUST_CONVERT(enc, s)) {
4169 enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
4182 reportDefault(parser, enc, s, next);
4250 doIgnoreSection(XML_Parser parser, const ENCODING *enc, const char **startPtr,
4257 if (enc == parser->m_encoding) {
4263 * of code cannot be executed. The only occasions on which 'enc'
4279 tok = XmlIgnoreSectionTok(enc, s, end, &next);
4291 reportDefault(parser, enc, s, next);
4465 ENCODING *enc;
4472 enc = (parser->m_ns ? XmlInitUnknownEncodingNS : XmlInitUnknownEncoding)(
4474 if (enc) {
4477 parser->m_encoding = enc;
4654 const ENCODING *enc = parser->m_encoding;
4658 tok = XmlPrologTok(enc, start, end, &next);
4679 return storeEntityValue(parser, enc, s, end, XML_ACCOUNT_DIRECT);
4698 doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
4738 if (enc == parser->m_encoding) {
4770 if (enc != parser->m_encoding
4779 if (parser->m_isParamEntity || enc != parser->m_encoding) {
4780 if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
4794 role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
4815 enc = parser->m_encoding;
4821 = poolStoreString(&parser->m_tempPool, enc, s, next);
4845 enc = parser->m_encoding;
4860 if (! XmlIsPublicId(enc, s, next, eventPP))
4862 pubId = poolStoreString(&parser->m_tempPool, enc,
4863 s + enc->minBytesPerChar,
4864 next - enc->minBytesPerChar);
4875 if (! XmlIsPublicId(enc, s, next, eventPP))
4880 = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
4881 next - enc->minBytesPerChar);
4991 parser->m_declElementType = getElementType(parser, enc, s, next);
4996 parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
5044 if (! poolAppend(&parser->m_tempPool, enc, s, next))
5084 parser, enc, parser->m_declAttributeIsCdata,
5085 s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
5123 = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
5124 next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
5169 parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
5170 s + enc->minBytesPerChar,
5171 next - enc->minBytesPerChar);
5205 = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
5206 next - enc->minBytesPerChar);
5242 = poolStoreString(&dtd->pool, enc, s, next);
5264 if (XmlPredefinedEntityName(enc, s, next)) {
5269 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
5299 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
5334 = poolStoreString(&parser->m_tempPool, enc, s, next);
5342 if (! XmlIsPublicId(enc, s, next, eventPP))
5346 XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
5347 s + enc->minBytesPerChar,
5348 next - enc->minBytesPerChar);
5359 const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
5360 s + enc->minBytesPerChar,
5361 next - enc->minBytesPerChar);
5397 reportDefault(parser, enc, s, next);
5399 result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
5495 name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
5496 next - enc->minBytesPerChar);
5588 parser->m_declElementType = getElementType(parser, enc, s, next);
5647 = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
5653 el = getElementType(parser, enc, s, nxt);
5707 if (! reportProcessingInstruction(parser, enc, s, next))
5712 if (! reportComment(parser, enc, s, next))
5746 reportDefault(parser, enc, s, next);
5756 tok = XmlPrologTok(enc, s, end, &next);
5982 storeAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
5986 = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
5997 appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
6008 int tok = XmlAttributeValueTok(enc, ptr, end, &next);
6019 if (enc == parser->m_encoding)
6023 if (enc == parser->m_encoding)
6029 int n = XmlCharRefNumber(enc, ptr);
6031 if (enc == parser->m_encoding)
6054 if (! poolAppend(pool, enc, ptr, next))
6058 next = ptr + enc->minBytesPerChar;
6072 enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
6086 name = poolStoreString(&parser->m_temp2Pool, enc,
6087 ptr + enc->minBytesPerChar,
6088 next - enc->minBytesPerChar);
6119 reportDefault(parser, enc, ptr, next);
6124 if (enc == parser->m_encoding) {
6132 * sets the local encoding ("enc") to the parser's
6147 if (enc == parser->m_encoding)
6152 if (enc == parser->m_encoding)
6186 if (enc == parser->m_encoding)
6198 storeEntityValue(XML_Parser parser, const ENCODING *enc,
6221 int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
6233 if (parser->m_isParamEntity || enc != parser->m_encoding) {
6236 name = poolStoreString(&parser->m_tempPool, enc,
6237 entityTextPtr + enc->minBytesPerChar,
6238 next - enc->minBytesPerChar);
6256 if (enc == parser->m_encoding)
6305 if (! poolAppend(pool, enc, entityTextPtr, next)) {
6311 next = entityTextPtr + enc->minBytesPerChar;
6323 int n = XmlCharRefNumber(enc, entityTextPtr);
6325 if (enc == parser->m_encoding)
6349 if (enc == parser->m_encoding)
6354 if (enc == parser->m_encoding)
6366 if (enc == parser->m_encoding)
6429 reportProcessingInstruction(XML_Parser parser, const ENCODING *enc,
6436 reportDefault(parser, enc, start, end);
6439 start += enc->minBytesPerChar * 2;
6440 tem = start + XmlNameLength(enc, start);
6441 target = poolStoreString(&parser->m_tempPool, enc, start, tem);
6445 data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
6446 end - enc->minBytesPerChar * 2);
6456 reportComment(XML_Parser parser, const ENCODING *enc, const char *start,
6461 reportDefault(parser, enc, start, end);
6464 data = poolStoreString(&parser->m_tempPool, enc,
6465 start + enc->minBytesPerChar * 4,
6466 end - enc->minBytesPerChar * 3);
6476 reportDefault(XML_Parser parser, const ENCODING *enc, const char *s,
6478 if (MUST_CONVERT(enc, s)) {
6482 if (enc == parser->m_encoding) {
6509 = XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
6613 getAttributeId(XML_Parser parser, const ENCODING *enc, const char *start,
6620 name = poolStoreString(&dtd->pool, enc, start, end);
7371 poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr,
7377 enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
7434 poolStoreString(STRING_POOL *pool, const ENCODING *enc, const char *ptr,
7436 if (! poolAppend(pool, enc, ptr, end))
7774 getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr,
7777 const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);