~ubuntu-branches/debian/squeeze/sword/squeeze

« back to all changes in this revision

Viewing changes to testlib.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Glassey
  • Date: 2004-01-15 15:50:07 UTC
  • Revision ID: james.westby@ubuntu.com-20040115155007-n9mz4x0zxrs1isd3
Tags: upstream-1.5.7
ImportĀ upstreamĀ versionĀ 1.5.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <iostream>
 
2
#include <versekey.h>
 
3
#include <rawtext.h>
 
4
//#include <zcom.h>
 
5
#include <rawcom.h>
 
6
//#include <rawgbf.h>
 
7
//#include <rawfiles.h>
 
8
#ifndef NO_SWORD_NAMESPACE
 
9
using sword::VerseKey;
 
10
using sword::RawText;
 
11
using sword::RawCom;
 
12
using sword::SWKey;
 
13
#endif
 
14
using std::cout;
 
15
 
 
16
int main(int argc, char **argv)
 
17
{
 
18
        int loop;
 
19
        int max;
 
20
        VerseKey mykey;
 
21
//      RawText text("src/modules/texts/rawtext/sve/", "Sven Text", "Sven Text");
 
22
        RawText text("src/modules/texts/rawtext/webster/", "Webster", "Webster Text");
 
23
//      RawText text("src/modules/texts/rawtext/orthjbc/", "Webster", "Webster Text");
 
24
//      RawGBF text("src/modules/texts/rawgbf/newtext/", "WEB", "World English Bible");
 
25
//      RawText text("src/modules/texts/rawtext/kjv/", "KJV", "KJV Text");
 
26
//      RawText text("src/modules/texts/rawtext/vnt/", "VNT", "Valera Spanish NT");
 
27
//      RawCom  commentary("src/modules/comments/rawcom/rwp/", "RWP", "Robertson's Word Pictures");
 
28
        RawCom  commentary("src/modules/comments/rawcom/mhc/", "MHC", "Matthew Henry's Commentary on the Whole Bible");
 
29
//      RawFiles  commentary("src/modules/comments/rawfiles/personal/", "MHC", "Matthew Henry's Commentary on the Whole Bible");
 
30
 
 
31
 
 
32
        if (argc > 3)
 
33
                mykey.AutoNormalize(0);  // Turn off autonormalize if 3 args to allow for intros
 
34
                                // This is kludgy but at lease you can try it
 
35
                                // with something like: sword "Matthew 1:0" 1 1
 
36
 
 
37
 
 
38
        mykey = (argc < 2) ? "James    1:19" : argv[1];
 
39
        mykey.Persist(1);
 
40
        text.setKey(mykey);
 
41
        commentary.setKey(mykey);
 
42
 
 
43
 
 
44
        max = (argc < 3) ? 1 : atoi(argv[2]);
 
45
 
 
46
 
 
47
        cout << "\n";
 
48
 
 
49
 
 
50
        for (loop = 0; loop < max; loop++) {
 
51
                cout << (SWKey &)text << ":\n";
 
52
                text.Display();
 
53
                cout << "\n";
 
54
                cout << "-------------\n";
 
55
                commentary.Display();
 
56
                cout << "\n";
 
57
                cout << "==========================\n";
 
58
                mykey++;
 
59
        }
 
60
        cout << "\n\n";
 
61
}