Lines Matching defs:enc
154 # define MUST_CONVERT(enc, s) (! (enc)->isUtf16 || (((uintptr_t)(s)) & 1))
162 # define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
456 static enum XML_Error doProlog(XML_Parser parser, const ENCODING *enc,
464 const ENCODING *enc, const char *start,
496 static ATTRIBUTE_ID *getAttributeId(XML_Parser parser, const ENCODING *enc,
499 static enum XML_Error storeEntityValue(XML_Parser parser, const ENCODING *enc,
502 static int reportProcessingInstruction(XML_Parser parser, const ENCODING *enc,
504 static int reportComment(XML_Parser parser, const ENCODING *enc,
506 static void reportDefault(XML_Parser parser, const ENCODING *enc,
536 static XML_Char *poolAppend(STRING_POOL *pool, const ENCODING *enc,
538 static XML_Char *poolStoreString(STRING_POOL *pool, const ENCODING *enc,
550 static ELEMENT_TYPE *getElementType(XML_Parser parser, const ENCODING *enc,
2748 doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
2756 if (enc == parser->m_encoding) {
2767 int tok = XmlContentTok(enc, s, end, &next);
2791 reportDefault(parser, enc, s, end);
2832 enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
2845 reportDefault(parser, enc, s, next);
2848 name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
2849 next - enc->minBytesPerChar);
2867 reportDefault(parser, enc, s, next);
2881 reportDefault(parser, enc, s, next);
2900 reportDefault(parser, enc, s, next);
2928 tag->rawName = s + enc->minBytesPerChar;
2929 tag->rawNameLength = XmlNameLength(enc, tag->rawName);
2939 = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
2961 = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
2968 reportDefault(parser, enc, s, next);
2975 const char *rawName = s + enc->minBytesPerChar;
2980 name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
2981 rawName + XmlNameLength(enc, rawName));
2985 result = storeAtts(parser, enc, s, &name, &bindings,
3004 reportDefault(parser, enc, s, next);
3023 rawName = s + enc->minBytesPerChar * 2;
3024 len = XmlNameLength(enc, rawName);
3058 reportDefault(parser, enc, s, next);
3079 int n = XmlCharRefNumber(enc, s);
3087 reportDefault(parser, enc, s, next);
3096 reportDefault(parser, enc, s, next);
3120 reportDefault(parser, enc, s, next);
3122 = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
3136 if (MUST_CONVERT(enc, s)) {
3138 XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
3147 reportDefault(parser, enc, s, end);
3164 if (MUST_CONVERT(enc, s)) {
3168 enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
3181 reportDefault(parser, enc, s, next);
3184 if (! reportProcessingInstruction(parser, enc, s, next))
3188 if (! reportComment(parser, enc, s, next))
3200 reportDefault(parser, enc, s, next);
3250 storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr,
3283 n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
3344 XmlGetAttributes(enc, attStr, n, parser->m_atts);
3355 = getAttributeId(parser, enc, currAtt->name,
3356 currAtt->name + XmlNameLength(enc, currAtt->name));
3363 = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
3374 if (enc == parser->m_encoding)
3397 parser, enc, isCdata, parser->m_atts[i].valuePtr,
3405 appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
4023 doCdataSection(XML_Parser parser, const ENCODING *enc, const char **startPtr,
4029 if (enc == parser->m_encoding) {
4042 int tok = XmlCdataSectionTok(enc, s, end, &next);
4063 reportDefault(parser, enc, s, next);
4075 reportDefault(parser, enc, s, next);
4080 if (MUST_CONVERT(enc, s)) {
4084 enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
4097 reportDefault(parser, enc, s, next);
4165 doIgnoreSection(XML_Parser parser, const ENCODING *enc, const char **startPtr,
4172 if (enc == parser->m_encoding) {
4178 * of code cannot be executed. The only occasions on which 'enc'
4194 tok = XmlIgnoreSectionTok(enc, s, end, &next);
4206 reportDefault(parser, enc, s, next);
4380 ENCODING *enc;
4387 enc = (parser->m_ns ? XmlInitUnknownEncodingNS : XmlInitUnknownEncoding)(
4389 if (enc) {
4392 parser->m_encoding = enc;
4569 const ENCODING *enc = parser->m_encoding;
4573 tok = XmlPrologTok(enc, start, end, &next);
4594 return storeEntityValue(parser, enc, s, end, XML_ACCOUNT_DIRECT);
4613 doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
4653 if (enc == parser->m_encoding) {
4685 if (enc != parser->m_encoding
4694 if (parser->m_isParamEntity || enc != parser->m_encoding) {
4695 if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
4709 role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
4728 enc = parser->m_encoding;
4734 = poolStoreString(&parser->m_tempPool, enc, s, next);
4758 enc = parser->m_encoding;
4773 if (! XmlIsPublicId(enc, s, next, eventPP))
4775 pubId = poolStoreString(&parser->m_tempPool, enc,
4776 s + enc->minBytesPerChar,
4777 next - enc->minBytesPerChar);
4788 if (! XmlIsPublicId(enc, s, next, eventPP))
4793 = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
4794 next - enc->minBytesPerChar);
4904 parser->m_declElementType = getElementType(parser, enc, s, next);
4909 parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
4957 if (! poolAppend(&parser->m_tempPool, enc, s, next))
4997 parser, enc, parser->m_declAttributeIsCdata,
4998 s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
5033 = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
5034 next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
5060 parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
5061 s + enc->minBytesPerChar,
5062 next - enc->minBytesPerChar);
5096 = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
5097 next - enc->minBytesPerChar);
5123 = poolStoreString(&dtd->pool, enc, s, next);
5145 if (XmlPredefinedEntityName(enc, s, next)) {
5150 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
5180 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
5215 = poolStoreString(&parser->m_tempPool, enc, s, next);
5223 if (! XmlIsPublicId(enc, s, next, eventPP))
5227 XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
5228 s + enc->minBytesPerChar,
5229 next - enc->minBytesPerChar);
5240 const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
5241 s + enc->minBytesPerChar,
5242 next - enc->minBytesPerChar);
5278 reportDefault(parser, enc, s, next);
5280 result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
5376 name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
5377 next - enc->minBytesPerChar);
5469 parser->m_declElementType = getElementType(parser, enc, s, next);
5528 = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
5534 el = getElementType(parser, enc, s, nxt);
5588 if (! reportProcessingInstruction(parser, enc, s, next))
5593 if (! reportComment(parser, enc, s, next))
5627 reportDefault(parser, enc, s, next);
5637 tok = XmlPrologTok(enc, s, end, &next);
5868 storeAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
5872 = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
5883 appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
5894 int tok = XmlAttributeValueTok(enc, ptr, end, &next);
5905 if (enc == parser->m_encoding)
5909 if (enc == parser->m_encoding)
5915 int n = XmlCharRefNumber(enc, ptr);
5917 if (enc == parser->m_encoding)
5940 if (! poolAppend(pool, enc, ptr, next))
5944 next = ptr + enc->minBytesPerChar;
5958 enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
5972 name = poolStoreString(&parser->m_temp2Pool, enc,
5973 ptr + enc->minBytesPerChar,
5974 next - enc->minBytesPerChar);
6005 reportDefault(parser, enc, ptr, next);
6010 if (enc == parser->m_encoding) {
6018 * sets the local encoding ("enc") to the parser's
6033 if (enc == parser->m_encoding)
6038 if (enc == parser->m_encoding)
6072 if (enc == parser->m_encoding)
6083 storeEntityValue(XML_Parser parser, const ENCODING *enc,
6106 int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
6120 if (parser->m_isParamEntity || enc != parser->m_encoding) {
6123 name = poolStoreString(&parser->m_tempPool, enc,
6124 entityTextPtr + enc->minBytesPerChar,
6125 next - enc->minBytesPerChar);
6143 if (enc == parser->m_encoding)
6192 if (! poolAppend(pool, enc, entityTextPtr, next)) {
6198 next = entityTextPtr + enc->minBytesPerChar;
6210 int n = XmlCharRefNumber(enc, entityTextPtr);
6212 if (enc == parser->m_encoding)
6236 if (enc == parser->m_encoding)
6241 if (enc == parser->m_encoding)
6253 if (enc == parser->m_encoding)
6290 reportProcessingInstruction(XML_Parser parser, const ENCODING *enc,
6297 reportDefault(parser, enc, start, end);
6300 start += enc->minBytesPerChar * 2;
6301 tem = start + XmlNameLength(enc, start);
6302 target = poolStoreString(&parser->m_tempPool, enc, start, tem);
6306 data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
6307 end - enc->minBytesPerChar * 2);
6317 reportComment(XML_Parser parser, const ENCODING *enc, const char *start,
6322 reportDefault(parser, enc, start, end);
6325 data = poolStoreString(&parser->m_tempPool, enc,
6326 start + enc->minBytesPerChar * 4,
6327 end - enc->minBytesPerChar * 3);
6337 reportDefault(XML_Parser parser, const ENCODING *enc, const char *s,
6339 if (MUST_CONVERT(enc, s)) {
6343 if (enc == parser->m_encoding) {
6370 = XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
6473 getAttributeId(XML_Parser parser, const ENCODING *enc, const char *start,
6480 name = poolStoreString(&dtd->pool, enc, start, end);
7217 poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr,
7223 enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end);
7280 poolStoreString(STRING_POOL *pool, const ENCODING *enc, const char *ptr,
7282 if (! poolAppend(pool, enc, ptr, end))
7611 getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr,
7614 const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);