From: <laz...@us...> - 2004-02-29 18:15:25
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17958/rtk Modified Files: rchar.h rchar_ascii.h rchar_unicode.h Log Message: More string stuff... uhh.. :) Index: rchar.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rchar.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** rchar.h 26 Feb 2004 20:02:16 -0000 1.10 --- rchar.h 29 Feb 2004 17:57:09 -0000 1.11 *************** *** 24,29 **** #undef INCLUDED_FROM_RCHAR ! RCHAR* rstrlwr(const RCHAR* str); ! RCHAR* rstrupr(const RCHAR* str); } // namespace Rtk --- 24,40 ---- #undef INCLUDED_FROM_RCHAR ! /** Convert a string to lowercase. ! * Replaces the string 'str' with lowercase characters, ! * by invoking the rtolower function for each character in the string. ! * @return The address of the original string, 'str'. ! */ ! RCHAR* rstrlwr(RCHAR* str); ! ! /** Convert a string to uppercase. ! * Replaces the string 'str' with uppercase characters, ! * by invoking the rtoupper function for each character in the string. ! * @return The address of the original string, 'str'. ! */ ! RCHAR* rstrupr(RCHAR* str); } // namespace Rtk Index: rchar_ascii.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rchar_ascii.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rchar_ascii.h 28 Feb 2004 07:39:44 -0000 1.5 --- rchar_ascii.h 29 Feb 2004 17:57:10 -0000 1.6 *************** *** 32,40 **** // str <-> number conversions - #define ritoa itoa - #define rltoa ltoa #define ratoi atoi #define ratol atol ! #define rultoa ultoa #define rstrtod strtod #define rstrtol strtol --- 32,38 ---- // str <-> number conversions #define ratoi atoi #define ratol atol ! #define rstrtod strtod #define rstrtol strtol *************** *** 55,61 **** #define rsscanf sscanf #define rscanf scanf - #define rvfscanf vfscanf - #define rvsscanf vsscanf - #define rvscanf vscanf // File --- 53,56 ---- *************** *** 79,90 **** #define rstrncmp strncmp #define rstrncpy strncpy - #define rstrnset strnset #define rstrpbrk strpbrk #define rstrrchr strrchr #define rstrrev strrev - #define rstrset strset #define rstrspn strspn #define rstrstr strstr #define rstrtok strtok // is* --- 74,86 ---- #define rstrncmp strncmp #define rstrncpy strncpy #define rstrpbrk strpbrk #define rstrrchr strrchr #define rstrrev strrev #define rstrspn strspn #define rstrstr strstr #define rstrtok strtok + #define rstrtok_r strtok_r + #define rstrset(s,v) ((RCHAR*)memset((s),(v),rstrlen(s))) + #define rstrnset(s,v,n) ((RCHAR*)memset((s),(v),(n))) // is* *************** *** 105,111 **** #define rtoupper toupper - //#define rstrlwr strlwr - //#define rstrupr strupr - #define REOF EOF --- 101,104 ---- Index: rchar_unicode.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rchar_unicode.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rchar_unicode.h 28 Feb 2004 07:39:44 -0000 1.4 --- rchar_unicode.h 29 Feb 2004 17:57:10 -0000 1.5 *************** *** 38,43 **** // Get #define rfgets fgetws ! //not recomended! ! //#define rgets getws #define rgetchar getwchar #define rungetc ungetwc --- 38,42 ---- // Get #define rfgets fgetws ! #define rgets getws #define rgetchar getwchar #define rungetc ungetwc *************** *** 47,61 **** #define rfputs fputws #define rputtchar putwchar ! //#define rputs putws ! static RTK_INLINE int rputs(const RCHAR* str) { fputws(str, stdout); } // str <-> number conversions ! // todo: what about linux? ! #define ritoa _itow ! #define rltoa _ltow ! #define ratoi _wtoi ! #define ratol _wtol - #define rultoa _ultow #define rstrtod wcstod #define rstrtol wcstol --- 46,55 ---- #define rfputs fputws #define rputtchar putwchar ! #define rputs putws // str <-> number conversions ! #define ratoi(s) ((int)wcstol((s), NULL, 10)) ! #define ratol(s) ((long)wcstol((s), NULL, 10)) #define rstrtod wcstod #define rstrtol wcstol *************** *** 64,82 **** #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); ! int rvprintf(const RCHAR* fmt, va_list args); ! int rsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, ...); ! int rfprintf(FILE* f, const RCHAR* fmt, ...); ! int rprintf(const RCHAR* fmt, ...); // scanf's ! int rvsscanf(const RCHAR* src, const RCHAR* fmt, va_list args); ! int rvfscanf(FILE* f, const RCHAR* fmt, va_list args); ! int rvscanf(const RCHAR* fmt, va_list args); ! int rsscanf(const RCHAR* src, const RCHAR* fmt, ...); ! int rfscanf(FILE* f, const RCHAR* fmt, ...); ! int rscanf(const RCHAR* fmt, ...); #else --- 58,80 ---- #if !defined(_RTK_WIN32_) && defined(UNICODE) + #include "Export.h" + // printf like ! RTK_API int rvsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, va_list args); ! RTK_API int rvfprintf(FILE* f, const RCHAR* fmt, va_list args); ! RTK_API int rvprintf(const RCHAR* fmt, va_list args); ! RTK_API int rsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, ...); ! RTK_API int rfprintf(FILE* f, const RCHAR* fmt, ...); ! RTK_API int rprintf(const RCHAR* fmt, ...); // scanf's ! RTK_API int rsscanf(const RCHAR* src, const RCHAR* fmt, ...); ! RTK_API int rfscanf(FILE* f, const RCHAR* fmt, ...); ! RTK_API int rscanf(const RCHAR* fmt, ...); ! ! // File ! RTK_API FILE *rfdopen(int fildes, const RCHAR *mode); ! RTK_API FILE *rfopen(const RCHAR *path, const RCHAR *mode); ! RTK_API FILE *rfreopen(const RCHAR *path, const RCHAR *mode, FILE *stream); #else *************** *** 97,108 **** #define rscanf wscanf - #endif - // File - // todo: what about linux? #define rfdopen _wfdopen #define rfopen _wfopen #define rfreopen _wfreopen // str #define rstrcasecmp wcscasecmp --- 95,105 ---- #define rscanf wscanf // File #define rfdopen _wfdopen #define rfopen _wfopen #define rfreopen _wfreopen + #endif + // str #define rstrcasecmp wcscasecmp *************** *** 120,131 **** #define rstrncmp wcsncmp #define rstrncpy wcsncpy - #define rstrnset wmemset #define rstrpbrk wcspbrk #define rstrrchr wcsrchr #define rstrrev wcsrev - #define rstrset wmemset #define rstrspn wcsspn #define rstrstr wcsstr #define rstrtok wcstok // is* --- 117,129 ---- #define rstrncmp wcsncmp #define rstrncpy wcsncpy #define rstrpbrk wcspbrk #define rstrrchr wcsrchr #define rstrrev wcsrev #define rstrspn wcsspn #define rstrstr wcsstr #define rstrtok wcstok + #define rstrtok_r wcstok + #define rstrset(s,v) ((RCHAR*)wmemset((s),(v),rstrlen(s))) + #define rstrnset(s,v,n) ((RCHAR*)wmemset((s),(v),(n))) // is* *************** *** 146,152 **** #define rtoupper towupper - //#define rstrlwr _wcslwr - //#define rstrupr _wcsupr - #define REOF WEOF --- 144,147 ---- |