X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Funiname%2Funiname.c;h=bef58af31a60ebf19055ca0ffbd98aa9daf7b695;hb=fa3486514bd8f15f8eb4c49821d0356b52e5a335;hp=d17524e5b7c5b47351873036ef850dd3c60a6483;hpb=0b34902ec7c2c36a8169ea4ff09e872025a4258f;p=gnulib.git diff --git a/lib/uniname/uniname.c b/lib/uniname/uniname.c index d17524e5b..bef58af31 100644 --- a/lib/uniname/uniname.c +++ b/lib/uniname/uniname.c @@ -1,20 +1,18 @@ /* Association between Unicode characters and their names. - Copyright (C) 2000-2002, 2005-2007 Free Software Foundation, Inc. + Copyright (C) 2000-2002, 2005-2007, 2009 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) - any later version. + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by 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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library 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. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include @@ -227,11 +225,14 @@ unicode_character_name (ucs4_t c, char *buf) case 0x1D: c -= 0x14000; break; + case 0x1F: + c -= 0x15000; + break; case 0x2F: - c -= 0x25000; + c -= 0x24000; break; case 0xE0: - c -= 0xD5000; + c -= 0xD4000; break; default: return NULL; @@ -496,11 +497,11 @@ unicode_name_character (const char *name) unsigned int c = unicode_name_to_code[i].code; /* Undo the transformation to 16-bit space. */ - static const unsigned int offset[12] = + static const unsigned int offset[13] = { 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x05000, 0x09000, 0x09000, 0x0A000, 0x14000, - 0x25000, 0xD5000 + 0x15000, 0x24000, 0xD4000 }; return c + offset[c >> 12]; }