1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <wchar.h> #include <stdio.h> int fputws(const wchar_t * restrict s, FILE * restrict stream) { const wchar_t *p = s; while (*p != L'\0') { if (fputwc(*p, stream) == EOF) { return EOF; } p++; } return 0; } /* STDC(199409) */