[sword-cvs] sword/src/keys versekey2.cpp,NONE,1.1 Makefile.am,1.3,1.4
sword@www.crosswire.org
sword@www.crosswire.org
Fri, 9 Apr 2004 10:39:31 -0700
Update of /cvs/core/sword/src/keys
In directory www:/tmp/cvs-serv24050/src/keys
Modified Files:
Makefile.am
Added Files:
versekey2.cpp
Log Message:
dglassey: initial work on multi-versification versekey
--- NEW FILE: versekey2.cpp ---
/******************************************************************************
* VerseKey.cpp - code for class 'VerseKey'- the new version of a standard Biblical verse key
*/
#include <swmacs.h>
#include <utilfuns.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#ifndef __GNUC__
#include <io.h>
#else
#include <unistd.h>
#endif
#include <utilstr.h>
#include <swkey.h>
#include <swlog.h>
[...1514 lines suppressed...]
return offsets[1][(offsets[0][book].offset)+chapter].maxnext;
}
/******************************************************************************
* VerseKey::getRangeText - returns parsable range text for this key
*/
const char *VerseKey::getRangeText() const {
if (isBoundSet()) {
SWBuf buf;
buf.appendFormatted("%s-%s", (const char *)LowerBound(), (const char *)UpperBound());
stdstr(&rangeText, buf.c_str());
}
else stdstr(&rangeText, getText());
return rangeText;
}
SWORD_NAMESPACE_END
Index: Makefile.am
===================================================================
RCS file: /cvs/core/sword/src/keys/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.am 24 Jan 2002 11:19:41 -0000 1.3
+++ Makefile.am 9 Apr 2004 17:39:29 -0000 1.4
@@ -2,8 +2,18 @@
libsword_la_SOURCES += $(keysdir)/swkey.cpp
libsword_la_SOURCES += $(keysdir)/listkey.cpp
-libsword_la_SOURCES += $(keysdir)/versekey.cpp
libsword_la_SOURCES += $(keysdir)/strkey.cpp
libsword_la_SOURCES += $(keysdir)/treekey.cpp
libsword_la_SOURCES += $(keysdir)/treekeyidx.cpp
+
+if BUILDNEWVKEY
+versekey = $(keysdir)/versekey2.cpp
+vkdef = -DVK2
+else
+versekey = $(keysdir)/versekey.cpp
+vkdef =
+endif
+
+libsword_la_SOURCES += $(versekey)
+INCLUDES += $(vkdef)