1 /******************************************************************************
2 *
3 * buildtest.cpp - This is a dumby program which does nothing useful but
4 * links to the SWORD engine to confirm basic things were
5 * built ok.
6 *
7 * $Id: buildtest.cpp 2833 2013-06-29 06:40:28Z chrislit $
8 *
9 * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
10 * CrossWire Bible Society
11 * P. O. Box 2528
12 * Tempe, AZ 85280-2528
13 *
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation version 2.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 */
24
25 #include <iostream>
26 #include <versekey.h>
27 #include <rawtext.h>
28 //#include <zcom.h>
29 #include <rawcom.h>
30 //#include <rawfiles.h>
31 #ifndef NO_SWORD_NAMESPACE
32 using sword::VerseKey;
33 using sword::RawText;
34 using sword::RawCom;
35 using sword::SWKey;
36 #endif
37 using std::cout;
38
main(int argc,char ** argv)39 int main(int argc, char **argv)
40 {
41 int loop;
42 int max;
43 VerseKey mykey;
44 // RawText text("src/modules/texts/rawtext/sve/", "Sven Text", "Sven Text");
45 RawText text("src/modules/texts/rawtext/webster/", "Webster", "Webster Text");
46 // RawText text("src/modules/texts/rawtext/orthjbc/", "Webster", "Webster Text");
47 // RawText text("src/modules/texts/rawtext/kjv/", "KJV", "KJV Text");
48 // RawText text("src/modules/texts/rawtext/vnt/", "VNT", "Valera Spanish NT");
49 // RawCom commentary("src/modules/comments/rawcom/rwp/", "RWP", "Robertson's Word Pictures");
50 RawCom commentary("src/modules/comments/rawcom/mhc/", "MHC", "Matthew Henry's Commentary on the Whole Bible");
51 // RawFiles commentary("src/modules/comments/rawfiles/personal/", "MHC", "Matthew Henry's Commentary on the Whole Bible");
52
53
54 if (argc > 3)
55 mykey.setAutoNormalize(false); // Turn off autonormalize if 3 args to allow for intros
56 // This is kludgy but at lease you can try it
57 // with something like: sword "Matthew 1:0" 1 1
58
59
60 mykey = (argc < 2) ? "James 1:19" : argv[1];
61 mykey.setPersist(true);
62 text.setKey(mykey);
63 commentary.setKey(mykey);
64
65
66 max = (argc < 3) ? 1 : atoi(argv[2]);
67
68
69 cout << "\n";
70
71
72 for (loop = 0; loop < max; loop++) {
73 cout << (SWKey &)text << ":\n";
74 text.display();
75 cout << "\n";
76 cout << "-------------\n";
77 commentary.display();
78 cout << "\n";
79 cout << "==========================\n";
80 mykey++;
81 }
82 cout << "\n\n";
83 }
84