From b7760dc3ef64150aff05c50ae49f36a723ac12be Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 15 Feb 2014 15:14:08 -0500 Subject: [PATCH] Bug TW-278 - Cygwin throws warnings building mk_wcwidth() in wcwidth6.c. --- ChangeLog | 1 + src/wcwidth6.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 886690b6e..283d6d6f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ Features + TW-255 'Mask' instead of 'iMask' shown in info report (thanks to Benjamin Weber) + TW-261 Easy to create "not deletable" task (thanks to Jan Kunder). + + TW-278 Cygwin throws warnings building mk_wcwidth() in wcwidth6.c. + TW-1255 New testing framework (thanks to Renato Alves). + TW-1258 Portuguese Localization (thanks to Renato Alves). + TW-1260 New virtual tags YESTERDAY, TOMORROW. diff --git a/src/wcwidth6.cpp b/src/wcwidth6.cpp index 33a2f3ac9..7a9ba06ae 100644 --- a/src/wcwidth6.cpp +++ b/src/wcwidth6.cpp @@ -59,6 +59,7 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ +#include #include struct interval { @@ -229,8 +230,12 @@ int mk_wcwidth(wchar_t ucs) (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ (ucs >= 0xffe0 && ucs <= 0xffe6) || +#ifndef CYGWIN (ucs >= 0x20000 && ucs <= 0x2fffd) || - (ucs >= 0x30000 && ucs <= 0x3fffd))); + (ucs >= 0x30000 && ucs <= 0x3fffd) +#endif + ) + ); } int mk_wcswidth(const wchar_t *pwcs, size_t n)