MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlLoadCatalogs

Function xmlLoadCatalogs

ThirdParty/libxml2/vtklibxml2/catalog.c:3171–3207  ·  view source on GitHub ↗

* xmlLoadCatalogs: * @pathss: a list of directories separated by a colon or a space. * * Load the catalogs and makes their definitions effective for the default * external entity loader. * this function is not thread safe, catalog initialization should * preferably be done once at startup */

Source from the content-addressed store, hash-verified

3169 * preferably be done once at startup
3170 */
3171void
3172xmlLoadCatalogs(const char *pathss) {
3173 const char *cur;
3174 const char *paths;
3175 xmlChar *path;
3176#ifdef _WIN32
3177 int i, iLen;
3178#endif
3179
3180 if (pathss == NULL)
3181 return;
3182
3183 cur = pathss;
3184 while (*cur != 0) {
3185 while (xmlIsBlank_ch(*cur)) cur++;
3186 if (*cur != 0) {
3187 paths = cur;
3188 while ((*cur != 0) && (*cur != PATH_SEPARATOR) && (!xmlIsBlank_ch(*cur)))
3189 cur++;
3190 path = xmlStrndup((const xmlChar *)paths, cur - paths);
3191 if (path != NULL) {
3192#ifdef _WIN32
3193 iLen = strlen((const char*)path);
3194 for(i = 0; i < iLen; i++) {
3195 if(path[i] == '\\') {
3196 path[i] = '/';
3197 }
3198 }
3199#endif
3200 xmlLoadCatalog((const char *) path);
3201 xmlFree(path);
3202 }
3203 }
3204 while (*cur == PATH_SEPARATOR)
3205 cur++;
3206 }
3207}
3208
3209/**
3210 * xmlCatalogCleanup:

Callers 1

xmllint.cFile · 0.85

Calls 2

xmlStrndupFunction · 0.85
xmlLoadCatalogFunction · 0.85

Tested by

no test coverage detected