1 #include "stdio_impl.h"
2 #include "locale_impl.h"
5 int fputws(const wchar_t *restrict ws, FILE *restrict f)
7 unsigned char buf[BUFSIZ];
9 locale_t *ploc = &CURRENT_LOCALE, loc = *ploc;
16 while (ws && (l = wcsrtombs((void *)buf, (void*)&ws, sizeof buf, 0))+1 > 1)
17 if (__fwritex(buf, l, f) < l) {
26 return l; /* 0 or -1 */
29 weak_alias(fputws, fputws_unlocked);