aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-08-14 09:57:17 +0000
committerdanglassey <danglassey>2002-08-14 09:57:17 +0000
commitc9458897ebbb739d8db83c80e06512d8a612f743 (patch)
treef8c5381045887e34388cc6b26cfccc254bf766dc /tests
downloadsword-sf-cvs-c9458897ebbb739d8db83c80e06512d8a612f743.tar.gz
*** empty log message ***
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am57
-rw-r--r--tests/Makefile.in659
-rw-r--r--tests/bcppmake/filtertest.bpf6
-rw-r--r--tests/bcppmake/filtertest.bpr114
-rw-r--r--tests/bcppmake/libsword.bpf117
-rw-r--r--tests/bcppmake/libsword.bpr197
-rw-r--r--tests/bcppmake/mgrtest.bpf6
-rw-r--r--tests/bcppmake/mgrtest.bpr114
-rw-r--r--tests/bcppmake/parsekey.bpf6
-rw-r--r--tests/bcppmake/parsekey.bpr114
-rw-r--r--tests/bcppmake/tests.bpg33
-rw-r--r--tests/casttest.cpp26
-rw-r--r--tests/complzss.cpp109
-rw-r--r--tests/compnone.cpp109
-rw-r--r--tests/compzip.cpp107
-rw-r--r--tests/configtest.cpp13
-rw-r--r--tests/filtertest.cpp31
-rw-r--r--tests/genbooktest.cpp174
-rw-r--r--tests/icutest.cpp34
-rw-r--r--tests/indextest.cpp19
-rw-r--r--tests/introtest.cpp107
-rw-r--r--tests/keycast.cpp30
-rw-r--r--tests/keytest.cpp169
-rw-r--r--tests/lextest.cpp22
-rw-r--r--tests/listtest.cpp59
-rw-r--r--tests/localetest.cpp30
-rw-r--r--tests/mgrtest.cpp31
-rw-r--r--tests/modtest.cpp28
-rw-r--r--tests/parsekey.cpp34
-rw-r--r--tests/romantest.cpp24
-rw-r--r--tests/swaptest.cpp9
-rw-r--r--tests/testblocks.cpp85
-rw-r--r--tests/tlitmgrtest.cpp712
-rw-r--r--tests/tmp/README2
-rw-r--r--tests/translittest.cpp142
-rw-r--r--tests/treeidxtest.cpp132
36 files changed, 3661 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..bcbc03c
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,57 @@
+AUTOMAKE_OPTIONS = 1.6
+INCLUDES = -I $(top_srcdir)/include
+LDADD = -L$(top_builddir)/lib -lsword
+
+
+noinst_PROGRAMS = keytest mgrtest parsekey listtest casttest modtest \
+compnone complzss localetest keycast introtest indextest configtest \
+romantest testblocks filtertest lextest swaptest genbooktest treeidxtest
+
+if ICU
+ICUPROG = icutest translittest tlitmgrtest
+else
+ICUPROG =
+endif
+
+noinst_PROGRAMS += $(ICUPROG)
+
+if ICU
+icutest_SOURCES = icutest.cpp
+translittest_SOURCES = translittest.cpp
+tlitmgrtest_SOURCES = tlitmgrtest.cpp
+tlitmgrtest_LDADD = -lustdio
+endif
+
+if ZLIB
+ZLIBPROG = compzip
+else
+ZLIBPROG =
+endif
+
+noinst_PROGRAMS += $(ZLIBPROG)
+
+if ZLIB
+compzip_SOURCES = compzip.cpp
+endif
+
+
+keytest_SOURCES = keytest.cpp
+mgrtest_SOURCES = mgrtest.cpp
+parsekey_SOURCES = parsekey.cpp
+listtest_SOURCES = listtest.cpp
+casttest_SOURCES = casttest.cpp
+modtest_SOURCES = modtest.cpp
+compnone_SOURCES = compnone.cpp
+complzss_SOURCES = complzss.cpp
+localetest_SOURCES = localetest.cpp
+keycast_SOURCES = keycast.cpp
+introtest_SOURCES = introtest.cpp
+indextest_SOURCES = indextest.cpp
+configtest_SOURCES = configtest.cpp
+romantest_SOURCES = romantest.cpp
+testblocks_SOURCES = testblocks.cpp
+filtertest_SOURCES = filtertest.cpp
+lextest_SOURCES = lextest.cpp
+swaptest_SOURCES = swaptest.cpp
+treeidxtest_SOURCES = treeidxtest.cpp
+genbooktest_SOURCES = genbooktest.cpp
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..fc632df
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,659 @@
+# Makefile.in generated by automake 1.6.2 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+GENCCODE = @GENCCODE@
+GENCMN = @GENCMN@
+GENRB = @GENRB@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAINT = @MAINT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+PKGDATA = @PKGDATA@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+dir_confdef = @dir_confdef@
+enable_debug = @enable_debug@
+enable_profile = @enable_profile@
+install_sh = @install_sh@
+target_cpu = @target_cpu@
+target_mingw32 = @target_mingw32@
+target_os = @target_os@
+target_system = @target_system@
+target_vendor = @target_vendor@
+with_conf = @with_conf@
+with_icu = @with_icu@
+with_zlib = @with_zlib@
+AUTOMAKE_OPTIONS = 1.6
+INCLUDES = -I $(top_srcdir)/include
+LDADD = -L$(top_builddir)/lib -lsword
+
+noinst_PROGRAMS = keytest mgrtest parsekey listtest casttest modtest \
+compnone complzss localetest keycast introtest indextest configtest \
+romantest testblocks filtertest lextest swaptest genbooktest treeidxtest\
+$(ICUPROG) $(ZLIBPROG)
+
+@ICU_TRUE@ICUPROG = icutest translittest tlitmgrtest
+@ICU_FALSE@ICUPROG =
+
+@ICU_TRUE@icutest_SOURCES = icutest.cpp
+@ICU_TRUE@translittest_SOURCES = translittest.cpp
+@ICU_TRUE@tlitmgrtest_SOURCES = tlitmgrtest.cpp
+@ICU_TRUE@tlitmgrtest_LDADD = -lustdio
+
+@ZLIB_TRUE@ZLIBPROG = compzip
+@ZLIB_FALSE@ZLIBPROG =
+
+@ZLIB_TRUE@compzip_SOURCES = compzip.cpp
+
+keytest_SOURCES = keytest.cpp
+mgrtest_SOURCES = mgrtest.cpp
+parsekey_SOURCES = parsekey.cpp
+listtest_SOURCES = listtest.cpp
+casttest_SOURCES = casttest.cpp
+modtest_SOURCES = modtest.cpp
+compnone_SOURCES = compnone.cpp
+complzss_SOURCES = complzss.cpp
+localetest_SOURCES = localetest.cpp
+keycast_SOURCES = keycast.cpp
+introtest_SOURCES = introtest.cpp
+indextest_SOURCES = indextest.cpp
+configtest_SOURCES = configtest.cpp
+romantest_SOURCES = romantest.cpp
+testblocks_SOURCES = testblocks.cpp
+filtertest_SOURCES = filtertest.cpp
+lextest_SOURCES = lextest.cpp
+swaptest_SOURCES = swaptest.cpp
+treeidxtest_SOURCES = treeidxtest.cpp
+genbooktest_SOURCES = genbooktest.cpp
+subdir = tests
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+@ICU_FALSE@@ZLIB_TRUE@noinst_PROGRAMS = keytest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ mgrtest$(EXEEXT) parsekey$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ listtest$(EXEEXT) casttest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ modtest$(EXEEXT) compnone$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ complzss$(EXEEXT) localetest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ keycast$(EXEEXT) introtest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ indextest$(EXEEXT) configtest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ romantest$(EXEEXT) testblocks$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ filtertest$(EXEEXT) lextest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ swaptest$(EXEEXT) genbooktest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_TRUE@ treeidxtest$(EXEEXT) compzip$(EXEEXT)
+@ICU_FALSE@@ZLIB_FALSE@noinst_PROGRAMS = keytest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ mgrtest$(EXEEXT) parsekey$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ listtest$(EXEEXT) casttest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ modtest$(EXEEXT) compnone$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ complzss$(EXEEXT) localetest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ keycast$(EXEEXT) introtest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ indextest$(EXEEXT) configtest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ romantest$(EXEEXT) testblocks$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ filtertest$(EXEEXT) lextest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ swaptest$(EXEEXT) genbooktest$(EXEEXT) \
+@ICU_FALSE@@ZLIB_FALSE@ treeidxtest$(EXEEXT)
+@ICU_TRUE@@ZLIB_TRUE@noinst_PROGRAMS = keytest$(EXEEXT) mgrtest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ parsekey$(EXEEXT) listtest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ casttest$(EXEEXT) modtest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ compnone$(EXEEXT) complzss$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ localetest$(EXEEXT) keycast$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ introtest$(EXEEXT) indextest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ configtest$(EXEEXT) romantest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ testblocks$(EXEEXT) filtertest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ lextest$(EXEEXT) swaptest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ genbooktest$(EXEEXT) treeidxtest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ icutest$(EXEEXT) translittest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_TRUE@ tlitmgrtest$(EXEEXT) compzip$(EXEEXT)
+@ICU_TRUE@@ZLIB_FALSE@noinst_PROGRAMS = keytest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ mgrtest$(EXEEXT) parsekey$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ listtest$(EXEEXT) casttest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ modtest$(EXEEXT) compnone$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ complzss$(EXEEXT) localetest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ keycast$(EXEEXT) introtest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ indextest$(EXEEXT) configtest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ romantest$(EXEEXT) testblocks$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ filtertest$(EXEEXT) lextest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ swaptest$(EXEEXT) genbooktest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ treeidxtest$(EXEEXT) icutest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ translittest$(EXEEXT) \
+@ICU_TRUE@@ZLIB_FALSE@ tlitmgrtest$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+am_casttest_OBJECTS = casttest.$(OBJEXT)
+casttest_OBJECTS = $(am_casttest_OBJECTS)
+casttest_LDADD = $(LDADD)
+casttest_DEPENDENCIES =
+casttest_LDFLAGS =
+am_complzss_OBJECTS = complzss.$(OBJEXT)
+complzss_OBJECTS = $(am_complzss_OBJECTS)
+complzss_LDADD = $(LDADD)
+complzss_DEPENDENCIES =
+complzss_LDFLAGS =
+am_compnone_OBJECTS = compnone.$(OBJEXT)
+compnone_OBJECTS = $(am_compnone_OBJECTS)
+compnone_LDADD = $(LDADD)
+compnone_DEPENDENCIES =
+compnone_LDFLAGS =
+@ZLIB_TRUE@am_compzip_OBJECTS = compzip.$(OBJEXT)
+compzip_OBJECTS = $(am_compzip_OBJECTS)
+compzip_LDADD = $(LDADD)
+compzip_DEPENDENCIES =
+compzip_LDFLAGS =
+am_configtest_OBJECTS = configtest.$(OBJEXT)
+configtest_OBJECTS = $(am_configtest_OBJECTS)
+configtest_LDADD = $(LDADD)
+configtest_DEPENDENCIES =
+configtest_LDFLAGS =
+am_filtertest_OBJECTS = filtertest.$(OBJEXT)
+filtertest_OBJECTS = $(am_filtertest_OBJECTS)
+filtertest_LDADD = $(LDADD)
+filtertest_DEPENDENCIES =
+filtertest_LDFLAGS =
+am_genbooktest_OBJECTS = genbooktest.$(OBJEXT)
+genbooktest_OBJECTS = $(am_genbooktest_OBJECTS)
+genbooktest_LDADD = $(LDADD)
+genbooktest_DEPENDENCIES =
+genbooktest_LDFLAGS =
+@ICU_TRUE@am_icutest_OBJECTS = icutest.$(OBJEXT)
+icutest_OBJECTS = $(am_icutest_OBJECTS)
+icutest_LDADD = $(LDADD)
+icutest_DEPENDENCIES =
+icutest_LDFLAGS =
+am_indextest_OBJECTS = indextest.$(OBJEXT)
+indextest_OBJECTS = $(am_indextest_OBJECTS)
+indextest_LDADD = $(LDADD)
+indextest_DEPENDENCIES =
+indextest_LDFLAGS =
+am_introtest_OBJECTS = introtest.$(OBJEXT)
+introtest_OBJECTS = $(am_introtest_OBJECTS)
+introtest_LDADD = $(LDADD)
+introtest_DEPENDENCIES =
+introtest_LDFLAGS =
+am_keycast_OBJECTS = keycast.$(OBJEXT)
+keycast_OBJECTS = $(am_keycast_OBJECTS)
+keycast_LDADD = $(LDADD)
+keycast_DEPENDENCIES =
+keycast_LDFLAGS =
+am_keytest_OBJECTS = keytest.$(OBJEXT)
+keytest_OBJECTS = $(am_keytest_OBJECTS)
+keytest_LDADD = $(LDADD)
+keytest_DEPENDENCIES =
+keytest_LDFLAGS =
+am_lextest_OBJECTS = lextest.$(OBJEXT)
+lextest_OBJECTS = $(am_lextest_OBJECTS)
+lextest_LDADD = $(LDADD)
+lextest_DEPENDENCIES =
+lextest_LDFLAGS =
+am_listtest_OBJECTS = listtest.$(OBJEXT)
+listtest_OBJECTS = $(am_listtest_OBJECTS)
+listtest_LDADD = $(LDADD)
+listtest_DEPENDENCIES =
+listtest_LDFLAGS =
+am_localetest_OBJECTS = localetest.$(OBJEXT)
+localetest_OBJECTS = $(am_localetest_OBJECTS)
+localetest_LDADD = $(LDADD)
+localetest_DEPENDENCIES =
+localetest_LDFLAGS =
+am_mgrtest_OBJECTS = mgrtest.$(OBJEXT)
+mgrtest_OBJECTS = $(am_mgrtest_OBJECTS)
+mgrtest_LDADD = $(LDADD)
+mgrtest_DEPENDENCIES =
+mgrtest_LDFLAGS =
+am_modtest_OBJECTS = modtest.$(OBJEXT)
+modtest_OBJECTS = $(am_modtest_OBJECTS)
+modtest_LDADD = $(LDADD)
+modtest_DEPENDENCIES =
+modtest_LDFLAGS =
+am_parsekey_OBJECTS = parsekey.$(OBJEXT)
+parsekey_OBJECTS = $(am_parsekey_OBJECTS)
+parsekey_LDADD = $(LDADD)
+parsekey_DEPENDENCIES =
+parsekey_LDFLAGS =
+am_romantest_OBJECTS = romantest.$(OBJEXT)
+romantest_OBJECTS = $(am_romantest_OBJECTS)
+romantest_LDADD = $(LDADD)
+romantest_DEPENDENCIES =
+romantest_LDFLAGS =
+am_swaptest_OBJECTS = swaptest.$(OBJEXT)
+swaptest_OBJECTS = $(am_swaptest_OBJECTS)
+swaptest_LDADD = $(LDADD)
+swaptest_DEPENDENCIES =
+swaptest_LDFLAGS =
+am_testblocks_OBJECTS = testblocks.$(OBJEXT)
+testblocks_OBJECTS = $(am_testblocks_OBJECTS)
+testblocks_LDADD = $(LDADD)
+testblocks_DEPENDENCIES =
+testblocks_LDFLAGS =
+@ICU_TRUE@am_tlitmgrtest_OBJECTS = tlitmgrtest.$(OBJEXT)
+tlitmgrtest_OBJECTS = $(am_tlitmgrtest_OBJECTS)
+@ICU_TRUE@tlitmgrtest_DEPENDENCIES =
+@ICU_FALSE@tlitmgrtest_DEPENDENCIES =
+tlitmgrtest_LDFLAGS =
+@ICU_TRUE@am_translittest_OBJECTS = translittest.$(OBJEXT)
+translittest_OBJECTS = $(am_translittest_OBJECTS)
+translittest_LDADD = $(LDADD)
+translittest_DEPENDENCIES =
+translittest_LDFLAGS =
+am_treeidxtest_OBJECTS = treeidxtest.$(OBJEXT)
+treeidxtest_OBJECTS = $(am_treeidxtest_OBJECTS)
+treeidxtest_LDADD = $(LDADD)
+treeidxtest_DEPENDENCIES =
+treeidxtest_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/casttest.Po ./$(DEPDIR)/complzss.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/compnone.Po ./$(DEPDIR)/compzip.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/configtest.Po ./$(DEPDIR)/filtertest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/genbooktest.Po ./$(DEPDIR)/icutest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/indextest.Po ./$(DEPDIR)/introtest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/keycast.Po ./$(DEPDIR)/keytest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/lextest.Po ./$(DEPDIR)/listtest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/localetest.Po ./$(DEPDIR)/mgrtest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/modtest.Po ./$(DEPDIR)/parsekey.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/romantest.Po ./$(DEPDIR)/swaptest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/testblocks.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/tlitmgrtest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/translittest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/treeidxtest.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXFLAGS = @CXXFLAGS@
+DIST_SOURCES = $(casttest_SOURCES) $(complzss_SOURCES) \
+ $(compnone_SOURCES) $(compzip_SOURCES) $(configtest_SOURCES) \
+ $(filtertest_SOURCES) $(genbooktest_SOURCES) $(icutest_SOURCES) \
+ $(indextest_SOURCES) $(introtest_SOURCES) $(keycast_SOURCES) \
+ $(keytest_SOURCES) $(lextest_SOURCES) $(listtest_SOURCES) \
+ $(localetest_SOURCES) $(mgrtest_SOURCES) $(modtest_SOURCES) \
+ $(parsekey_SOURCES) $(romantest_SOURCES) $(swaptest_SOURCES) \
+ $(testblocks_SOURCES) $(tlitmgrtest_SOURCES) \
+ $(translittest_SOURCES) $(treeidxtest_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(casttest_SOURCES) $(complzss_SOURCES) $(compnone_SOURCES) $(compzip_SOURCES) $(configtest_SOURCES) $(filtertest_SOURCES) $(genbooktest_SOURCES) $(icutest_SOURCES) $(indextest_SOURCES) $(introtest_SOURCES) $(keycast_SOURCES) $(keytest_SOURCES) $(lextest_SOURCES) $(listtest_SOURCES) $(localetest_SOURCES) $(mgrtest_SOURCES) $(modtest_SOURCES) $(parsekey_SOURCES) $(romantest_SOURCES) $(swaptest_SOURCES) $(testblocks_SOURCES) $(tlitmgrtest_SOURCES) $(translittest_SOURCES) $(treeidxtest_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+casttest$(EXEEXT): $(casttest_OBJECTS) $(casttest_DEPENDENCIES)
+ @rm -f casttest$(EXEEXT)
+ $(CXXLINK) $(casttest_LDFLAGS) $(casttest_OBJECTS) $(casttest_LDADD) $(LIBS)
+complzss$(EXEEXT): $(complzss_OBJECTS) $(complzss_DEPENDENCIES)
+ @rm -f complzss$(EXEEXT)
+ $(CXXLINK) $(complzss_LDFLAGS) $(complzss_OBJECTS) $(complzss_LDADD) $(LIBS)
+compnone$(EXEEXT): $(compnone_OBJECTS) $(compnone_DEPENDENCIES)
+ @rm -f compnone$(EXEEXT)
+ $(CXXLINK) $(compnone_LDFLAGS) $(compnone_OBJECTS) $(compnone_LDADD) $(LIBS)
+compzip$(EXEEXT): $(compzip_OBJECTS) $(compzip_DEPENDENCIES)
+ @rm -f compzip$(EXEEXT)
+ $(CXXLINK) $(compzip_LDFLAGS) $(compzip_OBJECTS) $(compzip_LDADD) $(LIBS)
+configtest$(EXEEXT): $(configtest_OBJECTS) $(configtest_DEPENDENCIES)
+ @rm -f configtest$(EXEEXT)
+ $(CXXLINK) $(configtest_LDFLAGS) $(configtest_OBJECTS) $(configtest_LDADD) $(LIBS)
+filtertest$(EXEEXT): $(filtertest_OBJECTS) $(filtertest_DEPENDENCIES)
+ @rm -f filtertest$(EXEEXT)
+ $(CXXLINK) $(filtertest_LDFLAGS) $(filtertest_OBJECTS) $(filtertest_LDADD) $(LIBS)
+genbooktest$(EXEEXT): $(genbooktest_OBJECTS) $(genbooktest_DEPENDENCIES)
+ @rm -f genbooktest$(EXEEXT)
+ $(CXXLINK) $(genbooktest_LDFLAGS) $(genbooktest_OBJECTS) $(genbooktest_LDADD) $(LIBS)
+icutest$(EXEEXT): $(icutest_OBJECTS) $(icutest_DEPENDENCIES)
+ @rm -f icutest$(EXEEXT)
+ $(CXXLINK) $(icutest_LDFLAGS) $(icutest_OBJECTS) $(icutest_LDADD) $(LIBS)
+indextest$(EXEEXT): $(indextest_OBJECTS) $(indextest_DEPENDENCIES)
+ @rm -f indextest$(EXEEXT)
+ $(CXXLINK) $(indextest_LDFLAGS) $(indextest_OBJECTS) $(indextest_LDADD) $(LIBS)
+introtest$(EXEEXT): $(introtest_OBJECTS) $(introtest_DEPENDENCIES)
+ @rm -f introtest$(EXEEXT)
+ $(CXXLINK) $(introtest_LDFLAGS) $(introtest_OBJECTS) $(introtest_LDADD) $(LIBS)
+keycast$(EXEEXT): $(keycast_OBJECTS) $(keycast_DEPENDENCIES)
+ @rm -f keycast$(EXEEXT)
+ $(CXXLINK) $(keycast_LDFLAGS) $(keycast_OBJECTS) $(keycast_LDADD) $(LIBS)
+keytest$(EXEEXT): $(keytest_OBJECTS) $(keytest_DEPENDENCIES)
+ @rm -f keytest$(EXEEXT)
+ $(CXXLINK) $(keytest_LDFLAGS) $(keytest_OBJECTS) $(keytest_LDADD) $(LIBS)
+lextest$(EXEEXT): $(lextest_OBJECTS) $(lextest_DEPENDENCIES)
+ @rm -f lextest$(EXEEXT)
+ $(CXXLINK) $(lextest_LDFLAGS) $(lextest_OBJECTS) $(lextest_LDADD) $(LIBS)
+listtest$(EXEEXT): $(listtest_OBJECTS) $(listtest_DEPENDENCIES)
+ @rm -f listtest$(EXEEXT)
+ $(CXXLINK) $(listtest_LDFLAGS) $(listtest_OBJECTS) $(listtest_LDADD) $(LIBS)
+localetest$(EXEEXT): $(localetest_OBJECTS) $(localetest_DEPENDENCIES)
+ @rm -f localetest$(EXEEXT)
+ $(CXXLINK) $(localetest_LDFLAGS) $(localetest_OBJECTS) $(localetest_LDADD) $(LIBS)
+mgrtest$(EXEEXT): $(mgrtest_OBJECTS) $(mgrtest_DEPENDENCIES)
+ @rm -f mgrtest$(EXEEXT)
+ $(CXXLINK) $(mgrtest_LDFLAGS) $(mgrtest_OBJECTS) $(mgrtest_LDADD) $(LIBS)
+modtest$(EXEEXT): $(modtest_OBJECTS) $(modtest_DEPENDENCIES)
+ @rm -f modtest$(EXEEXT)
+ $(CXXLINK) $(modtest_LDFLAGS) $(modtest_OBJECTS) $(modtest_LDADD) $(LIBS)
+parsekey$(EXEEXT): $(parsekey_OBJECTS) $(parsekey_DEPENDENCIES)
+ @rm -f parsekey$(EXEEXT)
+ $(CXXLINK) $(parsekey_LDFLAGS) $(parsekey_OBJECTS) $(parsekey_LDADD) $(LIBS)
+romantest$(EXEEXT): $(romantest_OBJECTS) $(romantest_DEPENDENCIES)
+ @rm -f romantest$(EXEEXT)
+ $(CXXLINK) $(romantest_LDFLAGS) $(romantest_OBJECTS) $(romantest_LDADD) $(LIBS)
+swaptest$(EXEEXT): $(swaptest_OBJECTS) $(swaptest_DEPENDENCIES)
+ @rm -f swaptest$(EXEEXT)
+ $(CXXLINK) $(swaptest_LDFLAGS) $(swaptest_OBJECTS) $(swaptest_LDADD) $(LIBS)
+testblocks$(EXEEXT): $(testblocks_OBJECTS) $(testblocks_DEPENDENCIES)
+ @rm -f testblocks$(EXEEXT)
+ $(CXXLINK) $(testblocks_LDFLAGS) $(testblocks_OBJECTS) $(testblocks_LDADD) $(LIBS)
+tlitmgrtest$(EXEEXT): $(tlitmgrtest_OBJECTS) $(tlitmgrtest_DEPENDENCIES)
+ @rm -f tlitmgrtest$(EXEEXT)
+ $(CXXLINK) $(tlitmgrtest_LDFLAGS) $(tlitmgrtest_OBJECTS) $(tlitmgrtest_LDADD) $(LIBS)
+translittest$(EXEEXT): $(translittest_OBJECTS) $(translittest_DEPENDENCIES)
+ @rm -f translittest$(EXEEXT)
+ $(CXXLINK) $(translittest_LDFLAGS) $(translittest_OBJECTS) $(translittest_LDADD) $(LIBS)
+treeidxtest$(EXEEXT): $(treeidxtest_OBJECTS) $(treeidxtest_DEPENDENCIES)
+ @rm -f treeidxtest$(EXEEXT)
+ $(CXXLINK) $(treeidxtest_LDFLAGS) $(treeidxtest_OBJECTS) $(treeidxtest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/casttest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complzss.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compnone.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compzip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filtertest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genbooktest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icutest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indextest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keycast.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keytest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lextest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localetest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgrtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsekey.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/romantest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swaptest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testblocks.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlitmgrtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/translittest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treeidxtest.Po@am__quote@
+
+distclean-depend:
+ -rm -rf ./$(DEPDIR)
+
+.cpp.o:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+CXXDEPMODE = @CXXDEPMODE@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+.PHONY: GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS distclean distclean-compile \
+ distclean-depend distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ tags uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/bcppmake/filtertest.bpf b/tests/bcppmake/filtertest.bpf
new file mode 100644
index 0000000..423e341
--- /dev/null
+++ b/tests/bcppmake/filtertest.bpf
@@ -0,0 +1,6 @@
+USEUNIT("..\filtertest.cpp");
+USELIB("libsword.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+ main \ No newline at end of file
diff --git a/tests/bcppmake/filtertest.bpr b/tests/bcppmake/filtertest.bpr
new file mode 100644
index 0000000..4a79396
--- /dev/null
+++ b/tests/bcppmake/filtertest.bpr
@@ -0,0 +1,114 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="filtertest.exe"/>
+ <OBJFILES value="..\filtertest.obj"/>
+ <RESFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="libsword.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_DEBUG"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="filtertest.bpf"/>
+ <INCLUDEPATH value="..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl"/>
+ <LIBPATH value="..\;..;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <CFLAG1 value="-vGc -vGt -vGd -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k
+ -y -v -vi- -tWC -tWM -c"/>
+ <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zi"/>
+ <LFLAGS value="-D&quot;&quot; -S:0x300000 -Sc:0x20000 -ap -Tpe -x -Gn -v"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="cg32.lib $(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[HistoryLists\hlIncludePath]
+Count=4
+Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl
+
+[HistoryLists\hlLibraryPath]
+Count=3
+Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib
+Item1=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib
+Item2=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib
+
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=$(BCB)\source\vcl
+
+[HistoryLists\hlConditionals]
+Count=1
+Item0=_DEBUG
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+ShowInfoMsgs=0
+LinkDebugVcl=0
+LinkCGLIB=1
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT> \ No newline at end of file
diff --git a/tests/bcppmake/libsword.bpf b/tests/bcppmake/libsword.bpf
new file mode 100644
index 0000000..f62ef6d
--- /dev/null
+++ b/tests/bcppmake/libsword.bpf
@@ -0,0 +1,117 @@
+//---------------------------------------------------------------------------
+
+#include <vcl.h>
+#pragma hdrstop
+USEUNIT("..\..\src\keys\versekey.cpp");
+USEUNIT("..\..\src\keys\strkey.cpp");
+USEUNIT("..\..\src\keys\swkey.cpp");
+USEUNIT("..\..\src\keys\listkey.cpp");
+USEUNIT("..\..\src\mgr\swmgr.cpp");
+USEUNIT("..\..\src\mgr\localemgr.cpp");
+USEUNIT("..\..\src\mgr\swconfig.cpp");
+USEUNIT("..\..\src\mgr\swlocale.cpp");
+USEUNIT("..\..\src\mgr\filemgr.cpp");
+USEUNIT("..\..\src\utilfuns\utilstr.cpp");
+USEUNIT("..\..\src\utilfuns\utilconf.cpp");
+USEUNIT("..\..\src\utilfuns\Greek2Greek.cpp");
+USEUNIT("..\..\src\frontend\swlog.cpp");
+USEUNIT("..\..\src\frontend\swdisp.cpp");
+USEUNIT("..\..\src\modules\swmodule.cpp");
+USEUNIT("..\..\src\modules\comments\swcom.cpp");
+USEUNIT("..\..\src\modules\comments\hrefcom\hrefcom.cpp");
+USEUNIT("..\..\src\modules\comments\rawcom\rawcom.cpp");
+USEUNIT("..\..\src\modules\comments\rawfiles\rawfiles.cpp");
+USEUNIT("..\..\src\modules\common\lzsscomprs.cpp");
+USEUNIT("..\..\src\modules\common\rawstr.cpp");
+USEUNIT("..\..\src\modules\common\rawverse.cpp");
+USEUNIT("..\..\src\modules\common\sapphire.cpp");
+USEUNIT("..\..\src\modules\common\swcipher.cpp");
+USEUNIT("..\..\src\modules\common\swcomprs.cpp");
+USEUNIT("..\..\src\modules\filters\thmlrtf.cpp");
+USEUNIT("..\..\src\modules\filters\gbffootnotes.cpp");
+USEUNIT("..\..\src\modules\filters\gbfhtml.cpp");
+USEUNIT("..\..\src\modules\filters\gbfplain.cpp");
+USEUNIT("..\..\src\modules\filters\gbfrtf.cpp");
+USEUNIT("..\..\src\modules\filters\gbfstrongs.cpp");
+USEUNIT("..\..\src\modules\filters\gbfthml.cpp");
+USEUNIT("..\..\src\modules\filters\plainfootnotes.cpp");
+USEUNIT("..\..\src\modules\filters\plainhtml.cpp");
+USEUNIT("..\..\src\modules\filters\rtfhtml.cpp");
+USEUNIT("..\..\src\modules\filters\rwphtml.cpp");
+USEUNIT("..\..\src\modules\filters\rwprtf.cpp");
+USEUNIT("..\..\src\modules\filters\thmlgbf.cpp");
+USEUNIT("..\..\src\modules\filters\thmlhtml.cpp");
+USEUNIT("..\..\src\modules\filters\thmlplain.cpp");
+USEUNIT("..\..\src\modules\filters\cipherfil.cpp");
+USEUNIT("..\..\src\modules\lexdict\swld.cpp");
+USEUNIT("..\..\src\modules\lexdict\rawld\rawld.cpp");
+USEUNIT("..\..\src\modules\texts\swtext.cpp");
+USEUNIT("..\..\src\modules\texts\rawtext\rawtext.cpp");
+USEUNIT("..\..\src\modules\texts\ztext\ztext.cpp");
+USEUNIT("..\..\src\modules\common\zverse.cpp");
+USEUNIT("..\..\src\keys\treekey.cpp");
+USEUNIT("..\..\src\keys\treekeyidx.cpp");
+USEUNIT("..\..\src\modules\common\rawstr4.cpp");
+USEUNIT("..\..\src\modules\common\zstr.cpp");
+USEUNIT("..\..\src\modules\genbook\swgenbook.cpp");
+USEUNIT("..\..\src\modules\genbook\rawgenbook\rawgenbook.cpp");
+USEUNIT("..\..\src\mgr\swfiltermgr.cpp");
+USEUNIT("..\..\src\modules\filters\utf8utf16.cpp");
+USEUNIT("..\..\src\modules\filters\gbfheadings.cpp");
+USEUNIT("..\..\src\modules\filters\gbfhtmlhref.cpp");
+USEUNIT("..\..\src\modules\filters\gbfmorph.cpp");
+USEUNIT("..\..\src\modules\filters\latin1utf16.cpp");
+USEUNIT("..\..\src\modules\filters\latin1utf8.cpp");
+USEUNIT("..\..\src\modules\filters\scsuutf8.cpp");
+USEUNIT("..\..\src\modules\filters\swbasicfilter.cpp");
+USEUNIT("..\..\src\modules\filters\thmlfootnotes.cpp");
+USEUNIT("..\..\src\modules\filters\thmlheadings.cpp");
+USEUNIT("..\..\src\modules\filters\thmlhtmlhref.cpp");
+USEUNIT("..\..\src\modules\filters\thmllemma.cpp");
+USEUNIT("..\..\src\modules\filters\thmlmorph.cpp");
+USEUNIT("..\..\src\modules\filters\thmlolb.cpp");
+USEUNIT("..\..\src\modules\filters\thmlscripref.cpp");
+USEUNIT("..\..\src\modules\filters\thmlstrongs.cpp");
+USEUNIT("..\..\src\modules\filters\thmlvariants.cpp");
+USEUNIT("..\..\src\modules\filters\unicodertf.cpp");
+USEUNIT("..\..\src\modules\filters\utf16utf8.cpp");
+USEUNIT("..\..\src\modules\filters\utf8arshaping.cpp");
+USEUNIT("..\..\src\modules\filters\utf8bidireorder.cpp");
+USEUNIT("..\..\src\modules\filters\utf8cantillation.cpp");
+USEUNIT("..\..\src\modules\filters\utf8greekaccents.cpp");
+USEUNIT("..\..\src\modules\filters\utf8hebrewpoints.cpp");
+USEUNIT("..\..\src\modules\filters\utf8html.cpp");
+USEUNIT("..\..\src\modules\filters\utf8latin1.cpp");
+USEUNIT("..\..\src\modules\filters\utf8nfc.cpp");
+USEUNIT("..\..\src\modules\filters\utf8nfkd.cpp");
+USEUNIT("..\..\src\modules\filters\utf8transliterator.cpp");
+USEUNIT("..\..\src\utilfuns\roman.c");
+USEUNIT("..\..\src\modules\comments\zcom\zcom.cpp");
+USEUNIT("..\..\src\modules\lexdict\rawld4\rawld4.cpp");
+USEUNIT("..\..\src\modules\common\zipcomprs.cpp");
+USEUNIT("..\..\src\modules\lexdict\zld\zld.cpp");
+USEUNIT("..\..\src\modules\common\entriesblk.cpp");
+USEUNIT("..\..\src\utilfuns\zlib\zutil.c");
+USEUNIT("..\..\src\utilfuns\zlib\compress.c");
+USEUNIT("..\..\src\utilfuns\zlib\crc32.c");
+USEUNIT("..\..\src\utilfuns\zlib\deflate.c");
+USEUNIT("..\..\src\utilfuns\zlib\gzio.c");
+USEUNIT("..\..\src\utilfuns\zlib\infblock.c");
+USEUNIT("..\..\src\utilfuns\zlib\infcodes.c");
+USEUNIT("..\..\src\utilfuns\zlib\inffast.c");
+USEUNIT("..\..\src\utilfuns\zlib\inflate.c");
+USEUNIT("..\..\src\utilfuns\zlib\inftrees.c");
+USEUNIT("..\..\src\utilfuns\zlib\infutil.c");
+USEUNIT("..\..\src\utilfuns\zlib\trees.c");
+USEUNIT("..\..\src\utilfuns\zlib\uncompr.c");
+USEUNIT("..\..\src\utilfuns\zlib\untgz.c");
+USEUNIT("..\..\src\utilfuns\zlib\adler32.c");
+USEUNIT("..\..\src\modules\filters\thmlosis.cpp");
+USEUNIT("..\..\src\modules\filters\greeklexattribs.cpp");
+USEUNIT("..\..\src\mgr\swcacher.cpp");
+USEUNIT("..\..\src\modules\filters\gbfosis.cpp");
+//---------------------------------------------------------------------------
+#define Library
+
+// To add a file to the library use the Project menu 'Add to Project'.
+
diff --git a/tests/bcppmake/libsword.bpr b/tests/bcppmake/libsword.bpr
new file mode 100644
index 0000000..63a2245
--- /dev/null
+++ b/tests/bcppmake/libsword.bpr
@@ -0,0 +1,197 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="libsword.lib"/>
+ <OBJFILES value="..\..\src\keys\versekey.obj ..\..\src\keys\strkey.obj
+ ..\..\src\keys\swkey.obj ..\..\src\keys\listkey.obj
+ ..\..\src\mgr\swmgr.obj ..\..\src\mgr\localemgr.obj
+ ..\..\src\mgr\swconfig.obj ..\..\src\mgr\swlocale.obj
+ ..\..\src\mgr\filemgr.obj ..\..\src\utilfuns\utilstr.obj
+ ..\..\src\utilfuns\utilconf.obj ..\..\src\utilfuns\Greek2Greek.obj
+ ..\..\src\frontend\swlog.obj ..\..\src\frontend\swdisp.obj
+ ..\..\src\modules\swmodule.obj ..\..\src\modules\comments\swcom.obj
+ ..\..\src\modules\comments\hrefcom\hrefcom.obj
+ ..\..\src\modules\comments\rawcom\rawcom.obj
+ ..\..\src\modules\comments\rawfiles\rawfiles.obj
+ ..\..\src\modules\common\lzsscomprs.obj
+ ..\..\src\modules\common\rawstr.obj ..\..\src\modules\common\rawverse.obj
+ ..\..\src\modules\common\sapphire.obj
+ ..\..\src\modules\common\swcipher.obj ..\..\src\modules\common\swcomprs.obj
+ ..\..\src\modules\filters\thmlrtf.obj
+ ..\..\src\modules\filters\gbffootnotes.obj
+ ..\..\src\modules\filters\gbfhtml.obj
+ ..\..\src\modules\filters\gbfplain.obj
+ ..\..\src\modules\filters\gbfrtf.obj ..\..\src\modules\filters\gbfstrongs.obj
+ ..\..\src\modules\filters\gbfthml.obj
+ ..\..\src\modules\filters\plainfootnotes.obj
+ ..\..\src\modules\filters\plainhtml.obj
+ ..\..\src\modules\filters\rtfhtml.obj
+ ..\..\src\modules\filters\rwphtml.obj ..\..\src\modules\filters\rwprtf.obj
+ ..\..\src\modules\filters\thmlgbf.obj
+ ..\..\src\modules\filters\thmlhtml.obj
+ ..\..\src\modules\filters\thmlplain.obj
+ ..\..\src\modules\filters\cipherfil.obj ..\..\src\modules\lexdict\swld.obj
+ ..\..\src\modules\lexdict\rawld\rawld.obj
+ ..\..\src\modules\texts\swtext.obj
+ ..\..\src\modules\texts\rawtext\rawtext.obj
+ ..\..\src\modules\texts\ztext\ztext.obj
+ ..\..\src\modules\common\zverse.obj ..\..\src\keys\treekey.obj
+ ..\..\src\keys\treekeyidx.obj ..\..\src\modules\common\rawstr4.obj
+ ..\..\src\modules\common\zstr.obj ..\..\src\modules\genbook\swgenbook.obj
+ ..\..\src\modules\genbook\rawgenbook\rawgenbook.obj
+ ..\..\src\mgr\swfiltermgr.obj ..\..\src\modules\filters\utf8utf16.obj
+ ..\..\src\modules\filters\gbfheadings.obj
+ ..\..\src\modules\filters\gbfhtmlhref.obj
+ ..\..\src\modules\filters\gbfmorph.obj
+ ..\..\src\modules\filters\latin1utf16.obj
+ ..\..\src\modules\filters\latin1utf8.obj
+ ..\..\src\modules\filters\scsuutf8.obj
+ ..\..\src\modules\filters\swbasicfilter.obj
+ ..\..\src\modules\filters\thmlfootnotes.obj
+ ..\..\src\modules\filters\thmlheadings.obj
+ ..\..\src\modules\filters\thmlhtmlhref.obj
+ ..\..\src\modules\filters\thmllemma.obj
+ ..\..\src\modules\filters\thmlmorph.obj
+ ..\..\src\modules\filters\thmlolb.obj
+ ..\..\src\modules\filters\thmlscripref.obj
+ ..\..\src\modules\filters\thmlstrongs.obj
+ ..\..\src\modules\filters\thmlvariants.obj
+ ..\..\src\modules\filters\unicodertf.obj
+ ..\..\src\modules\filters\utf16utf8.obj
+ ..\..\src\modules\filters\utf8arshaping.obj
+ ..\..\src\modules\filters\utf8bidireorder.obj
+ ..\..\src\modules\filters\utf8cantillation.obj
+ ..\..\src\modules\filters\utf8greekaccents.obj
+ ..\..\src\modules\filters\utf8hebrewpoints.obj
+ ..\..\src\modules\filters\utf8html.obj
+ ..\..\src\modules\filters\utf8latin1.obj
+ ..\..\src\modules\filters\utf8nfc.obj
+ ..\..\src\modules\filters\utf8nfkd.obj
+ ..\..\src\modules\filters\utf8transliterator.obj
+ ..\..\src\utilfuns\roman.obj ..\..\src\modules\comments\zcom\zcom.obj
+ ..\..\src\modules\lexdict\rawld4\rawld4.obj
+ ..\..\src\modules\common\zipcomprs.obj
+ ..\..\src\modules\lexdict\zld\zld.obj
+ ..\..\src\modules\common\entriesblk.obj ..\..\src\utilfuns\zlib\zutil.obj
+ ..\..\src\utilfuns\zlib\compress.obj ..\..\src\utilfuns\zlib\crc32.obj
+ ..\..\src\utilfuns\zlib\deflate.obj ..\..\src\utilfuns\zlib\gzio.obj
+ ..\..\src\utilfuns\zlib\infblock.obj ..\..\src\utilfuns\zlib\infcodes.obj
+ ..\..\src\utilfuns\zlib\inffast.obj ..\..\src\utilfuns\zlib\inflate.obj
+ ..\..\src\utilfuns\zlib\inftrees.obj ..\..\src\utilfuns\zlib\infutil.obj
+ ..\..\src\utilfuns\zlib\trees.obj ..\..\src\utilfuns\zlib\uncompr.obj
+ ..\..\src\utilfuns\zlib\untgz.obj ..\..\src\utilfuns\zlib\adler32.obj
+ ..\..\src\modules\filters\thmlosis.obj
+ ..\..\src\modules\filters\greeklexattribs.obj ..\..\src\mgr\swcacher.obj
+ ..\..\src\modules\filters\gbfosis.obj"/>
+ <RESFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value=""/>
+ <LIBRARIES value=""/>
+ <PACKAGES value=""/>
+ <PATHCPP value=".;..\..\src\keys;..\..\src\mgr;..\..\src\utilfuns;..\..\src\frontend;..\..\src\modules;..\..\src\modules\comments;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\rawfiles;..\..\src\modules\common;..\..\src\modules\filters;..\..\src\modules\lexdict;..\..\src\modules\lexdict\rawld;..\..\src\modules\texts;..\..\src\modules\texts\rawtext;..\..\src\modules\texts\ztext;..\..\src\modules\genbook;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\comments\zcom;..\..\src\modules\lexdict\rawld4;..\..\src\modules\lexdict\zld;..\..\src\utilfuns\zlib"/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <LINKER value="TLib"/>
+ <USERDEFINES value="_DEBUG"/>
+ <SYSDEFINES value="NO_STRICT"/>
+ <MAINSOURCE value="libsword.bpf"/>
+ <INCLUDEPATH value="..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl"/>
+ <LIBPATH value="..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ <LISTFILE value=""/>
+ </MACROS>
+ <OPTIONS>
+ <CFLAG1 value="-vGc -vGt -vGd -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k
+ -y -v -vi- -c -tW -tWM"/>
+ <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
+ <AFLAGS value="/mx /w2 /zi"/>
+ <LFLAGS value="/P512"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="$(OBJFILES)"/>
+ <ALLLIB value="cg32.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[HistoryLists\hlIncludePath]
+Count=5
+Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item1=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item2=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item3=..\include;$(BCB)\include;$(BCB)\include\vcl
+Item4=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\include;$(BCB)\include\vcl
+
+[HistoryLists\hlLibraryPath]
+Count=4
+Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib
+Item1=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib
+Item2=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib
+Item3=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\lib\obj;$(BCB)\lib
+
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=$(BCB)\source\vcl
+
+[HistoryLists\hlConditionals]
+Count=1
+Item0=_DEBUG
+
+[HistoryLists\hlTlibPageSize]
+Count=5
+Item0=0x0200
+Item1=0x0080
+Item2=0x0040
+Item3=0x0020
+Item4=0x0010
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+ShowInfoMsgs=0
+LinkDebugVcl=0
+LinkCGLIB=1
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT> \ No newline at end of file
diff --git a/tests/bcppmake/mgrtest.bpf b/tests/bcppmake/mgrtest.bpf
new file mode 100644
index 0000000..31d90b2
--- /dev/null
+++ b/tests/bcppmake/mgrtest.bpf
@@ -0,0 +1,6 @@
+USEUNIT("..\mgrtest.cpp");
+USELIB("libsword.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+ main \ No newline at end of file
diff --git a/tests/bcppmake/mgrtest.bpr b/tests/bcppmake/mgrtest.bpr
new file mode 100644
index 0000000..ddc8477
--- /dev/null
+++ b/tests/bcppmake/mgrtest.bpr
@@ -0,0 +1,114 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="mgrtest.exe"/>
+ <OBJFILES value="..\mgrtest.obj"/>
+ <RESFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="libsword.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_DEBUG"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="mgrtest.bpf"/>
+ <INCLUDEPATH value="..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl"/>
+ <LIBPATH value="..\;..;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <CFLAG1 value="-vGc -vGt -vGd -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k
+ -y -v -vi- -tWC -tWM -c"/>
+ <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zi"/>
+ <LFLAGS value="-D&quot;&quot; -S:0x300000 -Sc:0x20000 -ap -Tpe -x -Gn -v"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="cg32.lib $(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[HistoryLists\hlIncludePath]
+Count=4
+Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl
+
+[HistoryLists\hlLibraryPath]
+Count=3
+Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib
+Item1=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib
+Item2=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib
+
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=$(BCB)\source\vcl
+
+[HistoryLists\hlConditionals]
+Count=1
+Item0=_DEBUG
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+ShowInfoMsgs=0
+LinkDebugVcl=0
+LinkCGLIB=1
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT> \ No newline at end of file
diff --git a/tests/bcppmake/parsekey.bpf b/tests/bcppmake/parsekey.bpf
new file mode 100644
index 0000000..01b1e28
--- /dev/null
+++ b/tests/bcppmake/parsekey.bpf
@@ -0,0 +1,6 @@
+USEUNIT("..\parsekey.cpp");
+USELIB("libsword.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+ main \ No newline at end of file
diff --git a/tests/bcppmake/parsekey.bpr b/tests/bcppmake/parsekey.bpr
new file mode 100644
index 0000000..f60658a
--- /dev/null
+++ b/tests/bcppmake/parsekey.bpr
@@ -0,0 +1,114 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="parsekey.exe"/>
+ <OBJFILES value="..\parsekey.obj"/>
+ <RESFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="libsword.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_DEBUG"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="parsekey.bpf"/>
+ <INCLUDEPATH value="..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl"/>
+ <LIBPATH value="..\;..;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <CFLAG1 value="-vGc -vGt -vGd -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k
+ -y -v -vi- -tWC -tWM -c"/>
+ <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zi"/>
+ <LFLAGS value="-D&quot;&quot; -S:0x300000 -Sc:0x20000 -ap -Tpe -x -Gn -v"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="cg32.lib $(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[HistoryLists\hlIncludePath]
+Count=4
+Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl
+
+[HistoryLists\hlLibraryPath]
+Count=3
+Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib
+Item1=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib
+Item2=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib
+
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=$(BCB)\source\vcl
+
+[HistoryLists\hlConditionals]
+Count=1
+Item0=_DEBUG
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+ShowInfoMsgs=0
+LinkDebugVcl=0
+LinkCGLIB=1
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT> \ No newline at end of file
diff --git a/tests/bcppmake/tests.bpg b/tests/bcppmake/tests.bpg
new file mode 100644
index 0000000..ab1bb9c
--- /dev/null
+++ b/tests/bcppmake/tests.bpg
@@ -0,0 +1,33 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = libsword.lib parsekey.exe filtertest.exe mgrtest.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+libsword.lib: libsword.bpr
+ $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+parsekey.exe: parsekey.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+filtertest.exe: filtertest.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+mgrtest.exe: mgrtest.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+
diff --git a/tests/casttest.cpp b/tests/casttest.cpp
new file mode 100644
index 0000000..af7576b
--- /dev/null
+++ b/tests/casttest.cpp
@@ -0,0 +1,26 @@
+#include <iostream>
+#include <versekey.h>
+#include <treekeyidx.h>
+#include <listkey.h>
+int main(int argc, char **argv) {
+// VerseKey x("jas");
+ TreeKeyIdx x("jas");
+// ListKey x("jas");
+ SWKey *y = &x;
+ TreeKeyIdx *v = &x;
+// VerseKey *v = &x;
+// ListKey *v = &x;
+
+// v = SWDYNAMIC_CAST(VerseKey, y);
+ v = SWDYNAMIC_CAST(TreeKeyIdx, y);
+// v = SWDYNAMIC_CAST(ListKey, y);
+ std::cout << std::endl;
+ if (v)
+ std::cout << (const char *)(*v);
+ else
+ std::cout << "cast failed\n";
+
+ std::cout << std::endl;
+ std::cout << std::endl;
+ return 0;
+}
diff --git a/tests/complzss.cpp b/tests/complzss.cpp
new file mode 100644
index 0000000..ed1cacb
--- /dev/null
+++ b/tests/complzss.cpp
@@ -0,0 +1,109 @@
+
+
+#include <ctype.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef __GNUC__
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+#include <lzsscomprs.h>
+
+class FileCompress: public LZSSCompress {
+ int ifd;
+ int ofd;
+ int ufd;
+ int zfd;
+public:
+ FileCompress(char *);
+ ~FileCompress();
+ unsigned long GetChars(char *, unsigned long len);
+ unsigned long SendChars(char *, unsigned long len);
+ void Encode();
+ void Decode();
+};
+
+
+FileCompress::FileCompress(char *fname)
+{
+ char buf[256];
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+ ufd = open(fname, O_RDWR|O_CREAT|O_BINARY, 00644);
+
+ sprintf(buf, "%s.lzs", fname);
+ zfd = open(buf, O_RDWR|O_CREAT|O_BINARY, 00644);
+}
+
+
+FileCompress::~FileCompress()
+{
+ close(ufd);
+ close(zfd);
+}
+
+
+unsigned long FileCompress::GetChars(char *buf, unsigned long len)
+{
+ return read(ifd, buf, len);
+}
+
+
+unsigned long FileCompress::SendChars(char *buf, unsigned long len)
+{
+ return write(ofd, buf, len);
+}
+
+
+void FileCompress::Encode()
+{
+ ifd = ufd;
+ ofd = zfd;
+
+ LZSSCompress::Encode();
+}
+
+
+void FileCompress::Decode()
+{
+ ifd = zfd;
+ ofd = ufd;
+
+ LZSSCompress::Decode();
+}
+
+
+int main(int argc, char **argv)
+{
+ int decomp = 0;
+ SWCompress *fobj;
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <filename|filename.lzs>\n", argv[0]);
+ exit(1);
+ }
+
+ if (strlen(argv[1]) > 4) {
+ if (!strcmp(&argv[1][strlen(argv[1])-4], ".lzs")) {
+ argv[1][strlen(argv[1])-4] = 0;
+ decomp = 1;
+ }
+ }
+
+ fobj = new FileCompress(argv[1]);
+
+ if (decomp)
+ fobj->Decode();
+ else fobj->Encode();
+
+ delete fobj;
+}
diff --git a/tests/compnone.cpp b/tests/compnone.cpp
new file mode 100644
index 0000000..a08c10e
--- /dev/null
+++ b/tests/compnone.cpp
@@ -0,0 +1,109 @@
+
+
+#include <ctype.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef __GNUC__
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+#include <swcomprs.h>
+
+class FileCompress: public SWCompress {
+ int ifd;
+ int ofd;
+ int ufd;
+ int zfd;
+public:
+ FileCompress(char *);
+ ~FileCompress();
+ unsigned long GetChars(char *, unsigned long len);
+ unsigned long SendChars(char *, unsigned long len);
+ void Encode();
+ void Decode();
+};
+
+
+FileCompress::FileCompress(char *fname)
+{
+ char buf[256];
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+ ufd = open(fname, O_RDWR|O_CREAT|O_BINARY, 00644);
+
+ sprintf(buf, "%s.zzz", fname);
+ zfd = open(buf, O_RDWR|O_CREAT|O_BINARY, 00644);
+}
+
+
+FileCompress::~FileCompress()
+{
+ close(ufd);
+ close(zfd);
+}
+
+
+unsigned long FileCompress::GetChars(char *buf, unsigned long len)
+{
+ return read(ifd, buf, len);
+}
+
+
+unsigned long FileCompress::SendChars(char *buf, unsigned long len)
+{
+ return write(ofd, buf, len);
+}
+
+
+void FileCompress::Encode()
+{
+ ifd = ufd;
+ ofd = zfd;
+
+ SWCompress::Encode();
+}
+
+
+void FileCompress::Decode()
+{
+ ifd = zfd;
+ ofd = ufd;
+
+ SWCompress::Decode();
+}
+
+
+int main(int argc, char **argv)
+{
+ int decomp = 0;
+ SWCompress *fobj;
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <filename|filename.zzz>\n", argv[0]);
+ exit(1);
+ }
+
+ if (strlen(argv[1]) > 4) {
+ if (!strcmp(&argv[1][strlen(argv[1])-4], ".zzz")) {
+ argv[1][strlen(argv[1])-4] = 0;
+ decomp = 1;
+ }
+ }
+
+ fobj = new FileCompress(argv[1]);
+
+ if (decomp)
+ fobj->Decode();
+ else fobj->Encode();
+
+ delete fobj;
+}
diff --git a/tests/compzip.cpp b/tests/compzip.cpp
new file mode 100644
index 0000000..cbc5c5c
--- /dev/null
+++ b/tests/compzip.cpp
@@ -0,0 +1,107 @@
+#include <ctype.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+
+#ifndef __GNUC__
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+#include <zipcomprs.h>
+
+class FileCompress: public ZipCompress {
+ int ifd;
+ int ofd;
+ int ufd;
+ int zfd;
+public:
+ FileCompress(char *);
+ ~FileCompress();
+ unsigned long GetChars(char *, unsigned long len);
+ unsigned long SendChars(char *, unsigned long len);
+ void Encode();
+ void Decode();
+};
+
+
+FileCompress::FileCompress(char *fname)
+{
+ char buf[256];
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+ ufd = open(fname, O_RDWR|O_CREAT|O_BINARY, 00644);
+
+ sprintf(buf, "%s.zip", fname);
+ zfd = open(buf, O_RDWR|O_CREAT|O_BINARY, 00644);
+}
+
+
+FileCompress::~FileCompress()
+{
+ close(ufd);
+ close(zfd);
+}
+
+
+unsigned long FileCompress::GetChars(char *buf, unsigned long len)
+{
+ return read(ifd, buf, len);
+}
+
+
+unsigned long FileCompress::SendChars(char *buf, unsigned long len)
+{
+ return write(ofd, buf, len);
+}
+
+
+void FileCompress::Encode()
+{
+ ifd = ufd;
+ ofd = zfd;
+
+ ZipCompress::Encode();
+}
+
+
+void FileCompress::Decode()
+{
+ ifd = zfd;
+ ofd = ufd;
+
+ ZipCompress::Decode();
+}
+
+
+main(int argc, char **argv)
+{
+ int decomp = 0;
+ SWCompress *fobj;
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <filename|filename.zip>\n", argv[0]);
+ exit(1);
+ }
+
+ if (strlen(argv[1]) > 4) {
+ if (!strcmp(&argv[1][strlen(argv[1])-4], ".zip")) {
+ argv[1][strlen(argv[1])-4] = 0;
+ decomp = 1;
+ }
+ }
+
+ fobj = new FileCompress(argv[1]);
+
+ if (decomp)
+ fobj->Decode();
+ else fobj->Encode();
+
+ delete fobj;
+}
diff --git a/tests/configtest.cpp b/tests/configtest.cpp
new file mode 100644
index 0000000..c6645eb
--- /dev/null
+++ b/tests/configtest.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+#include <swconfig.h>
+
+int main(int argc, char **argv) {
+ SWConfig config("./test1.conf");
+ config["Section1"]["Entry1"] = "Value1";
+ config["Section1"]["Entry2"] = "oops";
+ config["Section1"]["Entry2"] = "Value2";
+ config.Save();
+ SWConfig config2("./test1.conf");
+ std::cout << "Should be Value2: " << config2["Section1"]["Entry2"] << std::endl;
+ return 0;
+}
diff --git a/tests/filtertest.cpp b/tests/filtertest.cpp
new file mode 100644
index 0000000..5206652
--- /dev/null
+++ b/tests/filtertest.cpp
@@ -0,0 +1,31 @@
+#include <iostream>
+#include <thmlhtmlhref.h>
+#include <thmlosis.h>
+#include <gbfosis.h>
+#include <versekey.h>
+#include <swmgr.h>
+
+#define MAXBUF 30000
+int main(int argc, char **argv) {
+ SWMgr mgr;
+ SWModule *module = mgr.Modules["KJV"];
+ if (!module)
+ module = mgr.Modules.begin()->second;
+
+ ((VerseKey *)(SWKey *)*module)->AutoNormalize(0);
+ ((VerseKey *)(SWKey *)*module)->Headings(1);
+// ThMLHTMLHREF filter;
+ GBFOSIS filter;
+ module->Key() = ((argc > 1) ? argv[1] : "jas1:1");
+ char *buf = new char [ MAXBUF ];
+ memset(buf, 0, MAXBUF);
+// strcpy(buf, "This is a verse reference: <scripRef>jas1:22,23-25;3;5:1;rom1-9</scripRef> with an <img src=\"/images/yoyo.jpg\">");
+ module->getRawEntry();
+ memcpy(buf, module->getRawEntry(), module->getEntrySize());
+ std::cout << "Original:\n\n" << buf << "\n\n-------\n\n";
+ filter.ProcessText(buf, MAXBUF - 3, *module, module);
+
+ std::cout << buf << "\n\n+++++++\n";
+ delete [] buf;
+ return 0;
+}
diff --git a/tests/genbooktest.cpp b/tests/genbooktest.cpp
new file mode 100644
index 0000000..c97d4c9
--- /dev/null
+++ b/tests/genbooktest.cpp
@@ -0,0 +1,174 @@
+#include <entriesblk.h>
+#include <iostream>
+#include <string>
+#include <stdio.h>
+#include <treekeyidx.h>
+#include <rawgenbook.h>
+
+
+void printTree(TreeKeyIdx treeKey, TreeKeyIdx *target = 0, int level = 1) {
+ if (!target)
+ target = &treeKey;
+
+ unsigned long currentOffset = target->getOffset();
+ std::cout << ((currentOffset == treeKey.getOffset()) ? "==>" : "");
+ for (int i = 0; i < level; i++) std::cout << "\t";
+ std::cout << treeKey.getLocalName() << "/\n";
+ if (treeKey.firstChild()) {
+ printTree(treeKey, target, level+1);
+ treeKey.parent();
+ }
+ if (treeKey.nextSibling())
+ printTree(treeKey, target, level);
+
+}
+
+
+void printLocalName(TreeKeyIdx *treeKey) {
+ std::cout << "locaName: " << treeKey->getLocalName() << "\n";
+}
+
+
+void setLocalName(TreeKeyIdx *treeKey) {
+ char buf[1023];
+ std::cout << "Enter New Node Name: ";
+ gets(buf);
+ treeKey->setLocalName(buf);
+ treeKey->save();
+}
+
+
+void gotoPath(TreeKeyIdx *treeKey) {
+ char buf[1023];
+ std::cout << "Enter Path: ";
+ gets(buf);
+ (*treeKey) = buf;
+}
+
+
+void viewEntryText(RawGenBook *book) {
+ std::cout << "\n";
+ std::cout << book->RenderText();
+ std::cout << "\n";
+}
+
+
+void setEntryText(RawGenBook *book) {
+ string body;
+ TreeKeyIdx *treeKey = (TreeKeyIdx *)(SWKey *)(*book);
+ if (treeKey->getOffset()) {
+ char buf[1023];
+ std::cout << "Enter New Entry Text ('.' on a line by itself to end): \n";
+ do {
+ gets(buf);
+ if ((buf[0] == '.') && (buf[1] == 0))
+ break;
+ body += buf;
+ body += "\n";
+ } while (true);
+
+ (*book) << body.c_str();
+ }
+ else std::cout << "Can't add entry text to root node\n";
+}
+
+
+void appendSibbling(TreeKeyIdx *treeKey) {
+ if (treeKey->getOffset()) {
+ char buf[1023];
+ std::cout << "Enter New Sibbling Name: ";
+ gets(buf);
+ treeKey->append();
+ treeKey->setLocalName(buf);
+ treeKey->save();
+ }
+ else std::cout << "Can't add sibling to root node\n";
+}
+
+
+void appendChild(TreeKeyIdx *treeKey) {
+ char buf[1023];
+ std::cout << "Enter New Child Name: ";
+ gets(buf);
+ treeKey->appendChild();
+ treeKey->setLocalName(buf);
+ treeKey->save();
+}
+
+
+void removeEntry(EntriesBlock *eb, int index) {
+ if (index < eb->getCount()) {
+ std::cout << "Removing entry [" << index << "]\n";
+ eb->removeEntry(index);
+ }
+ else std::cout << "Invalid entry number\n\n";
+}
+
+
+int main(int argc, char **argv) {
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <tree/key/data/path>\n", *argv);
+ exit(-1);
+ }
+
+ TreeKeyIdx *treeKey = new TreeKeyIdx(argv[1]);
+
+ if (treeKey->Error()) {
+ RawGenBook::createModule(argv[1]);
+ }
+ delete treeKey;
+
+ RawGenBook *book = new RawGenBook(argv[1]);
+ TreeKeyIdx root = *((TreeKeyIdx *)((SWKey *)(*book)));
+ treeKey = (TreeKeyIdx *)(SWKey *)(*book);
+
+ string input;
+ char line[1024];
+
+ do {
+ std::cout << "[" << treeKey->getFullName() << "] > ";
+ gets(line);
+ input = line;
+ if (input.length() > 0) {
+ switch (input[0]) {
+ case 'n': printLocalName(treeKey); break;
+ case 's': setLocalName(treeKey); break;
+ case 'g': gotoPath(treeKey); break;
+ case 'p': root.root(); printTree(root, treeKey); break;
+ case 'a': appendSibbling(treeKey); break;
+ case 'c': appendChild(treeKey); break;
+ case 'j': treeKey->nextSibling(); break;
+ case 'k': treeKey->previousSibling(); break;
+ case 'h': treeKey->parent(); break;
+ case 'l': treeKey->firstChild(); break;
+ case 'r': treeKey->root(); break;
+ case 't': setEntryText(book); break;
+ case 'v': viewEntryText(book); break;
+ case 'q': break;
+ case '?':
+ default:
+ std::cout << "\n p - print tree\n";
+ std::cout << " n - get local name\n";
+ std::cout << " s - set local name\n";
+ std::cout << " j - next sibbling\n";
+ std::cout << " k - previous sibbling\n";
+ std::cout << " h - parent\n";
+ std::cout << " l - first child\n";
+ std::cout << " r - root\n";
+ std::cout << " g - goto path\n";
+ std::cout << " a - append sibbling\n";
+ std::cout << " c - append child\n";
+ std::cout << " v - view entry text\n";
+ std::cout << " t - set entry text\n";
+ std::cout << " q - quit\n\n";
+ break;
+ }
+ }
+ }
+ while (input.compare("q"));
+
+ delete treeKey;
+
+ return 0;
+}
diff --git a/tests/icutest.cpp b/tests/icutest.cpp
new file mode 100644
index 0000000..fa3cf3d
--- /dev/null
+++ b/tests/icutest.cpp
@@ -0,0 +1,34 @@
+#include <iostream>
+#include <string>
+
+#include "unicode/utypes.h" /* Basic ICU data types */
+#include "unicode/ucnv.h" /* C Converter API */
+#include "unicode/convert.h" /* C++ Converter API */
+#include "unicode/ustring.h" /* some more string fcns*/
+
+#include "unicode/translit.h"
+
+int main() {
+
+ UChar * uBuf;
+ UChar * target;
+ UConverter *conv;
+ UErrorCode status = U_ZERO_ERROR;
+ int32_t uBufSize = 0, uLength = 0;
+
+ char * samplestring = "If this compiles and runs without errors, apparently ICU is working.";
+
+ uLength = strlen(samplestring);
+ conv = ucnv_open("utf-8", &status);
+ uBufSize = (uLength/ucnv_getMinCharSize(conv));
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar));
+
+ target = uBuf;
+
+ ucnv_toUChars(conv, target, uLength,
+ samplestring, uLength, &status);
+
+ cout << samplestring << endl;
+
+ return 0;
+}
diff --git a/tests/indextest.cpp b/tests/indextest.cpp
new file mode 100644
index 0000000..fed477e
--- /dev/null
+++ b/tests/indextest.cpp
@@ -0,0 +1,19 @@
+#include <swmgr.h>
+#include <iostream>
+#include <versekey.h>
+
+int main(int argc, char **argv) {
+ SWMgr mymgr;
+
+ SWModule *bbe = mymgr.Modules["BBE"];
+
+ if (bbe) {
+ VerseKey vk;
+ vk.Persist(1);
+ bbe->SetKey(vk);
+ for (; !bbe->Error(); (*bbe)++ ) {
+ std::cout << vk.NewIndex() << std::endl;
+ }
+ }
+ return 0;
+}
diff --git a/tests/introtest.cpp b/tests/introtest.cpp
new file mode 100644
index 0000000..6f1d9b1
--- /dev/null
+++ b/tests/introtest.cpp
@@ -0,0 +1,107 @@
+#include <swmgr.h>
+#include <iostream>
+#include <versekey.h>
+#include <rawtext.h>
+
+int main(int argc, char **argv) {
+ SWMgr mymgr;
+
+ RawText::createModule(".");
+ RawText mod(".");
+
+ VerseKey vk;
+ vk.Headings(1);
+ vk.AutoNormalize(0);
+ vk.Persist(1);
+ mod.SetKey(vk);
+
+ vk.Verse(0);
+ vk.Chapter(0);
+ vk.Book(0);
+ vk.Testament(0);
+
+ mod << "Module heading text";
+
+ vk.Verse(0);
+ vk.Chapter(0);
+ vk.Book(0);
+ vk.Testament(1);
+
+ mod << "OT heading text";
+
+ vk.Testament(1);
+ vk.Book(1);
+ vk.Chapter(0);
+ vk.Verse(0);
+
+ mod << "Gen heading text";
+
+ vk.Testament(1);
+ vk.Book(1);
+ vk.Chapter(1);
+ vk.Verse(0);
+
+ mod << "Gen 1 heading text";
+
+ vk.Testament(1);
+ vk.Book(1);
+ vk.Chapter(1);
+ vk.Verse(1);
+
+ mod << "Gen 1:1 text";
+
+
+ vk.Testament(0);
+ vk.Book(0);
+ vk.Chapter(0);
+ vk.Verse(0);
+
+ std::cout << "Module heading text ?= " << (const char*)mod << std::endl;
+
+ vk.Testament(1);
+ vk.Book(0);
+ vk.Chapter(0);
+ vk.Verse(0);
+
+ std::cout << "OT heading text ?= " << (const char*)mod << std::endl;
+
+ vk.Testament(1);
+ vk.Book(1);
+ vk.Chapter(0);
+ vk.Verse(0);
+
+ std::cout << "Gen heading text ?= " << (const char*)mod << std::endl;
+
+ vk.Testament(1);
+ vk.Book(1);
+ vk.Chapter(1);
+ vk.Verse(0);
+
+ std::cout << "Gen 1 heading text ?= " << (const char*)mod << std::endl;
+
+ vk.Testament(1);
+ vk.Book(1);
+ vk.Chapter(1);
+ vk.Verse(1);
+
+ std::cout << "Gen 1:1 text ?= " << (const char*)mod << std::endl;
+
+ /* old introtest
+ SWModule *mhc = mymgr.Modules["MHC"];
+
+ if (mhc) {
+ VerseKey vk;
+ vk.Headings(1);
+ vk.AutoNormalize(0);
+ vk.Persist(1);
+ vk = "jas 0:0";
+ std::cout << vk << ":\n";
+ mhc->SetKey(vk);
+ std::cout << (const char *) mhc->Key() << ":\n";
+ std::cout << (const char *) *mhc << "\n";
+ }
+ */
+ return 0;
+}
+
+
diff --git a/tests/keycast.cpp b/tests/keycast.cpp
new file mode 100644
index 0000000..4245592
--- /dev/null
+++ b/tests/keycast.cpp
@@ -0,0 +1,30 @@
+#include <swmgr.h>
+#include <iostream>
+
+int main (int argc, char* argv[]) {
+ SWMgr mgr;
+
+//the commented out code works
+/*
+ OptionsList globalOptions = mgr.getGlobalOptions();
+ for (OptionsList::iterator it = globalOptions.begin(); it != globalOptions.end(); it++) {
+ std::cout << *it << std::endl;
+
+ OptionsList values = mgr.getGlobalOptionValues((*it).c_str());
+ for (OptionsList::iterator it2 = values.begin(); it2 != values.end(); it2++) {
+ std::cout << "\t"<< *it2 << std::endl;
+ }
+ }
+*/
+
+//crashes
+ OptionsList values = mgr.getGlobalOptionValues("Footnotes");
+ for (OptionsList::iterator it2 = values.begin(); it2 != values.end(); it2++) {
+ std::cout << "\t"<< *it2 << std::endl;
+ }
+};
+
+
+
+
+
diff --git a/tests/keytest.cpp b/tests/keytest.cpp
new file mode 100644
index 0000000..2cb9e75
--- /dev/null
+++ b/tests/keytest.cpp
@@ -0,0 +1,169 @@
+#include <stdio.h>
+#include <iostream>
+#include <versekey.h>
+#include <rawtext.h>
+#include <rawcom.h>
+#include <echomod.h>
+#include <stdlib.h>
+
+#include <localemgr.h>
+
+int main(int argc, char **argv)
+{
+ int loop;
+ int max;
+
+ if (argc > 1)
+ LocaleMgr::systemLocaleMgr.setDefaultLocaleName(argv[1]);
+
+ VerseKey bla;
+ long index;
+
+
+ if (argc < 2)
+ bla = "James 1:19";
+ else bla = argv[1];
+
+ std::cout << "\n loop++; (.Index(Index()+1))\n";
+
+ max = (argc < 3) ? 10 : atoi(argv[2]);
+
+ for (loop = 0; loop < max; loop++, bla++) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")";
+ bla.Index(index+1);
+ std::cout << "-> " << (const char *)bla << "\n";
+ }
+
+ std::cout << "-----------------\n";
+ std::cout << "\n loop--; (.Index(Index()-1))\n";
+ if (argc < 2)
+ bla = "James 1:19";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla--) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")";
+ bla.Index(index-1);
+ std::cout << "-> " << (const char *)bla << "\n";
+ }
+
+ std::cout << "-----------------\n";
+ std::cout << "--------- No Headings --------\n";
+
+ if (argc < 2)
+ bla = "Matthew 1:5";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla--) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+ std::cout << "-----------------\n";
+
+ if (argc < 2)
+ bla = "Genesis 1:5";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla--) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+ std::cout << "-----------------\n";
+
+ if (argc < 2)
+ bla = "Malachi 4:2";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla++) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+ std::cout << "-----------------\n";
+
+ if (argc < 2)
+ bla = "Revelation of John 22:17";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla++) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+
+ std::cout << "-----------------\n";
+ std::cout << "-------- Headings ---------\n";
+
+ bla.Headings(1);
+
+ if (argc < 2)
+ bla = "Matthew 1:5";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla--) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+ std::cout << "-----------------\n";
+
+ if (argc < 2)
+ bla = "Genesis 1:5";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla--) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+ std::cout << "-----------------\n";
+
+ if (argc < 2)
+ bla = "Malachi 4:2";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla++) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+ std::cout << "-----------------\n";
+
+ if (argc < 2)
+ bla = "Revelation of John 22:17";
+ else bla = argv[1];
+
+ for (loop = max; loop; loop--, bla++) {
+ index = bla.Index();
+ std::cout << (const char *)bla << "(" << index << ")\n";
+ }
+
+ std::cout << "\n\n";
+
+ std::cout << "-------- Error Check ------------\n\n";
+ bla = "Revelation of John 23:19";
+ std::cout << "bla = \"Revelation of John 23:19\"\n";
+ std::cout << "(const char *)bla = " << (const char *)bla << "\n";
+ std::cout << "bla.Error() = " << (int)bla.Error() << " \n";
+ std::cout << "bla++ \n";
+ bla++;
+ std::cout << "bla.Error() = " << (int)bla.Error() << " \n";
+
+ bla.Headings(0);
+ for (bla = BOTTOM; !bla.Error(); bla.Book(bla.Book()-1))
+ std::cout << (const char *)bla << "\n";
+ bla.Testament(1);
+ bla = BOTTOM;
+ std::cout << bla.Index() << "\n";
+ std::cout << bla.NewIndex() << "\n";
+ std::cout << bla << "\n";
+ bla.Testament(2);
+ bla = BOTTOM;
+ std::cout << bla.Index() << "\n";
+ std::cout << bla.NewIndex() << "\n";
+ std::cout << bla << "\n";
+ return 0;
+}
diff --git a/tests/lextest.cpp b/tests/lextest.cpp
new file mode 100644
index 0000000..72beea0
--- /dev/null
+++ b/tests/lextest.cpp
@@ -0,0 +1,22 @@
+#include <iostream>
+#include <rawld.h>
+
+void main(int argc, char **argv)
+{
+ RawLD::createModule("tmp/lextest");
+ RawLD lex("tmp/lextest");
+
+ lex.SetKey("b");
+ lex << "x";
+
+ lex.SetKey("a");
+ lex << "x";
+
+ lex.SetKey("a");
+ lex.deleteEntry();
+
+// lex.SetKey("a");
+// lex << "y";
+
+ lex = BOTTOM;
+}
diff --git a/tests/listtest.cpp b/tests/listtest.cpp
new file mode 100644
index 0000000..30316cd
--- /dev/null
+++ b/tests/listtest.cpp
@@ -0,0 +1,59 @@
+#include <stdio.h>
+#include <iostream>
+#include <stdlib.h>
+#include <listkey.h>
+#include <versekey.h>
+
+
+int main(int argc, char **argv)
+{
+ ListKey lk, lk2;
+ VerseKey vk("jn 1:1", "jn 1:12");
+ VerseKey vk2("jude", "jude");
+ SWKey text;
+
+ vk = "jas 1:19";
+ text = (const char *)vk;
+ lk << text;
+ lk << text;
+ lk << text;
+ lk << "James 1:19";
+ lk << "yoyo";
+ lk << vk;
+ lk2 << "test1";
+ lk2 << lk;
+ lk2 << vk2;
+ lk2 << "test2";
+ for (lk2 = TOP; !lk2.Error(); lk2++)
+ std::cout << (const char *) lk2 << "\n";
+
+
+ lk2 = VerseKey().ParseVerseList("mat-john", 0, true);
+
+ VerseKey yoyo("john");
+ yoyo = MAXCHAPTER;
+ std::cout << yoyo;
+/*
+
+ for (int i = 0; i < 2; i++) {
+ VerseKey x, y;
+ ListKey lk3;
+ x = "rev";
+ y = x;
+ x = "mat";
+ VerseKey newElement;
+ newElement.LowerBound(x);
+ newElement.UpperBound(y);
+ lk3 << newElement;
+
+ lk2 << lk3;
+ }
+
+*/
+ std::cout << "---------\n";
+
+ for (lk2 = TOP; !lk2.Error(); lk2++)
+ std::cout << (const char *) lk2 << "\n";
+
+ return 0;
+}
diff --git a/tests/localetest.cpp b/tests/localetest.cpp
new file mode 100644
index 0000000..baf7333
--- /dev/null
+++ b/tests/localetest.cpp
@@ -0,0 +1,30 @@
+#include <localemgr.h>
+#include <versekey.h>
+#include <iostream>
+
+int main(int argc, char **argv) {
+ if (argc != 3) {
+ fprintf(stderr, "usage: %s <locale_name> <text>\n", *argv);
+ exit(-1);
+ }
+
+ LocaleMgr lm;
+
+ printf("%s\n", lm.translate(argv[1], argv[2]));
+
+ VerseKey bla;
+ bla = "James 1:19";
+
+ bla.setLocale("de");
+ std::cout << bla << std::endl;
+ bla = "Johannes 1:1";
+ std::cout << bla << std::endl;
+
+ LocaleMgr::systemLocaleMgr.setDefaultLocaleName("de");
+ VerseKey key2;
+ key2.setLocale("en");
+ ListKey list = key2.ParseVerseList("Luke 3:23-28",key2, true);
+ std::cout << list << std::endl;
+
+
+}
diff --git a/tests/mgrtest.cpp b/tests/mgrtest.cpp
new file mode 100644
index 0000000..1a6c359
--- /dev/null
+++ b/tests/mgrtest.cpp
@@ -0,0 +1,31 @@
+#include <swmgr.h>
+#include <iostream>
+#include <versekey.h>
+
+int main(int argc, char **argv) {
+ SWMgr::debug = true;
+ SWMgr mymgr;
+ char keypress[2];
+ std::cerr << "\n\nprefixPath: " << mymgr.prefixPath;
+ std::cerr << "\nconfigPath: " << mymgr.configPath << "\n\n";
+
+
+ ModMap::iterator it;
+
+ for (it = mymgr.Modules.begin(); it != mymgr.Modules.end(); it++) {
+ std::cout << "[" << (*it).second->Name() << "] (Writable: " << (it->second->isWritable()?"Yes":"No") << ") [" << (*it).second->Description() << "]\n";
+ std::cout << "AbsoluteDataPath = " << it->second->getConfigEntry("AbsoluteDataPath") << "\n";
+ std::cout << "Has Feature HebrewDef = " << it->second->getConfig().has("Feature", "HebrewDef") << "\n";
+ if ((!strcmp((*it).second->Type(), "Biblical Texts")) || (!strcmp((*it).second->Type(), "Commentaries"))) {
+ (*it).second->SetKey("James 1:19");
+ std::cout << (const char *) *(*it).second << "\n\n";
+ }
+ }
+ SWModule *mhc = mymgr.Modules["MHC"];
+ if (mhc) {
+ for (mhc->Key("Gen 1:1"); mhc->Key() < (VerseKey) "Gen 1:10"; (*mhc)++)
+ std::cout << (const char *) *mhc << "\n";
+ }
+ cin >> keypress;
+ return 0;
+}
diff --git a/tests/modtest.cpp b/tests/modtest.cpp
new file mode 100644
index 0000000..c65cb12
--- /dev/null
+++ b/tests/modtest.cpp
@@ -0,0 +1,28 @@
+#include <swmgr.h>
+#include <swtext.h>
+#include <iostream>
+
+int main(int argc, char **argv) {
+ SWMgr mymgr;
+ ModMap::iterator it;
+ SWModule *module;
+
+ for (it = mymgr.Modules.begin(); it != mymgr.Modules.end(); it++) {
+ module = it->second;
+ if (!strcmp(module->Type(), "Biblical Texts")) {
+ std::cout << module->Name() << "\n";
+ for (*module = TOP; (!module->Key().Error()); ((VerseKey *)&module->Key())->Book(((VerseKey *)&module->Key())->Book()+1)) {
+ std::cout << module->KeyText() << "\n";
+ }
+ }
+
+ if (!strcmp(module->Type(), "Commentaries")) {
+ std::cout << module->Name() << "\n";
+ for (*module = TOP; (!module->Error()); (*module)--) {
+ std::cout << module->KeyText() << "\n";
+ }
+
+ }
+ }
+ return 0;
+}
diff --git a/tests/parsekey.cpp b/tests/parsekey.cpp
new file mode 100644
index 0000000..277abb5
--- /dev/null
+++ b/tests/parsekey.cpp
@@ -0,0 +1,34 @@
+#include <iostream>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <versekey.h>
+#include <localemgr.h>
+
+int main(int argc, char **argv) {
+ if ((argc != 2) && (argc != 3)) {
+ fprintf(stderr, "usage: %s <\"string to parse\"> [locale name]\n", *argv);
+ exit(-1);
+ }
+
+ if (argc == 3)
+ LocaleMgr::systemLocaleMgr.setDefaultLocaleName(argv[2]);
+
+ VerseKey DefaultVSKey;
+
+ DefaultVSKey = "jas3:1";
+
+ ListKey verses = DefaultVSKey.ParseVerseList(argv[1], DefaultVSKey, true);
+
+ for (int i = 0; i < verses.Count(); i++) {
+ VerseKey *element = dynamic_cast<VerseKey *>(verses.GetElement(i));
+ if (element) {
+ std::cout << (string(element->LowerBound()) + " - " + string(element->UpperBound())).c_str() << "\n";
+ }
+ else std::cout << (const char *)*verses.GetElement(i) << "\n";
+// else {
+// std::cout << VerseKey(verses.GetElement(i)).getOSISRef() << "\n";
+// }
+ }
+ return 0;
+}
diff --git a/tests/romantest.cpp b/tests/romantest.cpp
new file mode 100644
index 0000000..58c1fc2
--- /dev/null
+++ b/tests/romantest.cpp
@@ -0,0 +1,24 @@
+#include <iostream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+extern "C" {
+#include <roman.h>
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <roman_numeral>\n", *argv);
+ exit(-1);
+ }
+ /* I don't think we need to_rom, do we? anyway, it isn't written
+ char buf[127];
+ if (isdigit(argv[1][0])) {
+ to_rom(atoi(argv[1]), buf);
+ std::cout << buf << std::endl;
+ }
+ */
+ else std::cout << from_rom(argv[1]) << std::endl;
+ return 0;
+}
+
diff --git a/tests/swaptest.cpp b/tests/swaptest.cpp
new file mode 100644
index 0000000..2dc8daa
--- /dev/null
+++ b/tests/swaptest.cpp
@@ -0,0 +1,9 @@
+#include <sysdata.h>
+#include <stdio.h>
+
+int main(int argc, char **argv) {
+ printf("0x%.4x 0x%.4x\n", 255, __swap16(255));
+ printf("0x%.8x 0x%.8x\n", 255, __swap32(255));
+// printf("0x%.16x 0x%.16llx\n", 255, __swap64(255));
+ return 0;
+}
diff --git a/tests/testblocks.cpp b/tests/testblocks.cpp
new file mode 100644
index 0000000..3a3ace4
--- /dev/null
+++ b/tests/testblocks.cpp
@@ -0,0 +1,85 @@
+#include <entriesblk.h>
+#include <iostream>
+#include <string>
+#include <stdio.h>
+
+using namespace std;
+
+void addEntry(EntriesBlock *eb) {
+ string input;
+ string body;
+ char line[1024];
+ std::cout << "\nEnter new Entry's text. '.' on an empty line to finish:\n";
+ do {
+ std::cout << "> ";
+ gets(line);
+ input = line;
+ if (input.compare("."))
+ body.append(input);
+ }
+ while (input.compare("."));
+ std::cout << "Adding new entry. Index is: " << eb->addEntry(body.c_str()) << "\n\n";
+}
+
+
+void printEntry(EntriesBlock *eb, int index) {
+ if (index < eb->getCount()) {
+ std::cout << "Contents of entry [" << index << "]:\n";
+ std::cout << eb->getEntry(index) << "\n";
+ }
+ else std::cout << "Invalid entry number\n\n";
+}
+
+
+void printSize(EntriesBlock *eb) {
+ unsigned long size;
+ eb->getRawData(&size);
+ std::cout << "Size of raw data: " << size << "\n\n";
+}
+
+
+void removeEntry(EntriesBlock *eb, int index) {
+ if (index < eb->getCount()) {
+ std::cout << "Removing entry [" << index << "]\n";
+ eb->removeEntry(index);
+ }
+ else std::cout << "Invalid entry number\n\n";
+}
+
+
+int main(int argc, char **argv) {
+
+ EntriesBlock *eb = new EntriesBlock();
+ string input;
+ char line[1024];
+
+ std::cout << "Initial entry count should be 0: " << eb->getCount() << "\n";
+
+ do {
+ std::cout << "[" << eb->getCount() << "] > ";
+ gets(line);
+ input = line;
+ if (input.length() > 0) {
+ switch (input[0]) {
+ case 'a': addEntry(eb); break;
+ case 'p': printEntry(eb, atoi(input.c_str()+1)); break;
+ case 'r': removeEntry(eb, atoi(input.c_str()+1)); break;
+ case 's': printSize(eb); break;
+ case 'q': break;
+ case '?':
+ default:
+ std::cout << "\n a - add a new entry\n";
+ std::cout << " p <entry_index> - print entry\n";
+ std::cout << " r <entry_index> - remove entry\n";
+ std::cout << " s - print size of raw data\n";
+ std::cout << " q - quit\n\n";
+ break;
+ }
+ }
+ }
+ while (input.compare("q"));
+
+ delete eb;
+
+ return 0;
+}
diff --git a/tests/tlitmgrtest.cpp b/tests/tlitmgrtest.cpp
new file mode 100644
index 0000000..9725501
--- /dev/null
+++ b/tests/tlitmgrtest.cpp
@@ -0,0 +1,712 @@
+/*
+ * void Transliterator::initializeRegistry(void) {
+ // Lock first, check registry pointer second
+ Mutex lock(&registryMutex);
+ if (registry != 0) {
+ // We were blocked by another thread in initializeRegistry()
+ return;
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+
+ registry = new TransliteratorRegistry(status);
+ if (registry == 0 || U_FAILURE(status)) {
+ return; // out of memory, no recovery
+ }
+
+ * The following code parses the index table located in
+ * icu/data/translit_index.txt. The index is an n x 4 table
+ * that follows this format:
+ *
+ * <id>:file:<resource>:<direction>
+ * <id>:internal:<resource>:<direction>
+ * <id>:alias:<getInstanceArg>:
+ *
+ * <id> is the ID of the system transliterator being defined. These
+ * are public IDs enumerated by Transliterator.getAvailableIDs(),
+ * unless the second field is "internal".
+ *
+ * <resource> is a ResourceReader resource name. Currently these refer
+ * to file names under com/ibm/text/resources. This string is passed
+ * directly to ResourceReader, together with <encoding>.
+ *
+ * <direction> is either "FORWARD" or "REVERSE".
+ *
+ * <getInstanceArg> is a string to be passed directly to
+ * Transliterator.getInstance(). The returned Transliterator object
+ * then has its ID changed to <id> and is returned.
+ *
+ * The extra blank field on "alias" lines is to make the array square.
+ *
+ static const char translit_index[] = "translit_index";
+
+ UResourceBundle *bundle, *transIDs, *colBund;
+ bundle = ures_openDirect(0, translit_index, &status);
+ transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status);
+
+ int32_t row, maxRows;
+ if (U_SUCCESS(status)) {
+ maxRows = ures_getSize(transIDs);
+ for (row = 0; row < maxRows; row++) {
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+ UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+ UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+ UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
+
+ if (U_SUCCESS(status)) {
+ switch (type) {
+ case 0x66: // 'f'
+ case 0x69: // 'i'
+ // 'file' or 'internal';
+ // row[2]=resource, row[3]=direction
+ {
+ UBool visible = (type == 0x0066 /f/);
+ UTransDirection dir =
+ (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /F/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ registry->put(id, resString, dir, visible);
+ }
+ break;
+ case 0x61: // 'a'
+ // 'alias'; row[2]=createInstance argument
+ registry->put(id, resString, TRUE);
+ break;
+ }
+ }
+ }
+
+ ures_close(colBund);
+ }
+ }
+
+ ures_close(transIDs);
+ ures_close(bundle);
+
+ specialInverses = new Hashtable(TRUE);
+ specialInverses->setValueDeleter(uhash_deleteUnicodeString);
+ _registerSpecialInverse(NullTransliterator::SHORT_ID,
+ NullTransliterator::SHORT_ID, FALSE);
+
+ // Manually add prototypes that the system knows about to the
+ // cache. This is how new non-rule-based transliterators are
+ // added to the system.
+
+ registry->put(new NullTransliterator(), TRUE);
+ registry->put(new LowercaseTransliterator(), TRUE);
+ registry->put(new UppercaseTransliterator(), TRUE);
+ registry->put(new TitlecaseTransliterator(), TRUE);
+ _registerSpecialInverse("Upper", "Lower", TRUE);
+ _registerSpecialInverse("Title", "Lower", FALSE);
+ registry->put(new UnicodeNameTransliterator(), TRUE);
+ registry->put(new NameUnicodeTransliterator(), TRUE);
+ RemoveTransliterator::registerIDs();
+ EscapeTransliterator::registerIDs();
+ UnescapeTransliterator::registerIDs();
+ NormalizationTransliterator::registerIDs();
+ ucln_i18n_registerCleanup();
+}
+*/
+
+
+/*Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID,
+ Entry *entry,
+ TransliteratorAlias* &aliasReturn,
+ UParseError& parseError,
+ UErrorCode& status) {
+
+ for (;;) {
+ if (entry->entryType == Entry::RBT_DATA) {
+ return new RuleBasedTransliterator(ID, entry->u.data);
+ } else if (entry->entryType == Entry::PROTOTYPE) {
+ return entry->u.prototype->clone();
+ } else if (entry->entryType == Entry::ALIAS) {
+ aliasReturn = new TransliteratorAlias(entry->stringArg);
+ return 0;
+ } else if (entry->entryType == Entry::FACTORY) {
+ return entry->u.factory.function(ID, entry->u.factory.context);
+ } else if (entry->entryType == Entry::COMPOUND_RBT) {
+ UnicodeString id("_", "");
+ Transliterator *t = new RuleBasedTransliterator(id, entry->u.data);
+ aliasReturn = new TransliteratorAlias(ID, entry->stringArg, t, entry->intArg, entry->compoundFilter);
+ return 0;
+ }
+
+ TransliteratorParser parser;
+
+ if (entry->entryType == Entry::LOCALE_RULES) {
+ parser.parse(entry->stringArg, (UTransDirection) entry->intArg,
+ parseError, status);
+ } else {
+ {
+ // At this point entry type must be either RULES_FORWARD or
+ // RULES_REVERSE. We process the rule data into a
+ // TransliteratorRuleData object, and possibly also into an
+ // ::id header and/or footer. Then we modify the registry with
+ // the parsed data and retry.
+ UBool isReverse = (entry->entryType == Entry::RULES_REVERSE);
+
+ // We use the file name, taken from another resource bundle
+ // 2-d array at static init time, as a locale language. We're
+ // just using the locale mechanism to map through to a file
+ // name; this in no way represents an actual locale.
+ CharString ch(entry->stringArg);
+ UResourceBundle *bundle = ures_openDirect(0, ch, &status);
+ UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
+ ures_close(bundle);
+
+ // If the status indicates a failure, then we don't have any
+ // rules -- there is probably an installation error. The list
+ // in the root locale should correspond to all the installed
+ // transliterators; if it lists something that's not
+ // installed, we'll get an error from ResourceBundle.
+
+ parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD,
+ parseError, status);
+ }
+
+ if (U_FAILURE(status)) {
+ // We have a failure of some kind. Remove the ID from the
+ // registry so we don't keep trying. NOTE: This will throw off
+ // anyone who is, at the moment, trying to iterate over the
+ // available IDs. That's acceptable since we should never
+ // really get here except under installation, configuration,
+ // or unrecoverable run time memory failures.
+ remove(ID);
+ break;
+ }
+
+ entry->u.data = parser.orphanData();
+ entry->stringArg = parser.idBlock;
+ entry->intArg = parser.idSplitPoint;
+ entry->compoundFilter = parser.orphanCompoundFilter();
+
+ // Reset entry->entryType to something that we process at the
+ // top of the loop, then loop back to the top. As long as we
+ // do this, we only loop through twice at most.
+ // NOTE: The logic here matches that in
+ // Transliterator::createFromRules().
+ if (entry->stringArg.length() == 0) {
+ if (entry->u.data == 0) {
+ // No idBlock, no data -- this is just an
+ // alias for Null
+ entry->entryType = Entry::ALIAS;
+ entry->stringArg = NullTransliterator::ID;
+ } else {
+ // No idBlock, data != 0 -- this is an
+ // ordinary RBT_DATA
+ entry->entryType = Entry::RBT_DATA;
+ return new RuleBasedTransliterator(ID, entry->u.data);
+ }
+ } else {
+ if (entry->u.data == 0) {
+ // idBlock, no data -- this is an alias. The ID has
+ // been munged from reverse into forward mode, if
+ // necessary, so instantiate the ID in the forward
+ // direction.
+ entry->entryType = Entry::ALIAS;
+ } else {
+ // idBlock and data -- this is a compound
+ // RBT
+ entry->entryType = Entry::COMPOUND_RBT;
+ }
+ }
+ }
+
+ return 0; // failed
+}
+*/
+
+#include "unicode/rbt.h"
+#include "unicode/resbund.h"
+#include "unicode/translit.h"
+#include "unicode/ustream.h"
+
+class SWCharString {
+ public:
+ inline SWCharString(const UnicodeString& str);
+ inline ~SWCharString();
+ inline operator const char*() { return ptr; }
+ private:
+ char buf[128];
+ char* ptr;
+};
+
+inline SWCharString::SWCharString(const UnicodeString& str) {
+ // TODO This isn't quite right -- we should probably do
+ // preflighting here to determine the real length.
+ if (str.length() >= (int32_t)sizeof(buf)) {
+ ptr = new char[str.length() + 8];
+ } else {
+ ptr = buf;
+ }
+ str.extract(0, 0x7FFFFFFF, ptr, "");
+}
+
+inline SWCharString::~SWCharString() {
+ if (ptr != buf) {
+ delete[] ptr;
+ }
+}
+
+
+
+static const char RB_RULE_BASED_IDS[] = "RuleBasedTransliteratorIDs";
+
+static const char RB_RULE[] = "Rule";
+
+static const char SW_RESDATA[] = "/usr/local/lib/sword/";
+
+#include <map>
+
+struct SWTransData {
+ UnicodeString resource;
+ UTransDirection dir;
+};
+
+typedef map <const UnicodeString, SWTransData> SWTransMap;
+
+typedef pair<UnicodeString, SWTransData> SWTransPair;
+
+SWTransMap *sw_tmap;
+
+Transliterator * instantiateTrans(const UnicodeString& ID, const UnicodeString& resource,
+ UTransDirection dir, UParseError &parseError, UErrorCode &status );
+
+Transliterator *SWTransFactory(const UnicodeString &ID,
+ Transliterator::Token context)
+{
+ std::cout << "running factory for " << ID << std::endl;
+ SWTransMap::iterator swelement;
+ if ((swelement = sw_tmap->find(ID)) != sw_tmap->end())
+ {
+ std::cout << "found element in map" << std::endl;
+ SWTransData swstuff = (*swelement).second;
+ UParseError parseError;
+ UErrorCode status;
+ std::cout << "unregistering " << ID << std::endl;
+ Transliterator::unregister(ID);
+ std::cout << "resource is " << swstuff.resource << std::endl;
+ Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
+ return trans;
+ }
+ return NULL;
+}
+
+void instantiateTransFactory(const UnicodeString& ID, const UnicodeString& resource,
+ UTransDirection dir, UParseError &parseError, UErrorCode &status )
+{
+ std::cout << "making factory for ID " << ID << std::endl;
+ Transliterator::Token context;
+ SWTransData swstuff;
+ swstuff.resource = resource;
+ swstuff.dir = dir;
+ SWTransPair swpair;
+ swpair.first = ID;
+ swpair.second = swstuff;
+ sw_tmap->insert(swpair);
+ Transliterator::registerFactory(ID, &SWTransFactory, context);
+}
+
+void registerTrans(const UnicodeString& ID, const UnicodeString& resource,
+ UTransDirection dir, UErrorCode &status )
+{
+ std::cout << "registering ID locally " << ID << std::endl;
+ SWTransData swstuff;
+ swstuff.resource = resource;
+ swstuff.dir = dir;
+ SWTransPair swpair;
+ swpair.first = ID;
+ swpair.second = swstuff;
+ sw_tmap->insert(swpair);
+}
+
+bool checkTrans(const UnicodeString& ID, UErrorCode &status )
+{
+ Transliterator *trans = Transliterator::createInstance(ID, UTRANS_FORWARD, status);
+ if (!U_FAILURE(status))
+ {
+ // already have it, clean up and return true
+ std::cout << "already have it " << ID << std::endl;
+ delete trans;
+ return true;
+ }
+ status = U_ZERO_ERROR;
+
+ SWTransMap::iterator swelement;
+ if ((swelement = sw_tmap->find(ID)) != sw_tmap->end())
+ {
+ std::cout << "found element in map" << std::endl;
+ SWTransData swstuff = (*swelement).second;
+ UParseError parseError;
+ //UErrorCode status;
+ //std::cout << "unregistering " << ID << std::endl;
+ //Transliterator::unregister(ID);
+ std::cout << "resource is " << swstuff.resource << std::endl;
+
+ // Get the rules
+ //std::cout << "importing: " << ID << ", " << resource << std::endl;
+ SWCharString ch(swstuff.resource);
+ UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status);
+ const UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
+ ures_close(bundle);
+ //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD,
+ // parseError, status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to get rules" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+ return false;
+ }
+
+
+ Transliterator *trans = Transliterator::createFromRules(ID, rules, swstuff.dir,
+ parseError,status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to create transliterator" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+ std::cout << "Parse error: line " << parseError.line << std::endl;
+ std::cout << "Parse error: offset " << parseError.offset << std::endl;
+ std::cout << "Parse error: preContext " << *parseError.preContext << std::endl;
+ std::cout << "Parse error: postContext " << *parseError.postContext << std::endl;
+ std::cout << "rules were" << std::endl;
+ std::cout << rules << std::endl;
+ return false;
+ }
+
+ Transliterator::registerInstance(trans);
+ return true;
+
+ //Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
+ //return trans;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+Transliterator * createTrans(const UnicodeString& preID, const UnicodeString& ID,
+ const UnicodeString& postID, UTransDirection dir, UErrorCode &status )
+{
+ // extract id to check from ID xxx;id;xxx
+ if (checkTrans(ID, status)) {
+ UnicodeString fullID = preID;
+ fullID += ID;
+ fullID += postID;
+ Transliterator *trans = Transliterator::createInstance(fullID,UTRANS_FORWARD,status);
+ if (U_FAILURE(status)) {
+ delete trans;
+ return NULL;
+ }
+ else {
+ return trans;
+ }
+ }
+ else {
+ return NULL;
+ }
+}
+
+Transliterator * instantiateTrans(const UnicodeString& ID, const UnicodeString& resource,
+ UTransDirection dir, UParseError &parseError, UErrorCode &status )
+{
+ //TransliterationRuleData *ruleData;
+ //TransliteratorParser parser;
+
+ //entry->entryType is 'direction' from translit_index
+ //UBool isReverse = (entry->entryType == Entry::RULES_REVERSE);
+ //entry->stringArg is the 'resource'
+ //CharString ch(entry->stringArg);
+ std::cout << "importing: " << ID << ", " << resource << std::endl;
+ SWCharString ch(resource);
+ UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status);
+ const UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
+ ures_close(bundle);
+ //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD,
+ // parseError, status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to get rules" << std::endl;
+ return NULL;
+ }
+ //ruleData = parser.orphanData();
+ //entry->stringArg = parser.idBlock;
+ //entry->intArg = parser.idSplitPoint;
+ //entry->compoundFilter = parser.orphanCompoundFilter();
+
+ //entry->entryType = Entry::RBT_DATA;
+ //return new RuleBasedTransliterator(ID, ruleData);
+ Transliterator *trans = Transliterator::createFromRules(ID, rules, dir, parseError, status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to create transliterator" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+ std::cout << "Parse error: line " << parseError.line << std::endl;
+ std::cout << "Parse error: offset " << parseError.offset << std::endl;
+ std::cout << "Parse error: preContext " << *parseError.preContext << std::endl;
+ std::cout << "Parse error: postContext " << *parseError.postContext << std::endl;
+ std::cout << "rules were" << std::endl;
+ std::cout << rules << std::endl;
+ return NULL;
+ }
+
+ Transliterator::registerInstance(trans);
+ return trans;
+}
+
+void initiateSwordTransliterators(UErrorCode &status)
+{
+ static const char translit_swordindex[] = "translit_swordindex";
+
+ UResourceBundle *bundle, *transIDs, *colBund;
+ bundle = ures_openDirect(SW_RESDATA, translit_swordindex, &status);
+ if (U_FAILURE(status)) {
+ std::cout << "no resource index to load" << std::endl;
+ return;
+ }
+
+ transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status);
+ UParseError parseError;
+
+ int32_t row, maxRows;
+ if (U_SUCCESS(status)) {
+ maxRows = ures_getSize(transIDs);
+ for (row = 0; row < maxRows; row++) {
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+ UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+ UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+ UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
+
+ if (U_SUCCESS(status)) {
+ switch (type) {
+ case 0x66: // 'f'
+ case 0x69: // 'i'
+ // 'file' or 'internal';
+ // row[2]=resource, row[3]=direction
+ {
+ UBool visible = (type == 0x0066 /*f*/);
+ UTransDirection dir =
+ (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /*F*/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ //registry->put(id, resString, dir, visible);
+ std::cout << "instantiating " << resString << std::endl;
+ instantiateTrans(id, resString, dir, parseError, status);
+ }
+ break;
+ case 0x61: // 'a'
+ // 'alias'; row[2]=createInstance argument
+ //registry->put(id, resString, TRUE);
+ break;
+ }
+ }
+ else std::cout << "Failed to get resString" << std:: endl;
+ }
+ else std::cout << "Failed to get row" << std:: endl;
+
+ ures_close(colBund);
+ }
+ }
+ else
+ {
+ std::cout << "no resource index to load" << std::endl;
+ }
+
+ ures_close(transIDs);
+ ures_close(bundle);
+}
+
+
+
+void initiateSwordTransliteratorsByFactory(UErrorCode &status)
+{
+ static const char translit_swordindexf[] = "translit_swordindex";
+
+ UResourceBundle *bundle, *transIDs, *colBund;
+ bundle = ures_openDirect(SW_RESDATA, translit_swordindexf, &status);
+ if (U_FAILURE(status)) {
+ std::cout << "no resource index to load" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+ return;
+ }
+
+ transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status);
+ UParseError parseError;
+
+ int32_t row, maxRows;
+ if (U_SUCCESS(status)) {
+ maxRows = ures_getSize(transIDs);
+ for (row = 0; row < maxRows; row++) {
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+ UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+ UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+ UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
+ std::cout << "ok so far" << std::endl;
+
+ if (U_SUCCESS(status)) {
+ switch (type) {
+ case 0x66: // 'f'
+ case 0x69: // 'i'
+ // 'file' or 'internal';
+ // row[2]=resource, row[3]=direction
+ {
+ UBool visible = (type == 0x0066 /*f*/);
+ UTransDirection dir =
+ (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /*F*/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ //registry->put(id, resString, dir, visible);
+ std::cout << "instantiating " << resString << " ..." << std::endl;
+ instantiateTransFactory(id, resString, dir, parseError, status);
+ std::cout << "done." << std::endl;
+ }
+ break;
+ case 0x61: // 'a'
+ // 'alias'; row[2]=createInstance argument
+ //registry->put(id, resString, TRUE);
+ break;
+ }
+ }
+ else std::cout << "Failed to get resString" << std:: endl;
+ }
+ else std::cout << "Failed to get row" << std:: endl;
+
+ ures_close(colBund);
+ }
+ }
+ else
+ {
+ std::cout << "no resource index to load" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+ }
+
+ ures_close(transIDs);
+ ures_close(bundle);
+}
+
+
+void initiateSwordTransliteratorsToMap(UErrorCode &status)
+{
+ static const char translit_swordindexf[] = "translit_swordindex";
+
+ UResourceBundle *bundle, *transIDs, *colBund;
+ bundle = ures_openDirect(SW_RESDATA, translit_swordindexf, &status);
+ if (U_FAILURE(status)) {
+ std::cout << "no resource index to load" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+ return;
+ }
+
+ transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status);
+ UParseError parseError;
+
+ int32_t row, maxRows;
+ if (U_SUCCESS(status)) {
+ maxRows = ures_getSize(transIDs);
+ for (row = 0; row < maxRows; row++) {
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+ UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+ UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+ UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
+ std::cout << "ok so far" << std::endl;
+
+ if (U_SUCCESS(status)) {
+ switch (type) {
+ case 0x66: // 'f'
+ case 0x69: // 'i'
+ // 'file' or 'internal';
+ // row[2]=resource, row[3]=direction
+ {
+ UBool visible = (type == 0x0066 /*f*/);
+ UTransDirection dir =
+ (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /*F*/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ //registry->put(id, resString, dir, visible);
+ std::cout << "instantiating " << resString << " ..." << std::endl;
+ registerTrans(id, resString, dir, status);
+ std::cout << "done." << std::endl;
+ }
+ break;
+ case 0x61: // 'a'
+ // 'alias'; row[2]=createInstance argument
+ //registry->put(id, resString, TRUE);
+ break;
+ }
+ }
+ else std::cout << "Failed to get resString" << std:: endl;
+ }
+ else std::cout << "Failed to get row" << std:: endl;
+
+ ures_close(colBund);
+ }
+ }
+ else
+ {
+ std::cout << "no resource index to load" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+ }
+
+ ures_close(transIDs);
+ ures_close(bundle);
+}
+
+
+
+
+
+int main()
+{
+ sw_tmap = new SWTransMap();
+ UErrorCode status = U_ZERO_ERROR;
+ std::cout << "Available before: " << Transliterator::countAvailableIDs() << std::endl;
+ //initiateSwordTransliterators(status);
+ //initiateSwordTransliteratorsByFactory(status);
+ initiateSwordTransliteratorsToMap(status);
+ int32_t cids = Transliterator::countAvailableIDs();
+ std::cout << "Available after: " << cids << std::endl;
+
+ //for ( int32_t i=0;i<cids;i++) {
+ // std::cout << i << ": " << Transliterator::getAvailableID(i) << std::endl;
+ //}
+
+ //Transliterator *trans = Transliterator::createInstance("NFD;Latin-Gothic;NFC", UTRANS_FORWARD,status);
+ Transliterator *trans = createTrans("NFD;", "Latin-Gothic", ";NFC", UTRANS_FORWARD,status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to get Latin-Gothic" << std::endl;
+ status = U_ZERO_ERROR;
+ }
+ else
+ {
+ std::cout << "Got Latin-Gothic :)" << std::endl;
+ delete trans;
+ }
+
+ std::cout << "Available after gothic: " << Transliterator::countAvailableIDs() << std::endl;
+
+ //trans = Transliterator::createInstance("NFD;BGreek-Greek;NFC", UTRANS_FORWARD, status);
+ trans = createTrans("NFD;", "BGreek-Greek", ";NFC", UTRANS_FORWARD, status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to get BGreek-Greek" << std::endl;
+ status = U_ZERO_ERROR;
+ }
+ else
+ {
+ std::cout << "Got BGreek-Greek :)" << std::endl;
+ delete trans;
+ }
+ std::cout << "Available after greek: " << Transliterator::countAvailableIDs() << std::endl;
+
+ delete sw_tmap;
+
+ return 1;
+}
+
+//gcc -I../source/i18n -I../source/common swtest.cpp -L../source/i18n -licui18n -L../source/common -licuuc
+
diff --git a/tests/tmp/README b/tests/tmp/README
new file mode 100644
index 0000000..a53b060
--- /dev/null
+++ b/tests/tmp/README
@@ -0,0 +1,2 @@
+This directory is used for temporary files created by the test files
+
diff --git a/tests/translittest.cpp b/tests/translittest.cpp
new file mode 100644
index 0000000..1b2bddf
--- /dev/null
+++ b/tests/translittest.cpp
@@ -0,0 +1,142 @@
+#include <iostream>
+#include <string>
+
+#include "unicode/udata.h" /* Data structures */
+#include "unicode/ures.h" /* Data structures */
+#include "unicode/utypes.h" /* Basic ICU data types */
+#include "unicode/ucnv.h" /* C Converter API */
+#include "unicode/convert.h" /* C++ Converter API */
+#include "unicode/ustring.h" /* some more string fcns*/
+
+#include "unicode/translit.h"
+
+#include "utf8transliterator.h"
+
+// Print the given string to stdout
+void uprintf(const UnicodeString &str) {
+ char *buf = 0;
+ int32_t len = str.length();
+ // int32_t bufLen = str.extract(0, len, buf); // Preflight
+ /* Preflighting seems to be broken now, so assume 1-1 conversion,
+ plus some slop. */
+ int32_t bufLen = len + 16;
+ int32_t actualLen;
+ buf = new char[bufLen + 1];
+ actualLen = str.extract(0, len, buf/*, bufLen*/); // Default codepage conversion
+ buf[actualLen] = 0;
+ //printf("%s", buf);
+ std::cout << buf;
+ delete buf;
+}
+
+
+int main() {
+
+
+ UErrorCode status = U_ZERO_ERROR;
+ UDataMemory *pappData = udata_open("/usr/local/lib/sword/swicu",
+ "res", "root", &status);
+ if (U_FAILURE(status))
+ {
+ std::cout << "error: " << status << ":" <<
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+ UChar * uBuf;
+ UChar * target;
+ UConverter *conv;
+ //UParseError perr = U_ZERO_ERROR;
+ int32_t uBufSize = 0, uLength = 0;
+ void * pAppData=NULL;
+ char * samplestring = "If this compiles and runs without errors, apparently ICU is working.";
+ //ures_open("/usr/local/lib/sword/swicu.dat",
+ // NULL, &status);
+ //UDataMemory *pappData = udata_open("/usr/local/lib/sword/swicu",
+// "res", "root", &status);
+ if (U_FAILURE(status))
+ {
+ std::cout << "error: " << status << ":" <<
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+ //UDataMemory *pappData2 = udata_open("/usr/local/lib/sword/swicu",
+// "res", "translit_Latin_Gothic", &status);
+ std::cout << status << std::endl;
+ if (U_FAILURE(status))
+ {
+ std::cout << "error: " << status << ":" <<
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+ std::cout << "available " << Transliterator::countAvailableIDs() << std::endl;
+ //udata_setAppData("/usr/local/lib/sword/swicu.dat" , pAppData, &status);
+ //if (U_FAILURE(status))
+ //{
+ //std::cout << "error: " << status << ":" <<
+ // u_errorName(status) << std::endl;
+ //return 0;
+ //}
+
+ int32_t i_ids = Transliterator::countAvailableIDs();
+
+ std::cout << "available " << i_ids << std::endl;
+ for (int i=0; i<i_ids;i++)
+ {
+ std::cout << "id " << i << ": ";
+ uprintf(Transliterator::getAvailableID(i));
+ std::cout << std::endl;
+ }
+
+
+ //UTF8Transliterator utran = new UTF8Transliterator();
+ std::cout << "creating transliterator 2" << std::endl;
+ Transliterator *btrans = Transliterator::createInstance("NFD;Latin-Greek;NFC",
+ UTRANS_FORWARD, status);
+ if (U_FAILURE(status))
+ {
+ std::cout << "error: " << status << ":" <<
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+ std::cout << "creating transliterator 1" << std::endl;
+ Transliterator *trans = Transliterator::createInstance("NFD;Latin-Gothic;NFC",
+ UTRANS_FORWARD, status);
+ if (U_FAILURE(status))
+ {
+ delete btrans;
+ std::cout << "error: " << status << ":" <<
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+
+ std::cout << "deleting transliterator 1" << std::endl;
+ delete trans;
+ std::cout << "deleting transliterator 2" << std::endl;
+ delete btrans;
+ std::cout << "the rest" << std::endl;
+ uLength = strlen(samplestring);
+ conv = ucnv_open("utf-8", &status);
+ if (U_FAILURE(status))
+ {
+ std::cout << "error: " << status << ":" <<
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+ uBufSize = (uLength/ucnv_getMinCharSize(conv));
+ uBuf = (UChar*)malloc(uBufSize * sizeof(UChar));
+
+ target = uBuf;
+
+ ucnv_toUChars(conv, target, uLength,
+ samplestring, uLength, &status);
+ if (U_FAILURE(status))
+ {
+ std::cout << "error: " << status << ":" <<
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+
+ cout << samplestring << endl;
+
+ return 0;
+}
diff --git a/tests/treeidxtest.cpp b/tests/treeidxtest.cpp
new file mode 100644
index 0000000..873a6b7
--- /dev/null
+++ b/tests/treeidxtest.cpp
@@ -0,0 +1,132 @@
+#include <entriesblk.h>
+#include <iostream>
+#include <string>
+#include <stdio.h>
+#include <treekeyidx.h>
+
+
+void printTree(TreeKeyIdx treeKey, TreeKeyIdx *target = 0, int level = 1) {
+ if (!target)
+ target = &treeKey;
+
+ unsigned long currentOffset = target->getOffset();
+ std::cout << ((currentOffset == treeKey.getOffset()) ? "==>" : "");
+ for (int i = 0; i < level; i++) std::cout << "\t";
+ std::cout << treeKey.getLocalName() << std::endl;
+ if (treeKey.firstChild()) {
+ printTree(treeKey, target, level+1);
+ treeKey.parent();
+ }
+ if (treeKey.nextSibling())
+ printTree(treeKey, target, level);
+
+}
+
+
+void printLocalName(TreeKeyIdx *treeKey) {
+ std::cout << "locaName: " << treeKey->getLocalName() << std::endl;
+}
+
+
+void setLocalName(TreeKeyIdx *treeKey) {
+ char buf[1023];
+ std::cout << "Enter New Node Name: ";
+ gets(buf);
+ treeKey->setLocalName(buf);
+ treeKey->save();
+}
+
+
+void appendSibbling(TreeKeyIdx *treeKey) {
+ if (treeKey->getOffset()) {
+ char buf[1023];
+ std::cout << "Enter New Sibbling Name: ";
+ gets(buf);
+ treeKey->append();
+ treeKey->setLocalName(buf);
+ treeKey->save();
+ }
+ else std::cout << "Can't add sibling to root node\n";
+}
+
+
+void appendChild(TreeKeyIdx *treeKey) {
+ char buf[1023];
+ std::cout << "Enter New Child Name: ";
+ gets(buf);
+ treeKey->appendChild();
+ treeKey->setLocalName(buf);
+ treeKey->save();
+}
+
+
+void removeEntry(EntriesBlock *eb, int index) {
+ if (index < eb->getCount()) {
+ std::cout << "Removing entry [" << index << "]\n";
+ eb->removeEntry(index);
+ }
+ else std::cout << "Invalid entry number\n\n";
+}
+
+
+int main(int argc, char **argv) {
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <tree/key/data/path>\n", *argv);
+ exit(-1);
+ }
+
+ TreeKeyIdx *treeKey = new TreeKeyIdx(argv[1]);
+
+ if (treeKey->Error()) {
+ treeKey->create(argv[1]);
+ delete treeKey;
+ treeKey = new TreeKeyIdx(argv[1]);
+ }
+ TreeKeyIdx root = *treeKey;
+
+ std::string input;
+ char line[1024];
+
+ do {
+ std::cout << "[" << treeKey->getFullName() << "] > ";
+ gets(line);
+ input = line;
+ if (input.length() > 0) {
+ switch (input[0]) {
+ case 'n': printLocalName(treeKey); break;
+ case 's': setLocalName(treeKey); break;
+ case 'p': root.root(); printTree(root, treeKey); break;
+ case 'a': appendSibbling(treeKey); break;
+ case 'c': appendChild(treeKey); break;
+ case 'j': treeKey->nextSibling(); break;
+ case 'k': treeKey->previousSibling(); break;
+ case 'h': treeKey->parent(); break;
+ case 'l': treeKey->firstChild(); break;
+ case 'r': treeKey->root(); break;
+ case 'q': break;
+ case '?':
+ default:
+ std::cout << "\n p - print tree\n";
+ std::cout << " n - get local name\n";
+ std::cout << " s - set local name\n";
+ std::cout << " j - next sibbling\n";
+ std::cout << " k - previous sibbling\n";
+ std::cout << " h - parent\n";
+ std::cout << " l - first child\n";
+ std::cout << " r - root\n";
+ std::cout << " a - append sibbling\n";
+ std::cout << " c - append child\n";
+ std::cout << " u - get user data\n";
+ std::cout << " d - set user data\n";
+ std::cout << " q - quit\n\n";
+ break;
+ }
+ }
+ }
+ while (input.compare("q"));
+
+ delete treeKey;
+
+ return 0;
+}