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: <laz...@us...> - 2004-03-09 17:26:42
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9771/test/core Modified Files: error0.cpp string0.cpp Log Message: - Minor changes. - Fixed linux build (hopefully) Index: error0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/error0.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** error0.cpp 21 Feb 2004 23:49:03 -0000 1.2 --- error0.cpp 9 Mar 2004 17:01:29 -0000 1.3 *************** *** 18,34 **** { TITLE(_R("Example code for error handling in Rtk")); - #if USE_EXCEPTIONS - try{ - MyFunc(1); - } - catch (Exception &e) { - rprintf("exception caught: '%s' with error code %d\n", e.ToString(), e.Code()); - } - #else int ret = MyFunc(1); if (ret < 0){ rprintf(_R("error caught: '%s' with error code %d\n"), error2str(ret), -ret); } - #endif return 0; } --- 18,25 ---- Index: string0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/string0.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** string0.cpp 29 Feb 2004 20:53:25 -0000 1.13 --- string0.cpp 9 Mar 2004 17:01:29 -0000 1.14 *************** *** 70,77 **** int main(int argc, char* argv[]) { ! #if UNICODE TITLE(_R("Example source code for the String class (UNICODE)")); #else ! TITLE(_R("Example source code for the String class (MBCS)")); #endif STEP(String a); // this should be null --- 70,77 ---- int main(int argc, char* argv[]) { ! #ifdef UNICODE TITLE(_R("Example source code for the String class (UNICODE)")); #else ! TITLE(_R("Example source code for the String class (ASCII)")); #endif STEP(String a); // this should be null *************** *** 159,163 **** OUT("c.GetRefCount = %d", c.GetRefCount()); // Should be 2 (a&c) ! #if UNICODE // Now small cyrillic test - "Best regards to all RTK fans" //String sCyr = L"ÐоздÑав Ñвим ÑÑбиÑеÑима RTK-а\n"; --- 159,163 ---- OUT("c.GetRefCount = %d", c.GetRefCount()); // Should be 2 (a&c) ! #ifdef UNICODE // Now small cyrillic test - "Best regards to all RTK fans" //String sCyr = L"ÐоздÑав Ñвим ÑÑбиÑеÑима RTK-а\n"; |
From: <laz...@us...> - 2004-03-09 17:26:42
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9771/src/core/platform/linux Modified Files: Mutex.cpp Log Message: - Minor changes. - Fixed linux build (hopefully) Index: Mutex.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/Mutex.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Mutex.cpp 9 Mar 2004 16:05:59 -0000 1.5 --- Mutex.cpp 9 Mar 2004 17:01:28 -0000 1.6 *************** *** 87,91 **** if (--recursive_counter == 0) pthread_mutex_unlock(&_cs); ! #if _DEBUG // This is bug in users code.. if (recursive_counter<0) { --- 87,91 ---- if (--recursive_counter == 0) pthread_mutex_unlock(&_cs); ! #ifdef _DEBUG // This is bug in users code.. if (recursive_counter<0) { |
From: <laz...@us...> - 2004-03-09 17:26:42
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9771/rtk Modified Files: DList.h Dict.h TDict.h TVector.h rtkdef.h Log Message: - Minor changes. - Fixed linux build (hopefully) Index: DList.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/DList.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DList.h 28 Feb 2004 07:39:43 -0000 1.2 --- DList.h 9 Mar 2004 17:01:27 -0000 1.3 *************** *** 49,54 **** { - #if USE_TEMPLATES - /** Double linked list */ template <class T> --- 49,52 ---- *************** *** 302,307 **** typedef DList<RCHAR*> RCharDList; - #endif // USE_TEMPLATES - }; // namespace Rtk --- 300,303 ---- Index: Dict.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Dict.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Dict.h 7 Mar 2004 20:52:59 -0000 1.6 --- Dict.h 9 Mar 2004 17:01:27 -0000 1.7 *************** *** 45,49 **** //--------------------------------------------------------------------------- - #include "conf.h" #include "rtkdef.h" #include "Export.h" // needed for RTK_API --- 45,48 ---- Index: TDict.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/TDict.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TDict.h 7 Mar 2004 20:52:59 -0000 1.1 --- TDict.h 9 Mar 2004 17:01:27 -0000 1.2 *************** *** 59,67 **** { public: ! static void *KeyCopyTempl(KEY *key) { return new KEY(*key); } ! static void KeyFreeTempl(KEY *key) { delete key; } ! static bool KeyCmpTempl(KEY *i1, KEY *i2) { return i1->Compare(i2); } ! static uint HashTempl(KEY *key) { return key->Hash(); } ! static void FreeDataTempl(VALUE *val) { delete val; } VALUE error_return; --- 59,67 ---- { public: ! static void *KeyCopyTempl(const KEY *key) { return new KEY(*key); } ! static void KeyFreeTempl(KEY *key) { delete key; } ! static bool KeyCmpTempl(const KEY *i1, const KEY *i2) { return i1->Compare(i2); } ! static uint HashTempl(const KEY *key) { return key->Hash(); } ! static void FreeDataTempl(VALUE *val) { delete val; } VALUE error_return; Index: TVector.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/TVector.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TVector.h 28 Feb 2004 20:59:24 -0000 1.3 --- TVector.h 9 Mar 2004 17:01:27 -0000 1.4 *************** *** 49,54 **** { - #if USE_TEMPLATES - template <class T> class TVector : public Vector --- 49,52 ---- *************** *** 105,109 **** typedef TVector<int> IntVector; typedef TVector<RCHAR*> RCharVector; - #endif // USE_TEMPLATES }; // namespace Rtk --- 103,106 ---- Index: rtkdef.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rtkdef.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** rtkdef.h 28 Feb 2004 07:39:44 -0000 1.9 --- rtkdef.h 9 Mar 2004 17:01:27 -0000 1.10 *************** *** 55,82 **** namespace Rtk { - - // RTK version definitions - #define RTK_VER_MAJOR 0 - #define RTK_VER_MINOR 1 - #define RTK_VER_RELEASE 3 - #define RTK_VERSION (RTK_VER_MAJOR + \ - RTK_VER_MINOR * 0.01f + \ - RTK_VER_RELEASE * 0.0001f) - - //////////////////////////////// - /// Common types - - #if defined(_RTK_WIN32_) && !defined(_RTK_CC_GCC_) - typedef unsigned __int64 ulonglong; - typedef __int64 longlong; - #else - typedef long long longlong; - typedef unsigned long long ulonglong; - #endif - - typedef unsigned char uchar; - typedef unsigned long ulong; - typedef unsigned int uint; - typedef unsigned short ushort; #if defined(_RTK_WIN32_) --- 55,58 ---- *************** *** 101,104 **** --- 77,107 ---- } // Rtk namespace + ////////////////////////////////// + // These must not be in Rtk namespace: + + // RTK version definitions + #define RTK_VER_MAJOR 0 + #define RTK_VER_MINOR 1 + #define RTK_VER_RELEASE 3 + #define RTK_VERSION (RTK_VER_MAJOR + \ + RTK_VER_MINOR * 0.01f + \ + RTK_VER_RELEASE * 0.0001f) + + //////////////////////////////// + /// Common types + + #if defined(_RTK_WIN32_) && !defined(_RTK_CC_GCC_) + typedef unsigned __int64 ulonglong; + typedef __int64 longlong; + #else + typedef long long longlong; + typedef unsigned long long ulonglong; + #endif + + typedef unsigned char uchar; + typedef unsigned long ulong; + typedef unsigned int uint; + typedef unsigned short ushort; + #endif |
From: <laz...@us...> - 2004-03-09 17:26:41
|
Update of /cvsroot/rtk/rtk/ide/devcxx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9771/ide/devcxx Modified Files: dll.h Log Message: - Minor changes. - Fixed linux build (hopefully) Index: dll.h =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/dll.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dll.h 4 Feb 2004 21:23:59 -0000 1.1 --- dll.h 9 Mar 2004 17:01:27 -0000 1.2 *************** *** 2,6 **** #define _DLL_H_ ! #if BUILDING_DLL # define DLLIMPORT __declspec (dllexport) #else /* Not BUILDING_DLL */ --- 2,6 ---- #define _DLL_H_ ! #ifdef BUILDING_DLL # define DLLIMPORT __declspec (dllexport) #else /* Not BUILDING_DLL */ |
From: <de...@us...> - 2004-03-09 16:31:13
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25241/src/core/platform/linux Modified Files: Mutex.cpp Log Message: Just a test from KDevelop Index: Mutex.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/Mutex.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Mutex.cpp 9 Mar 2004 16:04:50 -0000 1.4 --- Mutex.cpp 9 Mar 2004 16:05:59 -0000 1.5 *************** *** 85,89 **** void Mutex::Unlock() { ! if(--recursive_counter == 0) pthread_mutex_unlock(&_cs); #if _DEBUG --- 85,89 ---- void Mutex::Unlock() { ! if (--recursive_counter == 0) pthread_mutex_unlock(&_cs); #if _DEBUG |
From: <de...@us...> - 2004-03-09 16:30:03
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24902/src/core/platform/linux Modified Files: Mutex.cpp Log Message: Small change in Mutex::Unlock() Index: Mutex.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/Mutex.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Mutex.cpp 9 Mar 2004 15:13:49 -0000 1.3 --- Mutex.cpp 9 Mar 2004 16:04:50 -0000 1.4 *************** *** 89,93 **** #if _DEBUG // This is bug in users code.. ! if(recursive_counter<0) { DBG(_R("Mutex recursive count < 0!! FATAL! Fix your code!\n")); exit(-1); --- 89,93 ---- #if _DEBUG // This is bug in users code.. ! if (recursive_counter<0) { DBG(_R("Mutex recursive count < 0!! FATAL! Fix your code!\n")); exit(-1); |
From: <de...@us...> - 2004-03-09 15:38:59
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10463 Modified Files: Thread.cpp Mutex.cpp Log Message: E-mail addresses were wrong. Index: Thread.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/Thread.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Thread.cpp 5 Mar 2004 21:15:39 -0000 1.2 --- Thread.cpp 9 Mar 2004 15:13:48 -0000 1.3 *************** *** 32,37 **** ***** * Authors (chronological order): ! * Mikko Lahteenmaki, mikko§rtk.cx ! * Dejan Lekic, dejan§rtk.cx * Contributors (chronological order): * $fname $lname, $email --- 32,37 ---- ***** * Authors (chronological order): ! * Mikko Lahteenmaki, mikko§rtk.cx ! * Dejan Lekic, dejan§rtk.cx * Contributors (chronological order): * $fname $lname, $email Index: Mutex.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/Mutex.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Mutex.cpp 5 Mar 2004 21:15:39 -0000 1.2 --- Mutex.cpp 9 Mar 2004 15:13:49 -0000 1.3 *************** *** 32,37 **** ***** * Authors (chronological order): ! * Mikko Lahteenmaki, mikko§rtk.cx ! * Dejan Lekic, dejan§rtk.cx * Contributors (chronological order): * $fname $lname, $email --- 32,37 ---- ***** * Authors (chronological order): ! * Mikko Lahteenmaki, mikko§rtk.cx ! * Dejan Lekic, dejan§rtk.cx * Contributors (chronological order): * $fname $lname, $email |
From: <laz...@us...> - 2004-03-08 20:19:57
|
Update of /cvsroot/rtk/rtk/src/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2834/src/core Modified Files: Array.cpp String.cpp Log Message: More dev-cpp fixes: - Do not compile with profiling enabled (lots of linker errors) - Emulate lsearch in Array Index: Array.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/Array.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Array.cpp 22 Feb 2004 11:50:15 -0000 1.5 --- Array.cpp 8 Mar 2004 19:55:23 -0000 1.6 *************** *** 45,49 **** #include <string.h> #include <stdlib.h> ! #include <search.h> // Note: For this to compile under Dev-C++ 4.9.8.x You'll need latest mingw-runtime! namespace Rtk --- 45,52 ---- #include <string.h> #include <stdlib.h> ! ! #if !defined(_RTK_CC_GCC_) || (defined(_RTK_CC_GCC_) && !defined(_RTK_WIN32_)) ! # include <search.h> ! #endif namespace Rtk *************** *** 155,159 **** --- 158,174 ---- const uchar *Array::lfind(const uchar *key, CmpFunction cmpfunc) { + #if !defined(_RTK_CC_GCC_) || (defined(_RTK_CC_GCC_) && !defined(_RTK_WIN32_)) return (const uchar *)(::lfind(key, _data, &_count, _elsize, cmpfunc)); + #else + uint cnt = _count; + register uchar *ptr = _data; + + for(uint n=0; n<cnt; n++) { + if((*cmpfunc)(key, ptr)==0) + return ptr; + ptr += _elsize; + } + return NULL; + #endif } Index: String.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/String.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** String.cpp 22 Feb 2004 10:21:29 -0000 1.3 --- String.cpp 8 Mar 2004 19:55:24 -0000 1.4 *************** *** 483,487 **** int patternLength = rstrlen(pattern); ! RCHAR *temp = rstrdup(sh ? sh->str : _R("")); RCHAR *head = temp; RCHAR *tail = rstrstr(head, pattern); --- 483,487 ---- int patternLength = rstrlen(pattern); ! RCHAR *temp = rstrdup((RCHAR*)(sh ? sh->str : _R(""))); RCHAR *head = temp; RCHAR *tail = rstrstr(head, pattern); |
From: <laz...@us...> - 2004-03-08 20:19:57
|
Update of /cvsroot/rtk/rtk/ide/devcxx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2834/ide/devcxx Modified Files: librtk.dev librtk_private.h librtk_private.rc Log Message: More dev-cpp fixes: - Do not compile with profiling enabled (lots of linker errors) - Emulate lsearch in Array Index: librtk.dev =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk.dev,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** librtk.dev 8 Mar 2004 08:33:53 -0000 1.10 --- librtk.dev 8 Mar 2004 19:55:22 -0000 1.11 *************** *** 2,6 **** FileName=librtk.dev Name=librtk ! UnitCount=30 Type=3 Ver=1 --- 2,6 ---- FileName=librtk.dev Name=librtk ! UnitCount=36 Type=3 Ver=1 *************** *** 11,16 **** ResourceIncludes= MakeIncludes= ! Compiler=-DBUILDING_DLL=1_@@_-DRTK_DLL=1_@@_-DRTK_EXPORTS=1_@@_-D_RTK_WIN32_=1_@@_ ! CppCompiler=-DRTK_DLL=1_@@_-DRTK_EXPORTS=1_@@_-D_RTK_WIN32_=1_@@_ Linker=--no-export-all-symbols --add-stdcall-alias_@@_ IsCpp=1 --- 11,16 ---- ResourceIncludes= MakeIncludes= ! Compiler=-DBUILDING_DLL=1_@@_-DRTK_DLL=1_@@_-DRTK_EXPORTS=1_@@_-D_RTK_WIN32_=1_@@_-DRTK_UNICODE=1_@@_ ! CppCompiler=-DRTK_DLL=1_@@_-DRTK_EXPORTS=1_@@_-D_RTK_WIN32_=1_@@_-DRTK_UNICODE=1_@@_ Linker=--no-export-all-symbols --add-stdcall-alias_@@_ IsCpp=1 *************** *** 28,32 **** SupportXPThemes=0 CompilerSet=0 ! CompilerSettings=0000000000000100000000 [Unit2] --- 28,32 ---- SupportXPThemes=0 CompilerSet=0 ! CompilerSettings=000000000000100000 [Unit2] *************** *** 47,51 **** Build=35 ======= ! Build=49 >>>>>>> 1.8 LanguageID=1033 --- 47,51 ---- Build=35 ======= ! Build=68 >>>>>>> 1.8 LanguageID=1033 *************** *** 352,353 **** --- 352,413 ---- BuildCmd= + [Unit31] + FileName=..\..\rtk\Buffer.h + CompileCpp=1 + Folder=librtk + Compile=1 + Link=1 + Priority=1000 + OverrideBuildCmd=0 + BuildCmd= + + [Unit32] + FileName=..\..\rtk\List.h + CompileCpp=1 + Folder=librtk + Compile=1 + Link=1 + Priority=1000 + OverrideBuildCmd=0 + BuildCmd= + + [Unit33] + FileName=..\..\rtk\rchar_ascii.h + CompileCpp=1 + Folder=librtk + Compile=1 + Link=1 + Priority=1000 + OverrideBuildCmd=0 + BuildCmd= + + [Unit34] + FileName=..\..\rtk\rchar_unicode.h + CompileCpp=1 + Folder=librtk + Compile=1 + Link=1 + Priority=1000 + OverrideBuildCmd=0 + BuildCmd= + + [Unit35] + FileName=..\..\rtk\rtkdef.h + CompileCpp=1 + Folder=librtk + Compile=1 + Link=1 + Priority=1000 + OverrideBuildCmd=0 + BuildCmd= + + [Unit36] + FileName=..\..\rtk\TDict.h + CompileCpp=1 + Folder=librtk + Compile=1 + Link=1 + Priority=1000 + OverrideBuildCmd=0 + BuildCmd= + Index: librtk_private.h =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk_private.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** librtk_private.h 8 Mar 2004 08:33:53 -0000 1.10 --- librtk_private.h 8 Mar 2004 19:55:22 -0000 1.11 *************** *** 6,14 **** // VERSION DEFINITIONS ! #define VER_STRING "0.1.1.50" #define VER_MAJOR 0 #define VER_MINOR 1 #define VER_RELEASE 1 ! #define VER_BUILD 50 #define COMPANY_NAME "" #define FILE_VERSION "" --- 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 "" Index: librtk_private.rc =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk_private.rc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** librtk_private.rc 8 Mar 2004 08:33:53 -0000 1.10 --- librtk_private.rc 8 Mar 2004 19:55:23 -0000 1.11 *************** *** 9,14 **** // 1 VERSIONINFO ! FILEVERSION 0,1,1,50 ! PRODUCTVERSION 0,1,1,50 FILETYPE VFT_DLL { --- 9,14 ---- // 1 VERSIONINFO ! FILEVERSION 0,1,1,68 ! PRODUCTVERSION 0,1,1,68 FILETYPE VFT_DLL { *************** *** 28,34 **** } } - BLOCK "VarFileInfo" - { - VALUE "Translation", 0x0409, 1252 - } } --- 28,30 ---- |
From: <laz...@us...> - 2004-03-08 20:19:56
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2834/rtk Modified Files: conf.h Log Message: More dev-cpp fixes: - Do not compile with profiling enabled (lots of linker errors) - Emulate lsearch in Array Index: conf.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/conf.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** conf.h 8 Mar 2004 08:28:50 -0000 1.10 --- conf.h 8 Mar 2004 19:55:23 -0000 1.11 *************** *** 60,78 **** // Define this, if the platform uses UNICODE // RTK_BC_UNICODE is (like all *_BC_* macros) set by CMake/autotools ! #define RTK_UNICODE 1 ! #if (RTK_UNICODE == 1) ! # define UNICODE 1 ! #else ! # undef UNICODE ! #endif ! #if defined(_RTK_WIN32_) ! // UNICODE is default WIN32, but not must ! # define UNICODE 1 #endif ! #if defined(_RTK_WINCE_) && !defined(UNICODE) ! // UNICODE is MUST under WinCE ! # define UNICODE 1 #endif --- 60,74 ---- // Define this, if the platform uses UNICODE // RTK_BC_UNICODE is (like all *_BC_* macros) set by CMake/autotools ! // #define RTK_UNICODE 1 ! #if defined(_RTK_WINCE_) && !defined(RTK_UNICODE) ! // UNICODE is MUST under WinCE ! # define RTK_UNICODE 1 #endif ! #ifdef RTK_UNICODE ! # define UNICODE 1 ! #else ! # undef UNICODE #endif |
From: <de...@us...> - 2004-03-08 08:58:04
|
Update of /cvsroot/rtk/rtk/ide/devcxx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24340/ide/devcxx Modified Files: librtk.dev librtk_private.h librtk_private.rc Log Message: Latest Dev-C++ project file(s) (for CORE RTK LIBRARY only). Index: librtk.dev =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk.dev,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** librtk.dev 24 Feb 2004 13:21:40 -0000 1.9 --- librtk.dev 8 Mar 2004 08:33:53 -0000 1.10 *************** *** 2,6 **** FileName=librtk.dev Name=librtk ! UnitCount=27 Type=3 Ver=1 --- 2,6 ---- FileName=librtk.dev Name=librtk ! UnitCount=30 Type=3 Ver=1 *************** *** 47,51 **** Build=35 ======= ! Build=47 >>>>>>> 1.8 LanguageID=1033 --- 47,51 ---- Build=35 ======= ! Build=49 >>>>>>> 1.8 LanguageID=1033 *************** *** 72,96 **** BuildCmd= - [Unit4] - FileName=..\..\src\core\List.cpp - CompileCpp=1 - Folder=librtk - Compile=1 - Link=1 - Priority=1000 - OverrideBuildCmd=0 - BuildCmd= - [Unit5] - FileName=..\..\src\core\String.cpp - CompileCpp=1 - Folder=librtk - Compile=1 - Link=1 - Priority=1000 - OverrideBuildCmd=0 - BuildCmd= - - [Unit6] FileName=..\..\src\core\Variant.cpp CompileCpp=1 --- 72,76 ---- *************** *** 102,106 **** BuildCmd= ! [Unit7] FileName=..\..\rtk\debug.h CompileCpp=1 --- 82,86 ---- BuildCmd= ! [Unit6] FileName=..\..\rtk\debug.h CompileCpp=1 *************** *** 112,116 **** BuildCmd= ! [Unit8] FileName=..\..\rtk\conf.h CompileCpp=1 --- 92,96 ---- BuildCmd= ! [Unit7] FileName=..\..\rtk\conf.h CompileCpp=1 *************** *** 122,126 **** BuildCmd= ! [Unit9] FileName=..\..\rtk\error.h CompileCpp=1 --- 102,106 ---- BuildCmd= ! [Unit8] FileName=..\..\rtk\error.h CompileCpp=1 *************** *** 132,136 **** BuildCmd= ! [Unit10] FileName=..\..\rtk\error_codes.h CompileCpp=1 --- 112,116 ---- BuildCmd= ! [Unit9] FileName=..\..\rtk\error_codes.h CompileCpp=1 *************** *** 142,146 **** BuildCmd= ! [Unit11] FileName=..\..\rtk\Export.h CompileCpp=1 --- 122,126 ---- BuildCmd= ! [Unit10] FileName=..\..\rtk\Export.h CompileCpp=1 *************** *** 153,157 **** [Unit12] ! FileName=..\..\rtk\List.h CompileCpp=1 Folder=librtk --- 133,137 ---- [Unit12] ! FileName=..\..\rtk\Rtk.h CompileCpp=1 Folder=librtk *************** *** 163,167 **** [Unit13] ! FileName=..\..\rtk\rchar.h CompileCpp=1 Folder=librtk --- 143,147 ---- [Unit13] ! FileName=..\..\rtk\String.h CompileCpp=1 Folder=librtk *************** *** 173,177 **** [Unit14] ! FileName=..\..\rtk\Rtk.h CompileCpp=1 Folder=librtk --- 153,157 ---- [Unit14] ! FileName=..\..\rtk\Variant.h CompileCpp=1 Folder=librtk *************** *** 183,187 **** [Unit15] ! FileName=..\..\rtk\String.h CompileCpp=1 Folder=librtk --- 163,167 ---- [Unit15] ! FileName=..\..\src\core\Dict.cpp CompileCpp=1 Folder=librtk *************** *** 193,197 **** [Unit16] ! FileName=..\..\rtk\Variant.h CompileCpp=1 Folder=librtk --- 173,177 ---- [Unit16] ! FileName=..\..\rtk\Dict.h CompileCpp=1 Folder=librtk *************** *** 203,207 **** [Unit17] ! FileName=..\..\src\core\Dict.cpp CompileCpp=1 Folder=librtk --- 183,187 ---- [Unit17] ! FileName=..\..\src\core\platform\win32\Thread.cpp CompileCpp=1 Folder=librtk *************** *** 213,217 **** [Unit18] ! FileName=..\..\rtk\Dict.h CompileCpp=1 Folder=librtk --- 193,197 ---- [Unit18] ! FileName=..\..\src\core\platform\win32\Mutex.cpp CompileCpp=1 Folder=librtk *************** *** 223,227 **** [Unit19] ! FileName=..\..\src\core\platform\win32\Thread.cpp CompileCpp=1 Folder=librtk --- 203,207 ---- [Unit19] ! FileName=..\..\rtk\Thread.h CompileCpp=1 Folder=librtk *************** *** 233,237 **** [Unit20] ! FileName=..\..\src\core\platform\win32\Mutex.cpp CompileCpp=1 Folder=librtk --- 213,217 ---- [Unit20] ! FileName=..\..\rtk\Mutex.h CompileCpp=1 Folder=librtk *************** *** 243,247 **** [Unit21] ! FileName=..\..\rtk\Thread.h CompileCpp=1 Folder=librtk --- 223,227 ---- [Unit21] ! FileName=..\..\rtk\Array.h CompileCpp=1 Folder=librtk *************** *** 253,257 **** [Unit22] ! FileName=..\..\rtk\Mutex.h CompileCpp=1 Folder=librtk --- 233,237 ---- [Unit22] ! FileName=..\..\src\core\Array.cpp CompileCpp=1 Folder=librtk *************** *** 263,267 **** [Unit23] ! FileName=..\..\rtk\Array.h CompileCpp=1 Folder=librtk --- 243,247 ---- [Unit23] ! FileName=..\..\rtk\File.h CompileCpp=1 Folder=librtk *************** *** 283,287 **** [Unit24] ! FileName=..\..\src\core\Array.cpp CompileCpp=1 Folder=librtk --- 263,267 ---- [Unit24] ! FileName=..\..\rtk\IO.h CompileCpp=1 Folder=librtk *************** *** 293,297 **** [Unit25] ! FileName=..\..\rtk\File.h CompileCpp=1 Folder=librtk --- 273,277 ---- [Unit25] ! FileName=..\..\src\core\platform\win32\File.cpp CompileCpp=1 Folder=librtk *************** *** 303,307 **** [Unit26] ! FileName=..\..\rtk\IO.h CompileCpp=1 Folder=librtk --- 283,287 ---- [Unit26] ! FileName=..\..\src\core\Vector.cpp CompileCpp=1 Folder=librtk *************** *** 313,317 **** [Unit27] ! FileName=..\..\src\core\platform\win32\File.cpp CompileCpp=1 Folder=librtk --- 293,347 ---- [Unit27] ! FileName=..\..\rtk\TArray.h ! CompileCpp=1 ! Folder=librtk ! Compile=1 ! Link=1 ! Priority=1000 ! OverrideBuildCmd=0 ! BuildCmd= ! ! [Unit4] ! FileName=..\..\src\core\String.cpp ! CompileCpp=1 ! Folder=librtk ! Compile=1 ! Link=1 ! Priority=1000 ! OverrideBuildCmd=0 ! BuildCmd= ! ! [Unit11] ! FileName=..\..\rtk\rchar.h ! CompileCpp=1 ! Folder=librtk ! Compile=1 ! Link=1 ! Priority=1000 ! OverrideBuildCmd=0 ! BuildCmd= ! ! [Unit28] ! FileName=..\..\rtk\TVector.h ! CompileCpp=1 ! Folder=librtk ! Compile=1 ! Link=1 ! Priority=1000 ! OverrideBuildCmd=0 ! BuildCmd= ! ! [Unit29] ! FileName=..\..\rtk\Vector.h ! CompileCpp=1 ! Folder=librtk ! Compile=1 ! Link=1 ! Priority=1000 ! OverrideBuildCmd=0 ! BuildCmd= ! ! [Unit30] ! FileName=..\..\rtk\DList.h CompileCpp=1 Folder=librtk Index: librtk_private.h =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk_private.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** librtk_private.h 24 Feb 2004 13:21:41 -0000 1.9 --- librtk_private.h 8 Mar 2004 08:33:53 -0000 1.10 *************** *** 6,14 **** // VERSION DEFINITIONS ! #define VER_STRING "0.1.1.47" #define VER_MAJOR 0 #define VER_MINOR 1 #define VER_RELEASE 1 ! #define VER_BUILD 47 #define COMPANY_NAME "" #define FILE_VERSION "" --- 6,14 ---- // VERSION DEFINITIONS ! #define VER_STRING "0.1.1.50" #define VER_MAJOR 0 #define VER_MINOR 1 #define VER_RELEASE 1 ! #define VER_BUILD 50 #define COMPANY_NAME "" #define FILE_VERSION "" Index: librtk_private.rc =================================================================== RCS file: /cvsroot/rtk/rtk/ide/devcxx/librtk_private.rc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** librtk_private.rc 24 Feb 2004 13:21:41 -0000 1.9 --- librtk_private.rc 8 Mar 2004 08:33:53 -0000 1.10 *************** *** 9,14 **** // 1 VERSIONINFO ! FILEVERSION 0,1,1,47 ! PRODUCTVERSION 0,1,1,47 FILETYPE VFT_DLL { --- 9,14 ---- // 1 VERSIONINFO ! FILEVERSION 0,1,1,50 ! PRODUCTVERSION 0,1,1,50 FILETYPE VFT_DLL { |
From: <de...@us...> - 2004-03-08 08:53:07
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23402/rtk Modified Files: conf.h Log Message: Small CVS conflict resolved. Index: conf.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/conf.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** conf.h 5 Mar 2004 18:30:58 -0000 1.9 --- conf.h 8 Mar 2004 08:28:50 -0000 1.10 *************** *** 59,63 **** // Define this, if the platform uses UNICODE ! //#define UNICODE 1 #if defined(_RTK_WIN32_) --- 59,69 ---- // Define this, if the platform uses UNICODE ! // RTK_BC_UNICODE is (like all *_BC_* macros) set by CMake/autotools ! #define RTK_UNICODE 1 ! #if (RTK_UNICODE == 1) ! # define UNICODE 1 ! #else ! # undef UNICODE ! #endif #if defined(_RTK_WIN32_) *************** *** 86,87 **** --- 92,97 ---- #endif // __RTK_CONFIG_H__ + + /** + * $Id$ + ***************************************************************************/ |
From: <laz...@us...> - 2004-03-07 21:16:54
|
Update of /cvsroot/rtk/rtk/src/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32596/src/core Modified Files: Dict.cpp Log Message: - Added custom key support for Dict - template based (T)Dict classes - Int / Str Dict added Index: Dict.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/Dict.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Dict.cpp 21 Feb 2004 10:50:48 -0000 1.7 --- Dict.cpp 7 Mar 2004 20:53:00 -0000 1.8 *************** *** 61,315 **** // C/C++ code here /** ! * T0D0: We should have some kind of check if it can't allocate sufficient memory. ! * It will for now just set the size of table to 0 as initiator that something went wrong. */ ! Dict::Dict(unsigned int size) ! { ! DictNode** oTmpTable; ! unsigned int ii; ! this->m_size = size; ! this->m_count = 0; ! this->m_table = (DictNode **)malloc(sizeof(DictNode *) * size); ! oTmpTable = this->m_table; ! if (oTmpTable == (DictNode**)0) ! { ! this->m_size = 0; ! return; // T0D0: This part MUST be changed, and allowed better error checking! ! } // if ! for (ii=0; ii<size; ii++) ! oTmpTable[ii] = (DictNode*)0; ! } // Dict() ! //--------------------------------------------------------------------------- ! unsigned int Dict::Hash(const RCHAR *string) ! { ! unsigned int rv = 0; ! int i; ! while (*string) ! { ! i = (unsigned int)(*string); ! rv ^= i; ! rv <<= 1; ! string ++; ! } // while ! return rv; ! } // Hash() //--------------------------------------------------------------------------- ! bool Dict::Insert(const RCHAR *key, void *data) ! { ! unsigned int val = this->Hash(key) % this->m_size; ! DictNode *oBucket; ! ! assert(NULL != key); ! /** ! * NULL means this oBucket hasn't been used yet. We'll simply ! * allocate space for our new oBucket and put our data there, with ! * the table pointing at it. ! */ ! if ((this->m_table)[val] == 0) // NULL ! { ! (this->m_table)[val] = (DictNode *)malloc(sizeof(oBucket)); ! if ((this->m_table)[val] == 0) // NULL ! return (void*)0; // NULL ! if (((this->m_table)[val]->key = (RCHAR*)malloc(rstrlen(key) + 1)) == 0) // NULL ! { ! free((this->m_table)[val]); ! (this->m_table)[val] = 0; // NULL ! return (void*)0; // NULL ! } // if ! rstrcpy((this->m_table)[val]->key, key); ! (this->m_table)[val] -> next = NULL; ! (this->m_table)[val] -> data = data; ! this->m_count++; ! return true; ! } // if ! // Check for bucket with same key. ! // Return false, if found ! oBucket = (this->m_table)[val]; ! while(oBucket) { ! if( rstrcmp(key, oBucket->key) == 0) return false; ! oBucket = oBucket->next; } ! /** ! * This key must not be in the table yet. We'll add it to the head of ! * the list at this spot in the hash table. Speed would be ! * slightly improved if the list was kept sorted instead. In this case, ! * this code would be moved into the loop above, and the insertion would ! * take place as soon as it was determined that the present key in the ! * list was larger than this one. ! */ ! oBucket = (DictNode *)malloc(sizeof(oBucket)); ! if (oBucket == 0) // NULL ! return false; ! if ((oBucket->key = (RCHAR*)malloc(rstrlen(key)+1)) == 0) // NULL ! { ! free(oBucket); ! return false; ! } ! rstrcpy(oBucket->key, key); ! oBucket->data = data; ! oBucket->next = (this->m_table)[val]; ! (this->m_table)[val] = oBucket; ! this->m_count++; ! return true; ! } // Insert() //--------------------------------------------------------------------------- ! void *Dict::Replace(const RCHAR *key, void *data, bool insert) ! { ! unsigned int val = this->Hash(key) % this->m_size; ! DictNode *oBucket; ! oBucket = (this->m_table)[val]; ! while(oBucket) { ! if( rstrcmp(key, oBucket->key) == 0) { ! void *old_data = oBucket->data; ! oBucket->data = data; ! return old_data; ! } ! oBucket = oBucket->next; } ! if(!insert) return NULL; ! Insert(key, data); ! return data; } //--------------------------------------------------------------------------- ! void* Dict::Lookup(const RCHAR *key) const ! { ! unsigned int val = this->Hash(key) % this->m_size; ! DictNode *oBucket; ! assert(NULL != key); ! if ((this->m_table)[val] == 0) // NULL ! return NULL; ! for (oBucket = (this->m_table)[val]; oBucket != 0; oBucket = oBucket->next ) ! { ! if (0 == rstrcmp(key, oBucket->key)) ! return oBucket->data; ! } ! return (void*)0; ! } // Lookup() ! //--------------------------------------------------------------------------- ! void* Dict::Delete(RCHAR* key) ! { ! unsigned int val = this->Hash(key) % this->m_size; ! void* data; ! DictNode *ptr, *last = 0; ! assert (key != 0); // NULL ! if ((this->m_table)[val] == 0) // NULL ! return 0; ! /** ! * List traversal. ! * When we find DictNode to delete, we set the previous node's 'next' pointer ! * to point to the node after found DictNode. After that we can safely delete ! * found DictNode. ! */ ! for (last = 0, ptr = (this->m_table)[val]; ! ptr != 0; ! last = ptr, ptr = ptr->next) { ! if (rstrcmp(key, ptr->key) == 0) ! { ! if (last != 0) ! { ! data = ptr->data; ! last -> next = ptr -> next; ! free(ptr->key); ! free(ptr); ! this->m_count--; ! return data; ! } // if ! else ! { ! /** ! * If 'last' pointer is still NULL than we have to delete first ! * node in the list. All we have to do is to put 'next' pointer ! * of found DictNode in the array. After that we delete current ! * DictNode as above. ! */ ! data = ptr->data; ! (this->m_table)[val] = ptr->next; ! free(ptr->key); ! free(ptr); ! this->m_count--; ! return data; ! } // else ! } // if ! } // for ! // We didn't find key in the table - return NULL. ! return (void*)0; ! } // Delete() //--------------------------------------------------------------------------- ! int Dict::FreeNode(RCHAR *key, void *data) ! { ! (void) data; ! ! assert(key != 0); // NULL ! if (this->m_free_func != 0) // NULL { ! this->m_free_func(this->Delete(key)); } ! else ! this->Delete(key); ! return 0; // everything is OK ! } // FreeNode //--------------------------------------------------------------------------- ! void Dict::Clear() ! { ! this->m_count = 0; ! // this->m_free_func = 0; ! this->m_table = 0; ! } // Clear ! //--------------------------------------------------------------------------- ! void Dict::Enumerate(DictEnumFunc func, void *user_data) ! { ! unsigned ii; ! DictNode *temp; ! DictNode *swap; ! for (ii=0; ii<this->m_size; ii++) ! { ! if (this->m_table[ii] != 0) // NULL ! { ! temp = this->m_table[ii]; ! while (temp != 0) // NULL ! { ! swap = temp->next; ! (*func)(temp->key, temp->data, user_data); ! temp = swap; ! } // while ! } // if ! } // for ! } // Enumerate() ! //--------------------------------------------------------------------------- }; // Rtk --- 61,379 ---- // C/C++ code here + #define FREEDATA(d) if(_free_func) (*_free_func)(d) + + #define COPYKEY(dst, src) if(_keycopy_func) dst = (*_keycopy_func)(src); else dst = src + #define FREEKEY(d) if(_keyfree_func) (*_keyfree_func)(d) + + #define FREENODE(node) \ + FREEDATA(node->data); \ + FREEKEY(node->key); \ + free(node) + /** ! * Internal method to test if a positive number is prime. ! * Not an efficient algorithm. */ ! static bool is_prime(int n) ! { ! if( n == 2 || n == 3 ) return true; ! if( n == 1 || n % 2 == 0 ) return false; ! for( int i = 3; i * i <= n; i += 2 ) ! if( n % i == 0 ) ! return false; ! return true; ! } ! /** ! * Internal method to return a prime number at least as large as n. ! * Assumes n > 0. ! */ ! static int next_prime(int n) ! { ! if( n % 2 == 0 ) n++; ! for( ; !is_prime(n); n += 2 ); ! return n; ! } ! Dict::Dict(KeyCopyFunc keycopy_f, KeyFreeFunc keyfree_f, KeyCmpFunc keycmp_f, HashFunc hash_f, FreeDataFunc free_f, uint size) ! : _keycopy_func(keycopy_f), _keyfree_func(keyfree_f), _keycmp_func(keycmp_f), _hash_func(hash_f), _free_func(free_f) ! { ! _size = next_prime(size); ! _count = 0; ! ! _table = (DictNode **)malloc(sizeof(DictNode*) * _size); ! memset(_table, 0, sizeof(DictNode*) * _size); ! } ! Dict::~Dict() ! { ! Clear(); ! free(_table); ! } //--------------------------------------------------------------------------- ! bool Dict::Insert(void *key, void *data, bool replace) ! { ! uint val = Hash(key); ! DictNode *oBucket; ! /** ! * NULL means this oBucket hasn't been used yet. We'll simply ! * allocate space for our new oBucket and put our data there, with ! * the table pointing at it. ! */ ! if(_table[val] == 0) // NULL ! { ! oBucket = (DictNode *)malloc(sizeof(DictNode)); ! COPYKEY(oBucket->key, key); ! oBucket->next = NULL; ! oBucket->data = data; ! _table[val] = oBucket; ! _count++; ! return true; ! } // if ! // Check for bucket with same key. ! // Return false, if found ! oBucket = _table[val]; ! while(oBucket) { ! if( (*_keycmp_func)(key, oBucket->key) ) { ! if(replace) { ! FREEDATA(oBucket->data); ! oBucket->data = data; ! return true; ! } else { return false; ! } } + oBucket = oBucket->next; + } ! /** ! * This key must not be in the table yet. We'll add it to the head of ! * the list at this spot in the hash table. Speed would be ! * slightly improved if the list was kept sorted instead. In this case, ! * this code would be moved into the loop above, and the insertion would ! * take place as soon as it was determined that the present key in the ! * list was larger than this one. ! */ ! oBucket = (DictNode *)malloc(sizeof(DictNode)); ! COPYKEY(oBucket->key, key); ! oBucket->data = data; ! oBucket->next = _table[val]; ! _table[val] = oBucket; ! _count++; ! return true; ! } // Insert() //--------------------------------------------------------------------------- ! void *Dict::Replace(void *key, void *data, bool insert) ! { ! uint val = Hash(key); ! DictNode *oBucket; ! oBucket = _table[val]; ! while(oBucket) { ! if( (*_keycmp_func)(key, oBucket->key) ) { ! void *old_data = oBucket->data; ! oBucket->data = data; ! return old_data; } ! oBucket = oBucket->next; } + if(!insert) return NULL; + Insert(key, data); + return data; + } //--------------------------------------------------------------------------- ! void *Dict::Lookup(void *key) const ! { ! uint val = Hash(key); ! DictNode *oBucket; ! assert(NULL != key); ! if (_table[val] == 0) // NULL ! return NULL; ! for (oBucket = _table[val]; oBucket != 0; oBucket = oBucket->next ) ! { ! if ( (*_keycmp_func)(key, oBucket->key) ) ! return oBucket->data; ! } ! return (void*)0; ! } ! //--------------------------------------------------------------------------- ! bool Dict::Delete(void *key) ! { ! uint val = Hash(key); ! DictNode *ptr, *last = 0; ! if (_table[val] == 0) // NULL ! return 0; ! /** ! * List traversal. ! * When we find DictNode to delete, we set the previous node's 'next' pointer ! * to point to the node after found DictNode. After that we can safely delete ! * found DictNode. ! */ ! for (last = 0, ptr = _table[val]; ! ptr != 0; ! last = ptr, ptr = ptr->next) ! { ! if ( (*_keycmp_func)(key, ptr->key) ) { ! if (last != 0) { ! last->next = ptr->next; ! } else { ! /** ! * If 'last' pointer is still NULL than we have to delete first ! * node in the list. All we have to do is to put 'next' pointer ! * of found DictNode in the array. After that we delete current ! * DictNode as above. ! */ ! _table[val] = ptr->next; ! } ! FREENODE(ptr); ! _count--; ! return true; ! } // if ! } // for ! ! // We didn't find key in the table - return false. ! return false; ! } //--------------------------------------------------------------------------- ! void Dict::Clear() ! { ! DictNode *temp; ! DictNode *swap; ! uint n = _size; ! while(n--) ! { ! temp = _table[n]; ! while(temp != 0) { ! swap = temp->next; ! FREENODE(temp); ! temp = swap; } ! _table[n] = 0; ! } ! ! _count = 0; ! } //--------------------------------------------------------------------------- ! void Dict::Enumerate(DictEnumFunc func, void *user_data) ! { ! uint ii; ! DictNode *temp; ! for (ii=0; ii<_size; ii++) ! { ! temp = _table[ii]; ! while (temp != 0) ! { ! (*func)(temp->key, temp->data, user_data); ! temp = temp->next; ! } ! } ! } ! /**************************************************/ ! /**************************************************/ ! uint StrDict::Hash(void *key) ! { ! const RCHAR *string = ((const String *)key)->c_str(); ! uint rv = 0; ! int i; ! while (*string) ! { ! i = (unsigned int)(*string); ! rv ^= i; ! rv <<= 1; ! string++; ! } // while ! return rv; ! } ! ! void *StrDict::KeyCopy(void *key) ! { ! return new String(*(String*)key); ! } ! ! void StrDict::KeyFree(void *key) ! { ! delete ((String*)key); ! } ! ! bool StrDict::KeyCmp(void *i1, void *i2) ! { ! String &s1 = *(String *)i1; ! String &s2 = *(String *)i2; ! return (s1==s2); ! } ! ! StrDict::StrDict(uint size) ! : Dict(StrDict::KeyCopy, StrDict::KeyFree, StrDict::KeyCmp, StrDict::Hash, 0, size) ! { ! ! } ! ! /**************************************************/ ! /**************************************************/ ! ! uint IntDict::Hash(void *key) ! { ! int ikey = *(int*)key; ! ikey += ~(ikey << 15); ! ikey ^= (ikey >> 10); ! ikey += (ikey << 3); ! ikey ^= (ikey >> 6); ! ikey += ~(ikey << 11); ! ikey ^= (ikey >> 16); ! if(ikey < 0) ikey = -ikey; ! return ikey; ! } ! ! void *IntDict::KeyCopy(void *key) ! { ! return new int(*(int*)key); ! } ! ! void IntDict::KeyFree(void *key) ! { ! delete ((int*)key); ! } ! ! bool IntDict::KeyCmp(void *i1, void *i2) ! { ! int &s1 = *(int*)i1; ! int &s2 = *(int*)i2; ! return (s1==s2); ! } ! ! IntDict::IntDict(uint size) ! : Dict(IntDict::KeyCopy, IntDict::KeyFree, IntDict::KeyCmp, IntDict::Hash, 0, size) ! { ! ! } }; // Rtk |
From: <laz...@us...> - 2004-03-07 21:16:54
|
Update of /cvsroot/rtk/rtk/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32596/test Modified Files: test.h Log Message: - Added custom key support for Dict - template based (T)Dict classes - Int / Str Dict added Index: test.h =================================================================== RCS file: /cvsroot/rtk/rtk/test/test.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test.h 28 Feb 2004 20:59:24 -0000 1.7 --- test.h 7 Mar 2004 20:53:00 -0000 1.8 *************** *** 9,14 **** #include <rtk/rchar.h> #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) \ --- 9,17 ---- #include <rtk/rchar.h> + #undef OUT + #undef STEP + #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) \ *************** *** 23,31 **** static void IncStep() { ! rprintf(_R("[%03d] "), step_counter++); } - /*#define PRINTF(fmt,rest...) rprintf(_R(" ") fmt, #rest)*/ - //#define PRINTF(printf_exp) rprintf printf_exp - #endif --- 26,31 ---- static void IncStep() { ! rprintf(_R("[%03d] "), ++step_counter); } #endif |
From: <laz...@us...> - 2004-03-07 21:16:54
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32596/rtk Modified Files: Dict.h Added Files: TDict.h Log Message: - Added custom key support for Dict - template based (T)Dict classes - Int / Str Dict added --- NEW FILE: TDict.h --- /** * * 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/rtk/TDict.h,v $ ***** * Authors (chronological order): * Mikko Lahteenmaki, mikko§rtk.cx * Contributors (chronological order): * $fname $lname, $email ***** * T0D0 List: * - ***************************************************************************/ #ifndef _RTK_TDICT_H_ #define _RTK_TDICT_H_ 1 #include "Dict.h" namespace Rtk { /** * Custom key Dict. * Custom KEY classes needs atleast functions: * - bool Compare(KEY *) * - Copy ctor * - uint Hash() */ template <class KEY, class VALUE> class TDict : public Dict { public: static void *KeyCopyTempl(KEY *key) { return new KEY(*key); } static void KeyFreeTempl(KEY *key) { delete key; } static bool KeyCmpTempl(KEY *i1, KEY *i2) { return i1->Compare(i2); } static uint HashTempl(KEY *key) { return key->Hash(); } static void FreeDataTempl(VALUE *val) { delete val; } VALUE error_return; TDict(uint size = DICT_LOOKUP_DEFAULT) : Dict((KeyCopyFunc)KeyCopyTempl, (KeyFreeFunc)KeyFreeTempl, (KeyCmpFunc)KeyCmpTempl, (HashFunc)HashTempl, (FreeDataFunc)FreeDataTempl, size) { //error_return = VALUE(); } bool Insert(const KEY &key, const VALUE &data, bool replace=true) { VALUE *val = new VALUE(data); bool ret = Dict::Insert((void*)&key, (void*)val, replace); if(!ret) delete val; return ret; } const VALUE &Replace(const KEY &key, void *data, bool insert=true) { VALUE *val = new VALUE(data); VALUE *ret = Dict::Replace((void*)&key, val, insert); if(!ret) { delete val; return error_return; } return *ret; } bool Contains(const KEY &key) const { return (Dict::Lookup((void*)&key)!=0); } bool Delete(const KEY &key) { return Dict::Delete((void*)&key); } const VALUE &Lookup(const KEY &key) const { VALUE *ret = (VALUE*)Dict::Lookup((void*)&key); if(ret) return *ret; return error_return; } /** * Lookup key 'key', if not found, key is added to Dict. * This is used by non-const operator[] */ VALUE &LookupInsert(const KEY &key) { VALUE *ret = (VALUE*)Dict::Lookup((void*)&key); if(!ret) { ret = new VALUE(); if(!Dict::Insert((void*)&key, (void*)ret)) delete ret; } return *ret; } VALUE &operator [](const KEY &key) { return LookupInsert(key); } const VALUE &operator [](const KEY &key) const { return Lookup(key); } }; template <class VALUE> class TIntDict : public Dict { public: static void FreeDataTempl(VALUE *val) { delete val; } VALUE error_return; TIntDict(uint size = DICT_LOOKUP_DEFAULT) : Dict(IntDict::KeyCopy, IntDict::KeyFree, IntDict::KeyCmp, IntDict::Hash, (FreeDataFunc)FreeDataTempl, size) { //error_return = VALUE(); } bool Insert(int key, const VALUE &data, bool replace=true) { VALUE *val = new VALUE(data); bool ret = Dict::Insert((void*)&key, (void*)val, replace); if(!ret) delete val; return ret; } const VALUE &Replace(int key, void *data, bool insert=true) { VALUE *val = new VALUE(data); VALUE *ret = Dict::Replace((void*)&key, val, insert); if(!ret) { delete val; return error_return; } return *ret; } bool Contains(int key) const { return (Dict::Lookup((void*)&key)!=0); } bool Delete(int key) { return Dict::Delete((void*)&key); } const VALUE &Lookup(int key) const { VALUE *ret = (VALUE*)Dict::Lookup((void*)&key); if(ret) return *ret; return error_return; } /** * Lookup key 'key', if not found, key is added to Dict. * This is used by non-const operator[] */ VALUE &LookupInsert(int key) { VALUE *ret = (VALUE*)Dict::Lookup((void*)&key); if(!ret) { ret = new VALUE(); if(!Dict::Insert((void*)&key, (void*)ret)) delete ret; } return *ret; } VALUE &operator [](int key) { return LookupInsert(key); } const VALUE &operator [](int key) const { return Lookup(key); } }; template <class VALUE> class TStrDict : public Dict { public: static void FreeDataTempl(VALUE *val) { delete val; } VALUE error_return; TStrDict(uint size = DICT_LOOKUP_DEFAULT) : Dict(StrDict::KeyCopy, StrDict::KeyFree, StrDict::KeyCmp, StrDict::Hash, (FreeDataFunc)FreeDataTempl, size) { //error_return = VALUE(); } bool Insert(const String &key, const VALUE &data, bool replace=true) { VALUE *val = new VALUE(data); bool ret = Dict::Insert((void*)&key, (void*)val, replace); if(!ret) delete val; return ret; } const VALUE &Replace(const String &key, void *data, bool insert=true) { VALUE *val = new VALUE(data); VALUE *ret = Dict::Replace((void*)&key, val, insert); if(!ret) { delete val; return error_return; } return *ret; } bool Contains(const String &key) const { return (Dict::Lookup((void*)&key)!=0); } bool Delete(const String &key) { return Dict::Delete((void*)&key); } const VALUE &Lookup(const String &key) const { VALUE *ret = (VALUE*)Dict::Lookup((void*)&key); if(ret) return *ret; return error_return; } /** * Lookup key 'key', if not found, key is added to Dict. * This is used by non-const operator[] */ VALUE &LookupInsert(const String &key) { VALUE *ret = (VALUE*)Dict::Lookup((void*)&key); if(!ret) { ret = new VALUE(); if(!Dict::Insert((void*)&key, (void*)ret)) delete ret; } return *ret; } VALUE &operator [](const String &key) { return LookupInsert(key); } const VALUE &operator [](const String &key) const { return Lookup(key); } }; }; // Rtk namespace #endif /** * $Id: TDict.h,v 1.1 2004/03/07 20:52:59 laza2000 Exp $ ***************************************************************************/ Index: Dict.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Dict.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Dict.h 14 Feb 2004 20:36:17 -0000 1.5 --- Dict.h 7 Mar 2004 20:52:59 -0000 1.6 *************** *** 45,50 **** //--------------------------------------------------------------------------- ! #include <rtk/Export.h> // needed for RTK_API ! #include <rtk/String.h> //--------------------------------------------------------------------------- --- 45,52 ---- //--------------------------------------------------------------------------- ! #include "conf.h" ! #include "rtkdef.h" ! #include "Export.h" // needed for RTK_API ! #include "String.h" //--------------------------------------------------------------------------- *************** *** 53,56 **** --- 55,65 ---- { + #define DICT_LOOKUP_SMALL 17 + #define DICT_LOOKUP_MEDIUM 101 + #define DICT_LOOKUP_BIG 1007 + #define DICT_LOOKUP_HUGE 10017 + + #define DICT_LOOKUP_DEFAULT DICT_LOOKUP_MEDIUM + /** * Dict object consists of an list of _DictNode structures. In literature *************** *** 62,70 **** typedef struct _DictNode { ! RCHAR *key; void *data; struct _DictNode *next; } DictNode; /// Dict free data handler. /// Called whenever DictNode object is removed from list. --- 71,85 ---- typedef struct _DictNode { ! void *key; void *data; struct _DictNode *next; } DictNode; + typedef uint (*HashFunc)(void *key); + + typedef void *(*KeyCopyFunc)(void *key); + typedef void (*KeyFreeFunc)(void *key); + typedef bool (*KeyCmpFunc)(void *i1, void *i2); + /// Dict free data handler. /// Called whenever DictNode object is removed from list. *************** *** 77,81 **** /// @param data Data associated with key /// @param user_data User decided pointer, passed in Dict::Enumrate ! typedef void (*DictEnumFunc)(const RCHAR *key, void *data, void *user_data); /** --- 92,96 ---- /// @param data Data associated with key /// @param user_data User decided pointer, passed in Dict::Enumrate ! typedef void (*DictEnumFunc)(void *key, void *data, void *user_data); /** *************** *** 86,94 **** public: // --------- CONSTRUCTORS ---------------------------------- - /** - * Default constructor. - */ - Dict(): m_size(0), m_count(0), m_free_func(0) { } - /** * This constructor should be actually used by default - to initialize --- 101,104 ---- *************** *** 100,145 **** * NOTE: This must be prime number, e.g. 17, 101... */ ! Dict(unsigned int size); // --------- DESTRUCTORS ----------------------------------- ! ~Dict() { this->Clear(); } // --------- GET METHODS ----------------------------------- /** * Returns number of items in the Dictionary. */ ! inline int GetCount() const { return this->m_count; } // --------- SET METHODS ----------------------------------- - // --------- OTHER METHODS --------------------------------- /** ! * Hashes a string 'string' and produces key of unsigned int type. */ ! static unsigned int Hash(const RCHAR *string); /** ! * Inserts key 'key' into Dict objects hash table. Note that ! * this function will not allow duplicate keys. * @return Boolean wheter data is added or not. */ ! bool Insert(const RCHAR *key, void *data); /** ! * Replaces key 'key' into Dict objects hash table. Note that ! * this function will not allow duplicate keys. ! * @param insert If key is not found Dict, it will be inserted. (default false) ! * @return Data associated with 'key' before. */ ! void *Replace(const RCHAR *key, void *data, bool insert=false); /** ! * Looks up for given key 'key' and (if there is any) and returns associated data. ! * @return void* Pointer to associated data, or NULL if the key is not in the hash table. */ ! void* Lookup(const RCHAR *key) const; /** --- 110,166 ---- * NOTE: This must be prime number, e.g. 17, 101... */ ! Dict(KeyCopyFunc keycopy_f, KeyFreeFunc keyfree_f, KeyCmpFunc keycmp_f, HashFunc hash_f, FreeDataFunc free_f, uint size); // --------- DESTRUCTORS ----------------------------------- ! ~Dict(); // --------- GET METHODS ----------------------------------- /** + * Get free data function. + */ + FreeDataFunc GetFreeDataFunc() { return _free_func; } + + /** * Returns number of items in the Dictionary. */ ! RTK_INLINE int GetCount() const { return _count; } // --------- SET METHODS ----------------------------------- /** ! * Set function to free content of element. ! * Function is called whenever element is removed from list. */ ! void SetFreeDataFunc(FreeDataFunc func) { _free_func = func; } ! ! // --------- OTHER METHODS --------------------------------- /** ! * Inserts key 'key' with value 'data' into Dict. ! * If key already exists, it is replaced, unless 'replace' is false (defaults true) * @return Boolean wheter data is added or not. */ ! bool Insert(void *key, void *data, bool replace=true); /** ! * Replaces the value of key 'key' with value 'data'. ! * If key is not found, it is added, unless 'insert' is false (defaults true) ! * @return Data associated with 'key' before, or NULL if no data before */ ! void *Replace(void *key, void *data, bool insert=true); /** ! * Perform Lookup for given key 'key' ! * @return Pointer to associated data, or NULL if the key is not found. */ ! void *Lookup(void *key) const; ! ! /** Check whether Dict contains key or not. ! * @return True if key is found in Dict ! */ ! RTK_INLINE bool Contains(void *key) const { return (Lookup(key)!=0); } /** *************** *** 147,181 **** * @return void* Associated data, or NULL if not present. */ ! void* Delete(RCHAR* key); ! ! /** ! * Used in destructor. ! */ ! int FreeNode(RCHAR *key, void *data); ! ! const void* operator [](const RCHAR* key) const { return this->Lookup(key); } ! void* operator [](const RCHAR* key) { return this->Lookup(key); } /** ! * Completely deletes all DictNodes in Dict object. */ void Clear(); ! /** ! * It calls given function 'func' for every DictNode in Dict object, and ! * passes DictNode's associated data and the key to that function. */ void Enumerate(DictEnumFunc func, void *user_data = 0); - protected: - unsigned int m_size; - unsigned int m_count; - DictNode **m_table; - FreeDataFunc m_free_func; /// Free data function - private: }; // Dict class }; // Rtk namespace --- 168,238 ---- * @return void* Associated data, or NULL if not present. */ ! bool Delete(void* key); /** ! * Delete all nodes in Dict */ void Clear(); ! /** Enumrate all items in Dict. ! * It calls given function 'func' for every node in Dict, and ! * passes DictNode's associated value and the key to that function. */ void Enumerate(DictEnumFunc func, void *user_data = 0); private: + RTK_INLINE uint Hash(void *key) const { return (*_hash_func)(key) % (_size-1); } + + unsigned int _size; + unsigned int _count; + DictNode ** _table; + + FreeDataFunc _free_func; + HashFunc _hash_func; + + KeyCopyFunc _keycopy_func; + KeyFreeFunc _keyfree_func; + KeyCmpFunc _keycmp_func; }; // Dict class + class RTK_API StrDict : public Dict + { + public: + static void *KeyCopy(void *key); + static void KeyFree(void *key); + static bool KeyCmp(void *i1, void *i2); + static uint Hash(void *key); + + StrDict(uint size = DICT_LOOKUP_DEFAULT); + + RTK_INLINE bool Insert(const String &key, void *data, bool replace=true) { return Dict::Insert((void*)&key, data, replace); } + RTK_INLINE void *Replace(const String &key, void *data, bool insert=true) { return Dict::Replace((void*)&key, data, insert); } + RTK_INLINE void *Lookup(const String &key) const { return Dict::Lookup((void*)&key); } + RTK_INLINE bool Contains(const String &key) const { return (Lookup(key)!=0); } + RTK_INLINE bool Delete(const String &key) { return Dict::Delete((void*)&key); } + + void *operator [](const String &key) const { return Lookup(key); } + }; + + class RTK_API IntDict : public Dict + { + public: + static void *KeyCopy(void *key); + static void KeyFree(void *key); + static bool KeyCmp(void *i1, void *i2); + static uint Hash(void *key); + + IntDict(uint size = DICT_LOOKUP_DEFAULT); + + RTK_INLINE bool Insert(int key, void *data, bool replace=true) { return Dict::Insert((void*)&key, data, replace); } + RTK_INLINE void *Replace(int key, void *data, bool insert=true) { return Dict::Replace((void*)&key, data, insert); } + RTK_INLINE void *Lookup(int key) const { return Dict::Lookup((void*)&key); } + RTK_INLINE bool Contains(int key) const { return (Lookup(key)!=0); } + RTK_INLINE bool Delete(int key) { return Dict::Delete((void*)&key); } + + void *operator [](int key) const { return Lookup(key); } + }; + }; // Rtk namespace |
From: <laz...@us...> - 2004-03-07 21:16:53
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32596/test/core Modified Files: dict0.cpp Log Message: - Added custom key support for Dict - template based (T)Dict classes - Int / Str Dict added Index: dict0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/dict0.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dict0.cpp 26 Feb 2004 20:02:16 -0000 1.7 --- dict0.cpp 7 Mar 2004 20:53:00 -0000 1.8 *************** *** 43,112 **** #include <rtk/Dict.h> #include <rtk/Thread.h> using namespace Rtk; ! void DictPrint(const RCHAR* oString, void* oData,void *userData) { ! rprintf(_R("Dict[\"%s\"]=%s\n"), oString, (RCHAR *)oData); } int main(int argc, char** argv) { ! Dict oDict(17); ! RCHAR* aKeys[] = { ! _R("One"), ! _R("Two"), ! _R("Three"), ! _R("Four"), ! _R("Five"), ! _R("Six"), ! _R("Seven"), ! _R("Eight"), ! _R("Nine"), ! NULL ! }; ! RCHAR* aValues[] = { ! _R("Mikko"), ! _R("Pali"), ! _R("Dejan"), ! _R("Alexey"), ! _R("Martin"), ! _R("Bo"), ! _R("Milosh"), ! _R("Sanel"), ! _R("Bill") ! }; ! String oString(_R("Hi Dejan, it's me - Mikko")); ! String oTmp(_R("One")); ! for (int ii=0; aKeys[ii] != 0; ii++ ) ! { ! oDict.Insert(aKeys[ii], aValues[ii]); ! } // for ! rprintf(_R("hashed '%s' index is %u\n"), oString.c_str(), Dict::Hash(oString) % 17); ! rprintf(_R("hashed '%s' index is %u\n"), oTmp.c_str(), Dict::Hash(oTmp) % 17); ! rprintf(_R("\n")); ! if (!oDict.Replace(oTmp, (void*)oString.c_str())) ! rprintf(_R("Error!\n")); ! if (!oDict.Replace(_R("Two"), (void*)oTmp.c_str())) ! rprintf(_R("Error!\n")); ! rprintf(_R("Loopup(\"One\") = %s\n"), (RCHAR*)oDict.Lookup(_R("One"))); ! rprintf(_R("oDict[\"Two\"] = %s\n"), (RCHAR*)oDict[_R("Two")]); ! rprintf(_R("\nNumber of DictNodes: %d\n"), oDict.GetCount()); ! oDict.Enumerate(DictPrint); getchar(); return 0; ! } // main() /** --- 43,254 ---- #include <rtk/Dict.h> + #include <rtk/TDict.h> #include <rtk/Thread.h> + #include "../test.h" + using namespace Rtk; ! class Test { ! public: ! int val; ! Test() : val(-1) { ! //printf("Test::Test()\n"); ! } ! Test(const Test &t) : val(t.val) { ! //printf("Test::Test(const Test &t) %d\n", val); ! } ! Test(int v) : val(v) { ! //printf("Test::Test(int v) %d\n", v); ! } ! ~Test() { ! //printf("Test::~Test() %d\n", val); ! } ! ! // Dict custom KEY needed functions: ! bool Compare(const Test *t) const { return val==t->val; } ! uint Hash() const { return (val*2); } ! }; ! ! // Compare needed for Dict custom KEY classes ! static RTK_INLINE bool operator == (const Test &s1, const Test &s2) { return s1.val==s2.val; } ! ! ! void IntDictPrint(int *key, void* oData, void *userData) ! { ! rprintf(_R("\tDict[%d] = %p\n"), *key, oData); ! } ! ! void StrDictPrint(String *key, void* oData, void *userData) ! { ! rprintf(_R("\tDict[\"%s\"] = %p\n"), key->c_str(), oData); ! } ! ! void TCustomDictPrint(Test *key, String *oData, void *userData) ! { ! rprintf(_R("\tDict[Test(%d)] = \"%s\"\n"), key->val, oData->c_str()); ! } ! ! void TIntDictPrint(int *key, String *oData, void *userData) ! { ! rprintf(_R("\tDict[%d] = \"%s\"\n"), *key, oData->c_str()); ! } ! ! void TStrDictPrint(String *key, String *oData, void *userData) ! { ! rprintf(_R("\tDict[\"%s\"] = \"%s\"\n"), key->c_str(), oData->c_str()); ! } ! ! void template_tests() ! { ! rprintf(_R("\ntemplate_tests()\n")); ! ! { ! rprintf(_R("\nCustom Template Dict Test: TDict<Test, String>\n")); ! ! TDict<Test, String> custom; ! //custom.error_return = _R("<NOT FOUND>"); ! ! String val; ! int ret; ! ! STEP( Test a(10) ); ! STEP( custom[a] = _R("Hello") ); ! STEP( custom[Test(14)] = _R("World") ); ! ! STEP( val = custom[a] ); ! OUT("val = %s", val.c_str()); ! ! STEP( val = custom[14] ); ! OUT("val = %s", val.c_str()); ! ! STEP( ret = custom.Contains(10) ); ! OUT("ret = %d", ret); ! ! STEP( ret = custom.Contains(5) ); ! OUT("ret = %d", ret); ! ! STEP( custom.Enumerate((DictEnumFunc)TCustomDictPrint) ); ! } ! ! { ! rprintf(_R("\nInt Template Dict Test: TIntDict<String>\n")); ! ! TIntDict<String> intd; ! ! String val; ! int ret; ! ! STEP( int a = 10 ); ! STEP( intd[a] = _R("Hello") ); ! STEP( intd[14] = _R("World") ); ! ! STEP( val = intd[a] ); ! OUT("val = %s", val.c_str()); ! ! STEP( val = intd[14] ); ! OUT("val = %s", val.c_str()); ! ! STEP( ret = intd.Contains(10) ); ! OUT("ret = %d", ret); ! ! STEP( ret = intd.Contains(5) ); ! OUT("ret = %d", ret); ! ! STEP( intd.Enumerate((DictEnumFunc)TIntDictPrint) ); ! } ! ! { ! rprintf(_R("\nString Template Dict Test: TStrDict<String>\n")); ! ! TStrDict<String> strd; ! ! String val; ! int ret; ! ! STEP( String a(_R("STR123")) ); ! STEP( strd[a] = _R("Hello") ); ! STEP( strd[_R("321STR")] = _R("World") ); ! ! STEP( val = strd[a] ); ! OUT("val = %s", val.c_str()); ! ! STEP( val = strd[_R("321STR")] ); ! OUT("val = %s", val.c_str()); ! ! STEP( ret = strd.Contains(_R("STR123")) ); ! OUT("ret = %d", ret); ! ! STEP( ret = strd.Contains(_R("456STR")) ); ! OUT("ret = %d", ret); ! ! STEP( strd.Enumerate((DictEnumFunc)TStrDictPrint) ); ! } } int main(int argc, char** argv) { ! template_tests(); ! { ! rprintf(_R("\nString Dict Test: StrDict\n")); ! StrDict strd; ! void *val; ! int ret; ! STEP( String a(_R("Hello")) ); ! STEP( strd.Insert(a, (void*)0x1) ); ! STEP( strd.Insert(_R("World"), (void*)0x2) ); ! STEP( val = strd[a] ); ! OUT("val = %p", val); ! STEP( val = strd[_R("World")] ); ! OUT("val = %p", val); ! ! STEP( ret = strd.Contains(_R("World")) ); ! OUT("ret = %d", ret); ! STEP( ret = strd.Contains(_R("test")) ); ! OUT("ret = %d", ret); ! STEP( strd.Enumerate((DictEnumFunc)StrDictPrint) ); ! } ! ! { ! rprintf(_R("\nInt Dict Test: StrDict\n")); ! IntDict intd; ! ! void *val; ! int ret; ! ! STEP( int a = 10 ); ! STEP( intd.Insert(a, (void*)0x1) ); ! STEP( intd.Insert(14, (void*)0x2) ); ! ! STEP( val = intd[a] ); ! OUT("val = %p", val); ! ! STEP( val = intd[14] ); ! OUT("val = %p", val); ! ! STEP( ret = intd.Contains(10) ); ! OUT("ret = %d", ret); ! ! STEP( ret = intd.Contains(5) ); ! OUT("ret = %d", ret); + STEP( intd.Enumerate((DictEnumFunc)IntDictPrint) ); + } + getchar(); + return 0; ! } /** |
From: <laz...@us...> - 2004-03-07 21:16:53
|
Update of /cvsroot/rtk/rtk/ide/vcpp6/rtk_static In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32596/ide/vcpp6/rtk_static Modified Files: rtk_static.dsp Log Message: - Added custom key support for Dict - template based (T)Dict classes - Int / Str Dict added Index: rtk_static.dsp =================================================================== RCS file: /cvsroot/rtk/rtk/ide/vcpp6/rtk_static/rtk_static.dsp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rtk_static.dsp 28 Feb 2004 07:39:43 -0000 1.8 --- rtk_static.dsp 7 Mar 2004 20:52:59 -0000 1.9 *************** *** 222,225 **** --- 222,229 ---- # Begin Source File + SOURCE=..\..\..\rtk\TDict.h + # End Source File + # Begin Source File + SOURCE=..\..\..\rtk\Thread.h # End Source File |
From: <de...@us...> - 2004-03-06 12:26:49
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8420 Modified Files: Mutex.h Log Message: Small change - beautified code. Index: Mutex.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Mutex.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Mutex.h 21 Feb 2004 10:06:53 -0000 1.2 --- Mutex.h 6 Mar 2004 12:04:06 -0000 1.3 *************** *** 32,37 **** ***** * Authors (chronological order): ! * Mikko Lahteenmaki, mikko§rtk.cx ! * Dejan Lekic, dejan§rtk.cx * Contributors (chronological order): * $fname $lname, $email --- 32,37 ---- ***** * Authors (chronological order): ! * Mikko Lahteenmaki, mikkortk.cx ! * Dejan Lekic, dejanrtk.cx * Contributors (chronological order): * $fname $lname, $email *************** *** 81,87 **** CRITICAL_SECTION _cs; #else ! pthread_mutex_t _cs; ! pthread_t _owner; ! int _recursive_counter; #endif // _WIN32 --- 81,87 ---- CRITICAL_SECTION _cs; #else ! pthread_mutex_t _cs; ! pthread_t _owner; ! int _recursive_counter; #endif // _WIN32 |
From: <laz...@us...> - 2004-03-05 21:37:54
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1183/src/core/platform/linux Modified Files: Mutex.cpp Thread.cpp Log Message: - Removed unneeded member variables / functions from Thread - Fixed linux Mutex initializer If you port something from efltk please, RTKlize it FIRST! And check that all variables are actually needed Index: Mutex.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/Mutex.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Mutex.cpp 5 Mar 2004 18:18:25 -0000 1.1 --- Mutex.cpp 5 Mar 2004 21:15:39 -0000 1.2 *************** *** 42,45 **** --- 42,46 ---- #include <rtk/Mutex.h> + #include <rtk/debug.h> namespace Rtk *************** *** 48,88 **** // Linux supports recursive locks, use them directly, with some cheating: #ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - extern pthread_mutexattr_t Mutex_attrib; ! void Mutex::Init() { ! pthread_mutex_init(&_cs, &Mutex_attrib); ! } ! void Mutex::Lock() { ! pthread_mutex_lock(&_cs); ! } ! void Mutex::Unlock() { ! pthread_mutex_unlock(&_cs); ! } #else - // standard pthread mutexes need a bit of work to be recursive: - void Mutex::Init() { - recursive_counter = 0; - pthread_mutex_init(&_cs, NULL); - } ! void Mutex::Lock() { ! if(!recursive_counter || owner_ != pthread_self()) { ! pthread_mutex_lock(&_cs); ! owner_ = pthread_self(); ! } ! recursive_counter++; } ! void Mutex::Unlock() { ! if (!--recursive_counter) ! pthread_mutex_unlock(&_cs); ! } // unlock() #endif void Mutex::Destroy() { pthread_mutex_destroy(&_cs); ! } // destroy() }; // Rtk --- 49,104 ---- // Linux supports recursive locks, use them directly, with some cheating: #ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP ! static pthread_mutexattr_t mutex_attr = { PTHREAD_MUTEX_RECURSIVE_NP }; ! ! void Mutex::Init() { ! pthread_mutex_init(&_cs, &mutex_attr); ! } ! void Mutex::Lock() { ! pthread_mutex_lock(&_cs); ! } ! void Mutex::Unlock() { ! pthread_mutex_unlock(&_cs); ! } ! #else ! // standard pthread mutexes need a bit of work to be recursive: ! void Mutex::Init() ! { ! recursive_counter = 0; ! pthread_mutex_init(&_cs, NULL); ! owner_ = 0; ! } ! ! void Mutex::Lock() ! { ! if(recursive_counter==0 || owner_ != pthread_self()) { ! pthread_mutex_lock(&_cs); ! owner_ = pthread_self(); } + recursive_counter++; + } ! void Mutex::Unlock() ! { ! if(--recursive_counter == 0) ! pthread_mutex_unlock(&_cs); ! #if _DEBUG ! // This is bug in users code.. ! if(recursive_counter<0) { ! DBG(_R("Mutex recursive count < 0!! FATAL! Fix your code!\n")); ! exit(-1); ! } ! #endif ! } ! #endif void Mutex::Destroy() { pthread_mutex_destroy(&_cs); ! } }; // Rtk Index: Thread.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/Thread.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Thread.cpp 5 Mar 2004 18:18:25 -0000 1.1 --- Thread.cpp 5 Mar 2004 21:15:39 -0000 1.2 *************** *** 69,74 **** _function = function; _arg = arg; ! _kill_thread = _running = 0; ! if (pthread_create((pthread_t*)(_thread_handle), NULL, thread_function, this)) result = false; return result; --- 69,74 ---- _function = function; _arg = arg; ! _running = 0; ! if (pthread_create(&_thread_handle, NULL, thread_function, this)) result = false; return result; *************** *** 77,81 **** void Thread::Terminate(int exitcode) { ! pthread_cancel(*((pthread_t*)(_thread_handle))); } --- 77,81 ---- void Thread::Terminate(int exitcode) { ! pthread_cancel(_thread_handle); } *************** *** 83,97 **** { void *result; ! return (bool)pthread_join(*((pthread_t*)(_thread_handle)), &result); } int Thread::GetPriority() const { ! return 0; } int Thread::SetPriority(int priority) { ! return 0; } --- 83,97 ---- { void *result; ! return (bool)pthread_join(_thread_handle, &result); } int Thread::GetPriority() const { ! return -1; } int Thread::SetPriority(int priority) { ! return -1; } |
From: <laz...@us...> - 2004-03-05 21:37:54
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1183/rtk Modified Files: Thread.h Log Message: - Removed unneeded member variables / functions from Thread - Fixed linux Mutex initializer If you port something from efltk please, RTKlize it FIRST! And check that all variables are actually needed Index: Thread.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Thread.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Thread.h 5 Mar 2004 18:30:58 -0000 1.5 --- Thread.h 5 Mar 2004 21:15:39 -0000 1.6 *************** *** 44,49 **** #define _RTK_FILENAME_H_ 1 ! #include <rtk/Mutex.h> ! #include <rtk/Export.h> namespace Rtk --- 44,58 ---- #define _RTK_FILENAME_H_ 1 ! #include "conf.h" ! #include "Mutex.h" ! #include "Export.h" ! ! #if defined(_RTK_WIN32_) ! #include <windows.h> ! typedef HANDLE ThreadHandle; ! #else ! #include <pthread.h> ! typedef pthread_t ThreadHandle; ! #endif namespace Rtk *************** *** 85,88 **** --- 94,98 ---- unsigned long GetId(); + ThreadHandle GetHandle() const { return _thread_handle; } ThreadFunction GetFunction() const { return _function; } *************** *** 91,107 **** virtual int ThreadStep() { return 0; } - // sleep time between single_steps - void ms_sleep(int sleep) { _ms_sleep = sleep; } - int ms_sleep() { return _ms_sleep; } - private: ! bool _running, _kill_thread; ThreadFunction _function; void* _arg; ! void* _thread_handle; unsigned long _thread_id; - unsigned int _ms_sleep; friend void *thread_function(void *arg); --- 101,112 ---- virtual int ThreadStep() { return 0; } private: ! bool _running; ThreadFunction _function; void* _arg; ! ThreadHandle _thread_handle; unsigned long _thread_id; friend void *thread_function(void *arg); |
From: <le...@us...> - 2004-03-05 18:53:08
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31386 Modified Files: Thread.h conf.h Log Message: Some small changes, mostly related to Thread implementation. Index: Thread.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Thread.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Thread.h 21 Feb 2004 11:24:27 -0000 1.4 --- Thread.h 5 Mar 2004 18:30:58 -0000 1.5 *************** *** 91,102 **** virtual int ThreadStep() { return 0; } private: ! bool _running; ThreadFunction _function; ! void *_arg; ! void *_thread_handle; ! unsigned long _thread_id; friend void *thread_function(void *arg); --- 91,107 ---- virtual int ThreadStep() { return 0; } + // sleep time between single_steps + void ms_sleep(int sleep) { _ms_sleep = sleep; } + int ms_sleep() { return _ms_sleep; } + private: ! bool _running, _kill_thread; ThreadFunction _function; ! void* _arg; ! void* _thread_handle; ! unsigned long _thread_id; ! unsigned int _ms_sleep; friend void *thread_function(void *arg); Index: conf.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/conf.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** conf.h 2 Mar 2004 11:26:22 -0000 1.8 --- conf.h 5 Mar 2004 18:30:58 -0000 1.9 *************** *** 2,17 **** #define __RTK_CONFIG_H__ 1 - // --- RTK BUILD CONFIG (automatic) definitions - #define RTK_BC_HAVE_WCSCMP 1 ! // Define macros for i18n ! // Will be moved to Translation.h or Locale.h or .. ! // _TR - Translate text ! #define _TR(x) x ! // _NOP - Notify translation parser for string to translate. Used in static RCHAR arrays ! #define _NOP(x) x #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) # define _RTK_WIN32_ 1 #endif --- 2,59 ---- #define __RTK_CONFIG_H__ 1 ! /************************************************************************* ! * Platform and compiler support detection ! */ ! #if defined(__GNUC__) ! # define _RTK_CC_GCC_ ! #elif defined(__SUNPRO_C) ! # define _RTK_CC_SUNPRO_ ! #elif defined(__SUNPRO_CC) ! # define _RTK_CC_SUNPRO_ ! # define __SUNPRO_C __SUNPRO_CC ! #elif defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__) ! # define _RTK_CC_XLC_ ! #elif defined(_AIX) && !defined(__GNUC__) ! # define _RTK_CC_XLC_ /* Workaround for old xlc */ ! #elif defined(__DECC) || defined(__DECCXX) ! # define _RTK_CC_DECC_ ! #elif defined(__osf__) && defined(__LANGUAGE_C__) ! # define _RTK_CC_DECC_ /* Workaround for old DEC C compilers */ ! #elif defined(_MSC_VER) ! # define _RTK_CC_MSVC_ ! #elif defined(__BORLANDC__) ! # define _RTK_CC_BCB_ ! #endif ! ! /************************************************************************* ! * Detect whether we support inline ! */ ! #if defined(__cplusplus) ! # define RTK_INLINE inline ! #elif defined(RTK_CC_GCC) ! # define RTK_INLINE __inline__ ! #elif defined(TRIO_CC_MSVC) ! # define RTK_INLINE _inline ! #elif defined(TRIO_CC_BCB) ! # define RTK_INLINE __inline ! #else ! # define RTK_INLINE ! #endif #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) # define _RTK_WIN32_ 1 + #else + # define _RTK_LINUX_ 1 + #endif + + #if defined(_WIN32_WCE) + # define _RTK_WINCE_ 1 + #endif + + // Prevent Visual C++ 6.0 from printing out stupid warnings + #if defined(_RTK_CC_MSVC_) && (_MSC_VER >= 600) + # pragma warning(disable: 4550) + # pragma warning(disable: 4244) #endif *************** *** 19,33 **** //#define UNICODE 1 ! #if defined(UNICODE) // Be sure that _UNICODE is also defined (but only on Win32!) - # if defined(_RTK_WIN32_) # define _UNICODE 1 - # else - # undef _UNICODE - # endif #else ! // Multibyte defined ! //# define MBCS 1 ! //# define _MBCS 1 #endif --- 61,81 ---- //#define UNICODE 1 ! #if defined(_RTK_WIN32_) ! // UNICODE is default WIN32, but not must ! # define UNICODE 1 ! #endif ! ! #if defined(_RTK_WINCE_) && !defined(UNICODE) ! // UNICODE is MUST under WinCE ! # define UNICODE 1 ! #endif ! ! #if defined(UNICODE) && defined(_RTK_WIN32_) && !defined(_UNICODE) // Be sure that _UNICODE is also defined (but only on Win32!) # define _UNICODE 1 #else ! // Singlebyte defined (ASCII) ! # define SBCS 1 ! # define _SBCS 1 #endif *************** *** 38,43 **** #endif // __RTK_CONFIG_H__ - - /** - * $Id$ - ***************************************************************************/ \ No newline at end of file --- 86,87 ---- |
From: <le...@us...> - 2004-03-05 18:52:14
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31215/platform/linux Modified Files: CMakeLists.txt Log Message: Small changes. |
From: <le...@us...> - 2004-03-05 18:52:13
|
Update of /cvsroot/rtk/rtk/src/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31215 Modified Files: SList.cpp Log Message: Small changes. Index: SList.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/SList.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SList.cpp 2 Feb 2004 13:35:26 -0000 1.6 --- SList.cpp 5 Mar 2004 18:30:04 -0000 1.7 *************** *** 83,87 **** if(_tail) _tail->next = new_element; ! new_element->next = 0; _tail = new_element; --- 83,87 ---- if(_tail) _tail->next = new_element; ! new_element->next = 0; _tail = new_element; *************** *** 185,189 **** cnt++; if(!all) break; ! } else prev = node; node = next; --- 185,189 ---- cnt++; if(!all) break; ! } else prev = node; node = next; |
From: <le...@us...> - 2004-03-05 18:51:39
|
Update of /cvsroot/rtk/rtk/src/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30999 Modified Files: CMakeLists.txt Log Message: Added code that checks for threads. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/CMakeLists.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CMakeLists.txt 26 Feb 2004 21:52:28 -0000 1.10 --- CMakeLists.txt 5 Mar 2004 18:29:29 -0000 1.11 *************** *** 33,47 **** #################################################################### SET(RTK_CORE_SFILES SList.cpp Dict.cpp debug.cpp error.cpp String.cpp Array.cpp ! rchar.cpp Vector.cpp ) # T0D0: I had problems in MinGW so i decided to exclude Variant.cpp there. # Sure, this should be fixed. ! IF(NOT CMAKE_COMPILER_IS_MINGW) ! SET(RTK_CORE_SFILES ${RTK_CORE_SFILES} Variant.cpp) ! ENDIF(NOT CMAKE_COMPILER_IS_MINGW) # This is good for VisualStudio ... --- 33,53 ---- #################################################################### + ##------------------------------------------------------------------- + # Let's get info about Threads + INCLUDE(${CMAKE_ROOT}/Modules/FindThreads.cmake) + + SUBDIRS(platform) + SET(RTK_CORE_SFILES SList.cpp Dict.cpp debug.cpp error.cpp String.cpp Array.cpp ! rchar.cpp Vector.cpp Variant.cpp ) # T0D0: I had problems in MinGW so i decided to exclude Variant.cpp there. # Sure, this should be fixed. ! #IF(NOT CMAKE_COMPILER_IS_MINGW) ! # SET(RTK_CORE_SFILES ${RTK_CORE_SFILES} Variant.cpp) ! #ENDIF(NOT CMAKE_COMPILER_IS_MINGW) # This is good for VisualStudio ... *************** *** 60,66 **** --- 66,78 ---- COMPILE_FLAGS -D_DEBUG COMPILE_FLAGS -DDEBUG + COMPILE_FLAGS ${CMAKE_THREAD_LIBS_INIT} ) ENDIF (RTK_OPT_DEBUG) + # Threads + SET_SOURCE_FILES_PROPERTIES(${RTK_CORE_SFILES} + COMPILE_FLAGS ${CMAKE_THREAD_LIBS_INIT} + ) + IF (RTK_OPT_UNICODE) SET_SOURCE_FILES_PROPERTIES(${RTK_CORE_SFILES} *************** *** 70,81 **** ############################################################ FLAGS ## ######### ! ! ######### ! ## LOG ############################################################ IF (RTK_OPT_BCLOG) FILE(APPEND ${RTK_BC_LOGFILE} "Files that go into ${RTK_LIBRTK}.a: ${RTK_CORE_SFILES}\n") ENDIF (RTK_OPT_BCLOG) - ############################################################ LOG ## - ######### ## --- 82,94 ---- ############################################################ FLAGS ## ######### ! ! ! ##------------------------------------------------------------------- ! # LOG ! # IF (RTK_OPT_BCLOG) FILE(APPEND ${RTK_BC_LOGFILE} "Files that go into ${RTK_LIBRTK}.a: ${RTK_CORE_SFILES}\n") + WRITE_FILE(${RTK_BC_LOGFILE} "Threads link-flags: ${CMAKE_THREAD_LIBS_INIT}\n" APPEND) ENDIF (RTK_OPT_BCLOG) ## |
From: <le...@us...> - 2004-03-05 18:47:02
|
Update of /cvsroot/rtk/rtk/src/core/platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29739 Added Files: CMakeLists.txt Log Message: Started working on /src/core/platform/* CMake build system. --- NEW FILE: CMakeLists.txt --- ## # # 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... # # Authors (chronological order): # Dejan Lekic , de...@nu... # Contributors # N/A #################################################################### #----------------------------------------------------------- # This will probably change in the future... # ... when other platforms come into focus. :) IF (WIN32) SUBDIRS(win32) ELSE (WIN32) SUBDIRS(linux) ENDIF (WIN32) ##------------------------------------------------------------------- # LOG # IF (RTK_OPT_BCLOG) WRITE_FILE(${RTK_BC_LOGFILE} "was in /src/core/platform\n" APPEND) ENDIF (RTK_OPT_BCLOG) ## # $Id: CMakeLists.txt,v 1.1 2004/03/05 18:24:52 leka Exp $ #################################################################### |