[sword-cvs] sword/src/modules/comments/rawcom rawcom.cpp,1.30,1.31
sword@www.crosswire.org
sword@www.crosswire.org
Mon, 24 Feb 2003 21:12:49 -0700
Update of /usr/local/cvsroot/sword/src/modules/comments/rawcom
In directory www:/tmp/cvs-serv2325/src/modules/comments/rawcom
Modified Files:
rawcom.cpp
Log Message:
no message
Index: rawcom.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/comments/rawcom/rawcom.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** rawcom.cpp 21 Oct 2002 22:51:05 -0000 1.30
--- rawcom.cpp 25 Feb 2003 04:12:47 -0000 1.31
***************
*** 52,82 ****
*/
! char *RawCom::getRawEntry() {
long start = 0;
unsigned short size = 0;
VerseKey *key = &getVerseKey();
! findoffset(key->Testament(), key->Index(), &start, &size);
entrySize = size; // support getEntrySize call
! unsigned long newsize = (size + 2) * FILTERPAD;
! if (newsize > entrybufallocsize) {
! if (entrybuf)
! delete [] entrybuf;
! entrybuf = new char [ newsize ];
! entrybufallocsize = newsize;
! }
! *entrybuf = 0;
!
! readtext(key->Testament(), start, (size + 2), entrybuf);
! entrybuf[size] = 0;
! rawFilter(entrybuf, size, 0); // hack, decipher
! rawFilter(entrybuf, size*FILTERPAD, key);
! if (!isUnicode())
! preptext(entrybuf);
! return entrybuf;
}
--- 52,73 ----
*/
! SWBuf &RawCom::getRawEntryBuf() {
long start = 0;
unsigned short size = 0;
VerseKey *key = &getVerseKey();
! findOffset(key->Testament(), key->Index(), &start, &size);
entrySize = size; // support getEntrySize call
! entryBuf = "";
! readText(key->Testament(), start, size, entryBuf);
! rawFilter(entryBuf, 0); // hack, decipher
! rawFilter(entryBuf, key);
! if (!isUnicode())
! prepText(entryBuf);
! return entryBuf;
}
***************
*** 95,99 ****
VerseKey *tmpkey = &getVerseKey();
! findoffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
SWKey lastgood = *tmpkey;
--- 86,90 ----
VerseKey *tmpkey = &getVerseKey();
! findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
SWKey lastgood = *tmpkey;
***************
*** 110,114 ****
}
long index = tmpkey->Index();
! findoffset(tmpkey->Testament(), index, &start, &size);
if (
(((laststart != start) || (lastsize != size)) // we're a different entry
--- 101,105 ----
}
long index = tmpkey->Index();
! findOffset(tmpkey->Testament(), index, &start, &size);
if (
(((laststart != start) || (lastsize != size)) // we're a different entry
***************
*** 126,130 ****
void RawCom::setEntry(const char *inbuf, long len) {
VerseKey *key = &getVerseKey();
! settext(key->Testament(), key->Index(), inbuf, len);
}
--- 117,121 ----
void RawCom::setEntry(const char *inbuf, long len) {
VerseKey *key = &getVerseKey();
! doSetText(key->Testament(), key->Index(), inbuf, len);
}
***************
*** 143,147 ****
srckey = new VerseKey(inkey);
! linkentry(destkey->Testament(), destkey->Index(), srckey->Index());
if (inkey != srckey) // free our key if we created a VerseKey
--- 134,138 ----
srckey = new VerseKey(inkey);
! doLinkEntry(destkey->Testament(), destkey->Index(), srckey->Index());
if (inkey != srckey) // free our key if we created a VerseKey
***************
*** 159,163 ****
VerseKey *key = &getVerseKey();
! settext(key->Testament(), key->Index(), "");
}
--- 150,154 ----
VerseKey *key = &getVerseKey();
! doSetText(key->Testament(), key->Index(), "");
}