Print this page
make: use the more modern wchar routines, not widec.h

*** 34,45 **** #include <vroot/vroot.h> /* pathpt */ #include <sys/time.h> /* timestruc_t */ #include <errno.h> /* errno */ #include <wctype.h> - #include <widec.h> - /* * A type and some utilities for boolean values */ --- 34,43 ----
*** 156,167 **** #define ALLOC_WC(x) ((wchar_t *)getmem((x) * SIZEOFWCHAR_T)) #define FIND_LENGTH -1 #define GETNAME(a,b) getname_fn((a), (b), false) #define IS_EQUAL(a,b) (!strcmp((a), (b))) #define IS_EQUALN(a,b,n) (!strncmp((a), (b), (n))) ! #define IS_WEQUAL(a,b) (!wscmp((a), (b))) ! #define IS_WEQUALN(a,b,n) (!wsncmp((a), (b), (n))) #define MBLEN(a) mblen((a), MB_LEN_MAX) #define MBSTOWCS(a,b) (void) mbstowcs_with_check((a), (b), MAXPATHLEN) #define MBTOWC(a,b) mbtowc((a), (b), MB_LEN_MAX) #define SIZEOFWCHAR_T (sizeof (wchar_t)) #define VSIZEOF(v) (sizeof (v) / sizeof ((v)[0])) --- 154,165 ---- #define ALLOC_WC(x) ((wchar_t *)getmem((x) * SIZEOFWCHAR_T)) #define FIND_LENGTH -1 #define GETNAME(a,b) getname_fn((a), (b), false) #define IS_EQUAL(a,b) (!strcmp((a), (b))) #define IS_EQUALN(a,b,n) (!strncmp((a), (b), (n))) ! #define IS_WEQUAL(a,b) (!wcscmp((a), (b))) ! #define IS_WEQUALN(a,b,n) (!wcsncmp((a), (b), (n))) #define MBLEN(a) mblen((a), MB_LEN_MAX) #define MBSTOWCS(a,b) (void) mbstowcs_with_check((a), (b), MAXPATHLEN) #define MBTOWC(a,b) mbtowc((a), (b), MB_LEN_MAX) #define SIZEOFWCHAR_T (sizeof (wchar_t)) #define VSIZEOF(v) (sizeof (v) / sizeof ((v)[0]))
*** 242,252 **** ~Wstring(); void init(struct _Name * name); void init(wchar_t * name, unsigned length); unsigned length() { ! return wslen(string.buffer.start); }; void append_to_str(struct _String * str, unsigned off, unsigned length); wchar_t * get_string() { return string.buffer.start; --- 240,250 ---- ~Wstring(); void init(struct _Name * name); void init(wchar_t * name, unsigned length); unsigned length() { ! return wcslen(string.buffer.start); }; void append_to_str(struct _String * str, unsigned off, unsigned length); wchar_t * get_string() { return string.buffer.start;