[sword-cvs] sword/src/utilfuns swbuf.cpp,1.2,1.3
sword@www.crosswire.org
sword@www.crosswire.org
Sun, 23 Feb 2003 22:26:18 -0700
Update of /usr/local/cvsroot/sword/src/utilfuns
In directory www:/tmp/cvs-serv11000/src/utilfuns
Modified Files:
swbuf.cpp
Log Message:
Index: swbuf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/utilfuns/swbuf.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** swbuf.cpp 20 Feb 2003 07:25:20 -0000 1.2
--- swbuf.cpp 24 Feb 2003 05:26:15 -0000 1.3
***************
*** 51,54 ****
--- 51,55 ----
end = buf;
}
+ init();
}
***************
*** 60,63 ****
--- 61,65 ----
end = buf + allocSize - 1;
allocSize += 5;
+ init();
}
***************
*** 68,73 ****
--- 70,79 ----
*buf = initVal;
end = buf+1;
+ init();
}
+ void SWBuf::init() {
+ fillByte = ' ';
+ }
/******************************************************************************
***************
*** 140,144 ****
! SWBuf SWBuf::operator +(const SWBuf &other) {
SWBuf retVal = buf;
retVal += other;
--- 146,163 ----
! /******************************************************************************
! * SWBuf::setSize - Size this buffer to a specific length
! */
!
! void SWBuf::setSize(unsigned int len) {
! assureSize(len+1);
! if ((end - buf) < len)
! memset(end, fillByte, len - (end-buf));
! end = buf + len;
! end[1] = 0;
! }
!
!
! SWBuf SWBuf::operator + (const SWBuf &other) const {
SWBuf retVal = buf;
retVal += other;