Last active
December 15, 2015 06:39
-
-
Save greg-hellings/5218094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <swmgr.h> | |
#include <swmodule.h> | |
#include <versekey.h> | |
#include <stdio.h> | |
void out(sword::VerseKey* key, int expected) { | |
printf("intro: %i\nbk (%i): %i\nch (%i): %i\nvs (%i): %i\n-----------------\n", | |
key->isIntros(), | |
expected, key->getBook(), | |
expected, key->getChapter(), | |
expected, key->getVerse()); | |
} | |
int main(void) { | |
sword::SWMgr* mgr = new sword::SWMgr(); | |
sword::SWModule* mod = mgr->getModule("KJV"); | |
sword::VerseKey* key = (sword::VerseKey*) mod->getKey(); | |
key->setText("Genesis 1:1"); | |
key->setAutoNormalize(0); | |
// Original setting | |
out(key, 1); | |
// Set value directly | |
key->setBook(0); | |
key->setChapter(0); | |
key->setVerse(0); | |
out(key, 1); | |
key->setText("Genesis 1:1"); | |
key->setIntros(1); | |
// Set value directly | |
key->setVerse(0); | |
key->setChapter(0); | |
key->setBook(0); | |
out(key, 0); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment