8 typedef wchar_t RCHAR_T
;
9 #define RCHAR_T_MAX ((1 << 24)-1)
10 typedef wchar_t CHAR_T
;
11 #define MAX_CHAR_T 0xffffff /* XXXX */
12 typedef u_int UCHAR_T
;
15 #define ISUPPER iswupper
18 #define STRTOUL wcstoul
19 #define SPRINTF swprintf
22 #define STRPBRK wcspbrk
23 #define TOLOWER towlower
24 #define TOUPPER towupper
25 #define STRSET wmemset
31 #define RCHAR_T_MAX CHAR_MAX
32 typedef u_char CHAR_T
;
33 #define MAX_CHAR_T 0xff
34 typedef u_char UCHAR_T
;
35 #define RCHAR_BIT CHAR_BIT
37 #define ISUPPER isupper
40 #define STRTOUL strtoul
41 #define SPRINTF snprintf
44 #define STRPBRK strpbrk
45 #define TOLOWER tolower
46 #define TOUPPER toupper
53 #define MEMCMP(to, from, n) \
54 memcmp(to, from, (n) * sizeof(*(to)))
55 #define MEMMOVE(p, t, len) memmove(p, t, (len) * sizeof(*(p)))
56 #define MEMCPY(p, t, len) memcpy(p, t, (len) * sizeof(*(p)))
58 * Like MEMCPY but return a pointer to the end of the copied bytes.
59 * Glibc has a function mempcpy with the same purpose.
61 #define MEMPCPY(p, t, len) \
62 ((void *)((char *)MEMCPY(p, t, len) + (len) * sizeof(*(p))))
63 #define SIZE(w) (sizeof(w)/sizeof(*w))