OSDN Git Service

2004-06-25 Andrew Cagney <cagney@gnu.org>
[pf3gnuchains/pf3gnuchains3x.git] / newlib / libc / iconv / lib / biccs.c
1 /*
2  * Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
3  * Rights transferred to Franklin Electronic Publishers.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  */
26 #include "deps.h"
27 #include "local.h"
28
29 #ifdef _ICONV_CONVERTER_BIG5
30 extern _CONST unsigned char _iconv_ccs_table_big5[];
31 #endif
32 #ifdef _ICONV_CONVERTER_CNS11643_PLANE1
33 extern _CONST unsigned char _iconv_ccs_table_cns11643_plane1[];
34 #endif
35 #ifdef _ICONV_CONVERTER_CNS11643_PLANE2
36 extern _CONST unsigned char _iconv_ccs_table_cns11643_plane2[];
37 #endif
38 #ifdef _ICONV_CONVERTER_CNS11643_PLANE14
39 extern _CONST unsigned char _iconv_ccs_table_cns11643_plane14[];
40 #endif
41 #ifdef _ICONV_CONVERTER_CP775
42 extern _CONST unsigned char _iconv_ccs_table_cp775[];
43 #endif
44 #ifdef _ICONV_CONVERTER_CP850
45 extern _CONST unsigned char _iconv_ccs_table_cp850[];
46 #endif
47 #ifdef _ICONV_CONVERTER_CP852
48 extern _CONST unsigned char _iconv_ccs_table_cp852[];
49 #endif
50 #ifdef _ICONV_CONVERTER_CP855
51 extern _CONST unsigned char _iconv_ccs_table_cp855[];
52 #endif
53 #ifdef _ICONV_CONVERTER_CP866
54 extern _CONST unsigned char _iconv_ccs_table_cp866[];
55 #endif
56 #ifdef _ICONV_CONVERTER_GB_2312_80
57 extern _CONST unsigned char _iconv_ccs_table_gb_2312_80[];
58 #endif
59 #ifdef _ICONV_CONVERTER_ISO_8859_1
60 extern _CONST unsigned char _iconv_ccs_table_iso_8859_1[];
61 #endif
62 #ifdef _ICONV_CONVERTER_ISO_8859_15
63 extern _CONST unsigned char _iconv_ccs_table_iso_8859_15[];
64 #endif
65 #ifdef _ICONV_CONVERTER_ISO_8859_2
66 extern _CONST unsigned char _iconv_ccs_table_iso_8859_2[];
67 #endif
68 #ifdef _ICONV_CONVERTER_ISO_8859_4
69 extern _CONST unsigned char _iconv_ccs_table_iso_8859_4[];
70 #endif
71 #ifdef _ICONV_CONVERTER_ISO_8859_5
72 extern _CONST unsigned char _iconv_ccs_table_iso_8859_5[];
73 #endif
74 #ifdef _ICONV_CONVERTER_JIS_X0201
75 extern _CONST unsigned char _iconv_ccs_table_jis_x0201[];
76 #endif
77 #ifdef _ICONV_CONVERTER_JIS_X0208_1983
78 extern _CONST unsigned char _iconv_ccs_table_jis_x0208_1983[];
79 #endif
80 #ifdef _ICONV_CONVERTER_JIS_X0212_1990
81 extern _CONST unsigned char _iconv_ccs_table_jis_x0212_1990[];
82 #endif
83 #ifdef _ICONV_CONVERTER_KOI8_R
84 extern _CONST unsigned char _iconv_ccs_table_koi8_r[];
85 #endif
86 #ifdef _ICONV_CONVERTER_KOI8_U
87 extern _CONST unsigned char _iconv_ccs_table_koi8_u[];
88 #endif
89 #ifdef _ICONV_CONVERTER_KSX1001
90 extern _CONST unsigned char _iconv_ccs_table_ksx1001[];
91 #endif
92 #ifdef _ICONV_CONVERTER_SHIFT_JIS
93 extern _CONST unsigned char _iconv_ccs_table_shift_jis[];
94 #endif
95 #ifdef _ICONV_CONVERTER_US_ASCII
96 extern _CONST unsigned char _iconv_ccs_table_us_ascii[];
97 #endif
98
99 _CONST iconv_builtin_table_t _iconv_builtin_ccs[] =
100 {
101 #ifdef _ICONV_CONVERTER_BIG5
102   {"big5", (_CONST _VOID_PTR)&_iconv_ccs_table_big5},
103 #endif
104 #ifdef _ICONV_CONVERTER_CNS11643_PLANE1
105   {"cns11643_plane1", (_CONST _VOID_PTR)&_iconv_ccs_table_cns11643_plane1},
106 #endif
107 #ifdef _ICONV_CONVERTER_CNS11643_PLANE2
108   {"cns11643_plane2", (_CONST _VOID_PTR)&_iconv_ccs_table_cns11643_plane2},
109 #endif
110 #ifdef _ICONV_CONVERTER_CNS11643_PLANE14
111   {"cns11643_plane14", (_CONST _VOID_PTR)&_iconv_ccs_table_cns11643_plane14},
112 #endif
113 #ifdef _ICONV_CONVERTER_CP775
114   {"cp775", (_CONST _VOID_PTR)&_iconv_ccs_table_cp775},
115 #endif
116 #ifdef _ICONV_CONVERTER_CP850
117   {"cp850", (_CONST _VOID_PTR)&_iconv_ccs_table_cp850},
118 #endif
119 #ifdef _ICONV_CONVERTER_CP852
120   {"cp852", (_CONST _VOID_PTR)&_iconv_ccs_table_cp852},
121 #endif
122 #ifdef _ICONV_CONVERTER_CP855
123   {"cp855", (_CONST _VOID_PTR)&_iconv_ccs_table_cp855},
124 #endif
125 #ifdef _ICONV_CONVERTER_CP866
126   {"cp866", (_CONST _VOID_PTR)&_iconv_ccs_table_cp866},
127 #endif
128 #ifdef _ICONV_CONVERTER_GB_2312_80
129   {"gb_2312_80", (_CONST _VOID_PTR)&_iconv_ccs_table_gb_2312_80},
130 #endif
131 #ifdef _ICONV_CONVERTER_ISO_8859_1
132   {"iso_8859_1", (_CONST _VOID_PTR)&_iconv_ccs_table_iso_8859_1},
133 #endif
134 #ifdef _ICONV_CONVERTER_ISO_8859_15
135   {"iso_8859_15", (_CONST _VOID_PTR)&_iconv_ccs_table_iso_8859_15},
136 #endif
137 #ifdef _ICONV_CONVERTER_ISO_8859_2
138   {"iso_8859_2", (_CONST _VOID_PTR)&_iconv_ccs_table_iso_8859_2},
139 #endif
140 #ifdef _ICONV_CONVERTER_ISO_8859_4
141   {"iso_8859_4", (_CONST _VOID_PTR)&_iconv_ccs_table_iso_8859_4},
142 #endif
143 #ifdef _ICONV_CONVERTER_ISO_8859_5
144   {"iso_8859_5", (_CONST _VOID_PTR)&_iconv_ccs_table_iso_8859_5},
145 #endif
146 #ifdef _ICONV_CONVERTER_JIS_X0201
147   {"jis_x0201", (_CONST _VOID_PTR)&_iconv_ccs_table_jis_x0201},
148 #endif
149 #ifdef _ICONV_CONVERTER_JIS_X0208_1983
150   {"jis_x0208_1983", (_CONST _VOID_PTR)&_iconv_ccs_table_jis_x0208_1983},
151 #endif
152 #ifdef _ICONV_CONVERTER_JIS_X0212_1990
153   {"jis_x0212_1990", (_CONST _VOID_PTR)&_iconv_ccs_table_jis_x0212_1990},
154 #endif
155 #ifdef _ICONV_CONVERTER_KOI8_R
156   {"koi8_r", (_CONST _VOID_PTR)&_iconv_ccs_table_koi8_r},
157 #endif
158 #ifdef _ICONV_CONVERTER_KOI8_U
159   {"koi8_u", (_CONST _VOID_PTR)&_iconv_ccs_table_koi8_u},
160 #endif
161 #ifdef _ICONV_CONVERTER_KSX1001
162   {"ksx1001", (_CONST _VOID_PTR)&_iconv_ccs_table_ksx1001},
163 #endif
164 #ifdef _ICONV_CONVERTER_SHIFT_JIS
165   {"shift_jis", (_CONST _VOID_PTR)&_iconv_ccs_table_shift_jis},
166 #endif
167 #ifdef _ICONV_CONVERTER_US_ASCII
168   {"us_ascii", (_CONST _VOID_PTR)&_iconv_ccs_table_us_ascii},
169 #endif
170   {NULL, (_CONST _VOID_PTR)NULL}
171 };
172