Lines Matching refs:enc
44 # define IS_INVALID_CHAR(enc, ptr, n) (0) argument
51 if (IS_INVALID_CHAR(enc, ptr, n)) { \
68 # define CHECK_NAME_CASE(n, enc, ptr, end, nextTokPtr) \ argument
72 if (! IS_NAME_CHAR(enc, ptr, n)) { \
79 # define CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) \ argument
81 if (! IS_NAME_CHAR_MINBPC(enc, ptr)) { \
91 ptr += MINBPC(enc); \
93 CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr) \
94 CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr) \
95 CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
97 # define CHECK_NMSTRT_CASE(n, enc, ptr, end, nextTokPtr) \ argument
101 if (! IS_NMSTRT_CHAR(enc, ptr, n)) { \
108 # define CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) \ argument
110 if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { \
117 ptr += MINBPC(enc); \
119 CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr) \
120 CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr) \
121 CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
127 # define HAS_CHARS(enc, ptr, end, count) (end - ptr >= count * MINBPC(enc)) argument
129 # define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1) argument
131 # define REQUIRE_CHARS(enc, ptr, end, count) \ argument
133 if (! HAS_CHARS(enc, ptr, end, count)) { \
138 # define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1) argument
143 PREFIX(scanComment)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
145 if (HAS_CHAR(enc, ptr, end)) { in PREFIX()
146 if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) { in PREFIX()
150 ptr += MINBPC(enc); in PREFIX()
151 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
152 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
155 ptr += MINBPC(enc); in PREFIX()
156 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
157 if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) { in PREFIX()
158 ptr += MINBPC(enc); in PREFIX()
159 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
160 if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
164 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
169 ptr += MINBPC(enc); in PREFIX()
180 PREFIX(scanDecl)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
182 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
183 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
185 return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
187 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
191 ptr += MINBPC(enc); in PREFIX()
197 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
198 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
200 REQUIRE_CHARS(enc, ptr, end, 2); in PREFIX()
202 switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) { in PREFIX()
218 ptr += MINBPC(enc); in PREFIX()
229 PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
232 UNUSED_P(enc); in PREFIX()
234 if (end - ptr != MINBPC(enc) * 3) in PREFIX()
236 switch (BYTE_TO_ASCII(enc, ptr)) { in PREFIX()
245 ptr += MINBPC(enc); in PREFIX()
246 switch (BYTE_TO_ASCII(enc, ptr)) { in PREFIX()
255 ptr += MINBPC(enc); in PREFIX()
256 switch (BYTE_TO_ASCII(enc, ptr)) { in PREFIX()
274 PREFIX(scanPi)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
278 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
279 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
280 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
285 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
286 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
287 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
291 if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) { in PREFIX()
295 ptr += MINBPC(enc); in PREFIX()
296 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
297 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
300 ptr += MINBPC(enc); in PREFIX()
301 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
302 if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
303 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
308 ptr += MINBPC(enc); in PREFIX()
314 if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) { in PREFIX()
318 ptr += MINBPC(enc); in PREFIX()
319 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
320 if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
321 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
334 PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
339 UNUSED_P(enc); in PREFIX()
341 REQUIRE_CHARS(enc, ptr, end, 6); in PREFIX()
342 for (i = 0; i < 6; i++, ptr += MINBPC(enc)) { in PREFIX()
343 if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) { in PREFIX()
353 PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
357 if (MINBPC(enc) > 1) { in PREFIX()
359 if (n & (MINBPC(enc) - 1)) { in PREFIX()
360 n &= ~(MINBPC(enc) - 1); in PREFIX()
366 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
368 ptr += MINBPC(enc); in PREFIX()
369 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
370 if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB)) in PREFIX()
372 ptr += MINBPC(enc); in PREFIX()
373 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
374 if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
375 ptr -= MINBPC(enc); in PREFIX()
378 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
381 ptr += MINBPC(enc); in PREFIX()
382 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
383 if (BYTE_TYPE(enc, ptr) == BT_LF) in PREFIX()
384 ptr += MINBPC(enc); in PREFIX()
388 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
392 ptr += MINBPC(enc); in PREFIX()
395 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
396 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
399 if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ in PREFIX()
418 ptr += MINBPC(enc); in PREFIX()
429 PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
431 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
432 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
433 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
438 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
439 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
440 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
444 for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) { in PREFIX()
445 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
451 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
463 ptr += MINBPC(enc); in PREFIX()
467 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
480 PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
482 if (HAS_CHAR(enc, ptr, end)) { in PREFIX()
483 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
491 for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) { in PREFIX()
492 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
497 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
511 PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
513 if (HAS_CHAR(enc, ptr, end)) { in PREFIX()
514 if (CHAR_MATCHES(enc, ptr, ASCII_x)) in PREFIX()
515 return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
516 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
523 for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) { in PREFIX()
524 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
528 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
542 PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
544 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
545 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
546 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
548 return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
553 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
554 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
555 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
557 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
570 PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
575 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
576 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
577 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
585 ptr += MINBPC(enc); in PREFIX()
586 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
587 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
588 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
601 ptr += MINBPC(enc); in PREFIX()
602 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
603 t = BYTE_TYPE(enc, ptr); in PREFIX()
623 ptr += MINBPC(enc); in PREFIX()
624 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
625 open = BYTE_TYPE(enc, ptr); in PREFIX()
638 ptr += MINBPC(enc); in PREFIX()
642 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
643 t = BYTE_TYPE(enc, ptr); in PREFIX()
649 int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr); in PREFIX()
661 ptr += MINBPC(enc); in PREFIX()
665 ptr += MINBPC(enc); in PREFIX()
666 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
667 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
682 ptr += MINBPC(enc); in PREFIX()
683 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
684 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
685 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
692 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
696 ptr += MINBPC(enc); in PREFIX()
697 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
698 if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
702 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
723 PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
728 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
729 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
730 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
732 ptr += MINBPC(enc); in PREFIX()
733 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
734 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
736 return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
738 return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
743 return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
745 return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
754 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
755 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
756 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
764 ptr += MINBPC(enc); in PREFIX()
765 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
766 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
767 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
777 ptr += MINBPC(enc); in PREFIX()
778 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
779 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
780 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
788 ptr += MINBPC(enc); in PREFIX()
794 return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr); in PREFIX()
800 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
804 ptr += MINBPC(enc); in PREFIX()
805 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
806 if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
810 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
821 PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
825 if (MINBPC(enc) > 1) { in PREFIX()
827 if (n & (MINBPC(enc) - 1)) { in PREFIX()
828 n &= ~(MINBPC(enc) - 1); in PREFIX()
834 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
836 return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
838 return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
840 ptr += MINBPC(enc); in PREFIX()
841 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
843 if (BYTE_TYPE(enc, ptr) == BT_LF) in PREFIX()
844 ptr += MINBPC(enc); in PREFIX()
848 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
851 ptr += MINBPC(enc); in PREFIX()
852 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
854 if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB)) in PREFIX()
856 ptr += MINBPC(enc); in PREFIX()
857 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
859 if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
860 ptr -= MINBPC(enc); in PREFIX()
867 ptr += MINBPC(enc); in PREFIX()
870 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
871 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
874 if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ in PREFIX()
885 if (HAS_CHARS(enc, ptr, end, 2)) { in PREFIX()
886 if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) { in PREFIX()
887 ptr += MINBPC(enc); in PREFIX()
890 if (HAS_CHARS(enc, ptr, end, 3)) { in PREFIX()
891 if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) { in PREFIX()
892 ptr += MINBPC(enc); in PREFIX()
895 *nextTokPtr = ptr + 2 * MINBPC(enc); in PREFIX()
910 ptr += MINBPC(enc); in PREFIX()
921 PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
923 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
924 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
925 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
936 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
937 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
938 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
940 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
951 PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
953 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
954 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
955 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
960 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
961 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
962 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
981 PREFIX(scanLit)(int open, const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
983 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
984 int t = BYTE_TYPE(enc, ptr); in PREFIX()
989 ptr += MINBPC(enc); in PREFIX()
992 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
995 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1007 ptr += MINBPC(enc); in PREFIX()
1015 PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
1020 if (MINBPC(enc) > 1) { in PREFIX()
1022 if (n & (MINBPC(enc) - 1)) { in PREFIX()
1023 n &= ~(MINBPC(enc) - 1); in PREFIX()
1029 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1031 return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1033 return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1035 ptr += MINBPC(enc); in PREFIX()
1036 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
1037 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1039 return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1041 return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1048 *nextTokPtr = ptr - MINBPC(enc); in PREFIX()
1055 if (ptr + MINBPC(enc) == end) { in PREFIX()
1064 ptr += MINBPC(enc); in PREFIX()
1065 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
1067 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1073 if (ptr + MINBPC(enc) != end) in PREFIX()
1084 return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1086 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1089 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1092 ptr += MINBPC(enc); in PREFIX()
1093 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
1095 if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { in PREFIX()
1096 REQUIRE_CHARS(enc, ptr, end, 2); in PREFIX()
1097 if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) { in PREFIX()
1098 *nextTokPtr = ptr + 2 * MINBPC(enc); in PREFIX()
1105 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1108 ptr += MINBPC(enc); in PREFIX()
1109 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
1111 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1113 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1116 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1119 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1134 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1137 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1140 return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1145 if (IS_NMSTRT_CHAR(enc, ptr, n)) { \ in PREFIX()
1150 if (IS_NAME_CHAR(enc, ptr, n)) { \ in PREFIX()
1164 ptr += MINBPC(enc); in PREFIX()
1173 ptr += MINBPC(enc); in PREFIX()
1176 if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { in PREFIX()
1177 ptr += MINBPC(enc); in PREFIX()
1181 if (IS_NAME_CHAR_MINBPC(enc, ptr)) { in PREFIX()
1182 ptr += MINBPC(enc); in PREFIX()
1191 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
1192 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1193 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
1207 ptr += MINBPC(enc); in PREFIX()
1210 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
1212 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1213 CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) in PREFIX()
1230 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1237 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1244 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1255 PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
1260 else if (! HAS_CHAR(enc, ptr, end)) { in PREFIX()
1269 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
1270 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1281 return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1290 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1297 ptr += MINBPC(enc); in PREFIX()
1298 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
1300 if (BYTE_TYPE(enc, ptr) == BT_LF) in PREFIX()
1301 ptr += MINBPC(enc); in PREFIX()
1309 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1315 ptr += MINBPC(enc); in PREFIX()
1324 PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
1329 else if (! HAS_CHAR(enc, ptr, end)) { in PREFIX()
1338 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
1339 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1350 return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1355 int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); in PREFIX()
1362 *nextTokPtr = ptr + MINBPC(enc); in PREFIX()
1369 ptr += MINBPC(enc); in PREFIX()
1370 if (! HAS_CHAR(enc, ptr, end)) in PREFIX()
1372 if (BYTE_TYPE(enc, ptr) == BT_LF) in PREFIX()
1373 ptr += MINBPC(enc); in PREFIX()
1380 ptr += MINBPC(enc); in PREFIX()
1391 PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
1394 if (MINBPC(enc) > 1) { in PREFIX()
1396 if (n & (MINBPC(enc) - 1)) { in PREFIX()
1397 n &= ~(MINBPC(enc) - 1); in PREFIX()
1401 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
1402 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1405 ptr += MINBPC(enc); in PREFIX()
1406 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
1407 if (CHAR_MATCHES(enc, ptr, ASCII_EXCL)) { in PREFIX()
1408 ptr += MINBPC(enc); in PREFIX()
1409 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
1410 if (CHAR_MATCHES(enc, ptr, ASCII_LSQB)) { in PREFIX()
1412 ptr += MINBPC(enc); in PREFIX()
1417 ptr += MINBPC(enc); in PREFIX()
1418 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
1419 if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { in PREFIX()
1420 ptr += MINBPC(enc); in PREFIX()
1421 REQUIRE_CHAR(enc, ptr, end); in PREFIX()
1422 if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { in PREFIX()
1423 ptr += MINBPC(enc); in PREFIX()
1433 ptr += MINBPC(enc); in PREFIX()
1443 PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
1445 ptr += MINBPC(enc); in PREFIX()
1446 end -= MINBPC(enc); in PREFIX()
1447 for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) { in PREFIX()
1448 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1472 if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) { in PREFIX()
1479 if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f)) in PREFIX()
1483 switch (BYTE_TO_ASCII(enc, ptr)) { in PREFIX()
1503 PREFIX(getAtts)(const ENCODING *enc, const char *ptr, int attsMax, in PREFIX()
1510 for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) { in PREFIX()
1511 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1522 START_NAME ptr += (n - MINBPC(enc)); \ in PREFIX()
1537 atts[nAtts].valuePtr = ptr + MINBPC(enc); in PREFIX()
1550 atts[nAtts].valuePtr = ptr + MINBPC(enc); in PREFIX()
1569 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE in PREFIX()
1570 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE in PREFIX()
1571 || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open)) in PREFIX()
1596 PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) { in PREFIX()
1599 UNUSED_P(enc); in PREFIX()
1600 ptr += 2 * MINBPC(enc); in PREFIX()
1601 if (CHAR_MATCHES(enc, ptr, ASCII_x)) { in PREFIX()
1602 for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); in PREFIX()
1603 ptr += MINBPC(enc)) { in PREFIX()
1604 int c = BYTE_TO_ASCII(enc, ptr); in PREFIX()
1642 for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) { in PREFIX()
1643 int c = BYTE_TO_ASCII(enc, ptr); in PREFIX()
1654 PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, in PREFIX()
1656 UNUSED_P(enc); in PREFIX()
1657 switch ((end - ptr) / MINBPC(enc)) { in PREFIX()
1659 if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) { in PREFIX()
1660 switch (BYTE_TO_ASCII(enc, ptr)) { in PREFIX()
1669 if (CHAR_MATCHES(enc, ptr, ASCII_a)) { in PREFIX()
1670 ptr += MINBPC(enc); in PREFIX()
1671 if (CHAR_MATCHES(enc, ptr, ASCII_m)) { in PREFIX()
1672 ptr += MINBPC(enc); in PREFIX()
1673 if (CHAR_MATCHES(enc, ptr, ASCII_p)) in PREFIX()
1679 switch (BYTE_TO_ASCII(enc, ptr)) { in PREFIX()
1681 ptr += MINBPC(enc); in PREFIX()
1682 if (CHAR_MATCHES(enc, ptr, ASCII_u)) { in PREFIX()
1683 ptr += MINBPC(enc); in PREFIX()
1684 if (CHAR_MATCHES(enc, ptr, ASCII_o)) { in PREFIX()
1685 ptr += MINBPC(enc); in PREFIX()
1686 if (CHAR_MATCHES(enc, ptr, ASCII_t)) in PREFIX()
1692 ptr += MINBPC(enc); in PREFIX()
1693 if (CHAR_MATCHES(enc, ptr, ASCII_p)) { in PREFIX()
1694 ptr += MINBPC(enc); in PREFIX()
1695 if (CHAR_MATCHES(enc, ptr, ASCII_o)) { in PREFIX()
1696 ptr += MINBPC(enc); in PREFIX()
1697 if (CHAR_MATCHES(enc, ptr, ASCII_s)) in PREFIX()
1708 PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, in PREFIX()
1710 UNUSED_P(enc); in PREFIX()
1711 for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) { in PREFIX()
1712 if (end1 - ptr1 < MINBPC(enc)) { in PREFIX()
1720 if (! CHAR_MATCHES(enc, ptr1, *ptr2)) in PREFIX()
1727 PREFIX(nameLength)(const ENCODING *enc, const char *ptr) { in PREFIX()
1730 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1748 ptr += MINBPC(enc); in PREFIX()
1757 PREFIX(skipS)(const ENCODING *enc, const char *ptr) { in PREFIX()
1759 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1763 ptr += MINBPC(enc); in PREFIX()
1772 PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, in PREFIX()
1774 while (HAS_CHAR(enc, ptr, end)) { in PREFIX()
1775 switch (BYTE_TYPE(enc, ptr)) { in PREFIX()
1788 ptr += MINBPC(enc); in PREFIX()
1792 ptr += MINBPC(enc); in PREFIX()
1793 if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF) in PREFIX()
1794 ptr += MINBPC(enc); in PREFIX()
1798 ptr += MINBPC(enc); in PREFIX()