[sword-devel] Magic testament numbers in Sword

DM Smith dmsmith at crosswire.org
Sun Mar 19 14:51:01 MST 2017

I’ve always wanted to know the answer to that too. Osis2mod can’t handle Bible or Testament introductions as it (meaning me, since I code it) doesn’t know how to construct an address for them. Not sure how any front end addresses them.

From memory and I may not have this right:
The idx files for the OT and NT have index 0 for the module introduction and index 1 for the testament introduction. Index 1  the address of testament #, book 0, chapter 0, verse 0.

Index 2 is for the introduction for the first book of the testament. Addressed as testament #, book 1, chapter 0, verse 0.

Index 3 is for the introduction of the first chapter of that book. Addressed as testament #, book 1, chapter 1, verse 0.

Index 4 is for the first verse of the first chapter of the first book of the testament. Addressed as testement #, book 1, chapter 1, verse 1.

If you have a single testament, the module introduction is in that testament.

But I’ve never seen an example of module or testament intros working.


> On Mar 19, 2017, at 5:33 PM, Jaak Ristioja <jaak at ristioja.ee> wrote:
> Hello!
> I have a question about a magic number in the zVerse, zVerse4, RawVerse
> and RawVerse4 classes. More precisely, some of their methods take as
> argument a variable "testmt" of type char. For some methods the code
> comments states:
>  testmt    - testament to find (0 - Bible/module introduction)
> but for other methods:
>  testmt  - testament file to search in (0 - Old; 1 - New)
> Am I correct that the code comments is outdated with respect to the
> code, and it should actually read something like:
>  (0 - Bible/Module introduction; 1 - Old Testament, 2 - New Testament)
> Thanks,
> J
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list