[sword-cvs] sword/src/modules/comments/rawfiles rawfiles.cpp,1.26,1.27
sword@www.crosswire.org
sword@www.crosswire.org
Wed, 26 Feb 2003 17:56:33 -0700
Update of /usr/local/cvsroot/sword/src/modules/comments/rawfiles
In directory www:/tmp/cvs-serv19819/src/modules/comments/rawfiles
Modified Files:
rawfiles.cpp
Log Message:
Index: rawfiles.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/comments/rawfiles/rawfiles.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** rawfiles.cpp 25 Feb 2003 04:12:47 -0000 1.26
--- rawfiles.cpp 27 Feb 2003 00:56:31 -0000 1.27
***************
*** 128,139 ****
if (size) {
! tmpbuf = new char [ (size + 3) + strlen(path) + 1 ];
! sprintf(tmpbuf, "%s/", path);
! readText(key->Testament(), start, (size + 2), tmpbuf+strlen(tmpbuf));
}
else {
! tmpbuf = new char [ 16 + strlen(path) + 1 ];
! sprintf(tmpbuf, "%s/%s", path, getNextFilename());
! doSetText(key->Testament(), key->Index(), tmpbuf+strlen(path)+1);
}
datafile = FileMgr::systemFileMgr.open(tmpbuf, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC);
--- 128,144 ----
if (size) {
! SWBuf tmpbuf;
! entryBuf = path;
! entryBuf += '/';
! readText(key->Testament(), start, (size + 2), tmpbuf);
! entryBuf += tmpbuf;
}
else {
! SWBuf tmpbuf;
! entryBuf = path;
! entryBuf += '/';
! entryBuf += getNextFilename();
! doSetText(key->Testament(), key->Index(), tmpbuf);
! entryBuf += tmpbuf;
}
datafile = FileMgr::systemFileMgr.open(tmpbuf, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC);
***************
*** 173,177 ****
if (size) {
! tmpbuf = new char [ size + 2];
readText(key->Testament(), start, size + 2, tmpbuf);
--- 178,182 ----
if (size) {
! SWBuf tmpbuf;
readText(key->Testament(), start, size + 2, tmpbuf);
***************
*** 186,190 ****
if (!key)
key = new VerseKey(this->key);
! doSetText(key->Testament(), key->Index(), tmpbuf);
}
--- 191,195 ----
if (!key)
key = new VerseKey(this->key);
! doSetText(key->Testament(), key->Index(), tmpbuf.c_str());
}