Hi, Ted Unangst wrote on Fri, Mar 08, 2019 at 03:24:56PM -0500: > Matthieu Herrb wrote:
>> I would prefer a diff that just add a &&!defined(__OpenBSD__) to the >> condition before the definition of systemWcwidthOk(). This will cause >> less risk of conflicts in future updates and clearly show the >> intention. > If you prefer that, I would suggest the following to avoid patching multiple > places. Just short circuit the function. Makes sense, i committed that version. Thanks for reporting and for all the feedback, Ingo >>> #if OPT_WIDE_CHARS >>> -#if defined(HAVE_WCHAR_H) && defined(HAVE_WCWIDTH) >>> -/* >>> - * If xterm is running in a UTF-8 locale, it is still possible to encounter >>> - * old runtime configurations which yield incomplete or inaccurate data. >>> - */ >>> -static Bool >>> -systemWcwidthOk(int samplesize, int samplepass) >>> -{ >>> - wchar_t n; >>> - int oops = 0; > #ifdef __OpenBSD__ > return 1; > #endif >>> - >>> - for (n = 21; n <= 25; ++n) { >>> - wchar_t code = (wchar_t) dec2ucs(NULL, (unsigned) n); >>> - int system_code = wcwidth(code); >>> - int intern_code = mk_wcwidth(code);