mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
(libxml2) Remove XML_CATALOG
This commit is contained in:
parent
da3ec111e8
commit
089a1da8b2
@ -28,7 +28,6 @@ LOCAL_MODULE := retroarch-activity
|
|||||||
RARCH_PATH := ../../..
|
RARCH_PATH := ../../..
|
||||||
LIBXML_PATH := ../libxml2
|
LIBXML_PATH := ../libxml2
|
||||||
LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/c14n.c \
|
LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/c14n.c \
|
||||||
$(LIBXML_PATH)/catalog.c \
|
|
||||||
$(LIBXML_PATH)/chvalid.c \
|
$(LIBXML_PATH)/chvalid.c \
|
||||||
$(LIBXML_PATH)/dict.c \
|
$(LIBXML_PATH)/dict.c \
|
||||||
$(LIBXML_PATH)/DOCBparser.c \
|
$(LIBXML_PATH)/DOCBparser.c \
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -181,90 +181,6 @@ extern __typeof (valuePush) valuePush__internal_alias __attribute((visibility("h
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlACatalogAdd
|
|
||||||
extern __typeof (xmlACatalogAdd) xmlACatalogAdd __attribute((alias("xmlACatalogAdd__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlACatalogAdd
|
|
||||||
extern __typeof (xmlACatalogAdd) xmlACatalogAdd__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlACatalogAdd xmlACatalogAdd__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlACatalogDump
|
|
||||||
extern __typeof (xmlACatalogDump) xmlACatalogDump __attribute((alias("xmlACatalogDump__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlACatalogDump
|
|
||||||
extern __typeof (xmlACatalogDump) xmlACatalogDump__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlACatalogDump xmlACatalogDump__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlACatalogRemove
|
|
||||||
extern __typeof (xmlACatalogRemove) xmlACatalogRemove __attribute((alias("xmlACatalogRemove__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlACatalogRemove
|
|
||||||
extern __typeof (xmlACatalogRemove) xmlACatalogRemove__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlACatalogRemove xmlACatalogRemove__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlACatalogResolve
|
|
||||||
extern __typeof (xmlACatalogResolve) xmlACatalogResolve __attribute((alias("xmlACatalogResolve__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlACatalogResolve
|
|
||||||
extern __typeof (xmlACatalogResolve) xmlACatalogResolve__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlACatalogResolve xmlACatalogResolve__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlACatalogResolvePublic
|
|
||||||
extern __typeof (xmlACatalogResolvePublic) xmlACatalogResolvePublic __attribute((alias("xmlACatalogResolvePublic__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlACatalogResolvePublic
|
|
||||||
extern __typeof (xmlACatalogResolvePublic) xmlACatalogResolvePublic__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlACatalogResolvePublic xmlACatalogResolvePublic__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlACatalogResolveSystem
|
|
||||||
extern __typeof (xmlACatalogResolveSystem) xmlACatalogResolveSystem __attribute((alias("xmlACatalogResolveSystem__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlACatalogResolveSystem
|
|
||||||
extern __typeof (xmlACatalogResolveSystem) xmlACatalogResolveSystem__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlACatalogResolveSystem xmlACatalogResolveSystem__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlACatalogResolveURI
|
|
||||||
extern __typeof (xmlACatalogResolveURI) xmlACatalogResolveURI __attribute((alias("xmlACatalogResolveURI__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlACatalogResolveURI
|
|
||||||
extern __typeof (xmlACatalogResolveURI) xmlACatalogResolveURI__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlACatalogResolveURI xmlACatalogResolveURI__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_valid
|
#ifdef bottom_valid
|
||||||
#undef xmlAddAttributeDecl
|
#undef xmlAddAttributeDecl
|
||||||
extern __typeof (xmlAddAttributeDecl) xmlAddAttributeDecl __attribute((alias("xmlAddAttributeDecl__internal_alias")));
|
extern __typeof (xmlAddAttributeDecl) xmlAddAttributeDecl __attribute((alias("xmlAddAttributeDecl__internal_alias")));
|
||||||
@ -923,245 +839,6 @@ extern __typeof (xmlCanonicPath) xmlCanonicPath__internal_alias __attribute((vis
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogAdd
|
|
||||||
extern __typeof (xmlCatalogAdd) xmlCatalogAdd __attribute((alias("xmlCatalogAdd__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogAdd
|
|
||||||
extern __typeof (xmlCatalogAdd) xmlCatalogAdd__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogAdd xmlCatalogAdd__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogAddLocal
|
|
||||||
extern __typeof (xmlCatalogAddLocal) xmlCatalogAddLocal __attribute((alias("xmlCatalogAddLocal__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogAddLocal
|
|
||||||
extern __typeof (xmlCatalogAddLocal) xmlCatalogAddLocal__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogAddLocal xmlCatalogAddLocal__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogCleanup
|
|
||||||
extern __typeof (xmlCatalogCleanup) xmlCatalogCleanup __attribute((alias("xmlCatalogCleanup__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogCleanup
|
|
||||||
extern __typeof (xmlCatalogCleanup) xmlCatalogCleanup__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogCleanup xmlCatalogCleanup__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogConvert
|
|
||||||
extern __typeof (xmlCatalogConvert) xmlCatalogConvert __attribute((alias("xmlCatalogConvert__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogConvert
|
|
||||||
extern __typeof (xmlCatalogConvert) xmlCatalogConvert__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogConvert xmlCatalogConvert__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogDump
|
|
||||||
extern __typeof (xmlCatalogDump) xmlCatalogDump __attribute((alias("xmlCatalogDump__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogDump
|
|
||||||
extern __typeof (xmlCatalogDump) xmlCatalogDump__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogDump xmlCatalogDump__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogFreeLocal
|
|
||||||
extern __typeof (xmlCatalogFreeLocal) xmlCatalogFreeLocal __attribute((alias("xmlCatalogFreeLocal__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogFreeLocal
|
|
||||||
extern __typeof (xmlCatalogFreeLocal) xmlCatalogFreeLocal__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogFreeLocal xmlCatalogFreeLocal__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogGetDefaults
|
|
||||||
extern __typeof (xmlCatalogGetDefaults) xmlCatalogGetDefaults __attribute((alias("xmlCatalogGetDefaults__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogGetDefaults
|
|
||||||
extern __typeof (xmlCatalogGetDefaults) xmlCatalogGetDefaults__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogGetDefaults xmlCatalogGetDefaults__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogGetPublic
|
|
||||||
extern __typeof (xmlCatalogGetPublic) xmlCatalogGetPublic __attribute((alias("xmlCatalogGetPublic__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogGetPublic
|
|
||||||
extern __typeof (xmlCatalogGetPublic) xmlCatalogGetPublic__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogGetPublic xmlCatalogGetPublic__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogGetSystem
|
|
||||||
extern __typeof (xmlCatalogGetSystem) xmlCatalogGetSystem __attribute((alias("xmlCatalogGetSystem__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogGetSystem
|
|
||||||
extern __typeof (xmlCatalogGetSystem) xmlCatalogGetSystem__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogGetSystem xmlCatalogGetSystem__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogIsEmpty
|
|
||||||
extern __typeof (xmlCatalogIsEmpty) xmlCatalogIsEmpty __attribute((alias("xmlCatalogIsEmpty__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogIsEmpty
|
|
||||||
extern __typeof (xmlCatalogIsEmpty) xmlCatalogIsEmpty__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogIsEmpty xmlCatalogIsEmpty__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogLocalResolve
|
|
||||||
extern __typeof (xmlCatalogLocalResolve) xmlCatalogLocalResolve __attribute((alias("xmlCatalogLocalResolve__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogLocalResolve
|
|
||||||
extern __typeof (xmlCatalogLocalResolve) xmlCatalogLocalResolve__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogLocalResolve xmlCatalogLocalResolve__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogLocalResolveURI
|
|
||||||
extern __typeof (xmlCatalogLocalResolveURI) xmlCatalogLocalResolveURI __attribute((alias("xmlCatalogLocalResolveURI__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogLocalResolveURI
|
|
||||||
extern __typeof (xmlCatalogLocalResolveURI) xmlCatalogLocalResolveURI__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogLocalResolveURI xmlCatalogLocalResolveURI__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogRemove
|
|
||||||
extern __typeof (xmlCatalogRemove) xmlCatalogRemove __attribute((alias("xmlCatalogRemove__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogRemove
|
|
||||||
extern __typeof (xmlCatalogRemove) xmlCatalogRemove__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogRemove xmlCatalogRemove__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogResolve
|
|
||||||
extern __typeof (xmlCatalogResolve) xmlCatalogResolve __attribute((alias("xmlCatalogResolve__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogResolve
|
|
||||||
extern __typeof (xmlCatalogResolve) xmlCatalogResolve__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogResolve xmlCatalogResolve__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogResolvePublic
|
|
||||||
extern __typeof (xmlCatalogResolvePublic) xmlCatalogResolvePublic __attribute((alias("xmlCatalogResolvePublic__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogResolvePublic
|
|
||||||
extern __typeof (xmlCatalogResolvePublic) xmlCatalogResolvePublic__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogResolvePublic xmlCatalogResolvePublic__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogResolveSystem
|
|
||||||
extern __typeof (xmlCatalogResolveSystem) xmlCatalogResolveSystem __attribute((alias("xmlCatalogResolveSystem__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogResolveSystem
|
|
||||||
extern __typeof (xmlCatalogResolveSystem) xmlCatalogResolveSystem__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogResolveSystem xmlCatalogResolveSystem__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogResolveURI
|
|
||||||
extern __typeof (xmlCatalogResolveURI) xmlCatalogResolveURI __attribute((alias("xmlCatalogResolveURI__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogResolveURI
|
|
||||||
extern __typeof (xmlCatalogResolveURI) xmlCatalogResolveURI__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogResolveURI xmlCatalogResolveURI__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogSetDebug
|
|
||||||
extern __typeof (xmlCatalogSetDebug) xmlCatalogSetDebug __attribute((alias("xmlCatalogSetDebug__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogSetDebug
|
|
||||||
extern __typeof (xmlCatalogSetDebug) xmlCatalogSetDebug__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogSetDebug xmlCatalogSetDebug__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogSetDefaultPrefer
|
|
||||||
extern __typeof (xmlCatalogSetDefaultPrefer) xmlCatalogSetDefaultPrefer __attribute((alias("xmlCatalogSetDefaultPrefer__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogSetDefaultPrefer
|
|
||||||
extern __typeof (xmlCatalogSetDefaultPrefer) xmlCatalogSetDefaultPrefer__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogSetDefaultPrefer xmlCatalogSetDefaultPrefer__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlCatalogSetDefaults
|
|
||||||
extern __typeof (xmlCatalogSetDefaults) xmlCatalogSetDefaults __attribute((alias("xmlCatalogSetDefaults__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlCatalogSetDefaults
|
|
||||||
extern __typeof (xmlCatalogSetDefaults) xmlCatalogSetDefaults__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlCatalogSetDefaults xmlCatalogSetDefaults__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_encoding
|
#ifdef bottom_encoding
|
||||||
#undef xmlCharEncCloseFunc
|
#undef xmlCharEncCloseFunc
|
||||||
@ -1409,18 +1086,6 @@ extern __typeof (xmlClearParserCtxt) xmlClearParserCtxt__internal_alias __attrib
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlConvertSGMLCatalog
|
|
||||||
extern __typeof (xmlConvertSGMLCatalog) xmlConvertSGMLCatalog __attribute((alias("xmlConvertSGMLCatalog__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlConvertSGMLCatalog
|
|
||||||
extern __typeof (xmlConvertSGMLCatalog) xmlConvertSGMLCatalog__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlConvertSGMLCatalog xmlConvertSGMLCatalog__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_TREE_ENABLED)
|
#if defined(LIBXML_TREE_ENABLED)
|
||||||
#ifdef bottom_valid
|
#ifdef bottom_valid
|
||||||
#undef xmlCopyAttributeTable
|
#undef xmlCopyAttributeTable
|
||||||
@ -2625,18 +2290,6 @@ extern __typeof (xmlFreeAutomata) xmlFreeAutomata__internal_alias __attribute((v
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlFreeCatalog
|
|
||||||
extern __typeof (xmlFreeCatalog) xmlFreeCatalog __attribute((alias("xmlFreeCatalog__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlFreeCatalog
|
|
||||||
extern __typeof (xmlFreeCatalog) xmlFreeCatalog__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlFreeCatalog xmlFreeCatalog__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_tree
|
#ifdef bottom_tree
|
||||||
#undef xmlFreeDoc
|
#undef xmlFreeDoc
|
||||||
extern __typeof (xmlFreeDoc) xmlFreeDoc __attribute((alias("xmlFreeDoc__internal_alias")));
|
extern __typeof (xmlFreeDoc) xmlFreeDoc __attribute((alias("xmlFreeDoc__internal_alias")));
|
||||||
@ -3641,18 +3294,6 @@ extern __typeof (xmlInitThreads) xmlInitThreads__internal_alias __attribute((vis
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlInitializeCatalog
|
|
||||||
extern __typeof (xmlInitializeCatalog) xmlInitializeCatalog __attribute((alias("xmlInitializeCatalog__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlInitializeCatalog
|
|
||||||
extern __typeof (xmlInitializeCatalog) xmlInitializeCatalog__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlInitializeCatalog xmlInitializeCatalog__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_globals
|
#ifdef bottom_globals
|
||||||
#undef xmlInitializeGlobalState
|
#undef xmlInitializeGlobalState
|
||||||
extern __typeof (xmlInitializeGlobalState) xmlInitializeGlobalState __attribute((alias("xmlInitializeGlobalState__internal_alias")));
|
extern __typeof (xmlInitializeGlobalState) xmlInitializeGlobalState __attribute((alias("xmlInitializeGlobalState__internal_alias")));
|
||||||
@ -4117,42 +3758,6 @@ extern __typeof (xmlListWalk) xmlListWalk__internal_alias __attribute((visibilit
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlLoadACatalog
|
|
||||||
extern __typeof (xmlLoadACatalog) xmlLoadACatalog __attribute((alias("xmlLoadACatalog__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlLoadACatalog
|
|
||||||
extern __typeof (xmlLoadACatalog) xmlLoadACatalog__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlLoadACatalog xmlLoadACatalog__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlLoadCatalog
|
|
||||||
extern __typeof (xmlLoadCatalog) xmlLoadCatalog __attribute((alias("xmlLoadCatalog__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlLoadCatalog
|
|
||||||
extern __typeof (xmlLoadCatalog) xmlLoadCatalog__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlLoadCatalog xmlLoadCatalog__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlLoadCatalogs
|
|
||||||
extern __typeof (xmlLoadCatalogs) xmlLoadCatalogs __attribute((alias("xmlLoadCatalogs__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlLoadCatalogs
|
|
||||||
extern __typeof (xmlLoadCatalogs) xmlLoadCatalogs__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlLoadCatalogs xmlLoadCatalogs__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_xmlIO
|
#ifdef bottom_xmlIO
|
||||||
#undef xmlLoadExternalEntity
|
#undef xmlLoadExternalEntity
|
||||||
extern __typeof (xmlLoadExternalEntity) xmlLoadExternalEntity __attribute((alias("xmlLoadExternalEntity__internal_alias")));
|
extern __typeof (xmlLoadExternalEntity) xmlLoadExternalEntity __attribute((alias("xmlLoadExternalEntity__internal_alias")));
|
||||||
@ -4163,18 +3768,6 @@ extern __typeof (xmlLoadExternalEntity) xmlLoadExternalEntity__internal_alias __
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlLoadSGMLSuperCatalog
|
|
||||||
extern __typeof (xmlLoadSGMLSuperCatalog) xmlLoadSGMLSuperCatalog __attribute((alias("xmlLoadSGMLSuperCatalog__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlLoadSGMLSuperCatalog
|
|
||||||
extern __typeof (xmlLoadSGMLSuperCatalog) xmlLoadSGMLSuperCatalog__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlLoadSGMLSuperCatalog xmlLoadSGMLSuperCatalog__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_threads
|
#ifdef bottom_threads
|
||||||
#undef xmlLockLibrary
|
#undef xmlLockLibrary
|
||||||
extern __typeof (xmlLockLibrary) xmlLockLibrary __attribute((alias("xmlLockLibrary__internal_alias")));
|
extern __typeof (xmlLockLibrary) xmlLockLibrary __attribute((alias("xmlLockLibrary__internal_alias")));
|
||||||
@ -4461,18 +4054,6 @@ extern __typeof (xmlNewCDataBlock) xmlNewCDataBlock__internal_alias __attribute(
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlNewCatalog
|
|
||||||
extern __typeof (xmlNewCatalog) xmlNewCatalog __attribute((alias("xmlNewCatalog__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlNewCatalog
|
|
||||||
extern __typeof (xmlNewCatalog) xmlNewCatalog__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlNewCatalog xmlNewCatalog__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_encoding
|
#ifdef bottom_encoding
|
||||||
#undef xmlNewCharEncodingHandler
|
#undef xmlNewCharEncodingHandler
|
||||||
extern __typeof (xmlNewCharEncodingHandler) xmlNewCharEncodingHandler __attribute((alias("xmlNewCharEncodingHandler__internal_alias")));
|
extern __typeof (xmlNewCharEncodingHandler) xmlNewCharEncodingHandler __attribute((alias("xmlNewCharEncodingHandler__internal_alias")));
|
||||||
@ -5427,18 +5008,6 @@ extern __typeof (xmlParseCDSect) xmlParseCDSect__internal_alias __attribute((vis
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED)
|
|
||||||
#ifdef bottom_catalog
|
|
||||||
#undef xmlParseCatalogFile
|
|
||||||
extern __typeof (xmlParseCatalogFile) xmlParseCatalogFile __attribute((alias("xmlParseCatalogFile__internal_alias")));
|
|
||||||
#else
|
|
||||||
#ifndef xmlParseCatalogFile
|
|
||||||
extern __typeof (xmlParseCatalogFile) xmlParseCatalogFile__internal_alias __attribute((visibility("hidden")));
|
|
||||||
#define xmlParseCatalogFile xmlParseCatalogFile__internal_alias
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_parser
|
#ifdef bottom_parser
|
||||||
#undef xmlParseCharData
|
#undef xmlParseCharData
|
||||||
extern __typeof (xmlParseCharData) xmlParseCharData __attribute((alias("xmlParseCharData__internal_alias")));
|
extern __typeof (xmlParseCharData) xmlParseCharData __attribute((alias("xmlParseCharData__internal_alias")));
|
||||||
|
@ -23,160 +23,4 @@
|
|||||||
#include <libxml/xmlstring.h>
|
#include <libxml/xmlstring.h>
|
||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* XML_CATALOGS_NAMESPACE:
|
|
||||||
*
|
|
||||||
* The namespace for the XML Catalogs elements.
|
|
||||||
*/
|
|
||||||
#define XML_CATALOGS_NAMESPACE \
|
|
||||||
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
|
|
||||||
/**
|
|
||||||
* XML_CATALOG_PI:
|
|
||||||
*
|
|
||||||
* The specific XML Catalog Processing Instuction name.
|
|
||||||
*/
|
|
||||||
#define XML_CATALOG_PI \
|
|
||||||
(const xmlChar *) "oasis-xml-catalog"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The API is voluntarily limited to general cataloging.
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
XML_CATA_PREFER_NONE = 0,
|
|
||||||
XML_CATA_PREFER_PUBLIC = 1,
|
|
||||||
XML_CATA_PREFER_SYSTEM
|
|
||||||
} xmlCatalogPrefer;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
XML_CATA_ALLOW_NONE = 0,
|
|
||||||
XML_CATA_ALLOW_GLOBAL = 1,
|
|
||||||
XML_CATA_ALLOW_DOCUMENT = 2,
|
|
||||||
XML_CATA_ALLOW_ALL = 3
|
|
||||||
} xmlCatalogAllow;
|
|
||||||
|
|
||||||
typedef struct _xmlCatalog xmlCatalog;
|
|
||||||
typedef xmlCatalog *xmlCatalogPtr;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Operations on a given catalog.
|
|
||||||
*/
|
|
||||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
|
||||||
xmlNewCatalog (int sgml);
|
|
||||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
|
||||||
xmlLoadACatalog (const char *filename);
|
|
||||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
|
||||||
xmlLoadSGMLSuperCatalog (const char *filename);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlACatalogAdd (xmlCatalogPtr catal,
|
|
||||||
const xmlChar *type,
|
|
||||||
const xmlChar *orig,
|
|
||||||
const xmlChar *replace);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlACatalogRemove (xmlCatalogPtr catal,
|
|
||||||
const xmlChar *value);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlACatalogResolve (xmlCatalogPtr catal,
|
|
||||||
const xmlChar *pubID,
|
|
||||||
const xmlChar *sysID);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlACatalogResolveSystem(xmlCatalogPtr catal,
|
|
||||||
const xmlChar *sysID);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlACatalogResolvePublic(xmlCatalogPtr catal,
|
|
||||||
const xmlChar *pubID);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlACatalogResolveURI (xmlCatalogPtr catal,
|
|
||||||
const xmlChar *URI);
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlACatalogDump (xmlCatalogPtr catal,
|
|
||||||
FILE *out);
|
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlFreeCatalog (xmlCatalogPtr catal);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlCatalogIsEmpty (xmlCatalogPtr catal);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Global operations.
|
|
||||||
*/
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlInitializeCatalog (void);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlLoadCatalog (const char *filename);
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlLoadCatalogs (const char *paths);
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlCatalogCleanup (void);
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlCatalogDump (FILE *out);
|
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlCatalogResolve (const xmlChar *pubID,
|
|
||||||
const xmlChar *sysID);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlCatalogResolveSystem (const xmlChar *sysID);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlCatalogResolvePublic (const xmlChar *pubID);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlCatalogResolveURI (const xmlChar *URI);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlCatalogAdd (const xmlChar *type,
|
|
||||||
const xmlChar *orig,
|
|
||||||
const xmlChar *replace);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlCatalogRemove (const xmlChar *value);
|
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
|
||||||
xmlParseCatalogFile (const char *filename);
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlCatalogConvert (void);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Strictly minimal interfaces for per-document catalogs used
|
|
||||||
* by the parser.
|
|
||||||
*/
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlCatalogFreeLocal (void *catalogs);
|
|
||||||
XMLPUBFUN void * XMLCALL
|
|
||||||
xmlCatalogAddLocal (void *catalogs,
|
|
||||||
const xmlChar *URL);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlCatalogLocalResolve (void *catalogs,
|
|
||||||
const xmlChar *pubID,
|
|
||||||
const xmlChar *sysID);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
|
||||||
xmlCatalogLocalResolveURI(void *catalogs,
|
|
||||||
const xmlChar *URI);
|
|
||||||
/*
|
|
||||||
* Preference settings.
|
|
||||||
*/
|
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlCatalogSetDebug (int level);
|
|
||||||
XMLPUBFUN xmlCatalogPrefer XMLCALL
|
|
||||||
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
|
|
||||||
XMLPUBFUN void XMLCALL
|
|
||||||
xmlCatalogSetDefaults (xmlCatalogAllow allow);
|
|
||||||
XMLPUBFUN xmlCatalogAllow XMLCALL
|
|
||||||
xmlCatalogGetDefaults (void);
|
|
||||||
|
|
||||||
|
|
||||||
/* DEPRECATED interfaces */
|
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
|
||||||
xmlCatalogGetSystem (const xmlChar *sysID);
|
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
|
||||||
xmlCatalogGetPublic (const xmlChar *pubID);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* LIBXML_CATALOG_ENABLED */
|
|
||||||
#endif /* __XML_CATALOG_H__ */
|
#endif /* __XML_CATALOG_H__ */
|
||||||
|
@ -187,15 +187,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
#define LIBXML_C14N_ENABLED
|
#define LIBXML_C14N_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* LIBXML_CATALOG_ENABLED:
|
|
||||||
*
|
|
||||||
* Whether the Catalog support is configured in
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
#define LIBXML_CATALOG_ENABLED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_DOCB_ENABLED:
|
* LIBXML_DOCB_ENABLED:
|
||||||
*
|
*
|
||||||
|
@ -54,9 +54,6 @@
|
|||||||
#include <libxml/encoding.h>
|
#include <libxml/encoding.h>
|
||||||
#include <libxml/xmlIO.h>
|
#include <libxml/xmlIO.h>
|
||||||
#include <libxml/uri.h>
|
#include <libxml/uri.h>
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
#include <libxml/catalog.h>
|
|
||||||
#endif
|
|
||||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||||
#include <libxml/xmlschemastypes.h>
|
#include <libxml/xmlschemastypes.h>
|
||||||
#include <libxml/relaxng.h>
|
#include <libxml/relaxng.h>
|
||||||
@ -845,11 +842,7 @@ xmlHasFeature(xmlFeature feature)
|
|||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
case XML_WITH_CATALOG:
|
case XML_WITH_CATALOG:
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
return(1);
|
|
||||||
#else
|
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
|
||||||
case XML_WITH_XPATH:
|
case XML_WITH_XPATH:
|
||||||
#ifdef LIBXML_XPATH_ENABLED
|
#ifdef LIBXML_XPATH_ENABLED
|
||||||
return(1);
|
return(1);
|
||||||
@ -4829,68 +4822,6 @@ xmlParsePITarget(xmlParserCtxtPtr ctxt) {
|
|||||||
return(name);
|
return(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
/**
|
|
||||||
* xmlParseCatalogPI:
|
|
||||||
* @ctxt: an XML parser context
|
|
||||||
* @catalog: the PI value string
|
|
||||||
*
|
|
||||||
* parse an XML Catalog Processing Instruction.
|
|
||||||
*
|
|
||||||
* <?oasis-xml-catalog catalog="http://example.com/catalog.xml"?>
|
|
||||||
*
|
|
||||||
* Occurs only if allowed by the user and if happening in the Misc
|
|
||||||
* part of the document before any doctype informations
|
|
||||||
* This will add the given catalog to the parsing context in order
|
|
||||||
* to be used if there is a resolution need further down in the document
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
xmlParseCatalogPI(xmlParserCtxtPtr ctxt, const xmlChar *catalog) {
|
|
||||||
xmlChar *URL = NULL;
|
|
||||||
const xmlChar *tmp, *base;
|
|
||||||
xmlChar marker;
|
|
||||||
|
|
||||||
tmp = catalog;
|
|
||||||
while (IS_BLANK_CH(*tmp)) tmp++;
|
|
||||||
if (xmlStrncmp(tmp, BAD_CAST"catalog", 7))
|
|
||||||
goto error;
|
|
||||||
tmp += 7;
|
|
||||||
while (IS_BLANK_CH(*tmp)) tmp++;
|
|
||||||
if (*tmp != '=') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
tmp++;
|
|
||||||
while (IS_BLANK_CH(*tmp)) tmp++;
|
|
||||||
marker = *tmp;
|
|
||||||
if ((marker != '\'') && (marker != '"'))
|
|
||||||
goto error;
|
|
||||||
tmp++;
|
|
||||||
base = tmp;
|
|
||||||
while ((*tmp != 0) && (*tmp != marker)) tmp++;
|
|
||||||
if (*tmp == 0)
|
|
||||||
goto error;
|
|
||||||
URL = xmlStrndup(base, tmp - base);
|
|
||||||
tmp++;
|
|
||||||
while (IS_BLANK_CH(*tmp)) tmp++;
|
|
||||||
if (*tmp != 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
if (URL != NULL) {
|
|
||||||
ctxt->catalogs = xmlCatalogAddLocal(ctxt->catalogs, URL);
|
|
||||||
xmlFree(URL);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
error:
|
|
||||||
xmlWarningMsg(ctxt, XML_WAR_CATALOG_PI,
|
|
||||||
"Catalog PI syntax error: %s\n",
|
|
||||||
catalog, NULL);
|
|
||||||
if (URL != NULL)
|
|
||||||
xmlFree(URL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlParsePI:
|
* xmlParsePI:
|
||||||
* @ctxt: an XML parser context
|
* @ctxt: an XML parser context
|
||||||
@ -4999,17 +4930,6 @@ xmlParsePI(xmlParserCtxtPtr ctxt) {
|
|||||||
}
|
}
|
||||||
SKIP(2);
|
SKIP(2);
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
if (((state == XML_PARSER_MISC) ||
|
|
||||||
(state == XML_PARSER_START)) &&
|
|
||||||
(xmlStrEqual(target, XML_CATALOG_PI))) {
|
|
||||||
xmlCatalogAllow allow = xmlCatalogGetDefaults();
|
|
||||||
if ((allow == XML_CATA_ALLOW_DOCUMENT) ||
|
|
||||||
(allow == XML_CATA_ALLOW_ALL))
|
|
||||||
xmlParseCatalogPI(ctxt, buf);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SAX: PI detected.
|
* SAX: PI detected.
|
||||||
@ -14176,9 +14096,6 @@ xmlCleanupParser(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
xmlCleanupCharEncodingHandlers();
|
xmlCleanupCharEncodingHandlers();
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
xmlCatalogCleanup();
|
|
||||||
#endif
|
|
||||||
xmlDictCleanup();
|
xmlDictCleanup();
|
||||||
xmlCleanupInputCallbacks();
|
xmlCleanupInputCallbacks();
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
@ -14303,10 +14220,6 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt)
|
|||||||
ctxt->attsSpecial = NULL;
|
ctxt->attsSpecial = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
if (ctxt->catalogs != NULL)
|
|
||||||
xmlCatalogFreeLocal(ctxt->catalogs);
|
|
||||||
#endif
|
|
||||||
if (ctxt->lastError.code != XML_ERR_OK)
|
if (ctxt->lastError.code != XML_ERR_OK)
|
||||||
xmlResetError(&ctxt->lastError);
|
xmlResetError(&ctxt->lastError);
|
||||||
}
|
}
|
||||||
|
@ -49,9 +49,6 @@
|
|||||||
#include <libxml/uri.h>
|
#include <libxml/uri.h>
|
||||||
#include <libxml/dict.h>
|
#include <libxml/dict.h>
|
||||||
#include <libxml/SAX.h>
|
#include <libxml/SAX.h>
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
#include <libxml/catalog.h>
|
|
||||||
#endif
|
|
||||||
#include <libxml/globals.h>
|
#include <libxml/globals.h>
|
||||||
#include <libxml/chvalid.h>
|
#include <libxml/chvalid.h>
|
||||||
|
|
||||||
@ -1840,10 +1837,6 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
|
|||||||
if (ctxt->lastError.str3 != NULL)
|
if (ctxt->lastError.str3 != NULL)
|
||||||
xmlFree(ctxt->lastError.str3);
|
xmlFree(ctxt->lastError.str3);
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
if (ctxt->catalogs != NULL)
|
|
||||||
xmlCatalogFreeLocal(ctxt->catalogs);
|
|
||||||
#endif
|
|
||||||
xmlFree(ctxt);
|
xmlFree(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,9 +90,6 @@
|
|||||||
#include <libxml/uri.h>
|
#include <libxml/uri.h>
|
||||||
#include <libxml/nanohttp.h>
|
#include <libxml/nanohttp.h>
|
||||||
#include <libxml/xmlerror.h>
|
#include <libxml/xmlerror.h>
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
#include <libxml/catalog.h>
|
|
||||||
#endif
|
|
||||||
#include <libxml/globals.h>
|
#include <libxml/globals.h>
|
||||||
|
|
||||||
/* #define VERBOSE_FAILURE */
|
/* #define VERBOSE_FAILURE */
|
||||||
@ -2977,84 +2974,6 @@ static int xmlNoNetExists(const char *URL) {
|
|||||||
return xmlCheckFilename(path);
|
return xmlCheckFilename(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlResolveResourceFromCatalog:
|
|
||||||
* @URL: the URL for the entity to load
|
|
||||||
* @ID: the System ID for the entity to load
|
|
||||||
* @ctxt: the context in which the entity is called or NULL
|
|
||||||
*
|
|
||||||
* Resolves the URL and ID against the appropriate catalog.
|
|
||||||
* This function is used by xmlDefaultExternalEntityLoader and
|
|
||||||
* xmlNoNetExternalEntityLoader.
|
|
||||||
*
|
|
||||||
* Returns a new allocated URL, or NULL.
|
|
||||||
*/
|
|
||||||
static xmlChar *
|
|
||||||
xmlResolveResourceFromCatalog(const char *URL, const char *ID,
|
|
||||||
xmlParserCtxtPtr ctxt) {
|
|
||||||
xmlChar *resource = NULL;
|
|
||||||
xmlCatalogAllow pref;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If the resource doesn't exists as a file,
|
|
||||||
* try to load it from the resource pointed in the catalogs
|
|
||||||
*/
|
|
||||||
pref = xmlCatalogGetDefaults();
|
|
||||||
|
|
||||||
if ((pref != XML_CATA_ALLOW_NONE) && (!xmlNoNetExists(URL))) {
|
|
||||||
/*
|
|
||||||
* Do a local lookup
|
|
||||||
*/
|
|
||||||
if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
|
|
||||||
((pref == XML_CATA_ALLOW_ALL) ||
|
|
||||||
(pref == XML_CATA_ALLOW_DOCUMENT))) {
|
|
||||||
resource = xmlCatalogLocalResolve(ctxt->catalogs,
|
|
||||||
(const xmlChar *)ID,
|
|
||||||
(const xmlChar *)URL);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Try a global lookup
|
|
||||||
*/
|
|
||||||
if ((resource == NULL) &&
|
|
||||||
((pref == XML_CATA_ALLOW_ALL) ||
|
|
||||||
(pref == XML_CATA_ALLOW_GLOBAL))) {
|
|
||||||
resource = xmlCatalogResolve((const xmlChar *)ID,
|
|
||||||
(const xmlChar *)URL);
|
|
||||||
}
|
|
||||||
if ((resource == NULL) && (URL != NULL))
|
|
||||||
resource = xmlStrdup((const xmlChar *) URL);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* TODO: do an URI lookup on the reference
|
|
||||||
*/
|
|
||||||
if ((resource != NULL) && (!xmlNoNetExists((const char *)resource))) {
|
|
||||||
xmlChar *tmp = NULL;
|
|
||||||
|
|
||||||
if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
|
|
||||||
((pref == XML_CATA_ALLOW_ALL) ||
|
|
||||||
(pref == XML_CATA_ALLOW_DOCUMENT))) {
|
|
||||||
tmp = xmlCatalogLocalResolveURI(ctxt->catalogs, resource);
|
|
||||||
}
|
|
||||||
if ((tmp == NULL) &&
|
|
||||||
((pref == XML_CATA_ALLOW_ALL) ||
|
|
||||||
(pref == XML_CATA_ALLOW_GLOBAL))) {
|
|
||||||
tmp = xmlCatalogResolveURI(resource);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tmp != NULL) {
|
|
||||||
xmlFree(resource);
|
|
||||||
resource = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return resource;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlDefaultExternalEntityLoader:
|
* xmlDefaultExternalEntityLoader:
|
||||||
* @URL: the URL for the entity to load
|
* @URL: the URL for the entity to load
|
||||||
@ -3084,9 +3003,6 @@ xmlDefaultExternalEntityLoader(const char *URL, const char *ID,
|
|||||||
ctxt->options = options;
|
ctxt->options = options;
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (resource == NULL)
|
if (resource == NULL)
|
||||||
resource = (xmlChar *) URL;
|
resource = (xmlChar *) URL;
|
||||||
@ -3183,10 +3099,6 @@ xmlNoNetExternalEntityLoader(const char *URL, const char *ID,
|
|||||||
xmlParserInputPtr input = NULL;
|
xmlParserInputPtr input = NULL;
|
||||||
xmlChar *resource = NULL;
|
xmlChar *resource = NULL;
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (resource == NULL)
|
if (resource == NULL)
|
||||||
resource = (xmlChar *) URL;
|
resource = (xmlChar *) URL;
|
||||||
|
|
||||||
|
@ -1,614 +0,0 @@
|
|||||||
/*
|
|
||||||
* xmlcatalog.c : a small utility program to handle XML catalogs
|
|
||||||
*
|
|
||||||
* See Copyright for the status of this software.
|
|
||||||
*
|
|
||||||
* daniel@veillard.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "libxml.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_STDLIB_H
|
|
||||||
#include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBREADLINE
|
|
||||||
#include <readline/readline.h>
|
|
||||||
#ifdef HAVE_LIBHISTORY
|
|
||||||
#include <readline/history.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <libxml/xmlmemory.h>
|
|
||||||
#include <libxml/uri.h>
|
|
||||||
#include <libxml/catalog.h>
|
|
||||||
#include <libxml/parser.h>
|
|
||||||
#include <libxml/globals.h>
|
|
||||||
|
|
||||||
#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
|
|
||||||
static int shell = 0;
|
|
||||||
static int sgml = 0;
|
|
||||||
static int noout = 0;
|
|
||||||
static int create = 0;
|
|
||||||
static int add = 0;
|
|
||||||
static int del = 0;
|
|
||||||
static int convert = 0;
|
|
||||||
static int no_super_update = 0;
|
|
||||||
static int verbose = 0;
|
|
||||||
static char *filename = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef XML_SGML_DEFAULT_CATALOG
|
|
||||||
#define XML_SGML_DEFAULT_CATALOG "/etc/sgml/catalog"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* *
|
|
||||||
* Shell Interface *
|
|
||||||
* *
|
|
||||||
************************************************************************/
|
|
||||||
/**
|
|
||||||
* xmlShellReadline:
|
|
||||||
* @prompt: the prompt value
|
|
||||||
*
|
|
||||||
* Read a string
|
|
||||||
*
|
|
||||||
* Returns a pointer to it or NULL on EOF the caller is expected to
|
|
||||||
* free the returned string.
|
|
||||||
*/
|
|
||||||
static char *
|
|
||||||
xmlShellReadline(const char *prompt) {
|
|
||||||
#ifdef HAVE_LIBREADLINE
|
|
||||||
char *line_read;
|
|
||||||
|
|
||||||
/* Get a line from the user. */
|
|
||||||
line_read = readline (prompt);
|
|
||||||
|
|
||||||
/* If the line has any text in it, save it on the history. */
|
|
||||||
if (line_read && *line_read)
|
|
||||||
add_history (line_read);
|
|
||||||
|
|
||||||
return (line_read);
|
|
||||||
#else
|
|
||||||
char line_read[501];
|
|
||||||
char *ret;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
if (prompt != NULL)
|
|
||||||
fprintf(stdout, "%s", prompt);
|
|
||||||
if (!fgets(line_read, 500, stdin))
|
|
||||||
return(NULL);
|
|
||||||
line_read[500] = 0;
|
|
||||||
len = strlen(line_read);
|
|
||||||
ret = (char *) malloc(len + 1);
|
|
||||||
if (ret != NULL) {
|
|
||||||
memcpy (ret, line_read, len + 1);
|
|
||||||
}
|
|
||||||
return(ret);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void usershell(void) {
|
|
||||||
char *cmdline = NULL, *cur;
|
|
||||||
int nbargs;
|
|
||||||
char command[100];
|
|
||||||
char arg[400];
|
|
||||||
char *argv[20];
|
|
||||||
int i, ret;
|
|
||||||
xmlChar *ans;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
cmdline = xmlShellReadline("> ");
|
|
||||||
if (cmdline == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Parse the command itself
|
|
||||||
*/
|
|
||||||
cur = cmdline;
|
|
||||||
nbargs = 0;
|
|
||||||
while ((*cur == ' ') || (*cur == '\t')) cur++;
|
|
||||||
i = 0;
|
|
||||||
while ((*cur != ' ') && (*cur != '\t') &&
|
|
||||||
(*cur != '\n') && (*cur != '\r')) {
|
|
||||||
if (*cur == 0)
|
|
||||||
break;
|
|
||||||
command[i++] = *cur++;
|
|
||||||
}
|
|
||||||
command[i] = 0;
|
|
||||||
if (i == 0) {
|
|
||||||
free(cmdline);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Parse the argument string
|
|
||||||
*/
|
|
||||||
memset(arg, 0, sizeof(arg));
|
|
||||||
while ((*cur == ' ') || (*cur == '\t')) cur++;
|
|
||||||
i = 0;
|
|
||||||
while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
|
|
||||||
if (*cur == 0)
|
|
||||||
break;
|
|
||||||
arg[i++] = *cur++;
|
|
||||||
}
|
|
||||||
arg[i] = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Parse the arguments
|
|
||||||
*/
|
|
||||||
i = 0;
|
|
||||||
nbargs = 0;
|
|
||||||
cur = arg;
|
|
||||||
memset(argv, 0, sizeof(argv));
|
|
||||||
while (*cur != 0) {
|
|
||||||
while ((*cur == ' ') || (*cur == '\t')) cur++;
|
|
||||||
if (*cur == '\'') {
|
|
||||||
cur++;
|
|
||||||
argv[i] = cur;
|
|
||||||
while ((*cur != 0) && (*cur != '\'')) cur++;
|
|
||||||
if (*cur == '\'') {
|
|
||||||
*cur = 0;
|
|
||||||
nbargs++;
|
|
||||||
i++;
|
|
||||||
cur++;
|
|
||||||
}
|
|
||||||
} else if (*cur == '"') {
|
|
||||||
cur++;
|
|
||||||
argv[i] = cur;
|
|
||||||
while ((*cur != 0) && (*cur != '"')) cur++;
|
|
||||||
if (*cur == '"') {
|
|
||||||
*cur = 0;
|
|
||||||
nbargs++;
|
|
||||||
i++;
|
|
||||||
cur++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
argv[i] = cur;
|
|
||||||
while ((*cur != 0) && (*cur != ' ') && (*cur != '\t'))
|
|
||||||
cur++;
|
|
||||||
*cur = 0;
|
|
||||||
nbargs++;
|
|
||||||
i++;
|
|
||||||
cur++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* start interpreting the command
|
|
||||||
*/
|
|
||||||
if (!strcmp(command, "exit"))
|
|
||||||
break;
|
|
||||||
if (!strcmp(command, "quit"))
|
|
||||||
break;
|
|
||||||
if (!strcmp(command, "bye"))
|
|
||||||
break;
|
|
||||||
if (!strcmp(command, "public")) {
|
|
||||||
if (nbargs != 1) {
|
|
||||||
printf("public requires 1 arguments\n");
|
|
||||||
} else {
|
|
||||||
ans = xmlCatalogResolvePublic((const xmlChar *) argv[0]);
|
|
||||||
if (ans == NULL) {
|
|
||||||
printf("No entry for PUBLIC %s\n", argv[0]);
|
|
||||||
} else {
|
|
||||||
printf("%s\n", (char *) ans);
|
|
||||||
xmlFree(ans);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!strcmp(command, "system")) {
|
|
||||||
if (nbargs != 1) {
|
|
||||||
printf("system requires 1 arguments\n");
|
|
||||||
} else {
|
|
||||||
ans = xmlCatalogResolveSystem((const xmlChar *) argv[0]);
|
|
||||||
if (ans == NULL) {
|
|
||||||
printf("No entry for SYSTEM %s\n", argv[0]);
|
|
||||||
} else {
|
|
||||||
printf("%s\n", (char *) ans);
|
|
||||||
xmlFree(ans);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!strcmp(command, "add")) {
|
|
||||||
if (sgml) {
|
|
||||||
if ((nbargs != 3) && (nbargs != 2)) {
|
|
||||||
printf("add requires 2 or 3 arguments\n");
|
|
||||||
} else {
|
|
||||||
if (argv[2] == NULL)
|
|
||||||
ret = xmlCatalogAdd(BAD_CAST argv[0], NULL,
|
|
||||||
BAD_CAST argv[1]);
|
|
||||||
else
|
|
||||||
ret = xmlCatalogAdd(BAD_CAST argv[0], BAD_CAST argv[1],
|
|
||||||
BAD_CAST argv[2]);
|
|
||||||
if (ret != 0)
|
|
||||||
printf("add command failed\n");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ((nbargs != 3) && (nbargs != 2)) {
|
|
||||||
printf("add requires 2 or 3 arguments\n");
|
|
||||||
} else {
|
|
||||||
if (argv[2] == NULL)
|
|
||||||
ret = xmlCatalogAdd(BAD_CAST argv[0], NULL,
|
|
||||||
BAD_CAST argv[1]);
|
|
||||||
else
|
|
||||||
ret = xmlCatalogAdd(BAD_CAST argv[0], BAD_CAST argv[1],
|
|
||||||
BAD_CAST argv[2]);
|
|
||||||
if (ret != 0)
|
|
||||||
printf("add command failed\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!strcmp(command, "del")) {
|
|
||||||
if (nbargs != 1) {
|
|
||||||
printf("del requires 1\n");
|
|
||||||
} else {
|
|
||||||
ret = xmlCatalogRemove(BAD_CAST argv[0]);
|
|
||||||
if (ret <= 0)
|
|
||||||
printf("del command failed\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
} else if (!strcmp(command, "resolve")) {
|
|
||||||
if (nbargs != 2) {
|
|
||||||
printf("resolve requires 2 arguments\n");
|
|
||||||
} else {
|
|
||||||
ans = xmlCatalogResolve(BAD_CAST argv[0],
|
|
||||||
BAD_CAST argv[1]);
|
|
||||||
if (ans == NULL) {
|
|
||||||
printf("Resolver failed to find an answer\n");
|
|
||||||
} else {
|
|
||||||
printf("%s\n", (char *) ans);
|
|
||||||
xmlFree(ans);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!strcmp(command, "dump")) {
|
|
||||||
if (nbargs != 0) {
|
|
||||||
printf("dump has no arguments\n");
|
|
||||||
} else {
|
|
||||||
xmlCatalogDump(stdout);
|
|
||||||
}
|
|
||||||
} else if (!strcmp(command, "debug")) {
|
|
||||||
if (nbargs != 0) {
|
|
||||||
printf("debug has no arguments\n");
|
|
||||||
} else {
|
|
||||||
verbose++;
|
|
||||||
xmlCatalogSetDebug(verbose);
|
|
||||||
}
|
|
||||||
} else if (!strcmp(command, "quiet")) {
|
|
||||||
if (nbargs != 0) {
|
|
||||||
printf("quiet has no arguments\n");
|
|
||||||
} else {
|
|
||||||
if (verbose > 0)
|
|
||||||
verbose--;
|
|
||||||
xmlCatalogSetDebug(verbose);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (strcmp(command, "help")) {
|
|
||||||
printf("Unrecognized command %s\n", command);
|
|
||||||
}
|
|
||||||
printf("Commands available:\n");
|
|
||||||
printf("\tpublic PublicID: make a PUBLIC identifier lookup\n");
|
|
||||||
printf("\tsystem SystemID: make a SYSTEM identifier lookup\n");
|
|
||||||
printf("\tresolve PublicID SystemID: do a full resolver lookup\n");
|
|
||||||
printf("\tadd 'type' 'orig' 'replace' : add an entry\n");
|
|
||||||
printf("\tdel 'values' : remove values\n");
|
|
||||||
printf("\tdump: print the current catalog state\n");
|
|
||||||
printf("\tdebug: increase the verbosity level\n");
|
|
||||||
printf("\tquiet: decrease the verbosity level\n");
|
|
||||||
printf("\texit: quit the shell\n");
|
|
||||||
}
|
|
||||||
free(cmdline); /* not xmlFree here ! */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* *
|
|
||||||
* Main *
|
|
||||||
* *
|
|
||||||
************************************************************************/
|
|
||||||
static void usage(const char *name) {
|
|
||||||
/* split into 2 printf's to avoid overly long string (gcc warning) */
|
|
||||||
printf("\
|
|
||||||
Usage : %s [options] catalogfile entities...\n\
|
|
||||||
\tParse the catalog file and query it for the entities\n\
|
|
||||||
\t--sgml : handle SGML Super catalogs for --add and --del\n\
|
|
||||||
\t--shell : run a shell allowing interactive queries\n\
|
|
||||||
\t--create : create a new catalog\n\
|
|
||||||
\t--add 'type' 'orig' 'replace' : add an XML entry\n\
|
|
||||||
\t--add 'entry' : add an SGML entry\n", name);
|
|
||||||
printf("\
|
|
||||||
\t--del 'values' : remove values\n\
|
|
||||||
\t--noout: avoid dumping the result on stdout\n\
|
|
||||||
\t used with --add or --del, it saves the catalog changes\n\
|
|
||||||
\t and with --sgml it automatically updates the super catalog\n\
|
|
||||||
\t--no-super-update: do not update the SGML super catalog\n\
|
|
||||||
\t-v --verbose : provide debug informations\n");
|
|
||||||
}
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
int i;
|
|
||||||
int ret;
|
|
||||||
int exit_value = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (argc <= 1) {
|
|
||||||
usage(argv[0]);
|
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
LIBXML_TEST_VERSION
|
|
||||||
for (i = 1; i < argc ; i++) {
|
|
||||||
if (!strcmp(argv[i], "-"))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (argv[i][0] != '-')
|
|
||||||
break;
|
|
||||||
if ((!strcmp(argv[i], "-verbose")) ||
|
|
||||||
(!strcmp(argv[i], "-v")) ||
|
|
||||||
(!strcmp(argv[i], "--verbose"))) {
|
|
||||||
verbose++;
|
|
||||||
xmlCatalogSetDebug(verbose);
|
|
||||||
} else if ((!strcmp(argv[i], "-noout")) ||
|
|
||||||
(!strcmp(argv[i], "--noout"))) {
|
|
||||||
noout = 1;
|
|
||||||
} else if ((!strcmp(argv[i], "-shell")) ||
|
|
||||||
(!strcmp(argv[i], "--shell"))) {
|
|
||||||
shell++;
|
|
||||||
noout = 1;
|
|
||||||
} else if ((!strcmp(argv[i], "-sgml")) ||
|
|
||||||
(!strcmp(argv[i], "--sgml"))) {
|
|
||||||
sgml++;
|
|
||||||
} else if ((!strcmp(argv[i], "-create")) ||
|
|
||||||
(!strcmp(argv[i], "--create"))) {
|
|
||||||
create++;
|
|
||||||
} else if ((!strcmp(argv[i], "-convert")) ||
|
|
||||||
(!strcmp(argv[i], "--convert"))) {
|
|
||||||
convert++;
|
|
||||||
} else if ((!strcmp(argv[i], "-no-super-update")) ||
|
|
||||||
(!strcmp(argv[i], "--no-super-update"))) {
|
|
||||||
no_super_update++;
|
|
||||||
} else if ((!strcmp(argv[i], "-add")) ||
|
|
||||||
(!strcmp(argv[i], "--add"))) {
|
|
||||||
if (sgml)
|
|
||||||
i += 2;
|
|
||||||
else
|
|
||||||
i += 3;
|
|
||||||
add++;
|
|
||||||
} else if ((!strcmp(argv[i], "-del")) ||
|
|
||||||
(!strcmp(argv[i], "--del"))) {
|
|
||||||
i += 1;
|
|
||||||
del++;
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "Unknown option %s\n", argv[i]);
|
|
||||||
usage(argv[0]);
|
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
|
||||||
if ((!strcmp(argv[i], "-add")) ||
|
|
||||||
(!strcmp(argv[i], "--add"))) {
|
|
||||||
if (sgml)
|
|
||||||
i += 2;
|
|
||||||
else
|
|
||||||
i += 3;
|
|
||||||
continue;
|
|
||||||
} else if ((!strcmp(argv[i], "-del")) ||
|
|
||||||
(!strcmp(argv[i], "--del"))) {
|
|
||||||
i += 1;
|
|
||||||
|
|
||||||
/* No catalog entry specified */
|
|
||||||
if (i == argc || (sgml && i + 1 == argc)) {
|
|
||||||
fprintf(stderr, "No catalog entry specified to remove from\n");
|
|
||||||
usage (argv[0]);
|
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
} else if (argv[i][0] == '-')
|
|
||||||
continue;
|
|
||||||
filename = argv[i];
|
|
||||||
ret = xmlLoadCatalog(argv[i]);
|
|
||||||
if ((ret < 0) && (create)) {
|
|
||||||
xmlCatalogAdd(BAD_CAST "catalog", BAD_CAST argv[i], NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert)
|
|
||||||
ret = xmlCatalogConvert();
|
|
||||||
|
|
||||||
if ((add) || (del)) {
|
|
||||||
for (i = 1; i < argc ; i++) {
|
|
||||||
if (!strcmp(argv[i], "-"))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (argv[i][0] != '-')
|
|
||||||
continue;
|
|
||||||
if (strcmp(argv[i], "-add") && strcmp(argv[i], "--add") &&
|
|
||||||
strcmp(argv[i], "-del") && strcmp(argv[i], "--del"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (sgml) {
|
|
||||||
/*
|
|
||||||
* Maintenance of SGML catalogs.
|
|
||||||
*/
|
|
||||||
xmlCatalogPtr catal = NULL;
|
|
||||||
xmlCatalogPtr super = NULL;
|
|
||||||
|
|
||||||
catal = xmlLoadSGMLSuperCatalog(argv[i + 1]);
|
|
||||||
|
|
||||||
if ((!strcmp(argv[i], "-add")) ||
|
|
||||||
(!strcmp(argv[i], "--add"))) {
|
|
||||||
if (catal == NULL)
|
|
||||||
catal = xmlNewCatalog(1);
|
|
||||||
xmlACatalogAdd(catal, BAD_CAST "CATALOG",
|
|
||||||
BAD_CAST argv[i + 2], NULL);
|
|
||||||
|
|
||||||
if (!no_super_update) {
|
|
||||||
super = xmlLoadSGMLSuperCatalog(XML_SGML_DEFAULT_CATALOG);
|
|
||||||
if (super == NULL)
|
|
||||||
super = xmlNewCatalog(1);
|
|
||||||
|
|
||||||
xmlACatalogAdd(super, BAD_CAST "CATALOG",
|
|
||||||
BAD_CAST argv[i + 1], NULL);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (catal != NULL)
|
|
||||||
ret = xmlACatalogRemove(catal, BAD_CAST argv[i + 2]);
|
|
||||||
else
|
|
||||||
ret = -1;
|
|
||||||
if (ret < 0) {
|
|
||||||
fprintf(stderr, "Failed to remove entry from %s\n",
|
|
||||||
argv[i + 1]);
|
|
||||||
exit_value = 1;
|
|
||||||
}
|
|
||||||
if ((!no_super_update) && (noout) && (catal != NULL) &&
|
|
||||||
(xmlCatalogIsEmpty(catal))) {
|
|
||||||
super = xmlLoadSGMLSuperCatalog(
|
|
||||||
XML_SGML_DEFAULT_CATALOG);
|
|
||||||
if (super != NULL) {
|
|
||||||
ret = xmlACatalogRemove(super,
|
|
||||||
BAD_CAST argv[i + 1]);
|
|
||||||
if (ret < 0) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"Failed to remove entry from %s\n",
|
|
||||||
XML_SGML_DEFAULT_CATALOG);
|
|
||||||
exit_value = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (noout) {
|
|
||||||
FILE *out;
|
|
||||||
|
|
||||||
if (xmlCatalogIsEmpty(catal)) {
|
|
||||||
remove(argv[i + 1]);
|
|
||||||
} else {
|
|
||||||
out = fopen(argv[i + 1], "w");
|
|
||||||
if (out == NULL) {
|
|
||||||
fprintf(stderr, "could not open %s for saving\n",
|
|
||||||
argv[i + 1]);
|
|
||||||
exit_value = 2;
|
|
||||||
noout = 0;
|
|
||||||
} else {
|
|
||||||
xmlACatalogDump(catal, out);
|
|
||||||
fclose(out);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!no_super_update && super != NULL) {
|
|
||||||
if (xmlCatalogIsEmpty(super)) {
|
|
||||||
remove(XML_SGML_DEFAULT_CATALOG);
|
|
||||||
} else {
|
|
||||||
out = fopen(XML_SGML_DEFAULT_CATALOG, "w");
|
|
||||||
if (out == NULL) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"could not open %s for saving\n",
|
|
||||||
XML_SGML_DEFAULT_CATALOG);
|
|
||||||
exit_value = 2;
|
|
||||||
noout = 0;
|
|
||||||
} else {
|
|
||||||
|
|
||||||
xmlACatalogDump(super, out);
|
|
||||||
fclose(out);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
xmlACatalogDump(catal, stdout);
|
|
||||||
}
|
|
||||||
i += 2;
|
|
||||||
} else {
|
|
||||||
if ((!strcmp(argv[i], "-add")) ||
|
|
||||||
(!strcmp(argv[i], "--add"))) {
|
|
||||||
if ((argv[i + 3] == NULL) || (argv[i + 3][0] == 0))
|
|
||||||
ret = xmlCatalogAdd(BAD_CAST argv[i + 1], NULL,
|
|
||||||
BAD_CAST argv[i + 2]);
|
|
||||||
else
|
|
||||||
ret = xmlCatalogAdd(BAD_CAST argv[i + 1],
|
|
||||||
BAD_CAST argv[i + 2],
|
|
||||||
BAD_CAST argv[i + 3]);
|
|
||||||
if (ret != 0) {
|
|
||||||
printf("add command failed\n");
|
|
||||||
exit_value = 3;
|
|
||||||
}
|
|
||||||
i += 3;
|
|
||||||
} else if ((!strcmp(argv[i], "-del")) ||
|
|
||||||
(!strcmp(argv[i], "--del"))) {
|
|
||||||
ret = xmlCatalogRemove(BAD_CAST argv[i + 1]);
|
|
||||||
if (ret < 0) {
|
|
||||||
fprintf(stderr, "Failed to remove entry %s\n",
|
|
||||||
argv[i + 1]);
|
|
||||||
exit_value = 1;
|
|
||||||
}
|
|
||||||
i += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (shell) {
|
|
||||||
usershell();
|
|
||||||
} else {
|
|
||||||
for (i++; i < argc; i++) {
|
|
||||||
xmlURIPtr uri;
|
|
||||||
xmlChar *ans;
|
|
||||||
|
|
||||||
uri = xmlParseURI(argv[i]);
|
|
||||||
if (uri == NULL) {
|
|
||||||
ans = xmlCatalogResolvePublic((const xmlChar *) argv[i]);
|
|
||||||
if (ans == NULL) {
|
|
||||||
printf("No entry for PUBLIC %s\n", argv[i]);
|
|
||||||
exit_value = 4;
|
|
||||||
} else {
|
|
||||||
printf("%s\n", (char *) ans);
|
|
||||||
xmlFree(ans);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
xmlFreeURI(uri);
|
|
||||||
ans = xmlCatalogResolveSystem((const xmlChar *) argv[i]);
|
|
||||||
if (ans == NULL) {
|
|
||||||
printf("No entry for SYSTEM %s\n", argv[i]);
|
|
||||||
ans = xmlCatalogResolveURI ((const xmlChar *) argv[i]);
|
|
||||||
if (ans == NULL) {
|
|
||||||
printf ("No entry for URI %s\n", argv[i]);
|
|
||||||
exit_value = 4;
|
|
||||||
} else {
|
|
||||||
printf("%s\n", (char *) ans);
|
|
||||||
xmlFree (ans);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
printf("%s\n", (char *) ans);
|
|
||||||
xmlFree(ans);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((!sgml) && ((add) || (del) || (create) || (convert))) {
|
|
||||||
if (noout && filename && *filename) {
|
|
||||||
FILE *out;
|
|
||||||
|
|
||||||
out = fopen(filename, "w");
|
|
||||||
if (out == NULL) {
|
|
||||||
fprintf(stderr, "could not open %s for saving\n", filename);
|
|
||||||
exit_value = 2;
|
|
||||||
noout = 0;
|
|
||||||
} else {
|
|
||||||
xmlCatalogDump(out);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
xmlCatalogDump(stdout);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Cleanup and check for memory leaks
|
|
||||||
*/
|
|
||||||
xmlCleanupParser();
|
|
||||||
xmlMemoryDump();
|
|
||||||
return(exit_value);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|
||||||
fprintf(stderr, "libxml was not compiled with catalog and output support\n");
|
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
#endif
|
|
@ -80,9 +80,6 @@
|
|||||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||||
#include <libxml/xinclude.h>
|
#include <libxml/xinclude.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
#include <libxml/catalog.h>
|
|
||||||
#endif
|
|
||||||
#include <libxml/globals.h>
|
#include <libxml/globals.h>
|
||||||
#include <libxml/xmlreader.h>
|
#include <libxml/xmlreader.h>
|
||||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||||
@ -172,10 +169,6 @@ static xmllintReturnCode progresult = XMLLINT_RETURN_OK;
|
|||||||
static int timing = 0;
|
static int timing = 0;
|
||||||
static int generate = 0;
|
static int generate = 0;
|
||||||
static int dropdtd = 0;
|
static int dropdtd = 0;
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
static int catalogs = 0;
|
|
||||||
static int nocatalogs = 0;
|
|
||||||
#endif
|
|
||||||
#ifdef LIBXML_C14N_ENABLED
|
#ifdef LIBXML_C14N_ENABLED
|
||||||
static int canonical = 0;
|
static int canonical = 0;
|
||||||
static int canonical_11 = 0;
|
static int canonical_11 = 0;
|
||||||
@ -2838,12 +2831,6 @@ static void usage(const char *name) {
|
|||||||
#endif /* LIBXML_C14N_ENABLED */
|
#endif /* LIBXML_C14N_ENABLED */
|
||||||
printf("\t--nsclean : remove redundant namespace declarations\n");
|
printf("\t--nsclean : remove redundant namespace declarations\n");
|
||||||
printf("\t--testIO : test user I/O support\n");
|
printf("\t--testIO : test user I/O support\n");
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
printf("\t--catalogs : use SGML catalogs from $SGML_CATALOG_FILES\n");
|
|
||||||
printf("\t otherwise XML Catalogs starting from \n");
|
|
||||||
printf("\t %s are activated by default\n", XML_XML_DEFAULT_CATALOG);
|
|
||||||
printf("\t--nocatalogs: deactivate all catalogs\n");
|
|
||||||
#endif
|
|
||||||
printf("\t--auto : generate a small doc on the fly\n");
|
printf("\t--auto : generate a small doc on the fly\n");
|
||||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||||
printf("\t--xinclude : do XInclude processing\n");
|
printf("\t--xinclude : do XInclude processing\n");
|
||||||
@ -3088,15 +3075,6 @@ main(int argc, char **argv) {
|
|||||||
exc_canonical++;
|
exc_canonical++;
|
||||||
options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD;
|
options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
else if ((!strcmp(argv[i], "-catalogs")) ||
|
|
||||||
(!strcmp(argv[i], "--catalogs"))) {
|
|
||||||
catalogs++;
|
|
||||||
} else if ((!strcmp(argv[i], "-nocatalogs")) ||
|
|
||||||
(!strcmp(argv[i], "--nocatalogs"))) {
|
|
||||||
nocatalogs++;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
else if ((!strcmp(argv[i], "-encode")) ||
|
else if ((!strcmp(argv[i], "-encode")) ||
|
||||||
(!strcmp(argv[i], "--encode"))) {
|
(!strcmp(argv[i], "--encode"))) {
|
||||||
@ -3224,20 +3202,6 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
|
||||||
if (nocatalogs == 0) {
|
|
||||||
if (catalogs) {
|
|
||||||
const char *catal;
|
|
||||||
|
|
||||||
catal = getenv("SGML_CATALOG_FILES");
|
|
||||||
if (catal != NULL) {
|
|
||||||
xmlLoadCatalogs(catal);
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "Variable $SGML_CATALOG_FILES not set\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
#ifdef LIBXML_SAX1_ENABLED
|
||||||
if (sax1)
|
if (sax1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user