#define _XOPEN_SOURCE #include int wcwidth(wchar_t c) { if (!c) return 0; if (c<' ') return -1; return 1; }