[sword-cvs] sword/src/modules swmodule.cpp,1.45,1.46
sword@www.crosswire.org
sword@www.crosswire.org
Thu, 20 Feb 2003 00:25:22 -0700
Update of /usr/local/cvsroot/sword/src/modules
In directory www:/tmp/cvs-serv18313/src/modules
Modified Files:
swmodule.cpp
Log Message:
Started HUGE task of moving all char **buf over to SWBuf &buf
NEED YOUR HELP
Index: swmodule.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/swmodule.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** swmodule.cpp 1 Oct 2002 19:52:40 -0000 1.45
--- swmodule.cpp 20 Feb 2003 07:25:20 -0000 1.46
***************
*** 552,571 ****
const char *SWModule::RenderText(char *buf, int len, bool render) {
entryAttributes.clear();
! char *tmpbuf = (buf) ? buf : getRawEntry();
SWKey *key = 0;
static char *null = "";
if (tmpbuf) {
! unsigned long size = (len < 0) ? ((getEntrySize()<0) ? strlen(tmpbuf) : getEntrySize()) * FILTERPAD : len;
if (size > 0) {
key = (SWKey *)*this;
! optionFilter(tmpbuf, size, key);
if (render) {
! renderFilter(tmpbuf, size, key);
! encodingFilter(tmpbuf, size, key);
}
! else stripFilter(tmpbuf, size, key);
}
}
--- 552,576 ----
const char *SWModule::RenderText(char *buf, int len, bool render) {
entryAttributes.clear();
!
! SWBuf local;
! if (buf)
! local = buf;
!
! SWBuf &tmpbuf = (buf) ? local : getRawEntryBuf();
SWKey *key = 0;
static char *null = "";
if (tmpbuf) {
! unsigned long size = (len < 0) ? ((getEntrySize()<0) ? strlen(tmpbuf) : getEntrySize()) : len;
if (size > 0) {
key = (SWKey *)*this;
! optionFilter(tmpbuf, key);
if (render) {
! renderFilter(tmpbuf, key);
! encodingFilter(tmpbuf, key);
}
! else stripFilter(tmpbuf, key);
}
}