aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-09-29 13:01:33 +0000
committerdanglassey <danglassey>2002-09-29 13:01:33 +0000
commit2cccf0ee964afca56e9fb6b532ab9f863fc6091f (patch)
tree4eb52f7bac13ea5a82cf581fee805ff6269de71c
parent1503eed6289ffbf12185d73a9fa4dbde8a7b5fba (diff)
downloadsword-sf-cvs-2cccf0ee964afca56e9fb6b532ab9f863fc6091f.tar.gz
sync with crosswire 20020929-1300
-rw-r--r--ChangeLog11
-rw-r--r--include/swcom.h6
-rw-r--r--include/swkey.h3
-rw-r--r--include/swmodule.h7
-rw-r--r--include/swtext.h4
-rw-r--r--scripts/mksword11
-rw-r--r--src/modules/comments/rawcom/rawcom.cpp2
-rw-r--r--src/modules/comments/swcom.cpp38
-rw-r--r--src/modules/texts/swtext.cpp38
9 files changed, 115 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4de4fb8..d6b65d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
API ChangeLog (see the ChangeLog in each 'apps' directory for
app specific changes
+
+28-Sep-2002 Troy A. Griffitts <scribe@crosswire.org>
+ Added SWModule::Index and SWCom and SWText impls
+
+
+* Release 1.5.4 *
+
+25-Sep-2002 Troy A. Griffitts <scribe@crosswire.org>
+ Fixed zverse zstr zcom ztext zld to work with cipher
+ Added cipher key to mod2zmod
+
27-Aug-2002 Troy A. Griffitts <scribe@crosswire.org>
Added Nikolay Igotti's logic for improved non-western
locale functionality
diff --git a/include/swcom.h b/include/swcom.h
index ee95f99..c0b7420 100644
--- a/include/swcom.h
+++ b/include/swcom.h
@@ -2,7 +2,7 @@
* swcom.h - code for base class 'SWCom'. SWCom is the basis for all
* types of commentary modules
*
- * $Id: swcom.h,v 1.10 2002/07/28 01:48:38 scribe Exp $
+ * $Id: swcom.h,v 1.11 2002/09/29 03:21:08 scribe Exp $
*
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -47,6 +47,10 @@ public:
virtual ~SWCom();
virtual SWKey *CreateKey() { return new VerseKey(); }
+ virtual long Index() const;
+ virtual long Index(long iindex);
+
+
// OPERATORS -----------------------------------------------------------------
diff --git a/include/swkey.h b/include/swkey.h
index ca3d2a8..1b58145 100644
--- a/include/swkey.h
+++ b/include/swkey.h
@@ -3,7 +3,7 @@
* types of keys for indexing into modules (e.g. verse, word,
* place, etc.)
*
- * $Id: swkey.h,v 1.21 2002/09/04 00:52:59 scribe Exp $
+ * $Id: swkey.h,v 1.22 2002/09/29 03:21:08 scribe Exp $
*
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -202,6 +202,7 @@ public:
* return text;
* @endcode
*/
+
virtual long Index() const { return index; }
virtual long Index(long iindex) { index = iindex; return index; }
diff --git a/include/swmodule.h b/include/swmodule.h
index cb82860..0f27df6 100644
--- a/include/swmodule.h
+++ b/include/swmodule.h
@@ -3,7 +3,7 @@
* types of modules (e.g. texts, commentaries, maps, lexicons,
* etc.)
*
-* $Id: swmodule.h,v 1.52 2002/09/25 22:14:58 scribe Exp $
+* $Id: swmodule.h,v 1.53 2002/09/29 03:21:08 scribe Exp $
*
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -121,6 +121,7 @@ protected:
FilterList *encodingFilters;
int entrySize;
+ mutable long entryIndex; // internal common storage for index
public:
/**
@@ -183,6 +184,10 @@ protected:
char SetKey(const SWKey *ikey) { return setKey(ikey); }
virtual char setKey(const SWKey *ikey);
+
+ virtual long Index() const { return entryIndex; }
+ virtual long Index(long iindex) { entryIndex = iindex; return entryIndex; }
+
/**
* Sets the key of this module. Similar to @see SetKey(const SWKey*) .
* @param ikey The SWKey which should be used as new key.
diff --git a/include/swtext.h b/include/swtext.h
index ee2b92b..14308db 100644
--- a/include/swtext.h
+++ b/include/swtext.h
@@ -2,7 +2,7 @@
* swtext.h - code for base class 'SWText'. SWText is the basis for all
* types of text modules
*
- * $Id: swtext.h,v 1.11 2002/07/28 01:48:38 scribe Exp $
+ * $Id: swtext.h,v 1.12 2002/09/29 03:21:08 scribe Exp $
*
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -50,6 +50,8 @@ public:
*/
virtual SWKey *CreateKey();
+ virtual long Index() const;
+ virtual long Index(long iindex);
// OPERATORS -----------------------------------------------------------------
diff --git a/scripts/mksword b/scripts/mksword
index f853d1e..cb1bed6 100644
--- a/scripts/mksword
+++ b/scripts/mksword
@@ -1,6 +1,15 @@
+#!/bin/sh
REV=`cd ..;basename \`pwd ..\`|cut -d\- -f2`
+SWORDVER=`grep "define SWORDVER" ../include/swversion.h |cut -f3 -d" "`
+
+if [ "$REF" != "$SWORDVER" ]; then
+ echo $"Directory version is $REV, but swversion.h has $SWORDVER"
+ exit 1
+fi
+
chmod +x *
chmod +x ../apps/X11/cheatah/configure
chmod +x ../apps/X11/cheatah/missing
-cp sapphire.cpp ../src/modules/common
+#cp sapphire.cpp ../src/modules/common
cd ../..; tar -v -c -p -s -z --exclude sword-$REV/bin -X sword-$REV/modlist -f sword-$REV.tar.gz sword-$REV/*
+
diff --git a/src/modules/comments/rawcom/rawcom.cpp b/src/modules/comments/rawcom/rawcom.cpp
index 0f5396b..8d789af 100644
--- a/src/modules/comments/rawcom/rawcom.cpp
+++ b/src/modules/comments/rawcom/rawcom.cpp
@@ -221,3 +221,5 @@ void RawCom::deleteEntry() {
if (key != this->key)
delete key;
}
+
+
diff --git a/src/modules/comments/swcom.cpp b/src/modules/comments/swcom.cpp
index 1feb0cf..21afd8e 100644
--- a/src/modules/comments/swcom.cpp
+++ b/src/modules/comments/swcom.cpp
@@ -28,3 +28,41 @@ SWCom::SWCom(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTex
SWCom::~SWCom()
{
}
+
+
+long SWCom::Index() const {
+ VerseKey *key = 0;
+ try {
+ key = SWDYNAMIC_CAST(VerseKey, this->key);
+ }
+ catch ( ... ) {}
+ if (!key)
+ key = new VerseKey(this->key);
+
+ entryIndex = key->NewIndex();
+
+ if (key != this->key)
+ delete key;
+
+ return entryIndex;
+}
+
+long SWCom::Index(long iindex) {
+ VerseKey *key = 0;
+ try {
+ key = SWDYNAMIC_CAST(VerseKey, this->key);
+ }
+ catch ( ... ) {}
+ if (!key)
+ key = new VerseKey(this->key);
+
+ key->Testament(1);
+ key->Index(iindex);
+
+ if (key != this->key) {
+ this->key->copyFrom(*key);
+ delete key;
+ }
+
+ return Index();
+}
diff --git a/src/modules/texts/swtext.cpp b/src/modules/texts/swtext.cpp
index 5f6b424..dc8ea43 100644
--- a/src/modules/texts/swtext.cpp
+++ b/src/modules/texts/swtext.cpp
@@ -38,3 +38,41 @@ SWKey *SWText::CreateKey()
{
return new VerseKey();
}
+
+
+long SWText::Index() const {
+ VerseKey *key = 0;
+ try {
+ key = SWDYNAMIC_CAST(VerseKey, this->key);
+ }
+ catch ( ... ) {}
+ if (!key)
+ key = new VerseKey(this->key);
+
+ entryIndex = key->NewIndex();
+
+ if (key != this->key)
+ delete key;
+
+ return entryIndex;
+}
+
+long SWText::Index(long iindex) {
+ VerseKey *key = 0;
+ try {
+ key = SWDYNAMIC_CAST(VerseKey, this->key);
+ }
+ catch ( ... ) {}
+ if (!key)
+ key = new VerseKey(this->key);
+
+ key->Testament(1);
+ key->Index(iindex);
+
+ if (key != this->key) {
+ this->key->copyFrom(*key);
+ delete key;
+ }
+
+ return Index();
+}