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

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

Issue 1977213002: Roll libxml to 8effcb578e0590cc01bbcab0f9dccefc6bdbcdbd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update README.chromium. Created 4 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
OLDNEW
1 /** 1 /**
2 * catalog.c: set of generic Catalog related routines 2 * catalog.c: set of generic Catalog related routines
3 * 3 *
4 * Reference: SGML Open Technical Resolution TR9401:1997. 4 * Reference: SGML Open Technical Resolution TR9401:1997.
5 * http://www.jclark.com/sp/catalog.htm 5 * http://www.jclark.com/sp/catalog.htm
6 * 6 *
7 * XML Catalogs Working Draft 06 August 2001 7 * XML Catalogs Working Draft 06 August 2001
8 * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html 8 * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
9 * 9 *
10 * See Copyright for the status of this software. 10 * See Copyright for the status of this software.
(...skipping 29 matching lines...) Expand all
40 #include <libxml/xmlerror.h> 40 #include <libxml/xmlerror.h>
41 #include <libxml/threads.h> 41 #include <libxml/threads.h>
42 #include <libxml/globals.h> 42 #include <libxml/globals.h>
43 43
44 #include "buf.h" 44 #include "buf.h"
45 45
46 #define MAX_DELEGATE 50 46 #define MAX_DELEGATE 50
47 #define MAX_CATAL_DEPTH 50 47 #define MAX_CATAL_DEPTH 50
48 48
49 #ifdef _WIN32 49 #ifdef _WIN32
50 # define PATH_SEAPARATOR ';' 50 # define PATH_SEPARATOR ';'
51 #else 51 #else
52 # define PATH_SEAPARATOR ':' 52 # define PATH_SEPARATOR ':'
53 #endif 53 #endif
54 54
55 /** 55 /**
56 * TODO: 56 * TODO:
57 * 57 *
58 * macro to flag unimplemented blocks 58 * macro to flag unimplemented blocks
59 * XML_CATALOG_PREFER user env to select between system/public prefered 59 * XML_CATALOG_PREFER user env to select between system/public prefered
60 * option. C.f. Richard Tobin <richard@cogsci.ed.ac.uk> 60 * option. C.f. Richard Tobin <richard@cogsci.ed.ac.uk>
61 *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with 61 *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with
62 *> values "system" and "public". I have made the default be "system" to 62 *> values "system" and "public". I have made the default be "system" to
(...skipping 3177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3240 #endif 3240 #endif
3241 3241
3242 if (pathss == NULL) 3242 if (pathss == NULL)
3243 return; 3243 return;
3244 3244
3245 cur = pathss; 3245 cur = pathss;
3246 while (*cur != 0) { 3246 while (*cur != 0) {
3247 while (xmlIsBlank_ch(*cur)) cur++; 3247 while (xmlIsBlank_ch(*cur)) cur++;
3248 if (*cur != 0) { 3248 if (*cur != 0) {
3249 paths = cur; 3249 paths = cur;
3250 » while ((*cur != 0) && (*cur != PATH_SEAPARATOR) && (!xmlIsBlank_ch(* cur))) 3250 » while ((*cur != 0) && (*cur != PATH_SEPARATOR) && (!xmlIsBlank_ch(*c ur)))
3251 cur++; 3251 cur++;
3252 path = xmlStrndup((const xmlChar *)paths, cur - paths); 3252 path = xmlStrndup((const xmlChar *)paths, cur - paths);
3253 #ifdef _WIN32 3253 #ifdef _WIN32
3254 iLen = strlen((const char*)path); 3254 iLen = strlen((const char*)path);
3255 for(i = 0; i < iLen; i++) { 3255 for(i = 0; i < iLen; i++) {
3256 if(path[i] == '\\') { 3256 if(path[i] == '\\') {
3257 path[i] = '/'; 3257 path[i] = '/';
3258 } 3258 }
3259 } 3259 }
3260 #endif 3260 #endif
3261 if (path != NULL) { 3261 if (path != NULL) {
3262 xmlLoadCatalog((const char *) path); 3262 xmlLoadCatalog((const char *) path);
3263 xmlFree(path); 3263 xmlFree(path);
3264 } 3264 }
3265 } 3265 }
3266 » while (*cur == PATH_SEAPARATOR) 3266 » while (*cur == PATH_SEPARATOR)
3267 cur++; 3267 cur++;
3268 } 3268 }
3269 } 3269 }
3270 3270
3271 /** 3271 /**
3272 * xmlCatalogCleanup: 3272 * xmlCatalogCleanup:
3273 * 3273 *
3274 * Free up all the memory associated with catalogs 3274 * Free up all the memory associated with catalogs
3275 */ 3275 */
3276 void 3276 void
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
3816 } 3816 }
3817 3817
3818 if (xmlDefaultCatalog != NULL) 3818 if (xmlDefaultCatalog != NULL)
3819 return(xmlCatalogGetSGMLPublic(xmlDefaultCatalog->sgml, pubID)); 3819 return(xmlCatalogGetSGMLPublic(xmlDefaultCatalog->sgml, pubID));
3820 return(NULL); 3820 return(NULL);
3821 } 3821 }
3822 3822
3823 #define bottom_catalog 3823 #define bottom_catalog
3824 #include "elfgcchack.h" 3824 #include "elfgcchack.h"
3825 #endif /* LIBXML_CATALOG_ENABLED */ 3825 #endif /* LIBXML_CATALOG_ENABLED */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698