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

Function xmlCreateNewCatalog

ThirdParty/libxml2/vtklibxml2/catalog.c:383–400  ·  view source on GitHub ↗

* xmlCreateNewCatalog: * @type: type of catalog * @prefer: the PUBLIC vs. SYSTEM current preference value * * create a new Catalog, this type is shared both by XML and * SGML catalogs, but the acceptable types values differs. * * Returns the xmlCatalogPtr or NULL in case of error */

Source from the content-addressed store, hash-verified

381 * Returns the xmlCatalogPtr or NULL in case of error
382 */
383static xmlCatalogPtr
384xmlCreateNewCatalog(xmlCatalogType type, xmlCatalogPrefer prefer) {
385 xmlCatalogPtr ret;
386
387 ret = (xmlCatalogPtr) xmlMalloc(sizeof(xmlCatalog));
388 if (ret == NULL) {
389 xmlCatalogErrMemory();
390 return(NULL);
391 }
392 memset(ret, 0, sizeof(xmlCatalog));
393 ret->type = type;
394 ret->catalNr = 0;
395 ret->catalMax = XML_MAX_SGML_CATA_DEPTH;
396 ret->prefer = prefer;
397 if (ret->type == XML_SGML_CATALOG_TYPE)
398 ret->sgml = xmlHashCreate(10);
399 return(ret);
400}
401
402/**
403 * xmlFreeCatalog:

Callers 5

xmlLoadSGMLSuperCatalogFunction · 0.85
xmlLoadACatalogFunction · 0.85
xmlNewCatalogFunction · 0.85
xmlInitializeCatalogFunction · 0.85
xmlCatalogAddFunction · 0.85

Calls 2

xmlCatalogErrMemoryFunction · 0.85
xmlHashCreateFunction · 0.85

Tested by

no test coverage detected