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

Side by Side Diff: third_party/libxml/src/xpointer.c

Issue 10383012: Merge 135174 - Fix XPointer bug. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « third_party/libxml/README.chromium ('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 /* 1 /*
2 * xpointer.c : Code to handle XML Pointer 2 * xpointer.c : Code to handle XML Pointer
3 * 3 *
4 * Base implementation was made accordingly to 4 * Base implementation was made accordingly to
5 * W3C Candidate Recommendation 7 June 2000 5 * W3C Candidate Recommendation 7 June 2000
6 * http://www.w3.org/TR/2000/CR-xptr-20000607 6 * http://www.w3.org/TR/2000/CR-xptr-20000607
7 * 7 *
8 * Added support for the element() scheme described in: 8 * Added support for the element() scheme described in:
9 * W3C Proposed Recommendation 13 November 2002 9 * W3C Proposed Recommendation 13 November 2002
10 * http://www.w3.org/TR/2002/PR-xptr-element-20021113/ 10 * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 } 1000 }
1001 1001
1002 cur = buffer; 1002 cur = buffer;
1003 while (CUR != 0) { 1003 while (CUR != 0) {
1004 if (CUR == ')') { 1004 if (CUR == ')') {
1005 level--; 1005 level--;
1006 if (level == 0) { 1006 if (level == 0) {
1007 NEXT; 1007 NEXT;
1008 break; 1008 break;
1009 } 1009 }
1010 *cur++ = CUR;
1011 } else if (CUR == '(') { 1010 } else if (CUR == '(') {
1012 level++; 1011 level++;
1013 *cur++ = CUR;
1014 } else if (CUR == '^') { 1012 } else if (CUR == '^') {
1015 » NEXT; 1013 » if ((NXT(1) == ')') || (NXT(1) == '(') || (NXT(1) == '^')) {
1016 » if ((CUR == ')') || (CUR == '(') || (CUR == '^')) { 1014 » NEXT;
1017 » » *cur++ = CUR;
1018 » } else {
1019 » » *cur++ = '^';
1020 » » *cur++ = CUR;
1021 } 1015 }
1022 } else {
1023 *cur++ = CUR;
1024 } 1016 }
1017 *cur++ = CUR;
1025 NEXT; 1018 NEXT;
1026 } 1019 }
1027 *cur = 0; 1020 *cur = 0;
1028 1021
1029 if ((level != 0) && (CUR == 0)) { 1022 if ((level != 0) && (CUR == 0)) {
1030 xmlFree(buffer); 1023 xmlFree(buffer);
1031 XP_ERROR(XPTR_SYNTAX_ERROR); 1024 XP_ERROR(XPTR_SYNTAX_ERROR);
1032 } 1025 }
1033 1026
1034 if (xmlStrEqual(name, (xmlChar *) "xpointer")) { 1027 if (xmlStrEqual(name, (xmlChar *) "xpointer")) {
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 } 2995 }
3003 2996
3004 NEXT; 2997 NEXT;
3005 SKIP_BLANKS; 2998 SKIP_BLANKS;
3006 } 2999 }
3007 3000
3008 #define bottom_xpointer 3001 #define bottom_xpointer
3009 #include "elfgcchack.h" 3002 #include "elfgcchack.h"
3010 #endif 3003 #endif
3011 3004
OLDNEW
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698