diff options
author | danglassey <danglassey> | 2002-08-28 13:02:00 +0000 |
---|---|---|
committer | danglassey <danglassey> | 2002-08-28 13:02:00 +0000 |
commit | 1e057d67306569fcd9896dfcea1f5353810f0a48 (patch) | |
tree | fa0e30a5552e043e167d762300579cb96f113696 /src/keys/listkey.cpp | |
parent | 6178a13bb73d000bbe49587d0ecb67ea689b043f (diff) | |
download | sword-sf-cvs-1e057d67306569fcd9896dfcea1f5353810f0a48.tar.gz |
sync with crosswire 20020828-1300
Diffstat (limited to 'src/keys/listkey.cpp')
-rw-r--r-- | src/keys/listkey.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/keys/listkey.cpp b/src/keys/listkey.cpp index 0d1ff33..a8afd93 100644 --- a/src/keys/listkey.cpp +++ b/src/keys/listkey.cpp @@ -255,3 +255,21 @@ void ListKey::Remove() { SetToElement((arraypos)?arraypos-1:0); } } + + +/****************************************************************************** + * VerseKey::getRangeText - returns parsable range text for this key + */ + +const char *ListKey::getRangeText() const { + char *buf = new char[(arraycnt + 1) * 255]; + buf[0] = 0; + for (int i = 0; i < arraycnt; i++) { + strcat(buf, array[i]->getRangeText()); + if (i < arraycnt-1) + strcat(buf, "; "); + } + stdstr(&rangeText, buf); + return rangeText; +} + |