summaryrefslogtreecommitdiffstats
path: root/tclxml/include/tclxml-libxml2
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-01-02 20:21:27 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-01-02 20:21:27 (GMT)
commit62d64d9d13ee541e11854265c2817e540f50b59a (patch)
tree0b07fb95ebdc8de3e700226b1210a34c98759748 /tclxml/include/tclxml-libxml2
parent8f5c6286538d2f0c762edeacf21f85eeeed1fe0b (diff)
parent73444843b18bba4a07922722b11ac3a7fe32a11b (diff)
downloadblt-62d64d9d13ee541e11854265c2817e540f50b59a.zip
blt-62d64d9d13ee541e11854265c2817e540f50b59a.tar.gz
blt-62d64d9d13ee541e11854265c2817e540f50b59a.tar.bz2
Merge commit '73444843b18bba4a07922722b11ac3a7fe32a11b' as 'tclxml'
Diffstat (limited to 'tclxml/include/tclxml-libxml2')
-rw-r--r--tclxml/include/tclxml-libxml2/docObj.h60
-rw-r--r--tclxml/include/tclxml-libxml2/tclxml-libxml2.h100
-rw-r--r--tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h163
3 files changed, 323 insertions, 0 deletions
diff --git a/tclxml/include/tclxml-libxml2/docObj.h b/tclxml/include/tclxml-libxml2/docObj.h
new file mode 100644
index 0000000..aaffb2e
--- /dev/null
+++ b/tclxml/include/tclxml-libxml2/docObj.h
@@ -0,0 +1,60 @@
+/* docObj.h --
+ *
+ * This module manages libxml2 xmlDocPtr Tcl objects.
+ *
+ * Copyright (c) 2003 Zveno Pty Ltd
+ * http://www.zveno.com/
+ *
+ * Zveno Pty Ltd makes this software and associated documentation
+ * available free of charge for any purpose. You may make copies
+ * of the software but you must include all of this notice on any copy.
+ *
+ * Zveno Pty Ltd does not warrant that this software is error free
+ * or fit for any purpose. Zveno Pty Ltd disclaims any liability for
+ * all claims, expenses, losses, damages and costs any user may incur
+ * as a result of using, copying or modifying the software.
+ *
+ * $Id: docObj.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $
+ */
+
+#ifndef TCLXML_LIBXML2_DOCOBJ_H
+#define TCLXML_LIBXML2_DOCOBJ_H
+
+#ifdef TCLXML_BUILD_AS_FRAMEWORK
+#include <Tcl/tcl.h>
+#else
+#include <tcl.h>
+#endif /* TCLXML_BUILD_AS_FRAMEWORK */
+#include <libxml/tree.h>
+
+typedef void (TclXML_libxml2Doc_FreeHookProc) _ANSI_ARGS_((ClientData clientData));
+
+/*
+ * Values that define how documents are handled:
+ * KEEP means that documents must be explicitly destroyed,
+ * IMPLICIT means that documents will be destroyed when there are no longer
+ * any references to it.
+ */
+
+typedef enum TclXML_libxml2_DocumentHandling {
+ TCLXML_LIBXML2_DOCUMENT_KEEP,
+ TCLXML_LIBXML2_DOCUMENT_IMPLICIT
+} TclXML_libxml2_DocumentHandling;
+
+typedef struct TclXML_libxml2_Document {
+ xmlDocPtr docPtr;
+
+ char *token; /* string rep of this document */
+
+ TclXML_libxml2_DocumentHandling keep;
+ /* how to handle document destruction */
+
+ void *objs; /* List of Tcl_Obj's that reference this document */
+
+ ClientData dom; /* Hook for TclDOM data */
+ TclXML_libxml2Doc_FreeHookProc *domfree;
+ ClientData apphook; /* Application hook - not used by TclXML or TclDOM */
+ TclXML_libxml2Doc_FreeHookProc *appfree;
+} TclXML_libxml2_Document;
+
+#endif /* TCLXML_LIBXML2_DOCOBJ_H */
diff --git a/tclxml/include/tclxml-libxml2/tclxml-libxml2.h b/tclxml/include/tclxml-libxml2/tclxml-libxml2.h
new file mode 100644
index 0000000..22050f4
--- /dev/null
+++ b/tclxml/include/tclxml-libxml2/tclxml-libxml2.h
@@ -0,0 +1,100 @@
+/* tcllibxml2.h --
+ *
+ * This module provides an interface to libxml2.
+ *
+ * Copyright (c) 2005 Explain
+ * http://www.explain.com.au/
+ * Copyright (c) 2003 Zveno Pty Ltd
+ * http://www.zveno.com/
+ *
+ * See the file "LICENSE" for information on usage and
+ * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tclxml-libxml2.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $
+ */
+
+#ifndef TCLXML_LIBXML2_H
+#define TCLXML_LIBXML2_H
+
+#include <tclxml/tclxml.h>
+#include <libxml/tree.h>
+#include "docObj.h"
+
+/*
+ * For C++ compilers, use extern "C"
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * These macros are used to control whether functions are being declared for
+ * import or export in Windows,
+ * They map to no-op declarations on non-Windows systems.
+ * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
+ * The default build on windows is for a DLL, which causes the DLLIMPORT
+ * and DLLEXPORT macros to be nonempty. To build a static library, the
+ * macro STATIC_BUILD should be defined before the inclusion of tcl.h
+ *
+ * If a function is being declared while it is being built
+ * to be included in a shared library, then it should have the DLLEXPORT
+ * storage class. If is being declared for use by a module that is going to
+ * link against the shared library, then it should have the DLLIMPORT storage
+ * class. If the symbol is beind declared for a static build or for use from a
+ * stub library, then the storage class should be empty.
+ *
+ * The convention is that a macro called BUILD_xxxx, where xxxx is the
+ * name of a library we are building, is set on the compile line for sources
+ * that are to be placed in the library. When this macro is set, the
+ * storage class will be set to DLLEXPORT. At the end of the header file, the
+ * storage class will be reset to DLLIMPORt.
+ */
+
+#undef TCL_STORAGE_CLASS
+#ifdef BUILD_TclXML_libxml2
+# define TCL_STORAGE_CLASS DLLEXPORT
+#else
+# ifdef USE_TCL_STUBS
+# define TCL_STORAGE_CLASS
+# else
+# define TCL_STORAGE_CLASS DLLIMPORT
+# endif
+#endif
+
+/*
+ * The following function is required to be defined in all stubs aware
+ * extensions of TclXML/libxml2. The function is actually implemented in the stub
+ * library, not the main TclXML/libxml2 library, although there is a trivial
+ * implementation in the main library in case an extension is statically
+ * linked into an application.
+ */
+
+EXTERN CONST char * TclXML_libxml2_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *version, int exact));
+
+#ifndef USE_TCLXML_LIBXML2_STUBS
+
+/*
+ * When not using stubs, make it a macro.
+ */
+
+#define TclXML_libxml2_InitStubs(interp, version, exact) \
+ Tcl_PkgRequire(interp, "xml::libxml2", version, exact)
+
+#endif
+
+/*
+ * Accessor functions => Stubs
+ */
+
+#include <tclxml-libxml2/tclxml-libxml2Decls.h>
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TCLXML_LIBXML2_H */
diff --git a/tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h b/tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h
new file mode 100644
index 0000000..187b159
--- /dev/null
+++ b/tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h
@@ -0,0 +1,163 @@
+/*
+ * tclxml-libxml2Decls.h --
+ *
+ * Declarations of functions in the platform independent public TCLXML/libxml2 API.
+ *
+ */
+
+#ifndef _TCLXMLLIBXML2DECLS
+#define _TCLXMLLIBXML2DECLS
+
+/*
+ * WARNING: The contents of this file is automatically generated by the
+ * genStubs.tcl script. Any modifications to the function declarations
+ * below should be made in the tcllibxml2.decls script.
+ */
+
+#include "docObj.h"
+#include <libxml/xmlerror.h>
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+/* 0 */
+EXTERN int Tclxml_libxml2_Init _ANSI_ARGS_((Tcl_Interp * interp));
+/* Slot 1 is reserved */
+/* 2 */
+EXTERN int TclXML_libxml2_InitDocObj _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 3 */
+EXTERN Tcl_Obj * TclXML_libxml2_NewDocObj _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 4 */
+EXTERN Tcl_Obj * TclXML_libxml2_CreateObjFromDoc _ANSI_ARGS_((
+ xmlDocPtr docPtr));
+/* 5 */
+EXTERN int TclXML_libxml2_GetDocFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ xmlDocPtr * docPtr));
+/* 6 */
+EXTERN int TclXML_libxml2_GetTclDocFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ TclXML_libxml2_Document ** tDocPtrPtr));
+/* 7 */
+EXTERN int TclXML_libxml2_GetTclDocFromNode _ANSI_ARGS_((
+ Tcl_Interp * interp, xmlNodePtr nodePtr,
+ TclXML_libxml2_Document ** tDocPtrPtr));
+/* 8 */
+EXTERN void TclXML_libxml2_DestroyDocument _ANSI_ARGS_((
+ TclXML_libxml2_Document * tDocPtr));
+/* 9 */
+EXTERN void TclXML_libxml2_DocKeep _ANSI_ARGS_((Tcl_Obj * objPtr,
+ TclXML_libxml2_DocumentHandling keep));
+/* 10 */
+EXTERN void TclXML_libxml2_ErrorHandler _ANSI_ARGS_((void * ctx,
+ xmlErrorPtr error));
+/* 11 */
+EXTERN void TclXML_libxml2_ResetError _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 12 */
+EXTERN Tcl_Obj * TclXML_libxml2_GetErrorObj _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 13 */
+EXTERN void TclXML_libxml2_SetErrorNodeFunc _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ TclXML_ErrorNodeHandlerProc * proc));
+
+typedef struct Tclxml_libxml2Stubs {
+ int magic;
+ struct Tclxml_libxml2StubHooks *hooks;
+
+ int (*tclxml_libxml2_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 0 */
+ void *reserved1;
+ int (*tclXML_libxml2_InitDocObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 2 */
+ Tcl_Obj * (*tclXML_libxml2_NewDocObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 3 */
+ Tcl_Obj * (*tclXML_libxml2_CreateObjFromDoc) _ANSI_ARGS_((xmlDocPtr docPtr)); /* 4 */
+ int (*tclXML_libxml2_GetDocFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, xmlDocPtr * docPtr)); /* 5 */
+ int (*tclXML_libxml2_GetTclDocFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, TclXML_libxml2_Document ** tDocPtrPtr)); /* 6 */
+ int (*tclXML_libxml2_GetTclDocFromNode) _ANSI_ARGS_((Tcl_Interp * interp, xmlNodePtr nodePtr, TclXML_libxml2_Document ** tDocPtrPtr)); /* 7 */
+ void (*tclXML_libxml2_DestroyDocument) _ANSI_ARGS_((TclXML_libxml2_Document * tDocPtr)); /* 8 */
+ void (*tclXML_libxml2_DocKeep) _ANSI_ARGS_((Tcl_Obj * objPtr, TclXML_libxml2_DocumentHandling keep)); /* 9 */
+ void (*tclXML_libxml2_ErrorHandler) _ANSI_ARGS_((void * ctx, xmlErrorPtr error)); /* 10 */
+ void (*tclXML_libxml2_ResetError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 11 */
+ Tcl_Obj * (*tclXML_libxml2_GetErrorObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 12 */
+ void (*tclXML_libxml2_SetErrorNodeFunc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_ErrorNodeHandlerProc * proc)); /* 13 */
+} Tclxml_libxml2Stubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern Tclxml_libxml2Stubs *tclxml_libxml2StubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TCLXML_LIBXML2_STUBS) && !defined(USE_TCLXML_LIBXML2_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifndef Tclxml_libxml2_Init
+#define Tclxml_libxml2_Init \
+ (tclxml_libxml2StubsPtr->tclxml_libxml2_Init) /* 0 */
+#endif
+/* Slot 1 is reserved */
+#ifndef TclXML_libxml2_InitDocObj
+#define TclXML_libxml2_InitDocObj \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_InitDocObj) /* 2 */
+#endif
+#ifndef TclXML_libxml2_NewDocObj
+#define TclXML_libxml2_NewDocObj \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_NewDocObj) /* 3 */
+#endif
+#ifndef TclXML_libxml2_CreateObjFromDoc
+#define TclXML_libxml2_CreateObjFromDoc \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_CreateObjFromDoc) /* 4 */
+#endif
+#ifndef TclXML_libxml2_GetDocFromObj
+#define TclXML_libxml2_GetDocFromObj \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_GetDocFromObj) /* 5 */
+#endif
+#ifndef TclXML_libxml2_GetTclDocFromObj
+#define TclXML_libxml2_GetTclDocFromObj \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_GetTclDocFromObj) /* 6 */
+#endif
+#ifndef TclXML_libxml2_GetTclDocFromNode
+#define TclXML_libxml2_GetTclDocFromNode \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_GetTclDocFromNode) /* 7 */
+#endif
+#ifndef TclXML_libxml2_DestroyDocument
+#define TclXML_libxml2_DestroyDocument \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_DestroyDocument) /* 8 */
+#endif
+#ifndef TclXML_libxml2_DocKeep
+#define TclXML_libxml2_DocKeep \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_DocKeep) /* 9 */
+#endif
+#ifndef TclXML_libxml2_ErrorHandler
+#define TclXML_libxml2_ErrorHandler \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_ErrorHandler) /* 10 */
+#endif
+#ifndef TclXML_libxml2_ResetError
+#define TclXML_libxml2_ResetError \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_ResetError) /* 11 */
+#endif
+#ifndef TclXML_libxml2_GetErrorObj
+#define TclXML_libxml2_GetErrorObj \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_GetErrorObj) /* 12 */
+#endif
+#ifndef TclXML_libxml2_SetErrorNodeFunc
+#define TclXML_libxml2_SetErrorNodeFunc \
+ (tclxml_libxml2StubsPtr->tclXML_libxml2_SetErrorNodeFunc) /* 13 */
+#endif
+
+#endif /* defined(USE_TCLXML_LIBXML2_STUBS) && !defined(USE_TCLXML_LIBXML2_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#endif /* _TCLXMLLLIBXML2DECLS */
+