version 1.30, 2016/04/26 07:33:36 |
version 1.31, 2016/04/27 09:36:25 |
|
|
width = wcwidth(wc); |
width = wcwidth(wc); |
if (width < 0 || width > 0xff) { |
if (width < 0 || width > 0xff) { |
log_debug("Unicode %04x, wcwidth() %d", wc, width); |
log_debug("Unicode %04x, wcwidth() %d", wc, width); |
|
|
|
/* |
|
* Many platforms have no width for relatively common |
|
* characters (wcwidth() returns -1); assume width 1 in this |
|
* case and hope for the best. |
|
*/ |
|
if (width < 0) |
|
return (1); |
return (-1); |
return (-1); |
} |
} |
return (width); |
return (width); |