Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: third_party/expat/files/lib/xmltok_impl.c.original

Issue 68713003: Update libexpat to 2.1.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed commit message and Security Critical = no Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/expat/files/lib/xmltok_impl.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 1 /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
2 See the file COPYING for copying permission. 2 See the file COPYING for copying permission.
3 */ 3 */
4 4
5 /* This file is included! */ 5 /* This file is included! */
6 #ifdef XML_TOK_IMPL_C 6 #ifdef XML_TOK_IMPL_C
7 7
8 #ifndef IS_INVALID_CHAR 8 #ifndef IS_INVALID_CHAR
9 #define IS_INVALID_CHAR(enc, ptr, n) (0) 9 #define IS_INVALID_CHAR(enc, ptr, n) (0)
10 #endif 10 #endif
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 return XML_TOK_DATA_CHARS; 878 return XML_TOK_DATA_CHARS;
879 } 879 }
880 880
881 /* ptr points to character following "%" */ 881 /* ptr points to character following "%" */
882 882
883 static int PTRCALL 883 static int PTRCALL
884 PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, 884 PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
885 const char **nextTokPtr) 885 const char **nextTokPtr)
886 { 886 {
887 if (ptr == end) 887 if (ptr == end)
888 return -XML_TOK_PERCENT; 888 return XML_TOK_PARTIAL;
889 switch (BYTE_TYPE(enc, ptr)) { 889 switch (BYTE_TYPE(enc, ptr)) {
890 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) 890 CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
891 case BT_S: case BT_LF: case BT_CR: case BT_PERCNT: 891 case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:
892 *nextTokPtr = ptr; 892 *nextTokPtr = ptr;
893 return XML_TOK_PERCENT; 893 return XML_TOK_PERCENT;
894 default: 894 default:
895 *nextTokPtr = ptr; 895 *nextTokPtr = ptr;
896 return XML_TOK_INVALID; 896 return XML_TOK_INVALID;
897 } 897 }
898 while (ptr != end) { 898 while (ptr != end) {
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 } 1737 }
1738 } 1738 }
1739 } 1739 }
1740 1740
1741 static void PTRCALL 1741 static void PTRCALL
1742 PREFIX(updatePosition)(const ENCODING *enc, 1742 PREFIX(updatePosition)(const ENCODING *enc,
1743 const char *ptr, 1743 const char *ptr,
1744 const char *end, 1744 const char *end,
1745 POSITION *pos) 1745 POSITION *pos)
1746 { 1746 {
1747 while (ptr != end) { 1747 while (ptr < end) {
1748 switch (BYTE_TYPE(enc, ptr)) { 1748 switch (BYTE_TYPE(enc, ptr)) {
1749 #define LEAD_CASE(n) \ 1749 #define LEAD_CASE(n) \
1750 case BT_LEAD ## n: \ 1750 case BT_LEAD ## n: \
1751 ptr += n; \ 1751 ptr += n; \
1752 break; 1752 break;
1753 LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) 1753 LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)
1754 #undef LEAD_CASE 1754 #undef LEAD_CASE
1755 case BT_LF: 1755 case BT_LF:
1756 pos->columnNumber = (XML_Size)-1; 1756 pos->columnNumber = (XML_Size)-1;
1757 pos->lineNumber++; 1757 pos->lineNumber++;
(...skipping 16 matching lines...) Expand all
1774 1774
1775 #undef DO_LEAD_CASE 1775 #undef DO_LEAD_CASE
1776 #undef MULTIBYTE_CASES 1776 #undef MULTIBYTE_CASES
1777 #undef INVALID_CASES 1777 #undef INVALID_CASES
1778 #undef CHECK_NAME_CASE 1778 #undef CHECK_NAME_CASE
1779 #undef CHECK_NAME_CASES 1779 #undef CHECK_NAME_CASES
1780 #undef CHECK_NMSTRT_CASE 1780 #undef CHECK_NMSTRT_CASE
1781 #undef CHECK_NMSTRT_CASES 1781 #undef CHECK_NMSTRT_CASES
1782 1782
1783 #endif /* XML_TOK_IMPL_C */ 1783 #endif /* XML_TOK_IMPL_C */
OLDNEW
« no previous file with comments | « third_party/expat/files/lib/xmltok_impl.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698