xref: /haiku/src/system/libroot/posix/glibc/iconv/gconv_builtin.h (revision 5af32e752606778be5dd7379f319fe43cb3f6b8c)
1*5af32e75SAxel Dörfler /* Builtin transformations.
2*5af32e75SAxel Dörfler    Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc.
3*5af32e75SAxel Dörfler    This file is part of the GNU C Library.
4*5af32e75SAxel Dörfler    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
5*5af32e75SAxel Dörfler 
6*5af32e75SAxel Dörfler    The GNU C Library is free software; you can redistribute it and/or
7*5af32e75SAxel Dörfler    modify it under the terms of the GNU Lesser General Public
8*5af32e75SAxel Dörfler    License as published by the Free Software Foundation; either
9*5af32e75SAxel Dörfler    version 2.1 of the License, or (at your option) any later version.
10*5af32e75SAxel Dörfler 
11*5af32e75SAxel Dörfler    The GNU C Library is distributed in the hope that it will be useful,
12*5af32e75SAxel Dörfler    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*5af32e75SAxel Dörfler    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*5af32e75SAxel Dörfler    Lesser General Public License for more details.
15*5af32e75SAxel Dörfler 
16*5af32e75SAxel Dörfler    You should have received a copy of the GNU Lesser General Public
17*5af32e75SAxel Dörfler    License along with the GNU C Library; if not, write to the Free
18*5af32e75SAxel Dörfler    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19*5af32e75SAxel Dörfler    02111-1307 USA.  */
20*5af32e75SAxel Dörfler 
21*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS4//", "ISO-10646/UCS4/")
22*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS-4//", "ISO-10646/UCS4/")
23*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS-4BE//", "ISO-10646/UCS4/")
24*5af32e75SAxel Dörfler BUILTIN_ALIAS ("CSUCS4//", "ISO-10646/UCS4/")
25*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ISO-10646//", "ISO-10646/UCS4/")
26*5af32e75SAxel Dörfler BUILTIN_ALIAS ("10646-1:1993//", "ISO-10646/UCS4/")
27*5af32e75SAxel Dörfler BUILTIN_ALIAS ("10646-1:1993/UCS4/", "ISO-10646/UCS4/")
28*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF00010104//", "ISO-10646/UCS4/") /* level 1 */
29*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF00010105//", "ISO-10646/UCS4/") /* level 2 */
30*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF00010106//", "ISO-10646/UCS4/") /* level 3 */
31*5af32e75SAxel Dörfler 
32*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("INTERNAL", "ISO-10646/UCS4/", 1, "=INTERNAL->ucs4",
33*5af32e75SAxel Dörfler 			__gconv_transform_internal_ucs4, NULL, 4, 4, 4, 4)
34*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("ISO-10646/UCS4/", "INTERNAL", 1, "=ucs4->INTERNAL",
35*5af32e75SAxel Dörfler 			__gconv_transform_ucs4_internal, NULL, 4, 4, 4, 4)
36*5af32e75SAxel Dörfler 
37*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("INTERNAL", "UCS-4LE//", 1, "=INTERNAL->ucs4le",
38*5af32e75SAxel Dörfler 			__gconv_transform_internal_ucs4le, NULL, 4, 4, 4, 4)
39*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("UCS-4LE//", "INTERNAL", 1, "=ucs4le->INTERNAL",
40*5af32e75SAxel Dörfler 			__gconv_transform_ucs4le_internal, NULL, 4, 4, 4, 4)
41*5af32e75SAxel Dörfler 
42*5af32e75SAxel Dörfler BUILTIN_ALIAS ("WCHAR_T//", "INTERNAL")
43*5af32e75SAxel Dörfler 
44*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UTF8//", "ISO-10646/UTF8/")
45*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UTF-8//", "ISO-10646/UTF8/")
46*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ISO-IR-193//", "ISO-10646/UTF8/")
47*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF05010001//", "ISO-10646/UTF8/")
48*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ISO-10646/UTF-8/", "ISO-10646/UTF8/")
49*5af32e75SAxel Dörfler 
50*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("INTERNAL", "ISO-10646/UTF8/", 1, "=INTERNAL->utf8",
51*5af32e75SAxel Dörfler 			__gconv_transform_internal_utf8, NULL, 4, 4, 1, 6)
52*5af32e75SAxel Dörfler 
53*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("ISO-10646/UTF8/", "INTERNAL", 1, "=utf8->INTERNAL",
54*5af32e75SAxel Dörfler 			__gconv_transform_utf8_internal, __gconv_btwoc_ascii,
55*5af32e75SAxel Dörfler 			1, 6, 4, 4)
56*5af32e75SAxel Dörfler 
57*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS2//", "ISO-10646/UCS2/")
58*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS-2//", "ISO-10646/UCS2/")
59*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF00010100//", "ISO-10646/UCS2/") /* level 1 */
60*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF00010101//", "ISO-10646/UCS2/") /* level 2 */
61*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF00010102//", "ISO-10646/UCS2/") /* level 3 */
62*5af32e75SAxel Dörfler 
63*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("ISO-10646/UCS2/", "INTERNAL", 1, "=ucs2->INTERNAL",
64*5af32e75SAxel Dörfler 			__gconv_transform_ucs2_internal, NULL, 2, 2, 4, 4)
65*5af32e75SAxel Dörfler 
66*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("INTERNAL", "ISO-10646/UCS2/", 1, "=INTERNAL->ucs2",
67*5af32e75SAxel Dörfler 			__gconv_transform_internal_ucs2, NULL, 4, 4, 2, 2)
68*5af32e75SAxel Dörfler 
69*5af32e75SAxel Dörfler 
70*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ANSI_X3.4//", "ANSI_X3.4-1968//")
71*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ISO-IR-6//", "ANSI_X3.4-1968//")
72*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ANSI_X3.4-1986//", "ANSI_X3.4-1968//")
73*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ISO_646.IRV:1991//", "ANSI_X3.4-1968//")
74*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ASCII//", "ANSI_X3.4-1968//")
75*5af32e75SAxel Dörfler BUILTIN_ALIAS ("ISO646-US//", "ANSI_X3.4-1968//")
76*5af32e75SAxel Dörfler BUILTIN_ALIAS ("US-ASCII//", "ANSI_X3.4-1968//")
77*5af32e75SAxel Dörfler BUILTIN_ALIAS ("US//", "ANSI_X3.4-1968//")
78*5af32e75SAxel Dörfler BUILTIN_ALIAS ("IBM367//", "ANSI_X3.4-1968//")
79*5af32e75SAxel Dörfler BUILTIN_ALIAS ("CP367//", "ANSI_X3.4-1968//")
80*5af32e75SAxel Dörfler BUILTIN_ALIAS ("CSASCII//", "ANSI_X3.4-1968//")
81*5af32e75SAxel Dörfler BUILTIN_ALIAS ("OSF00010020//", "ANSI_X3.4-1968//")
82*5af32e75SAxel Dörfler 
83*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "INTERNAL", 1, "=ascii->INTERNAL",
84*5af32e75SAxel Dörfler 			__gconv_transform_ascii_internal, __gconv_btwoc_ascii,
85*5af32e75SAxel Dörfler 			4, 4, 1, 1)
86*5af32e75SAxel Dörfler 
87*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("INTERNAL", "ANSI_X3.4-1968//", 1, "=INTERNAL->ascii",
88*5af32e75SAxel Dörfler 			__gconv_transform_internal_ascii, NULL, 4, 4, 1, 1)
89*5af32e75SAxel Dörfler 
90*5af32e75SAxel Dörfler 
91*5af32e75SAxel Dörfler #if BYTE_ORDER == BIG_ENDIAN
92*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UNICODEBIG//", "ISO-10646/UCS2/")
93*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS-2BE//", "ISO-10646/UCS2/")
94*5af32e75SAxel Dörfler 
95*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS-2LE//", "UNICODELITTLE//")
96*5af32e75SAxel Dörfler 
97*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("UNICODELITTLE//", "INTERNAL", 1,
98*5af32e75SAxel Dörfler 			"=ucs2reverse->INTERNAL",
99*5af32e75SAxel Dörfler 			__gconv_transform_ucs2reverse_internal, NULL,
100*5af32e75SAxel Dörfler 			2, 2, 4, 4)
101*5af32e75SAxel Dörfler 
102*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("INTERNAL", "UNICODELITTLE//", 1,
103*5af32e75SAxel Dörfler 			"=INTERNAL->ucs2reverse",
104*5af32e75SAxel Dörfler 			__gconv_transform_internal_ucs2reverse, NULL,
105*5af32e75SAxel Dörfler 			4, 4, 2, 2)
106*5af32e75SAxel Dörfler #else
107*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UNICODELITTLE//", "ISO-10646/UCS2/")
108*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS-2LE//", "ISO-10646/UCS2/")
109*5af32e75SAxel Dörfler 
110*5af32e75SAxel Dörfler BUILTIN_ALIAS ("UCS-2BE//", "UNICODEBIG//")
111*5af32e75SAxel Dörfler 
112*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("UNICODEBIG//", "INTERNAL", 1,
113*5af32e75SAxel Dörfler 			"=ucs2reverse->INTERNAL",
114*5af32e75SAxel Dörfler 			__gconv_transform_ucs2reverse_internal, NULL,
115*5af32e75SAxel Dörfler 			2, 2, 4, 4)
116*5af32e75SAxel Dörfler 
117*5af32e75SAxel Dörfler BUILTIN_TRANSFORMATION ("INTERNAL", "UNICODEBIG//", 1,
118*5af32e75SAxel Dörfler 			"=INTERNAL->ucs2reverse",
119*5af32e75SAxel Dörfler 			__gconv_transform_internal_ucs2reverse, NULL,
120*5af32e75SAxel Dörfler 			4, 4, 2, 2)
121*5af32e75SAxel Dörfler #endif
122