[sword-devel] osis2mod problem

DM Smith dmsmith at crosswire.org
Tue Mar 17 12:08:37 MST 2009

Can someone help me fix a bug in osis2mod?

The following code works in 1.5.11 to detect whether a verse is in or 
out of the KJV v11n. This was present before my time, so I don't know 
whether it was ever proper or whether it is expected to still work.

bool isKJVRef(const char *buf) {
       VerseKey vk, test;
       vk.Headings(1); // turn on mod/testmnt/book/chap headings
        // lets do some tests on the verse --------------
       vk = buf;
       test = buf; 
      if (vk.Testament() && vk.Book() && vk.Chapter() && vk.Verse()) { 
// if we're not a heading
#ifdef DEBUG
               cout << (const char*)vk << " == "  << (const char*)test 
<< endl;
               return (vk == test);
       else return true;       // no check if we're a heading... 
Probably bad.

I've have changed it to use
        VerseKey *vk = (VerseKey*) module->CreateKey();
to create verse keys, but has the same problem.


More information about the sword-devel mailing list