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, 2009,
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.
88 #endif /* NOUNICODE */
90 #else /* Not NOCSETS - Rest of this file... */
92 #ifdef NOUNICODE /* Unicode */
96 #endif /* NOUNICODE */
101 #define CKOUNI /* Special Unicode features for K95 */
112 #ifndef NOLATIN2 /* If they didn't say "no Latin-2" */
113 #ifndef LATIN2 /* Then if LATIN2 isn't already */
114 #define LATIN2 /* defined, define it. */
116 #endif /* NOLATIN2 */
118 #ifdef NOCYRILLIC /* (spelling variant...) */
122 #endif /* NOCYRILLIC */
124 #ifndef NOCYRIL /* If they didn't say "no Cyrillic" */
125 #ifndef CYRILLIC /* Then if CYRILLIC isn't already */
126 #define CYRILLIC /* defined, define it. */
127 #endif /* CYRILLIC */
130 #ifndef NOHEBREW /* If they didn't say "no Hebrew" */
131 #ifndef HEBREW /* Then if HEBREW isn't already */
132 #define HEBREW /* defined, define it. */
134 #endif /* NOHEBREW */
136 #ifndef NOGREEK /* If not no Greek */
137 #ifndef GREEK /* then if GREEK isn't already */
138 #define GREEK /* defined, define it. */
142 #ifndef NOKANJI /* If not no Kanji */
143 #ifndef KANJI /* then if KANJI isn't already */
144 #define KANJI /* defined, define it. */
148 /* File ckcxla.h -- Character-set-related definitions, system independent */
150 /* Codes for Kermit Transfer Syntax Level (obsolete) */
152 #define TS_L0 0 /* Level 0 (Transparent) */
153 #define TS_L1 1 /* Level 1 (one standard character set) */
154 #define TS_L2 2 /* Level 2 (multiple character sets in same file) */
156 #define UNK 63 /* Symbol to use for unknown character (63 = ?) */
159 Codes for the base alphabet of a given character set.
160 These are assigned in roughly ISO 8859 order.
161 (Each is assumed to include ASCII/Roman.)
163 #define AL_UNIV 0 /* Universal (like ISO 10646) */
164 #define AL_ROMAN 1 /* Roman (Latin) alphabet */
165 #define AL_CYRIL 2 /* Cyrillic alphabet */
166 #define AL_ARABIC 3 /* Arabic */
167 #define AL_GREEK 4 /* Greek */
168 #define AL_HEBREW 5 /* Hebrew */
169 #define AL_KANA 6 /* Japanese Katakana */
170 #define AL_JAPAN 7 /* Japanese Katakana+Kanji ideograms */
171 #define AL_HAN 8 /* Chinese/Japanese/Korean ideograms */
172 #define AL_INDIA 9 /* Indian scripts (ISCII) */
173 #define AL_VIET 10 /* Vietnamese (VISCII) */
174 /* Add more here... */
175 #define AL_UNK 999 /* Unknown (transparent) */
177 /* Codes for languages */
179 NOTE: It would perhaps be better to use ISO 639-1988 2-letter "Codes for
180 Representation of Names of Languages" here, shown in the comments below.
182 #define L_ASCII 0 /* EN ASCII, English */
183 #define L_USASCII 0 /* EN ASCII, English */
184 #define L_DUTCH 1 /* NL Dutch */
185 #define L_FINNISH 2 /* FI Finnish */
186 #define L_FRENCH 3 /* FR French */
187 #define L_GERMAN 4 /* DE German */
188 #define L_HUNGARIAN 5 /* HU Hungarian */
189 #define L_ITALIAN 6 /* IT Italian */
190 #define L_NORWEGIAN 7 /* NO Norwegian */
191 #define L_PORTUGUESE 8 /* PT Portuguese */
192 #define L_SPANISH 9 /* ES Spanish */
193 #define L_SWEDISH 10 /* SV Swedish */
194 #define L_SWISS 11 /* RM Swiss (Rhaeto-Romance) */
195 #define L_DANISH 12 /* DA Danish */
196 #define L_ICELANDIC 13 /* IS Icelandic */
197 #define L_RUSSIAN 14 /* RU Russian */
198 #define L_JAPANESE 15 /* JA Japanese */
199 #define L_HEBREW 16 /* IW Hebrew */
200 #define L_GREEK 17 /* Greek */
202 #define MAXLANG 17 /* Number of languages */
205 File character-sets are defined in the system-specific ck?xla.h file,
206 except for the following ones, which must be available to all versions:
208 #define FC_TRANSP 254 /* Transparent */
209 #define FC_UNDEF 255 /* Undefined */
211 Designators for Kermit's transfer character sets. These are all standard
212 sets, or based on them. Symbols must be unique in the first 8 characters,
213 because some C preprocessors have this limit.
216 #define TC_TRANSP 0 /* Transparent, no character translation */
217 #define TC_USASCII 1 /* ISO 646 IRV / US 7-bit ASCII */
218 #define TC_1LATIN 2 /* ISO 8859-1, Latin Alphabet 1 */
219 #define TC_2LATIN 3 /* ISO 8859-2, Latin Alphabet 2 */
220 #define TC_CYRILL 4 /* ISO 8859-5, Latin/Cyrillic */
221 #define TC_JEUC 5 /* Japanese EUC = JIS 0201+0202+0208 */
222 #define TC_HEBREW 6 /* ISO 8859-8, Latin/Hebrew */
223 #define TC_GREEK 7 /* ISO 8859-7, Latin/Greek */
224 #define TC_9LATIN 8 /* ISO 8859-15 Latin Alphabet 9 (with Euro) */
225 #define TC_UCS2 9 /* ISO 10646 / Unicode UCS-2 */
226 #define TC_UTF8 10 /* ISO 10646 / Unicode UTF-8 */
228 #define MAXTCSETS 10 /* Highest Transfer Character Set Number */
232 Not used and probably won't be due to ISO-10646 / Unicode.
234 #define TC_3LATIN 11 /* ISO 8859-3, Latin-3 */
235 #define TC_4LATIN 12 /* ISO 8859-4, Latin-4 */
236 #define TC_5LATIN 13 /* ISO 8859-9, Latin-5 */
237 #define TC_ARABIC 14 /* ISO-8859-6, Latin/Arabic */
238 #define TC_JIS208 15 /* Japanese JIS X 0208 multibyte set */
239 #define TC_CHINES 16 /* Chinese Standard GB 2312-80 */
240 #define TC_KOREAN 17 /* Korean KS C 5601-1987 */
241 #define TC_ISCII 18 /* Indian standard code for ii... */
242 #define TC_VSCII 19 /* Vietnam standard code for ii... */
246 /* Structure for character-set information */
249 char *name; /* Descriptive name of character set */
250 int size; /* Size (e.g. 128, 256, 16384) */
251 int code; /* Like TC_1LATIN, etc. */
252 char *designator; /* Designator, like I2/100 = Latin-1 */
253 int alphabet; /* Base alphabet */
254 char *keyword; /* Keyword for this character-set */
257 /* Structure for language information */
260 int id; /* Language ID code (L_whatever) */
261 int fc; /* File character set to use */
262 int tc; /* Transfer character set to use */
263 char *description; /* Description of language */
266 /* Now take in the system-specific definitions */
272 #ifdef OSK /* OS-9 */
276 #ifdef VMS /* VAX/VMS */
280 #ifdef GEMDOS /* Atari ST */
284 #ifdef MAC /* Macintosh */
288 #ifdef OS2 /* OS/2 */
289 #include "ckuxla.h" /* Uses big UNIX version */
292 #ifdef AMIGA /* Commodore Amiga */
296 #ifdef datageneral /* Data General MV AOS/VS */
298 #endif /* datageneral */
300 #ifdef STRATUS /* Stratus Computer, Inc. VOS */
305 #include "ckcuni.h" /* Unicode */
309 #define UNKSJIS 0x817f
310 _PROTOTYP(USHORT eu_to_sj, (USHORT) ); /* EUC-JP to Shift-JIS */
311 _PROTOTYP(USHORT sj_to_eu, (USHORT) ); /* Shift-JIS to EUC-JP */
312 _PROTOTYP( int xkanjf, (void) );
313 _PROTOTYP( int xkanji, (int, int (*)(char)) );
314 _PROTOTYP( int xkanjz, (int (*)(char) ) );
315 _PROTOTYP( int zkanjf, (void) );
316 _PROTOTYP( int zkanji, (int (*)(void)) ); /* Kanji function prototypes */
317 _PROTOTYP( int zkanjz, (void) );
318 _PROTOTYP(VOID j7init, ( void ) ); /* Initialize JIS-7 parser */
319 _PROTOTYP(int getj7, ( void ) ); /* Get next JIS-7 character */
324 _PROTOTYP( int cs_size, (int) );
325 _PROTOTYP( int cs_is_std, (int) );
326 _PROTOTYP( int cs_is_nrc, (int) );
327 _PROTOTYP( VOID setremcharset, (int, int) );
328 _PROTOTYP( VOID setlclcharset, (int) );
332 _PROTOTYP(VOID setxlatype, (int, int));
335 #endif /* CKCXLA_H */
337 /* End of ckcxla.h */