[sword-svn] r2761 - trunk/examples/classes
scribe at crosswire.org
scribe at crosswire.org
Sun Jan 6 12:19:16 MST 2013
Author: scribe
Date: 2013-01-06 12:19:15 -0700 (Sun, 06 Jan 2013)
New Revision: 2761
Modified:
trunk/examples/classes/verseposition.cpp
Log:
updated to reflect bug in HunKar
Modified: trunk/examples/classes/verseposition.cpp
===================================================================
--- trunk/examples/classes/verseposition.cpp 2013-01-04 22:07:54 UTC (rev 2760)
+++ trunk/examples/classes/verseposition.cpp 2013-01-06 19:19:15 UTC (rev 2761)
@@ -1,6 +1,4 @@
-
#include <iostream>
-
#include <swmgr.h>
#include <swmodule.h>
#include <versekey.h>
@@ -10,30 +8,19 @@
int main(int argc, char **argv) {
- const char *modName = "HunKar";
+ const char *modName = "HunKar";
+ SWMgr library;
+ SWModule *book = library.getModule(modName);
+ if (!book) {
+ cerr << "Can't find module: " << modName << endl;
+ return -1;
+ }
+ VerseKey* key = ((VerseKey *)book->getKey());
- SWMgr library;
+ key->Headings(true);
+ book->setSkipConsecutiveLinks(true);
+ book->setPosition(TOP);
- SWModule *book = library.getModule(modName);
-
- if (!book) {
- cerr << "Can't find module: " << modName << endl;
- return -1;
- }
-
- VerseKey *key = (VerseKey *)book->CreateKey();
-
- key->setPosition(TOP);
-
- cout << *key << endl;
-
- key->Headings(true);
-
- key->setPosition(TOP);
-
- cout << *key << endl;
-
- delete key;
-
- return 0;
+ cout << *key << endl;
+ return 0;
}
More information about the sword-cvs
mailing list