* xmlACatalogRemove: * @catal: a Catalog * @value: the value to remove * * Remove an entry from the catalog * * Returns the number of entries removed if successful, -1 otherwise */
| 2959 | * Returns the number of entries removed if successful, -1 otherwise |
| 2960 | */ |
| 2961 | int |
| 2962 | xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) { |
| 2963 | int res = -1; |
| 2964 | |
| 2965 | if ((catal == NULL) || (value == NULL)) |
| 2966 | return(-1); |
| 2967 | |
| 2968 | if (catal->type == XML_XML_CATALOG_TYPE) { |
| 2969 | res = xmlDelXMLCatalog(catal->xml, value); |
| 2970 | } else { |
| 2971 | res = xmlHashRemoveEntry(catal->sgml, value, xmlFreeCatalogEntry); |
| 2972 | if (res == 0) |
| 2973 | res = 1; |
| 2974 | } |
| 2975 | return(res); |
| 2976 | } |
| 2977 | |
| 2978 | /** |
| 2979 | * xmlNewCatalog: |
no test coverage detected