[sword-cvs] sword/src/modules/texts/ztext ztext.cpp,1.38,1.39
sword@www.crosswire.org
sword@www.crosswire.org
Tue, 25 Feb 2003 21:49:15 -0700
- Previous message: [sword-cvs] sword/src/modules/genbook/rawgenbook rawgenbook.cpp,1.9,1.10
- Next message: [sword-cvs] sword/src/modules/filters latin1utf16.cpp,1.5,1.6 latin1utf8.cpp,1.10,1.11 scsuutf8.cpp,1.7,1.8 thmlheadings.cpp,1.5,1.6 thmlhtmlhref.cpp,1.24,1.25 thmlmorph.cpp,1.5,1.6 utf8utf16.cpp,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/local/cvsroot/sword/src/modules/texts/ztext
In directory www:/tmp/cvs-serv32606/src/modules/texts/ztext
Modified Files:
ztext.cpp
Log Message:
no message
Index: ztext.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/texts/ztext/ztext.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ztext.cpp 21 Oct 2002 22:51:05 -0000 1.38
--- ztext.cpp 26 Feb 2003 04:49:13 -0000 1.39
***************
*** 34,39 ****
*/
! zText::zText(const char *ipath, const char *iname, const char *idesc, int iblockType, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : zVerse(ipath, -1, iblockType, icomp), SWText(iname, idesc, idisp, enc, dir, mark, ilang)/*, SWCompress()*/
! {
blockType = iblockType;
lastWriteKey = 0;
--- 34,39 ----
*/
! zText::zText(const char *ipath, const char *iname, const char *idesc, int iblockType, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang)
! : zVerse(ipath, -1, iblockType, icomp), SWText(iname, idesc, idisp, enc, dir, mark, ilang) {
blockType = iblockType;
lastWriteKey = 0;
***************
*** 60,89 ****
*/
! char *zText::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;
}
--- 60,80 ----
*/
! SWBuf &zText::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;
}
***************
*** 119,123 ****
}
! settext(key.Testament(), key.Index(), inbuf, len);
lastWriteKey = (VerseKey *)key.clone(); // must delete
--- 110,114 ----
}
! doSetText(key.Testament(), key.Index(), inbuf, len);
lastWriteKey = (VerseKey *)key.clone(); // must delete
***************
*** 139,143 ****
srckey = new VerseKey(inkey);
! linkentry(destkey.Testament(), destkey.Index(), srckey->Index());
if (inkey != srckey) // free our key if we created a VerseKey
--- 130,134 ----
srckey = new VerseKey(inkey);
! doLinkEntry(destkey.Testament(), destkey.Index(), srckey->Index());
if (inkey != srckey) // free our key if we created a VerseKey
***************
*** 155,159 ****
VerseKey &key = getVerseKey();
! settext(key.Testament(), key.Index(), "");
}
--- 146,150 ----
VerseKey &key = getVerseKey();
! doSetText(key.Testament(), key.Index(), "");
}
***************
*** 171,175 ****
VerseKey *tmpkey = &getVerseKey();
! findoffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
SWKey lastgood = *tmpkey;
--- 162,166 ----
VerseKey *tmpkey = &getVerseKey();
! findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
SWKey lastgood = *tmpkey;
***************
*** 186,190 ****
}
long index = tmpkey->Index();
! findoffset(tmpkey->Testament(), index, &start, &size);
if (
--- 177,181 ----
}
long index = tmpkey->Index();
! findOffset(tmpkey->Testament(), index, &start, &size);
if (
- Previous message: [sword-cvs] sword/src/modules/genbook/rawgenbook rawgenbook.cpp,1.9,1.10
- Next message: [sword-cvs] sword/src/modules/filters latin1utf16.cpp,1.5,1.6 latin1utf8.cpp,1.10,1.11 scsuutf8.cpp,1.7,1.8 thmlheadings.cpp,1.5,1.6 thmlhtmlhref.cpp,1.24,1.25 thmlmorph.cpp,1.5,1.6 utf8utf16.cpp,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]