summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2014-05-11 22:09:52 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2014-05-11 22:09:52 +0100
commit3525014850e3800ac7b28fd34e7f7af427f1c620 (patch)
tree3d1b8a17b86cfa9af178ceb818a4dc9daf52a46b /examples
sword (1.7.2+dfsg-2) unstable; urgency=medium
* Correct shared library symlink. (Closes: #747420) # imported from the archive
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile.am3
-rw-r--r--examples/Makefile.in649
-rw-r--r--examples/classes/Makefile10
-rw-r--r--examples/classes/README4
-rw-r--r--examples/classes/ciphercng.cpp69
-rw-r--r--examples/classes/lastVerseInChapter.cpp56
-rw-r--r--examples/classes/showchapter.cpp57
-rw-r--r--examples/classes/swmgrex.cpp78
-rw-r--r--examples/classes/verseposition.cpp51
-rw-r--r--examples/classes/verseranges.cpp127
-rw-r--r--examples/cmdline/CMakeLists.txt34
-rw-r--r--examples/cmdline/Makefile.am17
-rw-r--r--examples/cmdline/Makefile.in686
-rw-r--r--examples/cmdline/bcppmake/cmdline.bpg81
-rw-r--r--examples/cmdline/bcppmake/listoptions.bpf11
-rw-r--r--examples/cmdline/bcppmake/listoptions.bpr96
-rw-r--r--examples/cmdline/bcppmake/lookup.bpf11
-rw-r--r--examples/cmdline/bcppmake/lookup.bpr96
-rw-r--r--examples/cmdline/bcppmake/outplain.bpf11
-rw-r--r--examples/cmdline/bcppmake/outplain.bpr96
-rw-r--r--examples/cmdline/bcppmake/outrender.bpf11
-rw-r--r--examples/cmdline/bcppmake/outrender.bpr96
-rw-r--r--examples/cmdline/bcppmake/search.bpf11
-rw-r--r--examples/cmdline/bcppmake/search.bpr96
-rw-r--r--examples/cmdline/bcppmake/threaded_search.bpf11
-rw-r--r--examples/cmdline/bcppmake/threaded_search.bpr96
-rw-r--r--examples/cmdline/bcppmake/verserangeparse.bpf11
-rw-r--r--examples/cmdline/bcppmake/verserangeparse.bpr96
-rw-r--r--examples/cmdline/listoptions.cpp52
-rw-r--r--examples/cmdline/lookup.cpp118
-rw-r--r--examples/cmdline/outplain.cpp73
-rw-r--r--examples/cmdline/outrender.cpp66
-rw-r--r--examples/cmdline/search.cpp130
-rwxr-xr-xexamples/cmdline/threaded_search.cpp156
-rw-r--r--examples/cmdline/verserangeparse.cpp74
-rw-r--r--examples/simple.cpp54
36 files changed, 3394 insertions, 0 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 0000000..3160def
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,3 @@
+AUTOMAKE_OPTIONS = 1.6
+
+SUBDIRS = cmdline
diff --git a/examples/Makefile.in b/examples/Makefile.in
new file mode 100644
index 0000000..31f1f33
--- /dev/null
+++ b/examples/Makefile.in
@@ -0,0 +1,649 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = examples
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \
+ $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CLUCENE2_CFLAGS = @CLUCENE2_CFLAGS@
+CLUCENE2_LIBS = @CLUCENE2_LIBS@
+CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@
+CLUCENE_LIBS = @CLUCENE_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
+CPPUNIT_CONFIG = @CPPUNIT_CONFIG@
+CPPUNIT_LIBS = @CPPUNIT_LIBS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_IOLIBS = @ICU_IOLIBS@
+ICU_LIBS = @ICU_LIBS@
+ICU_VER = @ICU_VER@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWORD_VERSION_MAJOR = @SWORD_VERSION_MAJOR@
+SWORD_VERSION_MICRO = @SWORD_VERSION_MICRO@
+SWORD_VERSION_MINOR = @SWORD_VERSION_MINOR@
+SWORD_VERSION_NANO = @SWORD_VERSION_NANO@
+SWORD_VERSION_NUM = @SWORD_VERSION_NUM@
+SWORD_VERSION_STR = @SWORD_VERSION_STR@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+dir_confdef = @dir_confdef@
+docdir = @docdir@
+dvidir = @dvidir@
+enable_debug = @enable_debug@
+enable_profile = @enable_profile@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_mingw32 = @target_mingw32@
+target_os = @target_os@
+target_system = @target_system@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_conf = @with_conf@
+with_icu = @with_icu@
+with_icusword = @with_icusword@
+with_zlib = @with_zlib@
+AUTOMAKE_OPTIONS = 1.6
+SUBDIRS = cmdline
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/examples/classes/Makefile b/examples/classes/Makefile
new file mode 100644
index 0000000..aca68d0
--- /dev/null
+++ b/examples/classes/Makefile
@@ -0,0 +1,10 @@
+TARGETS= ciphercng swmgrex verseranges lastVerseInChapter verseposition showchapter
+all: $(TARGETS)
+
+clean:
+ rm $(TARGETS)
+
+.cpp:
+ g++ -O0 -g -Wall -Werror `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword`
+
+
diff --git a/examples/classes/README b/examples/classes/README
new file mode 100644
index 0000000..53a65b7
--- /dev/null
+++ b/examples/classes/README
@@ -0,0 +1,4 @@
+These examples use a standard Makefile which exemplifies how you can compile
+your own code against the SWORD engine.
+This does, however, require SWORD to be installed before a 'make' in this
+folder will be successful.
diff --git a/examples/classes/ciphercng.cpp b/examples/classes/ciphercng.cpp
new file mode 100644
index 0000000..f1ce5e8
--- /dev/null
+++ b/examples/classes/ciphercng.cpp
@@ -0,0 +1,69 @@
+/******************************************************************************
+ *
+ * ciphercng.cpp - This example demonstrates how to change the cipher key
+ * of a module. The change is only in effect for this
+ * run. This DOES NOT change the cipherkey in the
+ * module's .conf file.
+ *
+ * $Id: ciphercng.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2000-2013 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.
+ *
+ */
+
+#include <stdio.h>
+#include <iostream>
+
+#include <swmgr.h>
+#include <swmodule.h>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <modName>\n", *argv);
+ exit(-1);
+ }
+
+ SWMgr manager; // create a default manager that looks in the current directory for mods.conf
+ ModMap::iterator it;
+ it = manager.Modules.find(argv[1]);
+
+ if (it == manager.Modules.end()) {
+ fprintf(stderr, "%s: couldn't find module: %s\n", *argv, argv[1]);
+ exit(-1);
+ }
+
+ SWModule *module = (*it).second;
+ string key;
+
+ cout << "\nPress [CTRL-C] to end\n\n";
+ while (true) {
+ cout << "\nModule text:\n";
+ module->setKey("1jn 1:9");
+ cout << "[ " << module->getKeyText() << " ]\n";
+ cout << module->renderText();
+ cout << "\n\nEnter new cipher key: ";
+ cin >> key;
+ cout << "\nSetting key to: " << key;
+ manager.setCipherKey(argv[1], key.c_str());
+ }
+
+ return 0;
+}
diff --git a/examples/classes/lastVerseInChapter.cpp b/examples/classes/lastVerseInChapter.cpp
new file mode 100644
index 0000000..aac905c
--- /dev/null
+++ b/examples/classes/lastVerseInChapter.cpp
@@ -0,0 +1,56 @@
+/******************************************************************************
+ *
+ * lastVerseInChapter.cpp - This example demonstrates how to navigate
+ * verses using VerseKey. It uselessly iterates
+ * every chapter of the KJV, finds the last verse
+ * and prints out the sole verse in the KJV which
+ * ends in a ',' -- just for fun.
+ *
+ * $Id: lastVerseInChapter.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2011-2013 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.
+ *
+ */
+
+#include <swmgr.h>
+#include <swmodule.h>
+#include <versekey.h>
+#include <iostream>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ SWMgr library;
+
+ SWModule *book = library.getModule("KJV");
+
+ VerseKey *vk = (VerseKey *) book->getKey();
+ for (;!vk->popError();vk->setChapter(vk->getChapter()+1)) {
+ vk->setVerse(vk->getVerseMax());
+ SWBuf text = book->stripText();
+ text = text.trim();
+ if (text.endsWith(",")) {
+ cout << vk->getText() << ":\n\n";
+ cout << text << endl;
+ }
+ }
+
+ return 0;
+}
+
diff --git a/examples/classes/showchapter.cpp b/examples/classes/showchapter.cpp
new file mode 100644
index 0000000..f170b51
--- /dev/null
+++ b/examples/classes/showchapter.cpp
@@ -0,0 +1,57 @@
+/******************************************************************************
+ *
+ * showchapter.cpp -
+ *
+ * $Id: showchapter.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2013 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.
+ *
+ */
+
+#include <swmgr.h>
+#include <swmodule.h>
+#include <versekey.h>
+#include <iostream>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ SWMgr library;
+ SWModule *kjv = library.getModule("KJV");
+
+ kjv->setKey(argc > 1 ? argv[1] : "Jn.3.16");
+
+ VerseKey *key = (VerseKey *)kjv->getKey();
+
+ int curVerse = key->getVerse();
+ int curChapter = key->getChapter();
+ int curBook = key->getBook();
+
+ for (key->setVerse(1);
+ (key->getBook() == curBook) &&
+ (key->getChapter() == curChapter) &&
+ !kjv->popError();
+ (*kjv)++) {
+ if (key->getVerse() == curVerse) cout << "* ";
+ cout << key->getVerse() << " " << kjv->stripText() << "\n";
+ }
+
+ return 0;
+}
+
diff --git a/examples/classes/swmgrex.cpp b/examples/classes/swmgrex.cpp
new file mode 100644
index 0000000..7fc9f73
--- /dev/null
+++ b/examples/classes/swmgrex.cpp
@@ -0,0 +1,78 @@
+/******************************************************************************
+ *
+ * swmgrex.cpp - Class SWMgr manages installed modules for a frontend.
+ * The developer may use this class to query what modules
+ * are installed and to retrieve an (SWModule *) for any
+ * one of these modules
+ *
+ * SWMgr makes its modules available as an STL Map.
+ * The Map definition is typedef'ed as ModMap
+ * ModMap consists of: FIRST : SWBuf moduleName
+ * SECOND: SWModule *module
+ *
+ * $Id: swmgrex.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 1998-2013 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.
+ *
+ */
+
+#include <iostream>
+
+#include <swmgr.h>
+#include <swmodule.h>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ SWMgr manager; // create a default manager that looks in the current directory for mods.conf
+
+ cout << "\nInstalled Modules:\n\n";
+
+ ModMap::iterator modIterator;
+
+// Loop thru all installed modules and print out information
+
+ for (modIterator = manager.Modules.begin(); modIterator != manager.Modules.end(); modIterator++) {
+ SWBuf modName = (*modIterator).first; // mod.conf section name (stored in module->Name())
+ SWModule *module = (*modIterator).second;
+
+ cout << modName << "(" << module->getName() << ") | " << module->getType() << "\n";
+ }
+
+// Print out a verse from the first module:
+
+ cout << "\n" << manager.Modules.begin()->second->getKeyText() << ":\n";
+ cout << manager.Modules.begin()->second->renderText();
+ cout << " (" << manager.Modules.begin()->second->getName() << ")\n";
+
+// Print out the same verse from the second module (less confusing):
+
+ modIterator = manager.Modules.begin(); // get first module
+ modIterator++; // increment to next module
+
+ SWModule *mod = modIterator->second;
+
+ cout << "\n" << mod->getKeyText() << ":\n";
+// cout << (const char *)(*mod); // we could do this, the same as above
+ mod->display(); // instead of casting mod to const char * to get its contents, we'll call the default display method that writes to stdout;
+ cout << " (" << mod->getName() << ")\n\n";
+
+ return 0;
+
+}
diff --git a/examples/classes/verseposition.cpp b/examples/classes/verseposition.cpp
new file mode 100644
index 0000000..8e63cb5
--- /dev/null
+++ b/examples/classes/verseposition.cpp
@@ -0,0 +1,51 @@
+/******************************************************************************
+ *
+ * verseposition.cpp -
+ *
+ * $Id: verseposition.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2012-2013 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.
+ *
+ */
+
+#include <iostream>
+#include <swmgr.h>
+#include <swmodule.h>
+#include <versekey.h>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ const char *modName = "HunKar";
+ SWMgr library;
+ SWModule *book = library.getModule(modName);
+ if (!book) {
+ cerr << "Can't find module: " << modName << endl;
+ return -1;
+ }
+ VerseKey* key = ((VerseKey *)book->getKey());
+
+ key->setIntros(true);
+ book->setSkipConsecutiveLinks(true);
+ book->setPosition(TOP);
+
+ cout << *key << endl;
+
+ return 0;
+}
diff --git a/examples/classes/verseranges.cpp b/examples/classes/verseranges.cpp
new file mode 100644
index 0000000..557855a
--- /dev/null
+++ b/examples/classes/verseranges.cpp
@@ -0,0 +1,127 @@
+/******************************************************************************
+ *
+ * verseranges.cpp - This example demonstrates how to work with contiguous
+ * verse ranges using VerseKey
+ *
+ * $Id: verseranges.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2011-2013 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.
+ *
+ */
+
+#include <iostream>
+
+#include <swmgr.h>
+#include <swmodule.h>
+#include <versekey.h>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ cout << "\n";
+
+ const char *modName = "KJVA";
+ SWMgr manager;
+ SWModule *bible = manager.getModule(modName);
+ if (!bible) {
+ cout << modName << " not installed for example. Please install.\n\n";
+ exit(-1);
+ }
+
+ VerseKey *vk = (VerseKey *)bible->createKey();
+
+ // let's set verse ranges for a variety of different contiguous regions
+
+ // set a verse range for the whole Bible
+ vk->setLowerBound(*vk); // vk initially points to TOP, so we don't need to set position first
+ vk->setPosition(BOTTOM);
+ vk->setUpperBound(*vk);
+ cout << vk->getRangeText() << "\n";
+
+
+ vk->clearBounds();
+
+
+ // Old Testament
+ vk->setPosition(TOP);
+ vk->setLowerBound(*vk);
+
+ vk->setTestament(2);
+ (*vk)--;
+
+ vk->setUpperBound(*vk);
+ cout << vk->getRangeText() << "\n";
+
+
+ vk->clearBounds();
+
+
+ // New Testament
+ vk->setPosition(TOP);
+ vk->setTestament(2);
+ vk->setLowerBound(*vk);
+ vk->setPosition(BOTTOM);
+ vk->setUpperBound(*vk);
+ cout << vk->getRangeText() << "\n";
+
+
+ vk->clearBounds();
+
+
+ // Current Book
+ vk->setText("John 3:16");
+ vk->setChapter(1); vk->setVerse(1);
+ vk->setLowerBound(*vk);
+ vk->setChapter(vk->getChapterMax()); vk->setVerse(vk->getVerseMax());
+ vk->setUpperBound(*vk);
+ cout << vk->getRangeText() << "\n";
+
+
+ // -------------------------
+ // Shorter syntax using the parser and based on book names, and requires intimate knowledge of VersificationMgr
+ // You're probably better off using the above code, but this is here for completeness
+ //
+ const VersificationMgr::System *refSys = VersificationMgr::getSystemVersificationMgr()->getVersificationSystem(vk->getVersificationSystem());
+
+
+ // whole Bible
+ VerseKey vkBible(refSys->getBook(0)->getOSISName(), refSys->getBook(refSys->getBookCount()-1)->getOSISName(), refSys->getName());
+ cout << vkBible.getRangeText() << "\n";
+
+ // OT
+ VerseKey vkOT(refSys->getBook(0)->getOSISName(), refSys->getBook(refSys->getBMAX()[0]-1)->getOSISName(), refSys->getName());
+ cout << vkOT.getRangeText() << "\n";
+
+ // NT
+ VerseKey vkNT(refSys->getBook(refSys->getBMAX()[0])->getOSISName(), refSys->getBook(refSys->getBookCount()-1)->getOSISName(), refSys->getName());
+ cout << vkNT.getRangeText() << "\n";
+
+ // Current Book
+ vk->setText("John 3:16");
+ VerseKey vkCurrentBook(vk->getBookName(), vk->getBookName(), refSys->getName());
+ cout << vkCurrentBook.getRangeText() << "\n";
+
+
+ delete vk;
+
+ cout << endl;
+
+ return 0;
+}
+
diff --git a/examples/cmdline/CMakeLists.txt b/examples/cmdline/CMakeLists.txt
new file mode 100644
index 0000000..bfbb995
--- /dev/null
+++ b/examples/cmdline/CMakeLists.txt
@@ -0,0 +1,34 @@
+##################################################################################
+# These are some examples. If you want examples to be built, you need to define
+# SWORD_BUILD_EXAMPLES="Yes". These will not be installed, so don't worry about
+# that.
+#
+MESSAGE(STATUS "\n-- CONFIGURING LIBRARY EXAMPLES")
+SET(example_PROGRAMS
+ listoptions
+ lookup
+ outplain
+ outrender
+ search
+ verserangeparse
+)
+
+FOREACH(DEMO ${example_PROGRAMS})
+ ADD_EXECUTABLE("${DEMO}" "${DEMO}.cpp")
+ TARGET_LINK_LIBRARIES("${DEMO}" sword)
+ENDFOREACH(DEMO ${example_PROGRAMS})
+
+##################################################################################
+# This example uses pthreads explicity. I don't know if it supports anything else,
+# but until I find out, I will force it to find PTHREADS only
+#
+
+FIND_PACKAGE(Threads)
+
+IF(CMAKE_USE_PTHREADS_INIT OR CMAKE_HP_PTHREADS_INIT)
+ ADD_EXECUTABLE(threaded_search threaded_search.cpp)
+ TARGET_LINK_LIBRARIES(threaded_search
+ sword
+ ${CMAKE_THREAD_LIBS_INIT}
+ )
+ENDIF(CMAKE_USE_PTHREADS_INIT OR CMAKE_HP_PTHREADS_INIT)
diff --git a/examples/cmdline/Makefile.am b/examples/cmdline/Makefile.am
new file mode 100644
index 0000000..1b14b67
--- /dev/null
+++ b/examples/cmdline/Makefile.am
@@ -0,0 +1,17 @@
+AUTOMAKE_OPTIONS = 1.6
+AM_CPPFLAGS = -I $(top_srcdir)/include
+if USE_INTERNAL_REGEX
+AM_CPPFLAGS += -I$(top_srcdir)/include/internal/regex
+endif
+LDADD = $(top_builddir)/lib/libsword.la
+
+noinst_PROGRAMS = lookup search threaded_search listoptions verserangeparse outplain outrender
+
+lookup_SOURCES = lookup.cpp
+search_SOURCES = search.cpp
+listoptions_SOURCES = listoptions.cpp
+verserangeparse_SOURCES = verserangeparse.cpp
+threaded_search_SOURCES = threaded_search.cpp
+outplain_SOURCES = outplain.cpp
+outrender_SOURCES = outrender.cpp
+threaded_search_LDADD = $(LDADD) -lpthread
diff --git a/examples/cmdline/Makefile.in b/examples/cmdline/Makefile.in
new file mode 100644
index 0000000..a3cb2f4
--- /dev/null
+++ b/examples/cmdline/Makefile.in
@@ -0,0 +1,686 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+@USE_INTERNAL_REGEX_TRUE@am__append_1 = -I$(top_srcdir)/include/internal/regex
+noinst_PROGRAMS = lookup$(EXEEXT) search$(EXEEXT) \
+ threaded_search$(EXEEXT) listoptions$(EXEEXT) \
+ verserangeparse$(EXEEXT) outplain$(EXEEXT) outrender$(EXEEXT)
+subdir = examples/cmdline
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \
+ $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_listoptions_OBJECTS = listoptions.$(OBJEXT)
+listoptions_OBJECTS = $(am_listoptions_OBJECTS)
+listoptions_LDADD = $(LDADD)
+listoptions_DEPENDENCIES = $(top_builddir)/lib/libsword.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_lookup_OBJECTS = lookup.$(OBJEXT)
+lookup_OBJECTS = $(am_lookup_OBJECTS)
+lookup_LDADD = $(LDADD)
+lookup_DEPENDENCIES = $(top_builddir)/lib/libsword.la
+am_outplain_OBJECTS = outplain.$(OBJEXT)
+outplain_OBJECTS = $(am_outplain_OBJECTS)
+outplain_LDADD = $(LDADD)
+outplain_DEPENDENCIES = $(top_builddir)/lib/libsword.la
+am_outrender_OBJECTS = outrender.$(OBJEXT)
+outrender_OBJECTS = $(am_outrender_OBJECTS)
+outrender_LDADD = $(LDADD)
+outrender_DEPENDENCIES = $(top_builddir)/lib/libsword.la
+am_search_OBJECTS = search.$(OBJEXT)
+search_OBJECTS = $(am_search_OBJECTS)
+search_LDADD = $(LDADD)
+search_DEPENDENCIES = $(top_builddir)/lib/libsword.la
+am_threaded_search_OBJECTS = threaded_search.$(OBJEXT)
+threaded_search_OBJECTS = $(am_threaded_search_OBJECTS)
+threaded_search_DEPENDENCIES = $(LDADD)
+am_verserangeparse_OBJECTS = verserangeparse.$(OBJEXT)
+verserangeparse_OBJECTS = $(am_verserangeparse_OBJECTS)
+verserangeparse_LDADD = $(LDADD)
+verserangeparse_DEPENDENCIES = $(top_builddir)/lib/libsword.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(listoptions_SOURCES) $(lookup_SOURCES) $(outplain_SOURCES) \
+ $(outrender_SOURCES) $(search_SOURCES) \
+ $(threaded_search_SOURCES) $(verserangeparse_SOURCES)
+DIST_SOURCES = $(listoptions_SOURCES) $(lookup_SOURCES) \
+ $(outplain_SOURCES) $(outrender_SOURCES) $(search_SOURCES) \
+ $(threaded_search_SOURCES) $(verserangeparse_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CLUCENE2_CFLAGS = @CLUCENE2_CFLAGS@
+CLUCENE2_LIBS = @CLUCENE2_LIBS@
+CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@
+CLUCENE_LIBS = @CLUCENE_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
+CPPUNIT_CONFIG = @CPPUNIT_CONFIG@
+CPPUNIT_LIBS = @CPPUNIT_LIBS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_IOLIBS = @ICU_IOLIBS@
+ICU_LIBS = @ICU_LIBS@
+ICU_VER = @ICU_VER@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWORD_VERSION_MAJOR = @SWORD_VERSION_MAJOR@
+SWORD_VERSION_MICRO = @SWORD_VERSION_MICRO@
+SWORD_VERSION_MINOR = @SWORD_VERSION_MINOR@
+SWORD_VERSION_NANO = @SWORD_VERSION_NANO@
+SWORD_VERSION_NUM = @SWORD_VERSION_NUM@
+SWORD_VERSION_STR = @SWORD_VERSION_STR@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+dir_confdef = @dir_confdef@
+docdir = @docdir@
+dvidir = @dvidir@
+enable_debug = @enable_debug@
+enable_profile = @enable_profile@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_mingw32 = @target_mingw32@
+target_os = @target_os@
+target_system = @target_system@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_conf = @with_conf@
+with_icu = @with_icu@
+with_icusword = @with_icusword@
+with_zlib = @with_zlib@
+AUTOMAKE_OPTIONS = 1.6
+AM_CPPFLAGS = -I $(top_srcdir)/include $(am__append_1)
+LDADD = $(top_builddir)/lib/libsword.la
+lookup_SOURCES = lookup.cpp
+search_SOURCES = search.cpp
+listoptions_SOURCES = listoptions.cpp
+verserangeparse_SOURCES = verserangeparse.cpp
+threaded_search_SOURCES = threaded_search.cpp
+outplain_SOURCES = outplain.cpp
+outrender_SOURCES = outrender.cpp
+threaded_search_LDADD = $(LDADD) -lpthread
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/cmdline/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign examples/cmdline/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+listoptions$(EXEEXT): $(listoptions_OBJECTS) $(listoptions_DEPENDENCIES) $(EXTRA_listoptions_DEPENDENCIES)
+ @rm -f listoptions$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(listoptions_OBJECTS) $(listoptions_LDADD) $(LIBS)
+
+lookup$(EXEEXT): $(lookup_OBJECTS) $(lookup_DEPENDENCIES) $(EXTRA_lookup_DEPENDENCIES)
+ @rm -f lookup$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(lookup_OBJECTS) $(lookup_LDADD) $(LIBS)
+
+outplain$(EXEEXT): $(outplain_OBJECTS) $(outplain_DEPENDENCIES) $(EXTRA_outplain_DEPENDENCIES)
+ @rm -f outplain$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(outplain_OBJECTS) $(outplain_LDADD) $(LIBS)
+
+outrender$(EXEEXT): $(outrender_OBJECTS) $(outrender_DEPENDENCIES) $(EXTRA_outrender_DEPENDENCIES)
+ @rm -f outrender$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(outrender_OBJECTS) $(outrender_LDADD) $(LIBS)
+
+search$(EXEEXT): $(search_OBJECTS) $(search_DEPENDENCIES) $(EXTRA_search_DEPENDENCIES)
+ @rm -f search$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(search_OBJECTS) $(search_LDADD) $(LIBS)
+
+threaded_search$(EXEEXT): $(threaded_search_OBJECTS) $(threaded_search_DEPENDENCIES) $(EXTRA_threaded_search_DEPENDENCIES)
+ @rm -f threaded_search$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(threaded_search_OBJECTS) $(threaded_search_LDADD) $(LIBS)
+
+verserangeparse$(EXEEXT): $(verserangeparse_OBJECTS) $(verserangeparse_DEPENDENCIES) $(EXTRA_verserangeparse_DEPENDENCIES)
+ @rm -f verserangeparse$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(verserangeparse_OBJECTS) $(verserangeparse_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listoptions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/outplain.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/outrender.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threaded_search.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verserangeparse.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/examples/cmdline/bcppmake/cmdline.bpg b/examples/cmdline/bcppmake/cmdline.bpg
new file mode 100644
index 0000000..943790e
--- /dev/null
+++ b/examples/cmdline/bcppmake/cmdline.bpg
@@ -0,0 +1,81 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = icuuc.lib icuin.lib libcurl.lib clucene.lib libsword.lib \
+ listoptions.exe lookup.exe outplain.exe outrender.exe search.exe \
+ verserangeparse.exe threaded_search.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+libsword.lib: ..\..\..\lib\bcppmake\libsword.bpr
+ $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+icuuc.lib: ..\..\..\..\icu-sword\as_is\borland\icuuc.bpr
+ $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+icuin.lib: ..\..\..\..\icu-sword\as_is\borland\icuin.bpr
+ $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+xml2gbs.exe: xml2gbs.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+osis2mod.exe: osis2mod.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+tei2mod.exe: tei2mod.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+installmgr.exe: installmgr.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+clucene.lib: ..\..\..\..\biblecs\clucene\clucene.bpr
+ $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+libcurl.lib: ..\..\..\..\biblecs\apps\InstallMgr\libcurl.bpr
+ $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+verserangeparse.exe: verserangeparse.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+threaded_search.exe: threaded_search.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+search.exe: search.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+outrender.exe: outrender.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+outplain.exe: outplain.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+lookup.exe: lookup.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+listoptions.exe: listoptions.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
diff --git a/examples/cmdline/bcppmake/listoptions.bpf b/examples/cmdline/bcppmake/listoptions.bpf
new file mode 100644
index 0000000..9e2ee47
--- /dev/null
+++ b/examples/cmdline/bcppmake/listoptions.bpf
@@ -0,0 +1,11 @@
+USEUNIT("..\listoptions.cpp");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuin.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuuc.lib");
+USELIB("..\..\..\lib\libsword.lib");
+USELIB("..\..\..\..\biblecs\clucene\clucene.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+main \ No newline at end of file
diff --git a/examples/cmdline/bcppmake/listoptions.bpr b/examples/cmdline/bcppmake/listoptions.bpr
new file mode 100644
index 0000000..753553e
--- /dev/null
+++ b/examples/cmdline/bcppmake/listoptions.bpr
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="listoptions.exe"/>
+ <OBJFILES value="..\listoptions.obj"/>
+ <RESFILES value=""/>
+ <IDLFILES value=""/>
+ <IDLGENFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\..\..\icu-sword\as_is\borland\icuin.lib
+ ..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\icu-sword\as_is\borland\icuuc.lib ..\..\..\lib\libsword.lib
+ ..\..\..\..\biblecs\clucene\clucene.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="listoptions.bpf"/>
+ <INCLUDEPATH value="..\;..\..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\icu-sword\source\common;..\..\..\..\icu-sword\source\i18n"/>
+ <LIBPATH value="..\;..\..\..\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <IDLCFLAGS value="-I..\. -I.. -I..\..\..\..\include -I$(BCB)\include -I$(BCB)\include\vcl
+ -I..\..\..\..\icu-sword\source\common -I..\..\..\..\icu-sword\source\i18n
+ -src_suffix cpp -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0
+ -DUSELUCENE -D_CL_DISABLE_MULTITHREADING -boa"/>
+ <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -6 -b- -k- -vi -tWC -tWM -c"/>
+ <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zn"/>
+ <LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=./nasb nasb.xml
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT>
diff --git a/examples/cmdline/bcppmake/lookup.bpf b/examples/cmdline/bcppmake/lookup.bpf
new file mode 100644
index 0000000..d7722c5
--- /dev/null
+++ b/examples/cmdline/bcppmake/lookup.bpf
@@ -0,0 +1,11 @@
+USEUNIT("..\lookup.cpp");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuin.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuuc.lib");
+USELIB("..\..\..\lib\libsword.lib");
+USELIB("..\..\..\..\biblecs\clucene\clucene.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+main \ No newline at end of file
diff --git a/examples/cmdline/bcppmake/lookup.bpr b/examples/cmdline/bcppmake/lookup.bpr
new file mode 100644
index 0000000..4b642c3
--- /dev/null
+++ b/examples/cmdline/bcppmake/lookup.bpr
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="lookup.exe"/>
+ <OBJFILES value="..\lookup.obj"/>
+ <RESFILES value=""/>
+ <IDLFILES value=""/>
+ <IDLGENFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\..\..\icu-sword\as_is\borland\icuin.lib
+ ..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\icu-sword\as_is\borland\icuuc.lib ..\..\..\lib\libsword.lib
+ ..\..\..\..\biblecs\clucene\clucene.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="lookup.bpf"/>
+ <INCLUDEPATH value="..\;..\..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\icu-sword\source\common;..\..\..\..\icu-sword\source\i18n"/>
+ <LIBPATH value="..\;..\..\..\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <IDLCFLAGS value="-I..\. -I.. -I..\..\..\..\include -I$(BCB)\include -I$(BCB)\include\vcl
+ -I..\..\..\..\icu-sword\source\common -I..\..\..\..\icu-sword\source\i18n
+ -src_suffix cpp -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0
+ -DUSELUCENE -D_CL_DISABLE_MULTITHREADING -boa"/>
+ <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -6 -b- -k- -vi -tWC -tWM -c"/>
+ <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zn"/>
+ <LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=./nasb nasb.xml
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT>
diff --git a/examples/cmdline/bcppmake/outplain.bpf b/examples/cmdline/bcppmake/outplain.bpf
new file mode 100644
index 0000000..edce864
--- /dev/null
+++ b/examples/cmdline/bcppmake/outplain.bpf
@@ -0,0 +1,11 @@
+USEUNIT("..\outplain.cpp");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuin.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuuc.lib");
+USELIB("..\..\..\lib\libsword.lib");
+USELIB("..\..\..\..\biblecs\clucene\clucene.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+main \ No newline at end of file
diff --git a/examples/cmdline/bcppmake/outplain.bpr b/examples/cmdline/bcppmake/outplain.bpr
new file mode 100644
index 0000000..089d890
--- /dev/null
+++ b/examples/cmdline/bcppmake/outplain.bpr
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="outplain.exe"/>
+ <OBJFILES value="..\outplain.obj"/>
+ <RESFILES value=""/>
+ <IDLFILES value=""/>
+ <IDLGENFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\..\..\icu-sword\as_is\borland\icuin.lib
+ ..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\icu-sword\as_is\borland\icuuc.lib ..\..\..\lib\libsword.lib
+ ..\..\..\..\biblecs\clucene\clucene.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="outplain.bpf"/>
+ <INCLUDEPATH value="..\;..\..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\icu-sword\source\common;..\..\..\..\icu-sword\source\i18n"/>
+ <LIBPATH value="..\;..\..\..\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <IDLCFLAGS value="-I..\. -I.. -I..\..\..\..\include -I$(BCB)\include -I$(BCB)\include\vcl
+ -I..\..\..\..\icu-sword\source\common -I..\..\..\..\icu-sword\source\i18n
+ -src_suffix cpp -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0
+ -DUSELUCENE -D_CL_DISABLE_MULTITHREADING -boa"/>
+ <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -6 -b- -k- -vi -tWC -tWM -c"/>
+ <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zn"/>
+ <LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=./nasb nasb.xml
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT>
diff --git a/examples/cmdline/bcppmake/outrender.bpf b/examples/cmdline/bcppmake/outrender.bpf
new file mode 100644
index 0000000..0ca9e33
--- /dev/null
+++ b/examples/cmdline/bcppmake/outrender.bpf
@@ -0,0 +1,11 @@
+USEUNIT("..\outrender.cpp");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuin.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuuc.lib");
+USELIB("..\..\..\lib\libsword.lib");
+USELIB("..\..\..\..\biblecs\clucene\clucene.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+main \ No newline at end of file
diff --git a/examples/cmdline/bcppmake/outrender.bpr b/examples/cmdline/bcppmake/outrender.bpr
new file mode 100644
index 0000000..6c2438a
--- /dev/null
+++ b/examples/cmdline/bcppmake/outrender.bpr
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="outrender.exe"/>
+ <OBJFILES value="..\outrender.obj"/>
+ <RESFILES value=""/>
+ <IDLFILES value=""/>
+ <IDLGENFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\..\..\icu-sword\as_is\borland\icuin.lib
+ ..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\icu-sword\as_is\borland\icuuc.lib ..\..\..\lib\libsword.lib
+ ..\..\..\..\biblecs\clucene\clucene.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="outrender.bpf"/>
+ <INCLUDEPATH value="..\;..\..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\icu-sword\source\common;..\..\..\..\icu-sword\source\i18n"/>
+ <LIBPATH value="..\;..\..\..\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <IDLCFLAGS value="-I..\. -I.. -I..\..\..\..\include -I$(BCB)\include -I$(BCB)\include\vcl
+ -I..\..\..\..\icu-sword\source\common -I..\..\..\..\icu-sword\source\i18n
+ -src_suffix cpp -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0
+ -DUSELUCENE -D_CL_DISABLE_MULTITHREADING -boa"/>
+ <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -6 -b- -k- -vi -tWC -tWM -c"/>
+ <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zn"/>
+ <LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=./nasb nasb.xml
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT>
diff --git a/examples/cmdline/bcppmake/search.bpf b/examples/cmdline/bcppmake/search.bpf
new file mode 100644
index 0000000..438ee60
--- /dev/null
+++ b/examples/cmdline/bcppmake/search.bpf
@@ -0,0 +1,11 @@
+USEUNIT("..\search.cpp");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuin.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuuc.lib");
+USELIB("..\..\..\lib\libsword.lib");
+USELIB("..\..\..\..\biblecs\clucene\clucene.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+main
diff --git a/examples/cmdline/bcppmake/search.bpr b/examples/cmdline/bcppmake/search.bpr
new file mode 100644
index 0000000..23a79ca
--- /dev/null
+++ b/examples/cmdline/bcppmake/search.bpr
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="search.exe"/>
+ <OBJFILES value="..\search.obj"/>
+ <RESFILES value=""/>
+ <IDLFILES value=""/>
+ <IDLGENFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\..\..\icu-sword\as_is\borland\icuin.lib
+ ..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\icu-sword\as_is\borland\icuuc.lib ..\..\..\lib\libsword.lib
+ ..\..\..\..\biblecs\clucene\clucene.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="search.bpf"/>
+ <INCLUDEPATH value="..\;..\..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\icu-sword\source\common;..\..\..\..\icu-sword\source\i18n"/>
+ <LIBPATH value="..\;..\..\..\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <IDLCFLAGS value="-I..\. -I.. -I..\..\..\..\include -I$(BCB)\include -I$(BCB)\include\vcl
+ -I..\..\..\..\icu-sword\source\common -I..\..\..\..\icu-sword\source\i18n
+ -src_suffix cpp -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0
+ -DUSELUCENE -D_CL_DISABLE_MULTITHREADING -boa"/>
+ <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -6 -b- -k- -vi -tWC -tWM -c"/>
+ <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zn"/>
+ <LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=./nasb nasb.xml
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT>
diff --git a/examples/cmdline/bcppmake/threaded_search.bpf b/examples/cmdline/bcppmake/threaded_search.bpf
new file mode 100644
index 0000000..f69800a
--- /dev/null
+++ b/examples/cmdline/bcppmake/threaded_search.bpf
@@ -0,0 +1,11 @@
+USEUNIT("..\threaded_search.cpp");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuin.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuuc.lib");
+USELIB("..\..\..\lib\libsword.lib");
+USELIB("..\..\..\..\biblecs\clucene\clucene.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+main \ No newline at end of file
diff --git a/examples/cmdline/bcppmake/threaded_search.bpr b/examples/cmdline/bcppmake/threaded_search.bpr
new file mode 100644
index 0000000..a666afa
--- /dev/null
+++ b/examples/cmdline/bcppmake/threaded_search.bpr
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="threaded_search.exe"/>
+ <OBJFILES value="..\threaded_search.obj"/>
+ <RESFILES value=""/>
+ <IDLFILES value=""/>
+ <IDLGENFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\..\..\icu-sword\as_is\borland\icuin.lib
+ ..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\icu-sword\as_is\borland\icuuc.lib ..\..\..\lib\libsword.lib
+ ..\..\..\..\biblecs\clucene\clucene.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="threaded_search.bpf"/>
+ <INCLUDEPATH value="..\;..\..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\icu-sword\source\common;..\..\..\..\icu-sword\source\i18n"/>
+ <LIBPATH value="..\;..\..\..\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <IDLCFLAGS value="-I..\. -I.. -I..\..\..\..\include -I$(BCB)\include -I$(BCB)\include\vcl
+ -I..\..\..\..\icu-sword\source\common -I..\..\..\..\icu-sword\source\i18n
+ -src_suffix cpp -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0
+ -DUSELUCENE -D_CL_DISABLE_MULTITHREADING -boa"/>
+ <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -6 -b- -k- -vi -tWC -tWM -c"/>
+ <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zn"/>
+ <LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=./nasb nasb.xml
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT>
diff --git a/examples/cmdline/bcppmake/verserangeparse.bpf b/examples/cmdline/bcppmake/verserangeparse.bpf
new file mode 100644
index 0000000..6e2bc5a
--- /dev/null
+++ b/examples/cmdline/bcppmake/verserangeparse.bpf
@@ -0,0 +1,11 @@
+USEUNIT("..\verserangeparse.cpp");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuin.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\icu-sword\as_is\borland\icuuc.lib");
+USELIB("..\..\..\lib\libsword.lib");
+USELIB("..\..\..\..\biblecs\clucene\clucene.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+main \ No newline at end of file
diff --git a/examples/cmdline/bcppmake/verserangeparse.bpr b/examples/cmdline/bcppmake/verserangeparse.bpr
new file mode 100644
index 0000000..89de5ae
--- /dev/null
+++ b/examples/cmdline/bcppmake/verserangeparse.bpr
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="verserangeparse.exe"/>
+ <OBJFILES value="..\verserangeparse.obj"/>
+ <RESFILES value=""/>
+ <IDLFILES value=""/>
+ <IDLGENFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\..\..\icu-sword\as_is\borland\icuin.lib
+ ..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\icu-sword\as_is\borland\icuuc.lib ..\..\..\lib\libsword.lib
+ ..\..\..\..\biblecs\clucene\clucene.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi
+ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi
+ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="verserangeparse.bpf"/>
+ <INCLUDEPATH value="..\;..\..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\icu-sword\source\common;..\..\..\..\icu-sword\source\i18n"/>
+ <LIBPATH value="..\;..\..\..\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <IDLCFLAGS value="-I..\. -I.. -I..\..\..\..\include -I$(BCB)\include -I$(BCB)\include\vcl
+ -I..\..\..\..\icu-sword\source\common -I..\..\..\..\icu-sword\source\i18n
+ -src_suffix cpp -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0
+ -DUSELUCENE -D_CL_DISABLE_MULTITHREADING -boa"/>
+ <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -6 -b- -k- -vi -tWC -tWM -c"/>
+ <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zn"/>
+ <LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0x32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=./nasb nasb.xml
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT>
diff --git a/examples/cmdline/listoptions.cpp b/examples/cmdline/listoptions.cpp
new file mode 100644
index 0000000..c5525e9
--- /dev/null
+++ b/examples/cmdline/listoptions.cpp
@@ -0,0 +1,52 @@
+/******************************************************************************
+ *
+ * listoptions.cpp - Simple example to show how to see which 'options' are
+ * available from the installed set of modules and their
+ * possible settings.
+ * Options in SWORD refer to things like "Strong's
+ * Numbers", "Morphology", etc.
+ *
+ * $Id: listoptions.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2006-2013 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.
+ *
+ */
+
+#include <iostream>
+#include <swmgr.h>
+
+
+using sword::SWMgr;
+using sword::StringList;
+using std::cout;
+
+
+int main(int argc, char **argv)
+{
+ SWMgr library;
+
+ StringList options = library.getGlobalOptions();
+ for (StringList::const_iterator it = options.begin(); it != options.end(); ++it) {
+ cout << *it << " (" << library.getGlobalOptionTip(*it) << ")\n";
+ StringList optionValues = library.getGlobalOptionValues(*it);
+ for (StringList::const_iterator it2 = optionValues.begin(); it2 != optionValues.end(); ++it2) {
+ cout << "\t" << *it2 << "\n";
+ }
+ }
+
+ return 0;
+
+}
+
diff --git a/examples/cmdline/lookup.cpp b/examples/cmdline/lookup.cpp
new file mode 100644
index 0000000..505b5e1
--- /dev/null
+++ b/examples/cmdline/lookup.cpp
@@ -0,0 +1,118 @@
+/******************************************************************************
+ *
+ * lookup.cpp - Simple example of how to retrieve an entry from a
+ * SWORD module
+ *
+ * $Id: lookup.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 1997-2013 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.
+ *
+ */
+
+#include <stdio.h>
+#include <iostream>
+#include <stdlib.h>
+#include <swmgr.h>
+#include <swmodule.h>
+#include <swfilter.h>
+#include <markupfiltmgr.h>
+#include <versekey.h>
+
+
+using sword::SWMgr;
+using sword::MarkupFilterMgr;
+using sword::SWModule;
+using sword::FMT_WEBIF;
+using sword::FMT_HTMLHREF;
+using sword::FMT_RTF;
+using sword::ModMap;
+using sword::AttributeTypeList;
+using sword::AttributeList;
+using sword::AttributeValue;
+using sword::VerseKey;
+using sword::FilterList;
+
+
+int main(int argc, char **argv)
+{
+
+ SWMgr manager(new MarkupFilterMgr(FMT_WEBIF));
+// SWMgr manager(new MarkupFilterMgr(FMT_HTMLHREF));
+ SWModule *target;
+
+ if (argc != 3) {
+ fprintf(stderr, "\nusage: %s <modname> <\"lookup key\">\n"
+ "\tExample: lookup KJV \"James 1:19\"\n\n", argv[0]);
+
+ exit(-1);
+ }
+
+ target = manager.getModule(argv[1]);
+ if (!target) {
+ fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]);
+ ModMap::iterator it;
+ for (it = manager.Modules.begin(); it != manager.Modules.end(); ++it) {
+ fprintf(stderr, "[%s]\t - %s\n", (*it).second->getName(), (*it).second->getDescription());
+ }
+ exit(-1);
+ }
+
+ // turn all filters to default values
+ manager.setGlobalOption("Headings", "On");
+ manager.setGlobalOption("Strong's Numbers", "On");
+ manager.setGlobalOption("Lemmas", "Off");
+// manager.setGlobalOption("Greek Accents", "Off");
+
+ VerseKey *vk = dynamic_cast<VerseKey *>(target->getKey());
+
+ if (vk) {
+ // vk->AutoNormalize(false);
+ vk->setIntros(true);
+ vk->setText(argv[2]);
+ }
+ else {
+ target->setKey(argv[2]);
+ }
+
+ target->renderText(); // force an entry lookup to resolve key to something in the index
+
+ std::cout << "==Raw=Entry===============\n";
+ std::cout << target->getKeyText() << ":\n";
+ std::cout << target->getRawEntry();
+ std::cout << "\n";
+ std::cout << "==Render=Entry============\n";
+ std::cout << target->getRenderHeader();
+ std::cout << "\n";
+ std::cout << target->renderText();
+ std::cout << "\n";
+ std::cout << "==========================\n";
+ std::cout << "Entry Attributes:\n\n";
+ AttributeTypeList::iterator i1;
+ AttributeList::iterator i2;
+ AttributeValue::iterator i3;
+ for (i1 = target->getEntryAttributes().begin(); i1 != target->getEntryAttributes().end(); ++i1) {
+ std::cout << "[ " << i1->first << " ]\n";
+ for (i2 = i1->second.begin(); i2 != i1->second.end(); ++i2) {
+ std::cout << "\t[ " << i2->first << " ]\n";
+ for (i3 = i2->second.begin(); i3 != i2->second.end(); ++i3) {
+ std::cout << "\t\t" << i3->first << " = " << i3->second << "\n";
+ }
+ }
+ }
+ std::cout << std::endl;
+
+ return 0;
+}
+
diff --git a/examples/cmdline/outplain.cpp b/examples/cmdline/outplain.cpp
new file mode 100644
index 0000000..5245fda
--- /dev/null
+++ b/examples/cmdline/outplain.cpp
@@ -0,0 +1,73 @@
+/******************************************************************************
+ *
+ * outplain.cpp - This example shows how to output the plain text
+ * entries from a SWORD module. This small program
+ * outputs a SWORD module in 'imp' format, e.g.:
+ *
+ * $$$Gen.1.1
+ * In the beginning God created
+ * the heavens and the earth
+ *
+ * $$$Gen.1.2
+ * ...
+ *
+ * Class SWMgr manages installed modules for a frontend.
+ * The developer may use this class to query what modules are installed
+ * and to retrieve an (SWModule *) for any one of these modules
+ *
+ * SWMgr makes its modules available as an STL Map.
+ * The Map definition is typedef'ed as ModMap
+ * ModMap consists of: FIRST : SWBuf moduleName
+ * SECOND: SWModule *module
+ *
+ * $Id: outplain.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2008-2013 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.
+ *
+ */
+
+#include <iostream>
+
+#include <swmgr.h>
+#include <swmodule.h>
+#include <versekey.h>
+#include <markupfiltmgr.h>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ SWMgr manager(new MarkupFilterMgr(sword::FMT_HTMLHREF, sword::ENC_UTF16));
+
+ const char *bookName = (argc > 1) ? argv[1] : "WLC";
+ SWModule *b = manager.getModule(bookName);
+ if (!b) return -1;
+ SWModule &book = *b;
+ book.setProcessEntryAttributes(false);
+ VerseKey *vk = SWDYNAMIC_CAST(VerseKey, book.getKey());
+ for (book = TOP; !book.popError() && !book.getRawEntryBuf().size(); book++);
+ if (!book.getRawEntryBuf().size()) return -2; // empty module
+ for (;!book.popError(); book++) {
+ cout << "$$$";
+ if (vk) cout << vk->getOSISRef();
+ else cout << book.getKeyText();
+ cout << "\n" << book.stripText() << "\n\n";
+ }
+
+ return 0;
+}
diff --git a/examples/cmdline/outrender.cpp b/examples/cmdline/outrender.cpp
new file mode 100644
index 0000000..192b29d
--- /dev/null
+++ b/examples/cmdline/outrender.cpp
@@ -0,0 +1,66 @@
+/******************************************************************************
+ *
+ * outrender.cpp - This example show how to choose an output render
+ * markup and render entries from a SWORD module. The
+ * following snippet outputs a module in HTML output
+ * encoded as UTF8.
+ *
+ * $Id: outrender.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2009-2013 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.
+ *
+ */
+
+#include <iostream>
+
+#include <swmgr.h>
+#include <swmodule.h>
+#include <versekey.h>
+#include <markupfiltmgr.h>
+
+
+using namespace sword;
+using namespace std;
+
+
+int main(int argc, char **argv) {
+
+ SWMgr manager(new MarkupFilterMgr(sword::FMT_HTMLHREF, sword::ENC_UTF16));
+
+ const char *bookName = (argc > 1) ? argv[1] : "WLC";
+
+ SWModule *b = manager.getModule(bookName);
+ if (!b) return -1;
+
+ SWModule &book = *b;
+ book.setProcessEntryAttributes(false);
+ VerseKey *vk = SWDYNAMIC_CAST(VerseKey, book.getKey());
+
+ // find the first non-zero entry
+ for (book = TOP; !book.popError() && !book.getRawEntryBuf().size(); book++);
+ if (!book.getRawEntryBuf().size()) return -2; // empty module
+
+ for (;!book.popError(); book++) {
+
+ cout << "$$$";
+ if (vk) cout << vk->getOSISRef();
+ else cout << book.getKeyText();
+
+ cout << "\n" << book.renderText() << "\n\n";
+ }
+
+ return 0;
+}
+
diff --git a/examples/cmdline/search.cpp b/examples/cmdline/search.cpp
new file mode 100644
index 0000000..f437430
--- /dev/null
+++ b/examples/cmdline/search.cpp
@@ -0,0 +1,130 @@
+/******************************************************************************
+ *
+ * search.cpp - This simple example shows how to perform a search on a
+ * SWORD module. It amounts to a simple commandline
+ * search tool with a usage like:
+ *
+ * search KJV "swift hear slow speak"
+ *
+ * $Id: search.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 1997-2013 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.
+ *
+ */
+
+#include <stdio.h>
+#include <rawtext.h>
+#include <swmgr.h>
+#include <versekey.h>
+#include <markupfiltmgr.h>
+#include <regex.h> // GNU
+#include <iostream>
+
+#ifndef NO_SWORD_NAMESPACE
+using namespace sword;
+#endif
+
+/*
+ * >=0 - regex
+ * -1 - phrase
+ * -2 - multiword
+ * -3 - entryAttrib (eg. Word//Lemma/G1234/)
+ * -4 - Lucene
+ */
+
+char SEARCH_TYPE=-2;
+
+char printed = 0;
+void percentUpdate(char percent, void *userData) {
+ char maxHashes = *((char *)userData);
+
+ while ((((float)percent)/100) * maxHashes > printed) {
+ std::cerr << "=";
+ printed++;
+ std::cerr.flush();
+ }
+/*
+ std::cout << (int)percent << "% ";
+*/
+ std::cout.flush();
+}
+
+
+int main(int argc, char **argv)
+{
+// SWMgr manager(0, 0, true, new MarkupFilterMgr(FMT_RTF, ENC_RTF));
+ SWMgr manager;
+ SWModule *target;
+ ListKey listkey;
+ ListKey scope;
+ ModMap::iterator it;
+
+ if ((argc < 3) || (argc > 5)) {
+ fprintf(stderr, "\nusage: %s <modname> <\"search string\"> [\"search_scope\"] [\"search again for string in previous result set\"]\n"
+ "\tExample: search KJV \"swift hear slow speak\"\n\n", argv[0]);
+
+ exit(-1);
+ }
+
+
+ SWBuf searchTerm = argv[2];
+ manager.setGlobalOption("Greek Accents", "Off");
+ manager.setGlobalOption("Strong's Numbers", "On");
+ manager.setGlobalOption("Hebrew Vowel Points", "Off");
+ manager.filterText("Greek Accents", searchTerm);
+
+ it = manager.Modules.find(argv[1]);
+ if (it == manager.Modules.end()) {
+ fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]);
+ for (it = manager.Modules.begin(); it != manager.Modules.end(); ++it) {
+ fprintf(stderr, "[%s]\t - %s\n", (*it).second->getName(), (*it).second->getDescription());
+ }
+ exit(-1);
+ }
+
+ target = (*it).second;
+
+ if (argc > 3) { // if min / max specified
+ SWKey *k = target->getKey();
+ VerseKey *parser = SWDYNAMIC_CAST(VerseKey, k);
+ VerseKey kjvParser;
+ if (!parser) parser = &kjvParser; // use standard KJV parsing as fallback
+ scope = parser->parseVerseList(argv[3], *parser, true);
+ scope.setPersist(true);
+ target->setKey(scope);
+ }
+
+ std::cerr << "[0=================================50===============================100]\n ";
+ char lineLen = 70;
+ listkey = target->search(searchTerm.c_str(), SEARCH_TYPE, /*SEARCHFLAG_MATCHWHOLEENTRY*/ REG_ICASE, 0, 0, &percentUpdate, &lineLen);
+ std::cerr << std::endl;
+ if (argc > 4) { // if min / max specified
+ scope = listkey;
+ scope.setPersist(true);
+ target->setKey(scope);
+ printed = 0;
+ std::cerr << " ";
+ listkey = target->search(argv[4], SEARCH_TYPE, /*SEARCHFLAG_MATCHWHOLEENTRY*/ REG_ICASE, 0, 0, &percentUpdate, &lineLen);
+ std::cerr << std::endl;
+ }
+ listkey.sort();
+ while (!listkey.popError()) {
+ std::cout << (const char *)listkey << std::endl;
+ listkey++;
+ }
+
+ return 0;
+
+}
diff --git a/examples/cmdline/threaded_search.cpp b/examples/cmdline/threaded_search.cpp
new file mode 100755
index 0000000..a3710a9
--- /dev/null
+++ b/examples/cmdline/threaded_search.cpp
@@ -0,0 +1,156 @@
+/******************************************************************************
+ *
+ * threaded_search.cpp - This example shows how to do a thread search
+ *
+ * $Id: threaded_search.cpp 2923 2013-07-28 20:05:37Z scribe $
+ *
+ * Copyright 2000-2013 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.
+ *
+ */
+
+#include <stdio.h>
+#include <rawtext.h>
+#include <swmgr.h>
+#include <regex.h> // GNU
+#include <listkey.h>
+#include <versekey.h>
+#include <iostream>
+
+#include <pthread.h>
+
+#ifndef NO_SWORD_NAMESPACE
+using sword::SWMgr;
+using sword::ListKey;
+using sword::SWModule;
+using sword::VerseKey;
+using sword::SWKey;
+using sword::ModMap;
+#endif
+
+int cms_currentProgress;
+
+class SearchThread {
+public:
+ SearchThread();
+ ~SearchThread();
+
+ char* searchedText;
+ SWModule* module;
+ ListKey searchResult;
+ bool isSearching;
+
+ void startThread();
+ void search();
+};
+
+void* dummy(void* p) {
+ SearchThread* searchThread = (SearchThread*)p;
+ searchThread->search();
+
+ return NULL;
+}
+
+void percentUpdate(char percent, void* userData) {
+ cms_currentProgress = (int)percent;
+ std::cout << cms_currentProgress << "% ";
+}
+
+SearchThread::SearchThread() {
+ isSearching = false;
+ module = 0;
+ searchedText = 0;
+ cms_currentProgress = -1;
+}
+
+SearchThread::~SearchThread() {
+}
+
+void SearchThread::startThread() {
+ std::cout << "startThread" << std::endl;
+ std::cout.flush();
+
+ pthread_attr_t* attr = new pthread_attr_t;
+ pthread_attr_init(attr);
+ pthread_attr_setdetachstate(attr, PTHREAD_CREATE_DETACHED);
+
+ pthread_t *thread= new pthread_t;
+ isSearching = true;
+ int i = pthread_create(thread, attr, &dummy, this);
+
+ std::cout << "Created the thread: " << i << std::endl;
+ std::cout.flush();
+}
+
+void SearchThread::search() {
+
+ if (!module) {
+ std::cout << "Return." << std::endl;
+ return;
+ }
+
+ ListKey scopeList = VerseKey().parseVerseList("Luke;John;Revelation","", true);
+ for (int i=0; i < scopeList.getCount(); ++i) {
+ std::cout << (const char*)*scopeList.getElement(i) << std::endl;
+ }
+ SWKey* scope = &scopeList;
+
+ searchResult = module->search(searchedText, -2, REG_ICASE, scope, 0, &percentUpdate);
+
+ if (!scope)
+ std::cout << "bad scope!" << std::endl;
+ isSearching = false;
+}
+
+int main(int argc, char **argv) {
+ SWMgr manager;
+ ModMap::iterator it;
+
+ SearchThread* searchThread = new SearchThread();
+
+ if (argc != 3) {
+ fprintf(stderr, "usage: %s <modname> <searched text>\n", argv[0]);
+ exit(-1);
+ }
+
+ it = manager.Modules.find(argv[1]);
+ if (it == manager.Modules.end()) {
+ fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]);
+ for (it = manager.Modules.begin(); it != manager.Modules.end(); ++it) {
+ fprintf(stderr, "[%s]\t - %s\n", (*it).second->getName(), (*it).second->getDescription());
+ }
+ exit(-1);
+ }
+
+ searchThread->searchedText = argv[2];
+ searchThread->module = (*it).second;
+ searchThread->startThread();
+
+ std::cout << "Start loop" << std::endl;
+ std::cout.flush();
+ while (true) {
+ if (!searchThread->isSearching)
+ break;
+ else
+ std::cout.flush();
+ };
+
+ std::cout << std::endl << "Number of found items: " << searchThread->searchResult.getCount() << std::endl;
+ std::cout << "Finished program" << std::endl;
+ std::cout.flush();
+
+ delete searchThread;
+ exit(0);
+}
+
diff --git a/examples/cmdline/verserangeparse.cpp b/examples/cmdline/verserangeparse.cpp
new file mode 100644
index 0000000..d5fd18b
--- /dev/null
+++ b/examples/cmdline/verserangeparse.cpp
@@ -0,0 +1,74 @@
+/******************************************************************************
+ *
+ * verserangeparse.cpp - This example shows
+ * how to parse a verse reference
+ *
+ * $Id: verserangeparse.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2006-2013 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.
+ *
+ */
+
+#include <iostream>
+#include <swmgr.h>
+#include <versekey.h>
+#include <listkey.h>
+#include <swmodule.h>
+#include <markupfiltmgr.h>
+
+using sword::SWMgr;
+using sword::VerseKey;
+using sword::ListKey;
+using sword::SWModule;
+using sword::SW_POSITION;
+using sword::FMT_PLAIN;
+using sword::MarkupFilterMgr;
+using std::cout;
+using std::endl;
+
+int main(int argc, char **argv)
+{
+ const char *range = (argc > 1) ? argv[1] : "Mat 2:10,12-15";
+
+ VerseKey parser;
+ ListKey result;
+
+ result = parser.parseVerseList(range, parser, true);
+
+ // let's iterate the key and display
+ for (result = TOP; !result.popError(); result++) {
+ cout << result << "\n";
+ }
+ cout << endl;
+
+ // Now let's output a module with the entries from the result
+
+ // we'll initialize our library of books
+ SWMgr library(new MarkupFilterMgr(FMT_PLAIN)); // render plain without fancy markup
+
+ // Let's get a book;
+ SWModule *book = library.getModule("KJV");
+
+ // couldn't find our test module
+ if (!book) return -1;
+
+ // now let's iterate the book and display
+ for (result = TOP; !result.popError(); result++) {
+ book->setKey(result);
+ cout << "*** " << book->getKeyText() << ": " << book->renderText() << "\n";
+ }
+
+ return 0;
+}
diff --git a/examples/simple.cpp b/examples/simple.cpp
new file mode 100644
index 0000000..c46346b
--- /dev/null
+++ b/examples/simple.cpp
@@ -0,0 +1,54 @@
+/******************************************************************************
+ *
+ * simple.cpp - This is about the simplest useful example of using the
+ * SWORD engine.
+ *
+ * After sword is installed, it should compile with something similar to:
+ *
+ * g++ -o simple simple.cpp `pkg-config --cflags --libs sword`
+ *
+ * If you'd like to choose the type of tag markup which sword will output
+ * for you, include:
+ *
+ * #include <markupfiltmgr.h>
+ *
+ * and change your instantiation of SWMgr, below, to (e.g., for HTML):
+ *
+ * SWMgr library(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF));
+ *
+ * $Id: simple.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2006-2013 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.
+ *
+ */
+
+#include <swmgr.h>
+#include <swmodule.h>
+#include <iostream>
+
+
+using namespace sword;
+using std::cout;
+
+
+int main(int argc, char **argv) {
+ SWMgr library;
+ SWModule *darby = library.getModule("Darby");
+ darby->setKey("James 1:19");
+ cout << darby->RenderText();
+
+ return 0;
+}
+