typedef wchar_t = string(uint);
typedef wint_t = string(int);
typedef wstring_t = string(array(uint, zero)*);
+typedef wstring2_t = string(array(uint, zero(arg2))*);
+typedef wstring3_t = string(array(uint, zero(arg3))*);
int fwide(FILE*, int);
wint_t btowc(int);
+
+wint_t getwc(FILE *);
+wint_t getwchar();
wint_t fgetwc(FILE*);
-wstring_t fgetws(+string(array(uint, zero(arg2))*), int, FILE*);
+wstring_t fgetws(+wstring2_t, int, FILE*);
+wint_t ungetwc(wint_t, FILE*);
+
wint_t fputwc(wchar_t, FILE*);
int fputws(wstring_t, FILE*);
+wint_t putwc(wchar_t, FILE*);
+wint_t putwchar(wchar_t);
+
+int wprintf(format(wstring_t));
int fwprintf(FILE*, format(wstring_t));
+int swprintf(+wstring2_t, ulong, format(wstring_t));
+int vfwprintf(FILE*, wstring_t, addr);
+int vwprintf(wstring_t, addr);
+int vswprintf(+wstring2_t, ulong, wstring_t, addr);
+
+; int wscanf(const wchar_t *restrict, ...);
; int fwscanf(FILE *restrict, const wchar_t *restrict, ...);
-wint_t getwc(FILE *);
-wint_t getwchar();
+; int swscanf(const wchar_t *restrict, const wchar_t *restrict, ...);
+; int vfwscanf(FILE *restrict, const wchar_t *restrict, va_list);
+; int vswscanf(const wchar_t *restrict, const wchar_t *restrict, va_list);
+; int vwscanf(const wchar_t *restrict, va_list);
+
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswcntrl(wint_t);
-; int iswctype(wint_t, wctype_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
+uint wctype(string);
+int iswctype(wint_t, uint);
+
ulong mbrlen(string, ulong, addr);
ulong mbrtowc(+wchar_t*, string[arg3], ulong, addr);
+ulong mbsrtowcs(+wstring3_t, string*, ulong, addr);
+ulong wctomb(+string0, wchar_t);
+ulong wcrtomb(+string0, wchar_t, addr);
+ulong wcsrtombs(+string3, wstring_t*, ulong, addr);
int mbsinit(addr);
-ulong mbsrtowcs(+string(array(uint, zero(arg3))), string*, ulong, addr);
+
+wint_t towlower(wint_t);
+wint_t towupper(wint_t);
+
+wstring_t wcscat(wstring_t, wstring_t);
+wstring_t wcsncat(wstring3_t, wstring_t, ulong);
+wstring_t wcschr(wstring_t, wchar_t);
+wstring_t wcsrchr(wstring_t, wchar_t);
+int wcscmp(wstring_t, wstring_t);
+int wcsncmp(wstring3_t, wstring3_t, ulong);
+int wcscoll(wstring_t, wstring_t);
+addr wcscpy(addr, wstring_t);
+addr wcsncpy(addr, wstring_t, ulong);
+ulong wcslen(wstring_t);
+
+wstring_t wcsstr(wstring_t, wstring_t);
+wstring_t wcswcs(wstring_t, wstring_t);
+
+ulong wcscspn(wstring_t, wstring_t);
+ulong wcsspn(wstring_t, wstring_t);
+wstring_t wcspbrk(wstring_t, wstring_t);
+wstring_t wcstok(wstring_t, wstring_t, +wstring_t*);
+
+ulong wcsftime(+wstring2_t, ulong, wstring_t, addr);
+
+# XXX ltrace misses long double and long long support
+typedef ldouble = double;
+typedef llong = long;
+typedef ullong = ulong;
+
+double wcstod(wstring_t, +wstring_t*);
+float wcstof(wstring_t, +wstring_t*);
+ldouble wcstold(wstring_t, +wstring_t*);
+long wcstol(wstring_t, +wstring_t*, int);
+llong wcstoll(wstring_t, +wstring_t*, int);
+ulong wcstoul(wstring_t, +wstring_t*, int);
+ullong wcstoull(wstring_t, +wstring_t*, int);
+
+int wcwidth(wchar_t);
+int wcswidth(wstring2_t, ulong);
+
+wstring_t wmemchr(wstring3_t, wchar_t, ulong);
+int wmemcmp(wstring3_t, wstring3_t, ulong);
+int wctob(wint_t);
+wstring3_t wmemcpy(addr, wstring3_t, ulong);
+wstring3_t wmemmove(addr, wstring3_t, ulong);
+wstring3_t wmemset(addr, wchar_t, ulong);
# sys/wait.h
int wait(addr);