You can subscribe to this list here.
2004 |
Jan
|
Feb
(48) |
Mar
(80) |
Apr
(9) |
May
(2) |
Jun
(91) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Dejan L. <de...@us...> - 2004-04-19 20:53:10
|
Update of /cvsroot/rtk/rtk/src/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7000/src/core Added Files: Mmap.cpp Log Message: Mmap is small, simple, and IMHO usefull wrapper around *map* functions... --- NEW FILE: Mmap.cpp --- /** * * RTK * Fast and easy cross-platform GUI ToolKit. * * Copyright (C) 2001-200x RTK Development Team * * This library is free software; you can redistribute it and/or modify it * under the terms of the slightly modified (see the "EXCEPTION NOTICE" part * of RTK Library License) GNU Lesser General Public License as published * by the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * and along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA . * * Also you should have received a copy of RTK Library License, if not please * write an e-mail to some of RTK authors (listed in file AUTHORS). * * Bug reports: bu...@rt... * Suggestions: rf...@rt... ***************************************************************************/ /** * $Source: /cvsroot/rtk/rtk/src/core/Mmap.cpp,v $ ***** * Authors (chronological order): * Dejan Lekic, de...@nu... (dejan§rtk.cx) * Contributors (chronological order): * $fname $lname, $email ***** * T0D0 List: * - ***************************************************************************/ #include <rtk/Mmap.h> namespace Rtk { Mmap::Mmap() { _file_opened = false; _filename = 0; _len = 0; _fd = -1; _prot = PROT_READ|PROT_WRITE; _shared = MAP_SHARED; _mmapAddress = (caddr_t) -1; } // Mmap() constructor Mmap::Mmap(const String& fname, bool bc) { if (SetFilename(fname.c_str(), bc)) _file_opened = true; else _file_opened = false; _len = 0; _fd = -1; _prot = PROT_READ|PROT_WRITE; _shared = MAP_SHARED; _mmapAddress = (caddr_t) -1; } // Mmap() constructor Mmap::~Mmap() { // free filename if (_filename) delete _filename; // close file if (_fd >= 0) close(_fd); // unmap file if (_mmap_address) munmap(_mmap_address, _len); } // ~Mmap() destructor bool Mmap::SetFilename(const char *filename, bool create) { int len = strlen(filename)+1; _filename = new RCHAR [len]; strcpy(_filename, filename); struct stat statbuf; if (!create) { _fd = open(_filename, O_RDWR) ; } else { _fd = open(_filename, O_RDWR|O_CREAT, 00600); } // Return -1 as result if opening went wrong if (_fd < 0) return false; int rc = stat(_filename, &statbuf); if (rc < 0) { return false; } _len = (size_t) statbuf.st_size; return true; } // SetFilename() void Mmap::SetSize(uint size) { if (_len != size) { lseek(_fd, (off_t) size, SEEK_SET); write(_fd, "", 1); ftruncate(_fd, size); } _len = size; } void* Mmap::Map() { _mmap_address = (void*)mmap(0, _len, _prot, _shared, _fd, 0); return _mmap_address; } // Map() void Mmap::Bzero() { if (_mmap_address != (void*)-1) memset(_mmap_address, 0, _len); } // Bzero() }; // Rtk /** * $Id: Mmap.cpp,v 1.1 2004/04/19 20:53:02 dejan Exp $ ***************************************************************************/ |
From: Dejan L. <de...@us...> - 2004-04-01 10:10:15
|
Update of /cvsroot/rtk/rtk/ide/devcxx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3978/ide/devcxx Modified Files: librtk_private.h librtk_private.rc Log Message: Latest Dev-C++ project files for librtk. Index: librtk_private.h =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk_private.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** librtk_private.h 8 Mar 2004 19:55:22 -0000 1.11 --- librtk_private.h 1 Apr 2004 09:58:18 -0000 1.12 *************** *** 6,14 **** // VERSION DEFINITIONS ! #define VER_STRING "0.1.1.68" #define VER_MAJOR 0 #define VER_MINOR 1 #define VER_RELEASE 1 ! #define VER_BUILD 68 #define COMPANY_NAME "" #define FILE_VERSION "" --- 6,14 ---- // VERSION DEFINITIONS ! #define VER_STRING "0.1.1.69" #define VER_MAJOR 0 #define VER_MINOR 1 #define VER_RELEASE 1 ! #define VER_BUILD 69 #define COMPANY_NAME "" #define FILE_VERSION "" Index: librtk_private.rc =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk_private.rc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** librtk_private.rc 8 Mar 2004 19:55:23 -0000 1.11 --- librtk_private.rc 1 Apr 2004 09:58:18 -0000 1.12 *************** *** 9,14 **** // 1 VERSIONINFO ! FILEVERSION 0,1,1,68 ! PRODUCTVERSION 0,1,1,68 FILETYPE VFT_DLL { --- 9,14 ---- // 1 VERSIONINFO ! FILEVERSION 0,1,1,69 ! PRODUCTVERSION 0,1,1,69 FILETYPE VFT_DLL { *************** *** 28,30 **** --- 28,34 ---- } } + BLOCK "VarFileInfo" + { + VALUE "Translation", 0x0409, 1252 + } } |
From: Dejan L. <de...@us...> - 2004-04-01 10:09:16
|
Update of /cvsroot/rtk/rtk/ide/bcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3827/ide/bcb Modified Files: librtk.bpr Log Message: Latest Borland C++ Builder project file for librtk. Index: librtk.bpr =================================================================== RCS file: /cvsroot/rtk/rtk/ide/bcb/librtk.bpr,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** librtk.bpr 14 Feb 2004 19:37:00 -0000 1.4 --- librtk.bpr 1 Apr 2004 09:57:18 -0000 1.5 *************** *** 7,11 **** <OBJFILES value="..\..\obj\librtk.obj ..\..\obj\String.obj ..\..\obj\error.obj ..\..\obj\debug.obj ..\..\obj\Variant.obj ..\..\obj\List.obj ! ..\..\obj\SList.obj ..\..\obj\Dict.obj"/> <RESFILES value="librtk.res"/> <DEFFILE value=""/> --- 7,13 ---- <OBJFILES value="..\..\obj\librtk.obj ..\..\obj\String.obj ..\..\obj\error.obj ..\..\obj\debug.obj ..\..\obj\Variant.obj ..\..\obj\List.obj ! ..\..\obj\SList.obj ..\..\obj\Dict.obj ..\..\obj\Vector.obj ! ..\..\obj\Array.obj ..\..\obj\Buffer.obj ..\..\obj\rchar.obj ! ..\..\obj\Thread.obj ..\..\obj\File.obj ..\..\obj\Mutex.obj"/> <RESFILES value="librtk.res"/> <DEFFILE value=""/> *************** *** 20,24 **** nmfast.bpi bcbie.bpi soaprtl.bpi dclocx.bpi dbexpress.bpi dbxcds.bpi indy.bpi bcb2kaxserver.bpi"/> ! <PATHCPP value=".;..\..\src\core"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> --- 22,26 ---- nmfast.bpi bcbie.bpi soaprtl.bpi dclocx.bpi dbexpress.bpi dbxcds.bpi indy.bpi bcb2kaxserver.bpi"/> ! <PATHCPP value=".;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core;..\..\src\core\platform\win32;..\..\src\core\platform\win32;..\..\src\core\platform\win32"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> *************** *** 30,35 **** <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/> <MAINSOURCE value="librtk.bpf"/> ! <INCLUDEPATH value="..\..\src\core;..\..\ide\bcb;$(BCB)\include;$(BCB)\include\vcl;..\..\rtk;..\.."/> ! <LIBPATH value="..\..\src\core;..\..\ide\bcb;$(BCB)\lib\obj;$(BCB)\lib;..\..\lib"/> <WARNINGS value="-w-par"/> <OTHERFILES value=""/> --- 32,37 ---- <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/> <MAINSOURCE value="librtk.bpf"/> ! <INCLUDEPATH value="..\..\src\core\platform\win32;..\..\src\core;..\..\ide\bcb;$(BCB)\include;$(BCB)\include\vcl;..\..\rtk;..\.."/> ! <LIBPATH value="..\..\src\core\platform\win32;..\..\src\core;..\..\ide\bcb;$(BCB)\lib\obj;$(BCB)\lib;..\..\lib"/> <WARNINGS value="-w-par"/> <OTHERFILES value=""/> *************** *** 61,64 **** --- 63,73 ---- <FILE FILENAME="..\..\src\core\SList.cpp" FORMNAME="" UNITNAME="SList" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> <FILE FILENAME="..\..\src\core\Dict.cpp" FORMNAME="" UNITNAME="Dict" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="..\..\src\core\Vector.cpp" FORMNAME="" UNITNAME="Vector.cpp" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="..\..\src\core\Array.cpp" FORMNAME="" UNITNAME="Array.cpp" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="..\..\src\core\Buffer.cpp" FORMNAME="" UNITNAME="Buffer.cpp" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="..\..\src\core\rchar.cpp" FORMNAME="" UNITNAME="rchar.cpp" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="..\..\src\core\platform\win32\Thread.cpp" FORMNAME="" UNITNAME="Thread.cpp" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="..\..\src\core\platform\win32\File.cpp" FORMNAME="" UNITNAME="File.cpp" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> + <FILE FILENAME="..\..\src\core\platform\win32\Mutex.cpp" FORMNAME="" UNITNAME="Mutex.cpp" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/> </FILELIST> <BUILDTOOLS> |
From: Szasz P. <sp...@us...> - 2004-03-19 21:28:23
|
Update of /cvsroot/rtk/rtk/src/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4881/src/templates Modified Files: test_core.cpp Log Message: Added some stuff :-) Index: test_core.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/templates/test_core.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_core.cpp 14 Mar 2004 11:32:05 -0000 1.1 --- test_core.cpp 19 Mar 2004 21:18:32 -0000 1.2 *************** *** 45,48 **** --- 45,59 ---- #include "../test.h" + int main(int arg, char * argv[]) + { + TITLE(_R("Test file for class ***")); + + // todo + + WAIT_KEY + + return 1; + } + /** * $Id$ |
From: Szasz P. <sp...@us...> - 2004-03-19 21:21:12
|
Update of /cvsroot/rtk/rtk/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3418/test Modified Files: test.h Log Message: Some minor fix and added some _R macros to array0 test Index: test.h =================================================================== RCS file: /cvsroot/rtk/rtk/test/test.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** test.h 17 Mar 2004 19:37:08 -0000 1.11 --- test.h 19 Mar 2004 21:11:18 -0000 1.12 *************** *** 12,19 **** #undef STEP ! #if 0 #define STEP(x) IncStep();rprintf(_R("$ %s\n"), _R(#x));x #define OUT(msg, val) IncStep();rprintf(_R("> ") _R(msg) _R("\n"), val) #define TITLE(x) \ --- 12,20 ---- #undef STEP ! #if 0 || UNICODE #define STEP(x) IncStep();rprintf(_R("$ %s\n"), _R(#x));x #define OUT(msg, val) IncStep();rprintf(_R("> ") _R(msg) _R("\n"), val) + #define OUTD OUT #define TITLE(x) \ *************** *** 49,53 **** rprintf(_R("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n")); \ const char * f_out_name_ = __FILE__ ".out"; \ ! const char * f_out_name = f_out_name_ + rstrlen(f_out_name_) - 1; \ while (f_out_name > f_out_name_ && f_out_name[-1] != '/') f_out_name--; \ rprintf(_R("Output of the STEP and OUT macros can be found also in the file `%s'\n"), f_out_name); \ --- 50,54 ---- rprintf(_R("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n")); \ const char * f_out_name_ = __FILE__ ".out"; \ ! const char * f_out_name = f_out_name_ + strlen(f_out_name_) - 1; \ while (f_out_name > f_out_name_ && f_out_name[-1] != '/') f_out_name--; \ rprintf(_R("Output of the STEP and OUT macros can be found also in the file `%s'\n"), f_out_name); \ |
From: Szasz P. <sp...@us...> - 2004-03-19 21:21:12
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3418/test/core Modified Files: array0.cpp Log Message: Some minor fix and added some _R macros to array0 test Index: array0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/array0.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** array0.cpp 17 Mar 2004 19:37:08 -0000 1.2 --- array0.cpp 19 Mar 2004 21:11:18 -0000 1.3 *************** *** 23,28 **** if(f) a->qsort(f); for(uint n=0; n<a->GetCount(); n++) ! printf("ia[%d] = %d\n", n, a->GetAt(n)); ! printf("\n"); } --- 23,28 ---- if(f) a->qsort(f); for(uint n=0; n<a->GetCount(); n++) ! rprintf(_R("ia[%d] = %d\n"), n, a->GetAt(n)); ! rprintf(_R("\n")); } *************** *** 63,71 **** #ifdef _WIN32 DWORD t2 = GetTickCount(); ! printf("Time used: %d millisecs\n", t2-t1); #endif // print ! printf("IntArray %s count: %d internal size: %d\n\n", (prealloc ? "(preallocated)" : ""), ia.GetCount(), ia.GetSize()); } --- 63,71 ---- #ifdef _WIN32 DWORD t2 = GetTickCount(); ! rprintf(_R("Time used: %d millisecs\n"), t2-t1); #endif // print ! rprintf(_R("IntArray %s count: %d internal size: %d\n\n"), (prealloc ? _R("(preallocated)") : _R("")), ia.GetCount(), ia.GetSize()); } *************** *** 88,98 **** // Print out: ! STEP(printf("Original order:\n")); print(&ia); ! STEP(printf("Ascending order:\n")); print(&ia, cmp_int_a); ! STEP(printf("Descending order:\n")); print(&ia, cmp_int_d); --- 88,98 ---- // Print out: ! STEP(rprintf(_R("Original order:\n"))); print(&ia); ! STEP(rprintf(_R("Ascending order:\n"))); print(&ia, cmp_int_a); ! STEP(rprintf(_R("Descending order:\n"))); print(&ia, cmp_int_d); |
From: Szasz P. <sp...@us...> - 2004-03-17 21:41:43
|
Update of /cvsroot/rtk/rtk/src/core/platform/epoc32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16314/src/core/platform/epoc32 Added Files: wchar.cpp Log Message: Forgot this file, it is needed for symbian port --- NEW FILE: wchar.cpp --- /** * * RTK * Fast and easy cross-platform GUI ToolKit. * * Copyright (C) 2001-200x RTK Development Team * * This library is free software; you can redistribute it and/or modify it * under the terms of the slightly modified (see the "EXCEPTION NOTICE" part * of RTK Library License) GNU Lesser General Public License as published * by the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * and along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA . * * Also you should have received a copy of RTK Library License, if not please * write an e-mail to some of RTK authors (listed in file AUTHORS). * * Bug reports: bu...@rt... * Suggestions: rf...@rt... ***************************************************************************/ /** * $Source: /cvsroot/rtk/rtk/src/core/platform/epoc32/wchar.cpp,v $ ***** * Authors (chronological order): * Pal Szasz, sp...@at... * Contributors (chronological order): * $fname $lname, $email ***** * T0D0 List: * - ***************************************************************************/ /***************************************************************************** This file contains the implementation of some functions which are missing on symbian. These funtions are related to UNICODE characters. Note: the current implementation is far from beeing perfect. I just made it so no compiler errors will be given and some of the code using it might even run. *****************************************************************************/ /** * $Id: wchar.cpp,v 1.1 2004/03/17 21:32:11 space2 Exp $ ***************************************************************************/ |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:47
|
Update of /cvsroot/rtk/rtk/src/core/platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011/src/core/platform Added Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) --- NEW FILE: .cvsignore --- Makefile cmake.* *.bkp |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:47
|
Update of /cvsroot/rtk/rtk/src/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011/src/core Added Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) --- NEW FILE: .cvsignore --- Makefile cmake.* *.bkp |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:47
|
Update of /cvsroot/rtk/rtk/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011/src Added Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) --- NEW FILE: .cvsignore --- Makefile cmake.* |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:46
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011/src/core/platform/linux Added Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) --- NEW FILE: .cvsignore --- Makefile cmake.* *.bkp |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:46
|
Update of /cvsroot/rtk/rtk/src/core/platform/epoc32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011/src/core/platform/epoc32 Added Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) --- NEW FILE: .cvsignore --- Makefile cmake.* *.bkp |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:46
|
Update of /cvsroot/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011 Modified Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) Index: .cvsignore =================================================================== RCS file: /cvsroot/rtk/rtk/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 17 Mar 2004 21:14:13 -0000 1.1 --- .cvsignore 17 Mar 2004 21:31:14 -0000 1.2 *************** *** 4,7 **** *.log *.bkp ! CMakeTMP CMakeCache.txt --- 4,7 ---- *.log *.bkp ! CMakeTmp CMakeCache.txt |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:45
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011/rtk Added Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) --- NEW FILE: .cvsignore --- *.bkp |
From: Szasz P. <sp...@us...> - 2004-03-17 21:40:45
|
Update of /cvsroot/rtk/rtk/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16011/doc Modified Files: .cvsignore Log Message: This way it is cleaner to work wit cvs (I will see easier if I forgot to add one file ;-) Index: .cvsignore =================================================================== RCS file: /cvsroot/rtk/rtk/doc/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 18 Jan 2004 16:35:51 -0000 1.1 --- .cvsignore 17 Mar 2004 21:31:14 -0000 1.2 *************** *** 1 **** ! api \ No newline at end of file --- 1,4 ---- ! api ! Makefile ! cmake.* ! *log.txt \ No newline at end of file |
From: Szasz P. <sp...@us...> - 2004-03-17 21:23:49
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12282/test/core Added Files: .cvsignore Log Message: It is easier to see what files are in cvs, what files are changed, etc when working with cvs console client --- NEW FILE: .cvsignore --- cmake.* Makefile.* *.bkp *.cpp.out test_core_* |
From: Szasz P. <sp...@us...> - 2004-03-17 21:23:49
|
Update of /cvsroot/rtk/rtk/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12282/test Added Files: .cvsignore Log Message: It is easier to see what files are in cvs, what files are changed, etc when working with cvs console client --- NEW FILE: .cvsignore --- *.bkp cmake.* Makefile |
From: Szasz P. <sp...@us...> - 2004-03-17 21:23:43
|
Update of /cvsroot/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12282 Added Files: .cvsignore Log Message: It is easier to see what files are in cvs, what files are changed, etc when working with cvs console client --- NEW FILE: .cvsignore --- cmake.* *.cmake Makefile *.log *.bkp CMakeTMP CMakeCache.txt |
From: Szasz P. <sp...@us...> - 2004-03-17 21:18:00
|
Update of /cvsroot/rtk/rtk/ide/symbian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10890 Modified Files: E32Main.cpp makeinc-common makeinc-test_core Added Files: .cvsignore Makefile.tests install_tests_on_phone Removed Files: Makefile.string0 Log Message: Some minor fixes and changes. Now the tests compile and run in symbian --- NEW FILE: .cvsignore --- *.exe *.deps librtk*.a Index: makeinc-test_core =================================================================== RCS file: /cvsroot/rtk/rtk/ide/symbian/makeinc-test_core,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** makeinc-test_core 10 Mar 2004 12:28:53 -0000 1.1 --- makeinc-test_core 17 Mar 2004 21:08:30 -0000 1.2 *************** *** 8,11 **** --- 8,13 ---- LIBS=$(NAMERTK).a $(EPOCTRGREL)/estlib.lib + .PHONY : $(NAMERTK).a + include makeinc-common --- NEW FILE: Makefile.tests --- # # This make file creates all the test applications # TESTS = array0 debug0 dict0 dlist0 error0 string0 variant0 vector0 PROBLEMS_WITH = all : for i in $(TESTS); do \ TEST_NAME=$$i make -f makeinc-test_core; \ done clean : for i in $(TESTS); do \ TEST_NAME=$$i make -f makeinc-test_core clean; \ done Index: E32Main.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/ide/symbian/E32Main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** E32Main.cpp 10 Mar 2004 12:28:53 -0000 1.1 --- E32Main.cpp 17 Mar 2004 21:08:30 -0000 1.2 *************** *** 7,15 **** GLDEF_C TInt E32Main() { ! char*argv[] = { "me" }; ! CTrapCleanup* cleanup = CTrapCleanup::New(); ! TRAPD(error, main(1, argv)); ! delete cleanup; ! return 0; } --- 7,16 ---- GLDEF_C TInt E32Main() { ! char*argv[] = { "me" }; ! CTrapCleanup* cleanup = CTrapCleanup::New(); ! TRAPD(error, main(1, argv)); ! delete cleanup; ! ! return 0; } Index: makeinc-common =================================================================== RCS file: /cvsroot/rtk/rtk/ide/symbian/makeinc-common,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** makeinc-common 10 Mar 2004 12:28:53 -0000 1.1 --- makeinc-common 17 Mar 2004 21:08:30 -0000 1.2 *************** *** 24,32 **** CFLAGS += -fomit-frame-pointer -O -march=armv4t -mthumb-interwork -pipe \ -nostdinc -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas \ ! -DNDEBUG -D_UNICODE -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ \ -D__MARM__ -D__MARM_ARMI__ -Dmain=MAIN \ -I$(EPOC)/include -I$(EPOC)/include/libc ! LIBS += $(EPOCTRGREL)/euser.lib TARGET=$(NAME).$(TYPE) --- 24,32 ---- CFLAGS += -fomit-frame-pointer -O -march=armv4t -mthumb-interwork -pipe \ -nostdinc -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas \ ! -DNDEBUG -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ \ -D__MARM__ -D__MARM_ARMI__ -Dmain=MAIN \ -I$(EPOC)/include -I$(EPOC)/include/libc ! LIBS += $(EPOCTRGREL)/egcc.lib $(EPOCTRGREL)/euser.lib TARGET=$(NAME).$(TYPE) --- Makefile.string0 DELETED --- --- NEW FILE: install_tests_on_phone --- #!/bin/sh # # This small scripts copies the compiled tests on my phone # ... What??? .... NO!!! .... # If you compile them on your computer they won't be copied on MY phone! # for i in *.exe; do echo -n "Copying $i ... " cp -f $i /mnt/disk/E:/inbox/ echo "Done" done |
From: Szasz P. <sp...@us...> - 2004-03-17 20:25:54
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31619/rtk Modified Files: DList.h Dict.h Export.h TVector.h Variant.h Log Message: Some changes so they will work in symbian (or just to remove some annoying warning messages from the compiler) Index: Export.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Export.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Export.h 10 Mar 2004 11:41:37 -0000 1.4 --- Export.h 17 Mar 2004 20:16:11 -0000 1.5 *************** *** 25,29 **** # define RTK_API IMPORT_C # else ! # define RTK_API EXPORT_C # endif #else --- 25,30 ---- # define RTK_API IMPORT_C # else ! //# define RTK_API EXPORT_C ! # define RTK_API # endif #else Index: Dict.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Dict.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Dict.h 9 Mar 2004 17:01:27 -0000 1.7 --- Dict.h 17 Mar 2004 20:16:11 -0000 1.8 *************** *** 187,197 **** DictNode ** _table; - FreeDataFunc _free_func; - HashFunc _hash_func; - KeyCopyFunc _keycopy_func; KeyFreeFunc _keyfree_func; KeyCmpFunc _keycmp_func; }; // Dict class --- 187,196 ---- DictNode ** _table; KeyCopyFunc _keycopy_func; KeyFreeFunc _keyfree_func; KeyCmpFunc _keycmp_func; + HashFunc _hash_func; + FreeDataFunc _free_func; }; // Dict class Index: Variant.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Variant.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Variant.h 14 Feb 2004 20:02:12 -0000 1.2 --- Variant.h 17 Mar 2004 20:16:11 -0000 1.3 *************** *** 42,46 **** #include "String.h" - #include "Export.h" namespace Rtk { --- 42,45 ---- Index: TVector.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/TVector.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TVector.h 9 Mar 2004 17:01:27 -0000 1.4 --- TVector.h 17 Mar 2004 20:16:11 -0000 1.5 *************** *** 55,92 **** TVector(int def_size = 4) : Vector(def_size) {} ! int Add(T obj) { return Vector::Add((void*)obj); } ! bool Add(T obj, int idx) { return Vector::Add((void*)obj, idx); } ! int Find(const T obj, int* idx = (int*)0) const { return Vector::Find((void*)obj, idx); } template <class T2> ! int Find(bool (*fn)(const T obj, T2 obj2), T2 param, int* idx = (int*)0) { ! return Vector::Find((bool(*)(const void*,void*))fn, (void*)param, idx); } ! template <class T2> ! class TSearchIterator : public SearchIterator ! { ! public: ! TSearchIterator(TVector<T>& v, bool (*fn)(const T obj, T2 obj2), T2 param) ! :SearchIterator(v,(bool(*)(const void*,void*))fn, param) ! {} ! ! T Next() { return (T) SearchIterator::Next(); } ! }; ! ! template <class T2> ! TSearchIterator<T2>* Search(bool (*fn)(const T obj, T2 obj2), T2 param) { ! return new TSearchIterator<T2>(*this, fn, param); ! } ! T Get(int idx) { return (T)Vector::Get(idx); } ! const T Get(int idx) const { return (T)Vector::Get(idx); } ! T& At(int idx) { return (T&)Vector::At(idx); } ! RTK_INLINE T& operator[](int idx) { return (T&)Vector::At(idx); } ! RTK_INLINE void Push(T obj) { Vector::Push((void*)obj); } ! RTK_INLINE T Pop() { return (T)Vector::Pop(); } ! RTK_INLINE T Top() { return (T)Vector::Top(); } ! RTK_INLINE void Queue(T obj) { Vector::Queue((void*)obj); } ! T Dequeue() { return (T)Vector::Dequeue(); } }; --- 55,77 ---- TVector(int def_size = 4) : Vector(def_size) {} ! int Add(const T& obj) { return Vector::Add((void*)&obj); } ! bool Add(const T& obj, int idx) { return Vector::Add((void*)&obj, idx); } ! int Find(const T &obj, int* idx = (int*)0) const { return Vector::Find((void*)&obj, idx); } template <class T2> ! int Find(bool (*fn)(const T& obj, T2& obj2), T2& param, int* idx = (int*)0) { ! return Vector::Find((bool(*)(const void*,void*))fn, (void*)¶m, idx); } ! T& Get(int idx) { return *(T*)Vector::Get(idx); } ! const T& Get(int idx) const { return *(T*)Vector::Get(idx); } ! T& At(int idx) { return *(T*)Vector::At(idx); } ! RTK_INLINE T& operator[](int idx) { return *(T*)Vector::At(idx); } ! RTK_INLINE void Push(const T& obj) { Vector::Push((void*)&obj); } ! RTK_INLINE T& Pop() { return *(T*)Vector::Pop(); } ! RTK_INLINE T& Top() { return *(T*)Vector::Top(); } ! RTK_INLINE void Queue(const T& obj) { Vector::Queue((void*)&obj); } ! T Dequeue() { return *(T*)Vector::Dequeue(); } }; *************** *** 95,99 **** { protected: ! void _Delete(int idx) { delete (T)(_data[idx]); } public: TVectorP(int def_size = 4) : TVector<T>(def_size) { _dealloc = true; } --- 80,84 ---- { protected: ! void _Delete(int idx) { delete *(T*)(_data[idx]); } public: TVectorP(int def_size = 4) : TVector<T>(def_size) { _dealloc = true; } Index: DList.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/DList.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DList.h 9 Mar 2004 17:01:27 -0000 1.3 --- DList.h 17 Mar 2004 20:16:11 -0000 1.4 *************** *** 75,79 **** /** In subclassess this method can perform aditional memory deallocation */ ! virtual void _Delete(Node* node) { // NOP } --- 75,84 ---- /** In subclassess this method can perform aditional memory deallocation */ ! #ifndef __EPOC32__ ! // some temporary workaround. With virtual it creates an internal ! // compiler error when compiling for symbian ! virtual ! #endif ! void _Delete(Node* node) { // NOP } |
From: Szasz P. <sp...@us...> - 2004-03-17 19:46:40
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23068/rtk Modified Files: rchar.h Log Message: Some fixes to work in symbian Index: rchar.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rchar.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** rchar.h 10 Mar 2004 12:01:12 -0000 1.13 --- rchar.h 17 Mar 2004 19:37:09 -0000 1.14 *************** *** 1,2 **** --- 1,43 ---- + /** + * + * RTK + * Fast and easy cross-platform GUI ToolKit. + * + * Copyright (C) 2001-200x RTK Development Team + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the slightly modified (see the "EXCEPTION NOTICE" part + * of RTK Library License) GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * and along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA . + * + * Also you should have received a copy of RTK Library License, if not please + * write an e-mail to some of RTK authors (listed in file AUTHORS). + * + * Bug reports: bu...@rt... + * Suggestions: rf...@rt... + ***************************************************************************/ + + /** + * $Source$ + ***** + * Authors (chronological order): + * $fname $lname, $email + * Contributors (chronological order): + * $fname $lname, $email + ***** + * T0D0 List: + * - + ***************************************************************************/ + #ifndef _RTK_RCHAR_H_ #define _RTK_RCHAR_H_ 1 *************** *** 28,31 **** --- 69,81 ---- #undef INCLUDED_FROM_RCHAR + //////////////////////////////////////////////////////////////////////////////// + // IMHO we should add the definition of each function here. + // This way the files which includes this header wouldn't depend on + // any system header and wouldn't contain any unnecesary stuff + // Also if on some system (like Symbian) some function is missing (like + // iswupper) it will give error only in linking. So if an app doesn't use + // it, there will be no problems. If it uses, we will implement it. + //////////////////////////////////////////////////////////////////////////////// + /** Convert a string to lowercase. * Replaces the string 'str' with lowercase characters, *************** *** 42,47 **** RTK_API RCHAR* rstrupr(RCHAR* str); ! ! /** Breaks the string 'str' into a sequence of tokens, * each of which is delimited by a character from the string pointed to by 'delim'. * @param str NULL, or the string that you want to break into tokens. --- 92,96 ---- RTK_API RCHAR* rstrupr(RCHAR* str); ! /** Breaks the string 'str' into a sequence of tokens, * each of which is delimited by a character from the string pointed to by 'delim'. * @param str NULL, or the string that you want to break into tokens. *************** *** 52,56 **** --- 101,193 ---- RTK_API RCHAR *rstrtok_r (RCHAR *str, const RCHAR *delim, RCHAR **save_ptr); + + #if 0 + /* + I tought maybe it would be a good idea to include all the r* function + definitons here. But because I don't want to brake other code, I commented + this out for now. + */ + extern "C" { + + + /** Returns true if the character is lowercase. */ + int rislower(unsigned int ch); + + /** Returns true if the character is uppercase. */ + int risupper(unsigned int ch); + + /** Converts the given character to uppercase. */ + unsigned int rtoupper(unsigned int ch); + + /** Converts the given character to lowercase. */ + unsigned int rtolower(unsigned int ch); + + /** Calculates the length of the initial segment of s which consists + entirely of characters in accept. + */ + size_t rstrspn(const RCHAR* s, const RCHAR* accept); + + /** Locates the first occurrence in the string s of any of the characters + in the string accept. + */ + RCHAR* rstrpbrk(const RCHAR* s, const RCHAR* accept); + + /** Returns a pointer to the first occurrence of the character c in the + string s. + */ + RCHAR* rstrchr(const RCHAR* s, RCHAR c); + + /** Returns a pointer to the first occurrence of the string s2 in the + string s. + */ + RCHAR* rstrstr(const RCHAR* s, const RCHAR* s2); + + /** Compares two strings with (case sensitive) */ + int rstrcmp(const RCHAR* s1, const RCHAR* s2); + + /** Compares the first n characters of two strings with (case sensitive) */ + int rstrncmp(const RCHAR* s1, const RCHAR* s2, unsigned int n); + + /** Compares two strings with (case insensitive) */ + int rstrcasecmp(const RCHAR* s1, const RCHAR* s2); + + /** Compares the first n characters of two strings with (case insensitive) */ + int rstrncasecmp(const RCHAR* s1, const RCHAR* s2, unsigned int n); + + /** Returns the initial part of a string to an integer value. */ + int rstrtoi(const RCHAR* s, RCHAR** tailptr, int base); + + /** Returns the initial part of a string to a long value. */ + long rstrtol(const RCHAR* s, RCHAR** tailptr, int base); + + /** Returns the initial part of a string to a floating point value. */ + double rstrtod(const RCHAR* s, RCHAR** tailptr); + + + int rprintf(const RCHAR* fmt, ...); + int rfprintf(FILE* f, const RCHAR* fmt, ...); + int rvprintf(const RCHAR* fmt, va_list args); + int rvfprintf(FILE* f, const RCHAR* fmt, va_list args); + #ifndef __EPOC32__ + int rsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, ...); + int rvsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, va_list args); + #endif + + int rscanf(const RCHAR* fmt, ...); + int rsscanf(const RCHAR* src, const RCHAR* fmt, ...); + int rfscanf(FILE* f, const RCHAR* fmt, ...); + + FILE *rfopen(const RCHAR *path, const RCHAR *mode); + FILE *rfdopen(int fildes, const RCHAR *mode); + FILE *rfreopen(const RCHAR *path, const RCHAR *mode, FILE *stream); + + } // extern "C" + #endif // COMMENT + } // namespace Rtk #endif /* _RTK_RCHAR_H_ */ + + /** + * $Id$ + ***************************************************************************/ |
From: Szasz P. <sp...@us...> - 2004-03-17 19:46:39
|
Update of /cvsroot/rtk/rtk/src/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23068/src/core Modified Files: String.cpp rchar.cpp debug.cpp Log Message: Some fixes to work in symbian Index: debug.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/debug.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** debug.cpp 10 Mar 2004 12:22:08 -0000 1.3 --- debug.cpp 17 Mar 2004 19:37:09 -0000 1.4 *************** *** 1,5 **** #include <time.h> - #include <rtk/debug.h> #include <rtk/error.h> --- 1,6 ---- + #include <rtk/Export.h> #include <time.h> #include <rtk/debug.h> + #include <rtk/error.h> *************** *** 8,20 **** namespace Rtk { ! #ifndef __EPOC32__ static debug_cb_t *cbs = 0; static int cb_count = 0; static int cb_size = 0; ! #else ! debug_cb_t *cbs; ! int cb_count; ! int cb_size; ! #endif ERROR_RET debug_add_cb(debug_cb_t cb) --- 9,21 ---- namespace Rtk { ! //#ifndef __EPOC32__ static debug_cb_t *cbs = 0; static int cb_count = 0; static int cb_size = 0; ! //#else ! //debug_cb_t *cbs; ! //int cb_count; ! //int cb_size; ! //#endif ERROR_RET debug_add_cb(debug_cb_t cb) Index: String.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/String.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** String.cpp 10 Mar 2004 12:22:07 -0000 1.5 --- String.cpp 17 Mar 2004 19:37:09 -0000 1.6 *************** *** 8,17 **** #include <stdlib.h> - namespace Rtk { - #ifndef __EPOC32__ // No initialized data in symbian String String::NullString; - #endif #define DATASIZE(x) ( (x)*sizeof(RCHAR) ) --- 8,14 ---- *************** *** 452,456 **** --- 449,457 ---- va_list ap; + #if __EPOC32__ + RCHAR tmp[256]; /// \todo For Symbian we cannot have too big variables in array, but 256 is too few + #else RCHAR tmp[4096*4]; + #endif va_start(ap, fmt); Index: rchar.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/rchar.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** rchar.cpp 10 Mar 2004 12:15:39 -0000 1.9 --- rchar.cpp 17 Mar 2004 19:37:09 -0000 1.10 *************** *** 72,104 **** #if !defined(_RTK_WIN32_) && defined(UNICODE) - /* - I'm not sure if this is faster then the old one! - Write the value if check in EACH cycle? - What about this: - [...] - while (*s_ptr) { - if(s_ptr[0] == '%' && s_ptr[1] == 's') { - *d_ptr++ = '%'; - *d_ptr++ = 'S'; - s_ptr++; - } else { - *d_ptr++ = *s_ptr++; - } - } - [...] - IMHO smaller and faster - - Mikko: - s_ptr[1] can be over the actual buffer, if last char in fmt is '%' - So this is incorrect. - - Pali: - IMHO if last char in fmt is '%', which means s_ptr[0] == '%' - then s_ptr[1] == '\0' ;-) - - Mikko: - Right :) Sorry, I forgot that we are working with null terminated strings :))) - - */ #define CVT(fmt_len) \ RCHAR *fmt2 = (RCHAR*)alloca((fmt_len)*sizeof(RCHAR)); \ --- 72,75 ---- *************** *** 167,171 **** static RTK_INLINE int rvsscanf(const RCHAR* src, const RCHAR* fmt, va_list args) { ! CVT(rstrlen(fmt)); // +\0 return vswscanf(src, fmt, args); } --- 138,142 ---- static RTK_INLINE int rvsscanf(const RCHAR* src, const RCHAR* fmt, va_list args) { ! CVT(rstrlen(fmt)+1); // +\0 return vswscanf(src, fmt, args); } *************** *** 173,177 **** static RTK_INLINE int rvfscanf(FILE* f, const RCHAR* fmt, va_list args) { ! CVT(rstrlen(fmt)); // +\0 return vfwscanf(f, fmt, args); } --- 144,148 ---- static RTK_INLINE int rvfscanf(FILE* f, const RCHAR* fmt, va_list args) { ! CVT(rstrlen(fmt)+1); // +\0 return vfwscanf(f, fmt, args); } *************** *** 253,254 **** --- 224,229 ---- } // namespace Rtk + + + + |
From: Szasz P. <sp...@us...> - 2004-03-17 19:46:39
|
Update of /cvsroot/rtk/rtk/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23068/test Modified Files: test.h Log Message: Some fixes to work in symbian Index: test.h =================================================================== RCS file: /cvsroot/rtk/rtk/test/test.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** test.h 14 Mar 2004 13:57:01 -0000 1.10 --- test.h 17 Mar 2004 19:37:08 -0000 1.11 *************** *** 12,15 **** --- 12,17 ---- #undef STEP + #if 0 + #define STEP(x) IncStep();rprintf(_R("$ %s\n"), _R(#x));x #define OUT(msg, val) IncStep();rprintf(_R("> ") _R(msg) _R("\n"), val) *************** *** 20,23 **** --- 22,71 ---- rprintf(_R("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n")); \ + #else + + #define STEP(x) \ + IncStep(); \ + rprintf(_R("$ %s\n"), _R(#x)); \ + rfprintf(f_out, _R("$ %s\n"), _R(#x)); \ + fflush(f_out); \ + x + + #define OUT(msg, val) \ + {IncStep(); \ + typeof(val) tmp = val; \ + rprintf(_R("> ") _R(msg) _R("\n"), tmp); \ + rfprintf(f_out, _R("> ") _R(msg) _R("\n"), tmp); \ + fflush(f_out);} + + #define OUTD(msg, val) \ + {IncStep(); \ + rprintf(_R("> ") _R(msg) _R("\n"), val); \ + rfprintf(f_out, _R("> ") _R(msg) _R("\n"), val); \ + fflush(f_out);} + + #define TITLE(x) \ + rprintf(_R("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n")); \ + rprintf(_R(" %s\n"), x); \ + rprintf(_R("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n")); \ + const char * f_out_name_ = __FILE__ ".out"; \ + const char * f_out_name = f_out_name_ + rstrlen(f_out_name_) - 1; \ + while (f_out_name > f_out_name_ && f_out_name[-1] != '/') f_out_name--; \ + rprintf(_R("Output of the STEP and OUT macros can be found also in the file `%s'\n"), f_out_name); \ + f_out = fopen(f_out_name, "w"); + + FILE * f_out; + + #endif + + /** Wait for a key if there are no arguments to the executable. + If we put the test in a script, we just have to pass any argument, + and they will not wait. + */ + #define WAIT_KEY \ + if (argc == 1) { \ + rprintf(_R("\nPress any key")); \ + rgetchar(); \ + } + using namespace Rtk; |
From: Szasz P. <sp...@us...> - 2004-03-17 19:46:39
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23068/test/core Modified Files: array0.cpp debug0.cpp dict0.cpp dlist0.cpp error0.cpp string0.cpp variant0.cpp vector0.cpp Log Message: Some fixes to work in symbian Index: vector0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/vector0.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** vector0.cpp 28 Feb 2004 20:59:24 -0000 1.4 --- vector0.cpp 17 Mar 2004 19:37:08 -0000 1.5 *************** *** 22,25 **** --- 22,26 ---- typedef TVectorP<A*> VectorA; + typedef TVector<A> VectorA2; // A simple function to search a substring *************** *** 29,33 **** } ! typedef RCharVector::TSearchIterator<RCHAR*> Iter; int main(int argc, char* argv[]) --- 30,34 ---- } ! //typedef RCharVector::TSearchIterator<RCHAR*> Iter; int main(int argc, char* argv[]) *************** *** 75,78 **** --- 76,80 ---- STEP(PRINT(vc, "%s")); + /* OUT("Find first occurence of the substring 'ere': %d", vc.Find<RCHAR*>(FindSubStr, _R("ere"))); *************** *** 80,86 **** STEP(RCHAR* found); STEP(while (found = iter->Next()) rprintf(_R(" Found: %s\n"), found)); ! rprintf(_R("### Object vector ###\n")); ! STEP(VectorA * va = new VectorA()); STEP(va->Push(new A())); // A::A --- 82,89 ---- STEP(RCHAR* found); STEP(while (found = iter->Next()) rprintf(_R(" Found: %s\n"), found)); + */ ! rprintf(_R("### Object ptr vector ###\n")); ! { STEP(VectorA * va = new VectorA()); STEP(va->Push(new A())); // A::A *************** *** 93,96 **** --- 96,114 ---- STEP(delete va); // 1x A::~A (1 removed, 1 popped => 1 remained) STEP(delete tmp); // A::~A - let's not leave garbage + } + rprintf(_R("### Object vector ###\n")); + { + STEP(VectorA2 * va = new VectorA2()); + STEP(va->Push(A())); // A::A + STEP(va->Push(A())); // A::A + STEP(va->Push(A())); // A::A + STEP(va->Remove(-1)); // NOP: idx out of range + STEP(va->Remove(0)); // A::~A + STEP(A& tmp = va->Pop()); // NOP: object is popped, but not deleted + OUT("va->GetCount() = %d", va->GetCount()); + STEP(delete va); // 1x A::~A (1 removed, 1 popped => 1 remained) + } // A::~A - let's not leave garbage + + WAIT_KEY return 0; Index: array0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/array0.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** array0.cpp 22 Feb 2004 11:50:15 -0000 1.1 --- array0.cpp 17 Mar 2004 19:37:08 -0000 1.2 *************** *** 3,6 **** --- 3,8 ---- *****************************************************************************/ + #include "../test.h" + #ifdef _WIN32 #include <windows.h> *************** *** 25,29 **** --- 27,38 ---- } + #ifdef __EPOC32__ + // The Symbian devices have fewer memory :-( + // Altough they have more then 256K, so maybe there is problem with memory + // fragmentation + #define LARGESIZE 50000 + #else #define LARGESIZE 1000000 + #endif void large_test(bool prealloc) *************** *** 63,95 **** int main(int argc, char* argv[]) { ! IntArray ia; // Append some single values ! ia.Append(2); ! ia.Append(1); ! ia.Append(0); ! ia.Append(6); ! ia.Append(4); // Prepend int array int ints[] = {120,100,150}; ! ia.Prepend(ints, 3); // Print out: ! printf("Original order:\n"); print(&ia); ! printf("Ascending order:\n"); print(&ia, cmp_int_a); ! printf("Descending order:\n"); print(&ia, cmp_int_d); ! large_test(false); ! large_test(true); ! rprintf(_R("\nPress any key")); ! rgetchar(); return 0; --- 72,104 ---- int main(int argc, char* argv[]) { ! TITLE(_R("Test file for the Array class(es)")); ! STEP(IntArray ia); // Append some single values ! STEP(ia.Append(2)); ! STEP(ia.Append(1)); ! STEP(ia.Append(0)); ! STEP(ia.Append(6)); ! STEP(ia.Append(4)); // Prepend int array int ints[] = {120,100,150}; ! STEP(ia.Prepend(ints, 3)); // Print out: ! STEP(printf("Original order:\n")); print(&ia); ! STEP(printf("Ascending order:\n")); print(&ia, cmp_int_a); ! STEP(printf("Descending order:\n")); print(&ia, cmp_int_d); ! STEP(large_test(false)); ! STEP(large_test(true)); ! WAIT_KEY return 0; Index: dict0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/dict0.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dict0.cpp 7 Mar 2004 20:53:00 -0000 1.8 --- dict0.cpp 17 Mar 2004 19:37:08 -0000 1.9 *************** *** 44,48 **** #include <rtk/Dict.h> #include <rtk/TDict.h> ! #include <rtk/Thread.h> #include "../test.h" --- 44,52 ---- #include <rtk/Dict.h> #include <rtk/TDict.h> ! ! /// \todo Replace this with a general condition about threads ! #ifndef __EPOC32__ ! # include <rtk/Thread.h> ! #endif #include "../test.h" *************** *** 190,193 **** --- 194,198 ---- int main(int argc, char** argv) { + TITLE(_R("Test file for Dict class(es)")); template_tests(); *************** *** 247,251 **** } ! getchar(); return 0; --- 252,256 ---- } ! WAIT_KEY return 0; Index: error0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/error0.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** error0.cpp 9 Mar 2004 17:01:29 -0000 1.3 --- error0.cpp 17 Mar 2004 19:37:08 -0000 1.4 *************** *** 15,19 **** } ! int main() { TITLE(_R("Example code for error handling in Rtk")); --- 15,19 ---- } ! int main(int argc, char * argv[]) { TITLE(_R("Example code for error handling in Rtk")); *************** *** 22,25 **** --- 22,28 ---- rprintf(_R("error caught: '%s' with error code %d\n"), error2str(ret), -ret); } + + WAIT_KEY + return 0; } Index: dlist0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/dlist0.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dlist0.cpp 28 Feb 2004 20:59:24 -0000 1.2 --- dlist0.cpp 17 Mar 2004 19:37:08 -0000 1.3 *************** *** 11,15 **** IntIter* iter = list.GetIterator(); int v; ! while (v = iter->Next()) rprintf(_R(" %d"), v); rprintf(_R("\n")); --- 11,15 ---- IntIter* iter = list.GetIterator(); int v; ! while ((v = iter->Next())) rprintf(_R(" %d"), v); rprintf(_R("\n")); *************** *** 26,32 **** { rprintf(_R(" odds = ")); IntFilter* iter = list.GetFilter<int>(is_odd); int v; ! while (v = iter->Next()) rprintf(_R(" %d"), v); rprintf(_R("\n")); --- 26,37 ---- { rprintf(_R(" odds = ")); + #ifdef __EPOC32__ + // probably because Symbian uses an older gcc (< 3) + IntFilter* iter = list.GetFilter(is_odd); + #else IntFilter* iter = list.GetFilter<int>(is_odd); + #endif int v; ! while ((v = iter->Next())) rprintf(_R(" %d"), v); rprintf(_R("\n")); *************** *** 44,47 **** --- 49,53 ---- typedef DListP<A*> DListA; + /* if not used, let's comment it out ;-) // A simple function to search a substring static bool FindSubStr(RCHAR* str, RCHAR* sub) *************** *** 49,52 **** --- 55,59 ---- return (rstrstr(str, sub) != NULL); } + */ static bool fn_less(int a, int b) *************** *** 91,94 **** --- 98,103 ---- STEP(delete tmp); + WAIT_KEY + return 1; } Index: variant0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/variant0.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** variant0.cpp 18 Jan 2004 20:17:07 -0000 1.2 --- variant0.cpp 17 Mar 2004 19:37:08 -0000 1.3 *************** *** 1,15 **** ! #include <rtk/Variant.h> ! ! #define STEP(x) rprintf(_R("\n$ %s\n"), _R(#x));x ! #define OUT(msg,val) rprintf(_R("> ") _R(msg) _R("\n"), val) ! #define TITLE(x) \ ! rprintf(_R("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n")); \ ! rprintf(_R(" %s\n"), _R(x)); \ ! rprintf(_R("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n")); \ using namespace Rtk; ! int main() { TITLE("Example for the class Variant"); --- 1,9 ---- ! #include "../test.h" ! #include <rtk/Variant.h> using namespace Rtk; ! int main(int argc, char * argv[]) { TITLE("Example for the class Variant"); *************** *** 33,36 **** --- 27,32 ---- OUT("a.AsString() = '%s'\n", a.AsString().c_str()); + WAIT_KEY + return 0; } Index: string0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/string0.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** string0.cpp 9 Mar 2004 17:01:29 -0000 1.14 --- string0.cpp 17 Mar 2004 19:37:08 -0000 1.15 *************** *** 15,25 **** RCHAR source[] = { _R("A sample STRING") }; ! OUT("source = '%s'", source); STEP( rstrnset(source, '=', 5) ); ! OUT("source = '%s'", source); STEP( rstrset(source, '*') ); ! OUT("source = '%s'", source); } --- 15,25 ---- RCHAR source[] = { _R("A sample STRING") }; ! OUTD("source = '%s'", source); STEP( rstrnset(source, '=', 5) ); ! OUTD("source = '%s'", source); STEP( rstrset(source, '*') ); ! OUTD("source = '%s'", source); } *************** *** 31,41 **** RCHAR source2[] = { _R("A miXED-CAse StrinG") }; ! OUT("source = '%s'", source); STEP( rstrupr(source) ); ! OUT("source = '%s'", source); ! OUT("source2 = '%s'", source2); STEP( rstrlwr(source2) ); ! OUT("source2 = '%s'", source2); } --- 31,41 ---- RCHAR source2[] = { _R("A miXED-CAse StrinG") }; ! OUTD("source = '%s'", source); STEP( rstrupr(source) ); ! OUTD("source = '%s'", source); ! OUTD("source2 = '%s'", source2); STEP( rstrlwr(source2) ); ! OUTD("source2 = '%s'", source2); } *************** *** 48,60 **** RCHAR *search = _R(" "); ! OUT("source = '%s'", source); /* Token will point to "LINE". */ STEP(token = rstrtok_r(source, search, &sp)); ! OUT("token = '%s'", token); while(token) { STEP(token = rstrtok_r(NULL, search, &sp)); ! OUT("token = '%s'", token); } } --- 48,60 ---- RCHAR *search = _R(" "); ! OUTD("source = '%s'", source); /* Token will point to "LINE". */ STEP(token = rstrtok_r(source, search, &sp)); ! OUTD("token = '%s'", token); while(token) { STEP(token = rstrtok_r(NULL, search, &sp)); ! OUTD("token = '%s'", token); } } *************** *** 169,172 **** --- 169,174 ---- rstrtok_r_test(); + WAIT_KEY + return 0; } *************** *** 195,198 **** --- 197,201 ---- // printf like + #ifndef __EPOC32__ // to reduce the number of warnings rfprintf(0,0); rsnprintf(0,0,0); *************** *** 206,209 **** --- 209,213 ---- rsscanf(0,0); rscanf(0,0); + #endif // __EPOC32__ // File *************** *** 222,226 **** --- 226,232 ---- rstrcspn(0,0); rstrdup(0); + #ifndef __EPOC32__ // to reduce the number of warnings rstrftime(0,0,0,0); + #endif rstrlen(0); rstrncat(0,0,0); *************** *** 229,234 **** rstrpbrk(_R(""),0); rstrrchr(_R(""),0); ! rstrset(0,0); ! rstrnset(0,0,0); rstrspn(0,0); rstrstr(_R(""), _R("")); --- 235,240 ---- rstrpbrk(_R(""),0); rstrrchr(_R(""),0); ! rstrset(0,0); ! rstrnset(0,0,0); rstrspn(0,0); rstrstr(_R(""), _R("")); *************** *** 236,240 **** --- 242,248 ---- // is* + #ifndef __EPOC32__ // to reduce the number of warnings risascii(0); + #endif riscntrl(0); risgraph(0); Index: debug0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/debug0.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** debug0.cpp 21 Feb 2004 23:49:03 -0000 1.2 --- debug0.cpp 17 Mar 2004 19:37:08 -0000 1.3 *************** *** 1,5 **** - #include <rtk/debug.h> #include "../test.h" //// //// Define some debug handlers --- 1,6 ---- #include "../test.h" + #include <rtk/debug.h> + //// //// Define some debug handlers *************** *** 20,37 **** } ! int main() { TITLE(_R("Example code for the DEBUGing functionality of Rtk")); ! debug_add_cb(my_cb); ! debug_add_cb(my_cb2); ! DBG(0, D_ALL, _R("A very important message !")); ! DBG(2, D_ALL, _R("An important message!")); // the second handler shouldn't print this one: ! DBG(4, D_CORE, _R("You should know about this!")); // because the default DEBUG_LEVEL is 5, you should'nt see this one: ! DBG(6, D_ALL, _R("Am I boring ?")); return 0; } --- 21,40 ---- } ! int main(int argc, char* argv[]) { TITLE(_R("Example code for the DEBUGing functionality of Rtk")); ! STEP(debug_add_cb(my_cb)); ! STEP(debug_add_cb(my_cb2)); ! STEP(DBG(0, D_ALL, _R("A very important message !"))); ! STEP(DBG(2, D_ALL, _R("An important message!"))); // the second handler shouldn't print this one: ! STEP(DBG(4, D_CORE, _R("You should know about this!"))); // because the default DEBUG_LEVEL is 5, you should'nt see this one: ! STEP(DBG(6, D_ALL, _R("Am I boring ?"))); + WAIT_KEY + return 0; } |
From: <de...@us...> - 2004-03-14 14:05:58
|
Update of /cvsroot/rtk/rtk/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4726/test Modified Files: test.h Log Message: Small bugfix Index: test.h =================================================================== RCS file: /cvsroot/rtk/rtk/test/test.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** test.h 14 Mar 2004 13:55:40 -0000 1.9 --- test.h 14 Mar 2004 13:57:01 -0000 1.10 *************** *** 30,36 **** #if defined(_RTK_WIN32_) ! # define TEST_FILE = "..\test.dat" #else ! # define TEST_FILE = "../test.dat" #endif --- 30,36 ---- #if defined(_RTK_WIN32_) ! # define RTK_TEST_FILE "..\test.dat" #else ! # define RTK_TEST_FILE "../test.dat" #endif |