[sword-cvs] sword/include swbuf.h,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/include
In directory www:/tmp/cvs-serv11000/include

Modified Files:
	swbuf.h 
Log Message:


Index: swbuf.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/swbuf.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** swbuf.h	20 Feb 2003 07:25:20 -0000	1.2
--- swbuf.h	24 Feb 2003 05:26:15 -0000	1.3
***************
*** 33,36 ****
--- 33,37 ----
  	char *buf;
  	char *end;
+ 	char fillByte;
  	unsigned int allocSize;
  	static char *nullStr;
***************
*** 38,41 ****
--- 39,43 ----
  
  	void assureSize(unsigned int size);
+ 	void init();
  
  public:
***************
*** 44,47 ****
--- 46,52 ----
  	SWBuf(const SWBuf &other);
  
+ 	void setFillByte(char ch) { fillByte = ch; }
+ 	char getFillByte() { return fillByte; }
+ 
  	virtual ~SWBuf();
  
***************
*** 53,56 ****
--- 58,62 ----
  	void set(const char *newVal);
  	void set(const SWBuf &newVal);
+ 	void setSize(unsigned int len);
  	void append(const char *str);
  	void append(const SWBuf &str);
***************
*** 65,70 ****
  	SWBuf &operator +=(const char *str) { append(str); return *this; }
  	SWBuf &operator +=(char ch) { append(ch); return *this; }
! 	SWBuf operator +(const SWBuf &other);
! 	SWBuf operator +(char ch) { return (*this) + SWBuf(ch); }
  };
  
--- 71,78 ----
  	SWBuf &operator +=(const char *str) { append(str); return *this; }
  	SWBuf &operator +=(char ch) { append(ch); return *this; }
! 	SWBuf &operator -=(unsigned int len) { setSize(length()-len); return *this; }
! 	SWBuf &operator --() { operator -=(1); return *this; }
! 	SWBuf operator +(const SWBuf &other) const;
! 	SWBuf operator +(char ch) const { return (*this) + SWBuf(ch); }
  };