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

Side by Side Diff: third_party/libxml/pattern.c

Issue 2951008: Update libxml to 2.7.7. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 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
OLDNEW
1 /* 1 /*
2 * pattern.c: Implemetation of selectors for nodes 2 * pattern.c: Implemetation of selectors for nodes
3 * 3 *
4 * Reference: 4 * Reference:
5 * http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/ 5 * http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/
6 * to some extent 6 * to some extent
7 * http://www.w3.org/TR/1999/REC-xml-19991116 7 * http://www.w3.org/TR/1999/REC-xml-19991116
8 * 8 *
9 * See Copyright for the status of this software. 9 * See Copyright for the status of this software.
10 * 10 *
(...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 2278
2279 if (stream == NULL) 2279 if (stream == NULL)
2280 return(-1); 2280 return(-1);
2281 while (stream != NULL) { 2281 while (stream != NULL) {
2282 /* 2282 /*
2283 * Reset block-level. 2283 * Reset block-level.
2284 */ 2284 */
2285 if (stream->blockLevel == stream->level) 2285 if (stream->blockLevel == stream->level)
2286 stream->blockLevel = -1; 2286 stream->blockLevel = -1;
2287 2287
2288 » stream->level--; 2288 » /*
2289 » if (stream->level < 0) 2289 » * stream->level can be zero when XML_FINAL_IS_ANY_NODE is set
2290 » return(-1);»» 2290 » * (see the thread at
2291 » * http://mail.gnome.org/archives/xslt/2008-July/msg00027.html)
2292 » */
2293 » if (stream->level)
2294 » stream->level--;
2291 /* 2295 /*
2292 * Check evolution of existing states 2296 * Check evolution of existing states
2293 */ 2297 */
2294 for (i = stream->nbState -1; i >= 0; i--) { 2298 for (i = stream->nbState -1; i >= 0; i--) {
2295 /* discard obsoleted states */ 2299 /* discard obsoleted states */
2296 lev = stream->states[(2 * i) + 1]; 2300 lev = stream->states[(2 * i) + 1];
2297 if (lev > stream->level) 2301 if (lev > stream->level)
2298 stream->nbState--; 2302 stream->nbState--;
2299 if (lev <= stream->level) 2303 if (lev <= stream->level)
2300 break; 2304 break;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2600 return(1); 2604 return(1);
2601 comp = comp->next; 2605 comp = comp->next;
2602 } 2606 }
2603 return(0); 2607 return(0);
2604 2608
2605 } 2609 }
2606 2610
2607 #define bottom_pattern 2611 #define bottom_pattern
2608 #include "elfgcchack.h" 2612 #include "elfgcchack.h"
2609 #endif /* LIBXML_PATTERN_ENABLED */ 2613 #endif /* LIBXML_PATTERN_ENABLED */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698