[sword-cvs] sword/tests outputcps.cpp,1.1,1.2
sword at www.crosswire.org
sword at www.crosswire.org
Fri May 7 10:54:12 MST 2004
Update of /cvs/core/sword/tests
In directory www:/tmp/cvs-serv8174/tests
Modified Files:
outputcps.cpp
Log Message:
dglassey: cope with "Module Header" being a 'book'
Index: outputcps.cpp
===================================================================
RCS file: /cvs/core/sword/tests/outputcps.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- outputcps.cpp 8 Apr 2004 22:52:09 -0000 1.1
+++ outputcps.cpp 7 May 2004 17:54:10 -0000 1.2
@@ -1,6 +1,11 @@
#include <stdio.h>
#include <versekey.h>
+/*
+This program requires versekey.h to be changed locally so that
+otbks, otcps, ntbks and ntcps are public
+*/
+
using namespace sword;
int
@@ -17,7 +22,8 @@
//tk->Chapter(0);
//tk->Verse(0);
//printf("bcv %d %d:%d\n", tk->Book(), tk->Chapter(), tk->Verse());
- printf("{0, 0}, // OT Header\n");
+ printf("{0, 0}, // Module Header\n");
+ printf("{1, 0}, // OT Header\n");
while (tk->Testament() == 1)
{
offset1 = tk->otbks[tk->Book()];
@@ -39,13 +45,13 @@
offset1 = tk->ntbks[tk->Book()];
if (tk->Chapter() == 1) {
offset2 = tk->ntcps[(int)offset1]+otoffset;
- printf("{%d, 0}, // %s:0\n", offset2, tk->getBookName());
+ printf("{%d, 0}, // %s:0\n", offset2-1, tk->getBookName());
}
offset2 = tk->ntcps[(int)offset1 + tk->Chapter()] + otoffset;
vmaxarray = tk->builtin_books[tk->Testament()-1][tk->Book()-1].versemax;
vmax = vmaxarray[tk->Chapter()-1];
- printf("{%d, %d}, // %s:%d\n", offset2, vmax, tk->getBookName(), tk->Chapter());
+ printf("{%d, %d}, // %s:%d\n", offset2-1, vmax, tk->getBookName(), tk->Chapter());
tk->Chapter(tk->Chapter()+1);
}
delete tk;
More information about the sword-cvs
mailing list