aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/swig
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/swig')
-rw-r--r--bindings/swig/Makefile21
-rw-r--r--bindings/swig/Makefile.swig578
-rw-r--r--bindings/swig/listkey.i91
-rw-r--r--bindings/swig/localemgr.i22
-rw-r--r--bindings/swig/lzsscompress.i11
-rw-r--r--bindings/swig/rawcom.i13
-rw-r--r--bindings/swig/rawgenbook.i13
-rw-r--r--bindings/swig/rawld.i12
-rw-r--r--bindings/swig/rawld4.i12
-rw-r--r--bindings/swig/rawtext.i11
-rw-r--r--bindings/swig/swcom.i9
-rw-r--r--bindings/swig/swcompress.i16
-rw-r--r--bindings/swig/swconfig.i42
-rw-r--r--bindings/swig/swfiltermgr.i21
-rw-r--r--bindings/swig/swgenbook.i10
-rw-r--r--bindings/swig/swig-perl.doxygen177
-rw-r--r--bindings/swig/swkey.i69
-rw-r--r--bindings/swig/swld.i10
-rw-r--r--bindings/swig/swmgr.i41
-rw-r--r--bindings/swig/swmodule.i99
-rw-r--r--bindings/swig/sword.i50
-rw-r--r--bindings/swig/sword.pl101
-rw-r--r--bindings/swig/swposition.i14
-rw-r--r--bindings/swig/swtext.i10
-rw-r--r--bindings/swig/treekey.i47
-rw-r--r--bindings/swig/treekeyidx.i53
-rw-r--r--bindings/swig/versekey.i51
-rw-r--r--bindings/swig/zcom.i11
-rw-r--r--bindings/swig/zipcompress.i11
-rw-r--r--bindings/swig/zld.i12
-rw-r--r--bindings/swig/ztext.i12
31 files changed, 1650 insertions, 0 deletions
diff --git a/bindings/swig/Makefile b/bindings/swig/Makefile
new file mode 100644
index 0000000..a1dca13
--- /dev/null
+++ b/bindings/swig/Makefile
@@ -0,0 +1,21 @@
+TOP = $(PWD)
+SWIG = swig
+SWIGOPT = -Wall -proxy
+CXXSRCS =
+TARGET = sword
+INTERFACE = sword.i
+LIBS = -lm -lz -lsword
+INCLUDE = -I$(TOP)/../../include/
+
+all::
+ $(MAKE) -f $(TOP)/Makefile.swig CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ TARGET='$(TARGET)' SWIGOPT='$(SWIGOPT)' INTERFACE='$(INTERFACE)' LIBS='$(LIBS)' INCLUDE='$(INCLUDE)' perl5_cpp
+
+static::
+ $(MAKE) -f $(TOP)/Makefile.swig CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ TARGET='myperl' INTERFACE='$(INTERFACE)' INCLUDE='$INCLUDE' perl5_cpp_static
+
+clean::
+ rm -f *_wrap* *.o *~ *.so myperl *.pyc .~* core
+
+check: all
diff --git a/bindings/swig/Makefile.swig b/bindings/swig/Makefile.swig
new file mode 100644
index 0000000..736488c
--- /dev/null
+++ b/bindings/swig/Makefile.swig
@@ -0,0 +1,578 @@
+# Generated automatically from Makefile.in by configure.
+# ------------------------------------------------------------
+# SWIG Examples Makefile
+#
+# This file is used by the examples to build modules. Assuming
+# you ran configure, this file will probably work. However,
+# it's not perfect so you might need to do some hand tweaking.
+#
+# Other notes:
+#
+# 1. Take a look at the prefixes below. Since SWIG works with
+# multiple target languages, you may need to find out where
+# certain packages have been installed. Set the prefixes
+# accordingly.
+#
+# 2. To use this makefile, simply set SRCS, INTERFACE, INCLUDE, LIBS,
+# TARGET, and do a
+# $(MAKE) -f Makefile.template.in SRCS='$(SRCS)' \
+# INCLUDE='$(INCLUDE) LIBS='$(LIBS)' INTERFACE='$(INTERFACE)' \
+# TARGET='$(TARGET)' method
+#
+# 'method' describes what is being built.
+#---------------------------------------------------------------
+
+TARGET =
+CC = gcc
+CXX = c++
+CFLAGS =
+prefix = /usr/local
+exec_prefix= ${prefix}
+SRCS =
+INCLUDE =
+LIBS =
+INTERFACE =
+SWIGOPT =
+SWIG = swig
+RUNTIMEDIR = $(exec_prefix)/lib
+
+LIBM = -lieee -lm
+LIBC =
+LIBCRYPT = -lcrypt
+SYSLIBS = $(LIBM) $(LIBC) $(LIBCRYPT)
+
+libtool_comp = $(TOP)/../Tools/libtool --mode compile
+libtool_link = $(TOP)/../Tools/libtool --mode link
+
+# X11 options
+
+XLIB = -L/usr/X11R6/lib -lX11
+XINCLUDE = -I/usr/X11R6/include
+
+IWRAP = $(INTERFACE:.i=_wrap.i)
+ISRCS = $(IWRAP:.i=.c)
+ICXXSRCS = $(IWRAP:.i=.cxx)
+IOBJS = $(IWRAP:.i=.o)
+
+##################################################################
+# Dynamic loading for C++
+# If you are going to be building dynamic loadable modules in C++,
+# you may need to edit this line appropriately.
+#
+# This line works for g++, but I'm not sure what it might be
+# for other C++ compilers
+##################################################################
+
+CPP_DLLIBS = #-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
+ -L/usr/local/lib -lg++ -lstdc++ -lgcc
+
+# Solaris workshop 5.0
+# CPP_DLLIBS = -L/opt/SUNWspro/lib -lCrun
+
+# Symbols used for using shared libraries
+SO= .so
+LDSHARED= gcc -shared
+CCSHARED= -fpic
+CXXSHARED= gcc -shared
+
+# This is used for building shared libraries with a number of C++
+# compilers. If it doesn't work, comment it out.
+CXXSHARED= c++ -shared
+
+OBJS = $(SRCS:.c=.o) $(CXXSRCS:.cxx=.o)
+
+##################################################################
+##### Tcl/Tk ######
+##################################################################
+
+# Set these to your local copy of Tcl/Tk.
+
+TCL_INCLUDE =
+TCL_LIB =
+TCL_OPTS = -ldl
+TK_OPTS = -ltk -ltcl -ldl
+
+# Extra Tcl specific dynamic linking options
+TCL_DLNK =
+
+# -----------------------------------------------------------
+# Build a new version of the tclsh shell
+# -----------------------------------------------------------
+
+
+tclsh: $(SRCS)
+ $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACE)
+ $(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE) \
+ $(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
+
+tclsh_cpp: $(SRCS)
+ $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACE)
+ $(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE) \
+ $(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
+
+# -----------------------------------------------------------
+# Build a new copy of wish
+# -----------------------------------------------------------
+
+wish: $(SRCS)
+ $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACE)
+ $(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE) \
+ $(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET)
+
+
+wish_cpp: $(SRCS)
+ $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACE)
+ $(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE) \
+ $(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET)
+
+# -----------------------------------------------------------
+# Build a Tcl dynamic loadable module (you might need to tweak this)
+# -----------------------------------------------------------
+
+tcl: $(SRCS)
+ $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(SO)
+
+# -----------------------------------------------------------
+# Build a Tcl7.5 dynamic loadable module for C++
+# -----------------------------------------------------------
+
+tcl_cpp: $(SRCS)
+ $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
+
+# -----------------------------------------------------------
+# Build a Tcl7.5 dynamic loadable module, linked against SWIG runtime lib
+# -----------------------------------------------------------
+
+TCL_RUNTIME=-L$(RUNTIMEDIR) -lswigtcl8
+
+tcl_multi: $(SRCS)
+ $(SWIG) -c -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(SO)
+
+tcl_multi_cpp: $(SRCS)
+ $(SWIG) -c -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
+
+##################################################################
+##### PERL 5 ######
+##################################################################
+
+# You need to set this variable to the Perl5 directory containing the
+# files "perl.h", "EXTERN.h" and "XSUB.h". With Perl5.003, it's
+# usually something like /usr/local/lib/perl5/arch-osname/5.003/CORE.
+
+PERL5_INCLUDE= /usr/lib/perl5/5.6.1/i586-linux/CORE
+
+# Extra Perl specific dynamic linking options
+PERL5_DLNK =
+
+# ----------------------------------------------------------------
+# Build a Perl5 dynamically loadable module (C)
+# ----------------------------------------------------------------
+
+perl5: $(SRCS)
+ $(SWIG) -perl5 $(SWIGOPT) $(INTERFACE)
+ $(CC) -c -Dbool=char $(CCSHARED) $(CFLAGS) -DSWIG $(SRCS) $(ISRCS) $(INCLUDE) -I$(PERL5_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(PERL5_DLNK) $(LIBS) -o $(TARGET)$(SO)
+
+# ----------------------------------------------------------------
+# Build a Perl5 dynamically loadable module (C++)
+# ----------------------------------------------------------------
+
+perl5_cpp: $(SRCS)
+ $(SWIG) -perl5 -c++ $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) -DSWIG -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) -I$(PERL5_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
+
+# ----------------------------------------------------------------
+# Build a Perl5 dynamically loadable module, linked against SWIG runtime lib
+# ----------------------------------------------------------------
+
+PERL5_RUNTIME=-L$(RUNTIMEDIR) -lswigpl
+
+perl5_multi: $(SRCS)
+ $(SWIG) -c -perl5 $(SWIGOPT) $(INTERFACE)
+ $(CC) -c -DSWIG -Dbool=char $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) -I$(PERL5_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(PERL5_RUNTIME) $(PERL5_DLNK) $(LIBS) -o $(TARGET)$(SO)
+
+perl5_multi_cpp: $(SRCS)
+ $(SWIG) -c -perl5 -c++ $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) -DSWIG -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) -I$(PERL5_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(PERL5_RUNTIME) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
+
+# ----------------------------------------------------------------
+# Build a module from existing XS C source code. (ie. from xsubpp).
+# ----------------------------------------------------------------
+perl5_xs: $(SRCS)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(INCLUDE) -I$(PERL5_INCLUDE)
+ $(LDSHARED) $(OBJS) $(LIBS) -o $(TARGET)$(SO)
+
+# ----------------------------------------------------------------
+# Build a statically linked Perl5 executable
+# ----------------------------------------------------------------
+
+PERL5_LIB = -L$(PERL5_INCLUDE) -lperl.so -ldl $(SYSLIBS)
+
+perl5_static: $(SRCS)
+ $(SWIG) -perl5 -static -lperlmain.i $(SWIGOPT) $(INTERFACE)
+ $(CC) $(CFLAGS) -Dbool=char $(SRCS) $(ISRCS) $(INCLUDE) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
+
+perl5_static_cpp: $(SRCS)
+ $(SWIG) -perl5 -c++ -static -lperlmain.i $(SWIGOPT) $(INTERFACE)
+ $(CXX) $(CFLAGS) -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
+
+
+##################################################################
+##### PYTHON ######
+##################################################################
+
+# Make sure these locate your Python installation
+PYTHON_INCLUDE= -DHAVE_CONFIG_H
+PYTHON_LIB =
+
+# Extra Python specific dynamic linking options
+PYTHON_DLNK =
+
+# ----------------------------------------------------------------
+# Build a C dynamically loadable module
+# ----------------------------------------------------------------
+
+python: $(SRCS)
+ $(SWIG) -python $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(PYTHON_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) -o $(TARGET)module$(SO)
+
+# -----------------------------------------------------------------
+# Build a C++ dynamically loadable module
+# -----------------------------------------------------------------
+
+python_cpp: $(SRCS)
+ $(SWIG) -c++ -python $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(PYTHON_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)module$(SO)
+
+# -----------------------------------------------------------------
+# Build a dynamically loadable module, linked against SWIG Runtime lib
+# -----------------------------------------------------------------
+
+PYTHON_RUNTIME=-L$(RUNTIMEDIR) -lswigpy
+
+python_multi: $(SRCS)
+ $(SWIG) -c -python $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(PYTHON_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(PYTHON_RUNTIME) $(PYTHON_DLNK) $(LIBS) -o $(TARGET)module$(SO)
+
+python_multi_cpp: $(SRCS)
+ $(SWIG) -c -c++ -python $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(PYTHON_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(PYTHON_RUNTIME) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)module$(SO)
+
+
+# -----------------------------------------------------------------
+# Build statically linked Python interpreter
+#
+# These should only be used in conjunction with the %include embed.i
+# library file
+# -----------------------------------------------------------------
+
+#TKINTER = -L/usr/X11R6.3/lib -L/usr/local/compat/lib -ltk4.0 -ltcl7.4 -lX11
+TKINTER =
+PYTHON_LIBOPTS = -lpython2.2 -ldl $(TKINTER) $(SYSLIBS)
+
+python_static: $(SRCS)
+ $(SWIG) -python -lembed.i $(SWIGOPT) $(INTERFACE)
+ $(CC) $(CFLAGS) -Xlinker -export-dynamic $(ISRCS) $(SRCS) $(INCLUDE) \
+ $(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
+
+python_static_cpp: $(SRCS)
+ $(SWIG) -c++ -python -lembed.i $(SWIGOPT) $(INTERFACE)
+ $(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \
+ $(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
+
+# -----------------------------------------------------------------
+# Cleaning the python examples
+# -----------------------------------------------------------------
+
+python_clean:
+ rm -f *_wrap* *.o *~ *$(SO) mypython *.pyc .~* core
+
+##################################################################
+##### GUILE ######
+##################################################################
+
+# Make sure these locate your Guile installation
+GUILE_INCLUDE =
+GUILE_LIB =
+
+# ----------------------------------------------------------------
+# Build a C dynamically loadable module
+# ----------------------------------------------------------------
+
+guile: $(SRCS)
+ $(SWIG) -guile -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ISRCS) $(SRCS)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o lib$(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Build a C++ dynamically loadable module
+# -----------------------------------------------------------------
+
+guile_cpp: $(SRCS)
+ $(SWIG) -c++ -guile -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Build a dynamically loadable module with passive linkage
+# -----------------------------------------------------------------
+
+guile_passive: $(SRCS)
+ $(SWIG) -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ISRCS) $(SRCS)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o lib$(TARGET)$(SO)
+
+guile_passive_cpp: $(SRCS)
+ $(SWIG) -c++ -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Build a dynamically loadable module with passive linkage,
+# linked against SWIG runtime lib
+# -----------------------------------------------------------------
+
+GUILE_RUNTIME=-L$(RUNTIMEDIR) -lswigguile
+
+guile_passive_multi: $(SRCS)
+ $(SWIG) -c -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ISRCS) $(SRCS)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(GUILE_RUNTIME) $(LIBS) -o lib$(TARGET)$(SO)
+
+guile_passive_multi_cpp: $(SRCS)
+ $(SWIG) -c -c++ -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(GUILE_RUNTIME) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Build statically linked Guile interpreter
+# -----------------------------------------------------------------
+
+GUILE_LIBOPTS = -ldl $(SYSLIBS)
+
+guile_static: $(SRCS)
+ $(SWIG) -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
+ $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) \
+ -DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
+ $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
+
+guile_static_cpp: $(SRCS)
+ $(SWIG) -c++ -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
+ $(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \
+ -DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
+ $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
+
+guile_simple: $(SRCS)
+ $(SWIG) -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACE)
+ $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) \
+ $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
+
+guile_simple_cpp: $(SRCS)
+ $(SWIG) -c++ -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACE)
+ $(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \
+ $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
+
+##################################################################
+##### JAVA ######
+##################################################################
+
+# You need to set this variable to the java directories containing the
+# files "jni.h" and "md.h"
+# usually something like /usr/java/include and /usr/java/include/<arch-osname>.
+JAVA_INCLUDE=
+
+# Extra Java specific dynamic linking options
+JAVA_DLNK =
+JAVALIBPREFIX = lib
+
+# ----------------------------------------------------------------
+# Build a java dynamically loadable module (C)
+# ----------------------------------------------------------------
+
+java: $(SRCS)
+ $(SWIG) -java $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(JAVA_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
+
+# ----------------------------------------------------------------
+# Build a java dynamically loadable module (C++)
+# ----------------------------------------------------------------
+
+java_cpp: $(SRCS)
+ $(SWIG) -java -c++ $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(JAVA_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
+
+# ----------------------------------------------------------------
+# Build a java dynamically loadable module
+# ----------------------------------------------------------------
+
+java_multi: $(SRCS)
+ $(SWIG) -java $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(JAVA_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
+
+java_multi_cpp: $(SRCS)
+ $(SWIG) -java -c++ $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(JAVA_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Cleaning the java examples
+# -----------------------------------------------------------------
+
+java_clean:
+ mv main.java main.java.tmp
+ rm -f *_wrap* *.o core *~ *$(SO) *.class *.java
+ mv main.java.tmp main.java
+
+##################################################################
+##### MZSCHEME ######
+##################################################################
+
+MZC = test -n "" &&
+
+# ----------------------------------------------------------------
+# Build a C/C++ dynamically loadable module
+# ----------------------------------------------------------------
+
+mzscheme: $(SRCS)
+ $(SWIG) -mzscheme $(SWIGOPT) $(INTERFACE)
+ $(MZC) ++ccf "$(INCLUDE)" --cc $(ISRCS) $(SRCS)
+ $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS)
+
+mzscheme_cpp: $(SRCS)
+ $(SWIG) -mzscheme -c++ $(SWIGOPT) $(INTERFACE)
+ $(MZC) ++ccf "$(INCLUDE)" --cc $(ICXXSRCS) $(SRCS) $(CXXSRCS)
+ $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(CPP_DLLIBS)
+
+# ----------------------------------------------------------------
+# Build a dynamically loadable module, linked against SWIG runtime
+# ----------------------------------------------------------------
+
+MZSCHEME_RUNTIME=-L$(RUNTIMEDIR) -lswigmz
+
+mzscheme_multi: $(SRCS)
+ $(SWIG) -c -mzscheme $(SWIGOPT) $(INTERFACE)
+ $(MZC) ++ccf "$(INCLUDE)" --cc $(ISRCS) $(SRCS)
+ $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(MZSCHEME_RUNTIME)
+
+mzscheme_multi_cpp: $(SRCS)
+ $(SWIG) -c -mzscheme -c++ $(SWIGOPT) $(INTERFACE)
+ $(MZC) ++ccf "$(INCLUDE)" --cc $(ICXXSRCS) $(SRCS) $(CXXSRCS)
+ $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(MZSCHEME_RUNTIME) $(CPP_DLLIBS)
+
+##################################################################
+##### RUBY ######
+##################################################################
+
+# Make sure these locate your Ruby installation
+RUBY_CFLAGS= -DHAVE_CONFIG_H
+RUBY_INCLUDE= -I/usr/local/lib/ruby/1.4/arch
+RUBY_LIB = /usr/local/lib/ruby/1.4/arch
+RUBY_DLNK =
+
+# ----------------------------------------------------------------
+# Build a C dynamically loadable module
+# ----------------------------------------------------------------
+
+ruby: $(SRCS)
+ $(SWIG) -ruby $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(RUBY_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Build a C++ dynamically loadable module
+# -----------------------------------------------------------------
+
+ruby_cpp: $(SRCS)
+ $(SWIG) -c++ -ruby $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(RUBY_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Build a dynamically loadable module, linked against SWIG runtime lib
+# -----------------------------------------------------------------
+
+RUBY_RUNTIME=-L$(RUNTIMEDIR) -lswigrb
+
+ruby_multi: $(SRCS)
+ $(SWIG) -c -ruby $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(RUBY_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(RUBY_RUNTIME) $(RUBY_DLNK) $(LIBS) -o $(TARGET)$(SO)
+
+ruby_multi_cpp: $(SRCS)
+ $(SWIG) -c -c++ -ruby $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(RUBY_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(RUBY_RUNTIME) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
+
+# -----------------------------------------------------------------
+# Build statically linked Ruby interpreter
+#
+# These should only be used in conjunction with the %include embed.i
+# library file
+# -----------------------------------------------------------------
+
+RUBY_LIBOPTS = -lruby -lm -ldl $(SYSLIBS)
+
+ruby_static: $(SRCS)
+ $(SWIG) -ruby -lembed.i $(SWIGOPT) $(INTERFACE)
+ $(CC) $(CFLAGS) $(RUBY_CFLAGS) -Xlinker -export-dynamic $(ISRCS) $(SRCS) $(INCLUDE) \
+ $(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
+
+ruby_cpp_static: $(SRCS)
+ $(SWIG) -c++ -ruby -lembed.i $(SWIGOPT) $(INTERFACE)
+ $(CXX) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \
+ $(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
+
+
+# -------------------------------------------------------------------
+# Build a PHP4 dynamically loadable module (C)
+# -------------------------------------------------------------------
+
+PHP4_INCLUDE =
+
+php4: $(SRCS)
+ $(SWIG) -php4 $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(PHP4_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o $(TARGET)$(SO)
+
+# --------------------------------------------------------------------
+# Build a PHP4 dynamically loadable module (C++)
+# --------------------------------------------------------------------
+
+php4_cpp: $(SRCS)
+ $(SWIG) -php4 -c++ $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(PHP4_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
+
+# ---------------------------------------------------------------------
+# Build a dynamically loadable module, linked against SWIG Runtime lib
+# ---------------------------------------------------------------------
+
+PHP4_RUNTIME=-L$(RUNTIMEDIR) -lswigphp4
+
+php4_multi: $(SRCS)
+ $(SWIG) -c -php4 $(SWIGOPT) $(INTERFACE)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(PHP4_INCLUDE)
+ $(LDSHARED) $(OBJS) $(IOBJS) $(PHP4_RUNTIME) $(PHP4_DLNK) $(LIBS) -o $(TARGET)module$(SO)
+
+php4_multi_cpp: $(SRCS)
+ $(SWIG) -c -c++ -php4 $(SWIGOPT) $(INTERFACE)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(PHP4_INCLUDE)
+ $(CXXSHARED) $(OBJS) $(IOBJS) $(PHP4_RUNTIME) $(PHP4_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)module$(SO)
diff --git a/bindings/swig/listkey.i b/bindings/swig/listkey.i
new file mode 100644
index 0000000..945621f
--- /dev/null
+++ b/bindings/swig/listkey.i
@@ -0,0 +1,91 @@
+%{
+#include "listkey.h"
+%}
+
+class ListKey : public SWKey {
+public:
+ /** initializes instance of ListKey
+ *
+ * @param ikey text key
+ */
+ ListKey (const char *ikey = 0);
+ ListKey (ListKey const &k);
+
+ /** Cleans up instance of ListKey
+ */
+ virtual ~ ListKey ();
+
+ virtual SWKey *clone () const;
+
+ /** Clears out elements of list
+ */
+ virtual void ClearList ();
+
+ /** Returns number of elements in list
+ * @return number of elements in list
+ */
+ virtual int Count ();
+
+ /** Removes current element from list
+ */
+ virtual void Remove ();
+
+ /** Sets key to element number
+ *
+ * @param ielement element number to set to
+ * @return error status
+ */
+ //virtual char SetToElement (int ielement, SW_POSITION = TOP);
+%extend {
+ virtual char SetToElement(int element) {
+ self->SetToElement(element, TOP);
+ };
+}
+
+ /** Gets a key element number
+ *
+ * @param pos element number to get (or default current)
+ * @return Key or null on error
+ */
+ virtual SWKey* GetElement (int pos = -1);
+
+ /** Adds an element to the list
+ * @param ikey the element to add
+ */
+ //ListKey & operator << (const SWKey &ikey);
+ virtual void add(const SWKey &ikey);
+
+ /** Equates this ListKey to another ListKey object
+ *
+ * @param ikey other ListKey object
+ */
+ virtual void copyFrom(const ListKey & ikey);
+ //virtual void copyFrom(const SWKey & ikey) { SWKey::copyFrom(ikey); }
+
+ /** Positions this key
+ *
+ * @param p position
+ * @return *this
+ */
+ virtual void setPosition(SW_POSITION);
+
+ /** Decrements a number of elements
+ */
+ virtual void decrement(int step);
+
+ /** Increments a number of elements
+ */
+ virtual void increment(int step);
+
+ virtual char Traversable ();
+ virtual long Index () const;
+
+ /**
+ * Returns the index for the new one given as as parameter.
+ * The first parameter is the new index.
+ */
+ virtual long Index (long index);
+
+ //SWKEY_OPERATORS
+ //ListKey & operator =(const ListKey &key) { copyFrom(key); return *this; }
+};
diff --git a/bindings/swig/localemgr.i b/bindings/swig/localemgr.i
new file mode 100644
index 0000000..2b38350
--- /dev/null
+++ b/bindings/swig/localemgr.i
@@ -0,0 +1,22 @@
+%{
+#include <localemgr.h>
+%}
+
+typedef map < string, SWLocale *, less < string > >LocaleMap;
+
+class LocaleMgr {
+public:
+ LocaleMgr (const char *iConfigPath = 0);
+ virtual ~LocaleMgr ();
+ virtual SWLocale *getLocale (const char *name);
+ virtual list < string > getAvailableLocales ();
+ //virtual const char *translate (const char *name, const char *text);
+ virtual const char *getDefaultLocaleName();
+ virtual void setDefaultLocaleName (const char *name);
+
+%extend {
+ static LocaleMgr* const systemLocaleMgr() {
+ return &(LocaleMgr::systemLocaleMgr);
+ };
+}
+};
diff --git a/bindings/swig/lzsscompress.i b/bindings/swig/lzsscompress.i
new file mode 100644
index 0000000..5b6373c
--- /dev/null
+++ b/bindings/swig/lzsscompress.i
@@ -0,0 +1,11 @@
+%{
+ #include <lzsscomprs.h>
+%}
+
+class LZSSCompress : public SWCompress {
+public:
+ LZSSCompress ();
+ virtual ~ LZSSCompress ();
+ virtual void Encode (void);
+ virtual void Decode (void);
+}; \ No newline at end of file
diff --git a/bindings/swig/rawcom.i b/bindings/swig/rawcom.i
new file mode 100644
index 0000000..d158c86
--- /dev/null
+++ b/bindings/swig/rawcom.i
@@ -0,0 +1,13 @@
+%{
+ #include "rawcom.h"
+%}
+
+class RawCom : public SWCom {
+ RawCom (const char *ipath, const char *iname = 0, const char *idesc = 0,
+ SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
+ const char* ilang = 0);
+ virtual ~ RawCom ();
+
+ static char createModule (const char *path);
+};
+
diff --git a/bindings/swig/rawgenbook.i b/bindings/swig/rawgenbook.i
new file mode 100644
index 0000000..fa51e40
--- /dev/null
+++ b/bindings/swig/rawgenbook.i
@@ -0,0 +1,13 @@
+%{
+ #include "rawgenbook.h"
+%}
+
+class RawGenBook : public SWGenBook {
+public:
+ RawGenBook (const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~ RawGenBook ();
+
+ static char createModule (const char *ipath);
+};
+
+
diff --git a/bindings/swig/rawld.i b/bindings/swig/rawld.i
new file mode 100644
index 0000000..86c2066
--- /dev/null
+++ b/bindings/swig/rawld.i
@@ -0,0 +1,12 @@
+%{
+ #include "rawld.h"
+%}
+
+class RawLD : public SWLD {
+public:
+ RawLD (const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~RawLD ();
+
+ static char createModule (const char *path);
+};
+
diff --git a/bindings/swig/rawld4.i b/bindings/swig/rawld4.i
new file mode 100644
index 0000000..c09568e
--- /dev/null
+++ b/bindings/swig/rawld4.i
@@ -0,0 +1,12 @@
+%{
+ #include "rawld4.h"
+%}
+
+class RawLD4 : public SWLD {
+public:
+ RawLD4(const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~RawLD4();
+
+ static char createModule (const char *path);
+};
+
diff --git a/bindings/swig/rawtext.i b/bindings/swig/rawtext.i
new file mode 100644
index 0000000..099af8d
--- /dev/null
+++ b/bindings/swig/rawtext.i
@@ -0,0 +1,11 @@
+%{
+ #include "rawtext.h"
+%}
+
+class RawText : public SWText {
+public:
+ RawText (const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+
+ static char createModule (const char *path) { return RawVerse::createModule (path); }
+};
+
diff --git a/bindings/swig/swcom.i b/bindings/swig/swcom.i
new file mode 100644
index 0000000..6305209
--- /dev/null
+++ b/bindings/swig/swcom.i
@@ -0,0 +1,9 @@
+%{
+ #include "swcom.h"
+%}
+
+class SWCom : public SWModule {
+ SWCom(const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding enc = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup mark = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~SWCom();
+};
+
diff --git a/bindings/swig/swcompress.i b/bindings/swig/swcompress.i
new file mode 100644
index 0000000..79ccd7f
--- /dev/null
+++ b/bindings/swig/swcompress.i
@@ -0,0 +1,16 @@
+%{
+ #include <swcomprs.h>
+%}
+
+class SWCompress {
+public:
+ SWCompress();
+ virtual ~SWCompress();
+
+ virtual char *Buf (const char *buf = 0, unsigned long *len = 0);
+ virtual char *zBuf (unsigned long *len, char *buf = 0);
+ virtual unsigned long GetChars (char *buf, unsigned long len);
+ virtual unsigned long SendChars (char *buf, unsigned long len);
+ virtual void Encode (void);
+ virtual void Decode (void);
+};
diff --git a/bindings/swig/swconfig.i b/bindings/swig/swconfig.i
new file mode 100644
index 0000000..a934ffc
--- /dev/null
+++ b/bindings/swig/swconfig.i
@@ -0,0 +1,42 @@
+%{
+ #include <stdio.h>
+ #include <string>
+ #include <map>
+ #include <defs.h>
+ #include <multimapwdef.h>
+
+ #include "swconfig.h"
+%}
+
+%include "stl.i"
+%include "std_vector.i"
+%include "std_string.i"
+%include "typemaps.i"
+
+
+typedef multimapwithdefault < string, string, less < string > > ConfigEntMap;
+typedef map < string, ConfigEntMap, less < string > > SectionMap;
+
+class SWConfig {
+public:
+ //member data
+ string filename;
+ SectionMap Sections;
+
+ //member functions
+ SWConfig(const char *ifilename);
+ virtual ~ SWConfig();
+
+ virtual void Load();
+ virtual void Save();
+
+%extend {
+ void set(const char* group, const char* entry, const char* value) {
+ self->Sections[group][entry] = value;
+ };
+ const char* get(const char* group, const char* entry) {
+ return self->Sections[group][entry].c_str();
+ };
+}
+
+};
diff --git a/bindings/swig/swfiltermgr.i b/bindings/swig/swfiltermgr.i
new file mode 100644
index 0000000..6ec3d76
--- /dev/null
+++ b/bindings/swig/swfiltermgr.i
@@ -0,0 +1,21 @@
+%{
+#include <swfiltermgr.h>
+%}
+
+class SWFilterMgr {
+ SWFilterMgr ();
+ virtual ~SWFilterMgr ();
+
+ virtual void setParentMgr(SWMgr *parentMgr);
+ virtual SWMgr *getParentMgr();
+ virtual void AddGlobalOptions (SWModule * module, ConfigEntMap & section,
+ ConfigEntMap::iterator start,
+ ConfigEntMap::iterator end);
+ virtual void AddLocalOptions (SWModule * module, ConfigEntMap & section,
+ ConfigEntMap::iterator start,
+ ConfigEntMap::iterator end);
+ virtual void AddEncodingFilters (SWModule * module, ConfigEntMap & section);
+ virtual void AddRenderFilters (SWModule * module, ConfigEntMap & section);
+ virtual void AddStripFilters (SWModule * module, ConfigEntMap & section);
+ virtual void AddRawFilters (SWModule * module, ConfigEntMap & section);
+}; \ No newline at end of file
diff --git a/bindings/swig/swgenbook.i b/bindings/swig/swgenbook.i
new file mode 100644
index 0000000..fdf1b81
--- /dev/null
+++ b/bindings/swig/swgenbook.i
@@ -0,0 +1,10 @@
+%{
+ #include "swgenbook.h"
+%}
+
+class SWGenBook : public SWModule {
+protected:
+ SWGenBook(const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~SWGenBook();
+};
+
diff --git a/bindings/swig/swig-perl.doxygen b/bindings/swig/swig-perl.doxygen
new file mode 100644
index 0000000..2c2b650
--- /dev/null
+++ b/bindings/swig/swig-perl.doxygen
@@ -0,0 +1,177 @@
+# Doxyfile 0.1
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = SWIG-Perl
+PROJECT_NUMBER = 0.1
+OUTPUT_DIRECTORY = .
+OUTPUT_LANGUAGE = English
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = YES
+EXTRACT_LOCAL_CLASSES = YES
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+INTERNAL_DOCS = NO
+STRIP_CODE_COMMENTS = YES
+CASE_SENSE_NAMES = YES
+SHORT_NAMES = NO
+HIDE_SCOPE_NAMES = NO
+VERBATIM_HEADERS = YES
+SHOW_INCLUDE_FILES = YES
+JAVADOC_AUTOBRIEF = NO
+INHERIT_DOCS = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 8
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+ALIASES =
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+OPTIMIZE_OUTPUT_FOR_C = NO
+SHOW_USED_FILES = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT =
+FILE_PATTERNS = *.i
+RECURSIVE = NO
+EXCLUDE =
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = api-documentation
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+TEMPLATE_RELATIONS = YES
+HIDE_UNDOC_RELATIONS = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+GRAPHICAL_HIERARCHY = YES
+DOT_PATH =
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
+CGI_NAME = search.cgi
+CGI_URL =
+DOC_URL =
+DOC_ABSPATH =
+BIN_ABSPATH = /usr/local/bin/
+EXT_DOC_PATHS =
diff --git a/bindings/swig/swkey.i b/bindings/swig/swkey.i
new file mode 100644
index 0000000..1d12ce4
--- /dev/null
+++ b/bindings/swig/swkey.i
@@ -0,0 +1,69 @@
+%{
+ #include "swkey.h"
+%}
+
+class SW_POSITION {
+public:
+ SW_POSITION(char ipos);
+};
+
+#define POS_TOP ((char)1)
+#define POS_BOTTOM ((char)2)
+
+#define TOP SW_POSITION(POS_TOP)
+#define BOTTOM SW_POSITION(POS_BOTTOM)
+
+
+/**
+* The SWKey class for the SWIG-Perl interface.
+*/
+class SWKey {
+public:
+ SWKey(const char *ikey = 0);
+ //SWKey(SWKey const &k);
+ virtual SWKey *clone () const;
+
+ char Persist() const;
+
+%extend {
+
+ void setPersist(signed char persists) {
+ self->Persist(persists);
+ };
+
+}
+ virtual char Error ();
+
+ virtual void setText(const char *ikey);
+ virtual const char *getText() const;
+ virtual const char *getShortText() const;
+
+ virtual int compare (const SWKey & ikey);
+ virtual bool equals(const SWKey &ikey);
+ //virtual void setPosition(SW_POSITION);
+
+ virtual void decrement(int steps = 1);
+ virtual void increment(int steps = 1);
+ virtual char Traversable ();
+
+ virtual long Index() const;
+ //virtual long Index(long iindex);
+
+%extend {
+
+ /**
+ * Goes to the next key. Only useful for VerseKeys at the moment.
+ */
+ void next() {
+ (*self)++;
+ };
+ void prev() {
+ (*self)++;
+ };
+ void setKey(const SWKey* key) {
+ self->copyFrom(*key);
+ };
+
+}
+
+};
diff --git a/bindings/swig/swld.i b/bindings/swig/swld.i
new file mode 100644
index 0000000..698e147
--- /dev/null
+++ b/bindings/swig/swld.i
@@ -0,0 +1,10 @@
+%{
+ #include "swld.h"
+%}
+
+class SWLD : public SWModule {
+public:
+ SWLD (const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~ SWLD ();
+};
+
diff --git a/bindings/swig/swmgr.i b/bindings/swig/swmgr.i
new file mode 100644
index 0000000..a50c8fe
--- /dev/null
+++ b/bindings/swig/swmgr.i
@@ -0,0 +1,41 @@
+%{
+#include <swmgr.h>
+%}
+
+typedef map < string, SWModule *, less < string > > ModMap;
+typedef list < string > OptionsList;
+typedef map < string, SWFilter * > FilterMap;
+
+class SWMgr {
+public:
+//member data
+ static bool debug;
+ static const char *globalConfPath;
+ static void findConfig (char *configType, char **prefixPath, char **configPath);
+
+ SWConfig *config;
+ SWConfig *sysconfig;
+ ModMap Modules;
+ char *prefixPath;
+ char *configPath;
+
+//member functions
+ SWMgr (SWConfig* iconfig = 0, SWConfig* isysconfig = 0, bool autoload = true, SWFilterMgr* filterMgr = 0);
+// SWMgr (SWFilterMgr *filterMgr);
+// SWMgr (const char *iConfigPath, bool autoload = true, SWFilterMgr *filterMgr = 0);
+ virtual ~SWMgr();
+
+ virtual signed char Load ();
+ virtual void setGlobalOption (const char *option, const char *value);
+ virtual const char *getGlobalOption (const char *option);
+ virtual const char *getGlobalOptionTip (const char *option);
+ virtual OptionsList getGlobalOptions ();
+ virtual OptionsList getGlobalOptionValues (const char *option);
+ virtual signed char setCipherKey (const char *modName, const char *key);
+
+%extend {
+ SWModule* module(const char* modulename) {
+ return self->Modules[modulename];
+ };
+}
+};
diff --git a/bindings/swig/swmodule.i b/bindings/swig/swmodule.i
new file mode 100644
index 0000000..f65fd1b
--- /dev/null
+++ b/bindings/swig/swmodule.i
@@ -0,0 +1,99 @@
+%{
+ #include "swmodule.h"
+%}
+
+class SWModule {
+public:
+ bool terminateSearch;
+
+ SWModule (const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, char *imodtype = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* modlang = 0);
+ virtual char Error();
+ virtual const bool isUnicode() const;
+ virtual const ConfigEntMap& getConfig() const;
+ virtual const char *getConfigEntry(const char *key) const;
+
+ virtual char SetKey (const SWKey *ikey);
+ virtual SWKey& Key() const;
+ virtual SWKey *CreateKey ();
+ virtual const char* KeyText(const char *imodtype = 0);
+ virtual char Display();
+
+//Search functions
+ static void nullPercent (char percent, void *userData);
+ virtual ListKey & Search (const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent) (char, void *) = &nullPercent, void *percentUserData = 0);
+ virtual signed char createSearchFramework();
+ virtual bool hasSearchFramework();
+ virtual bool isSearchOptimallySupported (const char *istr, int searchType, int flags, SWKey * scope);
+
+//navigation functions
+%extend {
+ const bool next() {
+ (*self)++;
+ return !self->Error();
+ };
+ const bool prev() {
+ (*self)--;
+ return !self->Error();
+ };
+ const bool inc(const int howFar) {
+ (*self)+=howFar;
+ return !self->Error();
+ };
+ const bool dec(const int howFar) {
+ (*self)-=howFar;
+ return !self->Error();
+ };
+ void setPosition(SW_POSITION pos) {
+ (*self) = pos;
+ };
+ void top() {
+ (*self) = TOP;
+ };
+ void bottom() {
+ (*self) = BOTTOM;
+ };
+}
+
+//data functions
+%extend {
+ const char* text() {
+ return (const char*)*self;
+ };
+ const char* StripText() {
+ return self->StripText();
+ };
+}
+
+ virtual char *getRawEntry();
+
+ virtual void setSkipConsecutiveLinks(bool val);
+ virtual bool getSkipConsecutiveLinks();
+ virtual AttributeTypeList &getEntryAttributes() const;
+ virtual void processEntryAttributes(bool val) const;
+ virtual bool isProcessEntryAttributes() const;
+
+//module info functions
+ virtual char* Name (const char *imodname = 0);
+ virtual char* Description (const char *imoddesc = 0);
+ virtual char* Type (const char *imodtype = 0);
+ virtual char Direction(signed char newdir = -1);
+ virtual char Encoding(signed char enc = -1);
+ virtual char Markup(signed char enc = -1);
+ virtual char* Lang (const char *imodlang = 0);
+
+//write interface
+ virtual bool isWritable ();
+ static signed char createModule (const char *);
+ virtual SWModule& setentry (const char *inbuf, long len);
+ virtual void deleteEntry ();
+
+%extend {
+ void write(const char* text) {
+ (*self)<<text;
+ };
+
+ void writeLink(const SWKey* key) {
+ (*self)<<key;
+ };
+}
+};
diff --git a/bindings/swig/sword.i b/bindings/swig/sword.i
new file mode 100644
index 0000000..1ae1f8a
--- /dev/null
+++ b/bindings/swig/sword.i
@@ -0,0 +1,50 @@
+/** @mainpage
+* This is the API documentation of the SWIG interface to Sword!<BR>
+* The interface contains the most useful classes of Sword to read, navigate and create/write modules. The SWIG intreface is interesting
+* for all who want to write Perl/PHP/Phyton/Ruby/TCL/Java code using the Sword library.<BR>
+* My aim is to support all who do so much work for the Sword project (Troy, Chris and all the others) and to make their work more easy with the SWIG interface.
+* The interface tries to use the function names of the Sword C++ API, but since operators are not (yet) supported in SWIG there are some additions to the functions, the operators can't be used.<BR>
+* Here are the basic classes you should know of:
+* @ref SWMgr, SWModule, SWKey, VerseKey and SWConfig.
+*/
+
+%module sword
+%{
+#undef bool
+#undef assert
+#undef LOCAL
+#undef list
+%}
+
+%include "swconfig.i"
+%include "swmgr.i"
+%include "swmodule.i"
+
+%include "swkey.i"
+%include "versekey.i"
+%include "listkey.i"
+%include "treekey.i"
+%include "treekeyidx.i"
+
+%include "localemgr.i"
+%include "swfiltermgr.i"
+
+%include "swtext.i"
+%include "rawtext.i"
+%include "ztext.i"
+
+%include "swcom.i"
+%include "rawcom.i"
+%include "zcom.i"
+
+%include "swgenbook.i"
+%include "rawgenbook.i"
+
+%include "swld.i"
+%include "rawld.i"
+%include "rawld4.i"
+%include "zld.i"
+
+%include "swcompress.i"
+%include "lzsscompress.i"
+%include "zipcompress.i"
diff --git a/bindings/swig/sword.pl b/bindings/swig/sword.pl
new file mode 100644
index 0000000..969424d
--- /dev/null
+++ b/bindings/swig/sword.pl
@@ -0,0 +1,101 @@
+#!/usr/bin/perl
+
+use sword;
+
+print "Version (should be 1.0): " , $sword::VERSION , "\n";
+
+print "Create SWConfig object!\n";
+$config = new sword::SWConfig("test.conf");
+
+print "Load\n";
+$config->Load();
+
+print "Set value ... ";
+print $config->set("Group", "Entry", "Value");
+print " finished \n";
+
+print "Get value ... ";
+print $config->get("Group", "Entry");
+print " finished \n";
+
+$config->Save();
+
+#testing SWMgr
+$localemgr = sword::LocaleMgr::systemLocaleMgr();
+$localemgr->setDefaultLocaleName("de");
+
+$mgr = new sword::SWMgr();
+$module = $mgr->module("GerLut1545-temp");
+print "Printing WEB Module information: \n";
+print "Name:\t", $module->Name(),"\nDescription:\t", $module->Description(), "\nLang:\t", $module->Lang(), "\n";
+
+$key = new sword::VerseKey("Matthew 3:16");
+$key->setPersist(1);
+$module->SetKey($key);
+
+for ($i = 0; $i < 15; $i++) {
+ print "(", $module->KeyText() ,")\t", $module->StripText(), "\n";
+ $key->next();
+}
+$key->increment(103);
+print "(", $module->KeyText() ,")\t", $module->StripText(), "\n";
+
+#testing write interface
+$key->setText("John 3:16");
+#$module->SetKey($key);
+$module->write("This is a test entry! This tests the write abilities of the Sword Perl classes");
+print "(", $module->KeyText() ,")\t", $module->StripText(), "\n";
+
+print "Seraching for God: ";
+$list = $module->Search("Gott");
+print $list->Count(), " entries found!\n";
+#for ( $i = 0; $i < $list->Count(); $i++) {
+# print "(", $i, ")\t", $list->GetElement()->getText(), "\n";
+# $list->next();
+#}
+
+print "Creating new module! Writing search result...";
+#sword::RawText::createModule("/usr/share/sword/modules/texts/ztext/testmodule/");
+#$newmod = new sword::RawText("/usr/share/sword/modules/texts/ztext/testmodule/");
+
+#$key->setText("Genesis 1:1");
+$newkey = $key->clone();
+#$newmod->SetKey($newkey);
+#
+#for ($i = 0; $i < $list->Count(); $i++, $list->next()) {
+# $key->setText($list->GetElement()->getText());
+# $newkey->setText($list->GetElement()->getText());
+#
+# $newmod->write( $module->StripText() );
+#}
+
+print "Now create the LD module\n";
+
+ mkdir("ldmod");
+sword::zText::createModule("ldmod/",4);
+
+print "first step}\n";
+
+$newmod = new sword::zText("ldmod/");
+
+print "Created module;\n";
+
+$newkey = $newmod->CreateKey();
+$newkey->setPersist(1);
+$newkey->setText(" ");
+$module->SetKey($newkey);
+
+print "Loop! \n";
+
+for ($i = 0; $i < $list->Count(); $i++) {
+ print $list->GetElement()->getText() . "\n";
+
+ $key->setText($list->GetElement()->getText());
+ $newkey->setText($list->GetElement()->getText());
+
+ $newmod->SetKey($newkey);
+
+ $newmod->write( $module->StripText() );
+ $list->next();
+}
+
diff --git a/bindings/swig/swposition.i b/bindings/swig/swposition.i
new file mode 100644
index 0000000..4f1c35a
--- /dev/null
+++ b/bindings/swig/swposition.i
@@ -0,0 +1,14 @@
+%{
+ #include "swkey.h"
+%}
+
+class SW_POSITION {
+public:
+ SW_POSITION(char ipos);
+};
+
+%define POS_TOP ((char)1)
+%define POS_BOTTOM ((char)2)
+
+%define TOP SW_POSITION(POS_TOP)
+%define BOTTOM SW_POSITION(POS_BOTTOM)
diff --git a/bindings/swig/swtext.i b/bindings/swig/swtext.i
new file mode 100644
index 0000000..a5cb031
--- /dev/null
+++ b/bindings/swig/swtext.i
@@ -0,0 +1,10 @@
+%{
+ #include "swtext.h"
+%}
+
+class SWText : public SWModule {
+public:
+ SWText (const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~ SWText ();
+};
+
diff --git a/bindings/swig/treekey.i b/bindings/swig/treekey.i
new file mode 100644
index 0000000..77fc2d7
--- /dev/null
+++ b/bindings/swig/treekey.i
@@ -0,0 +1,47 @@
+%{
+#include "treekey.h"
+%}
+
+class TreeKey : public SWKey {
+protected:
+ TreeKey();
+ ~TreeKey();
+
+public:
+
+ virtual const char *getLocalName() = 0;
+ virtual const char *setLocalName(const char *) = 0;
+
+ virtual const char *getUserData(int *size = 0) = 0;
+ virtual void setUserData(const char *userData, int size = 0) = 0;
+
+ virtual const char *getFullName() const = 0;
+
+ virtual void root() = 0;
+ virtual bool parent() = 0;
+
+ virtual bool firstChild() = 0;
+ virtual bool nextSibling() = 0;
+ virtual bool previousSibling() = 0;
+
+ virtual bool hasChildren() = 0;
+
+ virtual void append() = 0;
+ virtual void appendChild() = 0;
+ virtual void insertBefore() = 0;
+
+ virtual void remove() = 0;
+
+ virtual void setOffset(unsigned long offset) = 0;
+ virtual unsigned long getOffset() const = 0;
+
+ //virtual void setText(const char *ikey) = 0;
+ virtual void setPosition(SW_POSITION p) = 0;
+ //virtual const char *getText() const = 0;
+ //virtual int compare(const SWKey &ikey) = 0;
+ //virtual void decrement(int steps = 1) = 0;
+ //virtual void increment(int steps = 1) = 0;
+ virtual char Traversable ();
+ virtual long Index () const;
+ //virtual long Index (long iindex);
+}; \ No newline at end of file
diff --git a/bindings/swig/treekeyidx.i b/bindings/swig/treekeyidx.i
new file mode 100644
index 0000000..bf06217
--- /dev/null
+++ b/bindings/swig/treekeyidx.i
@@ -0,0 +1,53 @@
+%{
+#include "treekeyidx.h"
+%}
+
+class TreeKeyIdx : public TreeKey {
+ TreeKeyIdx(const TreeKeyIdx &ikey);
+ TreeKeyIdx (const char *idxPath, int fileMode = -1);
+ ~TreeKeyIdx ();
+
+// virtual const char *getLocalName();
+// virtual const char *setLocalName(const char *);
+
+// virtual const char *getUserData(int *size = 0);
+// virtual void setUserData(const char *userData, int size = 0);
+
+// virtual const char *getFullName() const;
+
+// virtual void root();
+// virtual bool parent();
+
+// virtual bool firstChild();
+// virtual bool nextSibling();
+// virtual bool previousSibling();
+
+// virtual bool hasChildren();
+
+// virtual void append();
+// virtual void appendChild();
+// virtual void insertBefore();
+
+// virtual void remove();
+ virtual void save();
+
+ virtual void copyFrom(const TreeKeyIdx &ikey);
+// virtual void copyFrom(const SWKey & ikey);
+
+// virtual SWKey &operator = (const TreeKeyIdx &ikey) { copyFrom(ikey); return *this; }
+// void setOffset(unsigned long offset);
+// unsigned long getOffset() const;
+
+// SWKEY_OPERATORS
+
+// virtual void setText(const char *ikey);
+// virtual void setPosition(SW_POSITION p);
+// virtual const char *getText() const;
+ virtual int _compare (const TreeKeyIdx & ikey);
+// virtual int compare(const SWKey &ikey);
+// virtual void decrement(int steps = 1);
+// virtual void increment(int steps = 1);
+// virtual char Traversable () { return 1; }
+
+ static signed char create(const char *path);
+}; \ No newline at end of file
diff --git a/bindings/swig/versekey.i b/bindings/swig/versekey.i
new file mode 100644
index 0000000..f50f908
--- /dev/null
+++ b/bindings/swig/versekey.i
@@ -0,0 +1,51 @@
+%{
+ #include "versekey.h"
+%}
+
+class VerseKey : public SWKey {
+public:
+ VerseKey(const char *ikey = 0);
+ //VerseKey(const SWKey * ikey);
+ //VerseKey(const char *min, const char *max);
+ //VerseKey(const VerseKey &k);
+ virtual ~VerseKey();
+
+ virtual SWKey *clone() const;
+
+//bound management
+// VerseKey & LowerBound(const char *lb);
+// VerseKey & UpperBound(const char *ub);
+ VerseKey & LowerBound() const;
+ VerseKey & UpperBound() const;
+ void ClearBounds();
+
+//data functions
+ virtual void decrement(int step);
+ virtual void increment(int step);
+ virtual char Traversable() { return 1; }
+
+ virtual const char *getBookName() const;
+ virtual const char *getBookAbbrev() const;
+
+ virtual char Testament() const;
+ virtual char Book() const;
+ virtual int Chapter() const;
+ virtual int Verse() const;
+
+ //virtual char Testament(char itestament);
+// virtual char Book(char ibook);
+// virtual int Chapter(int ichapter);
+// virtual int Verse(int iverse);
+
+ virtual void Normalize(char autocheck = 0);
+ virtual char AutoNormalize(char iautonorm = MAXPOS (char));
+
+ virtual char Headings(char iheadings = MAXPOS (char));
+ virtual const char *getOSISRef() const;
+
+ virtual int compare(const SWKey & ikey);
+ virtual int _compare(const VerseKey & ikey);
+
+ virtual void setLocale(const char *name);
+ virtual const char *getLocale() const;
+};
diff --git a/bindings/swig/zcom.i b/bindings/swig/zcom.i
new file mode 100644
index 0000000..767bf01
--- /dev/null
+++ b/bindings/swig/zcom.i
@@ -0,0 +1,11 @@
+%{
+ #include "zcom.h"
+%}
+
+class zCom : public SWCom {
+ zCom (const char *ipath, const char *iname = 0, const char *idesc = 0, int blockType = CHAPTERBLOCKS, SWCompress * icomp = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~ zCom ();
+
+ static char createModule (const char *path, int blockBound);
+};
+
diff --git a/bindings/swig/zipcompress.i b/bindings/swig/zipcompress.i
new file mode 100644
index 0000000..45441bf
--- /dev/null
+++ b/bindings/swig/zipcompress.i
@@ -0,0 +1,11 @@
+%{
+ #include <zipcomprs.h>
+%}
+
+class ZipCompress : public SWCompress {
+public:
+ ZipCompress();
+ virtual ~ZipCompress ();
+ virtual void Encode (void);
+ virtual void Decode (void);
+};
diff --git a/bindings/swig/zld.i b/bindings/swig/zld.i
new file mode 100644
index 0000000..375457d
--- /dev/null
+++ b/bindings/swig/zld.i
@@ -0,0 +1,12 @@
+%{
+ #include "zld.h"
+%}
+
+class zLD : public SWLD {
+public:
+ zLD(const char *ipath, const char *iname = 0, const char *idesc = 0, long blockCount = 200, SWCompress *icomp = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~zLD();
+
+ static char createModule (const char *path);
+};
+
diff --git a/bindings/swig/ztext.i b/bindings/swig/ztext.i
new file mode 100644
index 0000000..893f411
--- /dev/null
+++ b/bindings/swig/ztext.i
@@ -0,0 +1,12 @@
+%{
+ #include "ztext.h"
+%}
+
+class zText : public SWText {
+public:
+ zText(const char *ipath, const char *iname = 0, const char *idesc = 0, int blockType = CHAPTERBLOCKS, SWCompress * icomp = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
+ virtual ~zText ();
+
+ static char createModule (const char *path, int blockBound);
+};
+