|
|
1.1 root 1: #ifndef CKCXLA_H
2: #define CKCXLA_H
3:
4: #ifdef NOCSETS
5: #ifdef KANJI
6: #undef KANJI
7: #endif /* KANJI */
8: #ifdef CYRILLIC
9: #undef CYRILLIC
10: #endif /* CYRILLIC */
11:
12: #else /* Rest of this file... */
13:
14: #ifndef NOCYRIL
15: #define CYRILLIC
16: #endif /* NOCYRIL */
17:
18: /* File ckcxla.h -- Character-set-related definitions, system independent */
19:
20: /* Codes for Kermit Transfer Syntax Level (obsolete) */
21:
22: #define TS_L0 0 /* Level 0 (Transparent) */
23: #define TS_L1 1 /* Level 1 (one standard character set) */
24: #define TS_L2 2 /* Level 2 (multiple character sets in same file) */
25:
26: #define UNK 63 /* Symbol to use for unknown character (63 = ?) */
27:
28: /*
29: Codes for the base alphabet of a given character set.
30: These are assigned in roughly ISO 8859 order.
31: (Each is assumed to include ASCII/Roman.)
32: */
33: #define AL_UNIV 0 /* Universal (like ISO 10646) */
34: #define AL_ROMAN 1 /* Roman (Latin) alphabet */
35: #define AL_CYRIL 2 /* Cyrillic alphabet */
36: #define AL_ARABIC 3 /* Arabic */
37: #define AL_GREEK 4 /* Greek */
38: #define AL_HEBREW 5 /* Hebrew */
39: #define AL_KANA 6 /* Japanese Katakana */
40: #define AL_JAPAN 7 /* Japanese Katakana+Kanji ideograms */
41: #define AL_HAN 8 /* Chinese/Japanese/Korean ideograms */
42: #define AL_INDIA 9 /* Indian scripts (ISCII) */
43: /* Add more here... */
44: #define AL_UNK 999 /* Unknown (transparent) */
45:
46: /* Codes for languages */
47: /*
48: NOTE: It would perhaps be better to use ISO 639-1988 2-letter "Codes for
49: Representation of Names of Languages" here, shown in the comments below.
50: */
51: #define L_ASCII 0 /* EN ASCII, American English */
52: #define L_USASCII 0 /* EN ASCII, American English */
53: #define L_DUTCH 1 /* NL Dutch */
54: #define L_FINNISH 2 /* FI Finnish */
55: #define L_FRENCH 3 /* FR French */
56: #define L_GERMAN 4 /* DE German */
57: #define L_HUNGARIAN 5 /* HU Hungarian */
58: #define L_ITALIAN 6 /* IT Italian */
59: #define L_NORWEGIAN 7 /* NO Norwegian */
60: #define L_PORTUGUESE 8 /* PT Portuguese */
61: #define L_SPANISH 9 /* ES Spanish */
62: #define L_SWEDISH 10 /* SV Swedish */
63: #define L_SWISS 11 /* RM Swiss (Rhaeto-Romance) */
64: #define L_DANISH 12 /* DA Danish */
65: #define L_ICELANDIC 13 /* IS Icelandic */
66:
67: #ifdef CYRILLIC /* RU Russian */
68: #define L_RUSSIAN 14
69: #ifndef KANJI
70: #define MAXLANG 14
71: #endif /* KANJI */
72: #endif /* CYRILLIC */
73:
74: #ifdef KANJI /* JA Japanese */
75: #ifndef CYRILLIC
76: #define L_JAPANESE 14
77: #define MAXLANG 14
78: #else
79: #define L_JAPANESE 15
80: #define MAXLANG 15
81: #endif /* CYRILLIC */
82: #endif /* KANJI */
83:
84: #ifndef MAXLANG
85: #define MAXLANG 14
86: #endif /* MAXLANG */
87:
88: #ifdef COMMENT
89: /*
90: The ones below are not used yet. This list needs to be expanded and
91: organized, and something must be done about the hard coded numbers, because
92: they will be wrong if CYRILLIC and/or KANJI are deselected. But we can't do
93: "#define L_CHINESE L_JAPANESE + 1" because that causes recursion in the
94: preprocessor.
95: */
96: #define L_CHINESE 16 /* ZH */
97: #define L_KOREAN 17 /* KO */
98: #define L_ARABIC 18 /* AR */
99: #define L_HEBREW 19 /* IW */
100: #define L_GREEK 20 /* EL */
101: #define L_TURKISH 21 /* TR */
102: #endif /* COMMENT */
103:
104: /* Designators for 8-bit single-byte ISO and other standard character sets */
105: /* to be used in Kermit's transfer syntax. Note that symbols must be unique */
106: /* in the first 8 characters, because some C preprocessors have this limit. */
107:
108: /* LIST1 */
109: #define TC_TRANSP 0 /* Transparent, no character translation */
110: #define TC_USASCII 1 /* US 7-bit ASCII */
111: #define TC_1LATIN 2 /* ISO 8859-1, Latin-1 */
112:
113: #ifndef CYRILLIC
114: #ifndef KANJI
115: #define MAXTCSETS 2
116: #endif /* KANJI */
117: #endif /* CYRILLIC */
118:
119: /* Cyrillic */
120:
121: #ifdef CYRILLIC
122: #define TC_CYRILL 3 /* ISO 8859-5, Latin/Cyrillic */
123: #ifndef KANJI
124: #define MAXTCSETS 3
125: #endif /* KANJI */
126: #endif /* CYRILLIC */
127:
128: /* Japanese */
129:
130: #ifdef KANJI /* JIS Roman + Katana + Kanji, EUC code */
131: #ifndef CYRILLIC
132: #define TC_JEUC 3
133: #define MAXTCSETS 3
134: #else
135: #define TC_JEUC 4
136: #define MAXTCSETS 4
137: #endif /* CYRILLIC */
138: #endif /* KANJI */
139:
140: #ifdef COMMENT
141: /*
142: Not used yet. Take out hard-coded numbers. They are wrong anyway.
143: */
144: #define TC_2LATIN 4 /* ISO 8859-2, Latin-2 */
145: #define TC_3LATIN 5 /* ISO 8859-3, Latin-3 */
146: #define TC_4LATIN 6 /* ISO 8859-4, Latin-4 */
147: #define TC_5LATIN 7 /* ISO 8859-9, Latin-5 */
148: #define TC_ARABIC 8 /* ISO-8859-6, Latin/Arabic */
149: #define TC_GREEK 9 /* ISO-8859-7, Latin/Greek */
150: #define TC_HEBREW 10 /* ISO-8859-8, Latin/Hebrew */
151: #define TC_JIS208 11 /* Japanese JIS X 0208 multibyte set */
152: #define TC_CHINES 12 /* Chinese Standard GB 2312-80 */
153: #define TC_KOREAN 13 /* Korean KS C 5601-1987 */
154: #define TC_I10646 14 /* ISO DIS 10646 (not defined yet) */
155: /* and possibly others... */
156: #endif /* COMMENT */
157:
158: /* Structure for character-set information */
159:
160: struct csinfo {
161: char *name; /* Name of character set */
162: int size; /* Size (128 or 256) */
163: int code; /* Like TC_1LATIN, etc. */
164: char *designator; /* Designator, like I2/100 = Latin-1 */
165: int alphabet; /* Base alphabet */
166: };
167:
168: /* Structure for language information */
169:
170: struct langinfo {
171: int id; /* Language ID code (L_whatever) */
172: int fc; /* File character set to use */
173: int tc; /* Transfer character set to use */
174: char *description; /* Description of language */
175: };
176:
177: /* Now take in the system-specific definitions */
178:
179: #ifdef UNIX
180: #include "ckuxla.h"
181: #endif /* UNIX */
182:
183: #ifdef OSK /* OS-9 */
184: #include "ckuxla.h"
185: #endif /* OS-9 */
186:
187: #ifdef vms /* VAX/VMS */
188: #include "ckuxla.h"
189: #endif /* vms */
190:
191: #ifdef GEMDOS /* Atari ST */
192: #include "ckuxla.h"
193: #endif /* GEMDOS */
194:
195: #ifdef MAC /* Macintosh */
196: #include "ckmxla.h"
197: #endif /* MAC */
198:
199: #ifdef OS2 /* OS/2 */
200: #include "ckuxla.h" /* Uses big UNIX version */
201: #endif /* OS2 */
202:
203: #ifdef AMIGA /* Commodore Amiga */
204: #include "ckixla.h"
205: #endif /* AMIGA */
206:
207: #ifdef datageneral /* Data General MV AOS/VS */
208: #include "ckdxla.h"
209: #endif /* datageneral */
210:
211: #endif /* NOCSETS */
212:
213: #endif /* CKCXLA_H */
214:
215: /* end of ckcxla.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.