From 4a9dcff10ec07770aaf0b4dedaac44eacbbaa110 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 1 Oct 2000 18:59:42 +0000 Subject: Update. * charmaps/ISO-IR-197: Remove alias "none". 2000-09-30 Bruno Haible --- wcsmbs/wcwidth.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'wcsmbs') diff --git a/wcsmbs/wcwidth.h b/wcsmbs/wcwidth.h index d13a5f59ae..49ad7c0d1e 100644 --- a/wcsmbs/wcwidth.h +++ b/wcsmbs/wcwidth.h @@ -22,9 +22,6 @@ #include #include "../wctype/wchar-lookup.h" -/* Tables containing character property information. */ -extern const char *__ctype32_wctype[12]; - /* Table containing width information. */ extern const char *__ctype32_width; @@ -33,12 +30,10 @@ internal_wcwidth (wint_t wc) { unsigned char res; - if (wc == L'\0') - return 0; - - if (wctype_table_lookup (__ctype32_wctype[__ISwprint], wc) == 0) - return -1; - + /* The tables have been prepared in such a way that + 1. wc == L'\0' yields res = 0, + 2. !iswprint (wc) implies res = '\xff'. */ res = wcwidth_table_lookup (__ctype32_width, wc); + return res == (unsigned char) '\xff' ? -1 : (int) res; } -- cgit v1.2.3