From: Dejan L. <de...@us...> - 2004-06-11 23:13:26
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31041/rtk Modified Files: Buffer.h Log Message: Latest Buffer class and Dev-C++ project files. Now RTK can be (again) used to develop RTK (thanks to Mikko for fix in String.h) Index: Buffer.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Buffer.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Buffer.h 11 Jun 2004 16:50:58 -0000 1.6 --- Buffer.h 11 Jun 2004 23:13:17 -0000 1.7 *************** *** 47,56 **** #define _RTK_BUFFER_H_ 1 ! #include <rtk/Export.h> ! #include <rtk/Array.h> ! #include <rtk/rtkdef.h> #if _DEBUG ! #include <rtk/String.h> #endif --- 47,58 ---- #define _RTK_BUFFER_H_ 1 ! #include "Export.h" ! #include "Array.h" ! #include "rtkdef.h" ! #include <stdlib.h> /* malloc() */ ! #include <string.h> /* memcpy() */ #if _DEBUG ! #include "String.h" #endif *************** *** 76,86 **** * Default Buffer constructor. */ ! Buffer():_size(0) ! { ! _data = (uchar*) malloc(_allocated = RTK_BUFFER_SIZE); ! Fill('\0'); ! } ! ~Buffer() { delete[] _data; } /** --- 78,84 ---- * Default Buffer constructor. */ ! Buffer(): _size(0), _data(0), _allocated(0) { } ! ~Buffer() { free(_data); } /** *************** *** 101,104 **** --- 99,108 ---- uint GetSize() const { return _size; } + /** + * Resizes Buffer. + * @returns int 0 if everything OK. + */ + int SetSize(uchar arg_size); + /** Writes one single byte to the Buffer object * @param c uchar Byte to be written. |