[sword-svn] r1769 - in trunk: . bindings bindings/corba/orbitcpp examples/cmdline include src/keys src/mgr src/modules src/modules/comments/hrefcom src/modules/comments/rawcom src/modules/comments/rawfiles src/modules/comments/zcom src/modules/common src/modules/filters src/modules/texts/rawtext src/modules/texts/ztext tests utilities utilities/diatheke

scribe at crosswire.org scribe at crosswire.org
Sun Apr 10 17:41:51 MST 2005


Author: scribe
Date: 2005-04-10 17:41:50 -0700 (Sun, 10 Apr 2005)
New Revision: 1769

Removed:
   trunk/include/cdsourcemgr.h
   trunk/include/kjvref.h
   trunk/include/refsys.h
   trunk/include/refsysmgr.h
   trunk/include/remotesourcemgr.h
   trunk/include/swremotemgr.h
   trunk/include/swsourcemgr.h
   trunk/include/versekey2.h
   trunk/include/ztext2.h
   trunk/include/zverse2.h
   trunk/src/keys/versekey2.cpp
   trunk/src/modules/comments/zcom/rawtxt2z.cpp
   trunk/src/modules/common/zverse2.cpp
   trunk/src/modules/texts/ztext/rawtxt2z.cpp
   trunk/src/modules/texts/ztext/ztext2.cpp
   trunk/tests/keytest2.cpp
   trunk/tests/refsys/
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/bindings/Makefile.am
   trunk/bindings/corba/orbitcpp/Makefile
   trunk/configure.ac
   trunk/examples/cmdline/Makefile.am
   trunk/include/Makefile.am
   trunk/include/rawtext.h
   trunk/include/swlocale.h
   trunk/include/swmodule.h
   trunk/include/versekey.h
   trunk/src/keys/Makefile.am
   trunk/src/mgr/Makefile.am
   trunk/src/mgr/swlocale.cpp
   trunk/src/mgr/swmgr.cpp
   trunk/src/modules/comments/hrefcom/Makefile.am
   trunk/src/modules/comments/rawcom/Makefile.am
   trunk/src/modules/comments/rawfiles/Makefile.am
   trunk/src/modules/comments/zcom/Makefile.am
   trunk/src/modules/common/Makefile.am
   trunk/src/modules/filters/Makefile.am
   trunk/src/modules/swmodule.cpp
   trunk/src/modules/texts/rawtext/Makefile.am
   trunk/src/modules/texts/rawtext/rawtext.cpp
   trunk/src/modules/texts/ztext/Makefile.am
   trunk/sword.pc.in
   trunk/tests/Makefile.am
   trunk/usrinst.sh
   trunk/utilities/Makefile.am
   trunk/utilities/diatheke/Makefile.am
