summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:52 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:52 -0400
commit148bd343f3e7e32d141f66b5b5c9b98b2975b0b3 (patch)
tree31078963b85110d57310759016e60e8d26ccb1e6 /examples
parent8c8aa6b07e595cfac56838b5964ab3e96051f1b2 (diff)
Imported Upstream version 1.5.8
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile.am3
-rw-r--r--examples/Makefile.in478
-rw-r--r--examples/classes/Makefile7
-rw-r--r--examples/classes/ciphercng.cpp43
-rw-r--r--examples/classes/swmgrex.cpp52
-rw-r--r--examples/cmdline/Makefile.am10
-rw-r--r--examples/cmdline/Makefile.in488
-rw-r--r--examples/cmdline/lookup.cpp62
-rw-r--r--examples/cmdline/search.cpp69
-rwxr-xr-xexamples/cmdline/threaded_search.cpp134
10 files changed, 0 insertions, 1346 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644
index 3160def..0000000
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-AUTOMAKE_OPTIONS = 1.6
-
-SUBDIRS = cmdline
diff --git a/examples/Makefile.in b/examples/Makefile.in
deleted file mode 100644
index e7d9726..0000000
--- a/examples/Makefile.in
+++ /dev/null
@@ -1,478 +0,0 @@
-# Makefile.in generated by automake 1.7.4 from Makefile.am.
-# @configure_input@
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# 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@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-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 = :
-host_triplet = @host@
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILDEXAMPLES_FALSE = @BUILDEXAMPLES_FALSE@
-BUILDEXAMPLES_TRUE = @BUILDEXAMPLES_TRUE@
-BUILDTESTS_FALSE = @BUILDTESTS_FALSE@
-BUILDTESTS_TRUE = @BUILDTESTS_TRUE@
-BUILDUTILS_FALSE = @BUILDUTILS_FALSE@
-BUILDUTILS_TRUE = @BUILDUTILS_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFDEF_FALSE = @CONFDEF_FALSE@
-CONFDEF_TRUE = @CONFDEF_TRUE@
-CPPFLAGS = @CPPFLAGS@
-CURL_CFLAGS = @CURL_CFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
-CURL_LIBS = @CURL_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GENCCODE = @GENCCODE@
-GENCMN = @GENCMN@
-GENRB = @GENRB@
-ICUSWORD_FALSE = @ICUSWORD_FALSE@
-ICUSWORD_TRUE = @ICUSWORD_TRUE@
-ICU_CONFIG = @ICU_CONFIG@
-ICU_FALSE = @ICU_FALSE@
-ICU_IOLIBS = @ICU_IOLIBS@
-ICU_LIBS = @ICU_LIBS@
-ICU_TRUE = @ICU_TRUE@
-ICU_VER = @ICU_VER@
-INSTALLMGR_FALSE = @INSTALLMGR_FALSE@
-INSTALLMGR_TRUE = @INSTALLMGR_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTCONF_FALSE = @INSTCONF_FALSE@
-INSTCONF_TRUE = @INSTCONF_TRUE@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LUCENE_LIBS = @LUCENE_LIBS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MINGW_FALSE = @MINGW_FALSE@
-MINGW_TRUE = @MINGW_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKGDATA = @PKGDATA@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-USELUCENE_FALSE = @USELUCENE_FALSE@
-USELUCENE_TRUE = @USELUCENE_TRUE@
-USE_PKGCONF_FALSE = @USE_PKGCONF_FALSE@
-USE_PKGCONF_TRUE = @USE_PKGCONF_TRUE@
-VERSION = @VERSION@
-ZLIB_FALSE = @ZLIB_FALSE@
-ZLIB_TRUE = @ZLIB_TRUE@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-dir_confdef = @dir_confdef@
-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@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-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@
-with_conf = @with_conf@
-with_icu = @with_icu@
-with_zlib = @with_zlib@
-AUTOMAKE_OPTIONS = 1.6
-
-SUBDIRS = cmdline
-subdir = examples
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
- ps-recursive install-info-recursive uninstall-info-recursive \
- all-recursive install-data-recursive install-exec-recursive \
- installdirs-recursive install-recursive uninstall-recursive \
- check-recursive installcheck-recursive
-DIST_COMMON = Makefile.am Makefile.in
-DIST_SUBDIRS = $(SUBDIRS)
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign examples/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-# 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.
-$(RECURSIVE_TARGETS):
- @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; 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; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if (etags --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- else \
- include_option=--include; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" \
- distdir=../$(distdir)/$$subdir \
- 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:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-
-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: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
- clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am \
- dvi-recursive info info-am info-recursive install install-am \
- install-data install-data-am install-data-recursive \
- install-exec install-exec-am install-exec-recursive \
- install-info install-info-am install-info-recursive install-man \
- install-recursive install-strip installcheck installcheck-am \
- installdirs installdirs-am installdirs-recursive \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
- pdf-recursive ps ps-am ps-recursive tags tags-recursive \
- uninstall uninstall-am uninstall-info-am \
- uninstall-info-recursive uninstall-recursive
-
-# 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
deleted file mode 100644
index 6b7a96c..0000000
--- a/examples/classes/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-root := ../..
-subdirs :=
-pre-targets :=
-bin := yes
-targets := swmgrex ciphercng
-include ${root}/Makefile.cfg
-
diff --git a/examples/classes/ciphercng.cpp b/examples/classes/ciphercng.cpp
deleted file mode 100644
index 591cd2d..0000000
--- a/examples/classes/ciphercng.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/******************************************************************************
- *
- * 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.
- *
- */
-
-#include <swmgr.h>
-
-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->KeyText() << " ]\n";
- cout << (const char *)*module;
- cout << "\n\nEnter new cipher key: ";
- cin >> key;
- cout << "\nSetting key to: " << key;
- manager.setCipherKey(argv[1], (unsigned char *)key.c_str());
- }
-
-
-}
diff --git a/examples/classes/swmgrex.cpp b/examples/classes/swmgrex.cpp
deleted file mode 100644
index 5cb10ba..0000000
--- a/examples/classes/swmgrex.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/******************************************************************************
- * Class SWMgr manages installed modules for a frontend.
- * SWMgr reads a mods.conf file to discover its information.
- * It then instantiates the correct decendent of SWModule for each
- * module entry in mods.conf
- * 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 : string moduleName
- * SECOND: SWModule *module
- *
- */
-
-#include <swmgr.h>
-
-main() {
- 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++) {
- string modName = (*modIterator).first; // mod.conf section name (stored in module->Name())
- SWModule *module = (*modIterator).second;
-
- cout << modName << "(" << module->Name() << ") | " << module->Type() << "\n";
- }
-
-// Print out a verse from the first module:
-
- cout << "\n" << manager.Modules.begin()->second->KeyText() << ":\n";
- cout << (const char *)(*manager.Modules.begin()->second);
- cout << " (" << manager.Modules.begin()->second->Name() << ")\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->KeyText() << ":\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->Name() << ")\n\n";
-
-}
diff --git a/examples/cmdline/Makefile.am b/examples/cmdline/Makefile.am
deleted file mode 100644
index dcf4e48..0000000
--- a/examples/cmdline/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-AUTOMAKE_OPTIONS = 1.6
-INCLUDES = -I $(top_srcdir)/include
-LDADD = $(top_builddir)/lib/libsword.la
-
-noinst_PROGRAMS = lookup search threaded_search
-
-lookup_SOURCES = lookup.cpp
-search_SOURCES = search.cpp
-threaded_search_SOURCES = threaded_search.cpp
-threaded_search_LDADD = $(LDADD) -lpthread
diff --git a/examples/cmdline/Makefile.in b/examples/cmdline/Makefile.in
deleted file mode 100644
index bfef0b6..0000000
--- a/examples/cmdline/Makefile.in
+++ /dev/null
@@ -1,488 +0,0 @@
-# Makefile.in generated by automake 1.7.4 from Makefile.am.
-# @configure_input@
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# 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@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-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 = :
-host_triplet = @host@
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILDEXAMPLES_FALSE = @BUILDEXAMPLES_FALSE@
-BUILDEXAMPLES_TRUE = @BUILDEXAMPLES_TRUE@
-BUILDTESTS_FALSE = @BUILDTESTS_FALSE@
-BUILDTESTS_TRUE = @BUILDTESTS_TRUE@
-BUILDUTILS_FALSE = @BUILDUTILS_FALSE@
-BUILDUTILS_TRUE = @BUILDUTILS_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFDEF_FALSE = @CONFDEF_FALSE@
-CONFDEF_TRUE = @CONFDEF_TRUE@
-CPPFLAGS = @CPPFLAGS@
-CURL_CFLAGS = @CURL_CFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
-CURL_LIBS = @CURL_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GENCCODE = @GENCCODE@
-GENCMN = @GENCMN@
-GENRB = @GENRB@
-ICUSWORD_FALSE = @ICUSWORD_FALSE@
-ICUSWORD_TRUE = @ICUSWORD_TRUE@
-ICU_CONFIG = @ICU_CONFIG@
-ICU_FALSE = @ICU_FALSE@
-ICU_IOLIBS = @ICU_IOLIBS@
-ICU_LIBS = @ICU_LIBS@
-ICU_TRUE = @ICU_TRUE@
-ICU_VER = @ICU_VER@
-INSTALLMGR_FALSE = @INSTALLMGR_FALSE@
-INSTALLMGR_TRUE = @INSTALLMGR_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTCONF_FALSE = @INSTCONF_FALSE@
-INSTCONF_TRUE = @INSTCONF_TRUE@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LUCENE_LIBS = @LUCENE_LIBS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MINGW_FALSE = @MINGW_FALSE@
-MINGW_TRUE = @MINGW_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKGDATA = @PKGDATA@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-USELUCENE_FALSE = @USELUCENE_FALSE@
-USELUCENE_TRUE = @USELUCENE_TRUE@
-USE_PKGCONF_FALSE = @USE_PKGCONF_FALSE@
-USE_PKGCONF_TRUE = @USE_PKGCONF_TRUE@
-VERSION = @VERSION@
-ZLIB_FALSE = @ZLIB_FALSE@
-ZLIB_TRUE = @ZLIB_TRUE@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-dir_confdef = @dir_confdef@
-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@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-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@
-with_conf = @with_conf@
-with_icu = @with_icu@
-with_zlib = @with_zlib@
-AUTOMAKE_OPTIONS = 1.6
-INCLUDES = -I $(top_srcdir)/include
-LDADD = $(top_builddir)/lib/libsword.la
-
-noinst_PROGRAMS = lookup search threaded_search
-
-lookup_SOURCES = lookup.cpp
-search_SOURCES = search.cpp
-threaded_search_SOURCES = threaded_search.cpp
-threaded_search_LDADD = $(LDADD) -lpthread
-subdir = examples/cmdline
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-noinst_PROGRAMS = lookup$(EXEEXT) search$(EXEEXT) \
- threaded_search$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
-
-am_lookup_OBJECTS = lookup.$(OBJEXT)
-lookup_OBJECTS = $(am_lookup_OBJECTS)
-lookup_LDADD = $(LDADD)
-lookup_DEPENDENCIES = $(top_builddir)/lib/libsword.la
-lookup_LDFLAGS =
-am_search_OBJECTS = search.$(OBJEXT)
-search_OBJECTS = $(am_search_OBJECTS)
-search_LDADD = $(LDADD)
-search_DEPENDENCIES = $(top_builddir)/lib/libsword.la
-search_LDFLAGS =
-am_threaded_search_OBJECTS = threaded_search.$(OBJEXT)
-threaded_search_OBJECTS = $(am_threaded_search_OBJECTS)
-threaded_search_DEPENDENCIES = $(top_builddir)/lib/libsword.la
-threaded_search_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/lookup.Po ./$(DEPDIR)/search.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/threaded_search.Po
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(lookup_SOURCES) $(search_SOURCES) \
- $(threaded_search_SOURCES)
-DIST_COMMON = Makefile.am Makefile.in
-SOURCES = $(lookup_SOURCES) $(search_SOURCES) $(threaded_search_SOURCES)
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign examples/cmdline/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-lookup$(EXEEXT): $(lookup_OBJECTS) $(lookup_DEPENDENCIES)
- @rm -f lookup$(EXEEXT)
- $(CXXLINK) $(lookup_LDFLAGS) $(lookup_OBJECTS) $(lookup_LDADD) $(LIBS)
-search$(EXEEXT): $(search_OBJECTS) $(search_DEPENDENCIES)
- @rm -f search$(EXEEXT)
- $(CXXLINK) $(search_LDFLAGS) $(search_OBJECTS) $(search_LDADD) $(LIBS)
-threaded_search$(EXEEXT): $(threaded_search_OBJECTS) $(threaded_search_DEPENDENCIES)
- @rm -f threaded_search$(EXEEXT)
- $(CXXLINK) $(threaded_search_LDFLAGS) $(threaded_search_OBJECTS) $(threaded_search_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.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@
-
-distclean-depend:
- -rm -rf ./$(DEPDIR)
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@ fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@ fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
-@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@ fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ../..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-
-installdirs:
-
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
- mostlyclean-am
-
-distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS ctags distclean \
- distclean-compile distclean-depend distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am info \
- info-am install install-am install-data install-data-am \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/examples/cmdline/lookup.cpp b/examples/cmdline/lookup.cpp
deleted file mode 100644
index 502ca52..0000000
--- a/examples/cmdline/lookup.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <stdio.h>
-#include <iostream>
-#include <stdlib.h>
-#include <swmgr.h>
-
-#ifndef NO_SWORD_NAMESPACE
-using sword::SWMgr;
-using sword::SWModule;
-using sword::ModMap;
-using sword::SWKey;
-using sword::AttributeTypeList;
-using sword::AttributeValue;
-using sword::AttributeList;
-#endif
-
-int main(int argc, char **argv)
-{
- SWMgr manager;
- SWModule *target;
- ModMap::iterator it;
-
- if (argc != 3) {
- fprintf(stderr, "usage: %s <modname> <\"lookup key\">\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->Name(), (*it).second->Description());
- }
- exit(-1);
- }
-
- target = (*it).second;
-
- target->setKey(argv[2]);
-
- (const char *)*target; // force an entry lookup to resolve key so we
- // get the idxbuf entry for the key
- std::cout << (const char *)(SWKey &)*target << ":\n";
-// std::cout << target->StripText();
- std::cout << target->getRawEntry();
- 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/search.cpp b/examples/cmdline/search.cpp
deleted file mode 100644
index 72110ee..0000000
--- a/examples/cmdline/search.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <stdio.h>
-#include <rawtext.h>
-#include <swmgr.h>
-#include <markupfiltmgr.h>
-#include <regex.h> // GNU
-#include <iostream>
-
-#ifndef NO_SWORD_NAMESPACE
-using namespace sword;
-#endif
-
-void percentUpdate(char percent, void *userData) {
- static char printed = 0;
- char maxHashes = *((char *)userData);
-
- while ((((float)percent)/100) * maxHashes > printed) {
- std::cout << "=";
- printed++;
- std::cout.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;
- VerseKey parser;
- ModMap::iterator it;
-
- if ((argc != 3) && (argc != 4)) {
- fprintf(stderr, "usage: %s <modname> <\"search string\"> [\"search_scope\"]\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->Name(), (*it).second->Description());
- }
- exit(-1);
- }
-
- target = (*it).second;
-
- if (argc == 4) { // if min / max specified
- scope = parser.ParseVerseList(argv[3], parser, true);
- scope.Persist(1);
- target->setKey(scope);
- }
-
- std::cout << "[0=================================50===============================100]\n ";
- char lineLen = 70;
- listkey = target->Search(argv[2], -3, 0/*REG_ICASE*/, 0, 0, &percentUpdate, &lineLen);
- std::cout << "\n";
- while (!listkey.Error()) {
- std::cout << (const char *)listkey << std::endl;
- listkey++;
- }
-
-}
diff --git a/examples/cmdline/threaded_search.cpp b/examples/cmdline/threaded_search.cpp
deleted file mode 100755
index 450ca8b..0000000
--- a/examples/cmdline/threaded_search.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-#include <stdio.h>
-#include <rawtext.h>
-#include <swmgr.h>
-#include <regex.h> // GNU
-#include <listkey.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 CSwordModuleSearch {
-public:
- CSwordModuleSearch();
- ~CSwordModuleSearch();
-
- char* m_searchedText;
- SWModule* m_module;
- ListKey m_searchResult;
- bool m_isSearching;
-
- void startThread();
- void search();
-};
-
-void* dummy(void* p) {
- CSwordModuleSearch* moduleSearch = (CSwordModuleSearch*)p;
- moduleSearch->search();
-
- return NULL;
-}
-
-void percentUpdate(char percent, void* userData) {
- cms_currentProgress = (int)percent;
- std::cout << cms_currentProgress << "% ";
-}
-
-CSwordModuleSearch::CSwordModuleSearch() {
- m_isSearching = false;
- m_module = 0;
- m_searchedText = 0;
- cms_currentProgress = -1;
-}
-
-CSwordModuleSearch::~CSwordModuleSearch() {
-}
-
-void CSwordModuleSearch::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;
- m_isSearching = true;
- int i = pthread_create(thread, attr, &dummy, this);
-
- std::cout << "Created the thread: " << i << std::endl;
- std::cout.flush();
-}
-
-void CSwordModuleSearch::search() {
-
- if (!m_module) {
- std::cout << "Return." << std::endl;
- return;
- }
-
- ListKey scopeList = VerseKey().ParseVerseList("Luke;John;Revelation","", true);
- for (int i=0; i < scopeList.Count(); ++i) {
- std::cout << (const char*)*scopeList.GetElement(i) << std::endl;
- }
- SWKey* scope = &scopeList;
-
- m_searchResult = m_module->Search(m_searchedText, -2, REG_ICASE, scope, 0, &percentUpdate);
-
- if (!scope)
- std::cout << "bad scope!" << std::endl;
- m_isSearching = false;
-}
-
-int main(int argc, char **argv) {
- SWMgr manager;
- ModMap::iterator it;
- int oldProgress = 0;
-
- CSwordModuleSearch* moduleSearch = new CSwordModuleSearch();
-
- 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->Name(), (*it).second->Description());
- }
- exit(-1);
- }
-
- moduleSearch->m_searchedText = argv[2];
- moduleSearch->m_module = (*it).second;
- moduleSearch->startThread();
-
- std::cout << "Start loop" << std::endl;
- std::cout.flush();
- while (true) {
- if (!moduleSearch->m_isSearching)
- break;
- else
- std::cout.flush();
- };
-
- std::cout << std::endl << "Number of found items: " << moduleSearch->m_searchResult.Count() << std::endl;
- std::cout << "Finished program" << std::endl;
- std::cout.flush();
-
- delete moduleSearch;
- exit(0);
-}
-