[sword-cvs] sword/src/modules/comments/zcom zcom.cpp,1.26,1.27
sword@www.crosswire.org
sword@www.crosswire.org
Thu, 27 Feb 2003 00:39:39 -0700
Update of /usr/local/cvsroot/sword/src/modules/comments/zcom
In directory www:/tmp/cvs-serv29516/src/modules/comments/zcom
Modified Files:
zcom.cpp
Log Message:
no message
Index: zcom.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/comments/zcom/zcom.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** zcom.cpp 21 Oct 2002 22:48:24 -0000 1.26
--- zcom.cpp 27 Feb 2003 07:39:37 -0000 1.27
***************
*** 56,84 ****
* RET: string buffer with verse
*/
! char *zCom::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;
!
! zreadtext(key->Testament(), start, (size + 2), entrybuf);
! rawFilter(entrybuf, size*FILTERPAD, key);
if (!isUnicode())
! preptext(entrybuf);
! return entrybuf;
}
--- 56,76 ----
* RET: string buffer with verse
*/
! SWBuf &zCom::getRawEntryBuf() {
long start = 0;
unsigned short size = 0;
VerseKey *key = &getVerseKey();
! findOffset(key->Testament(), key->Index(), &start, &size);
entrySize = size; // support getEntrySize call
! entryBuf = "";
! zReadText(key->Testament(), start, size, entryBuf);
! rawFilter(entryBuf, key);
if (!isUnicode())
! prepText(entryBuf);
! return entryBuf;
}
***************
*** 113,117 ****
}
! settext(key->Testament(), key->Index(), inbuf, len);
lastWriteKey = (VerseKey *)key->clone(); // must delete
--- 105,109 ----
}
! doSetText(key->Testament(), key->Index(), inbuf, len);
lastWriteKey = (VerseKey *)key->clone(); // must delete
***************
*** 133,137 ****
srckey = new VerseKey(inkey);
! linkentry(destkey->Testament(), destkey->Index(), srckey->Index());
if (inkey != srckey) // free our key if we created a VerseKey
--- 125,129 ----
srckey = new VerseKey(inkey);
! doLinkEntry(destkey->Testament(), destkey->Index(), srckey->Index());
if (inkey != srckey) // free our key if we created a VerseKey
***************
*** 148,152 ****
VerseKey *key = &getVerseKey();
! settext(key->Testament(), key->Index(), "");
}
--- 140,144 ----
VerseKey *key = &getVerseKey();
! doSetText(key->Testament(), key->Index(), "");
}
***************
*** 165,169 ****
VerseKey *tmpkey = &getVerseKey();
! findoffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
SWKey lastgood = *tmpkey;
--- 157,161 ----
VerseKey *tmpkey = &getVerseKey();
! findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
SWKey lastgood = *tmpkey;
***************
*** 180,184 ****
}
long index = tmpkey->Index();
! findoffset(tmpkey->Testament(), index, &start, &size);
if (
(((laststart != start) || (lastsize != size)) // we're a different entry
--- 172,176 ----
}
long index = tmpkey->Index();
! findOffset(tmpkey->Testament(), index, &start, &size);
if (
(((laststart != start) || (lastsize != size)) // we're a different entry