1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-  */
2 /* ***** BEGIN LICENSE BLOCK *****
3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  * http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * The Original Code is mozilla.org code.
16  *
17  * The Initial Developer of the Original Code is
18  * Netscape Communications Corporation.
19  * Portions created by the Initial Developer are Copyright (C) 1999
20  * the Initial Developer. All Rights Reserved.
21  *
22  * Contributor(s):
23  *
24  * Alternatively, the contents of this file may be used under the terms of
25  * either of the GNU General Public License Version 2 or later (the "GPL"),
26  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27  * in which case the provisions of the GPL or the LGPL are applicable instead
28  * of those above. If you wish to allow use of your version of this file only
29  * under the terms of either the GPL or the LGPL, and not to allow others to
30  * use your version of this file under the terms of the MPL, indicate your
31  * decision by deleting the provisions above and replace them with the notice
32  * and other provisions required by the GPL or the LGPL. If you do not delete
33  * the provisions above, a recipient may use your version of this file under
34  * the terms of any one of the MPL, the GPL or the LGPL.
35  *
36  * ***** END LICENSE BLOCK ***** */
37 
38 #ifndef _MDB_
39 #  include "mdb.h"
40 #endif
41 
42 #ifndef _MORK_
43 #  include "mork.h"
44 #endif
45 
46 #ifndef _MORKCH_
47 #  include "morkCh.h"
48 #endif
49 
50 #ifndef _MORKENV_
51 #  include "morkEnv.h"
52 #endif
53 
54 // 456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
55 
56 /* this byte char predicate source file derives from public domain Mithril */
57 /* (that means much of this has a copyright dedicated to the public domain) */
58 
59 /*============================================================================*/
60 /* morkCh_Type */
61 
62 const mork_flags morkCh_Type[] = /* derives from public domain Mithril table */
63     {
64         0,         /* 0x0 */
65         0,         /* 0x1 */
66         0,         /* 0x2 */
67         0,         /* 0x3 */
68         0,         /* 0x4 */
69         0,         /* 0x5 */
70         0,         /* 0x6 */
71         0,         /* 0x7 */
72         morkCh_kW, /* 0x8 backspace */
73         morkCh_kW, /* 0x9 tab */
74         morkCh_kW, /* 0xA linefeed */
75         0,         /* 0xB */
76         morkCh_kW, /* 0xC page */
77         morkCh_kW, /* 0xD return */
78         0,         /* 0xE */
79         0,         /* 0xF */
80         0,         /* 0x10 */
81         0,         /* 0x11 */
82         0,         /* 0x12 */
83         0,         /* 0x13 */
84         0,         /* 0x14 */
85         0,         /* 0x15 */
86         0,         /* 0x16 */
87         0,         /* 0x17 */
88         0,         /* 0x18 */
89         0,         /* 0x19 */
90         0,         /* 0x1A */
91         0,         /* 0x1B */
92         0,         /* 0x1C */
93         0,         /* 0x1D */
94         0,         /* 0x1E */
95         0,         /* 0x1F */
96 
97         morkCh_kV | morkCh_kW, /* 0x20 space */
98         morkCh_kV | morkCh_kM, /* 0x21 ! */
99         morkCh_kV,             /* 0x22 " */
100         morkCh_kV,             /* 0x23 # */
101         0,                     /* 0x24 $ cannot be kV because needs escape */
102         morkCh_kV,             /* 0x25 % */
103         morkCh_kV,             /* 0x26 & */
104         morkCh_kV,             /* 0x27 ' */
105         morkCh_kV,             /* 0x28 ( */
106         0,                     /* 0x29 ) cannot be kV because needs escape */
107         morkCh_kV,             /* 0x2A * */
108         morkCh_kV | morkCh_kM, /* 0x2B + */
109         morkCh_kV,             /* 0x2C , */
110         morkCh_kV | morkCh_kM, /* 0x2D - */
111         morkCh_kV,             /* 0x2E . */
112         morkCh_kV,             /* 0x2F / */
113 
114         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x30 0 */
115         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x31 1 */
116         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x32 2 */
117         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x33 3 */
118         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x34 4 */
119         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x35 5 */
120         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x36 6 */
121         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x37 7 */
122         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x38 8 */
123         morkCh_kV | morkCh_kD | morkCh_kX, /* 0x39 9 */
124         morkCh_kV | morkCh_kN | morkCh_kM, /* 0x3A : */
125         morkCh_kV,                         /* 0x3B ; */
126         morkCh_kV,                         /* 0x3C < */
127         morkCh_kV,                         /* 0x3D = */
128         morkCh_kV,                         /* 0x3E > */
129         morkCh_kV | morkCh_kM,             /* 0x3F ? */
130 
131         morkCh_kV,                                                 /* 0x40 @  */
132         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU | morkCh_kX, /* 0x41 A */
133         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU | morkCh_kX, /* 0x42 B */
134         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU | morkCh_kX, /* 0x43 C */
135         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU | morkCh_kX, /* 0x44 D */
136         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU | morkCh_kX, /* 0x45 E */
137         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU | morkCh_kX, /* 0x46 F */
138         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x47 G */
139         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x48 H */
140         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x49 I */
141         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x4A J */
142         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x4B K */
143         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x4C L */
144         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x4D M */
145         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x4E N */
146         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU,             /* 0x4F O */
147 
148         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x50 P */
149         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x51 Q */
150         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x52 R */
151         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x53 S */
152         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x54 T */
153         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x55 U */
154         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x56 V */
155         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x57 W */
156         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x58 X */
157         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x59 Y */
158         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kU, /* 0x5A Z */
159         morkCh_kV,                                     /* 0x5B [ */
160         0,         /* 0x5C \ cannot be kV because needs escape */
161         morkCh_kV, /* 0x5D ] */
162         morkCh_kV, /* 0x5E ^ */
163         morkCh_kV | morkCh_kN | morkCh_kM, /* 0x5F _ */
164 
165         morkCh_kV,                                                 /* 0x60 ` */
166         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL | morkCh_kX, /* 0x61 a */
167         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL | morkCh_kX, /* 0x62 b */
168         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL | morkCh_kX, /* 0x63 c */
169         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL | morkCh_kX, /* 0x64 d */
170         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL | morkCh_kX, /* 0x65 e */
171         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL | morkCh_kX, /* 0x66 f */
172         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x67 g */
173         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x68 h */
174         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x69 i */
175         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x6A j */
176         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x6B k */
177         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x6C l */
178         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x6D m */
179         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x6E n */
180         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL,             /* 0x6F o */
181 
182         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x70 p */
183         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x71 q */
184         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x72 r */
185         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x73 s */
186         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x74 t */
187         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x75 u */
188         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x76 v */
189         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x77 w */
190         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x78 x */
191         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x79 y */
192         morkCh_kV | morkCh_kN | morkCh_kM | morkCh_kL, /* 0x7A z */
193         morkCh_kV,                                     /* 0x7B { */
194         morkCh_kV,                                     /* 0x7C | */
195         morkCh_kV,                                     /* 0x7D } */
196         morkCh_kV,                                     /* 0x7E ~ */
197         morkCh_kW,                                     /* 0x7F rubout */
198 
199         /* $"80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F"   */
200         0,
201         0,
202         0,
203         0,
204         0,
205         0,
206         0,
207         0,
208         0,
209         0,
210         0,
211         0,
212         0,
213         0,
214         0,
215         0,
216 
217         /* $"90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F"   */
218         0,
219         0,
220         0,
221         0,
222         0,
223         0,
224         0,
225         0,
226         0,
227         0,
228         0,
229         0,
230         0,
231         0,
232         0,
233         0,
234 
235         /* $"A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF"   */
236         0,
237         0,
238         0,
239         0,
240         0,
241         0,
242         0,
243         0,
244         0,
245         0,
246         0,
247         0,
248         0,
249         0,
250         0,
251         0,
252 
253         /* $"B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF"   */
254         0,
255         0,
256         0,
257         0,
258         0,
259         0,
260         0,
261         0,
262         0,
263         0,
264         0,
265         0,
266         0,
267         0,
268         0,
269         0,
270 
271         /* $"C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF"   */
272         0,
273         0,
274         0,
275         0,
276         0,
277         0,
278         0,
279         0,
280         0,
281         0,
282         0,
283         0,
284         0,
285         0,
286         0,
287         0,
288 
289         /* $"D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF"   */
290         0,
291         0,
292         0,
293         0,
294         0,
295         0,
296         0,
297         0,
298         0,
299         0,
300         0,
301         0,
302         0,
303         0,
304         0,
305         0,
306 
307         /* $"E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF"   */
308         0,
309         0,
310         0,
311         0,
312         0,
313         0,
314         0,
315         0,
316         0,
317         0,
318         0,
319         0,
320         0,
321         0,
322         0,
323         0,
324 
325         /* $"F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF"   */
326         0,
327         0,
328         0,
329         0,
330         0,
331         0,
332         0,
333         0,
334         0,
335         0,
336         0,
337         0,
338         0,
339         0,
340         0,
341         0,
342 };
343 
344 // 456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
345