X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fwcwidth.c;h=66b5b15e0ba83f8203c6b4f170a37ecc96dacb29;hb=6f730e7ae5225bf9eb36554d94805b97a72784bd;hp=77042c2ae39c70e979e6d7a09fe33f4bc62a3134;hpb=7599e817ca9e12244449ca2fad855b96f6c8b817;p=gnulib.git diff --git a/lib/wcwidth.c b/lib/wcwidth.c index 77042c2ae..66b5b15e0 100644 --- a/lib/wcwidth.c +++ b/lib/wcwidth.c @@ -1,10 +1,10 @@ /* Determine the number of screen columns needed for a character. - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2010 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ #include @@ -27,17 +26,16 @@ #include "streq.h" #include "uniwidth.h" -#undef wcwidth - int -rpl_wcwidth (wchar_t wc) +wcwidth (wchar_t wc) +#undef wcwidth { /* In UTF-8 locales, use a Unicode aware width function. */ const char *encoding = locale_charset (); if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0)) { /* We assume that in a UTF-8 locale, a wide character is the same as a - Unicode character. */ + Unicode character. */ return uc_width (wc, encoding); } else