Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17692/rtk Modified Files: DList.h List.h String.h TVector.h Vector.h conf.h conf.h.in debug.h rchar_ascii.h rchar_unicode.h rtkdef.h Log Message: - Fixed string stuff for W32..... - printf convert defined as macro and uses alloca now PLEASE do not ANY GNU GCC specific code, e.g. in test.h PRINTF macro.. There's no way in this world compile vector test.. So, I changed PRINTF macro to what MS VCPP support, though no idea about gcc... Index: DList.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/DList.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DList.h 26 Feb 2004 20:07:41 -0000 1.1 --- DList.h 28 Feb 2004 07:39:43 -0000 1.2 *************** *** 181,186 **** /////////////////////////////////////////////////////////////// ! inline void Push(T obj) { AddTail(obj); } ! inline T Pop() { return RemoveTail(); } /////////////////////////////////////////////////////////////// --- 181,186 ---- /////////////////////////////////////////////////////////////// ! RTK_INLINE void Push(T obj) { AddTail(obj); } ! RTK_INLINE T Pop() { return RemoveTail(); } /////////////////////////////////////////////////////////////// *************** *** 188,193 **** /////////////////////////////////////////////////////////////// ! inline void Queue(T obj) { AddTail(obj); } ! inline T Dequeue() { return RemoveFront(); } /////////////////////////////////////////////////////////////// --- 188,193 ---- /////////////////////////////////////////////////////////////// ! RTK_INLINE void Queue(T obj) { AddTail(obj); } ! RTK_INLINE T Dequeue() { return RemoveFront(); } /////////////////////////////////////////////////////////////// Index: List.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/List.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** List.h 11 Feb 2004 12:29:29 -0000 1.5 --- List.h 28 Feb 2004 07:39:43 -0000 1.6 *************** *** 77,81 **** * Default constructor. */ ! inline List(): _head(0), _tail(0), _count(0), _free_func(0) { } // --------- DESTRUCTORS ----------------------------------- --- 77,81 ---- * Default constructor. */ ! List(): _head(0), _tail(0), _count(0), _free_func(0) { } // --------- DESTRUCTORS ----------------------------------- *************** *** 91,95 **** * Returns number of items in the list. */ ! inline int GetCount() const { return this->_count; } /** --- 91,95 ---- * Returns number of items in the list. */ ! RTK_INLINE int GetCount() const { return this->_count; } /** *************** *** 97,101 **** * @return LNode pointer to first node in List. */ ! inline LNode* GetFirst() const { return this->_head; } /** --- 97,101 ---- * @return LNode pointer to first node in List. */ ! RTK_INLINE LNode* GetFirst() const { return this->_head; } /** *************** *** 103,107 **** * @return LNode pointer to last node in List. */ ! inline LNode* GetLast() const { return this->_tail; } --- 103,107 ---- * @return LNode pointer to last node in List. */ ! RTK_INLINE LNode* GetLast() const { return this->_tail; } Index: String.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/String.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** String.h 14 Feb 2004 20:02:12 -0000 1.5 --- String.h 28 Feb 2004 07:39:43 -0000 1.6 *************** *** 57,61 **** unsigned long ref; ! inline void delete_self() { ::free(str); delete this; } }; --- 57,61 ---- unsigned long ref; ! RTK_INLINE void delete_self() { ::free(str); delete this; } }; *************** *** 429,452 **** }; ! static inline bool operator < (const String &s1, const String &s2) { return s1.Cmp(s2)<0; } ! static inline bool operator <= (const String &s1, const String &s2) { return s1.Cmp(s2)<=0; } ! static inline bool operator > (const String &s1, const String &s2) { return s1.Cmp(s2)>0; } ! static inline bool operator >= (const String &s1, const String &s2) { return s1.Cmp(s2)>=0; } ! static inline bool operator == (const String &s1, const String &s2) { if(&s1==&s2) return true; return s1.Cmp(s2)==0; } ! static inline bool operator != (const String &s1, const String &s2) { return s1.Cmp(s2)!=0; } ! static inline bool operator < (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)<0; } ! static inline bool operator <= (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)<=0; } ! static inline bool operator > (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)>0; } ! static inline bool operator >= (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)>=0; } ! static inline bool operator == (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)==0; } ! static inline bool operator != (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)!=0; } ! static inline bool operator < (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))<0); } ! static inline bool operator <= (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))<=0); } ! static inline bool operator > (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))>0); } ! static inline bool operator >= (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))>=0); } ! static inline bool operator == (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))==0); } ! static inline bool operator != (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))!=0); } extern RTK_API String operator +(const wchar_t*, const String& rhs); --- 429,452 ---- }; ! static RTK_INLINE bool operator < (const String &s1, const String &s2) { return s1.Cmp(s2)<0; } ! static RTK_INLINE bool operator <= (const String &s1, const String &s2) { return s1.Cmp(s2)<=0; } ! static RTK_INLINE bool operator > (const String &s1, const String &s2) { return s1.Cmp(s2)>0; } ! static RTK_INLINE bool operator >= (const String &s1, const String &s2) { return s1.Cmp(s2)>=0; } ! static RTK_INLINE bool operator == (const String &s1, const String &s2) { if(&s1==&s2) return true; return s1.Cmp(s2)==0; } ! static RTK_INLINE bool operator != (const String &s1, const String &s2) { return s1.Cmp(s2)!=0; } ! static RTK_INLINE bool operator < (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)<0; } ! static RTK_INLINE bool operator <= (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)<=0; } ! static RTK_INLINE bool operator > (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)>0; } ! static RTK_INLINE bool operator >= (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)>=0; } ! static RTK_INLINE bool operator == (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)==0; } ! static RTK_INLINE bool operator != (const String &s1, const RCHAR *s2) { return s1.Cmp(s2)!=0; } ! static RTK_INLINE bool operator < (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))<0); } ! static RTK_INLINE bool operator <= (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))<=0); } ! static RTK_INLINE bool operator > (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))>0); } ! static RTK_INLINE bool operator >= (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))>=0); } ! static RTK_INLINE bool operator == (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))==0); } ! static RTK_INLINE bool operator != (const RCHAR *s1, const String &s2) { return (rstrcmp(s1, s2.c_str()?s2.c_str():_R(""))!=0); } extern RTK_API String operator +(const wchar_t*, const String& rhs); Index: TVector.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/TVector.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TVector.h 26 Feb 2004 21:52:36 -0000 1.1 --- TVector.h 28 Feb 2004 07:39:43 -0000 1.2 *************** *** 82,92 **** const T Get(int idx) const { return (T)Vector::Get(idx); } T& At(int idx) { return (T&)Vector::At(idx); } ! inline T& operator[](int idx) { return (T&)Vector::At(idx); } ! inline void Push(T obj) { Vector::Push((void*)obj); } ! inline T Pop() { return (T)Vector::Pop(); } ! inline T Top() { return (T)Vector::Top(); } ! inline void Queue(T obj) { Vector::Queue((void*)obj); } T Dequeue() { return (T)Vector::Dequeue(); } }; --- 82,92 ---- 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(); } }; Index: Vector.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Vector.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Vector.h 26 Feb 2004 21:52:29 -0000 1.2 --- Vector.h 28 Feb 2004 07:39:43 -0000 1.3 *************** *** 43,46 **** --- 43,48 ---- #define _RTK_VECTOR_H_ 1 + #include "conf.h" + namespace Rtk { *************** *** 178,182 **** @return the reference to the item, no range checking is done */ ! inline void*& operator[](int idx) { return _data[idx]; } /////////////////////////////////////////////////////////////// --- 180,184 ---- @return the reference to the item, no range checking is done */ ! RTK_INLINE void*& operator[](int idx) { return _data[idx]; } /////////////////////////////////////////////////////////////// *************** *** 185,194 **** /** Simulate a stack push */ ! inline void Push(void* obj) { Add(obj); } /** Simulate a stack pop. When the stack is empty returns 0 typecasted to void* */ ! inline void* Pop() { if (_count == 0) return (void*)0; return _data[--_count]; --- 187,196 ---- /** Simulate a stack push */ ! RTK_INLINE void Push(void* obj) { Add(obj); } /** Simulate a stack pop. When the stack is empty returns 0 typecasted to void* */ ! RTK_INLINE void* Pop() { if (_count == 0) return (void*)0; return _data[--_count]; *************** *** 196,200 **** /** Returns the top of the stack */ ! inline void* Top() const { return _data[_count-1]; } /////////////////////////////////////////////////////////////// --- 198,202 ---- /** Returns the top of the stack */ ! RTK_INLINE void* Top() const { return _data[_count-1]; } /////////////////////////////////////////////////////////////// *************** *** 203,207 **** /** Adds an item to the end of the queue */ ! inline void Queue(void* obj) { Add(obj); } /** Removes and returns the item from the head of the queue */ --- 205,209 ---- /** Adds an item to the end of the queue */ ! RTK_INLINE void Queue(void* obj) { Add(obj); } /** Removes and returns the item from the head of the queue */ Index: conf.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/conf.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** conf.h 22 Feb 2004 10:21:29 -0000 1.5 --- conf.h 28 Feb 2004 07:39:44 -0000 1.6 *************** *** 2,40 **** #define __RTK_CONFIG_H__ 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 // Define this, if the platform uses UNICODE ! #undef UNICODE ! #undef _UNICODE ! #undef MBCS // Not supported ! #undef _MBCS // Not supported ! #undef SBCS ! #undef _SBCS ! #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 /* UNICODE */ ! ! // Singlebyte defined # define SBCS 1 # define _SBCS 1 - #endif --- 2,80 ---- #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 // Define this, if the platform uses UNICODE ! //#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 Index: conf.h.in =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/conf.h.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** conf.h.in 21 Feb 2004 23:49:04 -0000 1.4 --- conf.h.in 28 Feb 2004 07:39:44 -0000 1.5 *************** *** 2,17 **** #define __RTK_CONFIG_H__ 1 - // --- RTK BUILD CONFIG (automatic) definitions - #define RTK_BC_HAVE_WCSCMP @RTK_BC_HAVE_WCSCMP@ ! // 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 Index: debug.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/debug.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** debug.h 21 Feb 2004 23:49:04 -0000 1.2 --- debug.h 28 Feb 2004 07:39:44 -0000 1.3 *************** *** 56,60 **** * @param msg the message (format) */ ! inline void DBG(int prior, int mask, const RCHAR * msg, ...) { if (prior <= DEBUG_LEVEL) { // this will be optimized compile time --- 56,60 ---- * @param msg the message (format) */ ! static RTK_INLINE void DBG(int prior, int mask, const RCHAR * msg, ...) { if (prior <= DEBUG_LEVEL) { // this will be optimized compile time *************** *** 74,78 **** * @param msg the message */ ! inline void DBG(const RCHAR * msg) { if (DEBUG_LEVEL >= 0) --- 74,78 ---- * @param msg the message */ ! static RTK_INLINE void DBG(const RCHAR * msg) { if (DEBUG_LEVEL >= 0) Index: rchar_ascii.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rchar_ascii.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rchar_ascii.h 26 Feb 2004 20:02:16 -0000 1.4 --- rchar_ascii.h 28 Feb 2004 07:39:44 -0000 1.5 *************** *** 21,25 **** // Get #define rfgets fgets - // Not recomended #define rgets gets #define rgetchar getchar --- 21,24 ---- *************** *** 45,53 **** #define rfprintf fprintf #define rsnprintf snprintf ! //#define rsprintf sprintf #define rprintf printf #define rvfprintf vfprintf #define rvsnprintf vsnprintf ! //#define rvsprintf vsprintf #define rvprintf vprintf --- 44,52 ---- #define rfprintf fprintf #define rsnprintf snprintf ! #define rsprintf sprintf #define rprintf printf #define rvfprintf vfprintf #define rvsnprintf vsnprintf ! #define rvsprintf vsprintf #define rvprintf vprintf *************** *** 91,106 **** // is* #define risascii isascii ! #define riscntrl iswcntrl ! #define risgraph iswgraph ! #define rislower iswlower ! #define risprint iswprint ! #define rispunct iswpunct ! #define risspace iswspace ! #define risupper iswupper ! #define risxdigit iswxdigit // case conversions ! #define rtolower towlower ! #define rtoupper towupper //#define rstrlwr strlwr //#define rstrupr strupr --- 90,108 ---- // is* #define risascii isascii ! #define riscntrl iscntrl ! #define risgraph isgraph ! #define rislower islower ! #define risprint isprint ! #define rispunct ispunct ! #define risspace isspace ! #define risupper isupper ! #define risxdigit isxdigit ! #define risdigit isdigit ! #define risalpha isalpha // case conversions ! #define rtolower tolower ! #define rtoupper toupper ! //#define rstrlwr strlwr //#define rstrupr strupr Index: rchar_unicode.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rchar_unicode.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rchar_unicode.h 23 Feb 2004 20:16:43 -0000 1.3 --- rchar_unicode.h 28 Feb 2004 07:39:44 -0000 1.4 *************** *** 48,52 **** #define rputtchar putwchar //#define rputs putws ! inline int rputs(const RCHAR* str) { fputws(str, stdout); } // str <-> number conversions --- 48,52 ---- #define rputtchar putwchar //#define rputs putws ! static RTK_INLINE int rputs(const RCHAR* str) { fputws(str, stdout); } // str <-> number conversions *************** *** 62,67 **** #define rstrtoul wcstoul // printf like - //the s version without n is not recomended! int rvsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, va_list args); int rvfprintf(FILE* f, const RCHAR* fmt, va_list args); --- 62,68 ---- #define rstrtoul wcstoul + #if !defined(_RTK_WIN32_) && defined(UNICODE) + // printf like int rvsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, va_list args); int rvfprintf(FILE* f, const RCHAR* fmt, va_list args); *************** *** 78,85 **** --- 79,102 ---- int rfscanf(FILE* f, const RCHAR* fmt, ...); int rscanf(const RCHAR* fmt, ...); + + #else + + // printf like + #define rfprintf fwprintf + #define rsnprintf snwprintf + #define rsprintf swprintf + #define rprintf wprintf + #define rvfprintf vfwprintf + #define rvsnprintf vsnwprintf + #define rvsprintf vswprintf + #define rvprintf vwprintf + + // scanf's #define rfscanf fwscanf #define rsscanf swscanf #define rscanf wscanf + #endif + // File // todo: what about linux? *************** *** 113,118 **** // is* ! //#define risascii iswascii ! inline int risascii(RCHAR c) { return !(c & 0x7f); } #define riscntrl iswcntrl #define risgraph iswgraph --- 130,134 ---- // is* ! #define risascii iswascii #define riscntrl iswcntrl #define risgraph iswgraph *************** *** 123,130 **** --- 139,149 ---- #define risupper iswupper #define risxdigit iswxdigit + #define risdigit iswdigit + #define risalpha iswalpha // case conversions #define rtolower towlower #define rtoupper towupper + //#define rstrlwr _wcslwr //#define rstrupr _wcsupr Index: rtkdef.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rtkdef.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rtkdef.h 22 Feb 2004 10:21:29 -0000 1.8 --- rtkdef.h 28 Feb 2004 07:39:44 -0000 1.9 *************** *** 48,62 **** */ ! #ifndef _RTK_RTKDEFS_H_ ! #define _RTK_RTKDEFS_H_ 1 ! #include <rtk/Export.h> ! namespace Rtk ! { ! /// ! /// RTK version definitions ! /// #define RTK_VER_MAJOR 0 #define RTK_VER_MINOR 1 --- 48,60 ---- */ ! #ifndef _RTK_RTKDEF_H_ ! #define _RTK_RTKDEF_H_ 1 ! #include "Export.h" ! #include "conf.h" ! namespace Rtk { ! // RTK version definitions #define RTK_VER_MAJOR 0 #define RTK_VER_MINOR 1 *************** *** 66,74 **** RTK_VER_RELEASE * 0.0001f) ! /// /// Common types - /// ! #if defined(_WIN32) && !defined(__GNUC__) typedef unsigned __int64 ulonglong; typedef __int64 longlong; --- 64,71 ---- RTK_VER_RELEASE * 0.0001f) ! //////////////////////////////// /// Common types ! #if defined(_RTK_WIN32_) && !defined(_RTK_CC_GCC_) typedef unsigned __int64 ulonglong; typedef __int64 longlong; *************** *** 83,92 **** typedef unsigned short ushort; ! #if defined(_WIN32) ! # undef dirsep ! # define dirsep '\\' #else ! # undef dirsep ! # define dirsep '/' #endif --- 80,89 ---- typedef unsigned short ushort; ! #if defined(_RTK_WIN32_) ! # undef dirsep ! # define dirsep '\\' #else ! # undef dirsep ! # define dirsep '/' #endif *************** *** 99,114 **** typedef int (*CmpFunction)(const void *item1, const void *item2); - /// - /// Prevent Visual C++ 6.0 from printing out stupid warnings - /// - #if defined(_MSC_VER) && (_MSC_VER >= 600) - # pragma warning(disable: 4550) - # pragma warning(disable: 4244) - #endif - #define TestFlag(flag, inflags) ( ((flag)&(inflags))!=0 ) #define ClearFlag(flag, inflags) (inflags = ((inflags)&~(flag)) ) ! }; // Rtk namespace #endif --- 96,103 ---- typedef int (*CmpFunction)(const void *item1, const void *item2); #define TestFlag(flag, inflags) ( ((flag)&(inflags))!=0 ) #define ClearFlag(flag, inflags) (inflags = ((inflags)&~(flag)) ) ! } // Rtk namespace #endif |