Log:
	Cleaned up unused files in preparation for release
	Updated pkg-config to report proper required libs



Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/ChangeLog	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,6 +1,10 @@
 API ChangeLog	(see the ChangeLog in each 'apps' directory for
 		app specific changes
 
+11-Apr-2005	Troy A. Griffitts <scribe at crosswire.org>
+	Cleaned up unused files in preparation for release
+	Updated pkg-config to report proper required libs
+
 1-Jan-2005	Troy A. Griffitts <scribe at crosswire.org>
 	Extended InstallMgr routines to recurse directories
 	Cleaned up InstallMgr code

Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -101,13 +101,7 @@
 iculibs = -licui18n -licuuc
 endif
 
-#testlib_LDADD = -L./lib -lsword -lsword_imp $(iculibs)
-#if BUILDSPLITLIB
-#testlib_LDADD = $(top_builddir)/lib/libsword_imp.la \
-#	$(top_builddir)/lib/libsword.la
-#else
 testlib_LDADD = $(top_builddir)/lib/libsword.la
-#endif
 
 include locales.d/Makefile.am
 include samples/Makefile.am

Modified: trunk/bindings/Makefile.am
===================================================================
--- trunk/bindings/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/bindings/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,9 +1,5 @@
 bindingsdir = $(top_srcdir)/bindings
-#if BUILDSPLITLIB
-#libsword_flat_la_SOURCES += $(bindingsdir)/flatapi.cpp
-#else
 libsword_la_SOURCES += $(bindingsdir)/flatapi.cpp
-#endif
 
 include $(bindingsdir)/bcppmake/Makefile.am
 include $(bindingsdir)/gsoap/Makefile.am

Modified: trunk/bindings/corba/orbitcpp/Makefile
===================================================================
--- trunk/bindings/corba/orbitcpp/Makefile	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/bindings/corba/orbitcpp/Makefile	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,13 +1,15 @@
 all: server testclient
 
 #comment these out if you didn't compile sword with lucene support
-CXXFLAGS += -DUSELUCENE
-CFLAGS += -DUSELUCENE
-LIBS += -lclucene
+#LIBS += -lclucene
 
 #comment these out if you didn't compile sword with ICU support
-LIBS += -licui18n -licuuc -licudata -lpthread -licuio
+#LIBS += -licui18n -licuuc -licudata -lpthread -licuio
 
+LIBS = `pkg-config --libs sword`
+CXXFLAGS += `pkg-config --cflags sword`
+CFLAGS += `pkg-config --cflags sword`
+
 #comment out for release
 CXXFLAGS += -g -O0
 CFLAGS += -g -O0
@@ -15,38 +17,38 @@
 #----------------------------------
 
 server: swordorb-common.o server.cpp swordorb-impl.o swordorb-cpp.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o swordorb-cpp.o
-	$(CXX) $(CXXFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -o server server.cpp swordorb-impl.o swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o `orbit2-config --libs` -lORBit-2-cpp -lsword -lz ${LIBS}
+	$(CXX) $(CXXFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -o server server.cpp swordorb-impl.o swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o `orbit2-config --libs` -lORBit-2-cpp ${LIBS}
 
 testclient: testclient.cpp swordorb-impl.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o
-	$(CXX) $(CXXFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -o testclient testclient.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o `orbit2-config --libs` -lORBit-2-cpp
+	$(CXX) $(CXXFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -o testclient testclient.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o `orbit2-config --libs` -lORBit-2-cpp
 
 swordorb-cpp.o: swordorb-cpp.cc
-	$(CXX) $(CXXFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags`  -c swordorb-cpp.cc
+	$(CXX) $(CXXFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags`  -c swordorb-cpp.cc
 
 swordorb-impl.o: swordorb-impl.cpp
-	$(CXX) $(CXXFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-impl.cpp
+	$(CXX) $(CXXFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-impl.cpp
 
 swordorb-common.o: swordorb-common.c
-	$(CC) $(CFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-common.c
+	$(CC) $(CFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-common.c
 
 swordorb-common.c: ./../swordorb.idl
 	orbit-idl-2 -l c ./../swordorb.idl
 	orbit-idl-2 -l cpp ./../swordorb.idl
 
 swordorb-cpp-common.o: swordorb-cpp-common.cc
-	$(CXX) $(CXXFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-common.cc
+	$(CXX) $(CXXFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-common.cc
 
 swordorb-stubs.o: swordorb-stubs.c
-	$(CC) $(CFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-stubs.c
+	$(CC) $(CFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-stubs.c
 
 swordorb-cpp-stubs.o: swordorb-cpp-stubs.cc
-	$(CXX) $(CXXFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-stubs.cc
+	$(CXX) $(CXXFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-stubs.cc
 
 swordorb-skels.o: swordorb-skels.c
-	$(CC) $(CFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-skels.c
+	$(CC) $(CFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-skels.c
 
 swordorb-cpp-skels.o: swordorb-cpp-skels.cc
-	$(CXX) $(CXXFLAGS) -I. -I../../../include -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-skels.cc
+	$(CXX) $(CXXFLAGS) -I. -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-skels.cc
 
 clean:
 	rm -f *.h *.cc *.o *.c server testclient

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/configure.ac	2005-04-11 00:41:50 UTC (rev 1769)
@@ -64,12 +64,6 @@
 	AC_HELP_STRING([--enable-utilities],[build utilities (default=yes)]),,enable_utilities=yes)
 AC_ARG_ENABLE(examples,
 	AC_HELP_STRING([--enable-examples],[build examples (default=no)]),,enable_examples=no)
-AC_ARG_ENABLE(versekey2,
-	AC_HELP_STRING([--enable-versekey2],[build with experimental versekey (default=no)]),,enable_versekey2=no)
-#AC_ARG_ENABLE(splitlib,
-#	AC_HELP_STRING([--enable-splitlib],[split lib into core and import/export legacy part and flatapi (default=no)]),,enable_splitlib=no)
-AC_ARG_ENABLE(refsys,
-	AC_HELP_STRING([--enable-refsys],[build alternative versification data files - requires expat (default=no)]),,enable_refsys=no)
 AM_MAINTAINER_MODE
 
 # ---------------------------------------------------------------------
@@ -212,30 +206,7 @@
    LIBS="$LIBS $LUCENE_LIBS"
 fi
 
-# ---------------------------------------------------------------------
-# Check for XML parser for refsys
-# ---------------------------------------------------------------------
-XML_LIBS=
-if test x$enable_refsys = xyes; then
-	AC_CHECK_HEADER(expat.h,[
-		AC_CHECK_LIB(expat,XML_Parse,[
-			XML_LIBS="-lexpat"
-		],[	AC_MSG_ERROR([* * * require expat-devel * * *])
-		])
-	],[	AC_MSG_ERROR([* * * require expat-devel * * *])
-	])
-fi
 
-#if test x$enable_splitlib = xyes; then
-#  enable_versekey2=no
-#fi
-
-#if test x$enable_versekey2 = xyes; then
-#  AM_CFLAGS="$AM_CFLAGS -DVK2"
-#  AM_CXXFLAGS="$AM_CXXFLAGS -DVK2"
-#fi
-
-
 # ---------------------------------------------------------------------
 # Alter global conf directory only if not /etc
 # ---------------------------------------------------------------------
@@ -297,14 +268,11 @@
 AM_CONDITIONAL(BUILDTESTS, test x$enable_tests = xyes)
 AM_CONDITIONAL(BUILDUTILS, test x$enable_utilities = xyes)
 AM_CONDITIONAL(BUILDEXAMPLES, test x$enable_examples = xyes)
-AM_CONDITIONAL(BUILDNEWVKEY, test x$enable_versekey2 = xyes)
-#AM_CONDITIONAL(BUILDSPLITLIB, test x$enable_splitlib = xyes)
-AM_CONDITIONAL(BUILDREFSYS, test x$enable_refsys = xyes)
 
 # ---------------------------------------------------------------------
 # Final output
 # ---------------------------------------------------------------------
-AC_CONFIG_FILES(Makefile lib/Makefile tests/Makefile tests/cppunit/Makefile tests/refsys/Makefile \
+AC_CONFIG_FILES(Makefile lib/Makefile tests/Makefile tests/cppunit/Makefile \
 	utilities/Makefile examples/Makefile \
 	examples/cmdline/Makefile \
 	utilities/diatheke/Makefile icu/Makefile sword.pc sword.spec)

Modified: trunk/examples/cmdline/Makefile.am
===================================================================
--- trunk/examples/cmdline/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/examples/cmdline/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,11 +1,7 @@
 AUTOMAKE_OPTIONS = 1.6
 INCLUDES = -I $(top_srcdir)/include
-#if BUILDSPLITLIB
-#LDADD = $(top_builddir)/lib/libsword_imp.la \
-#        $(top_builddir)/lib/libsword.la
-#else
 LDADD = $(top_builddir)/lib/libsword.la
-#endif
+
 noinst_PROGRAMS = lookup search threaded_search
 
 lookup_SOURCES = lookup.cpp

Modified: trunk/include/Makefile.am
===================================================================
--- trunk/include/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -156,21 +156,3 @@
 pkginclude_HEADERS += $(swincludedir)/ztext.h
 pkginclude_HEADERS += $(swincludedir)/zverse.h
 
-#if INSTALLMGR
-REMOTE_HEAD  = $(swincludedir)/swremotemgr.h
-REMOTE_HEAD += $(swincludedir)/installmgr.h
-#else
-#REMOTE_HEAD =
-#endif
-
-NEWVKEY_HEAD  = $(swincludedir)/versekey2.h
-NEWVKEY_HEAD += $(swincludedir)/ztext2.h
-NEWVKEY_HEAD += $(swincludedir)/zverse2.h
-
-if BUILDNEWVKEY
-SPLIT_HEAD = $(NEWVKEY_HEAD)
-else
-SPLIT_HEAD =
-endif
-
-pkginclude_HEADERS += $(REMOTE_HEAD) $(SPLIT_HEAD)

Deleted: trunk/include/cdsourcemgr.h
===================================================================
--- trunk/include/cdsourcemgr.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/cdsourcemgr.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,40 +0,0 @@
-/******************************************************************************
- *  cdsourcemgr.h	- definition of class SWCacheMgr used to provide an interface for
- *  	caching information of module sources
- *
- * $Id$
- *
- * Copyright 2002 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
- 
-#ifndef CDSOURCEMGR_H
-#define CDSOURCEMGR_H
- 
- #include <defs.h>
- #include "swsourcemgr.h"
-
-SWORD_NAMESPACE_START
-
-class SWDLLEXPORT CDSourceMgr: public SWSourceMgr {
-public:	
-	CDSourceMgr(const char *iConfigPath);
-	char Refresh();
-}
-
-CDSourceMgr *DetectCD(const char *iCDPath);
-
-SWORD_NAMESPACE_END
-#endif

Deleted: trunk/include/kjvref.h
===================================================================
--- trunk/include/kjvref.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/kjvref.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,1424 +0,0 @@
-/******************************************************************************
- * kjvref.h - KJV versification used as default by Sword
- *
- * $Id$
- *
- * Copyright 2004 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-
-
-/* We are allowing one extra chapter per book for summary */
-/* And an extra chapter for each testament for testament summary */
-/* These are for commentaries */
-
-struct bkref
-//  RefSys::kjvbks[] = {
-	  kjvbks[MAXOSISBOOKS+1] = {
-//Headers
-{0, TESTAMENT_HEADING},//0 Module
-{1, TESTAMENT_HEADING},//1 OT
-	//Old Testament
-{2, 50},	// Genesis", "Gen
-{53, 40},	// Exodus", "Exod
-{94, 27},	// Leviticus", "Lev
-{122, 36},	// Numbers", "Num
-{159, 34},	// Deuteronomy", "Deut
-{194, 24},	// Joshua", "Josh
-{219, 21},	// Judges", "Judg
-{241, 4},	// Ruth", "Ruth
-{246, 31},	// 1 Samuel", "1Sam
-{278, 24},	// 2 Samuel", "2Sam//10
-{303, 22},	// 1 Kings", "1Kgs
-{326, 25},	// 2 Kings", "2Kgs
-{352, 29},	// 1 Chronicles", "1Chr
-{382, 36},	// 2 Chronicles", "2Chr
-{419, 10},	// Ezra", "Ezra
-{430, 13},	// Nehemiah", "Neh
-{444, 10},	// Esther", "Esth
-{455, 42},	// Job", "Job
-{498, 150},	// Psalms", "Pss
-{649, 31},	// Proverbs", "Prov//20
-{681, 12},	// Ecclesiastes", "Eccl
-{694, 8},	// Song of Solomon", "Song
-{703, 66},	// Isaiah", "Isa
-{770, 52},	// Jeremiah", "Jer
-{823, 5},	// Lamentations", "Lam
-{829, 48},	// Ezekiel", "Ezek
-{878, 12},	// Daniel", "Dan
-{891, 14},	// Hosea", "Hos
-{906, 3},	// Joel", "Joel
-{910, 9},	// Amos", "Amos//30
-{920, 1},	// Obadiah", "Obad
-{922, 4},	// Jonah", "Jonah
-{927, 7},	// Micah", "Mic
-{935, 3},	// Nahum", "Nah
-{939, 3},	// Habakkuk", "Hab
-{943, 3},	// Zephaniah", "Zeph
-{947, 2},	// Haggai", "Hag
-{950, 14},	// Zechariah", "Zech
-{965, 4},	// Malachi", "Mal//39
-
-//Roman Catholic Deuterocanon
-{NOTINREFSYS, 0},	// Deuterocanon", "DC
-{NOTINREFSYS, 0},	// Tobit", "Tob
-{NOTINREFSYS, 0},	// Judith", "Jdt//70
-{NOTINREFSYS, 0},	// Wisdom", "Wis
-{NOTINREFSYS, 0},	// Sirach", "Sir
-{NOTINREFSYS, 0},	// Baruch", "Bar
-{NOTINREFSYS, 0},	// Letter of Jeremiah", "EpJer
-{NOTINREFSYS, 0},	// 1 Esdras", "1Esd
-{NOTINREFSYS, 0},	// 2 Esdras", "2Esd
-{NOTINREFSYS, 0},	// 1 Maccabees", "1Macc
-{NOTINREFSYS, 0},	// 2 Maccabees", "2Macc
- 
- 
-//Septuagint
-{NOTINREFSYS, 0},	// 3 Maccabees", "3Macc
-{NOTINREFSYS, 0},	// 4 Maccabees", "4Macc//80
-{NOTINREFSYS, 0},	// Odes of Solomon", "OdesSol
-{NOTINREFSYS, 0},	// Psalms of Solomon", "PssSol
- 
- 
-//Vulgate
-{NOTINREFSYS, 0},	// Epistle to the Laodiceans", "EpLao
- 
- 
-//Orthodox Canon
-{NOTINREFSYS, 0},	// 1 Enoch", "1En
-{NOTINREFSYS, 0},	// Jubilees", "Jub
- 
- 
-//Protestant Apocrypha
-{NOTINREFSYS, 0},	// Apocrypha", "Apoc
-{NOTINREFSYS, 0},	// Additions to Esther", "AddEsth
-{NOTINREFSYS, 0},	// Prayer of Azariah", "PrAzar
-{NOTINREFSYS, 0},	// Susanna", "Sus
-{NOTINREFSYS, 0},	// Bel and the Dragon", "Bel//90
-{NOTINREFSYS, 0},	// Prayer of Manasses", "PrMan
-{NOTINREFSYS, 0},	// Psalm 151", "Ps151//92
-
-
-/*
-  0, 1, 30, 47, 72, 94,
-  123, 140, 157, 171, 178, 185, 190,
-  195, 201, 205, 212, 217, 221, 223,
-  237, 243, 249, 253, 259, 261, 263,
-  265
-*/
- 
-//Header
-{970, TESTAMENT_HEADING},//40
-//New Testament
-{971, 28},	// Matthew", "Matt
-{1000, 16},	// Mark", "Mark
-{1017, 24},	// Luke", "Luke
-{1042, 21},	// John", "John
-{1064, 28},	// Acts", "Acts
-{1093, 16},	// Romans", "Rom
-{1110, 16},	// 1 Corinthians", "1Cor
-{1127, 13},	// 2 Corinthians", "2Cor
-{1141, 6},	// Galatians", "Gal
-{1148, 6},	// Ephesians", "Eph//50
-{1155, 4},	// Philippians", "Phil
-{1160, 4},	// Colossians", "Col
-{1165, 5},	// 1 Thessalonians", "1Thess
-{1171, 3},	// 2 Thessalonians", "2Thess
-{1175, 6},	// 1 Timothy", "1Tim
-{1182, 4},	// 2 Timothy", "2Tim
-{1187, 3},	// Titus", "Titus
-{1191, 1},	// Philemon", "Phlm
-{1193, 13},	// Hebrews", "Heb
-{1207, 5},	// James", "Jas//60
-{1213, 5},	// 1 Peter", "1Pet
-{1219, 3},	// 2 Peter", "2Pet
-{1223, 5},	// 1 John", "1John
-{1229, 1},	// 2 John", "2John
-{1231, 1},	// 3 John", "3John
-{1233, 1},	// Jude", "Jude
-{1235, 22}	// Revelation", "Rev//67
-
-};
-
-struct bkref
-//  RefSys::kjvcps[] = {
-  kjvcps[] = {
-{0, 0}, // Module Header
-{1, 0}, // OT Header
-{2, 0}, // Genesis:0
-{3, 31}, // Genesis:1
-{35, 25}, // Genesis:2
-{61, 24}, // Genesis:3
-{86, 26}, // Genesis:4
-{113, 32}, // Genesis:5
-{146, 22}, // Genesis:6
-{169, 24}, // Genesis:7
-{194, 22}, // Genesis:8
-{217, 29}, // Genesis:9
-{247, 32}, // Genesis:10
-{280, 32}, // Genesis:11
-{313, 20}, // Genesis:12
-{334, 18}, // Genesis:13
-{353, 24}, // Genesis:14
-{378, 21}, // Genesis:15
-{400, 16}, // Genesis:16
-{417, 27}, // Genesis:17
-{445, 33}, // Genesis:18
-{479, 38}, // Genesis:19
-{518, 18}, // Genesis:20
-{537, 34}, // Genesis:21
-{572, 24}, // Genesis:22
-{597, 20}, // Genesis:23
-{618, 67}, // Genesis:24
-{686, 34}, // Genesis:25
-{721, 35}, // Genesis:26
-{757, 46}, // Genesis:27
-{804, 22}, // Genesis:28
-{827, 35}, // Genesis:29
-{863, 43}, // Genesis:30
-{907, 55}, // Genesis:31
-{963, 32}, // Genesis:32
-{996, 20}, // Genesis:33
-{1017, 31}, // Genesis:34
-{1049, 29}, // Genesis:35
-{1079, 43}, // Genesis:36
-{1123, 36}, // Genesis:37
-{1160, 30}, // Genesis:38
-{1191, 23}, // Genesis:39
-{1215, 23}, // Genesis:40
-{1239, 57}, // Genesis:41
-{1297, 38}, // Genesis:42
-{1336, 34}, // Genesis:43
-{1371, 34}, // Genesis:44
-{1406, 28}, // Genesis:45
-{1435, 34}, // Genesis:46
-{1470, 31}, // Genesis:47
-{1502, 22}, // Genesis:48
-{1525, 33}, // Genesis:49
-{1559, 26}, // Genesis:50
-{1586, 0}, // Exodus:0
-{1587, 22}, // Exodus:1
-{1610, 25}, // Exodus:2
-{1636, 22}, // Exodus:3
-{1659, 31}, // Exodus:4
-{1691, 23}, // Exodus:5
-{1715, 30}, // Exodus:6
-{1746, 25}, // Exodus:7
-{1772, 32}, // Exodus:8
-{1805, 35}, // Exodus:9
-{1841, 29}, // Exodus:10
-{1871, 10}, // Exodus:11
-{1882, 51}, // Exodus:12
-{1934, 22}, // Exodus:13
-{1957, 31}, // Exodus:14
-{1989, 27}, // Exodus:15
-{2017, 36}, // Exodus:16
-{2054, 16}, // Exodus:17
-{2071, 27}, // Exodus:18
-{2099, 25}, // Exodus:19
-{2125, 26}, // Exodus:20
-{2152, 36}, // Exodus:21
-{2189, 31}, // Exodus:22
-{2221, 33}, // Exodus:23
-{2255, 18}, // Exodus:24
-{2274, 40}, // Exodus:25
-{2315, 37}, // Exodus:26
-{2353, 21}, // Exodus:27
-{2375, 43}, // Exodus:28
-{2419, 46}, // Exodus:29
-{2466, 38}, // Exodus:30
-{2505, 18}, // Exodus:31
-{2524, 35}, // Exodus:32
-{2560, 23}, // Exodus:33
-{2584, 35}, // Exodus:34
-{2620, 35}, // Exodus:35
-{2656, 38}, // Exodus:36
-{2695, 29}, // Exodus:37
-{2725, 31}, // Exodus:38
-{2757, 43}, // Exodus:39
-{2801, 38}, // Exodus:40
-{2840, 0}, // Leviticus:0
-{2841, 17}, // Leviticus:1
-{2859, 16}, // Leviticus:2
-{2876, 17}, // Leviticus:3
-{2894, 35}, // Leviticus:4
-{2930, 19}, // Leviticus:5
-{2950, 30}, // Leviticus:6
-{2981, 38}, // Leviticus:7
-{3020, 36}, // Leviticus:8
-{3057, 24}, // Leviticus:9
-{3082, 20}, // Leviticus:10
-{3103, 47}, // Leviticus:11
-{3151, 8}, // Leviticus:12
-{3160, 59}, // Leviticus:13
-{3220, 57}, // Leviticus:14
-{3278, 33}, // Leviticus:15
-{3312, 34}, // Leviticus:16
-{3347, 16}, // Leviticus:17
-{3364, 30}, // Leviticus:18
-{3395, 37}, // Leviticus:19
-{3433, 27}, // Leviticus:20
-{3461, 24}, // Leviticus:21
-{3486, 33}, // Leviticus:22
-{3520, 44}, // Leviticus:23
-{3565, 23}, // Leviticus:24
-{3589, 55}, // Leviticus:25
-{3645, 46}, // Leviticus:26
-{3692, 34}, // Leviticus:27
-{3727, 0}, // Numbers:0
-{3728, 54}, // Numbers:1
-{3783, 34}, // Numbers:2
-{3818, 51}, // Numbers:3
-{3870, 49}, // Numbers:4
-{3920, 31}, // Numbers:5
-{3952, 27}, // Numbers:6
-{3980, 89}, // Numbers:7
-{4070, 26}, // Numbers:8
-{4097, 23}, // Numbers:9
-{4121, 36}, // Numbers:10
-{4158, 35}, // Numbers:11
-{4194, 16}, // Numbers:12
-{4211, 33}, // Numbers:13
-{4245, 45}, // Numbers:14
-{4291, 41}, // Numbers:15
-{4333, 50}, // Numbers:16
-{4384, 13}, // Numbers:17
-{4398, 32}, // Numbers:18
-{4431, 22}, // Numbers:19
-{4454, 29}, // Numbers:20
-{4484, 35}, // Numbers:21
-{4520, 41}, // Numbers:22
-{4562, 30}, // Numbers:23
-{4593, 25}, // Numbers:24
-{4619, 18}, // Numbers:25
-{4638, 65}, // Numbers:26
-{4704, 23}, // Numbers:27
-{4728, 31}, // Numbers:28
-{4760, 40}, // Numbers:29
-{4801, 16}, // Numbers:30
-{4818, 54}, // Numbers:31
-{4873, 42}, // Numbers:32
-{4916, 56}, // Numbers:33
-{4973, 29}, // Numbers:34
-{5003, 34}, // Numbers:35
-{5038, 13}, // Numbers:36
-{5052, 0}, // Deuteronomy:0
-{5053, 46}, // Deuteronomy:1
-{5100, 37}, // Deuteronomy:2
-{5138, 29}, // Deuteronomy:3
-{5168, 49}, // Deuteronomy:4
-{5218, 33}, // Deuteronomy:5
-{5252, 25}, // Deuteronomy:6
-{5278, 26}, // Deuteronomy:7
-{5305, 20}, // Deuteronomy:8
-{5326, 29}, // Deuteronomy:9
-{5356, 22}, // Deuteronomy:10
-{5379, 32}, // Deuteronomy:11
-{5412, 32}, // Deuteronomy:12
-{5445, 18}, // Deuteronomy:13
-{5464, 29}, // Deuteronomy:14
-{5494, 23}, // Deuteronomy:15
-{5518, 22}, // Deuteronomy:16
-{5541, 20}, // Deuteronomy:17
-{5562, 22}, // Deuteronomy:18
-{5585, 21}, // Deuteronomy:19
-{5607, 20}, // Deuteronomy:20
-{5628, 23}, // Deuteronomy:21
-{5652, 30}, // Deuteronomy:22
-{5683, 25}, // Deuteronomy:23
-{5709, 22}, // Deuteronomy:24
-{5732, 19}, // Deuteronomy:25
-{5752, 19}, // Deuteronomy:26
-{5772, 26}, // Deuteronomy:27
-{5799, 68}, // Deuteronomy:28
-{5868, 29}, // Deuteronomy:29
-{5898, 20}, // Deuteronomy:30
-{5919, 30}, // Deuteronomy:31
-{5950, 52}, // Deuteronomy:32
-{6003, 29}, // Deuteronomy:33
-{6033, 12}, // Deuteronomy:34
-{6046, 0}, // Joshua:0
-{6047, 18}, // Joshua:1
-{6066, 24}, // Joshua:2
-{6091, 17}, // Joshua:3
-{6109, 24}, // Joshua:4
-{6134, 15}, // Joshua:5
-{6150, 27}, // Joshua:6
-{6178, 26}, // Joshua:7
-{6205, 35}, // Joshua:8
-{6241, 27}, // Joshua:9
-{6269, 43}, // Joshua:10
-{6313, 23}, // Joshua:11
-{6337, 24}, // Joshua:12
-{6362, 33}, // Joshua:13
-{6396, 15}, // Joshua:14
-{6412, 63}, // Joshua:15
-{6476, 10}, // Joshua:16
-{6487, 18}, // Joshua:17
-{6506, 28}, // Joshua:18
-{6535, 51}, // Joshua:19
-{6587, 9}, // Joshua:20
-{6597, 45}, // Joshua:21
-{6643, 34}, // Joshua:22
-{6678, 16}, // Joshua:23
-{6695, 33}, // Joshua:24
-{6729, 0}, // Judges:0
-{6730, 36}, // Judges:1
-{6767, 23}, // Judges:2
-{6791, 31}, // Judges:3
-{6823, 24}, // Judges:4
-{6848, 31}, // Judges:5
-{6880, 40}, // Judges:6
-{6921, 25}, // Judges:7
-{6947, 35}, // Judges:8
-{6983, 57}, // Judges:9
-{7041, 18}, // Judges:10
-{7060, 40}, // Judges:11
-{7101, 15}, // Judges:12
-{7117, 25}, // Judges:13
-{7143, 20}, // Judges:14
-{7164, 20}, // Judges:15
-{7185, 31}, // Judges:16
-{7217, 13}, // Judges:17
-{7231, 31}, // Judges:18
-{7263, 30}, // Judges:19
-{7294, 48}, // Judges:20
-{7343, 25}, // Judges:21
-{7369, 0}, // Ruth:0
-{7370, 22}, // Ruth:1
-{7393, 23}, // Ruth:2
-{7417, 18}, // Ruth:3
-{7436, 22}, // Ruth:4
-{7459, 0}, // I Samuel:0
-{7460, 28}, // I Samuel:1
-{7489, 36}, // I Samuel:2
-{7526, 21}, // I Samuel:3
-{7548, 22}, // I Samuel:4
-{7571, 12}, // I Samuel:5
-{7584, 21}, // I Samuel:6
-{7606, 17}, // I Samuel:7
-{7624, 22}, // I Samuel:8
-{7647, 27}, // I Samuel:9
-{7675, 27}, // I Samuel:10
-{7703, 15}, // I Samuel:11
-{7719, 25}, // I Samuel:12
-{7745, 23}, // I Samuel:13
-{7769, 52}, // I Samuel:14
-{7822, 35}, // I Samuel:15
-{7858, 23}, // I Samuel:16
-{7882, 58}, // I Samuel:17
-{7941, 30}, // I Samuel:18
-{7972, 24}, // I Samuel:19
-{7997, 42}, // I Samuel:20
-{8040, 15}, // I Samuel:21
-{8056, 23}, // I Samuel:22
-{8080, 29}, // I Samuel:23
-{8110, 22}, // I Samuel:24
-{8133, 44}, // I Samuel:25
-{8178, 25}, // I Samuel:26
-{8204, 12}, // I Samuel:27
-{8217, 25}, // I Samuel:28
-{8243, 11}, // I Samuel:29
-{8255, 31}, // I Samuel:30
-{8287, 13}, // I Samuel:31
-{8301, 0}, // II Samuel:0
-{8302, 27}, // II Samuel:1
-{8330, 32}, // II Samuel:2
-{8363, 39}, // II Samuel:3
-{8403, 12}, // II Samuel:4
-{8416, 25}, // II Samuel:5
-{8442, 23}, // II Samuel:6
-{8466, 29}, // II Samuel:7
-{8496, 18}, // II Samuel:8
-{8515, 13}, // II Samuel:9
-{8529, 19}, // II Samuel:10
-{8549, 27}, // II Samuel:11
-{8577, 31}, // II Samuel:12
-{8609, 39}, // II Samuel:13
-{8649, 33}, // II Samuel:14
-{8683, 37}, // II Samuel:15
-{8721, 23}, // II Samuel:16
-{8745, 29}, // II Samuel:17
-{8775, 33}, // II Samuel:18
-{8809, 43}, // II Samuel:19
-{8853, 26}, // II Samuel:20
-{8880, 22}, // II Samuel:21
-{8903, 51}, // II Samuel:22
-{8955, 39}, // II Samuel:23
-{8995, 25}, // II Samuel:24
-{9021, 0}, // I Kings:0
-{9022, 53}, // I Kings:1
-{9076, 46}, // I Kings:2
-{9123, 28}, // I Kings:3
-{9152, 34}, // I Kings:4
-{9187, 18}, // I Kings:5
-{9206, 38}, // I Kings:6
-{9245, 51}, // I Kings:7
-{9297, 66}, // I Kings:8
-{9364, 28}, // I Kings:9
-{9393, 29}, // I Kings:10
-{9423, 43}, // I Kings:11
-{9467, 33}, // I Kings:12
-{9501, 34}, // I Kings:13
-{9536, 31}, // I Kings:14
-{9568, 34}, // I Kings:15
-{9603, 34}, // I Kings:16
-{9638, 24}, // I Kings:17
-{9663, 46}, // I Kings:18
-{9710, 21}, // I Kings:19
-{9732, 43}, // I Kings:20
-{9776, 29}, // I Kings:21
-{9806, 53}, // I Kings:22
-{9860, 0}, // II Kings:0
-{9861, 18}, // II Kings:1
-{9880, 25}, // II Kings:2
-{9906, 27}, // II Kings:3
-{9934, 44}, // II Kings:4
-{9979, 27}, // II Kings:5
-{10007, 33}, // II Kings:6
-{10041, 20}, // II Kings:7
-{10062, 29}, // II Kings:8
-{10092, 37}, // II Kings:9
-{10130, 36}, // II Kings:10
-{10167, 21}, // II Kings:11
-{10189, 21}, // II Kings:12
-{10211, 25}, // II Kings:13
-{10237, 29}, // II Kings:14
-{10267, 38}, // II Kings:15
-{10306, 20}, // II Kings:16
-{10327, 41}, // II Kings:17
-{10369, 37}, // II Kings:18
-{10407, 37}, // II Kings:19
-{10445, 21}, // II Kings:20
-{10467, 26}, // II Kings:21
-{10494, 20}, // II Kings:22
-{10515, 37}, // II Kings:23
-{10553, 20}, // II Kings:24
-{10574, 30}, // II Kings:25
-{10605, 0}, // I Chronicles:0
-{10606, 54}, // I Chronicles:1
-{10661, 55}, // I Chronicles:2
-{10717, 24}, // I Chronicles:3
-{10742, 43}, // I Chronicles:4
-{10786, 26}, // I Chronicles:5
-{10813, 81}, // I Chronicles:6
-{10895, 40}, // I Chronicles:7
-{10936, 40}, // I Chronicles:8
-{10977, 44}, // I Chronicles:9
-{11022, 14}, // I Chronicles:10
-{11037, 47}, // I Chronicles:11
-{11085, 40}, // I Chronicles:12
-{11126, 14}, // I Chronicles:13
-{11141, 17}, // I Chronicles:14
-{11159, 29}, // I Chronicles:15
-{11189, 43}, // I Chronicles:16
-{11233, 27}, // I Chronicles:17
-{11261, 17}, // I Chronicles:18
-{11279, 19}, // I Chronicles:19
-{11299, 8}, // I Chronicles:20
-{11308, 30}, // I Chronicles:21
-{11339, 19}, // I Chronicles:22
-{11359, 32}, // I Chronicles:23
-{11392, 31}, // I Chronicles:24
-{11424, 31}, // I Chronicles:25
-{11456, 32}, // I Chronicles:26
-{11489, 34}, // I Chronicles:27
-{11524, 21}, // I Chronicles:28
-{11546, 30}, // I Chronicles:29
-{11577, 0}, // II Chronicles:0
-{11578, 17}, // II Chronicles:1
-{11596, 18}, // II Chronicles:2
-{11615, 17}, // II Chronicles:3
-{11633, 22}, // II Chronicles:4
-{11656, 14}, // II Chronicles:5
-{11671, 42}, // II Chronicles:6
-{11714, 22}, // II Chronicles:7
-{11737, 18}, // II Chronicles:8
-{11756, 31}, // II Chronicles:9
-{11788, 19}, // II Chronicles:10
-{11808, 23}, // II Chronicles:11
-{11832, 16}, // II Chronicles:12
-{11849, 22}, // II Chronicles:13
-{11872, 15}, // II Chronicles:14
-{11888, 19}, // II Chronicles:15
-{11908, 14}, // II Chronicles:16
-{11923, 19}, // II Chronicles:17
-{11943, 34}, // II Chronicles:18
-{11978, 11}, // II Chronicles:19
-{11990, 37}, // II Chronicles:20
-{12028, 20}, // II Chronicles:21
-{12049, 12}, // II Chronicles:22
-{12062, 21}, // II Chronicles:23
-{12084, 27}, // II Chronicles:24
-{12112, 28}, // II Chronicles:25
-{12141, 23}, // II Chronicles:26
-{12165, 9}, // II Chronicles:27
-{12175, 27}, // II Chronicles:28
-{12203, 36}, // II Chronicles:29
-{12240, 27}, // II Chronicles:30
-{12268, 21}, // II Chronicles:31
-{12290, 33}, // II Chronicles:32
-{12324, 25}, // II Chronicles:33
-{12350, 33}, // II Chronicles:34
-{12384, 27}, // II Chronicles:35
-{12412, 23}, // II Chronicles:36
-{12436, 0}, // Ezra:0
-{12437, 11}, // Ezra:1
-{12449, 70}, // Ezra:2
-{12520, 13}, // Ezra:3
-{12534, 24}, // Ezra:4
-{12559, 17}, // Ezra:5
-{12577, 22}, // Ezra:6
-{12600, 28}, // Ezra:7
-{12629, 36}, // Ezra:8
-{12666, 15}, // Ezra:9
-{12682, 44}, // Ezra:10
-{12727, 0}, // Nehemiah:0
-{12728, 11}, // Nehemiah:1
-{12740, 20}, // Nehemiah:2
-{12761, 32}, // Nehemiah:3
-{12794, 23}, // Nehemiah:4
-{12818, 19}, // Nehemiah:5
-{12838, 19}, // Nehemiah:6
-{12858, 73}, // Nehemiah:7
-{12932, 18}, // Nehemiah:8
-{12951, 38}, // Nehemiah:9
-{12990, 39}, // Nehemiah:10
-{13030, 36}, // Nehemiah:11
-{13067, 47}, // Nehemiah:12
-{13115, 31}, // Nehemiah:13
-{13147, 0}, // Esther:0
-{13148, 22}, // Esther:1
-{13171, 23}, // Esther:2
-{13195, 15}, // Esther:3
-{13211, 17}, // Esther:4
-{13229, 14}, // Esther:5
-{13244, 14}, // Esther:6
-{13259, 10}, // Esther:7
-{13270, 17}, // Esther:8
-{13288, 32}, // Esther:9
-{13321, 3}, // Esther:10
-{13325, 0}, // Job:0
-{13326, 22}, // Job:1
-{13349, 13}, // Job:2
-{13363, 26}, // Job:3
-{13390, 21}, // Job:4
-{13412, 27}, // Job:5
-{13440, 30}, // Job:6
-{13471, 21}, // Job:7
-{13493, 22}, // Job:8
-{13516, 35}, // Job:9
-{13552, 22}, // Job:10
-{13575, 20}, // Job:11
-{13596, 25}, // Job:12
-{13622, 28}, // Job:13
-{13651, 22}, // Job:14
-{13674, 35}, // Job:15
-{13710, 22}, // Job:16
-{13733, 16}, // Job:17
-{13750, 21}, // Job:18
-{13772, 29}, // Job:19
-{13802, 29}, // Job:20
-{13832, 34}, // Job:21
-{13867, 30}, // Job:22
-{13898, 17}, // Job:23
-{13916, 25}, // Job:24
-{13942, 6}, // Job:25
-{13949, 14}, // Job:26
-{13964, 23}, // Job:27
-{13988, 28}, // Job:28
-{14017, 25}, // Job:29
-{14043, 31}, // Job:30
-{14075, 40}, // Job:31
-{14116, 22}, // Job:32
-{14139, 33}, // Job:33
-{14173, 37}, // Job:34
-{14211, 16}, // Job:35
-{14228, 33}, // Job:36
-{14262, 24}, // Job:37
-{14287, 41}, // Job:38
-{14329, 30}, // Job:39
-{14360, 24}, // Job:40
-{14385, 34}, // Job:41
-{14420, 17}, // Job:42
-{14438, 0}, // Psalms:0
-{14439, 6}, // Psalms:1
-{14446, 12}, // Psalms:2
-{14459, 8}, // Psalms:3
-{14468, 8}, // Psalms:4
-{14477, 12}, // Psalms:5
-{14490, 10}, // Psalms:6
-{14501, 17}, // Psalms:7
-{14519, 9}, // Psalms:8
-{14529, 20}, // Psalms:9
-{14550, 18}, // Psalms:10
-{14569, 7}, // Psalms:11
-{14577, 8}, // Psalms:12
-{14586, 6}, // Psalms:13
-{14593, 7}, // Psalms:14
-{14601, 5}, // Psalms:15
-{14607, 11}, // Psalms:16
-{14619, 15}, // Psalms:17
-{14635, 50}, // Psalms:18
-{14686, 14}, // Psalms:19
-{14701, 9}, // Psalms:20
-{14711, 13}, // Psalms:21
-{14725, 31}, // Psalms:22
-{14757, 6}, // Psalms:23
-{14764, 10}, // Psalms:24
-{14775, 22}, // Psalms:25
-{14798, 12}, // Psalms:26
-{14811, 14}, // Psalms:27
-{14826, 9}, // Psalms:28
-{14836, 11}, // Psalms:29
-{14848, 12}, // Psalms:30
-{14861, 24}, // Psalms:31
-{14886, 11}, // Psalms:32
-{14898, 22}, // Psalms:33
-{14921, 22}, // Psalms:34
-{14944, 28}, // Psalms:35
-{14973, 12}, // Psalms:36
-{14986, 40}, // Psalms:37
-{15027, 22}, // Psalms:38
-{15050, 13}, // Psalms:39
-{15064, 17}, // Psalms:40
-{15082, 13}, // Psalms:41
-{15096, 11}, // Psalms:42
-{15108, 5}, // Psalms:43
-{15114, 26}, // Psalms:44
-{15141, 17}, // Psalms:45
-{15159, 11}, // Psalms:46
-{15171, 9}, // Psalms:47
-{15181, 14}, // Psalms:48
-{15196, 20}, // Psalms:49
-{15217, 23}, // Psalms:50
-{15241, 19}, // Psalms:51
-{15261, 9}, // Psalms:52
-{15271, 6}, // Psalms:53
-{15278, 7}, // Psalms:54
-{15286, 23}, // Psalms:55
-{15310, 13}, // Psalms:56
-{15324, 11}, // Psalms:57
-{15336, 11}, // Psalms:58
-{15348, 17}, // Psalms:59
-{15366, 12}, // Psalms:60
-{15379, 8}, // Psalms:61
-{15388, 12}, // Psalms:62
-{15401, 11}, // Psalms:63
-{15413, 10}, // Psalms:64
-{15424, 13}, // Psalms:65
-{15438, 20}, // Psalms:66
-{15459, 7}, // Psalms:67
-{15467, 35}, // Psalms:68
-{15503, 36}, // Psalms:69
-{15540, 5}, // Psalms:70
-{15546, 24}, // Psalms:71
-{15571, 20}, // Psalms:72
-{15592, 28}, // Psalms:73
-{15621, 23}, // Psalms:74
-{15645, 10}, // Psalms:75
-{15656, 12}, // Psalms:76
-{15669, 20}, // Psalms:77
-{15690, 72}, // Psalms:78
-{15763, 13}, // Psalms:79
-{15777, 19}, // Psalms:80
-{15797, 16}, // Psalms:81
-{15814, 8}, // Psalms:82
-{15823, 18}, // Psalms:83
-{15842, 12}, // Psalms:84
-{15855, 13}, // Psalms:85
-{15869, 17}, // Psalms:86
-{15887, 7}, // Psalms:87
-{15895, 18}, // Psalms:88
-{15914, 52}, // Psalms:89
-{15967, 17}, // Psalms:90
-{15985, 16}, // Psalms:91
-{16002, 15}, // Psalms:92
-{16018, 5}, // Psalms:93
-{16024, 23}, // Psalms:94
-{16048, 11}, // Psalms:95
-{16060, 13}, // Psalms:96
-{16074, 12}, // Psalms:97
-{16087, 9}, // Psalms:98
-{16097, 9}, // Psalms:99
-{16107, 5}, // Psalms:100
-{16113, 8}, // Psalms:101
-{16122, 28}, // Psalms:102
-{16151, 22}, // Psalms:103
-{16174, 35}, // Psalms:104
-{16210, 45}, // Psalms:105
-{16256, 48}, // Psalms:106
-{16305, 43}, // Psalms:107
-{16349, 13}, // Psalms:108
-{16363, 31}, // Psalms:109
-{16395, 7}, // Psalms:110
-{16403, 10}, // Psalms:111
-{16414, 10}, // Psalms:112
-{16425, 9}, // Psalms:113
-{16435, 8}, // Psalms:114
-{16444, 18}, // Psalms:115
-{16463, 19}, // Psalms:116
-{16483, 2}, // Psalms:117
-{16486, 29}, // Psalms:118
-{16516, 176}, // Psalms:119
-{16693, 7}, // Psalms:120
-{16701, 8}, // Psalms:121
-{16710, 9}, // Psalms:122
-{16720, 4}, // Psalms:123
-{16725, 8}, // Psalms:124
-{16734, 5}, // Psalms:125
-{16740, 6}, // Psalms:126
-{16747, 5}, // Psalms:127
-{16753, 6}, // Psalms:128
-{16760, 8}, // Psalms:129
-{16769, 8}, // Psalms:130
-{16778, 3}, // Psalms:131
-{16782, 18}, // Psalms:132
-{16801, 3}, // Psalms:133
-{16805, 3}, // Psalms:134
-{16809, 21}, // Psalms:135
-{16831, 26}, // Psalms:136
-{16858, 9}, // Psalms:137
-{16868, 8}, // Psalms:138
-{16877, 24}, // Psalms:139
-{16902, 13}, // Psalms:140
-{16916, 10}, // Psalms:141
-{16927, 7}, // Psalms:142
-{16935, 12}, // Psalms:143
-{16948, 15}, // Psalms:144
-{16964, 21}, // Psalms:145
-{16986, 10}, // Psalms:146
-{16997, 20}, // Psalms:147
-{17018, 14}, // Psalms:148
-{17033, 9}, // Psalms:149
-{17043, 6}, // Psalms:150
-{17050, 0}, // Proverbs:0
-{17051, 33}, // Proverbs:1
-{17085, 22}, // Proverbs:2
-{17108, 35}, // Proverbs:3
-{17144, 27}, // Proverbs:4
-{17172, 23}, // Proverbs:5
-{17196, 35}, // Proverbs:6
-{17232, 27}, // Proverbs:7
-{17260, 36}, // Proverbs:8
-{17297, 18}, // Proverbs:9
-{17316, 32}, // Proverbs:10
-{17349, 31}, // Proverbs:11
-{17381, 28}, // Proverbs:12
-{17410, 25}, // Proverbs:13
-{17436, 35}, // Proverbs:14
-{17472, 33}, // Proverbs:15
-{17506, 33}, // Proverbs:16
-{17540, 28}, // Proverbs:17
-{17569, 24}, // Proverbs:18
-{17594, 29}, // Proverbs:19
-{17624, 30}, // Proverbs:20
-{17655, 31}, // Proverbs:21
-{17687, 29}, // Proverbs:22
-{17717, 35}, // Proverbs:23
-{17753, 34}, // Proverbs:24
-{17788, 28}, // Proverbs:25
-{17817, 28}, // Proverbs:26
-{17846, 27}, // Proverbs:27
-{17874, 28}, // Proverbs:28
-{17903, 27}, // Proverbs:29
-{17931, 33}, // Proverbs:30
-{17965, 31}, // Proverbs:31
-{17997, 0}, // Ecclesiastes:0
-{17998, 18}, // Ecclesiastes:1
-{18017, 26}, // Ecclesiastes:2
-{18044, 22}, // Ecclesiastes:3
-{18067, 16}, // Ecclesiastes:4
-{18084, 20}, // Ecclesiastes:5
-{18105, 12}, // Ecclesiastes:6
-{18118, 29}, // Ecclesiastes:7
-{18148, 17}, // Ecclesiastes:8
-{18166, 18}, // Ecclesiastes:9
-{18185, 20}, // Ecclesiastes:10
-{18206, 10}, // Ecclesiastes:11
-{18217, 14}, // Ecclesiastes:12
-{18232, 0}, // Song of Solomon:0
-{18233, 17}, // Song of Solomon:1
-{18251, 17}, // Song of Solomon:2
-{18269, 11}, // Song of Solomon:3
-{18281, 16}, // Song of Solomon:4
-{18298, 16}, // Song of Solomon:5
-{18315, 13}, // Song of Solomon:6
-{18329, 13}, // Song of Solomon:7
-{18343, 14}, // Song of Solomon:8
-{18358, 0}, // Isaiah:0
-{18359, 31}, // Isaiah:1
-{18391, 22}, // Isaiah:2
-{18414, 26}, // Isaiah:3
-{18441, 6}, // Isaiah:4
-{18448, 30}, // Isaiah:5
-{18479, 13}, // Isaiah:6
-{18493, 25}, // Isaiah:7
-{18519, 22}, // Isaiah:8
-{18542, 21}, // Isaiah:9
-{18564, 34}, // Isaiah:10
-{18599, 16}, // Isaiah:11
-{18616, 6}, // Isaiah:12
-{18623, 22}, // Isaiah:13
-{18646, 32}, // Isaiah:14
-{18679, 9}, // Isaiah:15
-{18689, 14}, // Isaiah:16
-{18704, 14}, // Isaiah:17
-{18719, 7}, // Isaiah:18
-{18727, 25}, // Isaiah:19
-{18753, 6}, // Isaiah:20
-{18760, 17}, // Isaiah:21
-{18778, 25}, // Isaiah:22
-{18804, 18}, // Isaiah:23
-{18823, 23}, // Isaiah:24
-{18847, 12}, // Isaiah:25
-{18860, 21}, // Isaiah:26
-{18882, 13}, // Isaiah:27
-{18896, 29}, // Isaiah:28
-{18926, 24}, // Isaiah:29
-{18951, 33}, // Isaiah:30
-{18985, 9}, // Isaiah:31
-{18995, 20}, // Isaiah:32
-{19016, 24}, // Isaiah:33
-{19041, 17}, // Isaiah:34
-{19059, 10}, // Isaiah:35
-{19070, 22}, // Isaiah:36
-{19093, 38}, // Isaiah:37
-{19132, 22}, // Isaiah:38
-{19155, 8}, // Isaiah:39
-{19164, 31}, // Isaiah:40
-{19196, 29}, // Isaiah:41
-{19226, 25}, // Isaiah:42
-{19252, 28}, // Isaiah:43
-{19281, 28}, // Isaiah:44
-{19310, 25}, // Isaiah:45
-{19336, 13}, // Isaiah:46
-{19350, 15}, // Isaiah:47
-{19366, 22}, // Isaiah:48
-{19389, 26}, // Isaiah:49
-{19416, 11}, // Isaiah:50
-{19428, 23}, // Isaiah:51
-{19452, 15}, // Isaiah:52
-{19468, 12}, // Isaiah:53
-{19481, 17}, // Isaiah:54
-{19499, 13}, // Isaiah:55
-{19513, 12}, // Isaiah:56
-{19526, 21}, // Isaiah:57
-{19548, 14}, // Isaiah:58
-{19563, 21}, // Isaiah:59
-{19585, 22}, // Isaiah:60
-{19608, 11}, // Isaiah:61
-{19620, 12}, // Isaiah:62
-{19633, 19}, // Isaiah:63
-{19653, 12}, // Isaiah:64
-{19666, 25}, // Isaiah:65
-{19692, 24}, // Isaiah:66
-{19717, 0}, // Jeremiah:0
-{19718, 19}, // Jeremiah:1
-{19738, 37}, // Jeremiah:2
-{19776, 25}, // Jeremiah:3
-{19802, 31}, // Jeremiah:4
-{19834, 31}, // Jeremiah:5
-{19866, 30}, // Jeremiah:6
-{19897, 34}, // Jeremiah:7
-{19932, 22}, // Jeremiah:8
-{19955, 26}, // Jeremiah:9
-{19982, 25}, // Jeremiah:10
-{20008, 23}, // Jeremiah:11
-{20032, 17}, // Jeremiah:12
-{20050, 27}, // Jeremiah:13
-{20078, 22}, // Jeremiah:14
-{20101, 21}, // Jeremiah:15
-{20123, 21}, // Jeremiah:16
-{20145, 27}, // Jeremiah:17
-{20173, 23}, // Jeremiah:18
-{20197, 15}, // Jeremiah:19
-{20213, 18}, // Jeremiah:20
-{20232, 14}, // Jeremiah:21
-{20247, 30}, // Jeremiah:22
-{20278, 40}, // Jeremiah:23
-{20319, 10}, // Jeremiah:24
-{20330, 38}, // Jeremiah:25
-{20369, 24}, // Jeremiah:26
-{20394, 22}, // Jeremiah:27
-{20417, 17}, // Jeremiah:28
-{20435, 32}, // Jeremiah:29
-{20468, 24}, // Jeremiah:30
-{20493, 40}, // Jeremiah:31
-{20534, 44}, // Jeremiah:32
-{20579, 26}, // Jeremiah:33
-{20606, 22}, // Jeremiah:34
-{20629, 19}, // Jeremiah:35
-{20649, 32}, // Jeremiah:36
-{20682, 21}, // Jeremiah:37
-{20704, 28}, // Jeremiah:38
-{20733, 18}, // Jeremiah:39
-{20752, 16}, // Jeremiah:40
-{20769, 18}, // Jeremiah:41
-{20788, 22}, // Jeremiah:42
-{20811, 13}, // Jeremiah:43
-{20825, 30}, // Jeremiah:44
-{20856, 5}, // Jeremiah:45
-{20862, 28}, // Jeremiah:46
-{20891, 7}, // Jeremiah:47
-{20899, 47}, // Jeremiah:48
-{20947, 39}, // Jeremiah:49
-{20987, 46}, // Jeremiah:50
-{21034, 64}, // Jeremiah:51
-{21099, 34}, // Jeremiah:52
-{21134, 0}, // Lamentations:0
-{21135, 22}, // Lamentations:1
-{21158, 22}, // Lamentations:2
-{21181, 66}, // Lamentations:3
-{21248, 22}, // Lamentations:4
-{21271, 22}, // Lamentations:5
-{21294, 0}, // Ezekiel:0
-{21295, 28}, // Ezekiel:1
-{21324, 10}, // Ezekiel:2
-{21335, 27}, // Ezekiel:3
-{21363, 17}, // Ezekiel:4
-{21381, 17}, // Ezekiel:5
-{21399, 14}, // Ezekiel:6
-{21414, 27}, // Ezekiel:7
-{21442, 18}, // Ezekiel:8
-{21461, 11}, // Ezekiel:9
-{21473, 22}, // Ezekiel:10
-{21496, 25}, // Ezekiel:11
-{21522, 28}, // Ezekiel:12
-{21551, 23}, // Ezekiel:13
-{21575, 23}, // Ezekiel:14
-{21599, 8}, // Ezekiel:15
-{21608, 63}, // Ezekiel:16
-{21672, 24}, // Ezekiel:17
-{21697, 32}, // Ezekiel:18
-{21730, 14}, // Ezekiel:19
-{21745, 49}, // Ezekiel:20
-{21795, 32}, // Ezekiel:21
-{21828, 31}, // Ezekiel:22
-{21860, 49}, // Ezekiel:23
-{21910, 27}, // Ezekiel:24
-{21938, 17}, // Ezekiel:25
-{21956, 21}, // Ezekiel:26
-{21978, 36}, // Ezekiel:27
-{22015, 26}, // Ezekiel:28
-{22042, 21}, // Ezekiel:29
-{22064, 26}, // Ezekiel:30
-{22091, 18}, // Ezekiel:31
-{22110, 32}, // Ezekiel:32
-{22143, 33}, // Ezekiel:33
-{22177, 31}, // Ezekiel:34
-{22209, 15}, // Ezekiel:35
-{22225, 38}, // Ezekiel:36
-{22264, 28}, // Ezekiel:37
-{22293, 23}, // Ezekiel:38
-{22317, 29}, // Ezekiel:39
-{22347, 49}, // Ezekiel:40
-{22397, 26}, // Ezekiel:41
-{22424, 20}, // Ezekiel:42
-{22445, 27}, // Ezekiel:43
-{22473, 31}, // Ezekiel:44
-{22505, 25}, // Ezekiel:45
-{22531, 24}, // Ezekiel:46
-{22556, 23}, // Ezekiel:47
-{22580, 35}, // Ezekiel:48
-{22616, 0}, // Daniel:0
-{22617, 21}, // Daniel:1
-{22639, 49}, // Daniel:2
-{22689, 30}, // Daniel:3
-{22720, 37}, // Daniel:4
-{22758, 31}, // Daniel:5
-{22790, 28}, // Daniel:6
-{22819, 28}, // Daniel:7
-{22848, 27}, // Daniel:8
-{22876, 27}, // Daniel:9
-{22904, 21}, // Daniel:10
-{22926, 45}, // Daniel:11
-{22972, 13}, // Daniel:12
-{22986, 0}, // Hosea:0
-{22987, 11}, // Hosea:1
-{22999, 23}, // Hosea:2
-{23023, 5}, // Hosea:3
-{23029, 19}, // Hosea:4
-{23049, 15}, // Hosea:5
-{23065, 11}, // Hosea:6
-{23077, 16}, // Hosea:7
-{23094, 14}, // Hosea:8
-{23109, 17}, // Hosea:9
-{23127, 15}, // Hosea:10
-{23143, 12}, // Hosea:11
-{23156, 14}, // Hosea:12
-{23171, 16}, // Hosea:13
-{23188, 9}, // Hosea:14
-{23198, 0}, // Joel:0
-{23199, 20}, // Joel:1
-{23220, 32}, // Joel:2
-{23253, 21}, // Joel:3
-{23275, 0}, // Amos:0
-{23276, 15}, // Amos:1
-{23292, 16}, // Amos:2
-{23309, 15}, // Amos:3
-{23325, 13}, // Amos:4
-{23339, 27}, // Amos:5
-{23367, 14}, // Amos:6
-{23382, 17}, // Amos:7
-{23400, 14}, // Amos:8
-{23415, 15}, // Amos:9
-{23431, 0}, // Obadiah:0
-{23432, 21}, // Obadiah:1
-{23454, 0}, // Jonah:0
-{23455, 17}, // Jonah:1
-{23473, 10}, // Jonah:2
-{23484, 10}, // Jonah:3
-{23495, 11}, // Jonah:4
-{23507, 0}, // Micah:0
-{23508, 16}, // Micah:1
-{23525, 13}, // Micah:2
-{23539, 12}, // Micah:3
-{23552, 13}, // Micah:4
-{23566, 15}, // Micah:5
-{23582, 16}, // Micah:6
-{23599, 20}, // Micah:7
-{23620, 0}, // Nahum:0
-{23621, 15}, // Nahum:1
-{23637, 13}, // Nahum:2
-{23651, 19}, // Nahum:3
-{23671, 0}, // Habakkuk:0
-{23672, 17}, // Habakkuk:1
-{23690, 20}, // Habakkuk:2
-{23711, 19}, // Habakkuk:3
-{23731, 0}, // Zephaniah:0
-{23732, 18}, // Zephaniah:1
-{23751, 15}, // Zephaniah:2
-{23767, 20}, // Zephaniah:3
-{23788, 0}, // Haggai:0
-{23789, 15}, // Haggai:1
-{23805, 23}, // Haggai:2
-{23829, 0}, // Zechariah:0
-{23830, 21}, // Zechariah:1
-{23852, 13}, // Zechariah:2
-{23866, 10}, // Zechariah:3
-{23877, 14}, // Zechariah:4
-{23892, 11}, // Zechariah:5
-{23904, 15}, // Zechariah:6
-{23920, 14}, // Zechariah:7
-{23935, 23}, // Zechariah:8
-{23959, 17}, // Zechariah:9
-{23977, 12}, // Zechariah:10
-{23990, 17}, // Zechariah:11
-{24008, 14}, // Zechariah:12
-{24023, 9}, // Zechariah:13
-{24033, 21}, // Zechariah:14
-{24055, 0}, // Malachi:0
-{24056, 14}, // Malachi:1
-{24071, 17}, // Malachi:2
-{24089, 18}, // Malachi:3
-{24108, 6}, // Malachi:4
-{24115, 0}, // NT Header
-{24116, 0}, // Matthew:0
-{24117, 25}, // Matthew:1
-{24143, 23}, // Matthew:2
-{24167, 17}, // Matthew:3
-{24185, 25}, // Matthew:4
-{24211, 48}, // Matthew:5
-{24260, 34}, // Matthew:6
-{24295, 29}, // Matthew:7
-{24325, 34}, // Matthew:8
-{24360, 38}, // Matthew:9
-{24399, 42}, // Matthew:10
-{24442, 30}, // Matthew:11
-{24473, 50}, // Matthew:12
-{24524, 58}, // Matthew:13
-{24583, 36}, // Matthew:14
-{24620, 39}, // Matthew:15
-{24660, 28}, // Matthew:16
-{24689, 27}, // Matthew:17
-{24717, 35}, // Matthew:18
-{24753, 30}, // Matthew:19
-{24784, 34}, // Matthew:20
-{24819, 46}, // Matthew:21
-{24866, 46}, // Matthew:22
-{24913, 39}, // Matthew:23
-{24953, 51}, // Matthew:24
-{25005, 46}, // Matthew:25
-{25052, 75}, // Matthew:26
-{25128, 66}, // Matthew:27
-{25195, 20}, // Matthew:28
-{25216, 0}, // Mark:0
-{25217, 45}, // Mark:1
-{25263, 28}, // Mark:2
-{25292, 35}, // Mark:3
-{25328, 41}, // Mark:4
-{25370, 43}, // Mark:5
-{25414, 56}, // Mark:6
-{25471, 37}, // Mark:7
-{25509, 38}, // Mark:8
-{25548, 50}, // Mark:9
-{25599, 52}, // Mark:10
-{25652, 33}, // Mark:11
-{25686, 44}, // Mark:12
-{25731, 37}, // Mark:13
-{25769, 72}, // Mark:14
-{25842, 47}, // Mark:15
-{25890, 20}, // Mark:16
-{25911, 0}, // Luke:0
-{25912, 80}, // Luke:1
-{25993, 52}, // Luke:2
-{26046, 38}, // Luke:3
-{26085, 44}, // Luke:4
-{26130, 39}, // Luke:5
-{26170, 49}, // Luke:6
-{26220, 50}, // Luke:7
-{26271, 56}, // Luke:8
-{26328, 62}, // Luke:9
-{26391, 42}, // Luke:10
-{26434, 54}, // Luke:11
-{26489, 59}, // Luke:12
-{26549, 35}, // Luke:13
-{26585, 35}, // Luke:14
-{26621, 32}, // Luke:15
-{26654, 31}, // Luke:16
-{26686, 37}, // Luke:17
-{26724, 43}, // Luke:18
-{26768, 48}, // Luke:19
-{26817, 47}, // Luke:20
-{26865, 38}, // Luke:21
-{26904, 71}, // Luke:22
-{26976, 56}, // Luke:23
-{27033, 53}, // Luke:24
-{27087, 0}, // John:0
-{27088, 51}, // John:1
-{27140, 25}, // John:2
-{27166, 36}, // John:3
-{27203, 54}, // John:4
-{27258, 47}, // John:5
-{27306, 71}, // John:6
-{27378, 53}, // John:7
-{27432, 59}, // John:8
-{27492, 41}, // John:9
-{27534, 42}, // John:10
-{27577, 57}, // John:11
-{27635, 50}, // John:12
-{27686, 38}, // John:13
-{27725, 31}, // John:14
-{27757, 27}, // John:15
-{27785, 33}, // John:16
-{27819, 26}, // John:17
-{27846, 40}, // John:18
-{27887, 42}, // John:19
-{27930, 31}, // John:20
-{27962, 25}, // John:21
-{27988, 0}, // Acts:0
-{27989, 26}, // Acts:1
-{28016, 47}, // Acts:2
-{28064, 26}, // Acts:3
-{28091, 37}, // Acts:4
-{28129, 42}, // Acts:5
-{28172, 15}, // Acts:6
-{28188, 60}, // Acts:7
-{28249, 40}, // Acts:8
-{28290, 43}, // Acts:9
-{28334, 48}, // Acts:10
-{28383, 30}, // Acts:11
-{28414, 25}, // Acts:12
-{28440, 52}, // Acts:13
-{28493, 28}, // Acts:14
-{28522, 41}, // Acts:15
-{28564, 40}, // Acts:16
-{28605, 34}, // Acts:17
-{28640, 28}, // Acts:18
-{28669, 41}, // Acts:19
-{28711, 38}, // Acts:20
-{28750, 40}, // Acts:21
-{28791, 30}, // Acts:22
-{28822, 35}, // Acts:23
-{28858, 27}, // Acts:24
-{28886, 27}, // Acts:25
-{28914, 32}, // Acts:26
-{28947, 44}, // Acts:27
-{28992, 31}, // Acts:28
-{29024, 0}, // Romans:0
-{29025, 32}, // Romans:1
-{29058, 29}, // Romans:2
-{29088, 31}, // Romans:3
-{29120, 25}, // Romans:4
-{29146, 21}, // Romans:5
-{29168, 23}, // Romans:6
-{29192, 25}, // Romans:7
-{29218, 39}, // Romans:8
-{29258, 33}, // Romans:9
-{29292, 21}, // Romans:10
-{29314, 36}, // Romans:11
-{29351, 21}, // Romans:12
-{29373, 14}, // Romans:13
-{29388, 23}, // Romans:14
-{29412, 33}, // Romans:15
-{29446, 27}, // Romans:16
-{29474, 0}, // I Corinthians:0
-{29475, 31}, // I Corinthians:1
-{29507, 16}, // I Corinthians:2
-{29524, 23}, // I Corinthians:3
-{29548, 21}, // I Corinthians:4
-{29570, 13}, // I Corinthians:5
-{29584, 20}, // I Corinthians:6
-{29605, 40}, // I Corinthians:7
-{29646, 13}, // I Corinthians:8
-{29660, 27}, // I Corinthians:9
-{29688, 33}, // I Corinthians:10
-{29722, 34}, // I Corinthians:11
-{29757, 31}, // I Corinthians:12
-{29789, 13}, // I Corinthians:13
-{29803, 40}, // I Corinthians:14
-{29844, 58}, // I Corinthians:15
-{29903, 24}, // I Corinthians:16
-{29928, 0}, // II Corinthians:0
-{29929, 24}, // II Corinthians:1
-{29954, 17}, // II Corinthians:2
-{29972, 18}, // II Corinthians:3
-{29991, 18}, // II Corinthians:4
-{30010, 21}, // II Corinthians:5
-{30032, 18}, // II Corinthians:6
-{30051, 16}, // II Corinthians:7
-{30068, 24}, // II Corinthians:8
-{30093, 15}, // II Corinthians:9
-{30109, 18}, // II Corinthians:10
-{30128, 33}, // II Corinthians:11
-{30162, 21}, // II Corinthians:12
-{30184, 14}, // II Corinthians:13
-{30199, 0}, // Galatians:0
-{30200, 24}, // Galatians:1
-{30225, 21}, // Galatians:2
-{30247, 29}, // Galatians:3
-{30277, 31}, // Galatians:4
-{30309, 26}, // Galatians:5
-{30336, 18}, // Galatians:6
-{30355, 0}, // Ephesians:0
-{30356, 23}, // Ephesians:1
-{30380, 22}, // Ephesians:2
-{30403, 21}, // Ephesians:3
-{30425, 32}, // Ephesians:4
-{30458, 33}, // Ephesians:5
-{30492, 24}, // Ephesians:6
-{30517, 0}, // Philippians:0
-{30518, 30}, // Philippians:1
-{30549, 30}, // Philippians:2
-{30580, 21}, // Philippians:3
-{30602, 23}, // Philippians:4
-{30626, 0}, // Colossians:0
-{30627, 29}, // Colossians:1
-{30657, 23}, // Colossians:2
-{30681, 25}, // Colossians:3
-{30707, 18}, // Colossians:4
-{30726, 0}, // I Thessalonians:0
-{30727, 10}, // I Thessalonians:1
-{30738, 20}, // I Thessalonians:2
-{30759, 13}, // I Thessalonians:3
-{30773, 18}, // I Thessalonians:4
-{30792, 28}, // I Thessalonians:5
-{30821, 0}, // II Thessalonians:0
-{30822, 12}, // II Thessalonians:1
-{30835, 17}, // II Thessalonians:2
-{30853, 18}, // II Thessalonians:3
-{30872, 0}, // I Timothy:0
-{30873, 20}, // I Timothy:1
-{30894, 15}, // I Timothy:2
-{30910, 16}, // I Timothy:3
-{30927, 16}, // I Timothy:4
-{30944, 25}, // I Timothy:5
-{30970, 21}, // I Timothy:6
-{30992, 0}, // II Timothy:0
-{30993, 18}, // II Timothy:1
-{31012, 26}, // II Timothy:2
-{31039, 17}, // II Timothy:3
-{31057, 22}, // II Timothy:4
-{31080, 0}, // Titus:0
-{31081, 16}, // Titus:1
-{31098, 15}, // Titus:2
-{31114, 15}, // Titus:3
-{31130, 0}, // Philemon:0
-{31131, 25}, // Philemon:1
-{31157, 0}, // Hebrews:0
-{31158, 14}, // Hebrews:1
-{31173, 18}, // Hebrews:2
-{31192, 19}, // Hebrews:3
-{31212, 16}, // Hebrews:4
-{31229, 14}, // Hebrews:5
-{31244, 20}, // Hebrews:6
-{31265, 28}, // Hebrews:7
-{31294, 13}, // Hebrews:8
-{31308, 28}, // Hebrews:9
-{31337, 39}, // Hebrews:10
-{31377, 40}, // Hebrews:11
-{31418, 29}, // Hebrews:12
-{31448, 25}, // Hebrews:13
-{31474, 0}, // James:0
-{31475, 27}, // James:1
-{31503, 26}, // James:2
-{31530, 18}, // James:3
-{31549, 17}, // James:4
-{31567, 20}, // James:5
-{31588, 0}, // I Peter:0
-{31589, 25}, // I Peter:1
-{31615, 25}, // I Peter:2
-{31641, 22}, // I Peter:3
-{31664, 19}, // I Peter:4
-{31684, 14}, // I Peter:5
-{31699, 0}, // II Peter:0
-{31700, 21}, // II Peter:1
-{31722, 22}, // II Peter:2
-{31745, 18}, // II Peter:3
-{31764, 0}, // I John:0
-{31765, 10}, // I John:1
-{31776, 29}, // I John:2
-{31806, 24}, // I John:3
-{31831, 21}, // I John:4
-{31853, 21}, // I John:5
-{31875, 0}, // II John:0
-{31876, 13}, // II John:1
-{31890, 0}, // III John:0
-{31891, 14}, // III John:1
-{31906, 0}, // Jude:0
-{31907, 25}, // Jude:1
-{31933, 0}, // Revelation of John:0
-{31934, 20}, // Revelation of John:1
-{31955, 29}, // Revelation of John:2
-{31985, 22}, // Revelation of John:3
-{32008, 11}, // Revelation of John:4
-{32020, 14}, // Revelation of John:5
-{32035, 17}, // Revelation of John:6
-{32053, 17}, // Revelation of John:7
-{32071, 13}, // Revelation of John:8
-{32085, 21}, // Revelation of John:9
-{32107, 11}, // Revelation of John:10
-{32119, 19}, // Revelation of John:11
-{32139, 17}, // Revelation of John:12
-{32157, 18}, // Revelation of John:13
-{32176, 20}, // Revelation of John:14
-{32197, 8}, // Revelation of John:15
-{32206, 21}, // Revelation of John:16
-{32228, 18}, // Revelation of John:17
-{32247, 24}, // Revelation of John:18
-{32272, 21}, // Revelation of John:19
-{32294, 15}, // Revelation of John:20
-{32310, 27}, // Revelation of John:21
-{32338, 21} // Revelation of John:22
-};
-#if 0
-int
-  RefSys::offsize[2] =
-  { NTBOOKS+OTBOOKS+3, sizeof (RefSys::kjvcps) / sizeof(bkref)
-};
-#endif
-

Modified: trunk/include/rawtext.h
===================================================================
--- trunk/include/rawtext.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/rawtext.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -29,24 +29,12 @@
 
 #include <defs.h>
 
-#ifdef USELUCENE
-namespace lucene { namespace index {
-class IndexReader;
-}}
-
-namespace lucene { namespace search {
-class IndexSearcher;
-}}
-#endif
-
 SWORD_NAMESPACE_START
 
 class SWDLLEXPORT RawText : public SWText, public RawVerse {
 
 	VerseKey &getVerseKey();
-#ifndef USELUCENE
 	RawStr *fastSearch[2];
-#endif
 
 public:
   
@@ -56,14 +44,12 @@
 	virtual SWBuf &getRawEntryBuf();
 	virtual void increment(int steps = 1);
 	virtual void decrement(int steps = 1) { increment(-steps); }
-#ifndef USELUCENE
 	virtual signed char createSearchFramework(
 			void (*percent) (char, void *) = &nullPercent,
 			void *percentUserData = 0);
 	virtual void deleteSearchFramework();
 	virtual bool hasSearchFramework() { return true; }
 	virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent)(char, void *) = &SWModule::nullPercent, void *percentUserData = 0);
-#endif
 	// write interface ----------------------------
 	virtual bool isWritable() { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR)); }
 	static char createModule(const char *path) { return RawVerse::createModule(path); }

Deleted: trunk/include/refsys.h
===================================================================
--- trunk/include/refsys.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/refsys.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,81 +0,0 @@
-/******************************************************************************
- *	refsys.h - code for class 'refsys'- Biblical reference system
- *
- * $Id$
- *
- * Copyright 2004 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ	85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU
- * General Public License for more details.
- *
- */
- 
-#ifndef REFSYS_H
-#define REFSYS_H
-
-#include <defs.h>
-
-SWORD_NAMESPACE_START
-
-
-#define OTBOOKS 39
-#define NTBOOKS 27
-#define MAXOSISBOOKS 93
-#define TESTAMENT_HEADING 255
-#define NOTINREFSYS -1
-
-
- 
-struct bkref
-{
-	long offset;
-	unsigned char maxnext;
-};
-
-
-class SWDLLEXPORT RefSys
-{
-	const bkref *m_offsets[2];
-	int m_offsize[2];
-	char *m_name;
-
-	//static bkref kjvbks[];
-	//static bkref kjvcps[];
-	/** Binary search to find the index closest, but less
-	* than the given value.
-	*
-	* @param array long * to array to search
-	* @param size number of elements in the array
-	* @param value value to find
-	* @return the index into the array that is less than but closest to value
-	*/
-	int findindex(const bkref *array, int size, long value) const;
-
-
-public:
-	RefSys(const char *name,
-		const bkref *offsets[2] = 0,
-		const int offsize[2] = 0
-	);
-	~RefSys();
-
-	virtual const int getMaxChaptersInBook(char book) const;
-	virtual const int getMaxVerseInChapter(char book, int chapter) const;
-	void getBCV(long iindex, char *book, int *chapter, int *verse) const;
-	const long getIndex(char book, int chapter, int verse) const;
-	const bool isBookInRefSys(char book) const;
-	const char *getName() const {return m_name;}
-
-};
-
-SWORD_NAMESPACE_END
-#endif

Deleted: trunk/include/refsysmgr.h
===================================================================
--- trunk/include/refsysmgr.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/refsysmgr.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,123 +0,0 @@
-/******************************************************************************
- *  refsysmgr.h   - definition of class RefSysMgr used to interact with
- *				registered biblical reference systems for a sword installation
- *
- * $Id$
- *
- * Copyright 2004 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#ifndef REFSYSMGR_H
-#define REFSYSMGR_H
-
-
-#include <map>
-#include <list>
-//#include <swconfig.h>
-
-#include <defs.h>
-
-SWORD_NAMESPACE_START
-
-class RefSys;
-class VerseKey2;
-#if 0
-struct RefDetails 
-{
-	char *name;
-	int cpssize;
-};
-#endif
-typedef std::pair <RefSys *, int> RefDetails;
-typedef std::list<SWBuf> StringList;
-typedef std::map < SWBuf, RefDetails, std::less < SWBuf > > RefSysMap;
-/**
-* The RefSysMgr class handles all the different locales of Sword.
-* It provides functions to get a list of all available locales,
-* to get the default locale name and to get it.
-* The other functions are not interesting for frontend programmers.
-*
-* To get the default locale name use @see getDefaultLocaleName
-* To set the default locale name use @see setDefaultLocaleName
-* To get the locale for a language name use @see getLocale
-* To get a list of availble locales use @see getAvailableLocales
-*/
-
-
-class SWDLLEXPORT RefSysMgr {
-private:
-	void deleteRefSys();
-	char *defaultRefSysName;
-	RefSysMgr(const RefSysMgr &);
-	friend class __staticsystemRefSysMgr;
-	RefSys *loadRefSys(const char *name, int cpssize);
-	SWBuf refpath;
-protected:
-	RefSysMap *m_reflist;
-	static RefSysMgr *systemRefSysMgr;
-
-public:
-
-	/** Default constructor of  RefSysMgr
-	* You do normally not need this constructor, use RefSysMgr::getSystemRefSysMgr() instead.
-	*/
-	RefSysMgr(const char *iConfigPath = 0);
-
-	/**
-	* Default destructor of RefSysMgr
-	*/
-	virtual ~RefSysMgr();
-
-	/** Get the locale connected with the name "name".
-	*
-	* @param name The name of the locale you want to have. For example use getLocale("de") to get the locale for the German language.
-	* @return Returns the locale object if the locale with the name given as parameter was found. If it wasn't found return NULL.
-	*/
-	virtual RefSys *getRefSys(const char *name);
-	virtual VerseKey2 *getVerseKey(const char *name, const char *key);
-
-	/** Get the list of available locales.
-	*
-	* @return Returns a list of strings, which contains the names of the available locales.
-	*/
-	virtual StringList getAvailableRefSys();
-	/** Get the default locale name. To set it use @see setDefaultLocaleName
-	*
-	* @return Returns the default locale name
-	*/
-	virtual const char *getDefaultRefSysName();
-
-	/** Set the new standard locale of Sword.
-	*
-	* @param name The name of the new default locale  
-	*/
-	virtual void setDefaultRefSysName(const char *name);
-
-	/** The RefSysMgr object used globally in the Sword world.
-	* Do not create your own RefSysMgr, use this static object instead.
-	*/
-	static RefSysMgr *getSystemRefSysMgr();
-	static void setSystemRefSysMgr(RefSysMgr *newRefSysMgr);
-
-	/** Augment this localmgr with all locale.conf files in a directory
-	*/
-	virtual void loadConfigDir(const char *ipath);
-
-};
-
-SWORD_NAMESPACE_END
-
-#endif

Deleted: trunk/include/remotesourcemgr.h
===================================================================
--- trunk/include/remotesourcemgr.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/remotesourcemgr.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,38 +0,0 @@
-/******************************************************************************
- *  remotesourcemgr.h	- definition of class SWCacheMgr used to provide an interface for
- *  	caching information of module sources
- *
- * $Id$
- *
- * Copyright 2002 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
- 
-#ifndef REMOTESOURCEMGR_H
-#define REMOTESOURCEMGR_H
- 
- #include <defs.h>
- #include "swsourcemgr.h"
-
-SWORD_NAMESPACE_START
-
-class SWDLLEXPORT RemoteSourceMgr: public SWSourceMgr {
-public:	
-	RemoteSourceMgr(const char *iHost, const char *iConfigPath);
-	char Refresh();
-}
-
-SWORD_NAMESPACE_END
-#endif

Modified: trunk/include/swlocale.h
===================================================================
--- trunk/include/swlocale.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/swlocale.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -24,24 +24,18 @@
 #define SWLOCALE_H
 
 #include <map>
-
 #include <swconfig.h>
-
 #include <versekey.h>
-#ifdef SPLITLIB
-#include <versekey2.h>
-#endif
-
 #include <defs.h>
 
 SWORD_NAMESPACE_START
-#define ENDOFABBREVS -2
 
+static const int ENDOFABBREVS = -2;
 typedef std::map < SWBuf, SWBuf, std::less < SWBuf > >LookupMap;
 
 /** SWLocale is used for the localisation of the booknames
 * The SWLocale is a class which holds the information of one language.
-* Every language supported by Sword has one SWLocale object, 
+* Every language supported by SWORD has one SWLocale object, 
 * get the name of the Language using @see getname of this class.
 * Another functions useful for frontend developers is @see getDescription.
 */
@@ -54,10 +48,6 @@
 	struct abbrev *bookAbbrevs;
 	char *BMAX;
 	struct sbook **books;
-	#ifdef SPLITLIB
-	struct sbook2 **books2;
-	struct abbrev2 *bookAbbrevs2;
-	#endif
 
 public:
 	SWLocale(const char *ifilename);
@@ -78,10 +68,6 @@
 	virtual SWLocale & operator +=(SWLocale &addFrom) { augment(addFrom); return *this; }
 	virtual const struct abbrev *getBookAbbrevs();
 	virtual void getBooks(char **iBMAX, struct sbook ***ibooks);
-	#ifdef SPLITLIB
-	virtual void getBooks2(struct sbook2 ***ibooks, VerseKey2 *vk);
-	virtual const struct abbrev2 *getBookAbbrevs2();
-	#endif
 };
 
 SWORD_NAMESPACE_END

Modified: trunk/include/swmodule.h
===================================================================
--- trunk/include/swmodule.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/swmodule.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -606,15 +606,12 @@
 	virtual bool isProcessEntryAttributes() const { return procEntAttr; }
 
 	// OPERATORS -----------------------------------------------------------------
-
 	
-#ifdef USELUCENE
 	virtual signed char createSearchFramework(
 			void (*percent) (char, void *) = &nullPercent,
 			void *percentUserData = 0);
 	virtual void deleteSearchFramework();
-	virtual bool hasSearchFramework() { return true; }
-#endif
+	virtual bool hasSearchFramework();
 
 	SWMODULE_OPERATORS
 

Deleted: trunk/include/swremotemgr.h
===================================================================

Deleted: trunk/include/swsourcemgr.h
===================================================================
--- trunk/include/swsourcemgr.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/swsourcemgr.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,68 +0,0 @@
-/******************************************************************************
- *  swsourcemgr.h	- definition of class SWSourceMgr used to provide an interface for
- *  	caching information of module sources
- *
- * $Id$
- *
- * Copyright 2002 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
- 
-#ifndef SWSOURCEMGR_H
-#define SWSOURCEMGR_H
- 
- #include <defs.h>
- 
-SWORD_NAMESPACE_START
-
-class SWConfig;
-
-class SWDLLEXPORT SWSourceMgr {
-private:
-	/** The path to the source's directory
-	*
-	*/
-	char *prefixPath;
-	/**
-	* The path to the source's config
-	*/
-	char *configPath;
-	/**
-	* The type of config 0 = file; 1 = directory
-	*/
-	char configType;
-	/** The global config object.
-	* This is the global config object. It contains all items of all modules,
-	* so lookups of entries should use this config object.
-	* If you want to save a cipher key or other things to the module config file,
-	* DO NOT USE this object, because it would corrupt your config files after config->Save().
-	*
-	* If you want to write to the modules config file read the informtaion of @ref setCipherKey() for an example of this.
-	*/
-	SWConfig *config;
-	/**
-	* ?
-	*/
-	SWConfig * myconfig;
-
-public:	
-	SWSourceMgr(const char *iConfigPath);
-	//SWMgr(const char *iConfigPath, bool autoload = true, SWFilterMgr *filterMgr = 0);
-	virtual char Refresh() = 0;
-	void loadConfigDir(const char *ipath);
-};
-
-SWORD_NAMESPACE_END
-#endif

Modified: trunk/include/versekey.h
===================================================================
--- trunk/include/versekey.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/versekey.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -23,10 +23,6 @@
 #ifndef VERSEKEY_H
 #define VERSEKEY_H
 
-#ifdef VK2
-#include <versekey2.h>
-#else
-
 #include <swkey.h>
 #include <swmacs.h>
 #include <listkey.h>
@@ -421,5 +417,4 @@
 
 SWORD_NAMESPACE_END
 
-#endif //VK2
 #endif //VERSEKEY_H

Deleted: trunk/include/versekey2.h
===================================================================
--- trunk/include/versekey2.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/versekey2.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,402 +0,0 @@
-/******************************************************************************
- *	versekey2.h - code for class 'versekey'- a standard Biblical verse key
- *
- * $Id$
- *
- * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ	85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU
- * General Public License for more details.
- *
- */
-
-
-#ifndef VERSEKEY2_H
-#define VERSEKEY2_H
-
-#include <swkey.h>
-#include <swmacs.h>
-#include <listkey.h>
-#include <ctype.h>
-#include <refsys.h>
-#include <defs.h>
-
-SWORD_NAMESPACE_START
-
-#define POS_MAXVERSE ((char)3)
-#define POS_MAXCHAPTER ((char)4)
-#define POS_MAXBOOK ((char)5)
-
-#define MAXVERSE SW_POSITION(POS_MAXVERSE)
-#define MAXCHAPTER SW_POSITION(POS_MAXCHAPTER)
-#define MAXBOOK SW_POSITION(POS_MAXBOOK)
-
-#define KEYERR_FAILEDPARSE 2
-
-#define GENESIS 2
-#define REVELATION 93
-#define MAXOSISBOOKS 93
-
-
-struct sbook2
-{
-	/**Name of book
-	*/
-	const char *name;
-
-	/**Preferred Abbreviation
-	*/
-	const char *prefAbbrev;
-};
-
-struct abbrev2
-{
-	const char *ab;
-	int book;
-};
-
-
-
-class SWLocale;
-
-/**
- * Class VerseKey2
- * The SWKey implementation used for verse based modules like Bibles or commentaries.
- */
-class SWDLLEXPORT VerseKey2:public SWKey {
-	class LocaleCache {
-	public:
-		char *name;
-		char *refsys;
-		unsigned int abbrevsCnt;
-		struct abbrev2 *abbrevs;
-		SWLocale *locale;
-		LocaleCache() : name(0), refsys(0), abbrevsCnt(0), abbrevs(0), locale(0) {};
-		virtual ~LocaleCache() {
-		if (name)
-			delete[]name;
-		if (refsys)
-			delete[]refsys;
-		if (abbrevs)
-			delete[] abbrevs;
-		}
-	};
-
-	static SWClass classdef;
-
-	static struct sbook2 osisbooks[];
-	/** number of instantiated VerseKey2 objects or derivitives 
-	*/
-	static int instance;
-	static LocaleCache *localeCache;
-	ListKey internalListKey;
-	const RefSys *m_refsys;
-
-	const struct abbrev2 *abbrevs;
-	char *locale;
-	int abbrevsCnt;
-	/** The Testament: 0 - Old; 1 - New
-	*/
-	mutable char book;
-	mutable int chapter;
-	mutable int verse;
-	/** flag for auto normalization 
-	*/
-	char autonorm;
-	/** flag for headings on/off
-	*/
-	char headings;
-
-	int getBookAbbrev(const char *abbr);
-	void initBounds() const;
-	/** initialize and allocate books array
-	*/
-	void initstatics();
-	/** initializes this VerseKey2()
-	*/
-	void init();
-	/** Refresh keytext based on testament|book|chapter|verse
-	* default auto normalization to true
-	* default display headings option is false
-	*/
-	void freshtext() const;
-	/**	Parse a character array into testament|book|chapter|verse 
-	*
-	*/
-	virtual char parse();
-	mutable VerseKey2 *lowerBound, *upperBound;
-	static struct sbook2 *builtin_books;
-	struct sbook2 **books;
-public:
-	/**
-	* VerseKey2 Constructor - initializes Instance of VerseKey2
-	*
-	* @param ikey text key (will take various forms of 'BOOK CH:VS'.
-	* See parse() for more detailed information)
-	*/
-	//VerseKey2(const char *ikey = 0);
-
-	/**
-	* VerseKey2 Constructor - initializes Instance of VerseKey2
-	*
-	* @param ikey text key (will take various forms of 'BOOK CH:VS'.
-	* See parse() for more detailed information)
-	* @param ref Reference system to use for the key
-	*/
-	VerseKey2(const char *ikey = 0, const RefSys *ref=0);
-	
-	/**
-	* VerseKey2 Constructor - initializes instance of VerseKey2
-	*
-	* @param ikey base key (will take various forms of 'BOOK CH:VS'.
-	*	See parse() for more detailed information)
-	*/	
-	VerseKey2(const SWKey * ikey);
-	
-	/** VerseKey2 Constructor - initializes instance of VerseKey2
-	* with boundariess - see also LowerBound()
-	* and UpperBound()
-	* @param min the lower boundary of the new	VerseKey2
-	* @param max the upper boundary of the new	VerseKey2
-	*/	
-	VerseKey2(const char *min, const char *max);
-	
-	/**	VerseKey2 Copy Constructor - will create a new	VerseKey2
-	* based on an existing one
-	*
-	* @param k the	VerseKey2 to copy from
-	*/
-	VerseKey2(const VerseKey2 &k);
-	
-	/**	VerseKey2 Destructor
-	* Cleans up an instance of VerseKey2
-	*/
-	virtual ~ VerseKey2();
-
-	/** sets the lower boundary for this	VerseKey2
-	* and returns the new boundary
-	*
-	* @param lb the new lower boundary for this	VerseKey2
-	* @return the lower boundary the key was set to
-	*/
-	//VerseKey2 & LowerBound(const char *lb);
-	VerseKey2 & LowerBound(const VerseKey2 & ikey);
-	
-	/** sets the upper boundary for this	VerseKey2
-	* and returns the new boundary
-	* @param ub the new upper boundary for this	VerseKey2
-	* @return the upper boundary the key was set to
-	*/
-	//VerseKey2 & UpperBound(const char *ub);
-	VerseKey2 & UpperBound(const VerseKey2 & ikey);
-	
-	/** gets the lower boundary of this	VerseKey2
-	* @return the lower boundary of this	VerseKey2
-	*/
-	VerseKey2 & LowerBound() const;
-	
-	/** gets the upper boundary of this	VerseKey2
-	* @return the upper boundary of this	VerseKey2
-	*/
-	VerseKey2 & UpperBound() const;
-	
-	/** clears the boundaries of this	VerseKey2
-	*/
-	void ClearBounds();
-	
-	/** Creates a new	SWKey based on the current	VerseKey2
-	* see also the Copy Constructor
-	*/
-	virtual SWKey *clone() const;
-	
-	/** refreshes keytext before returning if cast to
-	* a (char *) is requested
-	*/
-	virtual const char *getText() const;
-	virtual const char *getShortText() const;
-	virtual void setText(const char *ikey) { printf("VerseKey2::setText %s\n", ikey);SWKey::setText(ikey); parse (); }
-	virtual void copyFrom(const SWKey & ikey);
-	
-	/** Equates this VerseKey2 to another VerseKey2
-	*/
-	virtual void copyFrom(const VerseKey2 & ikey);
-	
-	/** Positions this key
-	*
-	* @param newpos Position to set to.
-	* @return *this
-	*/
-	virtual void setPosition(SW_POSITION newpos);
-	
-	/** Decrements key a number of verses
-	*
-	* @param steps Number of verses to jump backward
-	* @return *this
-	*/
-	virtual void decrement(int steps);
-	
-	/** Increments key a number of verses
-	*
-	* @param steps Number of verses to jump forward
-	* @return *this
-	*/
-	virtual void increment(int steps);
-	virtual bool isTraversable() { return true; }
-
-	virtual const char *getBookName() const;
-	virtual const char *getBookAbbrev() const;
-	
-	/** Gets book
-	*
-	* @return value of book
-	*/
-	virtual char Book() const;
-	
-	/** Gets chapter
-	*
-	* @return value of chapter
-	*/
-	virtual int Chapter() const;
-	
-	/** Gets verse
-	*
-	* @return value of verse
-	*/
-	virtual int Verse() const;
-		
-	/** Sets/gets book
-	*
-	* @param ibook value which to set book
-	* [MAXPOS(char)] - only get
-	* @return if unchanged -> value of book,
-	* if changed -> previous value of book
-	*/
-	virtual char Book(char ibook);
-	
-	/** Sets/gets chapter
-	*
-	* @param ichapter value which to set chapter
-	* [MAXPOS(int)] - only get
-	* @return if unchanged -> value of chapter,
-	* if changed -> previous value of chapter
-	*/
-	virtual int Chapter(int ichapter);
-	
-	/** Sets/gets verse
-	*
-	* @param iverse value which to set verse
-	* [MAXPOS(int)] - only get
-	* @return if unchanged -> value of verse,
-	* if changed -> previous value of verse
-	*/
-	virtual int Verse(int iverse);
-	
-	/** checks limits and normalizes if necessary (e.g.
-	* Matthew 29:47 = Mark 2:2).	If last verse is
-	* exceeded, key is set to last Book CH:VS
-	*
-	* @return *this
-	*/
-	virtual void Normalize(char autocheck = 0);
-	
-	/** Sets/gets flag that tells VerseKey2 to
-	* automatically normalize itself when modified
-	*
-	* @param iautonorm value which to set autonorm
-	* [MAXPOS(char)] - only get
-	* @return if unchanged -> value of autonorm,
-	* if changed -> previous value of autonorm
-	*/
-	virtual char AutoNormalize(char iautonorm = MAXPOS (char));
-	
-	/** Sets/gets flag that tells VerseKey2 to include
-	* chapter/book/testament/module headings
-	*
-	* @param iheadings value which to set headings
-	* [MAXPOS(char)] - only get
-	* @return if unchanged -> value of headings,
-	* if changed -> previous value of headings
-	*/
-	virtual char Headings(char iheadings = MAXPOS (char));
-	
-	virtual long NewIndex() const;
-	
-	/** Gets index based upon current verse
-	*
-	* @return offset
-	*/
-	virtual long Index() const;
-	
-	/** Sets index based upon current verse
-	*
-	* @param iindex value to set index to
-	* @return offset
-	*/
-	virtual long Index(long iindex);
-
-	virtual const char *getOSISRef() const;
-	static const int getOSISBookNum(const char *bookab);
-	
-	#if 0
-	virtual const char getMaxBooks() const;
-	#endif
-	virtual const char *getNameOfBook(char cBook) const;
-	virtual const char *getPrefAbbrev(char cBook) const;
-	virtual const int getMaxChaptersInBook(char cBook) const;
-	virtual const int getMaxVerseInChapter(char cBook, int iChapter) const;
-
-	virtual ListKey ParseVerseList(const char *buf, const char *defaultKey = "Genesis 1:1", bool expandRange = false);
-	virtual const char *getRangeText() const;
-	/** Compares another	SWKey object
-	*
-	* @param ikey key to compare with this one
-	* @return >0 if this	VerseKey2 is greater than compare	SWKey,
-	* <0 if this	VerseKey2 is smaller than compare	SWKey,
-	* 0 if the keys are the same
-	*/
-	virtual int compare(const SWKey & ikey);
-	
-	/** Compares another	VerseKey2 object
-	*
-	* @param ikey key to compare with this one
-	* @return >0 if this	VerseKey2 is greater than compare	VerseKey2,
-	* <0 if this	VerseKey2 is smaller than compare	VerseKey2,
-	* 0 if the keys are the same
-	*/
-	virtual int _compare(const VerseKey2 & ikey);
-	
-	virtual void setBookAbbrevs(const struct abbrev2 *bookAbbrevs);
-	virtual void setBooks(struct sbook2 **ibooks);
-	virtual void setLocale(const char *name);
-	virtual const char *getLocale() const { return locale; }
-	virtual void setRefSys(const char *name);
-	virtual const char *getRefSys() const { return m_refsys->getName(); }
-
-
-
-	// OPERATORS --------------------------------------------------------------------
-
-
-	SWKEY_OPERATORS
-
-	virtual SWKey & operator = (const VerseKey2 & ikey) { copyFrom(ikey); return *this; }
-	bool operator ==(const VerseKey2 & ikey) { return !_compare(ikey); } \
-};
-
-#ifdef VK2
-typedef VerseKey2 VerseKey;
-typedef sbook2 sbook;
-typedef abbrev2 abbrev;
-#endif
-
-SWORD_NAMESPACE_END
-#endif

Deleted: trunk/include/ztext2.h
===================================================================
--- trunk/include/ztext2.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/ztext2.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,101 +0,0 @@
-/******************************************************************************
- *  ztext.h   - code for class 'zText2'- a module that reads compressed text
- *				files: ot and nt using indexs ??.vss
- *
- * $Id$
- *
- * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#ifndef ZTEXT2_H
-#define ZTEXT2_H
-
-#include <zverse2.h>
-#include <versekey2.h>
-#include <rawstr.h>
-#include <swtext.h>
-//#include <swcomprs.h>
-
-#include <defs.h>
-
-namespace lucene { namespace index {
-class IndexReader;
-}}
-
-namespace lucene { namespace search {
-class IndexSearcher;
-}}
-
-
-SWORD_NAMESPACE_START
-
-/*** SWModule implementation for compressed modules
-* This class handles compressed modules.
-* It should not be used in frontends, unless you are doing very special things.
-*/
-class SWDLLEXPORT zText2:public zVerse2, public SWText {
-
-	VerseKey2 *lastWriteKey;
-	bool sameBlock(VerseKey2 * lastWriteKey, VerseKey2 * key);
-	int blockType;
-	lucene::index::IndexReader *ir;
-	lucene::search::IndexSearcher *is;
-	VerseKey2 &getVerseKey();
-
-
-public:
-    
-	zText2(const char *ipath, const char *iname = 0, const char *idesc = 0,
-			int blockType = CHAPTERBLOCKS, int idxPerBlock = 10,
-			SWCompress * icomp = 0,
-			SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
-			SWTextDirection dir = DIRECTION_LTR,
-			SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
-
-	virtual ~zText2();
-	virtual SWBuf &getRawEntryBuf();
-
-	virtual void increment(int steps = 1);
-	virtual void decrement(int steps = 1) { increment(-steps); }
-
-  // write interface ----------------------------
-	virtual bool isWritable() { return ((idxfp->getFd() > 0) && ((idxfp->mode & O_RDWR) == O_RDWR)); }
-	static char createModule(const char *path, int blockBound, int indxPerBlock = 10) {
-		return zVerse2::createModule(path, blockBound, indxPerBlock);
-	}
-
-     virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry
-     virtual void linkEntry(const SWKey *linkKey);	// Link current module entry to other module entry
-     virtual void deleteEntry();	// Delete current module entry
-  // end write interface ------------------------
-  
-	virtual void rawZFilter(SWBuf &buf, char direction = 0) { rawFilter(buf, (SWKey *)(long)direction); }// hack, use key as direction for enciphering
-
-	// swcacher interface ----------------------
-	virtual void flush() { flushCache(); }
-	// end swcacher interface ----------------------
-
-	virtual signed char createSearchFramework();
-	virtual bool hasSearchFramework() { return true; }
-	virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent)(char, void *) = &SWModule::nullPercent, void *percentUserData = 0);
-
-
-	SWMODULE_OPERATORS
-
-};
-
-SWORD_NAMESPACE_END
-#endif

Deleted: trunk/include/zverse2.h
===================================================================
--- trunk/include/zverse2.h	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/include/zverse2.h	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,67 +0,0 @@
-/******************************************************************************
- *  zverse2.h   - code for class 'zVerse2'- a module that reads raw text
- *			files:  text using indexs ??.bks ??.cps ??.vss
- *			and provides lookup and parsing functions based on
- *			class VerseKey2
- */
-
-#ifndef ZVERSE2_H
-#define ZVERSE2_H
-
-#include <filemgr.h>
-#include <fcntl.h>
-//#include <rawverse.h>
-#include <swcomprs.h>
-
-#include <defs.h>
-
-SWORD_NAMESPACE_START
-
-class SWDLLEXPORT zVerse2 {
-	SWCompress *compressor;
-
-protected:
-	static int instance;		// number of instantiated zVerse2 objects or derivitives
-
-	FileDesc *idxfp;
-	FileDesc *textfp;
-	FileDesc *compfp;
-	FileDesc *markupfp;
-	FileDesc *midxfp;
-	char *path;
-	#if 0
-	void prepText(SWBuf &buf);
-	#endif
-	void doSetText(long idxoff, const char *buf, long len = 0);
-	void doLinkEntry(long destidxoff, long srcidxoff);
-	void flushCache();
-	char *cacheBuf;
-	long cacheBufIdx;
-	bool dirtyCache;
-	int m_idxPerBlock;
-
-public:
-
-#define	VERSEBLOCKS 2
-#define	CHAPTERBLOCKS 3
-#define	BOOKBLOCKS 4
-#define	INDEXBLOCKS 5
-
-	static const char uniqueIndexID[];
-	char nl;
-
-
-	zVerse2(const char *ipath, int fileMode = O_RDONLY, int blockType = CHAPTERBLOCKS, 
-		SWCompress * icomp = 0, int indexesPerBlock = 10);
-	virtual ~zVerse2();
-	void findOffsetText(long idxoff, long *start, unsigned short *end);
-	void findOffsetMarkup(long idxoff, long *start, unsigned short *end);
-	void zReadText(long start, unsigned short size, SWBuf &buf);
-	#if 0
-	virtual void rawZFilter(SWBuf &buf, char direction = 0) {}
-	#endif
-	static char createModule(const char *path, int blockBound, int indxPerBlock);
-};
-
-SWORD_NAMESPACE_END
-#endif

Modified: trunk/src/keys/Makefile.am
===================================================================
--- trunk/src/keys/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/keys/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -5,14 +5,5 @@
 libsword_la_SOURCES += $(keysdir)/strkey.cpp
 libsword_la_SOURCES += $(keysdir)/treekey.cpp
 libsword_la_SOURCES += $(keysdir)/treekeyidx.cpp
+libsword_la_SOURCES += $(keysdir)/versekey.cpp
 
-
-if BUILDNEWVKEY
-versekey = $(keysdir)/versekey2.cpp $(keysdir)/versekey.cpp \
-	$(keysdir)/refsys.cpp
-else
-versekey = $(keysdir)/versekey.cpp
-endif
-
-libsword_la_SOURCES += $(versekey)
-

Deleted: trunk/src/keys/versekey2.cpp
===================================================================
--- trunk/src/keys/versekey2.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/keys/versekey2.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,1613 +0,0 @@
-/******************************************************************************
- *  VerseKey2.cpp - code for class 'VerseKey2'- the new version of a standard Biblical verse key
- */
-
-#include <swmacs.h>
-#include <utilfuns.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-
-#ifndef __GNUC__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-
-#include <utilstr.h>
-#include <swkey.h>
-#include <swlog.h>
-#include <versekey2.h>
-#include <localemgr.h>
-#include <refsys.h>
-#include <refsysmgr.h>
-#include <roman.h>
-
-SWORD_NAMESPACE_START
-
-static const char *classes[] = {"VerseKey2", "SWKey", "SWObject", 0};
-SWClass VerseKey2::classdef(classes);
-
-/******************************************************************************
- *  Initialize static members of VerseKey2
- */
-
-#include <osisbook.h>	// Initialize static members of canonical books structure
-
-//struct sbook *VerseKey2::builtin_books[2]       = {0,0};
-struct sbook2 *VerseKey2::builtin_books       = {0};
-//const char    VerseKey2::builtin_BMAX[2]        = {39, 27};
-#if 0
-const char    VerseKey2::builtin_BMAX        = OSISBMAX;
-#endif
-//long         *VerseKey2::offsets[2][2]  = {{VerseKey2::otbks, VerseKey2::otcps}, {VerseKey2::ntbks, VerseKey2::ntcps}};
-int           VerseKey2::instance       = 0;
-//VerseKey2::LocaleCache   VerseKey2::localeCache;
-VerseKey2::LocaleCache   *VerseKey2::localeCache = 0;
-
-
-/******************************************************************************
- * VerseKey2::init - initializes instance of VerseKey2
- */
-
-void VerseKey2::init() {
-	myclass = &classdef;
-	if (!instance)
-		initstatics();
-
-	instance++;
-	autonorm = 1;		// default auto normalization to true
-	headings = 0;		// default display headings option is false
-	upperBound = 0;
-	lowerBound = 0;
-	boundSet = false;
-	//testament = 0;
-	book = 0;
-	chapter = 0;
-	verse = 0;
-	locale = 0;
-	abbrevs = 0;
-	//abbrevsCnt = BUILTINABBREVCNT;
-	abbrevsCnt = 0;
-	//oldindexhack = false;
-	if (!m_refsys)
-		m_refsys = new RefSys("KJV");
-
-	setLocale(LocaleMgr::getSystemLocaleMgr()->getDefaultLocaleName());
-}
-
-/******************************************************************************
- * VerseKey2 Constructor - initializes instance of VerseKey2
- *
- * ENT:	ikey - base key (will take various forms of 'BOOK CH:VS'.  See
- *		VerseKey2::parse for more detailed information)
- */
-
-VerseKey2::VerseKey2(const SWKey *ikey) : SWKey(*ikey), m_refsys(0)
-{
-	init();
-	if (ikey)
-		parse();
-}
-
-/******************************************************************************
- * VerseKey2 Constructor - initializes instance of VerseKey2
- *
- * ENT:	ikey - base key (will take various forms of 'BOOK CH:VS'.  See
- *		VerseKey2::parse for more detailed information)
- */
-VerseKey2::VerseKey2(const char *ikey, const RefSys *ref) : SWKey(ikey)
-{
-	if (ref)
-		m_refsys = ref;
-	else
-		m_refsys = 0;
-	init();
-	if (ikey)
-		parse();
-}
-
-#if 0
-/******************************************************************************
- * VerseKey2 Constructor - initializes instance of VerseKey2
- *
- * ENT:	ikey - text key (will take various forms of 'BOOK CH:VS'.  See
- *		VerseKey2::parse for more detailed information)
- */
-
-VerseKey2::VerseKey2(const char *ikey) : SWKey(ikey), m_refsys(0)
-{
-	init();
-	if (ikey)
-		parse();
-}
-#endif
-
-VerseKey2::VerseKey2(VerseKey2 const &k) : SWKey(k)
-{
-	m_refsys = RefSysMgr::getSystemRefSysMgr()->getRefSys(k.getRefSys());
-	init();
-	autonorm = k.autonorm;
-	headings = k.headings;
-	//testament = k.Testament();
-	book = k.Book();
-	chapter = k.Chapter();
-	verse = k.Verse();
-	if (k.isBoundSet()) {
-		LowerBound(k.LowerBound());
-		UpperBound(k.UpperBound());
-	}
-}
-
-
-VerseKey2::VerseKey2(const char *min, const char *max) : SWKey(), m_refsys(0)
-{
-	init();
-	LowerBound(min);
-	UpperBound(max);
-	setPosition(TOP);
-}
-
-
-SWKey *VerseKey2::clone() const
-{
-	return new VerseKey2(*this);
-}
-
-
-/******************************************************************************
- * VerseKey2 Destructor - cleans up instance of VerseKey2
- *
- * ENT:	ikey - text key
- */
-
-VerseKey2::~VerseKey2() {
-	if (upperBound)
-		delete upperBound;
-	if (lowerBound)
-		delete lowerBound;
-	if (locale)
-		delete [] locale;
-	//if (m_refsys)
-	//	delete m_refsys;
-	//if (abbrevs)
-	//	delete [] abbrevs;
-
-	--instance;
-	if (!instance) delete localeCache;
-}
-
-void VerseKey2::setRefSys(const char *name) {
-	if (strcmp(name, m_refsys->getName()) !=0) {
-		RefSys *ref = RefSysMgr::getSystemRefSysMgr()->getRefSys(name);
-		if (ref)
-			m_refsys = ref;
-		setLocale(getLocale());
-	}
-}
-
-void VerseKey2::setLocale(const char *name) {
-	struct sbook2 **lbooks;
-	bool useCache = false;
-	bool newAbbrevs = false;
-	
-	printf("setLocale %s\n", name);
-	printf("setLocale cache is %s:%s\n",localeCache->name, localeCache->refsys); 
-
-	if (localeCache->name)
-		useCache = (!strcmp(localeCache->name, name));
-	if (localeCache->refsys)
-		newAbbrevs = (strcmp(localeCache->refsys, m_refsys->getName())!=0);
-
-	if (!useCache)	{	// if we're setting params for a new locale
-		printf("setLocale: not using cache for %s\n", name);
-		stdstr(&(localeCache->name), name);
-		stdstr(&(localeCache->refsys), m_refsys->getName());
-		//localeCache->abbrevsCnt = 0;
-		newAbbrevs = true;
-	}
-	else printf("setLocale: using cache for %s\n", name);
-	
-	if (newAbbrevs)
-		printf("setLocale: new abbrevs for %s:%s\n", name,m_refsys->getName()); 
-
-	SWLocale *locale = (useCache) ? localeCache->locale : LocaleMgr::getSystemLocaleMgr()->getLocale(name);
-	localeCache->locale = locale;
-
-	if (!locale) {
-		locale = LocaleMgr::getSystemLocaleMgr()->getLocale(LocaleMgr::getSystemLocaleMgr()->getDefaultLocaleName());
-	}
-	if (locale) {
-		locale->getBooks2(&lbooks, this);
-		setBooks(lbooks);
-		if (newAbbrevs) {
-			stdstr(&(localeCache->refsys), m_refsys->getName());
-			setBookAbbrevs(locale->getBookAbbrevs2());
-		}
-		else {
-			abbrevsCnt = localeCache->abbrevsCnt;
-			abbrevs = localeCache->abbrevs;
-		}
-	}
-	else
-	{
-		throw "ERROR: NO DEFAULT LOCALE";
-	}
-	stdstr(&(this->locale), localeCache->name);
-
-	if (lowerBound)
-		LowerBound().setLocale(name);
-	if (upperBound) 
-		UpperBound().setLocale(name);
-}
-
-void VerseKey2::setBooks(struct sbook2 **ibooks) {
-	books = ibooks;
-}
-
-
-void VerseKey2::setBookAbbrevs(const struct abbrev2 *bookAbbrevs) {
-	if (localeCache->abbrevs)
-		delete[] localeCache->abbrevs;
-	int size;
-	for (size=0; bookAbbrevs[size].book!=ENDOFABBREVS; size++) {/*printf("getsize %d:%s\n", size, bookAbbrevs[size].ab);fflush(NULL);*/}
-	printf("bookAbbrevs size %d\n", size+1);
-	localeCache->abbrevs = new abbrev2[size+1];
-	abbrevsCnt = 0;
-	for (int i=0; bookAbbrevs[i].book!=ENDOFABBREVS; i++) {
-		//printf("%d\n", i);
-		if (m_refsys->isBookInRefSys(bookAbbrevs[i].book)) {
-			localeCache->abbrevs[abbrevsCnt].ab = bookAbbrevs[i].ab;
-			localeCache->abbrevs[abbrevsCnt].book = bookAbbrevs[i].book;
-			//printf("setBookAbbrevs %d:%s:%d\n", abbrevsCnt, abbrevs[abbrevsCnt].ab, abbrevs[abbrevsCnt].book);fflush(NULL);
-			abbrevsCnt++;
-		}
-	}
-	localeCache->abbrevs[abbrevsCnt].ab = 0;
-	localeCache->abbrevs[abbrevsCnt].book = ENDOFABBREVS;
-	printf("abbrevs count %d\n", abbrevsCnt);
-	abbrevs = localeCache->abbrevs;
-		/*
-	for (abbrevsCnt = 0; *abbrevs[abbrevsCnt].ab; abbrevsCnt++) {
-		if (strcmp(abbrevs[abbrevsCnt-1].ab, abbrevs[abbrevsCnt].ab) > 0) {
-			fprintf(stderr, "ERROR: book abbreviation (canon.h or locale) misordered at entry: %s\n", abbrevs[abbrevsCnt].ab);
-			exit(-1);
-		}
-	}
-		*/
-	//for (abbrevsCnt = 0; *abbrevs[abbrevsCnt].ab; abbrevsCnt++) {
-	//}
-	for (int i = 0; i <= MAXOSISBOOKS; i++) {
-		if (m_refsys->isBookInRefSys(i))
-		{
-			int bn = getBookAbbrev((*books)[i].name);
-			if (bn != i) {
-				SWLog::getSystemLog()->logError("VerseKey2::Book: %s(%d) does not have a matching toupper abbrevs entry! book number returned was: %d", 
-					(*books)[i].name, i, bn);
-			}
-		}
-	}
-	localeCache->abbrevsCnt = abbrevsCnt;
-}
-
-
-/******************************************************************************
- * VerseKey2::initstatics - initializes statics.  Performed only when first
- *						instance on VerseKey2 (or descendent) is created.
- */
-
-void VerseKey2::initstatics() {
-	int l1, l2, chaptmp = 0;
-
-	//builtin_books[0] = otbooks;
-	//builtin_books[1] = ntbooks;
-	builtin_books = osisbooks;
-	
-	localeCache = new LocaleCache();
-/*
-	for (l2 = 0; l2 <= builtin_BMAX; l2++) {
-			builtin_books[l2].versemax = &(offsets[1][chaptmp]);
-			chaptmp += getMaxChaptersInBook(l2);
-		}
-*/
-	/*
-	for (l1 = 0; l1 < 2; l1++) {
-		for (l2 = 0; l2 < builtin_BMAX[l1]; l2++) {
-			builtin_books[l1][l2].versemax = &vm[chaptmp];
-			chaptmp += builtin_books[l1][l2].chapmax;
-		}
-	}
-	*/
-}
-
-
-/******************************************************************************
- * VerseKey2::parse - parses keytext into testament|book|chapter|verse
- *
- * RET:	error status
- */
-
-char VerseKey2::parse()
-{
-	book      = REVELATION;
-	chapter   = 1;
-	verse     = 1;
-	int booklen   = 0;
-
-	int error = 0;
-
-	printf("VerseKey2::parse keytext %s\n", keytext);
-	if (keytext) {
-		ListKey tmpListKey = VerseKey2::ParseVerseList(keytext);
-		if (tmpListKey.Count()) {
-			SWKey::setText((const char *)tmpListKey);
-			for (int j = 0; j <= MAXOSISBOOKS; j++) {
-				int matchlen = strlen((*books)[j].name);
-				if (!strncmp(keytext, (*books)[j].name, matchlen)) {
-					if (matchlen > booklen) {
-						booklen = matchlen;
-						book = j;
-					}
-				}
-			}
-			//}
-
-			if (booklen) {
-				sscanf(&keytext[booklen], "%d:%d", &chapter, &verse);
-			}
-			else	error = KEYERR_FAILEDPARSE;
-		} else error = KEYERR_FAILEDPARSE;
-	}
-	Normalize(1);
-	freshtext();
-
-	return (this->error) ? this->error : (this->error = error);
-}
-
-
-/******************************************************************************
- * VerseKey2::freshtext - refreshes keytext based on
- *				testament|book|chapter|verse
- */
-
-void VerseKey2::freshtext() const
-{
-	SWBuf buf = "";
-	int realbook = book;
-#if 0
-	if (book < 1) {
-		if (testament < 1)
-			buf = "[ Module Heading ]";
-		else buf.appendFormatted("[ Testament %d Heading ]", (int)testament);
-	}
-	else {
-#endif
-		if (realbook > MAXOSISBOOKS) {
-				realbook = REVELATION;
-		}
-		buf.appendFormatted("%s %d:%d", (*books)[realbook].name, chapter, verse);
-#if 0
-	}
-#endif
-	stdstr((char **)&keytext, buf.c_str());
-}
-
-
-
-/******************************************************************************
- * VerseKey2::getBookAbbrev - Attempts to find a book from an abbreviation for a buffer
- *
- * ENT:	abbr - key for which to search;
- * RET:	book number or < 0 = not valid
- */
-
-int VerseKey2::getBookAbbrev(const char *iabbr)
-{
-	int loop, diff, abLen, min, max, target, retVal = -1;
-
-	char *abbr = 0;
-
-	//for (int i = 0; i < 2; i++) {
-		stdstr(&abbr, iabbr);
-		strstrip(abbr);
-		//if (!i)
-			toupperstr(abbr);
-		abLen = strlen(abbr);
-
-		if (abLen) {
-			min = 0;
-//			max = abbrevsCnt - 1;
-			max 	= abbrevsCnt;
-			while(1) {
-				target = min + ((max - min) / 2);
-				diff = strncmp(abbr, abbrevs[target].ab, abLen);
-				if ((!diff)||(target >= max)||(target <= min))
-					break;
-				if (diff > 0)
-					min = target;
-				else	max = target;
-			}
-			for (; target > 0; target--) {
-				if (strncmp(abbr, abbrevs[target-1].ab, abLen))
-					break;
-			}
-				
-			retVal = (!diff) ? abbrevs[target].book : -1;
-		}
-		//if (retVal > 0)
-			//break;
-	//}
-	delete [] abbr;
-	return retVal;
-}
-
-/******************************************************************************
- * VerseKey2::ParseVerseList - Attempts to parse a buffer into separate
- *				verse entries returned in a ListKey
- *
- * ENT:	buf		- buffer to parse;
- *	defaultKey	- if verse, chap, book, or testament is left off,
- *				pull info from this key (ie. Gen 2:3; 4:5;
- *				Gen would be used when parsing the 4:5 section)
- *	expandRange	- whether or not to expand eg. John 1:10-12 or just
- *				save John 1:10
- *
- * RET:	ListKey reference filled with verse entries contained in buf
- *
- * COMMENT: This code works but wreaks.  Rewrite to make more maintainable.
- */
-
-ListKey VerseKey2::ParseVerseList(const char *buf, const char *defaultKey, bool expandRange) {
-	SWKey textkey;
-
-	char book[2048];
-	char number[2048];
-	int tobook = 0;
-	int tonumber = 0;
-	int chap = -1, verse = -1;
-	int bookno = 0;
-	VerseKey2 curkey, lBound;
-	curkey.setLocale(getLocale());
-	lBound.setLocale(getLocale());
-	int loop;
-	char comma = 0;
-	char dash = 0;
-	const char *orig = buf;
-	int q;
-	ListKey tmpListKey;
-	ListKey internalListKey;
-	SWKey tmpDefaultKey = defaultKey;
-	char lastPartial = 0;
-	bool inTerm = true;
-	int notAllDigits;
-
-	curkey.AutoNormalize(0);
-	tmpListKey << tmpDefaultKey;
-	tmpListKey.GetElement()->userData = (void *)buf;
-	
-	while (*buf) {
-		switch (*buf) {
-		case ' ':
-			inTerm = true;
-			while (true) {
-				if ((!*number) || (chap < 0))
-					break;
-				for (q = 1; ((buf[q]) && (buf[q] != ' ')); q++);
-				if (buf[q] == ':')
-					break;
-				inTerm = false;
-				break;
-			}
-			if (inTerm) {
-				book[tobook++] = ' ';
-				break;
-			}
-		case ':':
-			if (buf[1] != ' ') {		// for silly Mat 1:1: this verse....
-				number[tonumber] = 0;
-				tonumber = 0;
-				if (*number)
-					chap = atoi(number);
-				*number = 0;
-				break;
-			}
-			// otherwise drop down to next case
-
-		case '-': 
-		case ',': // on number new verse
-		case ';': // on number new chapter
-			number[tonumber] = 0;
-			tonumber = 0;
-			if (*number) {
-				if (chap >= 0)
-					verse = atoi(number);
-				else	chap = atoi(number);
-			}
-			*number = 0;
-			book[tobook] = 0;
-			tobook = 0;
-			bookno = -1;
-			if (*book) {
-				for (loop = strlen(book) - 1; loop+1; loop--) {
-					if ((isdigit(book[loop])) || (book[loop] == ' ')) {
-						book[loop] = 0;
-						continue;
-					}
-					else {
-						if ((SW_toupper(book[loop])=='F')&&(loop)) {
-							if ((isdigit(book[loop-1])) || (book[loop-1] == ' ') || (SW_toupper(book[loop-1]) == 'F')) {
-								book[loop] = 0;
-								continue;
-							}
-						}
-					}
-					break;
-				}
-
-				for (loop = strlen(book) - 1; loop+1; loop--) {
-					if (book[loop] == ' ') {
-						if (isroman(&book[loop+1])) {
-							if (verse == -1) {
-								verse = chap;
-								chap = from_rom(&book[loop+1]);
-								book[loop] = 0;
-							}
-						}
-	        				break;
-					}
-				}
-
-				if ((!stricmp(book, "V")) || (!stricmp(book, "VER"))) {	// Verse abbrev
-					if (verse == -1) {
-						verse = chap;
-						chap = VerseKey2(tmpListKey).Chapter();
-						*book = 0;
-					}
-				}
-				if ((!stricmp(book, "ch")) || (!stricmp(book, "chap"))) {	// Verse abbrev
-					strcpy(book, VerseKey2(tmpListKey).getBookName());
-				}
-				bookno = getBookAbbrev(book);
-			}
-			if (((bookno > -1) || (!*book)) && ((*book) || (chap >= 0) || (verse >= 0))) {
-				char partial = 0;
-				curkey.Verse(1);
-				curkey.Chapter(1);
-				curkey.Book(1);
-
-				if (bookno < 0) {
-					//curkey.Testament(VerseKey2(tmpListKey).Testament());
-					curkey.Book(VerseKey2(tmpListKey).Book());
-				}
-				else {
-					//curkey.Testament(1);
-					curkey.Book(bookno);
-				}
-
-				if (((comma)||((verse < 0)&&(bookno < 0)))&&(!lastPartial)) {
-//				if (comma) {
-					curkey.Chapter(VerseKey2(tmpListKey).Chapter());
-					curkey.Verse(chap);  // chap because this is the first number captured
-				}
-				else {
-					if (chap >= 0) {
-						curkey.Chapter(chap);
-					}
-					else {
-						partial++;
-						curkey.Chapter(1);
-					}
-					if (verse >= 0) {
-						curkey.Verse(verse);
-					}
-					else {
-						partial++;
-						curkey.Verse(1);
-					}
-				}
-
-				if ((*buf == '-') && (expandRange)) {	// if this is a dash save lowerBound and wait for upper
-					VerseKey2 newElement;
-					newElement.LowerBound(curkey);
-					newElement.setPosition(TOP);
-					tmpListKey << newElement;
-					tmpListKey.GetElement()->userData = (void *)buf;
-				}
-				else {
-					if (!dash) { 	// if last separator was not a dash just add
-						if (expandRange && partial) {
-							VerseKey2 newElement;
-							newElement.LowerBound(curkey);
-							if (partial > 1)
-								curkey.setPosition(MAXCHAPTER);
-							if (partial > 0)
-								curkey = MAXVERSE;
-							newElement.UpperBound(curkey);
-							newElement = TOP;
-							tmpListKey << newElement;
-							tmpListKey.GetElement()->userData = (void *)buf;
-						}
-						else {
-							tmpListKey << (const SWKey &)(const SWKey)(const char *)curkey;
-							tmpListKey.GetElement()->userData = (void *)buf;
-						}
-					}
-					else	if (expandRange) {
-						VerseKey2 *newElement = SWDYNAMIC_CAST(VerseKey2, tmpListKey.GetElement());
-						if (newElement) {
-							if (partial > 1)
-								curkey = MAXCHAPTER;
-							if (partial > 0)
-								curkey = MAXVERSE;
-							newElement->UpperBound(curkey);
-							*newElement = TOP;
-							tmpListKey.GetElement()->userData = (void *)buf;
-						}
-					}
-				}
-				lastPartial = partial;
-			}
-			*book = 0;
-			chap = -1;
-			verse = -1;
-			if (*buf == ',')
-				comma = 1;
-			else	comma = 0;
-			if (*buf == '-')
-				dash = 1;
-			else	dash = 0;
-			break;
-		case 10:	// ignore these
-		case 13: 
-		case '[': 
-		case ']': 
-		case '(': 
-		case ')': 
-		case '{': 
-		case '}': 
-			break;
-		case '.':
-			if (buf > orig)			// ignore (break) if preceeding char is not a digit
-				for (notAllDigits = tobook; notAllDigits; notAllDigits--) {
-					if ((!isdigit(book[notAllDigits-1])) && (!strchr(" .", book[notAllDigits-1])))
-						break;
-				}
-				if (!notAllDigits)
-					break;
-
-			number[tonumber] = 0;
-			tonumber = 0;
-			if (*number)
-				chap = atoi(number);
-			*number = 0;
-			break;
-			
-		default:
-			if (isdigit(*buf)) {
-				number[tonumber++] = *buf;
-			}
-			else {
-				switch (*buf) {
-				case ' ':    // ignore these and don't reset number
-				case 'f':
-				case 'F':
-					break;
-				default:
-					number[tonumber] = 0;
-					tonumber = 0;
-					break;
-				}
-			}
-			if (chap == -1)
-				book[tobook++] = *buf;
-		}
-		buf++;
-	}
-	number[tonumber] = 0;
-	tonumber = 0;
-	if (*number) {
-		if (chap >= 0)
-			verse = atoi(number);
-		else	chap = atoi(number);
-	}
-	*number = 0;
-	book[tobook] = 0;
-	tobook = 0;
-	if (*book) {
-		for (loop = strlen(book) - 1; loop+1; loop--) {
-			if ((isdigit(book[loop])) || (book[loop] == ' ')) {
-				book[loop] = 0;
-				continue;
-			}
-			else {
-				if ((SW_toupper(book[loop])=='F')&&(loop)) {
-					if ((isdigit(book[loop-1])) || (book[loop-1] == ' ') || (SW_toupper(book[loop-1]) == 'F')) {
-						book[loop] = 0;
-						continue;
-					}
-				}
-			}
-			break;
-		}
-
-		for (loop = strlen(book) - 1; loop+1; loop--) {
-			if (book[loop] == ' ') {
-				if (isroman(&book[loop+1])) {
-					if (verse == -1) {
-						verse = chap;
-						chap = from_rom(&book[loop+1]);
-						book[loop] = 0;
-					}
-				}
-				break;
-			}
-          }
-               
-		if ((!stricmp(book, "V")) || (!stricmp(book, "VER"))) {	// Verse abbrev.
-			if (verse == -1) {
-				verse = chap;
-				chap = VerseKey2(tmpListKey).Chapter();
-				*book = 0;
-			}
-		}
-			
-		if ((!stricmp(book, "ch")) || (!stricmp(book, "chap"))) {	// Verse abbrev
-			strcpy(book, VerseKey2(tmpListKey).getBookName());
-		}
-		bookno = getBookAbbrev(book);
-	}
-	if (((bookno > -1) || (!*book)) && ((*book) || (chap >= 0) || (verse >= 0))) {
-		char partial = 0;
-		curkey.Verse(1);
-		curkey.Chapter(1);
-		curkey.Book(1);
-
-		if (bookno < 0) {
-			//curkey.Testament(VerseKey2(tmpListKey).Testament());
-			curkey.Book(VerseKey2(tmpListKey).Book());
-		}
-		else {
-			//curkey.Testament(1);
-			curkey.Book(bookno);
-		}
-
-		if (((comma)||((verse < 0)&&(bookno < 0)))&&(!lastPartial)) {
-//		if (comma) {
-			curkey.Chapter(VerseKey2(tmpListKey).Chapter());
-			curkey.Verse(chap);  // chap because this is the first number captured
-		}
-		else {
-			if (chap >= 0) {
-				curkey.Chapter(chap);
-			}
-			else {
-				partial++;
-				curkey.Chapter(1);
-			}
-			if (verse >= 0) {
-				curkey.Verse(verse);
-			}
-			else {
-				partial++;
-				curkey.Verse(1);
-			}
-		}
-
-		if ((*buf == '-') && (expandRange)) {	// if this is a dash save lowerBound and wait for upper
-			VerseKey2 newElement;
-			newElement.LowerBound(curkey);
-			newElement = TOP;
-			tmpListKey << newElement;
-			tmpListKey.GetElement()->userData = (void *)buf;
-		}
-		else {
-			if (!dash) { 	// if last separator was not a dash just add
-				if (expandRange && partial) {
-					VerseKey2 newElement;
-					newElement.LowerBound(curkey);
-					if (partial > 1)
-						curkey = MAXCHAPTER;
-					if (partial > 0)
-						curkey = MAXVERSE;
-					newElement.UpperBound(curkey);
-					newElement = TOP;
-					tmpListKey << newElement;
-					tmpListKey.GetElement()->userData = (void *)buf;
-				}
-				else {
-					tmpListKey << (const SWKey &)(const SWKey)(const char *)curkey;
-					tmpListKey.GetElement()->userData = (void *)buf;
-				}
-			}
-			else if (expandRange) {
-				VerseKey2 *newElement = SWDYNAMIC_CAST(VerseKey2, tmpListKey.GetElement());
-				if (newElement) {
-					if (partial > 1)
-						curkey = MAXCHAPTER;
-					if (partial > 0)
-						curkey = MAXVERSE;
-					newElement->UpperBound(curkey);
-					*newElement = TOP;
-					tmpListKey.GetElement()->userData = (void *)buf;
-				}
-			}
-		}
-	}
-	*book = 0;
-	tmpListKey = TOP;
-	tmpListKey.Remove();	// remove defaultKey
-	internalListKey = tmpListKey;
-	internalListKey = TOP;	// Align internalListKey to first element before passing back;
-
-	return internalListKey;
-}
-
-
-/******************************************************************************
- * VerseKey2::LowerBound	- sets / gets the lower boundary for this key
- */
-/*
-VerseKey2 &VerseKey2::LowerBound(const char *lb)
-{
-	if (!lowerBound) 
-		initBounds();
-
-	(*lowerBound) = lb;
-	lowerBound->Normalize();
-	lowerBound->setLocale( this->getLocale() );
-	boundSet = true;
-	return (*lowerBound);
-}
-*/
-VerseKey2 &VerseKey2::LowerBound(const VerseKey2 & ikey)
-{
-	if (!lowerBound) 
-		initBounds();
-
-	//lowerBound->Testament(ikey.Testament());
-	lowerBound->Book(ikey.Book());
-	lowerBound->Chapter(ikey.Chapter());
-	lowerBound->Verse(ikey.Verse());
-	#ifdef WDGDEBUG
-	printf("setting lower bound to %d:%d:%d\n",lowerBound->Book(), lowerBound->Chapter(), 
-		lowerBound->Verse());fflush(NULL);
-	#endif
-	//lowerBound->Normalize();
-	lowerBound->setLocale( this->getLocale() );
-	boundSet = true;
-	return (*lowerBound);
-}
-
-
-/******************************************************************************
- * VerseKey2::UpperBound	- sets / gets the upper boundary for this key
- */
-/*
-VerseKey2 &VerseKey2::UpperBound(const char *ub)
-{
-	if (!upperBound) 
-		initBounds();
-
-// need to set upperbound parsing to resolve to max verse/chap if not specified
-	   (*upperBound) = ub;
-	if (*upperBound < *lowerBound)
-		*upperBound = *lowerBound;
-	upperBound->Normalize();
-	upperBound->setLocale( this->getLocale() );
-
-// until we have a proper method to resolve max verse/chap use this kludge
-	int len = strlen(ub);
-	bool alpha = false;
-	bool versespec = false;
-	bool chapspec = false;
-	for (int i = 0; i < len; i++) {
-		if (isalpha(ub[i]))
-			alpha = true;
-		if (ub[i] == ':')	// if we have a : we assume verse spec
-			versespec = true;
-		if ((isdigit(ub[i])) && (alpha))	// if digit after alpha assume chap spec
-			chapspec = true;
-	}
-	if (!chapspec)
-		*upperBound = MAXCHAPTER;
-	if (!versespec)
-		*upperBound = MAXVERSE;
-	
-
-// -- end kludge
-	boundSet = true;
-	return (*upperBound);
-}
-*/
-VerseKey2 &VerseKey2::UpperBound(const VerseKey2 & ikey)
-{
-	if (!upperBound) 
-		initBounds();
-
-	//upperBound->Testament(ikey.Testament());
-	upperBound->Book(ikey.Book());
-	upperBound->Chapter(ikey.Chapter());
-	upperBound->Verse(ikey.Verse());
-	//upperBound->Normalize();
-	upperBound->setLocale( this->getLocale() );
-	boundSet = true;
-	return (*upperBound);
-}
-
-
-/******************************************************************************
- * VerseKey2::LowerBound	- sets / gets the lower boundary for this key
- */
-
-VerseKey2 &VerseKey2::LowerBound() const
-{
-	if (!lowerBound) 
-		initBounds();
-
-	return (*lowerBound);
-}
-
-
-/******************************************************************************
- * VerseKey2::UpperBound	- sets / gets the upper boundary for this key
- */
-
-VerseKey2 &VerseKey2::UpperBound() const
-{
-	if (!upperBound) 
-		initBounds();
-
-	return (*upperBound);
-}
-
-
-/******************************************************************************
- * VerseKey2::ClearBounds	- clears bounds for this VerseKey2
- */
-
-void VerseKey2::ClearBounds()
-{
-	initBounds();
-}
-
-
-void VerseKey2::initBounds() const
-{
-	if (!upperBound) {
-		upperBound = new VerseKey2(0, m_refsys);
-		upperBound->AutoNormalize(0);
-		upperBound->Headings(1);
-	}
-	if (!lowerBound) {
-		lowerBound = new VerseKey2(0, m_refsys);
-		lowerBound->AutoNormalize(0);
-		lowerBound->Headings(1);
-	}
-
-	//lowerBound->Testament(0);
-	lowerBound->Book(0);
-	lowerBound->Chapter(0);
-	lowerBound->Verse(0);
-
-	//upperBound->Testament(2);
-	upperBound->Book(REVELATION);
-	upperBound->Chapter(getMaxChaptersInBook(upperBound->Book()));
-	upperBound->Verse(getMaxVerseInChapter(upperBound->Book(), upperBound->Chapter()));
-	boundSet = false;
-}
-
-
-/******************************************************************************
- * VerseKey2::copyFrom - Equates this VerseKey2 to another VerseKey2
- */
-
-void VerseKey2::copyFrom(const VerseKey2 &ikey) {
-	//SWKey::copyFrom(ikey);
-
-	//parse();
-	//testament = ikey.Testament();
-	book = ikey.Book();
-	chapter = ikey.Chapter();
-	verse = ikey.Verse();
-	LowerBound(ikey.LowerBound());
-	UpperBound(ikey.UpperBound());
-	//Normalize();
-}
-
-
-/******************************************************************************
- * VerseKey2::copyFrom - Equates this VerseKey2 to another SWKey
- */
-
-void VerseKey2::copyFrom(const SWKey &ikey) {
-	SWKey::copyFrom(ikey);
-
-	parse();
-}
-
-
-/******************************************************************************
- * VerseKey2::getText - refreshes keytext before returning if cast to
- *				a (char *) is requested
- */
-
-const char *VerseKey2::getText() const {
-	freshtext();
-	return keytext;
-}
-
-
-const char *VerseKey2::getShortText() const {
-	static SWBuf buf = "";
-	freshtext();
-	/*
-	if (book < 1) {
-		if (testament < 1)
-			sprintf(buf, "[ Module Heading ]");
-		else sprintf(buf, "[ Testament %d Heading ]", (int)testament);
-	}
-	else {
-		*/
-	if (book == 0)
-		buf = "[ Module Heading ]";
-	else if (getMaxChaptersInBook(book) == TESTAMENT_HEADING) // !!!WDG needs testament support
-		buf.appendFormatted("[ %s Heading ]", (*books)[book].name);
-	else
-		buf.appendFormatted("%s %d:%d", (*books)[book].prefAbbrev, chapter, verse);
-	return buf.c_str();
-}
-
-
-const char *VerseKey2::getBookName() const {
-	return (*books)[book].name;
-}
-
-
-const char *VerseKey2::getBookAbbrev() const {
-	return (*books)[book].prefAbbrev;
-}
-/******************************************************************************
- * VerseKey2::setPosition(SW_POSITION)	- Positions this key
- *
- * ENT:	p	- position
- *
- * RET:	*this
- */
-
-void VerseKey2::setPosition(SW_POSITION p) {
-	switch (p) {
-	case POS_TOP:
-		//testament = LowerBound().Testament();
-		book      = LowerBound().Book();
-		chapter   = LowerBound().Chapter();
-		verse     = LowerBound().Verse();
-		break;
-	case POS_BOTTOM:
-		//testament = UpperBound().Testament();
-		book      = UpperBound().Book();
-		chapter   = UpperBound().Chapter();
-		verse     = UpperBound().Verse();
-		break;
-	case POS_MAXVERSE:
-		Normalize();
-		verse     = getMaxVerseInChapter(book, chapter);
-		break;
-	case POS_MAXCHAPTER:
-		verse     = 1;
-		Normalize();
-		chapter   = getMaxChaptersInBook(book);
-		break;
-	} 
-	Normalize(1);
-	Error();	// clear error from normalize
-}
-
-
-/******************************************************************************
- * VerseKey2::increment	- Increments key a number of verses
- *
- * ENT:	step	- Number of verses to jump forward
- *
- * RET: *this
- */
-
-void VerseKey2::increment(int step) {
-	char ierror = 0;
-	//printf("incrementing by %d\n", step);
-	Index(Index() + step);
-	while ((!verse) && (!headings) && (!ierror)) {
-		Index(Index() + 1);
-		ierror = Error();
-	}
-
-	error = (ierror) ? ierror : error;
-}
-
-
-/******************************************************************************
- * VerseKey2::decrement	- Decrements key a number of verses
- *
- * ENT:	step	- Number of verses to jump backward
- *
- * RET: *this
- */
-
-void VerseKey2::decrement(int step) {
-	char ierror = 0;
-
-	//printf("decrementing by %d\n", step);
-	Index(Index() - step);
-	while ((!verse) && (!headings) && (!ierror)) {
-		Index(Index() - 1);
-		ierror = Error();
-	}
-	if ((ierror) && (!headings))
-	{
-		Normalize();
-	}
-
-	error = (ierror) ? ierror : error;
-}
-
-
-/******************************************************************************
- * VerseKey2::Normalize	- checks limits and normalizes if necessary (e.g.
- *				Matthew 29:47 = Mark 2:2).  If last verse is
- *				exceeded, key is set to last Book CH:VS
- * RET: *this
- */
-
-void VerseKey2::Normalize(char autocheck)
-{
-	error = 0;
-	bool valid = false;
-
-	if ((autocheck) && (!autonorm))	// only normalize if we were explicitely called or if autonorm is turned on
-		return;
-
-	if ((headings) && (!verse))		// this is cheeze and temporary until deciding what actions should be taken.
-		return;					// so headings should only be turned on when positioning with Index() or incrementors
-
-	#ifdef WDGDEBUG
-	printf("normalizing %d:%d:%d\n", book, chapter, verse);fflush(NULL);
-	#endif
-	while (!valid) {
-		
-		if (book <= 0 || book > MAXOSISBOOKS) break;
-		
-		while (chapter > getMaxChaptersInBook(book) && book <= MAXOSISBOOKS) {
-			chapter -= getMaxChaptersInBook(book);
-			book++;
-		}
-
-		while (chapter < !headings && (--book > 0)) {
-			chapter += getMaxChaptersInBook(book);
-		}
-
-		while (verse > getMaxVerseInChapter(book, chapter)) {
-			verse -= getMaxVerseInChapter(book, chapter);
-			chapter++;
-		}
-
-		while (verse < !headings && (--chapter > 0)) {
-			verse += getMaxVerseInChapter(book, chapter);
-		}
-		
-		if (book > 0 && book <= MAXOSISBOOKS && 
-			chapter >= !headings && chapter <= getMaxChaptersInBook(book) && 
-			verse >= !headings && verse <= getMaxVerseInChapter(book, chapter))
-				valid = true;
-		
-	}
-	#if 0
-	if (book >= 0 && book <= OTBOOKS)
-		testament = 1;
-	else if (book >= OTBOOKS+1 && book <= *BMAX)
-		testament = 2;
-	#endif
-	if (book > MAXOSISBOOKS) {
-		//testament = 2;
-		book      = REVELATION;
-		chapter   = getMaxChaptersInBook(book);
-		verse     = getMaxVerseInChapter(book, chapter);
-		error     = KEYERR_OUTOFBOUNDS;
-	}
-
-	if (book <= 0) {
-		error     = ((!headings) || (book < 0)) ? KEYERR_OUTOFBOUNDS : 0;
-		//testament = ((headings) ? 0 : 1);
-		book      = ((headings) ? 0 : 2);
-		chapter   = ((headings) ? 0 : 1);
-		verse     = ((headings) ? 0 : 1);
-	}
-	if (_compare(UpperBound()) > 0) {
-		*this = UpperBound();
-		#ifdef WDGDEBUG
-		printf("error beyond upper bound in normalize\n");fflush(NULL);
-		#endif
-		error = KEYERR_OUTOFBOUNDS;
-	}
-	if (_compare(LowerBound()) < 0) {
-		*this = LowerBound();
-		#ifdef WDGDEBUG
-		printf("error beyond lower bound in normalize\n");fflush(NULL);
-		#endif
-		error = KEYERR_OUTOFBOUNDS;
-	}
-	#ifdef WDGDEBUG
-	printf("normalized %d:%d:%d\n", book, chapter, verse);fflush(NULL);
-	#endif
-}
-
-//!!!WDG once it is working and becomes core we need to change these to get/set
-
-/******************************************************************************
- * VerseKey2::Book - Gets book
- *
- * RET:	value of book
- */
-
-char VerseKey2::Book() const
-{
-	return book;
-}
-
-
-/******************************************************************************
- * VerseKey2::Chapter - Gets chapter
- *
- * RET:	value of chapter
- */
-
-int VerseKey2::Chapter() const
-{
-	return chapter;
-}
-
-
-/******************************************************************************
- * VerseKey2::Verse - Gets verse
- *
- * RET:	value of verse
- */
-
-int VerseKey2::Verse() const
-{
-	return verse;
-}
-
-
-
-/******************************************************************************
- * VerseKey2::Book - Sets/gets book
- *
- * ENT:	ibook - value which to set book
- *		[MAXPOS(char)] - only get
- *
- * RET:	if unchanged ->          value of book
- *	if   changed -> previous value of book
- */
-
-char VerseKey2::Book(char ibook)
-{
-	char retval = book;
-
-	Chapter(1);
-	book = ibook;
-	Normalize(1);
-
-	return retval;
-}
-
-
-/******************************************************************************
- * VerseKey2::Chapter - Sets/gets chapter
- *
- * ENT:	ichapter - value which to set chapter
- *		[MAXPOS(int)] - only get
- *
- * RET:	if unchanged ->          value of chapter
- *	if   changed -> previous value of chapter
- */
-
-int VerseKey2::Chapter(int ichapter)
-{
-	int retval = chapter;
-
-	Verse(1);
-	chapter = ichapter;
-	Normalize(1);
-
-	return retval;
-}
-
-
-/******************************************************************************
- * VerseKey2::Verse - Sets/gets verse
- *
- * ENT:	iverse - value which to set verse
- *		[MAXPOS(int)] - only get
- *
- * RET:	if unchanged ->          value of verse
- *	if   changed -> previous value of verse
- */
-
-int VerseKey2::Verse(int iverse)
-{
-	int retval = verse;
-
-	verse = iverse;
-	Normalize(1);
-
-	return retval;
-}
-
-
-/******************************************************************************
- * VerseKey2::AutoNormalize - Sets/gets flag that tells VerseKey2 to auto-
- *				matically normalize itself when modified
- *
- * ENT:	iautonorm - value which to set autonorm
- *		[MAXPOS(char)] - only get
- *
- * RET:	if unchanged ->          value of autonorm
- *		if   changed -> previous value of autonorm
- */
-
-char VerseKey2::AutoNormalize(char iautonorm)
-{
-	char retval = autonorm;
-
-	if (iautonorm != MAXPOS(char)) {
-		autonorm = iautonorm;
-		Normalize(1);
-	}
-	return retval;
-}
-
-
-/******************************************************************************
- * VerseKey2::Headings - Sets/gets flag that tells VerseKey2 to include
- *					chap/book/testmnt/module headings
- *
- * ENT:	iheadings - value which to set headings
- *		[MAXPOS(char)] - only get
- *
- * RET:	if unchanged ->          value of headings
- *		if   changed -> previous value of headings
- */
-
-char VerseKey2::Headings(char iheadings)
-{
-	char retval = headings;
-
-	if (iheadings != MAXPOS(char)) {
-		headings = iheadings;
-		Normalize(1);
-	}
-	return retval;
-}
-
-
-
-
-/******************************************************************************
- * VerseKey2::Index - Gets index based upon current verse
- *
- * RET:	offset
- */
-
-long VerseKey2::Index() const
-{
-	if (!book)
-		chapter = 0;
-	if (!chapter)
-		verse   = 0;
-	return m_refsys->getIndex(book, chapter, verse);
-#if 0
-	long  loffset;
-	loffset = offsets[0][book].offset;
-	loffset = offsets[1][(int)loffset + chapter].offset;
-	if (offsets[0][book].maxnext == TESTAMENT_HEADING) // if we want testament heading
-	{
-		*chapter = 0;
-		*verse = 0;
-	}
-	#ifdef WDGDEBUG
-	printf("returning index %d\n", loffset+verse);fflush(NULL);
-	#endif
-	return (loffset + verse);
-#endif
-}
-
-
-/******************************************************************************
- * VerseKey2::Index - Gets index based upon current verse
- *
- * RET:	offset
- */
-
-long VerseKey2::NewIndex() const
-{
-	//static long otMaxIndex = 32300 - 8245;  // total positions - new testament positions
-//	static long otMaxIndex = offsets[0][1][(int)offsets[0][0][BMAX[0]] + books[0][BMAX[0]].chapmax];
-	//return oldindexhack ? ((testament-1) * NTOFFSET) + Index() : Index();
-	return Index();
-}
-
-
-/******************************************************************************
- * VerseKey2::Index - Sets index based upon current verse
- *
- * ENT:	iindex - value to set index to
- *
- * RET:	offset
- */
-
-long VerseKey2::Index(long iindex)
-{
-	long  offset;
-
-	if (iindex < 0) {
-		error     = KEYERR_OUTOFBOUNDS;
-	}
-	#ifdef WDGDEBUG
-	//printf("setting index %d(%d)\n", iindex, testament);fflush(NULL);
-	printf("setting index %d\n", iindex);fflush(NULL);
-	#endif
-
-	// --------------------------------------------------------------------
-
-	if ((!error) && (iindex>=0)) {
-		m_refsys->getBCV(iindex, &book, &chapter, &verse);
-	}
-	#ifdef WDGDEBUG
-	else
-	{
-		printf("error %d iindex %d\n", error, iindex);fflush(NULL);
-	}
-	#endif
-
-	if (_compare(UpperBound()) > 0) {
-		#ifdef WDGDEBUG
-		printf("beyond upper bound in Index\n");fflush(NULL);
-		#endif
-		*this = UpperBound();
-		error = KEYERR_OUTOFBOUNDS;
-	}
-	if (_compare(LowerBound()) < 0) {
-		#ifdef WDGDEBUG
-		printf("beyond lower bound in Index\n");fflush(NULL);
-		#endif
-		*this = LowerBound();
-		#ifdef WDGDEBUG
-		printf("now set to %d:%d:%d\n", book, chapter, verse);fflush(NULL);
-		#endif
-		error = KEYERR_OUTOFBOUNDS;
-	}
-	return Index();
-}
-
-
-/******************************************************************************
- * VerseKey2::compare	- Compares another SWKey object
- *
- * ENT:	ikey - key to compare with this one
- *
- * RET:	>0 if this VerseKey2 is greater than compare VerseKey2
- *	<0 <
- *	 0 =
- */
-
-int VerseKey2::compare(const SWKey &ikey)
-{
-	#ifdef WDGDEBUG
-	printf("VerseKey2::compare with %s\n", (const char *)ikey);fflush(NULL);
-	#endif
-	VerseKey2 ivkey = (const char *)ikey;
-	#ifdef WDGDEBUG
-	printf("VerseKey2::compare comparing %s to %s\n", getText(), (const char *)ivkey);
-	#endif
-	return _compare(ivkey);
-}
-
-
-/******************************************************************************
- * VerseKey2::_compare	- Compares another VerseKey2 object
- *
- * ENT:	ikey - key to compare with this one
- *
- * RET:	>0 if this VerseKey2 is greater than compare VerseKey2
- *	<0 <
- *	 0 =
- */
-
-int VerseKey2::_compare(const VerseKey2 &ivkey)
-{
-	long keyval1 = 0;
-	long keyval2 = 0;
-
-	keyval1 += Book() * 1000000;
-	keyval2 += ivkey.Book() * 1000000;
-	keyval1 += Chapter() * 1000;
-	keyval2 += ivkey.Chapter() * 1000;
-	keyval1 += Verse();
-	keyval2 += ivkey.Verse();
-	#ifdef WDGDEBUG
-	printf("comparing %d to %d\n", keyval1, keyval2);fflush(NULL);
-	#endif
-	keyval1 -= keyval2;
-	keyval1 = (keyval1) ? ((keyval1 > 0) ? 1 : -1) /*keyval1/labs(keyval1)*/:0; // -1 | 0 | 1
-	return keyval1;
-}
-
-
-const char *VerseKey2::getOSISRef() const {
-	static SWBuf buf = "";
-	freshtext();
-	if (Verse())
-		buf.appendFormatted("%s.%d.%d", osisbooks[book].prefAbbrev, chapter, verse);
-	else if (Chapter())
-		buf.appendFormatted("%s.%d", osisbooks[book].prefAbbrev, chapter);
-	else if (Book())
-		buf.appendFormatted("%s", osisbooks[book].prefAbbrev);
-	else	buf = "";
-	
-	return buf.c_str();
-}
-
-#if 0
-const char VerseKey2::getMaxBooks() const {
-	return *BMAX;
-}
-#endif
-
-const char *VerseKey2::getNameOfBook(char cBook) const {
-	return osisbooks[cBook].name;
-}
-
-const int VerseKey2::getOSISBookNum(const char *bookab) {
-	int i;
-	//printf("VerseKey2::getOSISBookNum %s...\n", bookab);
-	for (i=0; i <= MAXOSISBOOKS; i++)
-	{
-		if (!strncmp(bookab, osisbooks[i].prefAbbrev, strlen(bookab)))
-		{
-			//printf("VerseKey2::getOSISBookNum %s is %d\n", bookab, i);
-			return i;
-		}
-	}
-	return -1;
-}
-
-const char *VerseKey2::getPrefAbbrev(char cBook) const {
-	return osisbooks[cBook].prefAbbrev;
-}
-
-const int VerseKey2::getMaxChaptersInBook(char cBook) const {
-	//return (offsets[0][book].maxnext == TESTAMENT_HEADING ? 0 : offsets[0][book].maxnext);
-	return m_refsys->getMaxChaptersInBook(cBook);
-}
-
-const int VerseKey2::getMaxVerseInChapter(char cBook, int iChapter) const {
-	//return offsets[1][(offsets[0][book].offset)+chapter].maxnext;
-	return m_refsys->getMaxVerseInChapter(cBook, iChapter);
-}
-
-
-
-/******************************************************************************
- * VerseKey2::getRangeText - returns parsable range text for this key
- */
-
-const char *VerseKey2::getRangeText() const {
-	if (isBoundSet()) {
-		SWBuf buf;
-		buf.appendFormatted("%s-%s", (const char *)LowerBound(), (const char *)UpperBound());
-		stdstr(&rangeText, buf.c_str());
-	}
-	else stdstr(&rangeText, getText());
-	return rangeText;
-}
-
-SWORD_NAMESPACE_END

Modified: trunk/src/mgr/Makefile.am
===================================================================
--- trunk/src/mgr/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/mgr/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -6,16 +6,8 @@
 globdef =
 endif
 
-if BUILDNEWVKEY
-spdefs = -DSPLITLIB
-refsrc = $(mgrdir)/refsysmgr.cpp
-else
-spdefs =
-refsrc =
-endif
+AM_CPPFLAGS += $(globdef)
 
-AM_CPPFLAGS += $(globdef) $(spdefs)
-
 if WITHCURL
 libsword_la_SOURCES += $(mgrdir)/curlftpt.cpp
 else
@@ -26,7 +18,7 @@
 libsword_la_SOURCES += $(mgrdir)/swmgr.cpp
 libsword_la_SOURCES += $(mgrdir)/swfiltermgr.cpp
 libsword_la_SOURCES += $(mgrdir)/encfiltmgr.cpp
-mgrsplits = $(mgrdir)/markupfiltmgr.cpp
+libsword_la_SOURCES += $(mgrdir)/markupfiltmgr.cpp
 libsword_la_SOURCES += $(mgrdir)/filemgr.cpp
 libsword_la_SOURCES += $(mgrdir)/ftptrans.cpp
 libsword_la_SOURCES += $(mgrdir)/swlocale.cpp
@@ -36,6 +28,4 @@
 libsword_la_SOURCES += $(mgrdir)/installmgr.cpp
 libsword_la_SOURCES += $(mgrdir)/stringmgr.cpp
 
-libsword_la_SOURCES += $(mgrsplits)
-libsword_la_SOURCES += $(refsrc) 
 

Modified: trunk/src/mgr/swlocale.cpp
===================================================================
--- trunk/src/mgr/swlocale.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/mgr/swlocale.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -34,10 +34,6 @@
 	bookAbbrevs  = 0;
 	BMAX         = 0;
 	books        = 0;
-	#ifdef SPLITLIB
-	books2        = 0;
-	bookAbbrevs2  = 0;
-	#endif
 	localeSource = new SWConfig(ifilename);
 
 	confEntry = localeSource->Sections["Meta"].find("Name");
@@ -70,21 +66,11 @@
 	if (bookAbbrevs)
 		delete [] bookAbbrevs;
 
-	#ifdef SPLITLIB
-	if (bookAbbrevs2)
-		delete [] bookAbbrevs2;
-	#endif
-	
 	if (BMAX) {
-		#ifndef VK2
 		for (int i = 0; i < 2; i++)
 			delete [] books[i];
-		#endif
 		delete [] BMAX;
 		delete [] books;
-		#ifdef SPLITLIB
-		delete [] books2;
-		#endif
 	}
 }
 
@@ -178,40 +164,6 @@
 }
 
 
-#ifdef SPLITLIB
-const struct abbrev2 *SWLocale::getBookAbbrevs2() {
-	static const char *nullstr = "";
-	if (!bookAbbrevs2) {
-		ConfigEntMap::iterator it;
-		int i;
-		int size = localeSource->Sections["Book Abbrevs"].size();
-		bookAbbrevs2 = new struct abbrev2[size + 1];
-		for (i = 0, it = localeSource->Sections["Book Abbrevs"].begin(); it != localeSource->Sections["Book Abbrevs"].end(); it++, i++) {
-			bookAbbrevs2[i].ab = (*it).first.c_str();
-			bookAbbrevs2[i].book = VerseKey2::getOSISBookNum((*it).second.c_str());
-			//printf("SWLocale::getBookAbbrevs2 %d:%s:%s %d\n",i,bookAbbrevs2[i].ab,
-			//	(*it).second.c_str(), bookAbbrevs2[i].book); 
-		}
-		bookAbbrevs2[i].ab = nullstr;
-		bookAbbrevs2[i].book = ENDOFABBREVS;
-	}
-		
-	return bookAbbrevs2;
-}
-void SWLocale::getBooks2(struct sbook2 ***ibooks, VerseKey2 *vk) {
-	if (!books2) {
-
-		books2 = new struct sbook2*[1];
-		books2[0] = new struct sbook2[MAXOSISBOOKS+1];
-		for (int j = 0; j <= MAXOSISBOOKS; j++) {
-				books2[0][j].name = translate(vk->getNameOfBook(j));
-				books2[0][j].prefAbbrev = translate(vk->getPrefAbbrev(j));
-		}
-	}
-
-	*ibooks = books2;
-}
-#endif
 void SWLocale::getBooks(char **iBMAX, struct sbook ***ibooks) {
 	if (!BMAX) {
 		BMAX = new char [2];

Modified: trunk/src/mgr/swmgr.cpp
===================================================================
--- trunk/src/mgr/swmgr.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/mgr/swmgr.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -69,11 +69,6 @@
 #include <cipherfil.h>
 #include <rawfiles.h>
 #include <ztext.h>
-
-#ifdef SPLITLIB
-#include <ztext2.h>
-#endif
-
 #include <zld.h>
 #include <zcom.h>
 #include <lzsscomprs.h>
@@ -130,7 +125,6 @@
 	cipherFilters.clear();
 	optionFilters.clear();
 	cleanupFilters.clear();
-//#ifndef SPLITLIB
 	tmpFilter = new ThMLVariants();
 	optionFilters.insert(FilterMap::value_type("ThMLVariants", tmpFilter));
 	cleanupFilters.push_back(tmpFilter);
@@ -697,11 +691,7 @@
 		direction = DIRECTION_LTR;
 	}
 
-	if ((!stricmp(driver, "zText")) || (!stricmp(driver, "zCom"))
-#ifdef SPLITLIB
-	|| (!stricmp(driver, "zText2"))
-#endif
-	) {
+	if ((!stricmp(driver, "zText")) || (!stricmp(driver, "zCom"))) {
 		SWCompress *compress = 0;
 		int blockType = CHAPTERBLOCKS;
 		int blockNum = 1;
@@ -726,11 +716,6 @@
 			compress = new LZSSCompress();
 
 		if (compress) {
-#ifdef SPLITLIB
-			if (!stricmp(driver, "zText2"))
-				newmod = new zText2(datapath.c_str(), name, description.c_str(), blockType, blockNum, compress, 0, enc, direction, markup, lang.c_str());
-			else
-#endif
 			if (!stricmp(driver, "zText"))
 				newmod = new zText(datapath.c_str(), name, description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str());
 			else	newmod = new zCom(datapath.c_str(), name, description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str());

Modified: trunk/src/modules/comments/hrefcom/Makefile.am
===================================================================
--- trunk/src/modules/comments/hrefcom/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/comments/hrefcom/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,7 +1,2 @@
 hrefcomdir = $(top_srcdir)/src/modules/comments/hrefcom
-
-#if BUILDSPLITLIB
-#libsword_imp_la_SOURCES += $(hrefcomdir)/hrefcom.cpp
-#else
 libsword_la_SOURCES += $(hrefcomdir)/hrefcom.cpp
-#endif

Modified: trunk/src/modules/comments/rawcom/Makefile.am
===================================================================
--- trunk/src/modules/comments/rawcom/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/comments/rawcom/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,7 +1,2 @@
 rawcomdir = $(top_srcdir)/src/modules/comments/rawcom
-
-#if BUILDSPLITLIB
-#libsword_imp_la_SOURCES += $(rawcomdir)/rawcom.cpp
-#else
 libsword_la_SOURCES += $(rawcomdir)/rawcom.cpp
-#endif

Modified: trunk/src/modules/comments/rawfiles/Makefile.am
===================================================================
--- trunk/src/modules/comments/rawfiles/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/comments/rawfiles/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,7 +1,2 @@
 rawfilesdir = $(top_srcdir)/src/modules/comments/rawfiles
-
-#if BUILDSPLITLIB
-#libsword_imp_la_SOURCES += $(rawfilesdir)/rawfiles.cpp
-#else
 libsword_la_SOURCES += $(rawfilesdir)/rawfiles.cpp
-#endif

Modified: trunk/src/modules/comments/zcom/Makefile.am
===================================================================
--- trunk/src/modules/comments/zcom/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/comments/zcom/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,7 +1,2 @@
 zcomdir = $(top_srcdir)/src/modules/comments/zcom
-
-#if BUILDSPLITLIB
-#libsword_imp_la_SOURCES += $(zcomdir)/zcom.cpp
-#else
 libsword_la_SOURCES += $(zcomdir)/zcom.cpp
-#endif

Deleted: trunk/src/modules/comments/zcom/rawtxt2z.cpp
===================================================================
--- trunk/src/modules/comments/zcom/rawtxt2z.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/comments/zcom/rawtxt2z.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,83 +0,0 @@
-#include <ctype.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#ifndef __GNUC__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-
-#include <swcomprs.h>
-
-
-main(int argc, char **argv)
-{
-	SWCompress *zobj;
-	int ifd, ofd, ixfd, oxfd;
-	long offset, loffset, lzoffset;
-	short size, lsize, lzsize;
-	char *tmpbuf;
-	
-	if (argc != 2) {
-		fprintf(stderr, "usage: %s <datafilename>\n", argv[0]);
-		exit(1);
-	}
-
-	zobj = new SWCompress();
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-	tmpbuf = new char [ strlen(argv[1]) + 9 ];
-	ifd = open(argv[1], O_RDONLY|O_BINARY);
-	sprintf(tmpbuf, "%s.vss", argv[1]);
-	ixfd = open(tmpbuf, O_RDONLY|O_BINARY);
-	sprintf(tmpbuf, "%s.zzz", argv[1]);
-	ofd = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
-	sprintf(tmpbuf, "%s.zzz.vss", argv[1]);
-	oxfd = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
-
-	delete [] tmpbuf;
-
-	printf("\n");
-
-	while (1) {
-		if (read(ixfd, &offset, 4) != 4)
-			break;
-		if (read(ixfd, &size, 2) != 2)
-			break;
-
-		if ((offset == loffset) && (size == lsize)) {
-			printf("using previous offset,size\n", size);
-			write(oxfd, &lzoffset, 4);
-			write(oxfd, &lzsize, 2);
-		}
-		else {
-			printf("%d -> ", size);
-			lsize   = size;
-			loffset = offset;
-
-			if (size) {
-				tmpbuf = (char *) calloc(size + 1, 1);
-				lseek(ifd, offset, SEEK_SET);
-				read(ifd, tmpbuf, size);
-				zobj->Buf(tmpbuf);
-				zobj->zBuf(&size);
-				free(tmpbuf);
-			}
-			offset = lseek(ofd, 0, SEEK_END);
-			write(oxfd, &offset, 4);
-			if (size) 
-				write(ofd, zobj->zBuf(&size), size);
-			lzoffset = offset;
-			write(oxfd, &size, 2);
-			lzsize = size;
-			printf("%d \n", size);
-		}
-	}
-	delete zobj;
-}

Modified: trunk/src/modules/common/Makefile.am
===================================================================
--- trunk/src/modules/common/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/common/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -11,18 +11,10 @@
 SWZLIB =
 endif
 libsword_la_SOURCES += $(SWZLIB)
-SPLITS = $(commondir)/rawverse.cpp
+libsword_la_SOURCES += $(commondir)/rawverse.cpp
 libsword_la_SOURCES += $(commondir)/swcipher.cpp
-SPLITS += $(commondir)/zverse.cpp
+libsword_la_SOURCES += $(commondir)/zverse.cpp
 libsword_la_SOURCES += $(commondir)/zstr.cpp
 libsword_la_SOURCES += $(commondir)/entriesblk.cpp
-
-if BUILDNEWVKEY
-zv2 = $(commondir)/zverse2.cpp
-else
-zv2 =
-endif
-libsword_la_SOURCES += $(SPLITS) $(zv2)
-
 libsword_la_SOURCES += $(commondir)/sapphire.cpp
 

Deleted: trunk/src/modules/common/zverse2.cpp
===================================================================
--- trunk/src/modules/common/zverse2.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/common/zverse2.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,559 +0,0 @@
-/******************************************************************************
- *  zverse2.h   - code for class 'zVerse2'- a module that reads raw text
- *				files:  ot and nt using indexs ??.bks ??.cps ??.vss
- *				and provides lookup and parsing functions based on
- *				class VerseKey2 for compressed modules
- */
-
-
-#include <ctype.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#ifndef __GNUC__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-
-#include <utilfuns.h>
-#include <versekey2.h>
-#include <zverse2.h>
-#include <sysdata.h>
-#include <swbuf.h>
-
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-SWORD_NAMESPACE_START
-
-/******************************************************************************
- * zVerse2 Statics
- */
-
-int zVerse2::instance = 0;
-
-const char zVerse2::uniqueIndexID[] = {'X', 'r', 'v', 'c', 'b', 'i'};
-
-/******************************************************************************
- * zVerse2 Constructor - Initializes data for instance of zVerse2
- *
- * ENT:	ipath - path of the directory where data and index files are located.
- *		be sure to include the trailing separator (e.g. '/' or '\')
- *		(e.g. 'modules/texts/rawtext/webster/')
- *		fileMode - open mode for the files (O_RDONLY, etc.)
- *		blockType - verse, chapter, book, etc.
- */
-
-zVerse2::zVerse2(const char *ipath, int fileMode, int blockType, 
-	SWCompress *icomp, int indexesPerBlock)
-{
-	SWBuf buf;
-
-	nl = '\n';
-	path = 0;
-	cacheBufIdx = -1;
-	cacheBuf = 0;
-	m_idxPerBlock = indexesPerBlock;
-	dirtyCache = false;
-	stdstr(&path, ipath);
-
-	if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-		path[strlen(path)-1] = 0;
-
-	compressor = (icomp) ? icomp : new SWCompress();
-
-	if (fileMode == -1) { // try read/write if possible
-		fileMode = O_RDWR;
-	}
-		
-	buf.setFormatted("%s/text.%czs", path, uniqueIndexID[blockType]);
-	idxfp = FileMgr::getSystemFileMgr()->open(buf, fileMode|O_BINARY, true);
-
-	buf.setFormatted("%s/text.%czz", path, uniqueIndexID[blockType]);
-	textfp = FileMgr::getSystemFileMgr()->open(buf, fileMode|O_BINARY, true);
-
-	buf.setFormatted("%s/text.%czv", path, uniqueIndexID[blockType]);
-	compfp = FileMgr::getSystemFileMgr()->open(buf, fileMode|O_BINARY, true);
-
-	buf.setFormatted("%s/text.%czm", path, uniqueIndexID[blockType]);
-	markupfp = FileMgr::getSystemFileMgr()->open(buf, fileMode|O_BINARY, true);
-
-	buf.setFormatted("%s/text.%czr", path, uniqueIndexID[blockType]);
-	midxfp = FileMgr::getSystemFileMgr()->open(buf, fileMode|O_BINARY, true);
-
-	
-	instance++;
-}
-
-
-/******************************************************************************
- * zVerse2 Destructor - Cleans up instance of zVerse2
- */
-
-zVerse2::~zVerse2()
-{
-	int loop1;
-
-	if (cacheBuf) {
-		flushCache();
-		free(cacheBuf);
-	}
-
-	if (path)
-		delete [] path;
-
-	if (compressor)
-		delete compressor;
-
-	--instance;
-
-	FileMgr::getSystemFileMgr()->close(idxfp);
-	FileMgr::getSystemFileMgr()->close(textfp);
-	FileMgr::getSystemFileMgr()->close(compfp);
-	FileMgr::getSystemFileMgr()->close(markupfp);
-	FileMgr::getSystemFileMgr()->close(midxfp);
-}
-
-
-/******************************************************************************
- * zVerse2::findoffset	- Finds the offset of the key verse from the indexes
- *
- *
- *
- * ENT: testmt	- testament to find (0 - Bible/module introduction)
- *	book	- book      to find (0 - testament    introduction)
- *	chapter	- chapter   to find (0 - book         introduction)
- *	verse	- verse     to find (0 - chapter      introduction)
- *	start	- address to store the starting offset
- *	size	- address to store the size of the entry
- */
-
-void zVerse2::findOffsetText(long idxoff, long *start, unsigned short *size)
-{
-	// set start to offset in
-	// set size to
-	// set
-	unsigned long ulBuffNum=0;	          // buffer number
-	unsigned long ulVerseStart=0;	       // verse offset within buffer
-	unsigned short usVerseSize=0;	       // verse size
-	unsigned long ulCompOffset=0;	       // compressed buffer start
-	unsigned long ulCompSize=0;	             // buffer size compressed
-	unsigned long ulUnCompSize=0;	          // buffer size uncompressed
-	char *pcCompText=NULL;					 // compressed text
-
-	*start = *size = 0;
-	//printf ("Finding offset %ld\n", idxoff);
-	idxoff *= 10;
-	
-	// assert we have and valid file descriptor
-	if (compfp->getFd() < 1)
-		return;
-		
-	long newOffset = lseek(compfp->getFd(), idxoff, SEEK_SET);
-	if (newOffset == idxoff) {
-		if (read(compfp->getFd(), &ulBuffNum, 4) != 4) {
-			printf ("Error reading ulBuffNum from %d\n", idxoff);
-			return;
-		}
-	}
-	else {
-		printf ("Error seeking to ulBuffNum from %d\n", idxoff);
-		return;
-	}
-
-	ulBuffNum = swordtoarch32(ulBuffNum);
-
-	if (read(compfp->getFd(), &ulVerseStart, 4) != 4)
-	{
-		printf ("Error reading ulVerseStartfrom %d\n", idxoff);
-		return;
-	}
-	if (read(compfp->getFd(), &usVerseSize, 2) != 2)
-	{
-		printf ("Error reading usVerseSize from %d\n", idxoff);
-		return;
-	}
-
-	*start = swordtoarch32(ulVerseStart);
-	*size = swordtoarch16(usVerseSize);
-
-	if (*size) {
-		if (((long) ulBuffNum == cacheBufIdx) && (cacheBuf)) {
-			// have the text buffered
-			return;
-		}
-
-		//printf ("Got buffer number{%ld} versestart{%ld} versesize{%d}\n", ulBuffNum, ulVerseStart, usVerseSize);
-
-
-		if (lseek(idxfp->getFd(), ulBuffNum*12, SEEK_SET)!=(long) ulBuffNum*12)
-		{
-			printf ("Error seeking compressed file index\n");
-			return;
-		}
-		if (read(idxfp->getFd(), &ulCompOffset, 4)<4)
-		{
-			printf ("Error reading ulCompOffset\n");
-			return;
-		}
-		if (read(idxfp->getFd(), &ulCompSize, 4)<4)
-		{
-			printf ("Error reading ulCompSize\n");
-			return;
-		}
-		if (read(idxfp->getFd(), &ulUnCompSize, 4)<4)
-		{
-			printf ("Error reading ulUnCompSize\n");
-			return;
-		}
-
-		ulCompOffset  = swordtoarch32(ulCompOffset);
-		ulCompSize  = swordtoarch32(ulCompSize);
-		ulUnCompSize  = swordtoarch32(ulUnCompSize);
-
-		if (lseek(textfp->getFd(), ulCompOffset, SEEK_SET)!=(long)ulCompOffset)
-		{
-			printf ("Error: could not seek to right place in compressed text\n");
-			return;
-		}
-		SWBuf pcCompText;
-		pcCompText.setSize(ulCompSize+5);
-
-		if (read(textfp->getFd(), pcCompText.getRawData(), ulCompSize)<(long)ulCompSize) {
-			printf ("Error reading compressed text\n");
-			return;
-		}
-		pcCompText.setSize(ulCompSize);
-		#if 0 // it's a nullop - dunno what it was supposed to be?
-		rawZFilter(pcCompText, 0); // 0 = decipher
-		#endif
-		
-		compressor->zBuf(&ulCompSize, pcCompText.getRawData());
-
-		if (cacheBuf) {
-			flushCache();
-			free(cacheBuf);
-		}
-		
-		unsigned long len = 0;
-		compressor->Buf(0, &len);
-		cacheBuf = (char *)calloc(len + 1, 1);
-		memcpy(cacheBuf, compressor->Buf(), len);
-
-		cacheBufIdx = ulBuffNum;
-	}
-}
-
-
-void zVerse2::findOffsetMarkup(long idxoff, long *start, unsigned short *size)
-{
-	if (midxfp->getFd() < 1)
-		return;
-	idxoff *= 6;
-		
-	if (midxfp->getFd() >= 0) {
-		lseek(midxfp->getFd(), idxoff, SEEK_SET);
-		read(midxfp->getFd(), start, 4);							// read start
-		unsigned short len = read(idxfp->getFd(), size, 2); 		// read size
-
-		*start = swordtoarch32(*start);
-		*size  = swordtoarch16(*size);
-
-		if (len < 2) {
-			*size = (unsigned short)((*start) ? (lseek(markupfp->getFd(), 0, SEEK_END) - (long)*start) : 0);	
-				// if for some reason we get an error reading size, make size to end of file
-		}
-	}
-	else {
-		*start = 0;
-		*size = 0;
-	}
-}
-
-/******************************************************************************
- * zVerse2::zreadtext	- gets text at a given offset
- *
- * ENT:	testmt	- testament file to search in (0 - Old; 1 - New)
- *	start	- starting offset where the text is located in the file
- *	size	- size of text entry + 1 (null)
- *	buf	- buffer to store text
- *
- */
-
-void zVerse2::zReadText(long start, unsigned short size, SWBuf &inBuf) {
-	inBuf = "";
-	inBuf.setFillByte(0);
-	inBuf.setSize(size+1);
-	if (size > 0) {
-		if (cacheBuf)
-			strncpy(inBuf.getRawData(), &(cacheBuf[start]), size);
-	}
-	inBuf.setSize(strlen(inBuf.c_str()));
-}
-
-
-/******************************************************************************
- * zVerse2::settext	- Sets text for current offset
- *
- * ENT: testmt	- testament to find (0 - Bible/module introduction)
- *	idxoff	- offset into .vss
- *	buf	- buffer to store
- *      len     - length of buffer (0 - null terminated)
- */
-
-void zVerse2::doSetText(long idxoff, const char *buf, long len) {
-
-	len = (len < 0) ? strlen(buf) : len;
-	if ((!dirtyCache) || (cacheBufIdx < 0)) {
-		cacheBufIdx = lseek(idxfp->getFd(), 0, SEEK_END) / 12;
-		if (cacheBuf)
-			free(cacheBuf);
-		cacheBuf = (char *)calloc(len + 1, 1);
-	}
-	else cacheBuf = (char *)((cacheBuf)?realloc(cacheBuf, strlen(cacheBuf)+(len + 1)):calloc((len + 1), 1));
-
-	dirtyCache = true;
-
-	unsigned long start, outstart;
-	unsigned long outBufIdx = cacheBufIdx;
-	unsigned short size;
-	unsigned short outsize;
-
-	idxoff *= 10;
-	size = outsize = len;
-
-	start = strlen(cacheBuf);
-
-	if (!size)
-		start = outBufIdx = 0;
-
-	outBufIdx = archtosword32(outBufIdx);
-	outstart  = archtosword32(start);
-	outsize   = archtosword16(size);
-
-	lseek(compfp->getFd(), idxoff, SEEK_SET);
-	write(compfp->getFd(), &outBufIdx, 4);
-	write(compfp->getFd(), &outstart, 4);
-	write(compfp->getFd(), &outsize, 2);
-	strcat(cacheBuf, buf);
-}
-
-
-void zVerse2::flushCache() {
-	if (dirtyCache) {
-		unsigned long idxoff;
-		unsigned long start, outstart;
-		unsigned long size, outsize;
-		unsigned long zsize, outzsize;
-
-		idxoff = cacheBufIdx * 12;
-		if (cacheBuf) {
-			size = outsize = zsize = outzsize = strlen(cacheBuf);
-			if (size) {
-	//			if (compressor) {
-	//				delete compressor;
-	//				compressor = new LZSSCompress();
-	//			}
-				compressor->Buf(cacheBuf);
-				compressor->zBuf(&zsize);
-				outzsize = zsize;
-
-				SWBuf buf;
-				buf.setSize(zsize + 5);
-				memcpy(buf.getRawData(), compressor->zBuf(&zsize), zsize);
-				buf.setSize(zsize);
-				#if 0 // it's a nullop - dunno what it was supposed to be?
-				rawZFilter(buf, 1); // 1 = encipher
-				#endif
-
-				start = outstart = lseek(textfp->getFd(), 0, SEEK_END);
-
-				outstart  = archtosword32(start);
-				outsize   = archtosword32(size);
-				outzsize  = archtosword32(zsize);
-
-				write(textfp->getFd(), buf, zsize);
-
-				lseek(idxfp->getFd(), idxoff, SEEK_SET);
-				write(idxfp->getFd(), &outstart, 4);
-				write(idxfp->getFd(), &outzsize, 4);
-				write(idxfp->getFd(), &outsize, 4);
-			}
-			free(cacheBuf);
-			cacheBuf = 0;
-		}
-		dirtyCache = false;
-	}
-}
-
-/******************************************************************************
- * RawVerse::linkentry	- links one entry to another
- *
- * ENT: testmt	- testament to find (0 - Bible/module introduction)
- *	destidxoff	- dest offset into .vss
- *	srcidxoff		- source offset into .vss
- */
-
-void zVerse2::doLinkEntry(long destidxoff, long srcidxoff) {
-	long bufidx;
-	long start;
-	unsigned short size;
-
-	destidxoff *= 10;
-	srcidxoff  *= 10;
-
-	// get source
-	lseek(compfp->getFd(), srcidxoff, SEEK_SET);
-	read(compfp->getFd(), &bufidx, 4);
-	read(compfp->getFd(), &start, 4);
-	read(compfp->getFd(), &size, 2);
-
-	// write dest
-	lseek(compfp->getFd(), destidxoff, SEEK_SET);
-	write(compfp->getFd(), &bufidx, 4);
-	write(compfp->getFd(), &start, 4);
-	write(compfp->getFd(), &size, 2);
-	
-	// !!WDG do we want to link the markup as well?
-}
-
-
-/******************************************************************************
- * RawVerse::CreateModule	- Creates new module files
- *
- * ENT: path	- directory to store module files
- * RET: error status
- */
-
-char zVerse2::createModule(const char *ipath, int blockBound, int indxPerBlock)
-{
-	char *path = 0;
-	char *buf = new char [ strlen (ipath) + 20 ];
-	FileDesc *fd, *fd2;
-
-	stdstr(&path, ipath);
-
-	if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-		path[strlen(path)-1] = 0;
-
-	sprintf(buf, "%s/text.%czs", path, uniqueIndexID[blockBound]);
-	FileMgr::removeFile(buf);
-	fd = FileMgr::getSystemFileMgr()->open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-	fd->getFd();
-	FileMgr::getSystemFileMgr()->close(fd);
-
-	sprintf(buf, "%s/text.%czz", path, uniqueIndexID[blockBound]);
-	FileMgr::removeFile(buf);
-	fd = FileMgr::getSystemFileMgr()->open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-	fd->getFd();
-	FileMgr::getSystemFileMgr()->close(fd);
-
-	sprintf(buf, "%s/text.%czm", path, uniqueIndexID[blockBound]);
-	FileMgr::removeFile(buf);
-	fd = FileMgr::getSystemFileMgr()->open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-	fd->getFd();
-	FileMgr::getSystemFileMgr()->close(fd);
-
-	sprintf(buf, "%s/text.%czr", path, uniqueIndexID[blockBound]);
-	FileMgr::removeFile(buf);
-	fd = FileMgr::getSystemFileMgr()->open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-	fd->getFd();
-
-	sprintf(buf, "%s/text.%czv", path, uniqueIndexID[blockBound]);
-	FileMgr::removeFile(buf);
-	fd2 = FileMgr::getSystemFileMgr()->open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-	fd2->getFd();
-
-	VerseKey2 vk;
-	vk.Headings(1);
-	long offset = 0;
-	short size = 0;
-	for (vk = TOP; !vk.Error(); vk++) {
-		//printf("vk %s %d\n", vk.getText(), vk.Index());
-		write(fd->getFd(), &offset, 4);	//compBufIdxOffset
-		write(fd->getFd(), &offset, 4);
-		write(fd->getFd(), &size, 2);
-		write(fd2->getFd(), &offset, 4);	//compBufIdxOffset
-		write(fd2->getFd(), &offset, 4);
-		write(fd2->getFd(), &size, 2);
-	}
-
-	FileMgr::getSystemFileMgr()->close(fd);
-	FileMgr::getSystemFileMgr()->close(fd2);
-
-	delete [] path;
-	delete [] buf;
-/*
-	RawVerse rv(path);
-	VerseKey2 mykey("Rev 22:21");
-*/
-	
-	return 0;
-}
-
-
-/******************************************************************************
- * zVerse2::preptext	- Prepares the text before returning it to external
- *				objects
- *
- * ENT:	buf	- buffer where text is stored and where to store the prep'd
- *			text.
- */
-#if 0 // should we really need this?
-void zVerse2::prepText(SWBuf &buf) {
-	unsigned int to, from; 
-	char space = 0, cr = 0, realdata = 0, nlcnt = 0;
-	char *rawBuf = buf.getRawData();
-	for (to = from = 0; rawBuf[from]; from++) {
-		switch (rawBuf[from]) {
-		case 10:
-			if (!realdata)
-				continue;
-			space = (cr) ? 0 : 1;
-			cr = 0;
-			nlcnt++;
-			if (nlcnt > 1) {
-//				*to++ = nl;
-				rawBuf[to++] = 10;
-//				*to++ = nl[1];
-//				nlcnt = 0;
-			}
-			continue;
-		case 13:
-			if (!realdata)
-				continue;
-//			*to++ = nl[0];
-			rawBuf[to++] = 10;
-			space = 0;
-			cr = 1;
-			continue;
-		}
-		realdata = 1;
-		nlcnt = 0;
-		if (space) {
-			space = 0;
-			if (rawBuf[from] != ' ') {
-				rawBuf[to++] = ' ';
-				from--;
-				continue;
-			}
-		}
-		rawBuf[to++] = rawBuf[from];
-	}
-	buf.setSize(to);
-
-	while (to > 1) {			// remove trailing excess
-		to--;
-		if ((rawBuf[to] == 10) || (rawBuf[to] == ' '))
-			buf.setSize(to);
-		else break;
-	}
-}
-#endif
-
-SWORD_NAMESPACE_END

Modified: trunk/src/modules/filters/Makefile.am
===================================================================
--- trunk/src/modules/filters/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/filters/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -93,10 +93,5 @@
 libsword_la_SOURCES += $(SWREALICUSRC)
 EXTRA_DIST = $(DISTSWICUSRC)
 
-#if BUILDSPLITLIB
-#libsword_imp_la_SOURCES += $(OSISFIL) $(GBFFIL) \
-#	$(THMLFIL) $(CONVFIL) $(PLFIL)
-#else
 libsword_la_SOURCES += $(OSISFIL) $(GBFFIL) \
 	$(THMLFIL) $(CONVFIL) $(PLFIL)
-#endif

Modified: trunk/src/modules/swmodule.cpp
===================================================================
--- trunk/src/modules/swmodule.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/swmodule.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -842,8 +842,16 @@
 }
 
 
+bool SWModule::hasSearchFramework() {
 #ifdef USELUCENE
+	return true;
+#else
+	return SWSearchable::hasSearchFramework();
+#endif
+}
+
 void SWModule::deleteSearchFramework() {
+#ifdef USELUCENE
 	SWBuf target = getConfigEntry("AbsoluteDataPath");
 	char ch = target.c_str()[strlen(target.c_str())-1];
 	if ((ch != '/') && (ch != '\\'))
@@ -851,10 +859,14 @@
 	target.append("lucene");
 
 	FileMgr::removeDir(target.c_str());
+#else
+	SWSearchable::deleteSearchFrameword();
+#endif
 }
 
 
 signed char SWModule::createSearchFramework(void (*percent)(char, void *), void *percentUserData) {
+#ifdef USELUCENE
 	SWKey *savekey = 0;
 	SWKey *searchkey = 0;
 	SWKey textkey;
@@ -1013,8 +1025,10 @@
 	}
 
 	return 0;
+#else
+	return SWSearchable::createSearchFramework(percent, percentUserData);
+#endif
 }
-#endif
 
 
 

Modified: trunk/src/modules/texts/rawtext/Makefile.am
===================================================================
--- trunk/src/modules/texts/rawtext/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/texts/rawtext/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,7 +1,2 @@
 rawtextdir = $(top_srcdir)/src/modules/texts/rawtext
-
-#if BUILDSPLITLIB
-#libsword_imp_la_SOURCES += $(rawtextdir)/rawtext.cpp
-#else
 libsword_la_SOURCES += $(rawtextdir)/rawtext.cpp
-#endif

Modified: trunk/src/modules/texts/rawtext/rawtext.cpp
===================================================================
--- trunk/src/modules/texts/rawtext/rawtext.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/texts/rawtext/rawtext.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -141,8 +141,8 @@
 }
 
 
+signed char RawText::createSearchFramework(void (*percent)(char, void *), void *percentUserData) {
 #ifndef USELUCENE
-signed char RawText::createSearchFramework(void (*percent)(char, void *), void *percentUserData) {
 	SWKey *savekey = 0;
 	SWKey *searchkey = 0;
 	SWKey textkey;
@@ -269,10 +269,14 @@
 		close(idxfd);
 	}
 	return 0;
+#else
+	return SWModule::createSearchFramework(percent, percentUserData);
+#endif
 }
 
 
 void RawText::deleteSearchFramework() {
+#ifndef USELUCENE
 	SWBuf target = path;
 	char ch = target.c_str()[strlen(target.c_str())-1];
 	if ((ch != '/') && (ch != '\\'))
@@ -281,6 +285,9 @@
 	FileMgr::removeFile(target + "otwords.dat");
 	FileMgr::removeFile(target + "ntwords.idx");
 	FileMgr::removeFile(target + "otwords.idx");
+#else
+	SWModule::deleteSearchFramework();
+#endif
 }
 
 
@@ -300,6 +307,7 @@
  */
 
 ListKey &RawText::search(const char *istr, int searchType, int flags, SWKey *scope, bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData) {
+#ifndef USELUCENE
 	listkey.ClearList();
 
 	if ((fastSearch[0]) && (fastSearch[1])) {
@@ -478,10 +486,10 @@
 		return listkey;
 	}
 
+#endif
 	// if we don't support this search, fall back to base class
 	return SWModule::search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData);
 }
-#endif
 
 
 void RawText::setEntry(const char *inbuf, long len) {

Modified: trunk/src/modules/texts/ztext/Makefile.am
===================================================================
--- trunk/src/modules/texts/ztext/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/texts/ztext/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,8 +1,3 @@
 ztextdir = $(top_srcdir)/src/modules/texts/ztext
 
-if BUILDNEWVKEY
-zt2 = $(ztextdir)/ztext2.cpp
-else
-zt2 =
-endif
-libsword_la_SOURCES += $(ztextdir)/ztext.cpp $(zt2)
+libsword_la_SOURCES += $(ztextdir)/ztext.cpp 

Deleted: trunk/src/modules/texts/ztext/rawtxt2z.cpp
===================================================================
--- trunk/src/modules/texts/ztext/rawtxt2z.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/texts/ztext/rawtxt2z.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,457 +0,0 @@
-// Compression on variable granularity
-
-#include <fcntl.h>
-#include <iostream>
-#include <fstream>
-#include <string>
-
-#ifndef __GNUC__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-
-#include <zlib.h>
-#include <versekey.h>
-
-int iBufSize, ulBuffNum;
-ofstream cfile;
-ofstream cfile2;
-
-int ofd[2], oxfd[2], ovxfd[2];
-int ifd[2], ixfd[2];
-int itestfd[2], itestxfd[2];
-unsigned long ulIOff=0, ulCOff=0, ulFOff=0, ulNone=0;
-string currbuff="";
-
-
-int openreadfile(char *buffer, char *path, const char *filename)
-{
-	int filenum;
-	sprintf(buffer, "%s/%s", path, filename);
-	cfile << buffer << "\n";
-	filenum =  open(buffer, O_RDONLY|O_BINARY);
-	if (filenum > 0)
-	{
-		return filenum;
-	}
-	else
-	{
-		cerr << "failed to open file to read\n";
-		exit(-1);
-	}
-}
-
-int openwritefile(char *buffer, char *path, const char *filename)
-{
-	int filenum;
-	sprintf(buffer, "%s/%s", path, filename);
-	cfile << buffer << "\n";
-	filenum =  open(buffer, O_WRONLY|O_BINARY|O_CREAT|O_TRUNC);
-	if (filenum > 0)
-	{
-		return filenum;
-	}
-	else
-	{
-		cerr << "failed to open file to read\n";
-		exit(-1);
-	}
-}
-
-int bytebound(unsigned long offset, VerseKey &thekey)
-{
-	unsigned long bufferoff;
-	cfile << "byteboundtest " << thekey << "\n";
-	bufferoff = iBufSize * (ulBuffNum+1);
-	if (offset > bufferoff)
-	{
-		return 1;
-	}
-	else
-	{
-		return 0;
-	}
-}
-
-int versebound(unsigned long offset, VerseKey &thekey)
-{
-	cfile << "verseboundtest " << thekey << "\n";
-	return 1;
-}
-
-int chapterbound(unsigned long offset, VerseKey &thekey)
-{
-	VerseKey testkey;
-	testkey = thekey;
-	testkey++;
-	//cfile << "chapterboundtest " << testkey;
-	if (testkey.Verse()==1 || (!thekey.compare("Revelation of John 22:21")))
-	{
-		//cfile << " 1\n";
-		return 1;
-	}
-	else
-	{
-		//cfile << " 0\n";
-		return 0;
-	}
-}
-
-int bookbound(unsigned long offset, VerseKey &thekey)
-{
-	VerseKey testkey;
-	testkey = thekey;
-	cfile << "bookboundtest " << testkey << "\n";
-	testkey++;
-	if (testkey.Chapter()==1 || (!thekey.compare("Revelation of John 22:21")))
-	{
-		return 1;
-	}
-	else
-	{
-		return 0;
-	}
-}
-
-
-typedef int (*boundfunc)(unsigned long offset, VerseKey &thekey);
-
-int writeblock(int i)
-{
-	char *destbuff=NULL;
-	unsigned long compsize = 0, buffsize=0;
-
-	cfile << "compressing block\n";
-	// compress current buffer
-	buffsize = currbuff.length();
-	write(itestfd[i], currbuff.c_str(), buffsize);
-	compsize = (unsigned long) (buffsize*1.01)+20;  // at least 1% bigger than buffer + 12 bytes
-	//cfile << "{" << compsize << "}";
-	//destbuff = (char *) calloc(compsize + 1, 1);
-	destbuff = new char[compsize];
-	if (compress((Bytef*)destbuff, &compsize, (const Bytef*)currbuff.c_str(), buffsize)!=Z_OK)
-	{
-		cerr << "Could not compress buffer: exiting\n";
-		delete[] destbuff;
-		exit(-1);
-	}
-	//cout << "Compressed buffer{" << compsize << "}\n" << destbuff << "\n";
-	//cout.flush();
-	// write to compressed file index
-	ulCOff = lseek(ofd[i], 0, SEEK_END);
-	write(oxfd[i], &ulCOff, 4);    // offset in compressed file
-	write(oxfd[i], &compsize, 4);	 // compressed size
-	write(oxfd[i], &buffsize, 4);	 // uncompressed size
-	cfile << buffsize << " -> " << compsize << "\n";
-	cfile2 << "Compressed{" << compsize << "}\n" << destbuff << "\n";
-	cfile2.flush();
-
-	//write compressed buffer to file
-	write(ofd[i], destbuff, compsize);
-
-	//free(destbuff);
-	delete[] destbuff;
-
-	currbuff = "";
-	ulBuffNum++;
-	ulIOff = 0;
-	return 1;
-}
-
-
-
-int main(int argc, char **argv)
-{
-	VerseKey key1, key2, key3;
-	int i;
-	char xbuff[64];
-	unsigned long offset;
-	unsigned short size=0;
-	unsigned long ulsize=0;
-	char *tmpbuf=NULL;
-	int iType;
-	boundfunc blockbound[4] = {bytebound, versebound, chapterbound, bookbound};
-	bool newbook=true, newchapter=true, newtestament = true, newmodule = true, lasttodo=true;
-
-	if ((argc < 2) || (argc > 4)) {
-		cerr << "usage: " << argv[0] << " datapath [compression type [buffer size]]\n";
-		exit(1);
-	}
-
-	if (argc>2)
-	{
-		iType = atoi(argv[2]);
-		if (argc==4)
-		{
-			iBufSize = atoi(argv[3]);
-		}
-		else
-		{
-			iBufSize = 1;
-		}
-	}
-	else
-	{
-		iType = 2;
-		iBufSize = 1;
-	}
-
-	cfile.open("raw2z.log", ios::out);
-	if (!cfile.is_open())
-	{
-		cerr << "Failed to open log file\n";
-		exit(-1);
-	}
-	cfile2.open("raw2z.lg2", ios::out);
-	if (!cfile2.is_open())
-	{
-		cerr << "Failed to open log file\n";
-		exit(-1);
-	}
-	cfile << iType << " " << iBufSize << "\n";
-
-	if ((iType<=0) || (iType > 4) || !iBufSize || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help") || !strcmp(argv[1], "/?") || !strcmp(argv[1], "-help"))
-	{
-		cfile << argv[0] << " - a tool to create compressed Sword modules\n";
-		cfile << "version 0.1\n\n";
-		cfile << "usage: "<< argv[0] << " datapath [compression type [buffer size]]\n\n";
-		cfile << "datapath: the directory in which to find the raw module\n";
-		cfile << "compression type: (default 2)\n" << "   1 - bytes\n" << "   2 - verses\n" << "   3 - chapters\n" << "   4 - books\n";
-		cfile << "buffer size (default 1): the number of the compression type in each block\n";
-		exit(1);
-	}
-
-	//zobj = new SWCompress();
-	//rawdrv = new RawVerse(argv[1]);
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-	cfile << "opening files\n";
-
-	tmpbuf = new char [ strlen(argv[1]) + 11 ];
-
-	//original files
-	ifd[0] = openreadfile(tmpbuf, argv[1], "ot");
-	ixfd[0] = openreadfile(tmpbuf, argv[1], "ot.vss");
-	ifd[1] = openreadfile(tmpbuf, argv[1], "nt");
-	ixfd[1] = openreadfile(tmpbuf, argv[1], "nt.vss");
-
-switch ( iType) {
-	case 1 :
-		ofd[0] = openwritefile(tmpbuf, argv[1], "ot.rzz");
-		oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.rzs");
-		ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.rzv");
-		ofd[1] = openwritefile(tmpbuf, argv[1], "nt.rzz");
-		oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.rzs");
-		ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.rzv");
-		//boundfunc = bytebound;
-		break;
-	case 2 :
-		ofd[0] = openwritefile(tmpbuf, argv[1], "ot.vzz");
-		oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.vzs");
-		ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.vzv");
-		ofd[1] = openwritefile(tmpbuf, argv[1], "nt.vzz");
-		oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.vzs");
-		ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.vzv");
-		break;
-	case 3 :
-		ofd[0] = openwritefile(tmpbuf, argv[1], "ot.czz");
-		oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.czs");
-		ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.czv");
-		ofd[1] = openwritefile(tmpbuf, argv[1], "nt.czz");
-		oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.czs");
-		ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.czv");
-		break;
-	case 4 :
-		ofd[0] = openwritefile(tmpbuf, argv[1], "ot.bzz");
-		oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.bzs");
-		ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.bzv");
-		ofd[1] = openwritefile(tmpbuf, argv[1], "nt.bzz");
-		oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.bzs");
-		ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.bzv");
-		break;
-	default:
-		cerr << "Unknown compression type\n";
-		exit(-1);
-}
-	itestfd[0] = openwritefile(tmpbuf, argv[1], "ot.tst");
-	itestfd[1] = openwritefile(tmpbuf, argv[1], "nt.tst");
-	itestxfd[0] = openwritefile(tmpbuf, argv[1], "ot.tdx");
-	itestxfd[1] = openwritefile(tmpbuf, argv[1], "nt.tdx");
-
-
-	delete [] tmpbuf;
-
-	//cfile << "about to start\n";
-
-for ( i=0; i<2; i++)
-{
-	ulIOff=0, ulBuffNum=0;
-	currbuff = "";
-	key1 = (i == 1) ? "Matthew 1:1" : "Genesis 1:1";
-	key2 = key3 = key1;
-	newtestament = true;
-
-	cfile << "key: " << key1 << " Testament {" << key1.Testament()-1 << "}\n";
-	//cfile << "Chapter {" << key.Chapter() << "}\n";
-	//cfile << "Verse {" << key.Verse() << "}\n";
-	//cfile << key.compare("Revelation of John 22:21") << "\n";
-	//cfile << key.compare("Genesis 1:1") << "\n";
-	do
-	{
-		//cfile << "ok";
-		// read current verse offset
-		if (read(ixfd[i], &offset, 4) != 4)
-		{
-			cfile << "Failed to read input verse offsets?\n";
-			break;
-		}
-		if (read(ixfd[i], &size, 2) != 2)
-		{
-			cfile << "Failed to read input verse sizes?\n";
-			break;
-		}
-		cfile << "key:" << key1 << " offset:" << offset << " size:" << size << "\n";
-		sprintf(xbuff, "key{%s} offset{%ld} size{%d}\n", (const char *)key1, offset, size);
-		write(itestxfd[i], &xbuff, strlen(xbuff));
-		ulsize = size;
-		if (!offset && !size)
-		{
-			//Check for module header
-			if (read(ixfd[i], &ulIOff, 4) != 4)
-			{
-				cfile << "Failed to read input verse offsets?\n";
-				break;
-			}
-			ulsize = ulIOff;
-			ulIOff = 0;
-			lseek(ixfd[i], 6, SEEK_SET);
-		}
-
-		if (ulsize)
-		{
-			// read current verse and add to current buffer
-			tmpbuf = (char *) calloc(ulsize + 1, 1);
-			lseek(ifd[i], offset, SEEK_SET);
-			read(ifd[i], tmpbuf, ulsize);
-			currbuff += tmpbuf;
-			//cfile << currbuff << "\n";
-
-			// write to verse index into compressed
-			write(ovxfd[i], &ulBuffNum, 4);    // current buffer number
-			write(ovxfd[i], &ulIOff, 4);    // offset within the buffer
-			write(ovxfd[i], &size, 2);    // verse size
-
-			ulFOff = lseek(ofd[i], 0, SEEK_CUR) + size;
-			if (key1.compare("Revelation of John 22:21")!=-1)
-			{
-				lasttodo = false;
-			}
-			if (blockbound[iType-1](ulFOff, key1)/*at block boudary*/)
-			{
-				writeblock(i);
-				/*
-				cfile << "compressing block\n";
-				// compress current buffer
-				buffsize = currbuff.length();
-				write(itestfd[i], currbuff.c_str(), buffsize);
-				compsize = (unsigned long) (buffsize*1.01)+20;  // at least 1% bigger than buffer + 12 bytes
-				//cfile << "{" << compsize << "}";
-				//destbuff = (char *) calloc(compsize + 1, 1);
-				destbuff = new char[compsize];
-				if (compress((Bytef*)destbuff, &compsize, (const Bytef*)currbuff.c_str(), buffsize)!=Z_OK)
-				{
-					cerr << "Could not compress buffer: exiting\n";
-					delete[] destbuff;
-					exit(-1);
-				}
-				//cout << "Compressed buffer{" << compsize << "}\n" << destbuff << "\n";
-				//cout.flush();
-				// write to compressed file index
-				ulCOff = lseek(ofd[i], 0, SEEK_END);
-				write(oxfd[i], &ulCOff, 4);    // offset in compressed file
-				write(oxfd[i], &compsize, 4);	 // compressed size
-				write(oxfd[i], &buffsize, 4);	 // uncompressed size
-				cfile << buffsize << " -> " << compsize << "\n";
-				cfile2 << "Compressed{" << compsize << "}\n" << destbuff << "\n";
-				cfile2.flush();
-
-				//write compressed buffer to file
-				write(ofd[i], destbuff, compsize);
-
-				//free(destbuff);
-				delete[] destbuff;
-
-				currbuff = "";
-				ulBuffNum++;
-				ulIOff = 0;
-				*/
-			}
-			else
-			{
-				ulIOff += ulsize;
-			}
-			free(tmpbuf);
-
-			if (newmodule)
-			{
-				newmodule = false;
-				cfile << "had a new module " << (const char *) key1 << "{" << offset << "}\n";
-				writeblock(i);
-			}
-			else if (newtestament)
-			{
-				newtestament = false;
-				cfile << "had a new testament " << (const char *) key1 << "{" << offset << "}\n";
-			}
-			else if (newbook)
-			{
-				newbook = false;
-				cfile << "had a new book " << (const char *) key1 << "{" << offset << "}\n";
-			}
-			else if (newchapter)
-			{
-				newchapter = false;
-				cfile << "had a new chapter " << (const char *) key1 << "{" << offset << "}\n";
-			}
-			else
-			{
-				key1++;
-			}
-
-			if (key1.Chapter()!=key2.Chapter() || (key1.Book()!=key2.Book()))
-			{
-				newchapter = true;
-				cfile << "got a new chapter " << (const char *) key1 << "\n";
-			}
-			if (key1.Book()!=key2.Book())
-			{
-				newbook = true;
-				cfile << "got a new book " << (const char *) key1 << "\n";
-			}
-			key2 = key1;
-
-		}
-		else
-		{
-			cfile << "empty offset\n";
-			// write to verse index into compressed
-			write(ovxfd[i], &ulNone, 4);    // current buffer number
-			write(ovxfd[i], &size, 2);    // verse size
-			write(ovxfd[i], &ulNone, 4);    // offset within the buffer
-		}
-	}
-	while ( (key1.Testament()==i+1) && ((key1.compare("Revelation of John 22:21")==-1) || (lasttodo)));
-
-	close(ifd[i]);
-	close(ofd[i]);
-	close(ixfd[i]);
-	close(oxfd[i]);
-	close(ovxfd[i]);
-	close(itestfd[i]);
-	close(itestxfd[i]);
-}
-	return 1;
-}

Deleted: trunk/src/modules/texts/ztext/ztext2.cpp
===================================================================
--- trunk/src/modules/texts/ztext/ztext2.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/src/modules/texts/ztext/ztext2.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,457 +0,0 @@
-/******************************************************************************
- *  ztext.cpp - code for class 'zText2'- a module that reads compressed text
- *				files: ot and nt using indexs ??.vss
- */
-
-
-#include <ctype.h>
-#include <stdio.h>
-#include <fcntl.h>
-
-#ifndef __GNUC__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-
-#include <utilfuns.h>
-#include <ztext2.h>
-#include <versekey2.h>
-
-#include <regex.h>	// GNU
-
-
-#ifdef USELUCENE
-#include <CLucene/CLucene.h>
-using namespace lucene::search;
-using namespace lucene::queryParser;
-#endif
-
-SWORD_NAMESPACE_START
-
-/******************************************************************************
- * zText2 Constructor - Initializes data for instance of zText2
- *
- * ENT:	ipath - path to data files
- *		iname - Internal name for module
- *		idesc - Name to display to user for module
- *		iblockType - verse, chapter, book, etc. of index chunks
- *		icomp - Compressor object
- *		idisp - Display object to use for displaying
- */
-
-zText2::zText2(const char *ipath, const char *iname, const char *idesc, 
-	int iblockType, int idxPerBlock, SWCompress *icomp, SWDisplay *idisp, 
-	SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang)
-		: zVerse2(ipath, -1, iblockType, icomp, idxPerBlock), 
-			SWText(iname, idesc, idisp, enc, dir, mark, ilang) {
-	blockType = iblockType;
-	lastWriteKey = 0;
-#ifdef USELUCENE
-	SWBuf fname;
-	fname = path;
-	ir = 0;
-	is = 0;
-	char ch = fname.c_str()[strlen(fname.c_str())-1];
-	if ((ch != '/') && (ch != '\\'))
-		fname += "/lucene";
-	if (IndexReader::indexExists(fname.c_str())) {
-		ir = &IndexReader::open(fname);
-		is = new IndexSearcher(*ir);
-	}
-#endif
-}
-
-
-/******************************************************************************
- * zText2 Destructor - Cleans up instance of zText2
- */
-
-zText2::~zText2()
-{
-	flushCache();
-
-	if (lastWriteKey)
-		delete lastWriteKey;
-
-#ifdef USELUCENE
-	if (is)
-		is->close();
-
-	if (ir)
-		delete ir;
-#endif
-}
-
-
-/******************************************************************************
- * zText2::getRawEntry	- Returns the current verse buffer
- *
- * RET: buffer with verse
- */
-SWBuf &zText2::getRawEntryBuf() {
-	long  start = 0;
-	unsigned short size = 0;
-	VerseKey2 &key = getVerseKey();
-
-	findOffsetText(key.Index(), &start, &size);
-	entrySize = size;        // support getEntrySize call
-			  
-	entryBuf = "";
-	zReadText(start, size, entryBuf);
-
-	rawFilter(entryBuf, &key);
-
-//	if (!isUnicode())
-	#if 0
-		prepText(entryBuf);
-	#endif
-
-	return entryBuf;
-}
-
-bool zText2::sameBlock(VerseKey2 *k1, VerseKey2 *k2) {
-	switch (blockType) {
-	case VERSEBLOCKS:
-		if ((k1->Verse() / m_idxPerBlock) != (k2->Verse() / m_idxPerBlock) || 
-			(k1->Chapter() != k2->Chapter()) || (k1->Book() != k2->Book()))
-		{
-			return false;
-		}
-		break;
-	case CHAPTERBLOCKS:
-		if ((k1->Chapter() / m_idxPerBlock) != (k2->Chapter() / m_idxPerBlock)
-			|| (k1->Book() != k2->Book()))
-		{
-			return false;
-		}
-		break;
-	case BOOKBLOCKS:
-		if ((k1->Book() / m_idxPerBlock) != (k2->Book() / m_idxPerBlock))
-		{
-			return false;
-		}
-		break;
-	case INDEXBLOCKS:
-		if ((k1->Index() / m_idxPerBlock) != (k2->Index() / m_idxPerBlock))
-			return false;
-		break;
-	}
-	return true;
-}
-
-
-void zText2::setEntry(const char *inbuf, long len) {
-	VerseKey2 &key = getVerseKey();
-
-	// see if we've jumped across blocks since last write
-	if (lastWriteKey) {
-		if (!sameBlock(lastWriteKey, &key)) {
-			flushCache();
-		}
-		delete lastWriteKey;
-	}
-
-	doSetText(key.Index(), inbuf, len);
-
-	lastWriteKey = (VerseKey2 *)key.clone();	// must delete
-}
-
-
-void zText2::linkEntry(const SWKey *inkey) {
-	VerseKey2 &destkey = getVerseKey();
-	const VerseKey2 *srckey = 0;
-
-	// see if we have a VerseKey2 * or decendant
-	SWTRY {
-		srckey = (const VerseKey2 *) SWDYNAMIC_CAST(VerseKey2, inkey);
-	}
-	SWCATCH ( ... ) {
-	}
-	// if we don't have a VerseKey2 * decendant, create our own
-	if (!srckey)
-		srckey = new VerseKey2(inkey);
-
-	doLinkEntry(destkey.Index(), srckey->Index());
-
-	if (inkey != srckey) // free our key if we created a VerseKey2
-		delete srckey;
-}
-
-
-/******************************************************************************
- * zFiles::deleteEntry	- deletes this entry
- *
- */
-
-void zText2::deleteEntry() {
-
-	VerseKey2 &key = getVerseKey();
-
-	doSetText(key.Index(), "");
-}
-
-
-/******************************************************************************
- * zText2::increment	- Increments module key a number of entries
- *
- * ENT:	increment	- Number of entries to jump forward
- *
- */
-
-void zText2::increment(int steps) {
-	long  start;
-	unsigned short size;
-	VerseKey2 *tmpkey = &getVerseKey();
-
-	findOffsetText(tmpkey->Index(), &start, &size);
-
-	SWKey lastgood = *tmpkey;
-	while (steps) {
-		long laststart = start;
-		unsigned short lastsize = size;
-		SWKey lasttry = *tmpkey;
-		(steps > 0) ? (*key)++ : (*key)--;
-		tmpkey = &getVerseKey();
-
-		if ((error = key->Error())) {
-			*key = lastgood;
-			break;
-		}
-		long index = tmpkey->Index();
-		findOffsetText(index, &start, &size);
-
-		if (
-			(((laststart != start) || (lastsize != size))	// we're a different entry
-//				&& (start > 0)
-				&& (size))	// and we actually have a size
-				||(!skipConsecutiveLinks)) {	// or we don't want to skip consecutive links
-			steps += (steps < 0) ? 1 : -1;
-			lastgood = *tmpkey;
-		}
-	}
-	error = (error) ? KEYERR_OUTOFBOUNDS : 0;
-}
-
-
-VerseKey2 &zText2::getVerseKey() {
-	static VerseKey2 tmpVK;
-	VerseKey2 *key;
-	// see if we have a VerseKey2 * or decendant
-	SWTRY {
-		key = SWDYNAMIC_CAST(VerseKey2, this->key);
-	}
-	SWCATCH ( ... ) {	}
-	if (!key) {
-		ListKey *lkTest = 0;
-		SWTRY {
-			lkTest = SWDYNAMIC_CAST(ListKey, this->key);
-		}
-		SWCATCH ( ... ) {	}
-		if (lkTest) {
-			SWTRY {
-				key = SWDYNAMIC_CAST(VerseKey2, lkTest->GetElement());
-			}
-			SWCATCH ( ... ) {	}
-		}
-	}
-	if (!key) {
-		tmpVK = *(this->key);
-		return tmpVK;
-	}
-	else	return *key;
-}
-
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-signed char zText2::createSearchFramework() {
-#ifdef USELUCENE
-	SWKey *savekey = 0;
-	SWKey *searchkey = 0;
-	SWKey textkey;
-	char *word = 0;
-	char *wordBuf = 0;
-
-
-	// save key information so as not to disrupt original
-	// module position
-	if (!key->Persist()) {
-		savekey = CreateKey();
-		*savekey = *key;
-	}
-	else	savekey = key;
-
-	searchkey = (key->Persist())?key->clone():0;
-	if (searchkey) {
-		searchkey->Persist(1);
-		setKey(*searchkey);
-	}
-
-	// position module at the beginning
-	*this = TOP;
-
-	VerseKey2 *lkey = (VerseKey2 *)key;
-
-	// iterate thru each entry in module
-
-	IndexWriter* writer = NULL;
-	Directory* d = NULL;
- 
-	lucene::analysis::SimpleAnalyzer& an = *new lucene::analysis::SimpleAnalyzer();
-	SWBuf target = path;
-	char ch = target.c_str()[strlen(target.c_str())-1];
-	if ((ch != '/') && (ch != '\\'))
-		target += "/lucene";
-
-	if (IndexReader::indexExists(target.c_str())) {
-		d = &FSDirectory::getDirectory(target.c_str(), false);
-		if (IndexReader::isLocked(*d)) {
-			IndexReader::unlock(*d);
-		}
-																		   
-		writer = new IndexWriter(*d, an, false);
-	} else {
-		d = &FSDirectory::getDirectory(target.c_str(), true);
-		writer = new IndexWriter( *d ,an, true);
-	}
-
-
- 
-	while (!Error()) {
-		Document &doc = *new Document();
-		doc.add( Field::Text(_T("key"), (const char *)*lkey ) );
-		doc.add( Field::Text(_T("content"), StripText()) );
-		writer->addDocument(doc);
-		delete &doc;
-
-		(*this)++;
-	}
-
-	writer->optimize();
-	writer->close();
-	delete writer;
-	delete &an;
-
-	// reposition module back to where it was before we were called
-	setKey(*savekey);
-
-	if (!savekey->Persist())
-		delete savekey;
-
-	if (searchkey)
-		delete searchkey;
-
-	
-#endif
-	return 0;
-}
-
-
-/******************************************************************************
- * SWModule::Search 	- Searches a module for a string
- *
- * ENT:	istr		- string for which to search
- * 	searchType	- type of search to perform
- *				>=0 - regex
- *				-1  - phrase
- *				-2  - multiword
- * 	flags		- options flags for search
- *	justCheckIfSupported	- if set, don't search, only tell if this
- *							function supports requested search.
- *
- * RET: listkey set to verses that contain istr
- */
-
-ListKey &zText2::search(const char *istr, int searchType, int flags, SWKey *scope, 
-	bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData) {
-#ifdef USELUCENE
-	listkey.ClearList();
-
-	if ((is) && (ir)) {
-
-		switch (searchType) {
-		case -2: {	// let lucene replace multiword for now
-
-
-			// test to see if our scope for this search is bounded by a
-			// VerseKey2
-			VerseKey2 *testKeyType = 0, vk;
-			SWTRY {
-				testKeyType = SWDYNAMIC_CAST(VerseKey2, ((scope)?scope:key));
-			}
-			SWCATCH ( ... ) {}
-			// if we don't have a VerseKey2 * decendant we can't handle
-			// because of scope.
-			// In the future, add bool SWKey::isValid(const char *tryString);
-			if (!testKeyType)
-				break;
-
-
-			// check if we just want to see if search is supported.
-			// If we've gotten this far, then it is supported.
-			if (justCheckIfSupported) {
-				*justCheckIfSupported = true;
-				return listkey;
-			}
-
-			(*percent)(10, percentUserData);
-
-			standard::StandardAnalyzer analyzer;
-			Query &q =  QueryParser::Parse(istr, _T("content"), analyzer);
-			(*percent)(20, percentUserData);
-			Hits &h = is->search(q);
-			(*percent)(80, percentUserData);
-
-
-			// iterate thru each good module position that meets the search
-			for (long i = 0; i < h.Length(); i++) {
-				Document &doc = h.doc(i);
-
-				// set a temporary verse key to this module position
-				vk = doc.get(_T("key"));
-
-				// check scope
-				// Try to set our scope key to this verse key
-				if (scope) {
-					*testKeyType = vk;
-
-					// check to see if it set ok and if so, add to our return list
-					if (*testKeyType == vk)
-						listkey << (const char *) vk;
-						listkey.GetElement()->userData = (void *)(int)(h.score(i)*100);
-				}
-				else {
-					listkey << (const char*) vk;
-					listkey.GetElement()->userData = (void *)(int)(h.score(i)*100);
-				}
-			}
-			(*percent)(98, percentUserData);
-
-			delete &h;
-			delete &q;
-
-			listkey = TOP;
-			(*percent)(100, percentUserData);
-			return listkey;
-		}
-
-		default:
-			break;
-		}
-	}
-
-	// check if we just want to see if search is supported
-	if (justCheckIfSupported) {
-		*justCheckIfSupported = false;
-		return listkey;
-	}
-#endif
-	// if we don't support this search, fall back to base class
-	return SWModule::search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData);
-}
-
-
-SWORD_NAMESPACE_END

Modified: trunk/sword.pc.in
===================================================================
--- trunk/sword.pc.in	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/sword.pc.in	2005-04-11 00:41:50 UTC (rev 1769)
@@ -4,9 +4,9 @@
 includedir=@includedir@
 
 
-Name: Sword
+Name: SWORD
 Description: Biblical Text Engine
 Version: @VERSION@
-Libs: -L${libdir} -lsword
+Libs: -L${libdir} -lsword @CURL_LIBS@ @LUCENE_LIBS@ @ICU_LIBS@ @ICU_IOLIBS@
 Cflags: -I${includedir}/sword
 

Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/tests/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,26 +1,12 @@
 AUTOMAKE_OPTIONS = 1.6
 INCLUDES = -I $(top_srcdir)/include
-#if BUILDSPLITLIB
-#LDADD = $(top_builddir)/lib/libsword_imp.la \
-#        $(top_builddir)/lib/libsword.la
-#else
 LDADD = $(top_builddir)/lib/libsword.la
-#endif
-if BUILDREFSYS
-refsysdir = refsys
-else
-refsysdir =
-endif
 
-SUBDIRS = $(refsysdir)
-
 noinst_PROGRAMS = ciphertest keytest mgrtest parsekey listtest casttest \
 modtest compnone complzss localetest introtest indextest configtest keycast \
 romantest testblocks filtertest rawldidxtest lextest swaptest \
 genbooktest treeidxtest swbuftest xmltest webiftest
 
-#outputcps
-
 if ICU
 ICUPROG = icutest translittest tlitmgrtest
 else
@@ -42,26 +28,12 @@
 ZLIBPROG =
 endif
 
-if BUILDNEWVKEY
-VKPROG = keytest2 refsystest
-else
-VKPROG =
-endif
+noinst_PROGRAMS += $(ZLIBPROG)
 
-noinst_PROGRAMS += $(ZLIBPROG) $(VKPROG)
-
 if ZLIB
 compzip_SOURCES = compzip.cpp
 endif
 
-if BUILDNEWVKEY
-keytest2_SOURCES = keytest2.cpp
-refsystest_SOURCES = refsystest.cpp
-#You have to make some parts of versekey.h public to 
-#get outputcps to work
-#outputcps_SOURCES = outputcps.cpp
-endif
-
 keytest_SOURCES = keytest.cpp
 mgrtest_SOURCES = mgrtest.cpp
 ciphertest_SOURCES = ciphertest.cpp

Deleted: trunk/tests/keytest2.cpp
===================================================================
--- trunk/tests/keytest2.cpp	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/tests/keytest2.cpp	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,213 +0,0 @@
-#include <stdio.h>
-#include <iostream>
-#include <versekey2.h>
-#include <stdlib.h>
-
-#include <localemgr.h>
-
-#ifndef NO_SWORD_NAMESPACE
-using namespace sword;
-#endif
-
-int main(int argc, char **argv)
-{
-	int loop;
-	int max;
-
-	if (argc > 1)
-		LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(argv[1]);
-
-	VerseKey2	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:15";
-	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";
-
-#if 0
-	//won't work with vk2 because there are 'books' that are headings
-	// Normalisation causes infinite loop at Matthew
-	bla.Headings(0);
-
-	for (bla = BOTTOM; !bla.Error(); bla.Book(bla.Book()-1))
-		std::cout << (const char *)bla << " " << (int)bla.Book() << std::endl;
-	
-	
-	//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";
-#endif
-
-	bla.Headings(1);
-	bla = TOP;
-	index = bla.Index()-1;
-	while (!bla.Error())
-	{
-		#if 1
-		if (bla.Index() != index+1)
-		{
-			std::cerr << "Index " <<bla.Index() << " was expected to be " << (index+1) << std::endl; 
-			break;
-		}
-		#endif
-		index = bla.Index();
-		std::cout << (const char *)bla << "(" << index << ")";
-		bla.Index(index+1);
-		std::cout << "-> " << (const char *)bla << "\n";
-	}
-
-	bla = BOTTOM;
-	index = bla.Index()+1;
-	while (!bla.Error())
-	{
-		#if 1
-		if (bla.Index() != index-1)
-		{
-			std::cerr << "Index " <<bla.Index() << " was expected to be " << (index-1) << std::endl; 
-			break;
-		}
-		#endif
-		index = bla.Index();
-		std::cout << (const char *)bla << "(" << index << ")";
-		bla.Index(index-1);
-		std::cout << "-> " << (const char *)bla << "\n";
-	}
-	return 0;
-}

Modified: trunk/usrinst.sh
===================================================================
--- trunk/usrinst.sh	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/usrinst.sh	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,14 +1,14 @@
 #!/bin/sh
 
 OPTIONS="--prefix=/usr $OPTIONS"
-#OPTIONS="--disable-shared $OPTIONS"
+OPTIONS="--disable-shared $OPTIONS"
 OPTIONS="--without-conf $OPTIONS"
 OPTIONS="--sysconfdir=/etc $OPTIONS"
-#OPTIONS="--with-icu $OPTIONS"
+OPTIONS="--with-icu $OPTIONS"
 #OPTIONS="--with-vcl $OPTIONS"
-#OPTIONS="--enable-debug $OPTIONS"
+OPTIONS="--enable-debug $OPTIONS"
 #OPTIONS="--enable-profile $OPTIONS"
-#OPTIONS="--with-lucene $OPTIONS"
+OPTIONS="--with-lucene $OPTIONS"
 #OPTIONS="--without-curl $OPTIONS"
 #OPTIONS="--enable-tests $OPTIONS"
 #OPTIONS="--disable-utilities $OPTIONS"

Modified: trunk/utilities/Makefile.am
===================================================================
--- trunk/utilities/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/utilities/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -1,12 +1,7 @@
 AUTOMAKE_OPTIONS = 1.6
 SUBDIRS = diatheke
 INCLUDES = -I $(top_srcdir)/include
-#if BUILDSPLITLIB
-#LDADD = $(top_builddir)/lib/libsword_imp.la \
-#        $(top_builddir)/lib/libsword.la
-#else
 LDADD = $(top_builddir)/lib/libsword.la
-#endif
 noinst_PROGRAMS = cipherraw lexdump \
 stepdump step2vpl gbfidx modwrite addvs emptyvss \
 addgb imp2gbs mod2imp xml2gbs
@@ -28,11 +23,7 @@
 #endif
 
 if ZLIB
-if BUILDNEWVKEY
-ZLIBPROG = mod2zmod addld imp2ld mod2zmod2 vpl2zmod2
-else
 ZLIBPROG = mod2zmod addld imp2ld
-endif
 else
 ZLIBPROG =
 endif
@@ -71,10 +62,6 @@
 #installmgr_LDADD = -lcurl $(CURL_LIBS) $(LDADD)
 
 if ZLIB
-if BUILDNEWVKEY
-mod2zmod2_SOURCES = mod2zmod2.cpp
-vpl2zmod2_SOURCES = vpl2zmod2.cpp
-endif
 mod2zmod_SOURCES = mod2zmod.cpp
 addld_SOURCES = addld.cpp
 imp2ld_SOURCES = imp2ld.cpp

Modified: trunk/utilities/diatheke/Makefile.am
===================================================================
--- trunk/utilities/diatheke/Makefile.am	2005-04-11 00:05:22 UTC (rev 1768)
+++ trunk/utilities/diatheke/Makefile.am	2005-04-11 00:41:50 UTC (rev 1769)
@@ -15,16 +15,9 @@
 lucenelibs = -lclucene
 endif
 
-#if BUILDSPLITLIB
-#diatheke_LDADD = $(top_builddir)/lib/libsword_imp.la \
-#        $(top_builddir)/lib/libsword.la \
-#	$(iculibs) $(lucenelibs)
-#else
 diatheke_LDADD = $(top_builddir)/lib/libsword.la \
 	$(iculibs) $(lucenelibs)
-#endif
 
-
 noinst_HEADERS = corediatheke.h diafiltmgr.h diathekemgr.h gbfcgi.h thmlcgi.h \
 	osiscgi.h
 



More information about the sword-cvs mailing list