diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:04 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:04 -0400 |
commit | b745315323de9f27538edac9453205ca70e6186e (patch) | |
tree | e804cd15cf894a2a14aab6c5224bc242273dc3ba /examples | |
parent | 936d9e8484ff73282c8c0a277310d1ffdde86e10 (diff) |
Imported Upstream version 1.6.2+dfsg
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.in | 23 | ||||
-rw-r--r-- | examples/classes/Makefile | 2 | ||||
-rw-r--r-- | examples/classes/ciphercng.cpp | 3 | ||||
-rw-r--r-- | examples/cmdline/CMakeLists.txt | 33 | ||||
-rw-r--r-- | examples/cmdline/Makefile.in | 19 | ||||
-rw-r--r-- | examples/cmdline/lookup.cpp | 15 |
6 files changed, 77 insertions, 18 deletions
diff --git a/examples/Makefile.in b/examples/Makefile.in index 7002f98..1c30393 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,7 +39,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ $(top_srcdir)/m4/colored-echo.m4 $(top_srcdir)/m4/cppunit.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -119,14 +121,13 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GENCCODE = @GENCCODE@ GENCMN = @GENCMN@ GENRB = @GENRB@ @@ -140,18 +141,23 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -173,7 +179,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -207,6 +213,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -281,7 +288,7 @@ clean-libtool: # (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): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -306,7 +313,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff --git a/examples/classes/Makefile b/examples/classes/Makefile index 38920d2..4cef07f 100644 --- a/examples/classes/Makefile +++ b/examples/classes/Makefile @@ -5,6 +5,6 @@ clean: rm $(TARGETS) .cpp: - g++ -O3 `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword` + g++ -O0 -g `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword` diff --git a/examples/classes/ciphercng.cpp b/examples/classes/ciphercng.cpp index bf85cc7..9859341 100644 --- a/examples/classes/ciphercng.cpp +++ b/examples/classes/ciphercng.cpp @@ -5,7 +5,7 @@ * cipherkey in the module's .conf file. * * - * $Id: ciphercng.cpp 2327 2009-04-22 11:42:33Z scribe $ + * $Id: ciphercng.cpp 2504 2010-01-26 16:46:19Z scribe $ * * Copyright 1998-2009 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -23,6 +23,7 @@ * */ +#include <stdio.h> #include <iostream> #include <swmgr.h> diff --git a/examples/cmdline/CMakeLists.txt b/examples/cmdline/CMakeLists.txt new file mode 100644 index 0000000..922c2d8 --- /dev/null +++ b/examples/cmdline/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################################################## +# These are some examples. If you want examples to be built, you need to define +# SWORD_BUILD_EXAMPLES="Yes". These will not be installed, so don't worry about +# that. +# +SET(example_PROGRAMS + listoptions + lookup + outplain + outrender + search + verserangeparse +) + +FOREACH(DEMO ${example_PROGRAMS}) + ADD_EXECUTABLE("${DEMO}" "${DEMO}.cpp") + TARGET_LINK_LIBRARIES("${DEMO}" sword) +ENDFOREACH(DEMO ${example_PROGRAMS}) + +################################################################################## +# This example uses pthreads explicity. I don't know if it supports anything else, +# but until I find out, I will force it to find PTHREADS only +# + +FIND_PACKAGE(Threads) + +IF(CMAKE_USE_PTHREADS_INIT OR CMAKE_HP_PTHREADS_INIT) + ADD_EXECUTABLE(threaded_search threaded_search.cpp) + TARGET_LINK_LIBRARIES(threaded_search + sword + ${CMAKE_THREAD_LIBS_INIT} + ) +ENDIF(CMAKE_USE_PTHREADS_INIT OR CMAKE_HP_PTHREADS_INIT) diff --git a/examples/cmdline/Makefile.in b/examples/cmdline/Makefile.in index 8732549..fe4ca69 100644 --- a/examples/cmdline/Makefile.in +++ b/examples/cmdline/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,7 +44,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ $(top_srcdir)/m4/colored-echo.m4 $(top_srcdir)/m4/cppunit.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -131,14 +133,13 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GENCCODE = @GENCCODE@ GENCMN = @GENCMN@ GENRB = @GENRB@ @@ -152,18 +153,23 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -185,7 +191,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -219,6 +225,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff --git a/examples/cmdline/lookup.cpp b/examples/cmdline/lookup.cpp index 1a96010..5fecafb 100644 --- a/examples/cmdline/lookup.cpp +++ b/examples/cmdline/lookup.cpp @@ -1,7 +1,7 @@ /****************************************************************************** * Simple example of how to retrieve an entry from a SWORD module * - * $Id: lookup.cpp 2327 2009-04-22 11:42:33Z scribe $ + * $Id: lookup.cpp 2546 2010-09-08 14:14:37Z scribe $ * * Copyright 1998-2009 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -25,6 +25,7 @@ #include <swmgr.h> #include <swmodule.h> #include <markupfiltmgr.h> +#include <versekey.h> using sword::SWMgr; using sword::MarkupFilterMgr; @@ -36,6 +37,7 @@ using sword::ModMap; using sword::AttributeTypeList; using sword::AttributeList; using sword::AttributeValue; +using sword::VerseKey; int main(int argc, char **argv) { @@ -67,7 +69,16 @@ int main(int argc, char **argv) manager.setGlobalOption("Lemmas", "Off"); // manager.setGlobalOption("Greek Accents", "Off"); - target->setKey(argv[2]); + VerseKey *vk = dynamic_cast<VerseKey *>(target->getKey()); + + if (vk) { + // vk->AutoNormalize(false); + vk->Headings(true); + vk->setText(argv[2]); + } + else { + target->setKey(argv[2]); + } target->RenderText(); // force an entry lookup to resolve key to something in the index |