00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef IXE_include_char_H
00026 #define IXE_include_char_H
00027
00028 namespace IXE {
00029
00030
00031
00032
00033 #ifdef _WIN32
00034
00035 typedef char char_t;
00036 #else
00037 #ifdef UNICODE
00038 #include <wchar.h>
00039 #include <wctype.h>
00040 typedef wchar_t char_t;
00041 #define STRLEN(x) wcslen(x)
00042 #define STRCMP(x, y) wcscmp(x, y)
00043 #define STRCPY(x, y) wcscpy(x, y)
00044 #define STRNCPY(x,y,z) wcsncpy(x, y, z)
00045 #define STRCOLL(x, y) wcscoll(x, y)
00046 #define STRNCMP(x,y,z) wcsncmp(x, y, z)
00047 #define STRLITERAL(x) (wchar_t*)L##x
00048 #define PRINTF wprintf
00049 #define FPRINTF fwprintf
00050 #define SPRINTF swprintf
00051 #define VFPRINTF vfwprintf
00052 #define FSCANF fwscanf
00053 #define SSCANF swscanf
00054 #define GETC(x) getwc(x)
00055 #define UNGETC(x, y) ungetwc(x, y)
00056 #define TOLOWER(x) towlower((x) & 0xFFFF)
00057 #define TOUPPER(x) towlower((x) & 0xFFFF)
00058 #define ISALNUM(x) iswalnum((x) & 0xFFFF)
00059 #define STRSTR(x, y) wcsstr(x, y)
00060 #define STRXFRM(x,y,z) wcsxfrm(x, y, z)
00061 #define STRFTIME(a,b,c,d) wcsftime(a,b,c,d)
00062 #define T_EOF WEOF
00063 # ifndef _T
00064 # define _T(x) L##x
00065 # endif
00066 #else // ! UNICODE
00067 typedef char char_t;
00068 #define STRLEN(x) strlen(x)
00069 #define STRCMP(x, y) strcmp(x, y)
00070 #define STRCPY(x, y) strcpy(x, y)
00071 #define STRNCPY(x,y,z) strncpy(x, y, z)
00072 #define STRCOLL(x, y) strcoll(x, y)
00073 #define STRNCMP(x,y,z) strncmp(x, y, z)
00074 #define STRLITERAL(x) (char*)x
00075 #define PRINTF printf
00076 #define FPRINTF fprintf
00077 #define SPRINTF sprintf
00078 #define VFPRINTF vfprintf
00079 #define FSCANF fscanf
00080 #define SSCANF sscanf
00081 #define GETC(x) getc(x)
00082 #define UNGETC(x, y) ungetc(x, y)
00083 #define TOLOWER(x) tolower((x) & 0xFF)
00084 #define TOUPPER(x) toupper((x) & 0xFF)
00085 #define ISALNUM(x) isalnum((x) & 0xFF)
00086 #define STRSTR(x, y) strstr(x, y)
00087 #define STRXFRM(x,y,z) strxfrm(x, y, z)
00088 #define STRFTIME(a,b,c,d) strftime(a,b,c,d)
00089 #define T_EOF EOF
00090 # ifndef _T
00091 # define _T(x) x
00092 # endif
00093 #endif // UNICODE
00094 #endif // _WIN32
00095
00096 }
00097
00098 #endif // IXE_include_char_H