<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Lynn,<br>
I found in submitting patches to JSword that it was better to zip the
patch and give it as an attachment as it prevented the wrapping of the
patch. When the patch wraps then the person who applies the patch has
to join the lines back together properly. For small patches it is not a
big deal but it is difficult to get right for big patches.<br>
DM<br>
<br>
Lynn Allan wrote:
<blockquote cite="mid016501c55a2b$28fa19e0$0200a8c0@k2" type="cite">
<blockquote type="cite">
<pre wrap="">Could you please submit a patch for inclusion. It would make my
life much easier than submitting the entire changed file and me
</pre>
</blockquote>
<pre wrap=""><!---->having
</pre>
<blockquote type="cite">
<pre wrap="">to diff and manually make the changes. You should be able to run,
</pre>
</blockquote>
<pre wrap=""><!---->from
</pre>
<blockquote type="cite">
<pre wrap="">the top level of your tree, a command similar to:
</pre>
</blockquote>
<pre wrap=""><!----><alert comment="svn newbie">
Below are results of svn patch, representing changes to:
examples/cmdline/lookup.cpp
examples/cmdline/search.cpp
tests/modtest.cpp
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:
lcdbible.sf.net/misc/sword_examples-cmdline_tests_diatheke.patch
</alert>
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);
lk.Persist(1);
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
Society\n");
fprintf (stderr, <a class="moz-txt-link-rfc2396E" href="http://www.crosswire.org/sword/diatheke/\n">"http://www.crosswire.org/sword/diatheke/\n"</a>);
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
locale]\n");
fprintf (stderr, "[-e output_encoding] [-t script] [-v
variant#(-1=all|0|1)]\n");
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,
etc.)\n"
+ " Note: this is module-name, not name of Bible
book\n\n");
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\">
[\"search_scope\"]\n"
+ "Example: search KJV \"swift hear slow speak\"\n", argv[0]);
exit(-1);
}
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]);
exit(-1);
}</pre>
</blockquote>
</body>
</html>