• Home
  • Raw
  • Download

Lines Matching refs:enc

157 isNever(const ENCODING *UNUSED_P(enc), const char *UNUSED_P(p))  in isNever()  argument
163 utf8_isName2(const ENCODING *UNUSED_P(enc), const char *p) in utf8_isName2() argument
169 utf8_isName3(const ENCODING *UNUSED_P(enc), const char *p) in utf8_isName3() argument
177 utf8_isNmstrt2(const ENCODING *UNUSED_P(enc), const char *p) in utf8_isNmstrt2() argument
183 utf8_isNmstrt3(const ENCODING *UNUSED_P(enc), const char *p) in utf8_isNmstrt3() argument
191 utf8_isInvalid2(const ENCODING *UNUSED_P(enc), const char *p) in utf8_isInvalid2() argument
197 utf8_isInvalid3(const ENCODING *UNUSED_P(enc), const char *p) in utf8_isInvalid3() argument
203 utf8_isInvalid4(const ENCODING *UNUSED_P(enc), const char *p) in utf8_isInvalid4() argument
209 ENCODING enc; member
229 #define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *) (enc)) argument
279 #define MINBPC(enc) ((enc)->minBytesPerChar) argument
282 #define MINBPC(enc) 1 argument
285 #define SB_BYTE_TYPE(enc, p) \ argument
286 (((struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
290 sb_byteType(const ENCODING *enc, const char *p) in sb_byteType() argument
292 return SB_BYTE_TYPE(enc, p); in sb_byteType()
294 #define BYTE_TYPE(enc, p) \ argument
295 (AS_NORMAL_ENCODING(enc)->byteType(enc, p))
297 #define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p) argument
301 #define BYTE_TO_ASCII(enc, p) \ argument
302 (AS_NORMAL_ENCODING(enc)->byteToAscii(enc, p))
304 sb_byteToAscii(const ENCODING *enc, const char *p) in sb_byteToAscii() argument
309 #define BYTE_TO_ASCII(enc, p) (*(p)) argument
312 #define IS_NAME_CHAR(enc, p, n) \ argument
313 (AS_NORMAL_ENCODING(enc)->isName ## n(enc, p))
314 #define IS_NMSTRT_CHAR(enc, p, n) \ argument
315 (AS_NORMAL_ENCODING(enc)->isNmstrt ## n(enc, p))
316 #define IS_INVALID_CHAR(enc, p, n) \ argument
317 (AS_NORMAL_ENCODING(enc)->isInvalid ## n(enc, p))
320 #define IS_NAME_CHAR_MINBPC(enc, p) \ argument
321 (AS_NORMAL_ENCODING(enc)->isNameMin(enc, p))
322 #define IS_NMSTRT_CHAR_MINBPC(enc, p) \ argument
323 (AS_NORMAL_ENCODING(enc)->isNmstrtMin(enc, p))
325 #define IS_NAME_CHAR_MINBPC(enc, p) (0) argument
326 #define IS_NMSTRT_CHAR_MINBPC(enc, p) (0) argument
330 #define CHAR_MATCHES(enc, p, c) \ argument
331 (AS_NORMAL_ENCODING(enc)->charMatches(enc, p, c))
333 sb_charMatches(const ENCODING *enc, const char *p, int c) in sb_charMatches() argument
339 #define CHAR_MATCHES(enc, p, c) (*(p) == c) argument
400 utf8_toUtf8(const ENCODING *UNUSED_P(enc), in utf8_toUtf8() argument
440 utf8_toUtf16(const ENCODING *enc, in utf8_toUtf16() argument
448 switch (((struct normal_encoding *)enc)->type[(unsigned char)*from]) { in utf8_toUtf16()
546 latin1_toUtf8(const ENCODING *UNUSED_P(enc), in latin1_toUtf8() argument
571 latin1_toUtf16(const ENCODING *UNUSED_P(enc), in latin1_toUtf16() argument
609 ascii_toUtf8(const ENCODING *UNUSED_P(enc), in ascii_toUtf8() argument
667 E ## toUtf8(const ENCODING *UNUSED_P(enc), \
739 E ## toUtf16(const ENCODING *UNUSED_P(enc), \
783 #define LITTLE2_BYTE_TYPE(enc, p) \ in DEFINE_UTF16_TO_UTF16() argument
785 ? ((struct normal_encoding *)(enc))->type[(unsigned char)*(p)] \ in DEFINE_UTF16_TO_UTF16()
787 #define LITTLE2_BYTE_TO_ASCII(enc, p) ((p)[1] == 0 ? (p)[0] : -1) in DEFINE_UTF16_TO_UTF16() argument
788 #define LITTLE2_CHAR_MATCHES(enc, p, c) ((p)[1] == 0 && (p)[0] == c) in DEFINE_UTF16_TO_UTF16() argument
789 #define LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) \ in DEFINE_UTF16_TO_UTF16() argument
791 #define LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) \ in DEFINE_UTF16_TO_UTF16() argument
797 little2_byteType(const ENCODING *enc, const char *p) in DEFINE_UTF16_TO_UTF16()
799 return LITTLE2_BYTE_TYPE(enc, p); in DEFINE_UTF16_TO_UTF16()
803 little2_byteToAscii(const ENCODING *enc, const char *p) in little2_byteToAscii() argument
805 return LITTLE2_BYTE_TO_ASCII(enc, p); in little2_byteToAscii()
809 little2_charMatches(const ENCODING *enc, const char *p, int c) in little2_charMatches() argument
811 return LITTLE2_CHAR_MATCHES(enc, p, c); in little2_charMatches()
815 little2_isNameMin(const ENCODING *enc, const char *p) in little2_isNameMin() argument
817 return LITTLE2_IS_NAME_CHAR_MINBPC(enc, p); in little2_isNameMin()
821 little2_isNmstrtMin(const ENCODING *enc, const char *p) in little2_isNmstrtMin() argument
823 return LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p); in little2_isNmstrtMin()
833 #define MINBPC(enc) 2
835 #define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
836 #define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(enc, p)
837 #define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(enc, p, c)
838 #define IS_NAME_CHAR(enc, p, n) 0
839 #define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(enc, p)
840 #define IS_NMSTRT_CHAR(enc, p, n) (0)
841 #define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p)
924 #define BIG2_BYTE_TYPE(enc, p) \ argument
926 ? ((struct normal_encoding *)(enc))->type[(unsigned char)(p)[1]] \
928 #define BIG2_BYTE_TO_ASCII(enc, p) ((p)[0] == 0 ? (p)[1] : -1) argument
929 #define BIG2_CHAR_MATCHES(enc, p, c) ((p)[0] == 0 && (p)[1] == c) argument
930 #define BIG2_IS_NAME_CHAR_MINBPC(enc, p) \ argument
932 #define BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) \ argument
938 big2_byteType(const ENCODING *enc, const char *p) in big2_byteType() argument
940 return BIG2_BYTE_TYPE(enc, p); in big2_byteType()
944 big2_byteToAscii(const ENCODING *enc, const char *p) in big2_byteToAscii() argument
946 return BIG2_BYTE_TO_ASCII(enc, p); in big2_byteToAscii()
950 big2_charMatches(const ENCODING *enc, const char *p, int c) in big2_charMatches() argument
952 return BIG2_CHAR_MATCHES(enc, p, c); in big2_charMatches()
956 big2_isNameMin(const ENCODING *enc, const char *p) in big2_isNameMin() argument
958 return BIG2_IS_NAME_CHAR_MINBPC(enc, p); in big2_isNameMin()
962 big2_isNmstrtMin(const ENCODING *enc, const char *p) in big2_isNmstrtMin() argument
964 return BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p); in big2_isNmstrtMin()
974 #define MINBPC(enc) 2 argument
976 #define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p) argument
977 #define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(enc, p) argument
978 #define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(enc, p, c) argument
979 #define IS_NAME_CHAR(enc, p, n) 0 argument
980 #define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(enc, p) argument
981 #define IS_NMSTRT_CHAR(enc, p, n) (0) argument
982 #define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) argument
1089 initUpdatePosition(const ENCODING *UNUSED_P(enc), const char *ptr, in initUpdatePosition() argument
1092 normal_updatePosition(&utf8_encoding.enc, ptr, end, pos); in initUpdatePosition()
1096 toAscii(const ENCODING *enc, const char *ptr, const char *end) in toAscii() argument
1100 XmlUtf8Convert(enc, &ptr, end, &p, p + 1); in toAscii()
1124 parsePseudoAttribute(const ENCODING *enc, in parsePseudoAttribute() argument
1138 if (!isSpace(toAscii(enc, ptr, end))) { in parsePseudoAttribute()
1143 ptr += enc->minBytesPerChar; in parsePseudoAttribute()
1144 } while (isSpace(toAscii(enc, ptr, end))); in parsePseudoAttribute()
1151 c = toAscii(enc, ptr, end); in parsePseudoAttribute()
1163 ptr += enc->minBytesPerChar; in parsePseudoAttribute()
1164 } while (isSpace(c = toAscii(enc, ptr, end))); in parsePseudoAttribute()
1171 ptr += enc->minBytesPerChar; in parsePseudoAttribute()
1177 ptr += enc->minBytesPerChar; in parsePseudoAttribute()
1178 c = toAscii(enc, ptr, end); in parsePseudoAttribute()
1180 ptr += enc->minBytesPerChar; in parsePseudoAttribute()
1181 c = toAscii(enc, ptr, end); in parsePseudoAttribute()
1188 ptr += enc->minBytesPerChar; in parsePseudoAttribute()
1190 for (;; ptr += enc->minBytesPerChar) { in parsePseudoAttribute()
1191 c = toAscii(enc, ptr, end); in parsePseudoAttribute()
1204 *nextTokPtr = ptr + enc->minBytesPerChar; in parsePseudoAttribute()
1234 const ENCODING *enc, in doParseXmlDecl() argument
1247 ptr += 5 * enc->minBytesPerChar; in doParseXmlDecl()
1248 end -= 2 * enc->minBytesPerChar; in doParseXmlDecl()
1249 if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr) in doParseXmlDecl()
1254 if (!XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) { in doParseXmlDecl()
1265 if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) { in doParseXmlDecl()
1278 if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) { in doParseXmlDecl()
1279 int c = toAscii(enc, val, end); in doParseXmlDecl()
1287 *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar); in doParseXmlDecl()
1288 if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) { in doParseXmlDecl()
1295 if (!XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone) in doParseXmlDecl()
1300 if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) { in doParseXmlDecl()
1304 else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) { in doParseXmlDecl()
1312 while (isSpace(toAscii(enc, ptr, end))) in doParseXmlDecl()
1313 ptr += enc->minBytesPerChar; in doParseXmlDecl()
1403 #define AS_UNKNOWN_ENCODING(enc) ((const struct unknown_encoding *) (enc)) argument
1412 unknown_isName(const ENCODING *enc, const char *p) in unknown_isName() argument
1414 const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); in unknown_isName()
1422 unknown_isNmstrt(const ENCODING *enc, const char *p) in unknown_isNmstrt() argument
1424 const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); in unknown_isNmstrt()
1432 unknown_isInvalid(const ENCODING *enc, const char *p) in unknown_isInvalid() argument
1434 const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); in unknown_isInvalid()
1440 unknown_toUtf8(const ENCODING *enc, in unknown_toUtf8() argument
1444 const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); in unknown_toUtf8()
1459 *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP] in unknown_toUtf8()
1473 unknown_toUtf16(const ENCODING *enc, in unknown_toUtf16() argument
1477 const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); in unknown_toUtf16()
1483 *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP] in unknown_toUtf16()
1574 e->normal.enc.utf8Convert = unknown_toUtf8; in XmlInitUnknownEncoding()
1575 e->normal.enc.utf16Convert = unknown_toUtf16; in XmlInitUnknownEncoding()
1576 return &(e->normal.enc); in XmlInitUnknownEncoding()
1640 #define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16) argument
1641 #define SET_INIT_ENC_INDEX(enc, i) ((enc)->initEnc.isUtf16 = (char)i) argument
1653 const INIT_ENCODING *enc, in initScan() argument
1663 encPtr = enc->encPtr; in initScan()
1673 switch (INIT_ENC_INDEX(enc)) { in initScan()
1683 if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC in initScan()
1695 if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC in initScan()
1703 if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC in initScan()
1704 || INIT_ENC_INDEX(enc) == UTF_16_ENC) in initScan()
1710 if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC in initScan()
1725 int e = INIT_ENC_INDEX(enc); in initScan()
1746 if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC) in initScan()
1769 *encPtr = encodingTable[INIT_ENC_INDEX(enc)]; in initScan()
1800 ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData); in XmlInitUnknownEncodingNS() local
1801 if (enc) in XmlInitUnknownEncodingNS()
1802 ((struct normal_encoding *)enc)->type[ASCII_COLON] = BT_COLON; in XmlInitUnknownEncodingNS()
1803 return enc; in XmlInitUnknownEncodingNS()