[sword-cvs] sword/include swbuf.h,1.31,1.32

sword@www.crosswire.org sword@www.crosswire.org
Fri, 2 Apr 2004 16:54:48 -0700


Update of /cvs/core/sword/include
In directory www:/tmp/cvs-serv28564/include

Modified Files:
	swbuf.h 
Log Message:
Added SWBuf method setFormatted(). Altered all remaining uses of char[127] for file names to use SWBufs.

Index: swbuf.h
===================================================================
RCS file: /cvs/core/sword/include/swbuf.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- swbuf.h	27 Mar 2004 09:24:35 -0000	1.31
+++ swbuf.h	2 Apr 2004 23:54:45 -0000	1.32
@@ -137,6 +137,16 @@
 	void set(const SWBuf &newVal);
 
 	/**
+ 	* SWBuf::setFormatted - sets this buf to a formatted strings
+	* If the allocated memory is bigger than the new string, it will NOT be resized.
+	* WARNING: This function can only write at most
+	* JUNKBUFSIZE to the string per call.
+	* @param format The format string. Same syntax as printf, for example.
+	* @param ... Add all arguments here.
+ 	*/
+	void setFormatted(const char *format, ...);
+
+	/**
  	* SWBuf::setSize - Size this buffer to a specific length.
 	* @param len The new size of the buffer. One byte for the null will be added.
  	*/