1 /* $NetBSD: multibyte.h,v 1.4 2009/08/11 21:28:02 aymeric Exp $ */
10 typedef wchar_t RCHAR_T
;
11 typedef wchar_t CHAR_T
;
12 #if defined(__NetBSD__)
13 #define MAX_CHAR_T 0xffffffff
15 #define MAX_CHAR_T WCHAR_MAX
17 typedef u_int UCHAR_T
;
21 #define STRTOUL wcstoul
22 #define SPRINTF swprintf
24 #define STRPBRK wcspbrk
25 #define TOUPPER towupper
26 #define TOLOWER towlower
27 #define ISUPPER iswupper
28 #define ISLOWER iswlower
29 #define STRSET wmemset
36 typedef u_char CHAR_T
;
37 #define MAX_CHAR_T 0xff
38 typedef u_char UCHAR_T
;
42 #define STRTOUL strtoul
43 #define SPRINTF snprintf
45 #define STRPBRK strpbrk
46 #define TOUPPER toupper
47 #define TOLOWER tolower
48 #define ISUPPER isupper
49 #define ISLOWER islower
57 #define MEMCMP(to, from, n) \
58 memcmp(to, from, (n) * sizeof(*(to)))
59 #define MEMMOVE(p, t, len) memmove(p, t, (len) * sizeof(*(p)))
60 #define MEMCPY(p, t, len) memcpy(p, t, (len) * sizeof(*(p)))
61 #define SIZE(w) (sizeof(w)/sizeof(*w))