18#ifdef LIBXML_CATALOG_ENABLED
21#ifdef HAVE_SYS_TYPES_H
44#define MAX_DELEGATE 50
45#define MAX_CATAL_DEPTH 50
48# define PATH_SEPARATOR ';'
50# define PATH_SEPARATOR ':'
64 xmlGenericError(xmlGenericErrorContext, \
65 "Unimplemented block at %s:%d\n", \
68#define XML_URN_PUBID "urn:publicid:"
69#define XML_CATAL_BREAK ((xmlChar *) -1)
70#ifndef XML_XML_DEFAULT_CATALOG
71#define XML_XML_DEFAULT_CATALOG "file://" SYSCONFDIR "/xml/catalog"
73#ifndef XML_SGML_DEFAULT_CATALOG
74#define XML_SGML_DEFAULT_CATALOG "file://" SYSCONFDIR "/sgml/catalog"
77#if defined(_WIN32) && defined(_MSC_VER)
78#undef XML_XML_DEFAULT_CATALOG
80#if !defined(_WINDOWS_)
87static int xmlExpandCatalog(xmlCatalogPtr catal,
const char *
filename);
96 XML_CATA_REMOVED = -1,
99 XML_CATA_BROKEN_CATALOG,
100 XML_CATA_NEXT_CATALOG,
104 XML_CATA_REWRITE_SYSTEM,
105 XML_CATA_DELEGATE_PUBLIC,
106 XML_CATA_DELEGATE_SYSTEM,
108 XML_CATA_REWRITE_URI,
109 XML_CATA_DELEGATE_URI,
122} xmlCatalogEntryType;
124typedef struct _xmlCatalogEntry xmlCatalogEntry;
125typedef xmlCatalogEntry *xmlCatalogEntryPtr;
126struct _xmlCatalogEntry {
127 struct _xmlCatalogEntry *
next;
128 struct _xmlCatalogEntry *
parent;
129 struct _xmlCatalogEntry *children;
130 xmlCatalogEntryType
type;
134 xmlCatalogPrefer prefer;
137 struct _xmlCatalogEntry *
group;
141 XML_XML_CATALOG_TYPE = 1,
142 XML_SGML_CATALOG_TYPE
145#define XML_MAX_SGML_CATA_DEPTH 10
154 char *catalTab[XML_MAX_SGML_CATA_DEPTH];
162 xmlCatalogPrefer prefer;
163 xmlCatalogEntryPtr xml;
175static int xmlDebugCatalogs = 0;
176static xmlCatalogAllow xmlCatalogDefaultAllow = XML_CATA_ALLOW_ALL;
177static xmlCatalogPrefer xmlCatalogDefaultPrefer = XML_CATA_PREFER_PUBLIC;
188static xmlCatalogPtr xmlDefaultCatalog =
NULL;
201static int xmlCatalogInitialized = 0;
216xmlCatalogErrMemory(
const char *
extra)
221 "Memory allocation failed : %s\n",
extra);
240 (
const char *) str1, (
const char *) str2,
241 (
const char *) str3, 0, 0,
242 msg, str1, str2, str3);
265static xmlCatalogEntryPtr
268 xmlCatalogEntryPtr
group) {
269 xmlCatalogEntryPtr
ret;
272 ret = (xmlCatalogEntryPtr)
xmlMalloc(
sizeof(xmlCatalogEntry));
274 xmlCatalogErrMemory(
"allocating catalog entry");
281 if (
type == XML_CATA_PUBLIC ||
type == XML_CATA_DELEGATE_PUBLIC) {
282 normid = xmlCatalogNormalizePublic(
name);
284 name = (*normid != 0 ? normid :
NULL);
302 ret->prefer = prefer;
310xmlFreeCatalogEntryList(xmlCatalogEntryPtr
ret);
320 xmlCatalogEntryPtr
ret = (xmlCatalogEntryPtr) payload;
327 if (
ret->dealloc == 1)
330 if (xmlDebugCatalogs) {
333 "Free catalog entry %s\n",
ret->name);
336 "Free catalog entry %s\n",
ret->value);
339 "Free catalog entry\n");
358xmlFreeCatalogEntryList(xmlCatalogEntryPtr
ret) {
359 xmlCatalogEntryPtr
next;
363 xmlFreeCatalogEntry(
ret,
NULL);
376xmlFreeCatalogHashEntryList(
void *payload,
378 xmlCatalogEntryPtr catal = (xmlCatalogEntryPtr) payload;
379 xmlCatalogEntryPtr children,
next;
384 children = catal->children;
385 while (children !=
NULL) {
386 next = children->next;
387 children->dealloc = 0;
388 children->children =
NULL;
389 xmlFreeCatalogEntry(children,
NULL);
393 xmlFreeCatalogEntry(catal,
NULL);
407xmlCreateNewCatalog(xmlCatalogType
type, xmlCatalogPrefer prefer) {
412 xmlCatalogErrMemory(
"allocating catalog");
418 ret->catalMax = XML_MAX_SGML_CATA_DEPTH;
419 ret->prefer = prefer;
420 if (
ret->type == XML_SGML_CATALOG_TYPE)
432xmlFreeCatalog(xmlCatalogPtr catal) {
435 if (catal->xml !=
NULL)
436 xmlFreeCatalogEntryList(catal->xml);
437 if (catal->sgml !=
NULL)
448#ifdef LIBXML_OUTPUT_ENABLED
457xmlCatalogDumpEntry(
void *payload,
void *
data,
459 xmlCatalogEntryPtr
entry = (xmlCatalogEntryPtr) payload;
463 switch (
entry->type) {
464 case SGML_CATA_ENTITY:
466 case SGML_CATA_PENTITY:
468 case SGML_CATA_DOCTYPE:
470 case SGML_CATA_LINKTYPE:
472 case SGML_CATA_NOTATION:
474 case SGML_CATA_PUBLIC:
476 case SGML_CATA_SYSTEM:
478 case SGML_CATA_DELEGATE:
482 case SGML_CATA_CATALOG:
484 case SGML_CATA_DOCUMENT:
486 case SGML_CATA_SGMLDECL:
491 switch (
entry->type) {
492 case SGML_CATA_ENTITY:
493 case SGML_CATA_PENTITY:
494 case SGML_CATA_DOCTYPE:
495 case SGML_CATA_LINKTYPE:
496 case SGML_CATA_NOTATION:
498 case SGML_CATA_PUBLIC:
499 case SGML_CATA_SYSTEM:
500 case SGML_CATA_SGMLDECL:
501 case SGML_CATA_DOCUMENT:
502 case SGML_CATA_CATALOG:
504 case SGML_CATA_DELEGATE:
509 switch (
entry->type) {
510 case SGML_CATA_ENTITY:
511 case SGML_CATA_PENTITY:
512 case SGML_CATA_DOCTYPE:
513 case SGML_CATA_LINKTYPE:
514 case SGML_CATA_NOTATION:
515 case SGML_CATA_PUBLIC:
516 case SGML_CATA_SYSTEM:
517 case SGML_CATA_DELEGATE:
536static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal,
xmlNodePtr catalog,
539 xmlCatalogEntryPtr
cur;
545 if (
cur->group == cgroup) {
547 case XML_CATA_REMOVED:
549 case XML_CATA_BROKEN_CATALOG:
550 case XML_CATA_CATALOG:
556 case XML_CATA_NEXT_CATALOG:
573 switch (
cur->prefer) {
574 case XML_CATA_PREFER_NONE:
576 case XML_CATA_PREFER_PUBLIC:
579 case XML_CATA_PREFER_SYSTEM:
586 case XML_CATA_PUBLIC:
592 case XML_CATA_SYSTEM:
598 case XML_CATA_REWRITE_SYSTEM:
604 case XML_CATA_DELEGATE_PUBLIC:
610 case XML_CATA_DELEGATE_SYSTEM:
622 case XML_CATA_REWRITE_URI:
628 case XML_CATA_DELEGATE_URI:
634 case SGML_CATA_SYSTEM:
635 case SGML_CATA_PUBLIC:
636 case SGML_CATA_ENTITY:
637 case SGML_CATA_PENTITY:
638 case SGML_CATA_DOCTYPE:
639 case SGML_CATA_LINKTYPE:
640 case SGML_CATA_NOTATION:
641 case SGML_CATA_DELEGATE:
643 case SGML_CATA_CATALOG:
644 case SGML_CATA_DOCUMENT:
645 case SGML_CATA_SGMLDECL:
654xmlDumpXMLCatalog(
FILE *
out, xmlCatalogEntryPtr catal) {
669 BAD_CAST "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN",
670BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
680 if (catalog ==
NULL) {
688 xmlDumpXMLCatalogNode(catal, catalog, doc,
ns,
NULL);
723xmlCatalogConvertEntry(
void *payload,
void *
data,
725 xmlCatalogEntryPtr
entry = (xmlCatalogEntryPtr) payload;
726 xmlCatalogPtr catal = (xmlCatalogPtr)
data;
728 (catal->xml ==
NULL))
730 switch (
entry->type) {
731 case SGML_CATA_ENTITY:
732 entry->type = XML_CATA_PUBLIC;
734 case SGML_CATA_PENTITY:
735 entry->type = XML_CATA_PUBLIC;
737 case SGML_CATA_DOCTYPE:
738 entry->type = XML_CATA_PUBLIC;
740 case SGML_CATA_LINKTYPE:
741 entry->type = XML_CATA_PUBLIC;
743 case SGML_CATA_NOTATION:
744 entry->type = XML_CATA_PUBLIC;
746 case SGML_CATA_PUBLIC:
747 entry->type = XML_CATA_PUBLIC;
749 case SGML_CATA_SYSTEM:
750 entry->type = XML_CATA_SYSTEM;
752 case SGML_CATA_DELEGATE:
753 entry->type = XML_CATA_DELEGATE_PUBLIC;
755 case SGML_CATA_CATALOG:
756 entry->type = XML_CATA_CATALOG;
767 entry->parent = catal->xml;
769 if (catal->xml->children ==
NULL)
770 catal->xml->children =
entry;
772 xmlCatalogEntryPtr prev;
774 prev = catal->xml->children;
775 while (prev->next !=
NULL)
790xmlConvertSGMLCatalog(xmlCatalogPtr catal) {
792 if ((catal ==
NULL) || (catal->type != XML_SGML_CATALOG_TYPE))
795 if (xmlDebugCatalogs) {
797 "Converting SGML catalog to XML\n");
799 xmlHashScan(catal->sgml, xmlCatalogConvertEntry, &catal);
819xmlCatalogUnWrapURN(
const xmlChar *urn) {
825 urn +=
sizeof(XML_URN_PUBID) - 1;
833 }
else if (*urn ==
':') {
837 }
else if (*urn ==
';') {
841 }
else if (*urn ==
'%') {
842 if ((urn[1] ==
'2') && (urn[2] ==
'B'))
844 else if ((urn[1] ==
'3') && (urn[2] ==
'A'))
846 else if ((urn[1] ==
'2') && (urn[2] ==
'F'))
848 else if ((urn[1] ==
'3') && (urn[2] ==
'B'))
850 else if ((urn[1] ==
'2') && (urn[2] ==
'7'))
852 else if ((urn[1] ==
'3') && (urn[2] ==
'F'))
854 else if ((urn[1] ==
'2') && (urn[2] ==
'3'))
856 else if ((urn[1] ==
'2') && (urn[2] ==
'5'))
885xmlParseCatalogFile(
const char *
filename) {
894#ifdef LIBXML_SAX1_ENABLED
909 if (inputStream ==
NULL) {
953xmlLoadFileContent(
const char *
filename)
994 xmlCatalogErrMemory(
"allocating catalog data");
1031xmlCatalogNormalizePublic(
const xmlChar *pubID)
1043 for (
p = pubID;*
p != 0 &&
ok;
p++) {
1046 else if (*
p == 0x20 && !white)
1057 for (
p = pubID;*
p != 0;
p++) {
1079static xmlCatalogEntryPtr
1080xmlParseXMLCatalogFile(xmlCatalogPrefer prefer,
const xmlChar *
filename);
1082xmlParseXMLCatalogNodeList(
xmlNodePtr cur, xmlCatalogPrefer prefer,
1083 xmlCatalogEntryPtr
parent, xmlCatalogEntryPtr cgroup);
1085xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal,
const xmlChar *pubID,
1088xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal,
const xmlChar *URI);
1099static xmlCatalogEntryType
1101 xmlCatalogEntryType
type = XML_CATA_NONE;
1103 type = XML_CATA_SYSTEM;
1105 type = XML_CATA_PUBLIC;
1107 type = XML_CATA_REWRITE_SYSTEM;
1109 type = XML_CATA_DELEGATE_PUBLIC;
1111 type = XML_CATA_DELEGATE_SYSTEM;
1113 type = XML_CATA_URI;
1115 type = XML_CATA_REWRITE_URI;
1117 type = XML_CATA_DELEGATE_URI;
1119 type = XML_CATA_NEXT_CATALOG;
1121 type = XML_CATA_CATALOG;
1140static xmlCatalogEntryPtr
1143 const xmlChar *uriAttrName, xmlCatalogPrefer prefer,
1144 xmlCatalogEntryPtr cgroup) {
1150 xmlCatalogEntryPtr
ret =
NULL;
1152 if (attrName !=
NULL) {
1154 if (nameValue ==
NULL) {
1156 "%s entry lacks '%s'\n",
name, attrName,
NULL);
1161 if (uriValue ==
NULL) {
1163 "%s entry lacks '%s'\n",
name, uriAttrName,
NULL);
1167 if (nameValue !=
NULL)
1169 if (uriValue !=
NULL)
1177 if (xmlDebugCatalogs > 1) {
1178 if (nameValue !=
NULL)
1180 "Found %s: '%s' '%s'\n",
name, nameValue, URL);
1183 "Found %s: '%s'\n",
name, URL);
1185 ret = xmlNewCatalogEntry(
type, nameValue, uriValue, URL, prefer, cgroup);
1188 "%s entry '%s' broken ?: %s\n",
name, uriAttrName, uriValue);
1190 if (nameValue !=
NULL)
1192 if (uriValue !=
NULL)
1213xmlParseXMLCatalogNode(
xmlNodePtr cur, xmlCatalogPrefer prefer,
1214 xmlCatalogEntryPtr
parent, xmlCatalogEntryPtr cgroup)
1223 xmlCatalogPrefer pref = XML_CATA_PREFER_NONE;
1228 prefer = XML_CATA_PREFER_SYSTEM;
1230 prefer = XML_CATA_PREFER_PUBLIC;
1233 "Invalid value for prefer: '%s'\n",
1241 entry = xmlNewCatalogEntry(XML_CATA_GROUP, prop,
base,
NULL, pref, cgroup);
1244 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_PUBLIC,
1247 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_SYSTEM,
1250 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_REWRITE_SYSTEM,
1252 BAD_CAST "rewritePrefix", prefer, cgroup);
1254 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_DELEGATE_PUBLIC,
1256 BAD_CAST "catalog", prefer, cgroup);
1258 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_DELEGATE_SYSTEM,
1260 BAD_CAST "catalog", prefer, cgroup);
1262 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_URI,
1266 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_REWRITE_URI,
1268 BAD_CAST "rewritePrefix", prefer, cgroup);
1270 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_DELEGATE_URI,
1272 BAD_CAST "catalog", prefer, cgroup);
1274 entry = xmlParseXMLCatalogOneNode(
cur, XML_CATA_NEXT_CATALOG,
1276 BAD_CAST "catalog", prefer, cgroup);
1284 xmlCatalogEntryPtr prev;
1287 while (prev->next !=
NULL)
1292 if (
entry->type == XML_CATA_GROUP) {
1297 xmlParseXMLCatalogNodeList(
cur->children, prefer,
parent,
entry);
1316xmlParseXMLCatalogNodeList(
xmlNodePtr cur, xmlCatalogPrefer prefer,
1317 xmlCatalogEntryPtr
parent, xmlCatalogEntryPtr cgroup) {
1321 xmlParseXMLCatalogNode(
cur, prefer,
parent, cgroup);
1338static xmlCatalogEntryPtr
1339xmlParseXMLCatalogFile(xmlCatalogPrefer prefer,
const xmlChar *
filename) {
1348 doc = xmlParseCatalogFile((
const char *)
filename);
1350 if (xmlDebugCatalogs)
1352 "Failed to parse catalog %s\n",
filename);
1356 if (xmlDebugCatalogs)
1365 parent = xmlNewCatalogEntry(XML_CATA_CATALOG,
NULL,
1375 prefer = XML_CATA_PREFER_SYSTEM;
1377 prefer = XML_CATA_PREFER_PUBLIC;
1380 "Invalid value for prefer: '%s'\n",
1389 "File %s is not an XML Catalog\n",
1407xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) {
1408 xmlCatalogEntryPtr doc;
1412 if (catal->URL ==
NULL)
1419 if (catal->children !=
NULL) {
1425 if (xmlCatalogXMLFiles !=
NULL) {
1426 doc = (xmlCatalogEntryPtr)
1429 if (xmlDebugCatalogs)
1431 "Found %s in file hash\n", catal->URL);
1433 if (catal->type == XML_CATA_CATALOG)
1434 catal->children = doc->children;
1436 catal->children = doc;
1441 if (xmlDebugCatalogs)
1443 "%s not found in file hash\n", catal->URL);
1451 doc = xmlParseXMLCatalogFile(catal->prefer, catal->URL);
1453 catal->type = XML_CATA_BROKEN_CATALOG;
1458 if (catal->type == XML_CATA_CATALOG)
1459 catal->children = doc->children;
1461 catal->children = doc;
1465 if (xmlCatalogXMLFiles ==
NULL)
1467 if (xmlCatalogXMLFiles !=
NULL) {
1468 if (xmlDebugCatalogs)
1470 "%s added to file hash\n", catal->URL);
1496xmlAddXMLCatalog(xmlCatalogEntryPtr catal,
const xmlChar *
type,
1498 xmlCatalogEntryPtr
cur;
1499 xmlCatalogEntryType typ;
1502 if ((catal ==
NULL) ||
1503 ((catal->type != XML_CATA_CATALOG) &&
1504 (catal->type != XML_CATA_BROKEN_CATALOG)))
1506 if (catal->children ==
NULL) {
1507 xmlFetchXMLCatalogFile(catal);
1509 if (catal->children ==
NULL)
1512 typ = xmlGetXMLCatalogEntryType(
type);
1513 if (typ == XML_CATA_NONE) {
1514 if (xmlDebugCatalogs)
1516 "Failed to add unknown element %s to catalog\n",
type);
1520 cur = catal->children;
1526 if ((orig !=
NULL) && (
cur->type == typ) &&
1528 if (xmlDebugCatalogs)
1530 "Updating element %s to catalog\n",
type);
1544 if (xmlDebugCatalogs)
1546 "Adding element %s to catalog\n",
type);
1548 catal->children = xmlNewCatalogEntry(typ, orig,
replace,
1551 cur->next = xmlNewCatalogEntry(typ, orig,
replace,
1554 catal->type = XML_CATA_CATALOG;
1557 cur->children = catal->children;
1574xmlDelXMLCatalog(xmlCatalogEntryPtr catal,
const xmlChar *
value) {
1575 xmlCatalogEntryPtr
cur;
1578 if ((catal ==
NULL) ||
1579 ((catal->type != XML_CATA_CATALOG) &&
1580 (catal->type != XML_CATA_BROKEN_CATALOG)))
1584 if (catal->children ==
NULL) {
1585 xmlFetchXMLCatalogFile(catal);
1591 cur = catal->children;
1595 if (xmlDebugCatalogs) {
1598 "Removing element %s from catalog\n",
cur->name);
1601 "Removing element %s from catalog\n",
cur->value);
1603 cur->type = XML_CATA_REMOVED;
1625xmlCatalogXMLResolve(xmlCatalogEntryPtr catal,
const xmlChar *pubID,
1628 xmlCatalogEntryPtr
cur;
1629 int haveDelegate = 0;
1635 if (catal->depth > MAX_CATAL_DEPTH) {
1637 "Detected recursion in catalog %s\n",
1646 if (sysID !=
NULL) {
1647 xmlCatalogEntryPtr rewrite =
NULL;
1648 int lenrewrite = 0,
len;
1652 switch (
cur->type) {
1653 case XML_CATA_SYSTEM:
1655 if (xmlDebugCatalogs)
1657 "Found system match %s, using %s\n",
1663 case XML_CATA_REWRITE_SYSTEM:
1665 if ((
len > lenrewrite) &&
1671 case XML_CATA_DELEGATE_SYSTEM:
1675 case XML_CATA_NEXT_CATALOG:
1683 if (rewrite !=
NULL) {
1684 if (xmlDebugCatalogs)
1686 "Using rewriting rule %s\n", rewrite->name);
1694 const xmlChar *delegates[MAX_DELEGATE];
1703 if ((
cur->type == XML_CATA_DELEGATE_SYSTEM) &&
1705 for (
i = 0;
i < nbList;
i++)
1712 if (nbList < MAX_DELEGATE)
1713 delegates[nbList++] =
cur->URL;
1716 xmlFetchXMLCatalogFile(
cur);
1719 if (xmlDebugCatalogs)
1721 "Trying system delegate %s\n",
cur->URL);
1722 ret = xmlCatalogListXMLResolve(
1736 return(XML_CATAL_BREAK);
1742 if (pubID !=
NULL) {
1746 switch (
cur->type) {
1747 case XML_CATA_PUBLIC:
1749 if (xmlDebugCatalogs)
1751 "Found public match %s\n",
cur->name);
1756 case XML_CATA_DELEGATE_PUBLIC:
1758 (
cur->prefer == XML_CATA_PREFER_PUBLIC))
1761 case XML_CATA_NEXT_CATALOG:
1771 const xmlChar *delegates[MAX_DELEGATE];
1780 if ((
cur->type == XML_CATA_DELEGATE_PUBLIC) &&
1781 (
cur->prefer == XML_CATA_PREFER_PUBLIC) &&
1784 for (
i = 0;
i < nbList;
i++)
1791 if (nbList < MAX_DELEGATE)
1792 delegates[nbList++] =
cur->URL;
1795 xmlFetchXMLCatalogFile(
cur);
1798 if (xmlDebugCatalogs)
1800 "Trying public delegate %s\n",
cur->URL);
1801 ret = xmlCatalogListXMLResolve(
1815 return(XML_CATAL_BREAK);
1821 if (
cur->type == XML_CATA_NEXT_CATALOG) {
1823 xmlFetchXMLCatalogFile(
cur);
1826 ret = xmlCatalogListXMLResolve(
cur->children, pubID, sysID);
1830 }
else if (catal->depth > MAX_CATAL_DEPTH) {
1858xmlCatalogXMLResolveURI(xmlCatalogEntryPtr catal,
const xmlChar *URI) {
1860 xmlCatalogEntryPtr
cur;
1861 int haveDelegate = 0;
1863 xmlCatalogEntryPtr rewrite =
NULL;
1864 int lenrewrite = 0,
len;
1872 if (catal->depth > MAX_CATAL_DEPTH) {
1874 "Detected recursion in catalog %s\n",
1885 switch (
cur->type) {
1888 if (xmlDebugCatalogs)
1890 "Found URI match %s\n",
cur->name);
1894 case XML_CATA_REWRITE_URI:
1896 if ((
len > lenrewrite) &&
1902 case XML_CATA_DELEGATE_URI:
1906 case XML_CATA_NEXT_CATALOG:
1914 if (rewrite !=
NULL) {
1915 if (xmlDebugCatalogs)
1917 "Using rewriting rule %s\n", rewrite->name);
1924 const xmlChar *delegates[MAX_DELEGATE];
1933 if (((
cur->type == XML_CATA_DELEGATE_SYSTEM) ||
1934 (
cur->type == XML_CATA_DELEGATE_URI)) &&
1936 for (
i = 0;
i < nbList;
i++)
1943 if (nbList < MAX_DELEGATE)
1944 delegates[nbList++] =
cur->URL;
1947 xmlFetchXMLCatalogFile(
cur);
1950 if (xmlDebugCatalogs)
1952 "Trying URI delegate %s\n",
cur->URL);
1953 ret = xmlCatalogListXMLResolveURI(
1954 cur->children, URI);
1964 return(XML_CATAL_BREAK);
1969 if (
cur->type == XML_CATA_NEXT_CATALOG) {
1971 xmlFetchXMLCatalogFile(
cur);
1974 ret = xmlCatalogListXMLResolveURI(
cur->children, URI);
2001xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal,
const xmlChar *pubID,
2009 if ((pubID ==
NULL) && (sysID ==
NULL))
2012 normid = xmlCatalogNormalizePublic(pubID);
2014 pubID = (*normid != 0 ? normid :
NULL);
2017 urnID = xmlCatalogUnWrapURN(pubID);
2018 if (xmlDebugCatalogs) {
2021 "Public URN ID %s expanded to NULL\n", pubID);
2024 "Public URN ID expanded to %s\n", urnID);
2026 ret = xmlCatalogListXMLResolve(catal, urnID, sysID);
2034 urnID = xmlCatalogUnWrapURN(sysID);
2035 if (xmlDebugCatalogs) {
2038 "System URN ID %s expanded to NULL\n", sysID);
2041 "System URN ID expanded to %s\n", urnID);
2044 ret = xmlCatalogListXMLResolve(catal, urnID,
NULL);
2046 ret = xmlCatalogListXMLResolve(catal, pubID,
NULL);
2048 ret = xmlCatalogListXMLResolve(catal, pubID, urnID);
2056 while (catal !=
NULL) {
2057 if (catal->type == XML_CATA_CATALOG) {
2058 if (catal->children ==
NULL) {
2059 xmlFetchXMLCatalogFile(catal);
2061 if (catal->children !=
NULL) {
2062 ret = xmlCatalogXMLResolve(catal->children, pubID, sysID);
2065 }
else if (catal->children->depth > MAX_CATAL_DEPTH) {
2071 catal = catal->
next;
2091xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal,
const xmlChar *URI) {
2101 urnID = xmlCatalogUnWrapURN(URI);
2102 if (xmlDebugCatalogs) {
2105 "URN ID %s expanded to NULL\n", URI);
2108 "URN ID expanded to %s\n", urnID);
2110 ret = xmlCatalogListXMLResolve(catal, urnID,
NULL);
2115 while (catal !=
NULL) {
2116 if (catal->type == XML_CATA_CATALOG) {
2117 if (catal->children ==
NULL) {
2118 xmlFetchXMLCatalogFile(catal);
2120 if (catal->children !=
NULL) {
2121 ret = xmlCatalogXMLResolveURI(catal->children, URI);
2126 catal = catal->next;
2140#define SKIP(x) cur += x;
2142#define SKIP_BLANKS while (IS_BLANK_CH(*cur)) NEXT;
2153xmlParseSGMLCatalogComment(
const xmlChar *
cur) {
2154 if ((
cur[0] !=
'-') || (
cur[1] !=
'-'))
2157 while ((
cur[0] != 0) && ((
cur[0] !=
'-') || ((
cur[1] !=
'-'))))
2187 }
else if (
RAW ==
'\'') {
2195 xmlCatalogErrMemory(
"allocating public ID");
2199 if ((*
cur == stop) && (stop !=
' '))
2207 xmlCatalogErrMemory(
"allocating public ID");
2260 (
c ==
'.') || (
c ==
'-') ||
2261 (
c ==
'_') || (
c ==
':'))) {
2280static xmlCatalogEntryType
2282 xmlCatalogEntryType
type = XML_CATA_NONE;
2284 type = SGML_CATA_SYSTEM;
2286 type = SGML_CATA_PUBLIC;
2288 type = SGML_CATA_DELEGATE;
2290 type = SGML_CATA_ENTITY;
2292 type = SGML_CATA_DOCTYPE;
2294 type = SGML_CATA_LINKTYPE;
2296 type = SGML_CATA_NOTATION;
2298 type = SGML_CATA_SGMLDECL;
2300 type = SGML_CATA_DOCUMENT;
2302 type = SGML_CATA_CATALOG;
2304 type = SGML_CATA_BASE;
2322xmlParseSGMLCatalog(xmlCatalogPtr catal,
const xmlChar *
value,
2323 const char *
file,
int super) {
2336 if ((
cur[0] ==
'-') && (
cur[1] ==
'-')) {
2337 cur = xmlParseSGMLCatalogComment(
cur);
2345 xmlCatalogEntryType
type = XML_CATA_NONE;
2359 type = SGML_CATA_SYSTEM;
2361 type = SGML_CATA_PUBLIC;
2363 type = SGML_CATA_DELEGATE;
2365 type = SGML_CATA_ENTITY;
2367 type = SGML_CATA_DOCTYPE;
2369 type = SGML_CATA_LINKTYPE;
2371 type = SGML_CATA_NOTATION;
2373 type = SGML_CATA_SGMLDECL;
2375 type = SGML_CATA_DOCUMENT;
2377 type = SGML_CATA_CATALOG;
2379 type = SGML_CATA_BASE;
2394 case SGML_CATA_ENTITY:
2396 type = SGML_CATA_PENTITY;
2398 case SGML_CATA_PENTITY:
2399 case SGML_CATA_DOCTYPE:
2400 case SGML_CATA_LINKTYPE:
2401 case SGML_CATA_NOTATION:
2412 cur = xmlParseSGMLCatalogPubid(
cur, &sysid);
2418 case SGML_CATA_PUBLIC:
2419 case SGML_CATA_SYSTEM:
2420 case SGML_CATA_DELEGATE:
2426 if (
type != SGML_CATA_SYSTEM) {
2429 normid = xmlCatalogNormalizePublic(
name);
2430 if (normid !=
NULL) {
2446 cur = xmlParseSGMLCatalogPubid(
cur, &sysid);
2452 case SGML_CATA_BASE:
2453 case SGML_CATA_CATALOG:
2454 case SGML_CATA_DOCUMENT:
2455 case SGML_CATA_SGMLDECL:
2456 cur = xmlParseSGMLCatalogPubid(
cur, &sysid);
2471 }
else if (
type == SGML_CATA_BASE) {
2475 }
else if ((
type == SGML_CATA_PUBLIC) ||
2476 (
type == SGML_CATA_SYSTEM)) {
2481 xmlCatalogEntryPtr
entry;
2492 }
else if (
type == SGML_CATA_CATALOG) {
2494 xmlCatalogEntryPtr
entry;
2497 XML_CATA_PREFER_NONE,
NULL);
2507 xmlExpandCatalog(catal, (
const char *)
filename);
2545 xmlCatalogEntryPtr
entry;
2551 normid = xmlCatalogNormalizePublic(pubID);
2553 pubID = (*normid != 0 ? normid :
NULL);
2561 if (
entry->type == SGML_CATA_PUBLIC) {
2582 xmlCatalogEntryPtr
entry;
2590 if (
entry->type == SGML_CATA_SYSTEM)
2606xmlCatalogSGMLResolve(xmlCatalogPtr catal,
const xmlChar *pubID,
2610 if (catal->sgml ==
NULL)
2614 ret = xmlCatalogGetSGMLPublic(catal->sgml, pubID);
2618 ret = xmlCatalogGetSGMLSystem(catal->sgml, sysID);
2641xmlLoadSGMLSuperCatalog(
const char *
filename)
2644 xmlCatalogPtr catal;
2651 catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE, xmlCatalogDefaultPrefer);
2652 if (catal ==
NULL) {
2660 xmlFreeCatalog(catal);
2678xmlLoadACatalog(
const char *
filename)
2682 xmlCatalogPtr catal;
2697 if (*
first !=
'<') {
2698 catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE, xmlCatalogDefaultPrefer);
2699 if (catal ==
NULL) {
2705 xmlFreeCatalog(catal);
2710 catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer);
2711 if (catal ==
NULL) {
2715 catal->xml = xmlNewCatalogEntry(XML_CATA_CATALOG,
NULL,
2733xmlExpandCatalog(xmlCatalogPtr catal,
const char *
filename)
2741 if (catal->type == XML_SGML_CATALOG_TYPE) {
2755 xmlCatalogEntryPtr tmp,
cur;
2756 tmp = xmlNewCatalogEntry(XML_CATA_CATALOG,
NULL,
2781xmlACatalogResolveSystem(xmlCatalogPtr catal,
const xmlChar *sysID) {
2784 if ((sysID ==
NULL) || (catal ==
NULL))
2787 if (xmlDebugCatalogs)
2789 "Resolve sysID %s\n", sysID);
2791 if (catal->type == XML_XML_CATALOG_TYPE) {
2792 ret = xmlCatalogListXMLResolve(catal->xml,
NULL, sysID);
2793 if (
ret == XML_CATAL_BREAK)
2798 sgml = xmlCatalogGetSGMLSystem(catal->sgml, sysID);
2816xmlACatalogResolvePublic(xmlCatalogPtr catal,
const xmlChar *pubID) {
2819 if ((pubID ==
NULL) || (catal ==
NULL))
2822 if (xmlDebugCatalogs)
2824 "Resolve pubID %s\n", pubID);
2826 if (catal->type == XML_XML_CATALOG_TYPE) {
2827 ret = xmlCatalogListXMLResolve(catal->xml, pubID,
NULL);
2828 if (
ret == XML_CATAL_BREAK)
2833 sgml = xmlCatalogGetSGMLPublic(catal->sgml, pubID);
2852xmlACatalogResolve(xmlCatalogPtr catal,
const xmlChar * pubID,
2857 if (((pubID ==
NULL) && (sysID ==
NULL)) || (catal ==
NULL))
2860 if (xmlDebugCatalogs) {
2861 if ((pubID !=
NULL) && (sysID !=
NULL)) {
2863 "Resolve: pubID %s sysID %s\n", pubID, sysID);
2864 }
else if (pubID !=
NULL) {
2866 "Resolve: pubID %s\n", pubID);
2869 "Resolve: sysID %s\n", sysID);
2873 if (catal->type == XML_XML_CATALOG_TYPE) {
2874 ret = xmlCatalogListXMLResolve(catal->xml, pubID, sysID);
2875 if (
ret == XML_CATAL_BREAK)
2880 sgml = xmlCatalogSGMLResolve(catal, pubID, sysID);
2898xmlACatalogResolveURI(xmlCatalogPtr catal,
const xmlChar *URI) {
2901 if ((URI ==
NULL) || (catal ==
NULL))
2904 if (xmlDebugCatalogs)
2906 "Resolve URI %s\n", URI);
2908 if (catal->type == XML_XML_CATALOG_TYPE) {
2909 ret = xmlCatalogListXMLResolveURI(catal->xml, URI);
2910 if (
ret == XML_CATAL_BREAK)
2915 sgml = xmlCatalogSGMLResolve(catal,
NULL, URI);
2922#ifdef LIBXML_OUTPUT_ENABLED
2931xmlACatalogDump(xmlCatalogPtr catal,
FILE *
out) {
2935 if (catal->type == XML_XML_CATALOG_TYPE) {
2936 xmlDumpXMLCatalog(
out, catal->xml);
2956xmlACatalogAdd(xmlCatalogPtr catal,
const xmlChar *
type,
2964 if (catal->type == XML_XML_CATALOG_TYPE) {
2967 xmlCatalogEntryType cattype;
2969 cattype = xmlGetSGMLCatalogEntryType(
type);
2970 if (cattype != XML_CATA_NONE) {
2971 xmlCatalogEntryPtr
entry;
2974 XML_CATA_PREFER_NONE,
NULL);
2975 if (catal->sgml ==
NULL)
2993xmlACatalogRemove(xmlCatalogPtr catal,
const xmlChar *
value) {
2999 if (catal->type == XML_XML_CATALOG_TYPE) {
3000 res = xmlDelXMLCatalog(catal->xml,
value);
3018xmlNewCatalog(
int sgml) {
3019 xmlCatalogPtr catal =
NULL;
3022 catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE,
3023 xmlCatalogDefaultPrefer);
3024 if ((catal !=
NULL) && (catal->sgml ==
NULL))
3027 catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
3028 xmlCatalogDefaultPrefer);
3041xmlCatalogIsEmpty(xmlCatalogPtr catal) {
3045 if (catal->type == XML_XML_CATALOG_TYPE) {
3046 if (catal->xml ==
NULL)
3048 if ((catal->xml->type != XML_CATA_CATALOG) &&
3049 (catal->xml->type != XML_CATA_BROKEN_CATALOG))
3051 if (catal->xml->children ==
NULL)
3057 if (catal->sgml ==
NULL)
3083xmlInitializeCatalogData(
void) {
3084 if (xmlCatalogInitialized != 0)
3087 if (
getenv(
"XML_DEBUG_CATALOG"))
3088 xmlDebugCatalogs = 1;
3091 xmlCatalogInitialized = 1;
3101xmlInitializeCatalog(
void) {
3102 if (xmlCatalogInitialized != 0)
3105 xmlInitializeCatalogData();
3108 if (
getenv(
"XML_DEBUG_CATALOG"))
3109 xmlDebugCatalogs = 1;
3111 if (xmlDefaultCatalog ==
NULL) {
3112 const char *catalogs;
3115 xmlCatalogPtr catal;
3116 xmlCatalogEntryPtr *nextent;
3118 catalogs = (
const char *)
getenv(
"XML_CATALOG_FILES");
3119 if (catalogs ==
NULL)
3120#if defined(_WIN32) && defined(_MSC_VER)
3131 while (*
p !=
'\\' &&
p >
buf)
3150 catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
3151 xmlCatalogDefaultPrefer);
3152 if (catal !=
NULL) {
3156 nextent = &catal->xml;
3157 while (*
cur !=
'\0') {
3166 *nextent = xmlNewCatalogEntry(XML_CATA_CATALOG,
NULL,
3168 if (*nextent !=
NULL)
3169 nextent = &((*nextent)->next);
3174 xmlDefaultCatalog = catal;
3194xmlLoadCatalog(
const char *
filename)
3197 xmlCatalogPtr catal;
3199 if (!xmlCatalogInitialized)
3200 xmlInitializeCatalogData();
3204 if (xmlDefaultCatalog ==
NULL) {
3206 if (catal ==
NULL) {
3211 xmlDefaultCatalog = catal;
3216 ret = xmlExpandCatalog(xmlDefaultCatalog,
filename);
3231xmlLoadCatalogs(
const char *pathss) {
3253 for(
i = 0;
i < iLen;
i++) {
3254 if(
path[
i] ==
'\\') {
3259 xmlLoadCatalog((
const char *)
path);
3274xmlCatalogCleanup(
void) {
3275 if (xmlCatalogInitialized == 0)
3279 if (xmlDebugCatalogs)
3281 "Catalogs cleanup\n");
3282 if (xmlCatalogXMLFiles !=
NULL)
3283 xmlHashFree(xmlCatalogXMLFiles, xmlFreeCatalogHashEntryList);
3284 xmlCatalogXMLFiles =
NULL;
3285 if (xmlDefaultCatalog !=
NULL)
3286 xmlFreeCatalog(xmlDefaultCatalog);
3287 xmlDefaultCatalog =
NULL;
3288 xmlDebugCatalogs = 0;
3289 xmlCatalogInitialized = 0;
3304xmlCatalogResolveSystem(
const xmlChar *sysID) {
3307 if (!xmlCatalogInitialized)
3308 xmlInitializeCatalog();
3310 ret = xmlACatalogResolveSystem(xmlDefaultCatalog, sysID);
3324xmlCatalogResolvePublic(
const xmlChar *pubID) {
3327 if (!xmlCatalogInitialized)
3328 xmlInitializeCatalog();
3330 ret = xmlACatalogResolvePublic(xmlDefaultCatalog, pubID);
3348 if (!xmlCatalogInitialized)
3349 xmlInitializeCatalog();
3351 ret = xmlACatalogResolve(xmlDefaultCatalog, pubID, sysID);
3365xmlCatalogResolveURI(
const xmlChar *URI) {
3368 if (!xmlCatalogInitialized)
3369 xmlInitializeCatalog();
3371 ret = xmlACatalogResolveURI(xmlDefaultCatalog, URI);
3375#ifdef LIBXML_OUTPUT_ENABLED
3387 if (!xmlCatalogInitialized)
3388 xmlInitializeCatalog();
3390 xmlACatalogDump(xmlDefaultCatalog,
out);
3411 if (!xmlCatalogInitialized)
3412 xmlInitializeCatalogData();
3419 if ((xmlDefaultCatalog ==
NULL) &&
3421 xmlDefaultCatalog = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
3422 xmlCatalogDefaultPrefer);
3423 if (xmlDefaultCatalog !=
NULL) {
3424 xmlDefaultCatalog->xml = xmlNewCatalogEntry(XML_CATA_CATALOG,
NULL,
3425 orig,
NULL, xmlCatalogDefaultPrefer,
NULL);
3448 if (!xmlCatalogInitialized)
3449 xmlInitializeCatalog();
3452 res = xmlACatalogRemove(xmlDefaultCatalog,
value);
3465xmlCatalogConvert(
void) {
3468 if (!xmlCatalogInitialized)
3469 xmlInitializeCatalog();
3472 res = xmlConvertSGMLCatalog(xmlDefaultCatalog);
3492xmlCatalogGetDefaults(
void) {
3493 return(xmlCatalogDefaultAllow);
3504xmlCatalogSetDefaults(xmlCatalogAllow allow) {
3505 if (xmlDebugCatalogs) {
3507 case XML_CATA_ALLOW_NONE:
3509 "Disabling catalog usage\n");
3511 case XML_CATA_ALLOW_GLOBAL:
3513 "Allowing only global catalogs\n");
3515 case XML_CATA_ALLOW_DOCUMENT:
3517 "Allowing only catalogs from the document\n");
3519 case XML_CATA_ALLOW_ALL:
3521 "Allowing all catalogs\n");
3525 xmlCatalogDefaultAllow = allow;
3539xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer) {
3540 xmlCatalogPrefer
ret = xmlCatalogDefaultPrefer;
3542 if (prefer == XML_CATA_PREFER_NONE)
3545 if (xmlDebugCatalogs) {
3547 case XML_CATA_PREFER_PUBLIC:
3549 "Setting catalog preference to PUBLIC\n");
3551 case XML_CATA_PREFER_SYSTEM:
3553 "Setting catalog preference to SYSTEM\n");
3559 xmlCatalogDefaultPrefer = prefer;
3573xmlCatalogSetDebug(
int level) {
3574 int ret = xmlDebugCatalogs;
3577 xmlDebugCatalogs = 0;
3579 xmlDebugCatalogs =
level;
3596xmlCatalogFreeLocal(
void *catalogs) {
3597 xmlCatalogEntryPtr catal;
3599 if (!xmlCatalogInitialized)
3600 xmlInitializeCatalog();
3602 catal = (xmlCatalogEntryPtr) catalogs;
3604 xmlFreeCatalogEntryList(catal);
3618xmlCatalogAddLocal(
void *catalogs,
const xmlChar *URL) {
3619 xmlCatalogEntryPtr catal, add;
3621 if (!xmlCatalogInitialized)
3622 xmlInitializeCatalog();
3627 if (xmlDebugCatalogs)
3629 "Adding document catalog %s\n", URL);
3631 add = xmlNewCatalogEntry(XML_CATA_CATALOG,
NULL, URL,
NULL,
3632 xmlCatalogDefaultPrefer,
NULL);
3636 catal = (xmlCatalogEntryPtr) catalogs;
3638 return((
void *) add);
3640 while (catal->next !=
NULL)
3641 catal = catal->next;
3659xmlCatalogLocalResolve(
void *catalogs,
const xmlChar *pubID,
3661 xmlCatalogEntryPtr catal;
3664 if (!xmlCatalogInitialized)
3665 xmlInitializeCatalog();
3667 if ((pubID ==
NULL) && (sysID ==
NULL))
3670 if (xmlDebugCatalogs) {
3671 if ((pubID !=
NULL) && (sysID !=
NULL)) {
3673 "Local Resolve: pubID %s sysID %s\n", pubID, sysID);
3674 }
else if (pubID !=
NULL) {
3676 "Local Resolve: pubID %s\n", pubID);
3679 "Local Resolve: sysID %s\n", sysID);
3683 catal = (xmlCatalogEntryPtr) catalogs;
3686 ret = xmlCatalogListXMLResolve(catal, pubID, sysID);
3687 if ((
ret !=
NULL) && (
ret != XML_CATAL_BREAK))
3704xmlCatalogLocalResolveURI(
void *catalogs,
const xmlChar *URI) {
3705 xmlCatalogEntryPtr catal;
3708 if (!xmlCatalogInitialized)
3709 xmlInitializeCatalog();
3714 if (xmlDebugCatalogs)
3716 "Resolve URI %s\n", URI);
3718 catal = (xmlCatalogEntryPtr) catalogs;
3721 ret = xmlCatalogListXMLResolveURI(catal, URI);
3722 if ((
ret !=
NULL) && (
ret != XML_CATAL_BREAK))
3742xmlCatalogGetSystem(
const xmlChar *sysID) {
3747 if (!xmlCatalogInitialized)
3748 xmlInitializeCatalog();
3752 "Use of deprecated xmlCatalogGetSystem() call\n");
3762 if (xmlDefaultCatalog !=
NULL) {
3763 ret = xmlCatalogListXMLResolve(xmlDefaultCatalog->xml,
NULL, sysID);
3764 if ((
ret !=
NULL) && (
ret != XML_CATAL_BREAK)) {
3771 if (xmlDefaultCatalog !=
NULL)
3772 return(xmlCatalogGetSGMLSystem(xmlDefaultCatalog->sgml, sysID));
3786xmlCatalogGetPublic(
const xmlChar *pubID) {
3791 if (!xmlCatalogInitialized)
3792 xmlInitializeCatalog();
3796 "Use of deprecated xmlCatalogGetPublic() call\n");
3806 if (xmlDefaultCatalog !=
NULL) {
3807 ret = xmlCatalogListXMLResolve(xmlDefaultCatalog->xml, pubID,
NULL);
3808 if ((
ret !=
NULL) && (
ret != XML_CATAL_BREAK)) {
3815 if (xmlDefaultCatalog !=
NULL)
3816 return(xmlCatalogGetSGMLPublic(xmlDefaultCatalog->sgml, pubID));
ACPI_SIZE strlen(const char *String)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
void dealloc(int i, int no_throw)
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble GLdouble q
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei const GLuint * paths
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE *_File, _In_ long _Offset, _In_ int _Origin)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP long __cdecl ftell(_Inout_ FILE *_File)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewInputStream(xmlParserCtxtPtr ctxt)
#define IS_PUBIDCHAR_CH(c)
XMLPUBFUN int XMLCALL inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
static unsigned __int64 next
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
XMLPUBVAR xmlMallocFunc xmlMallocAtomic
XMLPUBVAR xmlMallocFunc xmlMalloc
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBVAR void * xmlGenericErrorContext
XMLPUBVAR xmlReallocFunc xmlRealloc
XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
XMLPUBFUN void XMLCALL xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f)
XMLPUBFUN void *XMLCALL xmlHashLookup(xmlHashTablePtr table, const xmlChar *name)
XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreate(int size)
XMLPUBFUN int XMLCALL xmlHashSize(xmlHashTablePtr table)
XMLPUBFUN int XMLCALL xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata)
XMLPUBFUN int XMLCALL xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, xmlHashDeallocator f)
XMLPUBFUN void XMLCALL xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data)
XMLPUBFUN void XMLCALL xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
XMLPUBFUN int XMLCALL xmlParseDocument(xmlParserCtxtPtr ctxt)
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlNewParserCtxt(void)
XMLPUBFUN xmlNodePtr XMLCALL xmlAddChild(xmlNodePtr parent, xmlNodePtr cur)
XMLPUBFUN xmlDtdPtr XMLCALL xmlNewDtd(xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
XMLPUBFUN xmlNodePtr XMLCALL xmlDocGetRootElement(const xmlDoc *doc)
XMLPUBFUN void XMLCALL xmlFreeDoc(xmlDocPtr cur)
XMLPUBFUN xmlChar *XMLCALL xmlGetProp(const xmlNode *node, const xmlChar *name)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content)
xmlOutputBuffer * xmlOutputBufferPtr
XMLPUBFUN xmlDocPtr XMLCALL xmlNewDoc(const xmlChar *version)
XMLPUBFUN xmlChar *XMLCALL xmlGetNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace)
XMLPUBFUN xmlNsPtr XMLCALL xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar *href)
XMLPUBFUN xmlChar *XMLCALL xmlNodeGetBase(const xmlDoc *doc, const xmlNode *cur)
#define XML_XML_NAMESPACE
XMLPUBFUN void XMLCALL xmlFreeNs(xmlNsPtr cur)
XMLPUBFUN xmlNsPtr XMLCALL xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix)
XMLPUBFUN void XMLCALL xmlRMutexLock(xmlRMutexPtr tok)
XMLPUBFUN void XMLCALL xmlFreeRMutex(xmlRMutexPtr tok)
XMLPUBFUN xmlRMutexPtr XMLCALL xmlNewRMutex(void)
XMLPUBFUN int XMLCALL xmlGetThreadId(void)
XMLPUBFUN void XMLCALL xmlRMutexUnlock(xmlRMutexPtr tok)
XMLPUBFUN xmlChar *XMLCALL xmlCanonicPath(const xmlChar *path)
XMLPUBFUN xmlChar *XMLCALL xmlBuildURI(const xmlChar *URI, const xmlChar *base)
XMLPUBFUN char *XMLCALL xmlParserGetDirectory(const char *filename)
XMLPUBFUN void XMLCALL xmlFreeParserInputBuffer(xmlParserInputBufferPtr in)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc)
@ XML_CATALOG_PREFER_VALUE
@ XML_CATALOG_ENTRY_BROKEN
@ XML_CATALOG_NOT_CATALOG
@ XML_CATALOG_MISSING_ATTR
#define XML_XML_DEFAULT_CATALOG
XMLPUBFUN xmlChar *XMLCALL xmlStrndup(const xmlChar *cur, int len)
XMLPUBFUN xmlChar *XMLCALL xmlStrcat(xmlChar *cur, const xmlChar *add)
XMLPUBFUN int XMLCALL xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len)
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
XMLPUBFUN int XMLCALL xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
#define LIBXML_ATTR_FORMAT(fmt, args)