diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.in | 360 | ||||
-rw-r--r-- | examples/X11/gtk--/simplefrontend/simplefrontend.cpp | 93 | ||||
-rw-r--r-- | examples/X11/qt/simplefrontend/SimpleFrontEndProject.cpp | 75 | ||||
-rw-r--r-- | examples/classes/ciphercng.cpp | 43 | ||||
-rw-r--r-- | examples/cmdline/Makefile | 373 | ||||
-rw-r--r-- | examples/cmdline/Makefile.in | 373 | ||||
-rw-r--r-- | examples/cmdline/lookup.cpp | 51 | ||||
-rw-r--r-- | examples/cmdline/search.cpp | 63 | ||||
-rwxr-xr-x | examples/cmdline/threaded_search.cpp | 125 | ||||
-rw-r--r-- | examples/windoze/bcowl25/multimod/swrtdlgc.cpp | 213 |
10 files changed, 1769 insertions, 0 deletions
diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 0000000..30f5d0a --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,360 @@ +# Makefile.in generated by automake 1.6.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +AMTAR = @AMTAR@ +AS = @AS@ +AWK = @AWK@ +CC = @CC@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAINT = @MAINT@ +OBJDUMP = @OBJDUMP@ +PACKAGE = @PACKAGE@ +PKGDATA = @PKGDATA@ +RANLIB = @RANLIB@ +STRIP = @STRIP@ +VERSION = @VERSION@ +am__include = @am__include@ +am__quote = @am__quote@ +dir_confdef = @dir_confdef@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +install_sh = @install_sh@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 + +SUBDIRS = cmdline +subdir = examples +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +DIST_SOURCES = + +RECURSIVE_TARGETS = info-recursive dvi-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) --gnu 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 + +ETAGS = etags +ETAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$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 + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @list='$(DISTFILES)'; for file in $$list; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + 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 + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ + clean-generic clean-libtool clean-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 \ + 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/X11/gtk--/simplefrontend/simplefrontend.cpp b/examples/X11/gtk--/simplefrontend/simplefrontend.cpp new file mode 100644 index 0000000..ed5192a --- /dev/null +++ b/examples/X11/gtk--/simplefrontend/simplefrontend.cpp @@ -0,0 +1,93 @@ +#include <stdlib.h> +#include <stdio.h> + +#include <gtk--.h> + +#include <swmgr.h> + + +class SimpleFrontEnd : public Gtk_Window { + Gtk_Label l1; + Gtk_Label l2; + Gtk_Label l3; + Gtk_Entry kt; + Gtk_Combo cb; + Gtk_VBox *vb; + Gtk_Text *text; + SWMgr manager; +public: + SimpleFrontEnd() : l1("Module Name:"), l2("KeyText:"), l3(""), kt(), vb(new Gtk_VBox), text(new Gtk_Text) { + add(vb); + vb->pack_start(&l1); + vb->pack_start(&cb); + vb->pack_start(&l2); + vb->pack_start(&kt); + vb->pack_start(&l3); + vb->pack_start(text); + vb->show(); + l1.show(); + l2.show(); + l3.show(); + kt.show(); + cb.show(); + text->set_word_wrap(TRUE); + text->show(); + + connect_to_method(kt.changed,this,&keypress); + // use SWMgr to traverse installed modules and insert into QComboBox + + ModMap::iterator modIterator; + G_List cbItems; + + for (modIterator = manager.Modules.begin(); modIterator != manager.Modules.end(); modIterator++) + cbItems.append((void *)modIterator->first.c_str()); + cb.set_popdown_strings(cbItems); + + + } + + gint delete_event_impl(GdkEventAny*) { + Gtk_Main::instance()->quit(); return 0; + } + + void keypress() { + string keyText; + string modName; + ModMap::iterator it; + gint position=0; + + keyText = kt.get_text(); + modName = cb.entry.get_text(); + + it = manager.Modules.find(modName.c_str()); + if (it != manager.Modules.end()) { + it->second->SetKey(keyText.c_str()); + text->delete_text(0, text->get_length()); + text->insert_text((const char *)*it->second, strlen(*it->second), &position); + l3.set(it->second->KeyText()); + } + } + +}; + + +int main(int argc, char *argv[]) { + Gtk_Main m(&argc,&argv); + SimpleFrontEnd *t=new SimpleFrontEnd; + t->show(); + m.run(); + printf("After run!\n"); + return(EXIT_SUCCESS); +} + + + + + + + + + + + + diff --git a/examples/X11/qt/simplefrontend/SimpleFrontEndProject.cpp b/examples/X11/qt/simplefrontend/SimpleFrontEndProject.cpp new file mode 100644 index 0000000..3ddc77d --- /dev/null +++ b/examples/X11/qt/simplefrontend/SimpleFrontEndProject.cpp @@ -0,0 +1,75 @@ +/*********************************************** +** Source Dump From QtEZ http://qtez.zax.net/qtez +** --------------------------------------------- +** Dumped: Mon Sep 21 01:22:44 1998 +** To: /usr/src/sword/examples/X11/qt/simplefrontend/SimpleFrontEndProject.cpp +** By: root +***********************************************/ + +#include "/usr/src/sword/examples/X11/qt/simplefrontend/SimpleFrontEndProject.h" +#include <string> +#include <swmgr.h> + +SimpleFrontEndProject::SimpleFrontEndProject(QWidget *parent, char *name) + : QDialog(parent,name,FALSE,WStyle_Customize | WStyle_NormalBorder) +{ + resize(420,320); + + label2 = new QLabel(this, "label2"); + label2->setText("Module Name"); + label2->setAlignment(AlignLeft | AlignTop); + label2->setGeometry(21,6,115,28); + + label1 = new QLabel(this, "label1"); + label1->setText("KeyText"); + label1->setAlignment(AlignLeft | AlignTop); + label1->setGeometry(21,51,115,28); + + label3 = new QLabel(this, "label3"); + label3->setText("[ none ]"); + label3->setAlignment(AlignLeft | AlignTop); + label3->setGeometry(21,96,115,28); + + combo1 = new QComboBox((bool)0,this,"combo1"); + combo1->setGeometry(143,6,270,28); + + mlined1 = new QMultiLineEdit(this, "mlined1"); + mlined1->setGeometry(21,141,390,160); + mlined1->setReadOnly(TRUE); + + text1 = new QLineEdit(this, "text1"); + text1->setGeometry(143,50,270,28); + + QObject::connect(text1,SIGNAL(textChanged(const char *)), + this,SLOT(lookup(const char *))); + + QObject::connect(combo1,SIGNAL(activated(const char *)), + this,SLOT(lookup(const char *))); + +// use SWMgr to traverse installed modules and insert into QComboBox + + ModMap::iterator modIterator; + + for (modIterator = manager.Modules.begin(); modIterator != manager.Modules.end(); modIterator++) + combo1->insertItem(modIterator->first.c_str()); +} + +void +SimpleFrontEndProject::lookup(const char *) +{ + string keyText; + string modName; + ModMap::iterator it; + + keyText = text1->text(); + modName = combo1->currentText(); + + it = manager.Modules.find(modName.c_str()); + if (it != manager.Modules.end()) { + it->second->SetKey(keyText.c_str()); + mlined1->setText(*it->second); + label3->setText(it->second->KeyText()); + } + +} + diff --git a/examples/classes/ciphercng.cpp b/examples/classes/ciphercng.cpp new file mode 100644 index 0000000..9e6e461 --- /dev/null +++ b/examples/classes/ciphercng.cpp @@ -0,0 +1,43 @@ +/****************************************************************************** + * + * 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/cmdline/Makefile b/examples/cmdline/Makefile new file mode 100644 index 0000000..e8b7c8a --- /dev/null +++ b/examples/cmdline/Makefile @@ -0,0 +1,373 @@ +# Makefile.in generated by automake 1.6.2 from Makefile.am. +# examples/cmdline/Makefile. Generated from Makefile.in by configure. + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = ../.. + +prefix = /usr +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +sbindir = ${exec_prefix}/sbin +libexecdir = ${exec_prefix}/libexec +datadir = ${prefix}/share +sysconfdir = /etc +sharedstatedir = ${prefix}/com +localstatedir = ${prefix}/var +libdir = ${exec_prefix}/lib +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include +pkgdatadir = $(datadir)/sword +pkglibdir = $(libdir)/sword +pkgincludedir = $(includedir)/sword +top_builddir = ../.. + +ACLOCAL = ${SHELL} /space/home/scribe/src/sword/missing --run aclocal-1.6 +AUTOCONF = ${SHELL} /space/home/scribe/src/sword/missing --run autoconf +AUTOMAKE = ${SHELL} /space/home/scribe/src/sword/missing --run automake-1.6 +AUTOHEADER = ${SHELL} /space/home/scribe/src/sword/missing --run autoheader + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} +INSTALL_DATA = ${INSTALL} -m 644 +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_SCRIPT = ${INSTALL} +INSTALL_HEADER = $(INSTALL_DATA) +transform = s,x,x, +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = arm-v4l-linux +host_triplet = arm-v4l-linux-gnu + +EXEEXT = +OBJEXT = o +PATH_SEPARATOR = : +AMTAR = ${SHELL} /space/home/scribe/src/sword/missing --run tar +AS = @AS@ +AWK = gawk +CC = arm-v4l-linux-gcc +CURL_CFLAGS = +CURL_CONFIG = /usr/bin/curl-config +CURL_LIBS = -lcurl -lssl -lcrypto -ldl +CXX = arm-v4l-linux-g++ +DEPDIR = .deps +DLLTOOL = @DLLTOOL@ +ECHO = echo +GENCCODE = +GENCMN = +GENRB = +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +MAINT = # +OBJDUMP = @OBJDUMP@ +PACKAGE = sword +PKGDATA = +RANLIB = arm-v4l-linux-ranlib +STRIP = arm-v4l-linux-strip +VERSION = 1.5.4 +am__include = include +am__quote = +dir_confdef = no +enable_debug = no +enable_profile = no +install_sh = /space/home/scribe/src/sword/install-sh +target_cpu = arm +target_mingw32 = no +target_os = linux-gnu +target_system = arm +target_vendor = v4l +with_conf = no +with_icu = no +with_zlib = yes +AUTOMAKE_OPTIONS = 1.6 +INCLUDES = -I $(top_srcdir)/include +LDADD = -L$(top_builddir)/lib -lsword + +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 +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 = +lookup_LDFLAGS = +am_search_OBJECTS = search.$(OBJEXT) +search_OBJECTS = $(am_search_OBJECTS) +search_LDADD = $(LDADD) +search_DEPENDENCIES = +search_LDFLAGS = +am_threaded_search_OBJECTS = threaded_search.$(OBJEXT) +threaded_search_OBJECTS = $(am_threaded_search_OBJECTS) +threaded_search_DEPENDENCIES = +threaded_search_LDFLAGS = + +DEFS = -DHAVE_CONFIG_H +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +CPPFLAGS = +LDFLAGS = +LIBS = -lz +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +DEP_FILES = ./$(DEPDIR)/lookup.Po ./$(DEPDIR)/search.Po \ + ./$(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 $@ +CXXFLAGS = -I/usr/include/g++-3 -O3 -ftemplate-depth-25 +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: # Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu examples/cmdline/Makefile +Makefile: # $(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 + +include ./$(DEPDIR)/lookup.Po +include ./$(DEPDIR)/search.Po +include ./$(DEPDIR)/threaded_search.Po + +distclean-depend: + -rm -rf ./$(DEPDIR) + +.cpp.o: + source='$<' object='$@' libtool=no \ + depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ + $(CXXDEPMODE) $(depcomp) \ + $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +.cpp.obj: + source='$<' object='$@' libtool=no \ + depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ + $(CXXDEPMODE) $(depcomp) \ + $(CXXCOMPILE) -c -o $@ `cygpath -w $<` + +.cpp.lo: + source='$<' object='$@' libtool=yes \ + depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \ + $(CXXDEPMODE) $(depcomp) \ + $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< +CXXDEPMODE = depmode=gcc + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ETAGS = etags +ETAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = ../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @list='$(DISTFILES)'; for file in $$list; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) + +installdirs: + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-compile distclean-depend \ + distclean-generic distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +uninstall-am: uninstall-info-am + +.PHONY: GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS distclean distclean-compile \ + distclean-depend distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + tags uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/cmdline/Makefile.in b/examples/cmdline/Makefile.in new file mode 100644 index 0000000..fc0371e --- /dev/null +++ b/examples/cmdline/Makefile.in @@ -0,0 +1,373 @@ +# Makefile.in generated by automake 1.6.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +AMTAR = @AMTAR@ +AS = @AS@ +AWK = @AWK@ +CC = @CC@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAINT = @MAINT@ +OBJDUMP = @OBJDUMP@ +PACKAGE = @PACKAGE@ +PKGDATA = @PKGDATA@ +RANLIB = @RANLIB@ +STRIP = @STRIP@ +VERSION = @VERSION@ +am__include = @am__include@ +am__quote = @am__quote@ +dir_confdef = @dir_confdef@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +install_sh = @install_sh@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +INCLUDES = -I $(top_srcdir)/include +LDADD = -L$(top_builddir)/lib -lsword + +noinst_PROGRAMS = 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 +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 = +lookup_LDFLAGS = +am_search_OBJECTS = search.$(OBJEXT) +search_OBJECTS = $(am_search_OBJECTS) +search_LDADD = $(LDADD) +search_DEPENDENCIES = +search_LDFLAGS = +am_threaded_search_OBJECTS = threaded_search.$(OBJEXT) +threaded_search_OBJECTS = $(am_threaded_search_OBJECTS) +threaded_search_DEPENDENCIES = +threaded_search_LDFLAGS = + +DEFS = @DEFS@ +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/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 $@ +CXXFLAGS = @CXXFLAGS@ +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) --gnu 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: +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +.cpp.obj: +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CXXCOMPILE) -c -o $@ `cygpath -w $<` + +.cpp.lo: +@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< +CXXDEPMODE = @CXXDEPMODE@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ETAGS = etags +ETAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = ../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @list='$(DISTFILES)'; for file in $$list; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) + +installdirs: + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-compile distclean-depend \ + distclean-generic distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +uninstall-am: uninstall-info-am + +.PHONY: GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS distclean distclean-compile \ + distclean-depend distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + tags uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/cmdline/lookup.cpp b/examples/cmdline/lookup.cpp new file mode 100644 index 0000000..6f67ed7 --- /dev/null +++ b/examples/cmdline/lookup.cpp @@ -0,0 +1,51 @@ +#include <stdio.h> +#include <iostream> +#include <stdlib.h> +#include <swmgr.h> + +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 << "\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 new file mode 100644 index 0000000..ec55b14 --- /dev/null +++ b/examples/cmdline/search.cpp @@ -0,0 +1,63 @@ +#include <stdio.h> +#include <rawtext.h> +#include <swmgr.h> +#include <regex.h> // GNU +#include <iostream> + +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; + SWModule *target; + ListKey listkey; + VerseKey vk; + ModMap::iterator it; + + if ((argc != 3) && (argc != 5)) { + fprintf(stderr, "usage: %s <modname> <\"search string\"> [\"min\" \"max\"]\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 == 5) { // if min / max specified + vk.LowerBound(argv[3]); + vk.UpperBound(argv[4]); + vk.Persist(1); + target->SetKey(vk); + } + + std::cout << "[0=================================50===============================100]\n "; + char lineLen = 70; + listkey = target->Search(argv[2], -2, 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 new file mode 100755 index 0000000..2267ed2 --- /dev/null +++ b/examples/cmdline/threaded_search.cpp @@ -0,0 +1,125 @@ +#include <stdio.h> +#include <rawtext.h> +#include <swmgr.h> +#include <regex.h> // GNU +#include <listkey.h> +#include <iostream> + +#include <pthread.h> + +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); +} + diff --git a/examples/windoze/bcowl25/multimod/swrtdlgc.cpp b/examples/windoze/bcowl25/multimod/swrtdlgc.cpp new file mode 100644 index 0000000..44e93ca --- /dev/null +++ b/examples/windoze/bcowl25/multimod/swrtdlgc.cpp @@ -0,0 +1,213 @@ +/* Project sword + + GNU Copyleft GPL © 1996. Almost No Rights Reserved. + + SUBSYSTEM: sword.exe Application + FILE: swrtdlgc.cpp + AUTHOR: The Sword Project Team + + + OVERVIEW + ======== + Source file for implementation of swordTDLGClient (TDialog). +*/ + + +#include <owl\owlpch.h> +#pragma hdrstop + +#include "tversedt.h" +#include "swordapp.h" +#include "swrtdlgc.h" +#include "serchdlg.h" + +#include <versekey.h> +#include <rawtext.h> +#include <rawcom.h> +#include <rawld.h> +#include <tbdisp.h> + + +class TBLDDisp: public TBDisp { + int nameid, keyid; +public: + TBLDDisp(HWND iwnd, int ictrlid, int inameid = 0, int ikeyid = 0):TBDisp(iwnd, ictrlid) { + nameid = inameid; + keyid = ikeyid; + } + virtual char Display(SWModule &imodule) { + TBDisp::Display(imodule); + if (nameid) + SetDlgItemText(wnd, nameid, imodule.Description()); + if (keyid) + SetDlgItemText(wnd, keyid, (char *)(SWKey)imodule); + } +}; + + +SWDisplay *edit1disp = 0; +SWDisplay *edit2disp = 0; +SWDisplay *edit3disp = 0; +VerseKey *masterkey = 0; +SWModule *webster = 0; +SWModule *mhc = 0; +SWModule *eastons = 0; +SWModule *vines = 0; + +// +// Build a response table for all messages/commands handled +// by the application. +// +DEFINE_RESPONSE_TABLE1(swordTDLGClient, TDialog) +//{{swordTDLGClientRSP_TBL_BEGIN}} + EV_BN_CLICKED(IDC_LOOKUP, BNClicked), + EV_WM_RBUTTONDOWN, + EV_BN_CLICKED(IDC_UPBUTTON, UpVerse), + EV_BN_CLICKED(IDC_DOWNBUTTON, DownVerse), + EV_COMMAND(CM_EDITFIND, SearchTxt), +//{{swordTDLGClientRSP_TBL_END}} +END_RESPONSE_TABLE; + + +// SWLookup This is a kludgy way to lookup, but a Module manager will do +// this work in the future +void SWLookup(char *modname, SWKey &key) +{ + if (!stricmp(modname, eastons->Name())) { + eastons->SetKey(key); + eastons->Display(); + } + if (!stricmp(modname, vines->Name())) { + vines->SetKey(key); + vines->Display(); + } +} + + + + +//{{swordTDLGClient Implementation}} + + +////////////////////////////////////////////////////////// +// swordTDLGClient +// ========== +// Construction/Destruction handling. +static swordTDLGClientXfer swordTDLGClientData; + +swordTDLGClient::swordTDLGClient (TWindow *parent, TResId resId, TModule *module) + : TDialog(parent, resId, module) +{ +//{{swordTDLGClientXFER_USE}} + BookCB = new TComboBox(this, IDC_BOOK, 1); + WebEdit = new TVerseEdit(this, IDC_VTEXT, 255); + MHCEdit = new TVerseEdit(this, IDC_CTEXT, 255); + LDText = new TVerseEdit(this, IDC_DTEXT, 255); + + SetTransferBuffer(&swordTDLGClientData); +//{{swordTDLGClientXFER_USE_END}} + +} + + +swordTDLGClient::~swordTDLGClient () +{ + Destroy(); + + delete edit1disp; + delete edit2disp; + delete edit3disp; + delete webster; + delete mhc; + delete eastons; + delete vines; + delete masterkey; +} + + +void swordTDLGClient::SetupWindow () +{ + char loop1, loop2; + + TDialog::SetupWindow(); + + edit1disp = new TBLDDisp(HWindow, IDC_VTEXT, 0, IDC_KTEXT); + edit2disp = new TBLDDisp(HWindow, IDC_CTEXT); + edit3disp = new TBLDDisp(HWindow, IDC_DTEXT, IDC_LDNAME, IDC_LDKEY); + masterkey = new VerseKey(); + webster = new RawText("../../../../modules/texts/rawtext/webster/", "Webster", "Webster Text", edit1disp); + mhc = new RawCom ("../../../../modules/comments/rawcom/mhc/", "MHC", "Matthew Henry's Commentary", edit2disp); + eastons = new RawLD ("../../../../modules/lexdict/rawld/eastons/eastons", "Eastons", "Easton's Bible Dictionary", edit3disp); + vines = new RawLD ("../../../../modules/lexdict/rawld/vines/vines", "Vines", "Vine's Bible Dictionary", edit3disp); + + masterkey->Persist(1); + webster->SetKey(*masterkey); + mhc->SetKey(*masterkey); + + for (loop1 = 0; loop1 < 2; loop1++) { + for (loop2 = 0; loop2 < VerseKey::BMAX[loop1]; loop2++) { + BookCB->AddString(VerseKey::books[loop1][loop2].name); + } + } + BookCB->SetSelIndex(58); + SetDlgItemText(IDC_CHAPTER, "1"); + SetDlgItemText(IDC_VERSE, "19"); +} + + +void swordTDLGClient::BNClicked () +{ + char buf[80], tmpbuf[70]; + int ch, vs; + + BookCB->GetText(tmpbuf, 79); + ch = GetDlgItemInt(IDC_CHAPTER); + vs = GetDlgItemInt(IDC_VERSE); + + masterkey->AutoNormalize(ch && vs); // if either chapter or verse are 0 then don't auto normalize so that we can lookup intros + + wsprintf(buf, "%s %d:%d", tmpbuf, ch, vs); + *masterkey = buf; + + webster->Display(); + mhc->Display(); + +} + + +void swordTDLGClient::EvRButtonDown (uint modKeys, TPoint& point) +{ + TDialog::EvRButtonDown(modKeys, point); +} + + +void swordTDLGClient::UpVerse () +{ + (*masterkey)--; + webster->Display(); + mhc->Display(); +} + + +void swordTDLGClient::DownVerse () +{ + (*masterkey)++; + webster->Display(); + mhc->Display(); +} + + +void swordTDLGClient::EvPaint () +{ + TDialog::EvPaint(); + + // INSERT>> Your code here. + +} + + +void swordTDLGClient::SearchTxt () +{ + new SearchDlg(this)->Create(); +} + |