From: Mikko L. <laz...@us...> - 2004-06-13 07:50:54
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7243 Modified Files: buffer0.cpp Log Message: minor Index: buffer0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/buffer0.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buffer0.cpp 12 Jun 2004 22:46:58 -0000 1.3 --- buffer0.cpp 13 Jun 2004 07:50:45 -0000 1.4 *************** *** 40,48 **** ***************************************************************************/ - #include "../test.h" #include <rtk/Buffer.h> #include <rtk/File.h> #include <stdio.h> using namespace Rtk; --- 40,49 ---- ***************************************************************************/ #include <rtk/Buffer.h> #include <rtk/File.h> #include <stdio.h> + #include "../test.h" + using namespace Rtk; *************** *** 50,66 **** { Buffer buf; ! File f("dump.dat", File::WRITE|File::CREATE|File::BINARY); printf("Initial allocated: %d\n", buf.GetAllocated()); printf("Initial size: %d\n", buf.GetSize()); ! buf.SetSize(256); ! printf("After resizing allocated: %d\n", buf.GetAllocated()); printf("After resizing size: %d\n", buf.GetSize()); ! buf.Fill(1); ! buf.To(&f); ! f.Close(); getchar(); --- 51,70 ---- { Buffer buf; ! File wf(_R("dump.out"), File::WRITE|File::CREATE|File::BINARY); ! File rf(_R("dump.in"), File::READ|File::BINARY); printf("Initial allocated: %d\n", buf.GetAllocated()); printf("Initial size: %d\n", buf.GetSize()); ! buf.SetSize(256); ! printf("After resizing allocated: %d\n", buf.GetAllocated()); printf("After resizing size: %d\n", buf.GetSize()); ! if(rf.IsOpen()) ! buf.From(&rf); ! else ! buf.Fill(1); ! buf.To(&wf); getchar(); |