summaryrefslogtreecommitdiff
path: root/src/modules/genbook/rawgenbook/rawgenbook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/genbook/rawgenbook/rawgenbook.cpp')
-rw-r--r--src/modules/genbook/rawgenbook/rawgenbook.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/modules/genbook/rawgenbook/rawgenbook.cpp b/src/modules/genbook/rawgenbook/rawgenbook.cpp
index eff68f5..6101241 100644
--- a/src/modules/genbook/rawgenbook/rawgenbook.cpp
+++ b/src/modules/genbook/rawgenbook/rawgenbook.cpp
@@ -1,9 +1,11 @@
/******************************************************************************
- * rawtext.cpp - code for class 'RawGenBook'- a module that reads raw text
- * files: ot and nt using indexs ??.bks ??.cps ??.vss
*
+ * rawgenbook.cpp - code for class 'RawGenBook'- a module that reads raw
+ * text files: ot and nt using indexs ??.bks ??.cps ??.vss
*
- * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+ * $Id: rawgenbook.cpp 2833 2013-06-29 06:40:28Z chrislit $
+ *
+ * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -51,13 +53,13 @@ RawGenBook::RawGenBook(const char *ipath, const char *iname, const char *idesc,
stdstr(&path, ipath);
verseKey = !strcmp("VerseKey", keyType);
- if (verseKey) Type("Biblical Texts");
+ if (verseKey) setType("Biblical Texts");
if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
path[strlen(path)-1] = 0;
delete key;
- key = CreateKey();
+ key = createKey();
sprintf(buf, "%s.bdt", path);
@@ -82,7 +84,7 @@ RawGenBook::~RawGenBook() {
}
-bool RawGenBook::isWritable() {
+bool RawGenBook::isWritable() const {
return ((bdtfd->getFd() > 0) && ((bdtfd->mode & FileMgr::RDWR) == FileMgr::RDWR));
}
@@ -94,7 +96,7 @@ bool RawGenBook::isWritable() {
* RET: string buffer with verse
*/
-SWBuf &RawGenBook::getRawEntryBuf() {
+SWBuf &RawGenBook::getRawEntryBuf() const {
__u32 offset = 0;
__u32 size = 0;
@@ -160,7 +162,7 @@ void RawGenBook::linkEntry(const SWKey *inkey) {
SWCATCH ( ... ) {}
// if we don't have a VerseKey * decendant, create our own
if (!srckey) {
- srckey = (TreeKeyIdx *)CreateKey();
+ srckey = (TreeKeyIdx *)createKey();
(*srckey) = *inkey;
}
@@ -207,7 +209,7 @@ char RawGenBook::createModule(const char *ipath) {
}
-SWKey *RawGenBook::CreateKey() const {
+SWKey *RawGenBook::createKey() const {
TreeKey *tKey = new TreeKeyIdx(path);
if (verseKey) { SWKey *vtKey = new VerseTreeKey(tKey); delete tKey; return vtKey; }
return tKey;
@@ -218,7 +220,7 @@ bool RawGenBook::hasEntry(const SWKey *k) const {
int dsize;
key.getUserData(&dsize);
- return (dsize > 7) && key.Error() == '\x00';
+ return (dsize > 7) && key.popError() == '\x00';
}
SWORD_NAMESPACE_END