diff --git a/ChangeLog b/ChangeLog index 8feefa9b31..fb88552d24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2005-11-16 Ulrich Drepper + + * iconvdata/Makefile (modules): Add ISO_11548-1. + (distribute): Add iso_11548-1.c. + * iconvdata/gconv-modules: Add entries for ISO 11548-1. + * iconvdata/TESTS: Add entry for ISO 11548-1. + + [BZ 1872] + * iconvdata/iso_11548-1.c: New file. + * iconvdata/testdata/ISO_11548-1: New file. + * iconvdata/testdata/ISO_11548-1..UTF8: New file. + Patch by Samuel Thibault . + 2005-11-16 Kaz Kojima * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Remove incorrect &. diff --git a/iconvdata/Makefile b/iconvdata/Makefile index f6e9c17a0c..39eb1e3863 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -58,7 +58,7 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \ IBM1142 IBM1143 IBM1144 IBM1145 IBM1146 IBM1147 IBM1148 \ IBM1149 IBM1166 IBM1167 IBM4517 IBM4899 IBM4909 IBM4971 \ IBM5347 IBM9030 IBM9066 IBM9448 IBM12712 IBM16804 \ - IBM1364 IBM1371 IBM1388 IBM1390 IBM1399 + IBM1364 IBM1371 IBM1388 IBM1390 IBM1399 ISO_11548-1 modules.so := $(addsuffix .so, $(modules)) @@ -195,7 +195,7 @@ distribute := gconv-modules extra-module.mk gap.awk gaptab.awk gconv.map \ ibm9030.c ibm9030.h ibm9066.c ibm9066.h ibm9448.c ibm9448.h \ ibm12712.c ibm12712.h ibm16804.c ibm16804.h \ ibm1364.c ibm1364.h ibm1371.c ibm1371.h ibm1388.c ibm1388.h \ - ibm1390.c ibm1390.h ibm1399.c ibm1399.h + ibm1390.c ibm1390.h ibm1399.c ibm1399.h iso_11548-1.c # We build the transformation modules only when we build shared libs. ifeq (yes,$(build-shared)) diff --git a/iconvdata/TESTS b/iconvdata/TESTS index 9cd2a75e02..933c447096 100644 --- a/iconvdata/TESTS +++ b/iconvdata/TESTS @@ -164,3 +164,4 @@ IBM1371 IBM1371 N UTF8 IBM1388 IBM1388 N UTF8 IBM1390 IBM1390 N UTF8 IBM1399 IBM1399 N UTF8 +ISO_11548-1 ISO_11548-1 - UTF8 diff --git a/iconvdata/gconv-modules b/iconvdata/gconv-modules index 37b3e5f924..421dc6739a 100644 --- a/iconvdata/gconv-modules +++ b/iconvdata/gconv-modules @@ -1897,3 +1897,9 @@ alias CP1399// IBM1399// alias CSIBM1399// IBM1399// module IBM1399// INTERNAL IBM1399 1 module INTERNAL IBM1399// IBM1399 1 + +# from to module cost +alias ISO/TR_11548-1/ ISO_11548-1// +alias ISO11548-1// ISO_11548-1// +module ISO_11548-1// INTERNAL ISO_11548-1 1 +module INTERNAL ISO_11548-1// ISO_11548-1 1 diff --git a/iconvdata/iso_11548-1.c b/iconvdata/iso_11548-1.c new file mode 100644 index 0000000000..6543c61f32 --- /dev/null +++ b/iconvdata/iso_11548-1.c @@ -0,0 +1,73 @@ +/* Conversion to and from ISO 11548-1. + Copyright (C) 1997-1999, 2000-2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997, + Samuel Thibault , 2005. + + The GNU C Library 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 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +/* Definitions used in the body of the `gconv' function. */ +#define CHARSET_NAME "ISO_11548-1//" +#define FROM_LOOP from_iso11548_1 +#define TO_LOOP to_iso11548_1 +#define DEFINE_INIT 1 +#define DEFINE_FINI 1 +#define MIN_NEEDED_FROM 1 +#define MIN_NEEDED_TO 4 + +#define BRAILLE_UCS_BASE 0x2800 + +/* First define the conversion function from ISO 11548-1 to UCS4. */ +#define MIN_NEEDED_INPUT MIN_NEEDED_FROM +#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO +#define LOOPFCT FROM_LOOP +#define BODY \ + *((uint32_t *) outptr) = BRAILLE_UCS_BASE | (*inptr++); \ + outptr += sizeof (uint32_t); +#define ONEBYTE_BODY \ + { \ + return BRAILLE_UCS_BASE | c; \ + } +#include + + +/* Next, define the other direction. */ +#define MIN_NEEDED_INPUT MIN_NEEDED_TO +#define MIN_NEEDED_OUTPUT MIN_NEEDED_FROM +#define LOOPFCT TO_LOOP +#define BODY \ + { \ + uint32_t ch = *((const uint32_t *) inptr); \ + if (__builtin_expect ((ch & 0xffffff00u) != BRAILLE_UCS_BASE, 0)) \ + { \ + UNICODE_TAG_HANDLER (ch, 4); \ + \ + /* We have an illegal character. */ \ + STANDARD_TO_LOOP_ERR_HANDLER (4); \ + } \ + else \ + *outptr++ = (unsigned char) (ch & 0xff); \ + inptr += 4; \ + } +#define LOOP_NEED_FLAGS +#include + + +/* Now define the toplevel functions. */ +#include diff --git a/iconvdata/testdata/ISO_11548-1 b/iconvdata/testdata/ISO_11548-1 new file mode 100644 index 0000000000..c86626638e Binary files /dev/null and b/iconvdata/testdata/ISO_11548-1 differ diff --git a/iconvdata/testdata/ISO_11548-1..UTF8 b/iconvdata/testdata/ISO_11548-1..UTF8 new file mode 100644 index 0000000000..9ac4e2a8b6 --- /dev/null +++ b/iconvdata/testdata/ISO_11548-1..UTF8 @@ -0,0 +1 @@ +⠀⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿⡀⡁⡂⡃⡄⡅⡆⡇⡈⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒⡓⡔⡕⡖⡗⡘⡙⡚⡛⡜⡝⡞⡟⡠⡡⡢⡣⡤⡥⡦⡧⡨⡩⡪⡫⡬⡭⡮⡯⡰⡱⡲⡳⡴⡵⡶⡷⡸⡹⡺⡻⡼⡽⡾⡿⢀⢁⢂⢃⢄⢅⢆⢇⢈⢉⢊⢋⢌⢍⢎⢏⢐⢑⢒⢓⢔⢕⢖⢗⢘⢙⢚⢛⢜⢝⢞⢟⢠⢡⢢⢣⢤⢥⢦⢧⢨⢩⢪⢫⢬⢭⢮⢯⢰⢱⢲⢳⢴⢵⢶⢷⢸⢹⢺⢻⢼⢽⢾⢿⣀⣁⣂⣃⣄⣅⣆⣇⣈⣉⣊⣋⣌⣍⣎⣏⣐⣑⣒⣓⣔⣕⣖⣗⣘⣙⣚⣛⣜⣝⣞⣟⣠⣡⣢⣣⣤⣥⣦⣧⣨⣩⣪⣫⣬⣭⣮⣯⣰⣱⣲⣳⣴⣵⣶⣷⣸⣹⣺⣻⣼⣽⣾⣿ \ No newline at end of file diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 8127bb6933..c1d38f1c10 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,9 @@ +2005-11-16 Ulrich Drepper + + [BZ 1872] + * localedata/charmaps/ISO_11548-1. New file. + Patch by Samuel Thibault . + 2005-11-11 Ulrich Drepper [BZ #1294] diff --git a/localedata/charmaps/ISO_11548-1 b/localedata/charmaps/ISO_11548-1 new file mode 100644 index 0000000000..ee2eb6b5e5 --- /dev/null +++ b/localedata/charmaps/ISO_11548-1 @@ -0,0 +1,269 @@ + ISO_11548-1 + % + / +% version: 1.0 +% source: Samuel Thibault + +% alias ISO/TR_11548-1 +CHARMAP + /x00 BRAILLE PATTERN BLANK + /x01 BRAILLE PATTERN DOTS-1 + /x02 BRAILLE PATTERN DOTS-2 + /x03 BRAILLE PATTERN DOTS-12 + /x04 BRAILLE PATTERN DOTS-3 + /x05 BRAILLE PATTERN DOTS-13 + /x06 BRAILLE PATTERN DOTS-23 + /x07 BRAILLE PATTERN DOTS-123 + /x08 BRAILLE PATTERN DOTS-4 + /x09 BRAILLE PATTERN DOTS-14 + /x0a BRAILLE PATTERN DOTS-24 + /x0b BRAILLE PATTERN DOTS-124 + /x0c BRAILLE PATTERN DOTS-34 + /x0d BRAILLE PATTERN DOTS-134 + /x0e BRAILLE PATTERN DOTS-234 + /x0f BRAILLE PATTERN DOTS-1234 + /x10 BRAILLE PATTERN DOTS-5 + /x11 BRAILLE PATTERN DOTS-15 + /x12 BRAILLE PATTERN DOTS-25 + /x13 BRAILLE PATTERN DOTS-125 + /x14 BRAILLE PATTERN DOTS-35 + /x15 BRAILLE PATTERN DOTS-135 + /x16 BRAILLE PATTERN DOTS-235 + /x17 BRAILLE PATTERN DOTS-1235 + /x18 BRAILLE PATTERN DOTS-45 + /x19 BRAILLE PATTERN DOTS-145 + /x1a BRAILLE PATTERN DOTS-245 + /x1b BRAILLE PATTERN DOTS-1245 + /x1c BRAILLE PATTERN DOTS-345 + /x1d BRAILLE PATTERN DOTS-1345 + /x1e BRAILLE PATTERN DOTS-2345 + /x1f BRAILLE PATTERN DOTS-12345 + /x20 BRAILLE PATTERN DOTS-6 + /x21 BRAILLE PATTERN DOTS-16 + /x22 BRAILLE PATTERN DOTS-26 + /x23 BRAILLE PATTERN DOTS-126 + /x24 BRAILLE PATTERN DOTS-36 + /x25 BRAILLE PATTERN DOTS-136 + /x26 BRAILLE PATTERN DOTS-236 + /x27 BRAILLE PATTERN DOTS-1236 + /x28 BRAILLE PATTERN DOTS-46 + /x29 BRAILLE PATTERN DOTS-146 + /x2a BRAILLE PATTERN DOTS-246 + /x2b BRAILLE PATTERN DOTS-1246 + /x2c BRAILLE PATTERN DOTS-346 + /x2d BRAILLE PATTERN DOTS-1346 + /x2e BRAILLE PATTERN DOTS-2346 + /x2f BRAILLE PATTERN DOTS-12346 + /x30 BRAILLE PATTERN DOTS-56 + /x31 BRAILLE PATTERN DOTS-156 + /x32 BRAILLE PATTERN DOTS-256 + /x33 BRAILLE PATTERN DOTS-1256 + /x34 BRAILLE PATTERN DOTS-356 + /x35 BRAILLE PATTERN DOTS-1356 + /x36 BRAILLE PATTERN DOTS-2356 + /x37 BRAILLE PATTERN DOTS-12356 + /x38 BRAILLE PATTERN DOTS-456 + /x39 BRAILLE PATTERN DOTS-1456 + /x3a BRAILLE PATTERN DOTS-2456 + /x3b BRAILLE PATTERN DOTS-12456 + /x3c BRAILLE PATTERN DOTS-3456 + /x3d BRAILLE PATTERN DOTS-13456 + /x3e BRAILLE PATTERN DOTS-23456 + /x3f BRAILLE PATTERN DOTS-123456 + /x40 BRAILLE PATTERN DOTS-7 + /x41 BRAILLE PATTERN DOTS-17 + /x42 BRAILLE PATTERN DOTS-27 + /x43 BRAILLE PATTERN DOTS-127 + /x44 BRAILLE PATTERN DOTS-37 + /x45 BRAILLE PATTERN DOTS-137 + /x46 BRAILLE PATTERN DOTS-237 + /x47 BRAILLE PATTERN DOTS-1237 + /x48 BRAILLE PATTERN DOTS-47 + /x49 BRAILLE PATTERN DOTS-147 + /x4a BRAILLE PATTERN DOTS-247 + /x4b BRAILLE PATTERN DOTS-1247 + /x4c BRAILLE PATTERN DOTS-347 + /x4d BRAILLE PATTERN DOTS-1347 + /x4e BRAILLE PATTERN DOTS-2347 + /x4f BRAILLE PATTERN DOTS-12347 + /x50 BRAILLE PATTERN DOTS-57 + /x51 BRAILLE PATTERN DOTS-157 + /x52 BRAILLE PATTERN DOTS-257 + /x53 BRAILLE PATTERN DOTS-1257 + /x54 BRAILLE PATTERN DOTS-357 + /x55 BRAILLE PATTERN DOTS-1357 + /x56 BRAILLE PATTERN DOTS-2357 + /x57 BRAILLE PATTERN DOTS-12357 + /x58 BRAILLE PATTERN DOTS-457 + /x59 BRAILLE PATTERN DOTS-1457 + /x5a BRAILLE PATTERN DOTS-2457 + /x5b BRAILLE PATTERN DOTS-12457 + /x5c BRAILLE PATTERN DOTS-3457 + /x5d BRAILLE PATTERN DOTS-13457 + /x5e BRAILLE PATTERN DOTS-23457 + /x5f BRAILLE PATTERN DOTS-123457 + /x60 BRAILLE PATTERN DOTS-67 + /x61 BRAILLE PATTERN DOTS-167 + /x62 BRAILLE PATTERN DOTS-267 + /x63 BRAILLE PATTERN DOTS-1267 + /x64 BRAILLE PATTERN DOTS-367 + /x65 BRAILLE PATTERN DOTS-1367 + /x66 BRAILLE PATTERN DOTS-2367 + /x67 BRAILLE PATTERN DOTS-12367 + /x68 BRAILLE PATTERN DOTS-467 + /x69 BRAILLE PATTERN DOTS-1467 + /x6a BRAILLE PATTERN DOTS-2467 + /x6b BRAILLE PATTERN DOTS-12467 + /x6c BRAILLE PATTERN DOTS-3467 + /x6d BRAILLE PATTERN DOTS-13467 + /x6e BRAILLE PATTERN DOTS-23467 + /x6f BRAILLE PATTERN DOTS-123467 + /x70 BRAILLE PATTERN DOTS-567 + /x71 BRAILLE PATTERN DOTS-1567 + /x72 BRAILLE PATTERN DOTS-2567 + /x73 BRAILLE PATTERN DOTS-12567 + /x74 BRAILLE PATTERN DOTS-3567 + /x75 BRAILLE PATTERN DOTS-13567 + /x76 BRAILLE PATTERN DOTS-23567 + /x77 BRAILLE PATTERN DOTS-123567 + /x78 BRAILLE PATTERN DOTS-4567 + /x79 BRAILLE PATTERN DOTS-14567 + /x7a BRAILLE PATTERN DOTS-24567 + /x7b BRAILLE PATTERN DOTS-124567 + /x7c BRAILLE PATTERN DOTS-34567 + /x7d BRAILLE PATTERN DOTS-134567 + /x7e BRAILLE PATTERN DOTS-234567 + /x7f BRAILLE PATTERN DOTS-1234567 + /x80 BRAILLE PATTERN DOTS-8 + /x81 BRAILLE PATTERN DOTS-18 + /x82 BRAILLE PATTERN DOTS-28 + /x83 BRAILLE PATTERN DOTS-128 + /x84 BRAILLE PATTERN DOTS-38 + /x85 BRAILLE PATTERN DOTS-138 + /x86 BRAILLE PATTERN DOTS-238 + /x87 BRAILLE PATTERN DOTS-1238 + /x88 BRAILLE PATTERN DOTS-48 + /x89 BRAILLE PATTERN DOTS-148 + /x8a BRAILLE PATTERN DOTS-248 + /x8b BRAILLE PATTERN DOTS-1248 + /x8c BRAILLE PATTERN DOTS-348 + /x8d BRAILLE PATTERN DOTS-1348 + /x8e BRAILLE PATTERN DOTS-2348 + /x8f BRAILLE PATTERN DOTS-12348 + /x90 BRAILLE PATTERN DOTS-58 + /x91 BRAILLE PATTERN DOTS-158 + /x92 BRAILLE PATTERN DOTS-258 + /x93 BRAILLE PATTERN DOTS-1258 + /x94 BRAILLE PATTERN DOTS-358 + /x95 BRAILLE PATTERN DOTS-1358 + /x96 BRAILLE PATTERN DOTS-2358 + /x97 BRAILLE PATTERN DOTS-12358 + /x98 BRAILLE PATTERN DOTS-458 + /x99 BRAILLE PATTERN DOTS-1458 + /x9a BRAILLE PATTERN DOTS-2458 + /x9b BRAILLE PATTERN DOTS-12458 + /x9c BRAILLE PATTERN DOTS-3458 + /x9d BRAILLE PATTERN DOTS-13458 + /x9e BRAILLE PATTERN DOTS-23458 + /x9f BRAILLE PATTERN DOTS-123458 + /xa0 BRAILLE PATTERN DOTS-68 + /xa1 BRAILLE PATTERN DOTS-168 + /xa2 BRAILLE PATTERN DOTS-268 + /xa3 BRAILLE PATTERN DOTS-1268 + /xa4 BRAILLE PATTERN DOTS-368 + /xa5 BRAILLE PATTERN DOTS-1368 + /xa6 BRAILLE PATTERN DOTS-2368 + /xa7 BRAILLE PATTERN DOTS-12368 + /xa8 BRAILLE PATTERN DOTS-468 + /xa9 BRAILLE PATTERN DOTS-1468 + /xaa BRAILLE PATTERN DOTS-2468 + /xab BRAILLE PATTERN DOTS-12468 + /xac BRAILLE PATTERN DOTS-3468 + /xad BRAILLE PATTERN DOTS-13468 + /xae BRAILLE PATTERN DOTS-23468 + /xaf BRAILLE PATTERN DOTS-123468 + /xb0 BRAILLE PATTERN DOTS-568 + /xb1 BRAILLE PATTERN DOTS-1568 + /xb2 BRAILLE PATTERN DOTS-2568 + /xb3 BRAILLE PATTERN DOTS-12568 + /xb4 BRAILLE PATTERN DOTS-3568 + /xb5 BRAILLE PATTERN DOTS-13568 + /xb6 BRAILLE PATTERN DOTS-23568 + /xb7 BRAILLE PATTERN DOTS-123568 + /xb8 BRAILLE PATTERN DOTS-4568 + /xb9 BRAILLE PATTERN DOTS-14568 + /xba BRAILLE PATTERN DOTS-24568 + /xbb BRAILLE PATTERN DOTS-124568 + /xbc BRAILLE PATTERN DOTS-34568 + /xbd BRAILLE PATTERN DOTS-134568 + /xbe BRAILLE PATTERN DOTS-234568 + /xbf BRAILLE PATTERN DOTS-1234568 + /xc0 BRAILLE PATTERN DOTS-78 + /xc1 BRAILLE PATTERN DOTS-178 + /xc2 BRAILLE PATTERN DOTS-278 + /xc3 BRAILLE PATTERN DOTS-1278 + /xc4 BRAILLE PATTERN DOTS-378 + /xc5 BRAILLE PATTERN DOTS-1378 + /xc6 BRAILLE PATTERN DOTS-2378 + /xc7 BRAILLE PATTERN DOTS-12378 + /xc8 BRAILLE PATTERN DOTS-478 + /xc9 BRAILLE PATTERN DOTS-1478 + /xca BRAILLE PATTERN DOTS-2478 + /xcb BRAILLE PATTERN DOTS-12478 + /xcc BRAILLE PATTERN DOTS-3478 + /xcd BRAILLE PATTERN DOTS-13478 + /xce BRAILLE PATTERN DOTS-23478 + /xcf BRAILLE PATTERN DOTS-123478 + /xd0 BRAILLE PATTERN DOTS-578 + /xd1 BRAILLE PATTERN DOTS-1578 + /xd2 BRAILLE PATTERN DOTS-2578 + /xd3 BRAILLE PATTERN DOTS-12578 + /xd4 BRAILLE PATTERN DOTS-3578 + /xd5 BRAILLE PATTERN DOTS-13578 + /xd6 BRAILLE PATTERN DOTS-23578 + /xd7 BRAILLE PATTERN DOTS-123578 + /xd8 BRAILLE PATTERN DOTS-4578 + /xd9 BRAILLE PATTERN DOTS-14578 + /xda BRAILLE PATTERN DOTS-24578 + /xdb BRAILLE PATTERN DOTS-124578 + /xdc BRAILLE PATTERN DOTS-34578 + /xdd BRAILLE PATTERN DOTS-134578 + /xde BRAILLE PATTERN DOTS-234578 + /xdf BRAILLE PATTERN DOTS-1234578 + /xe0 BRAILLE PATTERN DOTS-678 + /xe1 BRAILLE PATTERN DOTS-1678 + /xe2 BRAILLE PATTERN DOTS-2678 + /xe3 BRAILLE PATTERN DOTS-12678 + /xe4 BRAILLE PATTERN DOTS-3678 + /xe5 BRAILLE PATTERN DOTS-13678 + /xe6 BRAILLE PATTERN DOTS-23678 + /xe7 BRAILLE PATTERN DOTS-123678 + /xe8 BRAILLE PATTERN DOTS-4678 + /xe9 BRAILLE PATTERN DOTS-14678 + /xea BRAILLE PATTERN DOTS-24678 + /xeb BRAILLE PATTERN DOTS-124678 + /xec BRAILLE PATTERN DOTS-34678 + /xed BRAILLE PATTERN DOTS-134678 + /xee BRAILLE PATTERN DOTS-234678 + /xef BRAILLE PATTERN DOTS-1234678 + /xf0 BRAILLE PATTERN DOTS-5678 + /xf1 BRAILLE PATTERN DOTS-15678 + /xf2 BRAILLE PATTERN DOTS-25678 + /xf3 BRAILLE PATTERN DOTS-125678 + /xf4 BRAILLE PATTERN DOTS-35678 + /xf5 BRAILLE PATTERN DOTS-135678 + /xf6 BRAILLE PATTERN DOTS-235678 + /xf7 BRAILLE PATTERN DOTS-1235678 + /xf8 BRAILLE PATTERN DOTS-45678 + /xf9 BRAILLE PATTERN DOTS-145678 + /xfa BRAILLE PATTERN DOTS-245678 + /xfb BRAILLE PATTERN DOTS-1245678 + /xfc BRAILLE PATTERN DOTS-345678 + /xfd BRAILLE PATTERN DOTS-1345678 + /xfe BRAILLE PATTERN DOTS-2345678 + /xff BRAILLE PATTERN DOTS-12345678 +END CHARMAP + +WIDTH +... 1 +END WIDTH