Troy,
HunKar is the only module I am aware of that has the problem. I also
note that sword 1.6.2 has the problem and 1.6.1 does not.
Gary
On 03/03/2012 06:26 PM, Troy A. Griffitts wrote:
Gary,
Thank you so much for investing the time to put in the leg work to
investigate this and provide a concise example that represents the
problem. I seems to be a bug in the skipConsecutiveLinks flag with
regard to Testament 1 Header.
Did you say this only happens on the HunKar module?
I have stepped through the code and something is certainly wrong--
even if there is a module bug. I'm not saying there is one, but even
if there is a strange link in the headings, the -- operator on the
module shouldn't jump from Testament 1 Heading to Malachi :)
I'll let you know what I find. Any more information you have would be
useful. Again, thanks for investing the time. This is exactly what
we need to debug this.
Troy
On 03/03/2012 06:05 AM, Gary Holmlund wrote:
Troy,
I found it takes both of these conditions to cause the problem.
key->Headings(true);
book->setSkipConsecutiveLinks(true);
The program below outputs Malachi 1:1
Should BibleTime do something different or is this a sword issue.
Gary
#include <iostream>
#include <swmgr.h>
#include <swmodule.h>
#include <versekey.h>
using namespace sword;
using namespace std;
int main(int argc, char **argv) {
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());
key->Headings(true);
book->setSkipConsecutiveLinks(true);
book->setPosition(TOP);
cout << *key << endl;
return 0;
}
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page