51 #ifndef LHOGHO_UNICODE_H
52 #define LHOGHO_UNICODE_H
75 #define FILENAME(x) UTF16_to_ASCII(x)
76 #define UNFILENAME(x) ASCII_to_UTF16(x)
79 #define FILENAME(x) (x)
80 #define UNFILENAME(x) ASCII_to_ASCII(x)
89 #define NULL_CHAR TEXT('\0')
96 #endif //UNICODE_CHARS
110 #define PUTCHAR(x,y) putwc(x,y)
111 #define GETCHAR(x) getwc(x)
112 #define STRLEN(x) wcslen(x)
113 #define STRNCPY(x,y,z) wcsncpy(x,y,z)
115 #define STRCMP(x,y) wcscmp(x,y)
116 #define STRTOD(x,y) wcstod(x,y)
117 #define STRTOL(x,y) wcstoll(x,y,0)
118 #define TOUPPER(x) towupper(x)
119 #define TOLOWER(x) towlower(x)
120 #define ISDIGIT(x) iswdigit(x)
121 #define STRCHR(x,y) wcschr(x,y)
122 #define PRINT(x,...) printf(x,__VA_ARGS__)
123 #define STRFTIME(x,y,z,t) wcsftime(x,y,z,t)
125 #define SPRINTF(x,n,y,z) swprintf(x,y,z)
126 #define SPRINT(x,n,y,...) swprintf(x,y,__VA_ARGS__)
128 #define SPRINTF(x,n,y,z) swprintf(x,n,y,z)
129 #define SPRINT(x,n,y,...) swprintf(x,n,y,__VA_ARGS__)
133 #define STRFTIME(x,y,z,t) strftime(x,y,z,t)
134 #define PRINT(x,...) printf(x,__VA_ARGS__)
135 #define PUTCHAR(x,y) putc(x,y)
136 #define GETCHAR(x) getc(x)
137 #define STRLEN(x) strlen(x)
138 #define TOUPPER(x) toupper(x)
139 #define TOLOWER(x) tolower(x)
140 #define STRCHR(x,y) strchr(x,y)
141 #define ISDIGIT(x) isdigit(x)
142 #define STRNCPY(x,y,z) strncpy(x,y,z)
144 #define STRCMP(x,y) strcmp(x,y)
145 #define STRTOD(x,y) strtod(x,y)
146 #define STRTOL(x,y) strtoll(x,y,0)
149 #define SPRINTF(x,n,y,z) _snprintf(x,n,y,z)
151 #define SPRINTF(x,n,y,z) snprintf(x,n,y,z)
153 #define SPRINT(x,n,y,...) snprintf(x,n,y,__VA_ARGS__)
154 #endif //UNICODE_CHARS
166 extern long long int wcstoll (__const
wchar_t *__restrict __nptr,
167 wchar_t **__restrict __endptr,
int __base);
168 extern int swprintf (
wchar_t *__restrict __s,
size_t __n,
169 __const
wchar_t *__restrict __format, ...);
170 extern size_t wcslen (__const
wchar_t *__s) __THROW __attribute_pure__;
171 extern int fwide (__FILE *__fp,
int __mode) __THROW;
172 extern int wprintf (__const
wchar_t *__restrict __format, ...);
173 extern int wcsncmp (__const
wchar_t *__s1, __const
wchar_t *__s2,
size_t __n)
174 __THROW __attribute_pure__;
175 extern int wcsncasecmp (__const
wchar_t *__s1, __const
wchar_t *__s2,
177 extern wchar_t *wcsncpy (
wchar_t *__restrict __dest,
178 __const
wchar_t *__restrict __src,
size_t __n)
181 #endif //UNICODE_CHARS
187 #endif //LHOGHO_UNICODE_H