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

Side by Side Diff: third_party/libxml/xmlstring.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 * string.c : an XML string utilities module 2 * string.c : an XML string utilities module
3 * 3 *
4 * This module provides various utility functions for manipulating 4 * This module provides various utility functions for manipulating
5 * the xmlChar* type. All functions named xmlStr* have been moved here 5 * the xmlChar* type. All functions named xmlStr* have been moved here
6 * from the parser.c file (their original home). 6 * from the parser.c file (their original home).
7 * 7 *
8 * See Copyright for the status of this software. 8 * See Copyright for the status of this software.
9 * 9 *
10 * UTF8 string routines from: 10 * UTF8 string routines from:
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 * xmlStrcasestr: 359 * xmlStrcasestr:
360 * @str: the xmlChar * array (haystack) 360 * @str: the xmlChar * array (haystack)
361 * @val: the xmlChar to search (needle) 361 * @val: the xmlChar to search (needle)
362 * 362 *
363 * a case-ignoring strstr for xmlChar's 363 * a case-ignoring strstr for xmlChar's
364 * 364 *
365 * Returns the xmlChar * for the first occurrence or NULL. 365 * Returns the xmlChar * for the first occurrence or NULL.
366 */ 366 */
367 367
368 const xmlChar * 368 const xmlChar *
369 xmlStrcasestr(const xmlChar *str, xmlChar *val) { 369 xmlStrcasestr(const xmlChar *str, const xmlChar *val) {
370 int n; 370 int n;
371 371
372 if (str == NULL) return(NULL); 372 if (str == NULL) return(NULL);
373 if (val == NULL) return(NULL); 373 if (val == NULL) return(NULL);
374 n = xmlStrlen(val); 374 n = xmlStrlen(val);
375 375
376 if (n == 0) return(str); 376 if (n == 0) return(str);
377 while (*str != 0) { /* non input consuming */ 377 while (*str != 0) { /* non input consuming */
378 if (casemap[*str] == casemap[*val]) 378 if (casemap[*str] == casemap[*val])
379 if (!xmlStrncasecmp(str, val, n)) return(str); 379 if (!xmlStrncasecmp(str, val, n)) return(str);
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 if ( (*utf++ & 0xc0) != 0x80 ) 975 if ( (*utf++ & 0xc0) != 0x80 )
976 return(NULL); 976 return(NULL);
977 } 977 }
978 } 978 }
979 979
980 return(xmlUTF8Strndup(utf, len)); 980 return(xmlUTF8Strndup(utf, len));
981 } 981 }
982 982
983 #define bottom_xmlstring 983 #define bottom_xmlstring
984 #include "elfgcchack.h" 984 #include "elfgcchack.h"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698