[sword-devel] 1.5.8RC2

Lynn Allan l_d_allan at adelphia.net
Mon May 16 08:22:57 MST 2005

> Could you please submit a patch for inclusion.  It would make my
> life much easier than submitting the entire changed file and me
> to diff and manually make the changes.  You should be able to run,
> the top level of your tree, a command similar to:
<alert comment="svn newbie">
Below are results of svn patch, representing changes to:


Also, there is a suggested patch to diatheke.cpp with more usage notes
to possibly clarify

Here is a link to the patch file ... following lines may be wrapped:


Index: tests/modtest.cpp
--- tests/modtest.cpp (revision 1813)
+++ tests/modtest.cpp (working copy)
@@ -8,7 +8,7 @@
 int main(int argc, char **argv) {
  SWMgr mymgr;
  ModMap::iterator it;
- SWModule *module = mymgr.Modules["RWP"];
+ SWModule *module = mymgr.Modules["KJV"];
  VerseKey parser;
  ListKey lk = parser.ParseVerseList("mal4:6-rev", parser, true);
Index: utilities/diatheke/diatheke.cpp
--- utilities/diatheke/diatheke.cpp (revision 1813)
+++ utilities/diatheke/diatheke.cpp (working copy)
@@ -22,11 +22,19 @@
  fprintf (stderr, "Copyright 1999-2002 by the CrossWire Bible
  fprintf (stderr, "http://www.crosswire.org/sword/diatheke/\n");
  fprintf (stderr, "usage: \n  ");
-  fprintf (stderr, "diatheke <-b book> [-s search_type] [-r
search_range] [-o option_filters]\n");
+  fprintf (stderr, "diatheke <-b bookchoice> [-s search_type]\n"
+                   "[-r search_range] [-o option_filters]\n");
  fprintf (stderr, "[-m maximum_verses] [-f output_format] [-l
  fprintf (stderr, "[-e output_encoding] [-t script] [-v
  fprintf (stderr, "<-k query_key>\n");
  fprintf (stderr, "\n");
+ fprintf (stderr, "examples: \n  ");
+  fprintf (stderr, "diatheke -b KJV -e plain -k james 1:19\n  ");
+  fprintf (stderr, "diatheke -b MKJV -f rtf -k jas 1:19-20\n  ");
+  fprintf (stderr, "diatheke -b GodsWord -f plain -k mal 4:5-Matt
1:2\n  ");
+  fprintf (stderr, "diatheke -b WEB -f plain -k mal 4:5-8\n  ");
+  fprintf (stderr, "diatheke -b WEB -f plain -k jas
1:19,1:21,1:23-24,John 3:16\n  ");
+ fprintf (stderr, "\n");
  fprintf (stderr, "If <book> is \"system\" you may use these system
keys: \"modulelist\",\n");
  fprintf (stderr, "\"modulelistnames\", and \"localelist\".");
  fprintf (stderr, "\n");
@@ -41,6 +49,9 @@
  fprintf (stderr, "Valid output_format values are: GBF, ThML, RTF,
HTML, OSIS, CGI, and plain (def)\n");
  fprintf (stderr, "Valid output_encoding values are: Latin1, UTF8
(def), UTF16, HTML, and RTF\n");
  fprintf (stderr, "Valid locale values depend on installed locales.
en is default.\n");
+ fprintf (stderr, "\n<-b bookchoice> capitalization should correspond
to contents \n"
+                   "  of mods.d/bookchoice.conf (e.g. GodsWord, MKJV,
+                   "  Note: this is module-name, not name of Bible
  fprintf (stderr, "The query_key must be the last argument because
all following\n");
  fprintf (stderr, "  arguments are added to the key.\n");
Index: examples/cmdline/search.cpp
--- examples/cmdline/search.cpp (revision 1813)
+++ examples/cmdline/search.cpp (working copy)
@@ -36,7 +36,8 @@
  ModMap::iterator it;

  if ((argc != 3) && (argc != 4)) {
-  fprintf(stderr, "usage: %s <modname> <\"search string\">
[\"search_scope\"]\n", argv[0]);
+  fprintf(stderr, "usage: %s <modname> <\"search string\">
+        "Example: search KJV \"swift hear slow speak\"\n", argv[0]);

Index: examples/cmdline/lookup.cpp
--- examples/cmdline/lookup.cpp (revision 1813)
+++ examples/cmdline/lookup.cpp (working copy)
@@ -20,7 +20,8 @@
  ModMap::iterator it;

  if (argc != 3) {
-  fprintf(stderr, "usage: %s <modname> <\"lookup key\">\n", argv[0]);
+  fprintf(stderr, "usage: %s <modname> <\"lookup key\">\n"
+        "Example: lookup KJV \"James 1:19\"\n", argv[0]);

More information about the sword-devel mailing list