4 System-independent character-set translation header file for C-Kermit.
8 Author: Frank da Cruz <fdc@columbia.edu>,
9 The Kermit Project - Columbia University, New York City.
11 Copyright (C) 1985, 2004,
12 Trustees of Columbia University in the City of New York.
13 All rights reserved. See the C-Kermit COPYING.TXT file or the
14 copyright text in the ckcmai.c module for disclaimer and permissions.
18 ISO 204 is Latin-1 + Euro.
19 ISO 205 is Latin-4 + Euro.
20 ISO 206 is Latin-7 + Euro.
22 #ifndef CKCXLA_H /* Guard against multiple inclusion */
25 #ifndef KANJI /* Systems supporting Kanji */
31 #ifdef NOKANJI /* Except if NOKANJI is defined. */
38 #ifndef UNICODE /* Unicode support */
39 #ifdef OS2ORUNIX /* Only for K95, UNIX, VMS,... */
45 #endif /* OS2ORUNIX */
47 #endif /* NOUNICODE */
49 #define XLA_NONE 0 /* Translation types - none */
50 #define XLA_BYTE 1 /* Byte-for-byte */
51 #define XLA_JAPAN 2 /* Japanese */
52 #define XLA_UNICODE 3 /* Unicode */
54 #ifndef UNIORKANJI /* Unicode OR Kanji */
55 #ifdef UNICODE /* i.e. some support for */
56 #define UNIORKANJI /* multibyte character sets */
61 #endif /* UNIORKANJI */
63 Disable all support for all classes of character sets
64 if NOCSETS is defined.
87 #else /* Not NOCSETS - Rest of this file... */
89 #ifdef NOUNICODE /* Unicode */
93 #endif /* NOUNICODE */
98 #define CKOUNI /* Special Unicode features for K95 */
109 #ifndef NOLATIN2 /* If they didn't say "no Latin-2" */
110 #ifndef LATIN2 /* Then if LATIN2 isn't already */
111 #define LATIN2 /* defined, define it. */
113 #endif /* NOLATIN2 */
115 #ifdef NOCYRILLIC /* (spelling variant...) */
119 #endif /* NOCYRILLIC */
121 #ifndef NOCYRIL /* If they didn't say "no Cyrillic" */
122 #ifndef CYRILLIC /* Then if CYRILLIC isn't already */
123 #define CYRILLIC /* defined, define it. */
124 #endif /* CYRILLIC */
127 #ifndef NOHEBREW /* If they didn't say "no Hebrew" */
128 #ifndef HEBREW /* Then if HEBREW isn't already */
129 #define HEBREW /* defined, define it. */
131 #endif /* NOHEBREW */
133 #ifndef NOGREEK /* If not no Greek */
134 #ifndef GREEK /* then if GREEK isn't already */
135 #define GREEK /* defined, define it. */
139 #ifndef NOKANJI /* If not no Kanji */
140 #ifndef KANJI /* then if KANJI isn't already */
141 #define KANJI /* defined, define it. */
145 /* File ckcxla.h -- Character-set-related definitions, system independent */
147 /* Codes for Kermit Transfer Syntax Level (obsolete) */
149 #define TS_L0 0 /* Level 0 (Transparent) */
150 #define TS_L1 1 /* Level 1 (one standard character set) */
151 #define TS_L2 2 /* Level 2 (multiple character sets in same file) */
153 #define UNK 63 /* Symbol to use for unknown character (63 = ?) */
156 Codes for the base alphabet of a given character set.
157 These are assigned in roughly ISO 8859 order.
158 (Each is assumed to include ASCII/Roman.)
160 #define AL_UNIV 0 /* Universal (like ISO 10646) */
161 #define AL_ROMAN 1 /* Roman (Latin) alphabet */
162 #define AL_CYRIL 2 /* Cyrillic alphabet */
163 #define AL_ARABIC 3 /* Arabic */
164 #define AL_GREEK 4 /* Greek */
165 #define AL_HEBREW 5 /* Hebrew */
166 #define AL_KANA 6 /* Japanese Katakana */
167 #define AL_JAPAN 7 /* Japanese Katakana+Kanji ideograms */
168 #define AL_HAN 8 /* Chinese/Japanese/Korean ideograms */
169 #define AL_INDIA 9 /* Indian scripts (ISCII) */
170 #define AL_VIET 10 /* Vietnamese (VISCII) */
171 /* Add more here... */
172 #define AL_UNK 999 /* Unknown (transparent) */
174 /* Codes for languages */
176 NOTE: It would perhaps be better to use ISO 639-1988 2-letter "Codes for
177 Representation of Names of Languages" here, shown in the comments below.
179 #define L_ASCII 0 /* EN ASCII, English */
180 #define L_USASCII 0 /* EN ASCII, English */
181 #define L_DUTCH 1 /* NL Dutch */
182 #define L_FINNISH 2 /* FI Finnish */
183 #define L_FRENCH 3 /* FR French */
184 #define L_GERMAN 4 /* DE German */
185 #define L_HUNGARIAN 5 /* HU Hungarian */
186 #define L_ITALIAN 6 /* IT Italian */
187 #define L_NORWEGIAN 7 /* NO Norwegian */
188 #define L_PORTUGUESE 8 /* PT Portuguese */
189 #define L_SPANISH 9 /* ES Spanish */
190 #define L_SWEDISH 10 /* SV Swedish */
191 #define L_SWISS 11 /* RM Swiss (Rhaeto-Romance) */
192 #define L_DANISH 12 /* DA Danish */
193 #define L_ICELANDIC 13 /* IS Icelandic */
194 #define L_RUSSIAN 14 /* RU Russian */
195 #define L_JAPANESE 15 /* JA Japanese */
196 #define L_HEBREW 16 /* IW Hebrew */
197 #define L_GREEK 17 /* Greek */
199 #define MAXLANG 17 /* Number of languages */
202 File character-sets are defined in the system-specific ck?xla.h file,
203 except for the following ones, which must be available to all versions:
205 #define FC_TRANSP 254 /* Transparent */
206 #define FC_UNDEF 255 /* Undefined */
208 Designators for Kermit's transfer character sets. These are all standard
209 sets, or based on them. Symbols must be unique in the first 8 characters,
210 because some C preprocessors have this limit.
213 #define TC_TRANSP 0 /* Transparent, no character translation */
214 #define TC_USASCII 1 /* ISO 646 IRV / US 7-bit ASCII */
215 #define TC_1LATIN 2 /* ISO 8859-1, Latin Alphabet 1 */
216 #define TC_2LATIN 3 /* ISO 8859-2, Latin Alphabet 2 */
217 #define TC_CYRILL 4 /* ISO 8859-5, Latin/Cyrillic */
218 #define TC_JEUC 5 /* Japanese EUC = JIS 0201+0202+0208 */
219 #define TC_HEBREW 6 /* ISO 8859-8, Latin/Hebrew */
220 #define TC_GREEK 7 /* ISO 8859-7, Latin/Greek */
221 #define TC_9LATIN 8 /* ISO 8859-15 Latin Alphabet 9 (with Euro) */
222 #define TC_UCS2 9 /* ISO 10646 / Unicode UCS-2 */
223 #define TC_UTF8 10 /* ISO 10646 / Unicode UTF-8 */
225 #define MAXTCSETS 10 /* Highest Transfer Character Set Number */
229 Not used and probably won't be due to ISO-10646 / Unicode.
231 #define TC_3LATIN 11 /* ISO 8859-3, Latin-3 */
232 #define TC_4LATIN 12 /* ISO 8859-4, Latin-4 */
233 #define TC_5LATIN 13 /* ISO 8859-9, Latin-5 */
234 #define TC_ARABIC 14 /* ISO-8859-6, Latin/Arabic */
235 #define TC_JIS208 15 /* Japanese JIS X 0208 multibyte set */
236 #define TC_CHINES 16 /* Chinese Standard GB 2312-80 */
237 #define TC_KOREAN 17 /* Korean KS C 5601-1987 */
238 #define TC_ISCII 18 /* Indian standard code for ii... */
239 #define TC_VSCII 19 /* Vietnam standard code for ii... */
243 /* Structure for character-set information */
246 char *name; /* Descriptive name of character set */
247 int size; /* Size (e.g. 128, 256, 16384) */
248 int code; /* Like TC_1LATIN, etc. */
249 char *designator; /* Designator, like I2/100 = Latin-1 */
250 int alphabet; /* Base alphabet */
251 char *keyword; /* Keyword for this character-set */
254 /* Structure for language information */
257 int id; /* Language ID code (L_whatever) */
258 int fc; /* File character set to use */
259 int tc; /* Transfer character set to use */
260 char *description; /* Description of language */
263 /* Now take in the system-specific definitions */
269 #ifdef OSK /* OS-9 */
273 #ifdef VMS /* VAX/VMS */
277 #ifdef GEMDOS /* Atari ST */
281 #ifdef MAC /* Macintosh */
285 #ifdef OS2 /* OS/2 */
286 #include "ckuxla.h" /* Uses big UNIX version */
289 #ifdef AMIGA /* Commodore Amiga */
293 #ifdef datageneral /* Data General MV AOS/VS */
295 #endif /* datageneral */
297 #ifdef STRATUS /* Stratus Computer, Inc. VOS */
302 #include "ckcuni.h" /* Unicode */
306 #define UNKSJIS 0x817f
307 _PROTOTYP(USHORT eu_to_sj, (USHORT) ); /* EUC-JP to Shift-JIS */
308 _PROTOTYP(USHORT sj_to_eu, (USHORT) ); /* Shift-JIS to EUC-JP */
309 _PROTOTYP( int xkanjf, (void) );
310 _PROTOTYP( int xkanji, (int, int (*)(char)) );
311 _PROTOTYP( int xkanjz, (int (*)(char) ) );
312 _PROTOTYP( int zkanjf, (void) );
313 _PROTOTYP( int zkanji, (int (*)(void)) ); /* Kanji function prototypes */
314 _PROTOTYP( int zkanjz, (void) );
315 _PROTOTYP(VOID j7init, ( void ) ); /* Initialize JIS-7 parser */
316 _PROTOTYP(int getj7, ( void ) ); /* Get next JIS-7 character */
321 _PROTOTYP( int cs_size, (int) );
322 _PROTOTYP( int cs_is_std, (int) );
323 _PROTOTYP( int cs_is_nrc, (int) );
324 _PROTOTYP( VOID setremcharset, (int, int) );
325 _PROTOTYP( VOID setlclcharset, (int) );
329 _PROTOTYP(VOID setxlatype, (int, int));
332 #endif /* CKCXLA_H */
334 /* End of ckcxla.h */