xref: /haiku/src/apps/terminal/VTPrsTbl.c (revision 3cb015b1ee509d69c643506e8ff573808c86dcfc)
1 /*
2  * Copyright (c) 2003-4 Kian Duffy <myob@users.sourceforge.net>
3  * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files or portions
7  * thereof (the "Software"), to deal in the Software without restriction,
8  * including without limitation the rights to use, copy, modify, merge,
9  * publish, distribute, sublicense, and/or sell copies of the Software,
10  * and to permit persons to whom the Software is furnished to do so, subject
11  * to the following conditions:
12  *
13  *  * Redistributions of source code must retain the above copyright notice,
14  *    this list of conditions and the following disclaimer.
15  *
16  *  * Redistributions in binary form must reproduce the above copyright notice
17  *    in the  binary, as well as this list of conditions and the following
18  *    disclaimer in the documentation and/or other materials provided with
19  *    the distribution.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27  * THE SOFTWARE.
28  *
29  */
30 
31 #include "VTparse.h"
32 
33 #define USE_MBCS
34 #define USE_ISO2022
35 
36 int utf8_groundtable[] =	/* UTF8 coding ground table */
37 {
38 /*	NUL		SOH		STX		ETX	*/
39 CASE_IGNORE,
40 CASE_IGNORE,
41 CASE_IGNORE,
42 CASE_IGNORE,
43 /*	EOT		ENQ		ACK		BEL	*/
44 CASE_IGNORE,
45 CASE_IGNORE,
46 CASE_IGNORE,
47 CASE_BELL,
48 /*	BS		HT		NL		VT	*/
49 CASE_BS,
50 CASE_TAB,
51 CASE_LF,
52 CASE_LF, /* CASE_UP*/
53 /*	NP		CR		SO		SI	*/
54 CASE_LF, /* CASE_IGNORE*/
55 CASE_CR,
56 CASE_SO,
57 CASE_SI,
58 /*	DLE		DC1		DC2		DC3	*/
59 CASE_IGNORE,
60 CASE_IGNORE,
61 CASE_IGNORE,
62 CASE_IGNORE,
63 /*	DC4		NAK		SYN		ETB	*/
64 CASE_IGNORE,
65 CASE_IGNORE,
66 CASE_IGNORE,
67 CASE_IGNORE,
68 /*	CAN		EM		SUB		ESC	*/
69 CASE_IGNORE,
70 CASE_IGNORE,
71 CASE_IGNORE,
72 CASE_ESC,
73 /*	FS		GS		RS		US	*/
74 CASE_IGNORE,
75 CASE_IGNORE,
76 CASE_IGNORE,
77 CASE_IGNORE,
78 /*	SP		!		"		#	*/
79 CASE_PRINT,
80 CASE_PRINT,
81 CASE_PRINT,
82 CASE_PRINT,
83 /*	$		%		&		'	*/
84 CASE_PRINT,
85 CASE_PRINT,
86 CASE_PRINT,
87 CASE_PRINT,
88 /*	(		)		*		+	*/
89 CASE_PRINT,
90 CASE_PRINT,
91 CASE_PRINT,
92 CASE_PRINT,
93 /*	,		-		.		/	*/
94 CASE_PRINT,
95 CASE_PRINT,
96 CASE_PRINT,
97 CASE_PRINT,
98 /*	0		1		2		3	*/
99 CASE_PRINT,
100 CASE_PRINT,
101 CASE_PRINT,
102 CASE_PRINT,
103 /*	4		5		6		7	*/
104 CASE_PRINT,
105 CASE_PRINT,
106 CASE_PRINT,
107 CASE_PRINT,
108 /*	8		9		:		;	*/
109 CASE_PRINT,
110 CASE_PRINT,
111 CASE_PRINT,
112 CASE_PRINT,
113 /*	<		=		>		?	*/
114 CASE_PRINT,
115 CASE_PRINT,
116 CASE_PRINT,
117 CASE_PRINT,
118 /*	@		A		B		C	*/
119 CASE_PRINT,
120 CASE_PRINT,
121 CASE_PRINT,
122 CASE_PRINT,
123 /*	D		E		F		G	*/
124 CASE_PRINT,
125 CASE_PRINT,
126 CASE_PRINT,
127 CASE_PRINT,
128 /*	H		I		J		K	*/
129 CASE_PRINT,
130 CASE_PRINT,
131 CASE_PRINT,
132 CASE_PRINT,
133 /*	L		M		N		O	*/
134 CASE_PRINT,
135 CASE_PRINT,
136 CASE_PRINT,
137 CASE_PRINT,
138 /*	P		Q		R		S	*/
139 CASE_PRINT,
140 CASE_PRINT,
141 CASE_PRINT,
142 CASE_PRINT,
143 /*	T		U		V		W	*/
144 CASE_PRINT,
145 CASE_PRINT,
146 CASE_PRINT,
147 CASE_PRINT,
148 /*	X		Y		Z		[	*/
149 CASE_PRINT,
150 CASE_PRINT,
151 CASE_PRINT,
152 CASE_PRINT,
153 /*	\		]		^		_	*/
154 CASE_PRINT,
155 CASE_PRINT,
156 CASE_PRINT,
157 CASE_PRINT,
158 /*	`		a		b		c	*/
159 CASE_PRINT,
160 CASE_PRINT,
161 CASE_PRINT,
162 CASE_PRINT,
163 /*	d		e		f		g	*/
164 CASE_PRINT,
165 CASE_PRINT,
166 CASE_PRINT,
167 CASE_PRINT,
168 /*	h		i		j		k	*/
169 CASE_PRINT,
170 CASE_PRINT,
171 CASE_PRINT,
172 CASE_PRINT,
173 /*	l		m		n		o	*/
174 CASE_PRINT,
175 CASE_PRINT,
176 CASE_PRINT,
177 CASE_PRINT,
178 /*	p		q		r		s	*/
179 CASE_PRINT,
180 CASE_PRINT,
181 CASE_PRINT,
182 CASE_PRINT,
183 /*	t		u		v		w	*/
184 CASE_PRINT,
185 CASE_PRINT,
186 CASE_PRINT,
187 CASE_PRINT,
188 /*	x		y		z		{	*/
189 CASE_PRINT,
190 CASE_PRINT,
191 CASE_PRINT,
192 CASE_PRINT,
193 /*	|		}		~		DEL	*/
194 CASE_PRINT,
195 CASE_PRINT,
196 CASE_PRINT,
197 CASE_PRINT,
198 /*      0x80            0x81            0x82            0x83    */
199 CASE_UTF8_INSTRING,
200 CASE_UTF8_INSTRING,
201 CASE_UTF8_INSTRING,
202 CASE_UTF8_INSTRING,
203 /*      0x84            0x85            0x86            0x87    */
204 CASE_UTF8_INSTRING,
205 CASE_UTF8_INSTRING,
206 CASE_UTF8_INSTRING,
207 CASE_UTF8_INSTRING,
208 /*      0x88            0x89            0x8a            0x8b    */
209 CASE_UTF8_INSTRING,
210 CASE_UTF8_INSTRING,
211 CASE_UTF8_INSTRING,
212 CASE_UTF8_INSTRING,
213 /*      0x8c            0x8d            0x8e            0x8f    */
214 CASE_UTF8_INSTRING,
215 CASE_UTF8_INSTRING,
216 CASE_UTF8_INSTRING,
217 CASE_UTF8_INSTRING,
218 /*      0x90            0x91            0x92            0x93    */
219 CASE_UTF8_INSTRING,
220 CASE_UTF8_INSTRING,
221 CASE_UTF8_INSTRING,
222 CASE_UTF8_INSTRING,
223 /*      0x94            0x95            0x96            0x97    */
224 CASE_UTF8_INSTRING,
225 CASE_UTF8_INSTRING,
226 CASE_UTF8_INSTRING,
227 CASE_UTF8_INSTRING,
228 /*      0x99            0x99            0x9a            0x9b    */
229 CASE_UTF8_INSTRING,
230 CASE_UTF8_INSTRING,
231 CASE_UTF8_INSTRING,
232 CASE_UTF8_INSTRING,
233 /*      0x9c            0x9d            0x9e            0x9f    */
234 CASE_UTF8_INSTRING,
235 CASE_UTF8_INSTRING,
236 CASE_UTF8_INSTRING,
237 CASE_UTF8_INSTRING,
238 /*      0xa0		0xa1		0xa2		0xa3	*/
239 CASE_UTF8_INSTRING,
240 CASE_UTF8_INSTRING,
241 CASE_UTF8_INSTRING,
242 CASE_UTF8_INSTRING,
243 /*      0xa4		0xa5		0xa6		0xa7	*/
244 CASE_UTF8_INSTRING,
245 CASE_UTF8_INSTRING,
246 CASE_UTF8_INSTRING,
247 CASE_UTF8_INSTRING,
248 /*      0xa8		0xa9		0xaa		0xab	*/
249 CASE_UTF8_INSTRING,
250 CASE_UTF8_INSTRING,
251 CASE_UTF8_INSTRING,
252 CASE_UTF8_INSTRING,
253 /*      0xac		0xad		0xae		0xaf	*/
254 CASE_UTF8_INSTRING,
255 CASE_UTF8_INSTRING,
256 CASE_UTF8_INSTRING,
257 CASE_UTF8_INSTRING,
258 /*      0xb0		0xb1		0xb2		0xb3	*/
259 CASE_UTF8_INSTRING,
260 CASE_UTF8_INSTRING,
261 CASE_UTF8_INSTRING,
262 CASE_UTF8_INSTRING,
263 /*      0xb4		0xb5		0xb6		0xb7	*/
264 CASE_UTF8_INSTRING,
265 CASE_UTF8_INSTRING,
266 CASE_UTF8_INSTRING,
267 CASE_UTF8_INSTRING,
268 /*      0xb8		0xb9		0xba		0xbb	*/
269 CASE_UTF8_INSTRING,
270 CASE_UTF8_INSTRING,
271 CASE_UTF8_INSTRING,
272 CASE_UTF8_INSTRING,
273 /*      0xbc		0xbd		0xbe		0xbf	*/
274 CASE_UTF8_INSTRING,
275 CASE_UTF8_INSTRING,
276 CASE_UTF8_INSTRING,
277 CASE_UTF8_INSTRING,
278 /*      0xc0		0xc1		0xc2		0xc3	*/
279 CASE_UTF8_2BYTE,
280 CASE_UTF8_2BYTE,
281 CASE_UTF8_2BYTE,
282 CASE_UTF8_2BYTE,
283 /*      0xc4		0xc5		0xc6		0xc7	*/
284 CASE_UTF8_2BYTE,
285 CASE_UTF8_2BYTE,
286 CASE_UTF8_2BYTE,
287 CASE_UTF8_2BYTE,
288 /*      0xc8		0xc9		0xca		0xcb	*/
289 CASE_UTF8_2BYTE,
290 CASE_UTF8_2BYTE,
291 CASE_UTF8_2BYTE,
292 CASE_UTF8_2BYTE,
293 /*      0xcc		0xcd		0xce		0xcf	*/
294 CASE_UTF8_2BYTE,
295 CASE_UTF8_2BYTE,
296 CASE_UTF8_2BYTE,
297 CASE_UTF8_2BYTE,
298 /*      0xd0		0xd1		0xd2		0xd3	*/
299 CASE_UTF8_2BYTE,
300 CASE_UTF8_2BYTE,
301 CASE_UTF8_2BYTE,
302 CASE_UTF8_2BYTE,
303 /*      0xd4		0xd5		0xd6		0xd7	*/
304 CASE_UTF8_2BYTE,
305 CASE_UTF8_2BYTE,
306 CASE_UTF8_2BYTE,
307 CASE_UTF8_2BYTE,
308 /*      0xd8		0xd9		0xda		0xdb	*/
309 CASE_UTF8_2BYTE,
310 CASE_UTF8_2BYTE,
311 CASE_UTF8_2BYTE,
312 CASE_UTF8_2BYTE,
313 /*      0xdc		0xdd		0xde		0xdf	*/
314 CASE_UTF8_2BYTE,
315 CASE_UTF8_2BYTE,
316 CASE_UTF8_2BYTE,
317 CASE_UTF8_2BYTE,
318 /*      0xe0		0xe1		0xe2		0xe3	*/
319 CASE_UTF8_3BYTE,
320 CASE_UTF8_3BYTE,
321 CASE_UTF8_3BYTE,
322 CASE_UTF8_3BYTE,
323 /*      0xe4		0xe5		0xe6		0xe7	*/
324 CASE_UTF8_3BYTE,
325 CASE_UTF8_3BYTE,
326 CASE_UTF8_3BYTE,
327 CASE_UTF8_3BYTE,
328 /*      0xe8		0xe9		0xea		0xeb	*/
329 CASE_UTF8_3BYTE,
330 CASE_UTF8_3BYTE,
331 CASE_UTF8_3BYTE,
332 CASE_UTF8_3BYTE,
333 /*      0xec		0xed		0xee		0xef	*/
334 CASE_UTF8_3BYTE,
335 CASE_UTF8_3BYTE,
336 CASE_UTF8_3BYTE,
337 CASE_UTF8_3BYTE,
338 /*      0xf0		0xf1		0xf2		0xf3	*/
339 CASE_UTF8_3BYTE,
340 CASE_UTF8_3BYTE,
341 CASE_UTF8_3BYTE,
342 CASE_UTF8_3BYTE,
343 /*      0xf4		0xf5		0xf6		0xf7	*/
344 CASE_UTF8_3BYTE,
345 CASE_UTF8_3BYTE,
346 CASE_UTF8_3BYTE,
347 CASE_UTF8_3BYTE,
348 /*      0xf8		0xf9		0xfa		0xfb	*/
349 CASE_UTF8_3BYTE,
350 CASE_UTF8_3BYTE,
351 CASE_UTF8_3BYTE,
352 CASE_UTF8_3BYTE,
353 /*      0xfc		0xfd		0xfe		0xff	*/
354 CASE_UTF8_3BYTE,
355 CASE_UTF8_3BYTE,
356 CASE_UTF8_3BYTE,
357 CASE_UTF8_3BYTE,
358 };
359 
360 int cs96_groundtable[] =	/* charset 96 table */
361 {
362 /*	NUL		SOH		STX		ETX	*/
363 CASE_IGNORE,
364 CASE_IGNORE,
365 CASE_IGNORE,
366 CASE_IGNORE,
367 /*	EOT		ENQ		ACK		BEL	*/
368 CASE_IGNORE,
369 CASE_IGNORE,
370 CASE_IGNORE,
371 CASE_BELL,
372 /*	BS		HT		NL		VT	*/
373 CASE_BS,
374 CASE_TAB,
375 CASE_LF,
376 CASE_LF, /* CASE_UP*/
377 /*	NP		CR		SO		SI	*/
378 CASE_LF, /* CASE_IGNORE*/
379 CASE_CR,
380 CASE_SO,
381 CASE_SI,
382 /*	DLE		DC1		DC2		DC3	*/
383 CASE_IGNORE,
384 CASE_IGNORE,
385 CASE_IGNORE,
386 CASE_IGNORE,
387 /*	DC4		NAK		SYN		ETB	*/
388 CASE_IGNORE,
389 CASE_IGNORE,
390 CASE_IGNORE,
391 CASE_IGNORE,
392 /*	CAN		EM		SUB		ESC	*/
393 CASE_IGNORE,
394 CASE_IGNORE,
395 CASE_IGNORE,
396 CASE_ESC,
397 /*	FS		GS		RS		US	*/
398 CASE_IGNORE,
399 CASE_IGNORE,
400 CASE_IGNORE,
401 CASE_IGNORE,
402 /*	SP		!		"		#	*/
403 CASE_PRINT_CS96,
404 CASE_PRINT_CS96,
405 CASE_PRINT_CS96,
406 CASE_PRINT_CS96,
407 /*	$		%		&		'	*/
408 CASE_PRINT_CS96,
409 CASE_PRINT_CS96,
410 CASE_PRINT_CS96,
411 CASE_PRINT_CS96,
412 /*	(		)		*		+	*/
413 CASE_PRINT_CS96,
414 CASE_PRINT_CS96,
415 CASE_PRINT_CS96,
416 CASE_PRINT_CS96,
417 /*	,		-		.		/	*/
418 CASE_PRINT_CS96,
419 CASE_PRINT_CS96,
420 CASE_PRINT_CS96,
421 CASE_PRINT_CS96,
422 /*	0		1		2		3	*/
423 CASE_PRINT_CS96,
424 CASE_PRINT_CS96,
425 CASE_PRINT_CS96,
426 CASE_PRINT_CS96,
427 /*	4		5		6		7	*/
428 CASE_PRINT_CS96,
429 CASE_PRINT_CS96,
430 CASE_PRINT_CS96,
431 CASE_PRINT_CS96,
432 /*	8		9		:		;	*/
433 CASE_PRINT_CS96,
434 CASE_PRINT_CS96,
435 CASE_PRINT_CS96,
436 CASE_PRINT_CS96,
437 /*	<		=		>		?	*/
438 CASE_PRINT_CS96,
439 CASE_PRINT_CS96,
440 CASE_PRINT_CS96,
441 CASE_PRINT_CS96,
442 /*	@		A		B		C	*/
443 CASE_PRINT_CS96,
444 CASE_PRINT_CS96,
445 CASE_PRINT_CS96,
446 CASE_PRINT_CS96,
447 /*	D		E		F		G	*/
448 CASE_PRINT_CS96,
449 CASE_PRINT_CS96,
450 CASE_PRINT_CS96,
451 CASE_PRINT_CS96,
452 /*	H		I		J		K	*/
453 CASE_PRINT_CS96,
454 CASE_PRINT_CS96,
455 CASE_PRINT_CS96,
456 CASE_PRINT_CS96,
457 /*	L		M		N		O	*/
458 CASE_PRINT_CS96,
459 CASE_PRINT_CS96,
460 CASE_PRINT_CS96,
461 CASE_PRINT_CS96,
462 /*	P		Q		R		S	*/
463 CASE_PRINT_CS96,
464 CASE_PRINT_CS96,
465 CASE_PRINT_CS96,
466 CASE_PRINT_CS96,
467 /*	T		U		V		W	*/
468 CASE_PRINT_CS96,
469 CASE_PRINT_CS96,
470 CASE_PRINT_CS96,
471 CASE_PRINT_CS96,
472 /*	X		Y		Z		[	*/
473 CASE_PRINT_CS96,
474 CASE_PRINT_CS96,
475 CASE_PRINT_CS96,
476 CASE_PRINT_CS96,
477 /*	\		]		^		_	*/
478 CASE_PRINT_CS96,
479 CASE_PRINT_CS96,
480 CASE_PRINT_CS96,
481 CASE_PRINT_CS96,
482 /*	`		a		b		c	*/
483 CASE_PRINT_CS96,
484 CASE_PRINT_CS96,
485 CASE_PRINT_CS96,
486 CASE_PRINT_CS96,
487 /*	d		e		f		g	*/
488 CASE_PRINT_CS96,
489 CASE_PRINT_CS96,
490 CASE_PRINT_CS96,
491 CASE_PRINT_CS96,
492 /*	h		i		j		k	*/
493 CASE_PRINT_CS96,
494 CASE_PRINT_CS96,
495 CASE_PRINT_CS96,
496 CASE_PRINT_CS96,
497 /*	l		m		n		o	*/
498 CASE_PRINT_CS96,
499 CASE_PRINT_CS96,
500 CASE_PRINT_CS96,
501 CASE_PRINT_CS96,
502 /*	p		q		r		s	*/
503 CASE_PRINT_CS96,
504 CASE_PRINT_CS96,
505 CASE_PRINT_CS96,
506 CASE_PRINT_CS96,
507 /*	t		u		v		w	*/
508 CASE_PRINT_CS96,
509 CASE_PRINT_CS96,
510 CASE_PRINT_CS96,
511 CASE_PRINT_CS96,
512 /*	x		y		z		{	*/
513 CASE_PRINT_CS96,
514 CASE_PRINT_CS96,
515 CASE_PRINT_CS96,
516 CASE_PRINT_CS96,
517 /*	|		}		~		DEL	*/
518 CASE_PRINT_CS96,
519 CASE_PRINT_CS96,
520 CASE_PRINT_CS96,
521 CASE_PRINT_CS96,
522 /*      0x80            0x81            0x82            0x83    */
523 CASE_IGNORE,
524 CASE_IGNORE,
525 CASE_IGNORE,
526 CASE_IGNORE,
527 /*      0x84            0x85            0x86            0x87    */
528 CASE_IGNORE,
529 CASE_IGNORE,
530 CASE_IGNORE,
531 CASE_IGNORE,
532 /*      0x88            0x89            0x8a            0x8b    */
533 CASE_IGNORE,
534 CASE_IGNORE,
535 CASE_IGNORE,
536 CASE_IGNORE,
537 /*      0x8c            0x8d            0x8e            0x8f    */
538 CASE_IGNORE,
539 CASE_IGNORE,
540 CASE_IGNORE,
541 CASE_IGNORE,
542 /*      0x90            0x91            0x92            0x93    */
543 CASE_IGNORE,
544 CASE_IGNORE,
545 CASE_IGNORE,
546 CASE_IGNORE,
547 /*      0x94            0x95            0x96            0x97    */
548 CASE_IGNORE,
549 CASE_IGNORE,
550 CASE_IGNORE,
551 CASE_IGNORE,
552 /*      0x99            0x99            0x9a            0x9b    */
553 CASE_IGNORE,
554 CASE_IGNORE,
555 CASE_IGNORE,
556 CASE_IGNORE,
557 /*      0x9c            0x9d            0x9e            0x9f    */
558 CASE_IGNORE,
559 CASE_IGNORE,
560 CASE_IGNORE,
561 CASE_IGNORE,
562 /*      0xa0		0xa1		0xa2		0xa3	*/
563 CASE_IGNORE,
564 CASE_IGNORE,
565 CASE_IGNORE,
566 CASE_IGNORE,
567 /*      0xa4		0xa5		0xa6		0xa7	*/
568 CASE_IGNORE,
569 CASE_IGNORE,
570 CASE_IGNORE,
571 CASE_IGNORE,
572 /*      0xa8		0xa9		0xaa		0xab	*/
573 CASE_IGNORE,
574 CASE_IGNORE,
575 CASE_IGNORE,
576 CASE_IGNORE,
577 /*      0xac		0xad		0xae		0xaf	*/
578 CASE_IGNORE,
579 CASE_IGNORE,
580 CASE_IGNORE,
581 CASE_IGNORE,
582 /*      0xb0		0xb1		0xb2		0xb3	*/
583 CASE_IGNORE,
584 CASE_IGNORE,
585 CASE_IGNORE,
586 CASE_IGNORE,
587 /*      0xb4		0xb5		0xb6		0xb7	*/
588 CASE_IGNORE,
589 CASE_IGNORE,
590 CASE_IGNORE,
591 CASE_IGNORE,
592 /*      0xb8		0xb9		0xba		0xbb	*/
593 CASE_IGNORE,
594 CASE_IGNORE,
595 CASE_IGNORE,
596 CASE_IGNORE,
597 /*      0xbc		0xbd		0xbe		0xbf	*/
598 CASE_IGNORE,
599 CASE_IGNORE,
600 CASE_IGNORE,
601 CASE_IGNORE,
602 /*      0xc0		0xc1		0xc2		0xc3	*/
603 CASE_IGNORE,
604 CASE_IGNORE,
605 CASE_IGNORE,
606 CASE_IGNORE,
607 /*      0xc4		0xc5		0xc6		0xc7	*/
608 CASE_IGNORE,
609 CASE_IGNORE,
610 CASE_IGNORE,
611 CASE_IGNORE,
612 /*      0xc8		0xc9		0xca		0xcb	*/
613 CASE_IGNORE,
614 CASE_IGNORE,
615 CASE_IGNORE,
616 CASE_IGNORE,
617 /*      0xcc		0xcd		0xce		0xcf	*/
618 CASE_IGNORE,
619 CASE_IGNORE,
620 CASE_IGNORE,
621 CASE_IGNORE,
622 /*      0xd0		0xd1		0xd2		0xd3	*/
623 CASE_IGNORE,
624 CASE_IGNORE,
625 CASE_IGNORE,
626 CASE_IGNORE,
627 /*      0xd4		0xd5		0xd6		0xd7	*/
628 CASE_IGNORE,
629 CASE_IGNORE,
630 CASE_IGNORE,
631 CASE_IGNORE,
632 /*      0xd8		0xd9		0xda		0xdb	*/
633 CASE_IGNORE,
634 CASE_IGNORE,
635 CASE_IGNORE,
636 CASE_IGNORE,
637 /*      0xdc		0xdd		0xde		0xdf	*/
638 CASE_IGNORE,
639 CASE_IGNORE,
640 CASE_IGNORE,
641 CASE_IGNORE,
642 /*      0xe0		0xe1		0xe2		0xe3	*/
643 CASE_IGNORE,
644 CASE_IGNORE,
645 CASE_IGNORE,
646 CASE_IGNORE,
647 /*      0xe4		0xe5		0xe6		0xe7	*/
648 CASE_IGNORE,
649 CASE_IGNORE,
650 CASE_IGNORE,
651 CASE_IGNORE,
652 /*      0xe8		0xe9		0xea		0xeb	*/
653 CASE_IGNORE,
654 CASE_IGNORE,
655 CASE_IGNORE,
656 CASE_IGNORE,
657 /*      0xec		0xed		0xee		0xef	*/
658 CASE_IGNORE,
659 CASE_IGNORE,
660 CASE_IGNORE,
661 CASE_IGNORE,
662 /*      0xf0		0xf1		0xf2		0xf3	*/
663 CASE_IGNORE,
664 CASE_IGNORE,
665 CASE_IGNORE,
666 CASE_IGNORE,
667 /*      0xf4		0xf5		0xf6		0xf7	*/
668 CASE_IGNORE,
669 CASE_IGNORE,
670 CASE_IGNORE,
671 CASE_IGNORE,
672 /*      0xf8		0xf9		0xfa		0xfb	*/
673 CASE_IGNORE,
674 CASE_IGNORE,
675 CASE_IGNORE,
676 CASE_IGNORE,
677 /*      0xfc		0xfd		0xfe		0xff	*/
678 CASE_IGNORE,
679 CASE_IGNORE,
680 CASE_IGNORE,
681 CASE_IGNORE,
682 };
683 
684 int iso8859_groundtable[] =
685 {
686 /*	NUL		SOH		STX		ETX	*/
687 CASE_IGNORE,
688 CASE_IGNORE,
689 CASE_IGNORE,
690 CASE_IGNORE,
691 /*	EOT		ENQ		ACK		BEL	*/
692 CASE_IGNORE,
693 CASE_IGNORE,
694 CASE_IGNORE,
695 CASE_BELL,
696 /*	BS		HT		NL		VT	*/
697 CASE_BS,
698 CASE_TAB,
699 CASE_LF,
700 CASE_LF, /*CASE_UP,*/
701 /*	NP		CR		SO		SI	*/
702 CASE_LF, /*CASE_IGNORE,*/
703 CASE_CR,
704 CASE_SO,
705 CASE_SI,
706 /*	DLE		DC1		DC2		DC3	*/
707 CASE_IGNORE,
708 CASE_IGNORE,
709 CASE_IGNORE,
710 CASE_IGNORE,
711 /*	DC4		NAK		SYN		ETB	*/
712 CASE_IGNORE,
713 CASE_IGNORE,
714 CASE_IGNORE,
715 CASE_IGNORE,
716 /*	CAN		EM		SUB		ESC	*/
717 CASE_IGNORE,
718 CASE_IGNORE,
719 CASE_IGNORE,
720 CASE_ESC,
721 /*	FS		GS		RS		US	*/
722 CASE_IGNORE,
723 CASE_IGNORE,
724 CASE_IGNORE,
725 CASE_IGNORE,
726 /*	SP		!		"		#	*/
727 CASE_PRINT,
728 CASE_PRINT,
729 CASE_PRINT,
730 CASE_PRINT,
731 /*	$		%		&		'	*/
732 CASE_PRINT,
733 CASE_PRINT,
734 CASE_PRINT,
735 CASE_PRINT,
736 /*	(		)		*		+	*/
737 CASE_PRINT,
738 CASE_PRINT,
739 CASE_PRINT,
740 CASE_PRINT,
741 /*	,		-		.		/	*/
742 CASE_PRINT,
743 CASE_PRINT,
744 CASE_PRINT,
745 CASE_PRINT,
746 /*	0		1		2		3	*/
747 CASE_PRINT,
748 CASE_PRINT,
749 CASE_PRINT,
750 CASE_PRINT,
751 /*	4		5		6		7	*/
752 CASE_PRINT,
753 CASE_PRINT,
754 CASE_PRINT,
755 CASE_PRINT,
756 /*	8		9		:		;	*/
757 CASE_PRINT,
758 CASE_PRINT,
759 CASE_PRINT,
760 CASE_PRINT,
761 /*	<		=		>		?	*/
762 CASE_PRINT,
763 CASE_PRINT,
764 CASE_PRINT,
765 CASE_PRINT,
766 /*	@		A		B		C	*/
767 CASE_PRINT,
768 CASE_PRINT,
769 CASE_PRINT,
770 CASE_PRINT,
771 /*	D		E		F		G	*/
772 CASE_PRINT,
773 CASE_PRINT,
774 CASE_PRINT,
775 CASE_PRINT,
776 /*	H		I		J		K	*/
777 CASE_PRINT,
778 CASE_PRINT,
779 CASE_PRINT,
780 CASE_PRINT,
781 /*	L		M		N		O	*/
782 CASE_PRINT,
783 CASE_PRINT,
784 CASE_PRINT,
785 CASE_PRINT,
786 /*	P		Q		R		S	*/
787 CASE_PRINT,
788 CASE_PRINT,
789 CASE_PRINT,
790 CASE_PRINT,
791 /*	T		U		V		W	*/
792 CASE_PRINT,
793 CASE_PRINT,
794 CASE_PRINT,
795 CASE_PRINT,
796 /*	X		Y		Z		[	*/
797 CASE_PRINT,
798 CASE_PRINT,
799 CASE_PRINT,
800 CASE_PRINT,
801 /*	\		]		^		_	*/
802 CASE_PRINT,
803 CASE_PRINT,
804 CASE_PRINT,
805 CASE_PRINT,
806 /*	`		a		b		c	*/
807 CASE_PRINT,
808 CASE_PRINT,
809 CASE_PRINT,
810 CASE_PRINT,
811 /*	d		e		f		g	*/
812 CASE_PRINT,
813 CASE_PRINT,
814 CASE_PRINT,
815 CASE_PRINT,
816 /*	h		i		j		k	*/
817 CASE_PRINT,
818 CASE_PRINT,
819 CASE_PRINT,
820 CASE_PRINT,
821 /*	l		m		n		o	*/
822 CASE_PRINT,
823 CASE_PRINT,
824 CASE_PRINT,
825 CASE_PRINT,
826 /*	p		q		r		s	*/
827 CASE_PRINT,
828 CASE_PRINT,
829 CASE_PRINT,
830 CASE_PRINT,
831 /*	t		u		v		w	*/
832 CASE_PRINT,
833 CASE_PRINT,
834 CASE_PRINT,
835 CASE_PRINT,
836 /*	x		y		z		{	*/
837 CASE_PRINT,
838 CASE_PRINT,
839 CASE_PRINT,
840 CASE_PRINT,
841 /*	|		}		~		DEL	*/
842 CASE_PRINT,
843 CASE_PRINT,
844 CASE_PRINT,
845 CASE_PRINT,
846 /*      0x80            0x81            0x82            0x83    */
847 CASE_IGNORE,
848 CASE_IGNORE,
849 CASE_IGNORE,
850 CASE_IGNORE,
851 /*      0x84            0x85            0x86            0x87    */
852 CASE_IGNORE,
853 CASE_IGNORE,
854 CASE_IGNORE,
855 CASE_IGNORE,
856 /*      0x88            0x89            0x8a            0x8b    */
857 CASE_IGNORE,
858 CASE_IGNORE,
859 CASE_IGNORE,
860 CASE_IGNORE,
861 /*      0x8c            0x8d            0x8e            0x8f    */
862 CASE_IGNORE,
863 CASE_IGNORE,
864 CASE_SS2,
865 CASE_SS3,
866 /*      0x90            0x91            0x92            0x93    */
867 CASE_IGNORE,
868 CASE_IGNORE,
869 CASE_IGNORE,
870 CASE_IGNORE,
871 /*      0x94            0x95            0x96            0x97    */
872 CASE_IGNORE,
873 CASE_IGNORE,
874 CASE_IGNORE,
875 CASE_IGNORE,
876 /*      0x99            0x99            0x9a            0x9b    */
877 CASE_IGNORE,
878 CASE_IGNORE,
879 CASE_IGNORE,
880 CASE_CSI_STATE,
881 /*      0x9c            0x9d            0x9e            0x9f    */
882 CASE_IGNORE,
883 CASE_IGNORE,
884 CASE_IGNORE,
885 CASE_IGNORE,
886 /*      nobreakspace    exclamdown      cent            sterling        */
887 CASE_PRINT_GR,
888 CASE_PRINT_GR,
889 CASE_PRINT_GR,
890 CASE_PRINT_GR,
891 /*      currency        yen             brokenbar       section         */
892 CASE_PRINT_GR,
893 CASE_PRINT_GR,
894 CASE_PRINT_GR,
895 CASE_PRINT_GR,
896 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
897 CASE_PRINT_GR,
898 CASE_PRINT_GR,
899 CASE_PRINT_GR,
900 CASE_PRINT_GR,
901 /*      notsign         hyphen          registered      macron          */
902 CASE_PRINT_GR,
903 CASE_PRINT_GR,
904 CASE_PRINT_GR,
905 CASE_PRINT_GR,
906 /*      degree          plusminus       twosuperior     threesuperior   */
907 CASE_PRINT_GR,
908 CASE_PRINT_GR,
909 CASE_PRINT_GR,
910 CASE_PRINT_GR,
911 /*      acute           mu              paragraph       periodcentered  */
912 CASE_PRINT_GR,
913 CASE_PRINT_GR,
914 CASE_PRINT_GR,
915 CASE_PRINT_GR,
916 /*      cedilla         onesuperior     masculine       guillemotright  */
917 CASE_PRINT_GR,
918 CASE_PRINT_GR,
919 CASE_PRINT_GR,
920 CASE_PRINT_GR,
921 /*      onequarter      onehalf         threequarters   questiondown    */
922 CASE_PRINT_GR,
923 CASE_PRINT_GR,
924 CASE_PRINT_GR,
925 CASE_PRINT_GR,
926 /*      Agrave          Aacute          Acircumflex     Atilde          */
927 CASE_PRINT_GR,
928 CASE_PRINT_GR,
929 CASE_PRINT_GR,
930 CASE_PRINT_GR,
931 /*      Adiaeresis      Aring           AE              Ccedilla        */
932 CASE_PRINT_GR,
933 CASE_PRINT_GR,
934 CASE_PRINT_GR,
935 CASE_PRINT_GR,
936 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
937 CASE_PRINT_GR,
938 CASE_PRINT_GR,
939 CASE_PRINT_GR,
940 CASE_PRINT_GR,
941 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
942 CASE_PRINT_GR,
943 CASE_PRINT_GR,
944 CASE_PRINT_GR,
945 CASE_PRINT_GR,
946 /*      Eth             Ntilde          Ograve          Oacute          */
947 CASE_PRINT_GR,
948 CASE_PRINT_GR,
949 CASE_PRINT_GR,
950 CASE_PRINT_GR,
951 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
952 CASE_PRINT_GR,
953 CASE_PRINT_GR,
954 CASE_PRINT_GR,
955 CASE_PRINT_GR,
956 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
957 CASE_PRINT_GR,
958 CASE_PRINT_GR,
959 CASE_PRINT_GR,
960 CASE_PRINT_GR,
961 /*      Udiaeresis      Yacute          Thorn           ssharp          */
962 CASE_PRINT_GR,
963 CASE_PRINT_GR,
964 CASE_PRINT_GR,
965 CASE_PRINT_GR,
966 /*      agrave          aacute          acircumflex     atilde          */
967 CASE_PRINT_GR,
968 CASE_PRINT_GR,
969 CASE_PRINT_GR,
970 CASE_PRINT_GR,
971 /*      adiaeresis      aring           ae              ccedilla        */
972 CASE_PRINT_GR,
973 CASE_PRINT_GR,
974 CASE_PRINT_GR,
975 CASE_PRINT_GR,
976 /*      egrave          eacute          ecircumflex     ediaeresis      */
977 CASE_PRINT_GR,
978 CASE_PRINT_GR,
979 CASE_PRINT_GR,
980 CASE_PRINT_GR,
981 /*      igrave          iacute          icircumflex     idiaeresis      */
982 CASE_PRINT_GR,
983 CASE_PRINT_GR,
984 CASE_PRINT_GR,
985 CASE_PRINT_GR,
986 /*      eth             ntilde          ograve          oacute          */
987 CASE_PRINT_GR,
988 CASE_PRINT_GR,
989 CASE_PRINT_GR,
990 CASE_PRINT_GR,
991 /*      ocircumflex     otilde          odiaeresis      division        */
992 CASE_PRINT_GR,
993 CASE_PRINT_GR,
994 CASE_PRINT_GR,
995 CASE_PRINT_GR,
996 /*      oslash          ugrave          uacute          ucircumflex     */
997 CASE_PRINT_GR,
998 CASE_PRINT_GR,
999 CASE_PRINT_GR,
1000 CASE_PRINT_GR,
1001 /*      udiaeresis      yacute          thorn           ydiaeresis      */
1002 CASE_PRINT_GR,
1003 CASE_PRINT_GR,
1004 CASE_PRINT_GR,
1005 CASE_PRINT_GR,
1006 };
1007 
1008 int csitable[] =		/* ESC [ */
1009 {
1010 /*	NUL		SOH		STX		ETX	*/
1011 CASE_IGNORE,
1012 CASE_IGNORE,
1013 CASE_IGNORE,
1014 CASE_IGNORE,
1015 /*	EOT		ENQ		ACK		BEL	*/
1016 CASE_IGNORE,
1017 CASE_IGNORE,
1018 CASE_IGNORE,
1019 CASE_BELL,
1020 /*	BS		HT		NL		VT	*/
1021 CASE_BS,
1022 CASE_TAB,
1023 CASE_VMOT,
1024 CASE_VMOT,
1025 /*	NP		CR		SO		SI	*/
1026 CASE_VMOT,
1027 CASE_CR,
1028 CASE_SO,
1029 CASE_SI,
1030 /*	DLE		DC1		DC2		DC3	*/
1031 CASE_IGNORE,
1032 CASE_IGNORE,
1033 CASE_IGNORE,
1034 CASE_IGNORE,
1035 /*	DC4		NAK		SYN		ETB	*/
1036 CASE_IGNORE,
1037 CASE_IGNORE,
1038 CASE_IGNORE,
1039 CASE_IGNORE,
1040 /*	CAN		EM		SUB		ESC	*/
1041 CASE_IGNORE,
1042 CASE_IGNORE,
1043 CASE_IGNORE,
1044 CASE_ESC,
1045 /*	FS		GS		RS		US	*/
1046 CASE_IGNORE,
1047 CASE_IGNORE,
1048 CASE_IGNORE,
1049 CASE_IGNORE,
1050 /*	SP		!		"		#	*/
1051 CASE_ESC_IGNORE,
1052 CASE_ESC_IGNORE,
1053 CASE_ESC_IGNORE,
1054 CASE_ESC_IGNORE,
1055 /*	$		%		&		'	*/
1056 CASE_ESC_IGNORE,
1057 CASE_ESC_IGNORE,
1058 CASE_ESC_IGNORE,
1059 CASE_ESC_IGNORE,
1060 /*	(		)		*		+	*/
1061 CASE_ESC_IGNORE,
1062 CASE_ESC_IGNORE,
1063 CASE_ESC_IGNORE,
1064 CASE_ESC_IGNORE,
1065 /*	,		-		.		/	*/
1066 CASE_ESC_IGNORE,
1067 CASE_ESC_IGNORE,
1068 CASE_ESC_IGNORE,
1069 CASE_ESC_IGNORE,
1070 /*	0		1		2		3	*/
1071 CASE_ESC_DIGIT,
1072 CASE_ESC_DIGIT,
1073 CASE_ESC_DIGIT,
1074 CASE_ESC_DIGIT,
1075 /*	4		5		6		7	*/
1076 CASE_ESC_DIGIT,
1077 CASE_ESC_DIGIT,
1078 CASE_ESC_DIGIT,
1079 CASE_ESC_DIGIT,
1080 /*	8		9		:		;	*/
1081 CASE_ESC_DIGIT,
1082 CASE_ESC_DIGIT,
1083 CASE_IGNORE,
1084 CASE_ESC_SEMI,
1085 /*	<		=		>		?	*/
1086 CASE_IGNORE,
1087 CASE_IGNORE,
1088 CASE_IGNORE,
1089 CASE_DEC_STATE,
1090 /*	@		A		B		C	*/
1091 CASE_ICH,
1092 CASE_CUU,
1093 CASE_CUD,
1094 CASE_CUF,
1095 /*	D		E		F		G	*/
1096 CASE_CUB,
1097 CASE_GROUND_STATE,
1098 CASE_GROUND_STATE,
1099 CASE_GROUND_STATE,
1100 /*	H		I		J		K	*/
1101 CASE_CUP,
1102 CASE_GROUND_STATE,
1103 CASE_ED,
1104 CASE_EL,
1105 /*	L		M		N		O	*/
1106 CASE_IL,
1107 CASE_DL,
1108 CASE_GROUND_STATE,
1109 CASE_GROUND_STATE,
1110 /*	P		Q		R		S	*/
1111 CASE_DCH,
1112 CASE_GROUND_STATE,
1113 CASE_GROUND_STATE,
1114 CASE_GROUND_STATE,
1115 /*	T		U		V		W	*/
1116 CASE_GROUND_STATE,
1117 CASE_GROUND_STATE,
1118 CASE_GROUND_STATE,
1119 CASE_GROUND_STATE,
1120 /*	X		Y		Z		[	*/
1121 CASE_GROUND_STATE,
1122 CASE_GROUND_STATE,
1123 CASE_GROUND_STATE,
1124 CASE_GROUND_STATE,
1125 /*	\		]		^		_	*/
1126 CASE_GROUND_STATE,
1127 CASE_GROUND_STATE,
1128 CASE_GROUND_STATE,
1129 CASE_GROUND_STATE,
1130 /*	`		a		b		c	*/
1131 CASE_GROUND_STATE,
1132 CASE_GROUND_STATE,
1133 CASE_GROUND_STATE,
1134 CASE_GROUND_STATE,
1135 /*	d		e		f		g	*/
1136 CASE_GROUND_STATE,
1137 CASE_GROUND_STATE,
1138 CASE_CUP,
1139 CASE_GROUND_STATE,
1140 /*	h		i		j		k	*/
1141 CASE_SET,
1142 CASE_GROUND_STATE,
1143 CASE_GROUND_STATE,
1144 CASE_GROUND_STATE,
1145 /*	l		m		n		o	*/
1146 CASE_RST,
1147 CASE_SGR,
1148 CASE_CPR,
1149 CASE_GROUND_STATE,
1150 /*	p		q		r		s	*/
1151 CASE_GROUND_STATE,
1152 CASE_GROUND_STATE,
1153 CASE_DECSTBM,
1154 CASE_GROUND_STATE,
1155 /*	t		u		v		w	*/
1156 CASE_GROUND_STATE,
1157 CASE_GROUND_STATE,
1158 CASE_GROUND_STATE,
1159 CASE_GROUND_STATE,
1160 /*	x		y		z		{	*/
1161 CASE_DECREQTPARM,
1162 CASE_GROUND_STATE,
1163 CASE_GROUND_STATE,
1164 CASE_GROUND_STATE,
1165 /*	|		}		~		DEL	*/
1166 CASE_GROUND_STATE,
1167 CASE_GROUND_STATE,
1168 CASE_GROUND_STATE,
1169 CASE_GROUND_STATE,
1170 /*      0x80            0x81            0x82            0x83    */
1171 CASE_IGNORE,
1172 CASE_IGNORE,
1173 CASE_IGNORE,
1174 CASE_IGNORE,
1175 /*      0x84            0x85            0x86            0x87    */
1176 CASE_IGNORE,
1177 CASE_IGNORE,
1178 CASE_IGNORE,
1179 CASE_IGNORE,
1180 /*      0x88            0x89            0x8a            0x8b    */
1181 CASE_IGNORE,
1182 CASE_IGNORE,
1183 CASE_IGNORE,
1184 CASE_IGNORE,
1185 /*      0x8c            0x8d            0x8e            0x8f    */
1186 CASE_IGNORE,
1187 CASE_IGNORE,
1188 CASE_IGNORE,
1189 CASE_IGNORE,
1190 /*      0x90            0x91            0x92            0x93    */
1191 CASE_IGNORE,
1192 CASE_IGNORE,
1193 CASE_IGNORE,
1194 CASE_IGNORE,
1195 /*      0x94            0x95            0x96            0x97    */
1196 CASE_IGNORE,
1197 CASE_IGNORE,
1198 CASE_IGNORE,
1199 CASE_IGNORE,
1200 /*      0x99            0x99            0x9a            0x9b    */
1201 CASE_IGNORE,
1202 CASE_IGNORE,
1203 CASE_IGNORE,
1204 CASE_IGNORE,
1205 /*      0x9c            0x9d            0x9e            0x9f    */
1206 CASE_IGNORE,
1207 CASE_IGNORE,
1208 CASE_IGNORE,
1209 CASE_IGNORE,
1210 /*      nobreakspace    exclamdown      cent            sterling        */
1211 CASE_GROUND_STATE,
1212 CASE_GROUND_STATE,
1213 CASE_GROUND_STATE,
1214 CASE_GROUND_STATE,
1215 /*      currency        yen             brokenbar       section         */
1216 CASE_GROUND_STATE,
1217 CASE_GROUND_STATE,
1218 CASE_GROUND_STATE,
1219 CASE_GROUND_STATE,
1220 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
1221 CASE_GROUND_STATE,
1222 CASE_GROUND_STATE,
1223 CASE_GROUND_STATE,
1224 CASE_GROUND_STATE,
1225 /*      notsign         hyphen          registered      macron          */
1226 CASE_GROUND_STATE,
1227 CASE_GROUND_STATE,
1228 CASE_GROUND_STATE,
1229 CASE_GROUND_STATE,
1230 /*      degree          plusminus       twosuperior     threesuperior   */
1231 CASE_GROUND_STATE,
1232 CASE_GROUND_STATE,
1233 CASE_GROUND_STATE,
1234 CASE_GROUND_STATE,
1235 /*      acute           mu              paragraph       periodcentered  */
1236 CASE_GROUND_STATE,
1237 CASE_GROUND_STATE,
1238 CASE_GROUND_STATE,
1239 CASE_GROUND_STATE,
1240 /*      cedilla         onesuperior     masculine       guillemotright  */
1241 CASE_GROUND_STATE,
1242 CASE_GROUND_STATE,
1243 CASE_GROUND_STATE,
1244 CASE_GROUND_STATE,
1245 /*      onequarter      onehalf         threequarters   questiondown    */
1246 CASE_GROUND_STATE,
1247 CASE_GROUND_STATE,
1248 CASE_GROUND_STATE,
1249 CASE_GROUND_STATE,
1250 /*      Agrave          Aacute          Acircumflex     Atilde          */
1251 CASE_GROUND_STATE,
1252 CASE_GROUND_STATE,
1253 CASE_GROUND_STATE,
1254 CASE_GROUND_STATE,
1255 /*      Adiaeresis      Aring           AE              Ccedilla        */
1256 CASE_GROUND_STATE,
1257 CASE_GROUND_STATE,
1258 CASE_GROUND_STATE,
1259 CASE_GROUND_STATE,
1260 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
1261 CASE_GROUND_STATE,
1262 CASE_GROUND_STATE,
1263 CASE_GROUND_STATE,
1264 CASE_GROUND_STATE,
1265 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
1266 CASE_GROUND_STATE,
1267 CASE_GROUND_STATE,
1268 CASE_GROUND_STATE,
1269 CASE_GROUND_STATE,
1270 /*      Eth             Ntilde          Ograve          Oacute          */
1271 CASE_GROUND_STATE,
1272 CASE_GROUND_STATE,
1273 CASE_GROUND_STATE,
1274 CASE_GROUND_STATE,
1275 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
1276 CASE_GROUND_STATE,
1277 CASE_GROUND_STATE,
1278 CASE_GROUND_STATE,
1279 CASE_GROUND_STATE,
1280 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
1281 CASE_GROUND_STATE,
1282 CASE_GROUND_STATE,
1283 CASE_GROUND_STATE,
1284 CASE_GROUND_STATE,
1285 /*      Udiaeresis      Yacute          Thorn           ssharp          */
1286 CASE_GROUND_STATE,
1287 CASE_GROUND_STATE,
1288 CASE_GROUND_STATE,
1289 CASE_GROUND_STATE,
1290 /*      agrave          aacute          acircumflex     atilde          */
1291 CASE_GROUND_STATE,
1292 CASE_GROUND_STATE,
1293 CASE_GROUND_STATE,
1294 CASE_GROUND_STATE,
1295 /*      adiaeresis      aring           ae              ccedilla        */
1296 CASE_GROUND_STATE,
1297 CASE_GROUND_STATE,
1298 CASE_GROUND_STATE,
1299 CASE_GROUND_STATE,
1300 /*      egrave          eacute          ecircumflex     ediaeresis      */
1301 CASE_GROUND_STATE,
1302 CASE_GROUND_STATE,
1303 CASE_GROUND_STATE,
1304 CASE_GROUND_STATE,
1305 /*      igrave          iacute          icircumflex     idiaeresis      */
1306 CASE_GROUND_STATE,
1307 CASE_GROUND_STATE,
1308 CASE_GROUND_STATE,
1309 CASE_GROUND_STATE,
1310 /*      eth             ntilde          ograve          oacute          */
1311 CASE_GROUND_STATE,
1312 CASE_GROUND_STATE,
1313 CASE_GROUND_STATE,
1314 CASE_GROUND_STATE,
1315 /*      ocircumflex     otilde          odiaeresis      division        */
1316 CASE_GROUND_STATE,
1317 CASE_GROUND_STATE,
1318 CASE_GROUND_STATE,
1319 CASE_GROUND_STATE,
1320 /*      oslash          ugrave          uacute          ucircumflex     */
1321 CASE_GROUND_STATE,
1322 CASE_GROUND_STATE,
1323 CASE_GROUND_STATE,
1324 CASE_GROUND_STATE,
1325 /*      udiaeresis      yacute          thorn           ydiaeresis      */
1326 CASE_GROUND_STATE,
1327 CASE_GROUND_STATE,
1328 CASE_GROUND_STATE,
1329 CASE_GROUND_STATE,
1330 };
1331 
1332 int dectable[] =		/* ESC [ ? */
1333 {
1334 /*	NUL		SOH		STX		ETX	*/
1335 CASE_IGNORE,
1336 CASE_IGNORE,
1337 CASE_IGNORE,
1338 CASE_IGNORE,
1339 /*	EOT		ENQ		ACK		BEL	*/
1340 CASE_IGNORE,
1341 CASE_IGNORE,
1342 CASE_IGNORE,
1343 CASE_BELL,
1344 /*	BS		HT		NL		VT	*/
1345 CASE_BS,
1346 CASE_TAB,
1347 CASE_VMOT,
1348 CASE_VMOT,
1349 /*	NP		CR		SO		SI	*/
1350 CASE_VMOT,
1351 CASE_CR,
1352 CASE_SO,
1353 CASE_SI,
1354 /*	DLE		DC1		DC2		DC3	*/
1355 CASE_IGNORE,
1356 CASE_IGNORE,
1357 CASE_IGNORE,
1358 CASE_IGNORE,
1359 /*	DC4		NAK		SYN		ETB	*/
1360 CASE_IGNORE,
1361 CASE_IGNORE,
1362 CASE_IGNORE,
1363 CASE_IGNORE,
1364 /*	CAN		EM		SUB		ESC	*/
1365 CASE_IGNORE,
1366 CASE_IGNORE,
1367 CASE_IGNORE,
1368 CASE_ESC,
1369 /*	FS		GS		RS		US	*/
1370 CASE_IGNORE,
1371 CASE_IGNORE,
1372 CASE_IGNORE,
1373 CASE_IGNORE,
1374 /*	SP		!		"		#	*/
1375 CASE_ESC_IGNORE,
1376 CASE_ESC_IGNORE,
1377 CASE_ESC_IGNORE,
1378 CASE_ESC_IGNORE,
1379 /*	$		%		&		'	*/
1380 CASE_ESC_IGNORE,
1381 CASE_ESC_IGNORE,
1382 CASE_ESC_IGNORE,
1383 CASE_ESC_IGNORE,
1384 /*	(		)		*		+	*/
1385 CASE_ESC_IGNORE,
1386 CASE_ESC_IGNORE,
1387 CASE_ESC_IGNORE,
1388 CASE_ESC_IGNORE,
1389 /*	,		-		.		/	*/
1390 CASE_ESC_IGNORE,
1391 CASE_ESC_IGNORE,
1392 CASE_ESC_IGNORE,
1393 CASE_ESC_IGNORE,
1394 /*	0		1		2		3	*/
1395 CASE_ESC_DIGIT,
1396 CASE_ESC_DIGIT,
1397 CASE_ESC_DIGIT,
1398 CASE_ESC_DIGIT,
1399 /*	4		5		6		7	*/
1400 CASE_ESC_DIGIT,
1401 CASE_ESC_DIGIT,
1402 CASE_ESC_DIGIT,
1403 CASE_ESC_DIGIT,
1404 /*	8		9		:		;	*/
1405 CASE_ESC_DIGIT,
1406 CASE_ESC_DIGIT,
1407 CASE_IGNORE,
1408 CASE_ESC_SEMI,
1409 /*	<		=		>		?	*/
1410 CASE_GROUND_STATE,
1411 CASE_GROUND_STATE,
1412 CASE_GROUND_STATE,
1413 CASE_GROUND_STATE,
1414 /*	@		A		B		C	*/
1415 CASE_GROUND_STATE,
1416 CASE_GROUND_STATE,
1417 CASE_GROUND_STATE,
1418 CASE_GROUND_STATE,
1419 /*	D		E		F		G	*/
1420 CASE_GROUND_STATE,
1421 #ifdef STATUSLINE
1422 CASE_ERASE_STATUS,
1423 CASE_FROM_STATUS,
1424 #else /* !STATUSLINE */
1425 CASE_GROUND_STATE,
1426 CASE_GROUND_STATE,
1427 #endif /* !STATUSLINE */
1428 CASE_GROUND_STATE,
1429 /*	H		I		J		K	*/
1430 #ifdef STATUSLINE
1431 CASE_HIDE_STATUS,
1432 #else /* !STATUSLINE */
1433 CASE_GROUND_STATE,
1434 #endif /* !STATUSLINE */
1435 CASE_GROUND_STATE,
1436 CASE_GROUND_STATE,
1437 CASE_GROUND_STATE,
1438 /*	L		M		N		O	*/
1439 CASE_GROUND_STATE,
1440 CASE_GROUND_STATE,
1441 CASE_GROUND_STATE,
1442 CASE_GROUND_STATE,
1443 /*	P		Q		R		S	*/
1444 CASE_GROUND_STATE,
1445 CASE_GROUND_STATE,
1446 CASE_GROUND_STATE,
1447 #ifdef STATUSLINE
1448 CASE_SHOW_STATUS,
1449 #else /* !STATUSLINE */
1450 CASE_GROUND_STATE,
1451 #endif /* !STATUSLINE */
1452 /*	T		U		V		W	*/
1453 #ifdef STATUSLINE
1454 CASE_TO_STATUS,
1455 #else /* !STATUSLINE */
1456 CASE_GROUND_STATE,
1457 #endif /* !STATUSLINE */
1458 CASE_GROUND_STATE,
1459 CASE_GROUND_STATE,
1460 CASE_GROUND_STATE,
1461 /*	X		Y		Z		[	*/
1462 CASE_GROUND_STATE,
1463 CASE_GROUND_STATE,
1464 CASE_GROUND_STATE,
1465 CASE_GROUND_STATE,
1466 /*	\		]		^		_	*/
1467 CASE_GROUND_STATE,
1468 CASE_GROUND_STATE,
1469 CASE_GROUND_STATE,
1470 CASE_GROUND_STATE,
1471 /*	`		a		b		c	*/
1472 CASE_GROUND_STATE,
1473 CASE_GROUND_STATE,
1474 CASE_GROUND_STATE,
1475 CASE_GROUND_STATE,
1476 /*	d		e		f		g	*/
1477 CASE_GROUND_STATE,
1478 CASE_GROUND_STATE,
1479 CASE_GROUND_STATE,
1480 CASE_GROUND_STATE,
1481 /*	h		i		j		k	*/
1482 CASE_DECSET,
1483 CASE_GROUND_STATE,
1484 CASE_GROUND_STATE,
1485 CASE_GROUND_STATE,
1486 /*	l		m		n		o	*/
1487 CASE_DECRST,
1488 CASE_GROUND_STATE,
1489 CASE_GROUND_STATE,
1490 CASE_GROUND_STATE,
1491 /*	p		q		r		s	*/
1492 CASE_GROUND_STATE,
1493 CASE_GROUND_STATE,
1494 CASE_GROUND_STATE,
1495 CASE_GROUND_STATE,
1496 /*	t		u		v		w	*/
1497 CASE_GROUND_STATE,
1498 CASE_GROUND_STATE,
1499 CASE_GROUND_STATE,
1500 CASE_GROUND_STATE,
1501 /*	x		y		z		{	*/
1502 CASE_GROUND_STATE,
1503 CASE_GROUND_STATE,
1504 CASE_GROUND_STATE,
1505 CASE_GROUND_STATE,
1506 /*	|		}		~		DEL	*/
1507 CASE_GROUND_STATE,
1508 CASE_GROUND_STATE,
1509 CASE_GROUND_STATE,
1510 CASE_GROUND_STATE,
1511 /*      0x80            0x81            0x82            0x83    */
1512 CASE_IGNORE,
1513 CASE_IGNORE,
1514 CASE_IGNORE,
1515 CASE_IGNORE,
1516 /*      0x84            0x85            0x86            0x87    */
1517 CASE_IGNORE,
1518 CASE_IGNORE,
1519 CASE_IGNORE,
1520 CASE_IGNORE,
1521 /*      0x88            0x89            0x8a            0x8b    */
1522 CASE_IGNORE,
1523 CASE_IGNORE,
1524 CASE_IGNORE,
1525 CASE_IGNORE,
1526 /*      0x8c            0x8d            0x8e            0x8f    */
1527 CASE_IGNORE,
1528 CASE_IGNORE,
1529 CASE_IGNORE,
1530 CASE_IGNORE,
1531 /*      0x90            0x91            0x92            0x93    */
1532 CASE_IGNORE,
1533 CASE_IGNORE,
1534 CASE_IGNORE,
1535 CASE_IGNORE,
1536 /*      0x94            0x95            0x96            0x97    */
1537 CASE_IGNORE,
1538 CASE_IGNORE,
1539 CASE_IGNORE,
1540 CASE_IGNORE,
1541 /*      0x99            0x99            0x9a            0x9b    */
1542 CASE_IGNORE,
1543 CASE_IGNORE,
1544 CASE_IGNORE,
1545 CASE_IGNORE,
1546 /*      0x9c            0x9d            0x9e            0x9f    */
1547 CASE_IGNORE,
1548 CASE_IGNORE,
1549 CASE_IGNORE,
1550 CASE_IGNORE,
1551 /*      nobreakspace    exclamdown      cent            sterling        */
1552 CASE_GROUND_STATE,
1553 CASE_GROUND_STATE,
1554 CASE_GROUND_STATE,
1555 CASE_GROUND_STATE,
1556 /*      currency        yen             brokenbar       section         */
1557 CASE_GROUND_STATE,
1558 CASE_GROUND_STATE,
1559 CASE_GROUND_STATE,
1560 CASE_GROUND_STATE,
1561 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
1562 CASE_GROUND_STATE,
1563 CASE_GROUND_STATE,
1564 CASE_GROUND_STATE,
1565 CASE_GROUND_STATE,
1566 /*      notsign         hyphen          registered      macron          */
1567 CASE_GROUND_STATE,
1568 CASE_GROUND_STATE,
1569 CASE_GROUND_STATE,
1570 CASE_GROUND_STATE,
1571 /*      degree          plusminus       twosuperior     threesuperior   */
1572 CASE_GROUND_STATE,
1573 CASE_GROUND_STATE,
1574 CASE_GROUND_STATE,
1575 CASE_GROUND_STATE,
1576 /*      acute           mu              paragraph       periodcentered  */
1577 CASE_GROUND_STATE,
1578 CASE_GROUND_STATE,
1579 CASE_GROUND_STATE,
1580 CASE_GROUND_STATE,
1581 /*      cedilla         onesuperior     masculine       guillemotright  */
1582 CASE_GROUND_STATE,
1583 CASE_GROUND_STATE,
1584 CASE_GROUND_STATE,
1585 CASE_GROUND_STATE,
1586 /*      onequarter      onehalf         threequarters   questiondown    */
1587 CASE_GROUND_STATE,
1588 CASE_GROUND_STATE,
1589 CASE_GROUND_STATE,
1590 CASE_GROUND_STATE,
1591 /*      Agrave          Aacute          Acircumflex     Atilde          */
1592 CASE_GROUND_STATE,
1593 CASE_GROUND_STATE,
1594 CASE_GROUND_STATE,
1595 CASE_GROUND_STATE,
1596 /*      Adiaeresis      Aring           AE              Ccedilla        */
1597 CASE_GROUND_STATE,
1598 CASE_GROUND_STATE,
1599 CASE_GROUND_STATE,
1600 CASE_GROUND_STATE,
1601 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
1602 CASE_GROUND_STATE,
1603 CASE_GROUND_STATE,
1604 CASE_GROUND_STATE,
1605 CASE_GROUND_STATE,
1606 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
1607 CASE_GROUND_STATE,
1608 CASE_GROUND_STATE,
1609 CASE_GROUND_STATE,
1610 CASE_GROUND_STATE,
1611 /*      Eth             Ntilde          Ograve          Oacute          */
1612 CASE_GROUND_STATE,
1613 CASE_GROUND_STATE,
1614 CASE_GROUND_STATE,
1615 CASE_GROUND_STATE,
1616 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
1617 CASE_GROUND_STATE,
1618 CASE_GROUND_STATE,
1619 CASE_GROUND_STATE,
1620 CASE_GROUND_STATE,
1621 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
1622 CASE_GROUND_STATE,
1623 CASE_GROUND_STATE,
1624 CASE_GROUND_STATE,
1625 CASE_GROUND_STATE,
1626 /*      Udiaeresis      Yacute          Thorn           ssharp          */
1627 CASE_GROUND_STATE,
1628 CASE_GROUND_STATE,
1629 CASE_GROUND_STATE,
1630 CASE_GROUND_STATE,
1631 /*      agrave          aacute          acircumflex     atilde          */
1632 CASE_GROUND_STATE,
1633 CASE_GROUND_STATE,
1634 CASE_GROUND_STATE,
1635 CASE_GROUND_STATE,
1636 /*      adiaeresis      aring           ae              ccedilla        */
1637 CASE_GROUND_STATE,
1638 CASE_GROUND_STATE,
1639 CASE_GROUND_STATE,
1640 CASE_GROUND_STATE,
1641 /*      egrave          eacute          ecircumflex     ediaeresis      */
1642 CASE_GROUND_STATE,
1643 CASE_GROUND_STATE,
1644 CASE_GROUND_STATE,
1645 CASE_GROUND_STATE,
1646 /*      igrave          iacute          icircumflex     idiaeresis      */
1647 CASE_GROUND_STATE,
1648 CASE_GROUND_STATE,
1649 CASE_GROUND_STATE,
1650 CASE_GROUND_STATE,
1651 /*      eth             ntilde          ograve          oacute          */
1652 CASE_GROUND_STATE,
1653 CASE_GROUND_STATE,
1654 CASE_GROUND_STATE,
1655 CASE_GROUND_STATE,
1656 /*      ocircumflex     otilde          odiaeresis      division        */
1657 CASE_GROUND_STATE,
1658 CASE_GROUND_STATE,
1659 CASE_GROUND_STATE,
1660 CASE_GROUND_STATE,
1661 /*      oslash          ugrave          uacute          ucircumflex     */
1662 CASE_GROUND_STATE,
1663 CASE_GROUND_STATE,
1664 CASE_GROUND_STATE,
1665 CASE_GROUND_STATE,
1666 /*      udiaeresis      yacute          thorn           ydiaeresis      */
1667 CASE_GROUND_STATE,
1668 CASE_GROUND_STATE,
1669 CASE_GROUND_STATE,
1670 CASE_GROUND_STATE,
1671 };
1672 
1673 int eigtable[] =		/* CASE_ESC_IGNORE */
1674 {
1675 /*	NUL		SOH		STX		ETX	*/
1676 CASE_IGNORE,
1677 CASE_IGNORE,
1678 CASE_IGNORE,
1679 CASE_IGNORE,
1680 /*	EOT		ENQ		ACK		BEL	*/
1681 CASE_IGNORE,
1682 CASE_IGNORE,
1683 CASE_IGNORE,
1684 CASE_BELL,
1685 /*	BS		HT		NL		VT	*/
1686 CASE_BS,
1687 CASE_TAB,
1688 CASE_VMOT,
1689 CASE_VMOT,
1690 /*	NP		CR		SO		SI	*/
1691 CASE_VMOT,
1692 CASE_CR,
1693 CASE_SO,
1694 CASE_SI,
1695 /*	DLE		DC1		DC2		DC3	*/
1696 CASE_IGNORE,
1697 CASE_IGNORE,
1698 CASE_IGNORE,
1699 CASE_IGNORE,
1700 /*	DC4		NAK		SYN		ETB	*/
1701 CASE_IGNORE,
1702 CASE_IGNORE,
1703 CASE_IGNORE,
1704 CASE_IGNORE,
1705 /*	CAN		EM		SUB		ESC	*/
1706 CASE_IGNORE,
1707 CASE_IGNORE,
1708 CASE_IGNORE,
1709 CASE_ESC,
1710 /*	FS		GS		RS		US	*/
1711 CASE_IGNORE,
1712 CASE_IGNORE,
1713 CASE_IGNORE,
1714 CASE_IGNORE,
1715 /*	SP		!		"		#	*/
1716 CASE_IGNORE,
1717 CASE_IGNORE,
1718 CASE_IGNORE,
1719 CASE_IGNORE,
1720 /*	$		%		&		'	*/
1721 CASE_IGNORE,
1722 CASE_IGNORE,
1723 CASE_IGNORE,
1724 CASE_IGNORE,
1725 /*	(		)		*		+	*/
1726 CASE_IGNORE,
1727 CASE_IGNORE,
1728 CASE_IGNORE,
1729 CASE_IGNORE,
1730 /*	,
1731 	-		.		/	*/
1732 CASE_IGNORE,
1733 CASE_IGNORE,
1734 CASE_IGNORE,
1735 CASE_IGNORE,
1736 /*	0		1		2		3	*/
1737 CASE_GROUND_STATE,
1738 CASE_GROUND_STATE,
1739 CASE_GROUND_STATE,
1740 CASE_GROUND_STATE,
1741 /*	4		5		6		7	*/
1742 CASE_GROUND_STATE,
1743 CASE_GROUND_STATE,
1744 CASE_GROUND_STATE,
1745 CASE_GROUND_STATE,
1746 /*	8		9		:		;	*/
1747 CASE_GROUND_STATE,
1748 CASE_GROUND_STATE,
1749 CASE_GROUND_STATE,
1750 CASE_GROUND_STATE,
1751 /*	<		=		>		?	*/
1752 CASE_GROUND_STATE,
1753 CASE_GROUND_STATE,
1754 CASE_GROUND_STATE,
1755 CASE_GROUND_STATE,
1756 /*	@		A		B		C	*/
1757 CASE_GROUND_STATE,
1758 CASE_GROUND_STATE,
1759 CASE_GROUND_STATE,
1760 CASE_GROUND_STATE,
1761 /*	D		E		F		G	*/
1762 CASE_GROUND_STATE,
1763 CASE_GROUND_STATE,
1764 CASE_GROUND_STATE,
1765 CASE_GROUND_STATE,
1766 /*	H		I		J		K	*/
1767 CASE_GROUND_STATE,
1768 CASE_GROUND_STATE,
1769 CASE_GROUND_STATE,
1770 CASE_GROUND_STATE,
1771 /*	L		M		N		O	*/
1772 CASE_GROUND_STATE,
1773 CASE_GROUND_STATE,
1774 CASE_GROUND_STATE,
1775 CASE_GROUND_STATE,
1776 /*	P		Q		R		S	*/
1777 CASE_GROUND_STATE,
1778 CASE_GROUND_STATE,
1779 CASE_GROUND_STATE,
1780 CASE_GROUND_STATE,
1781 /*	T		U		V		W	*/
1782 CASE_GROUND_STATE,
1783 CASE_GROUND_STATE,
1784 CASE_GROUND_STATE,
1785 CASE_GROUND_STATE,
1786 /*	X		Y		Z		[	*/
1787 CASE_GROUND_STATE,
1788 CASE_GROUND_STATE,
1789 CASE_GROUND_STATE,
1790 CASE_GROUND_STATE,
1791 /*	\		]		^		_	*/
1792 CASE_GROUND_STATE,
1793 CASE_GROUND_STATE,
1794 CASE_GROUND_STATE,
1795 CASE_GROUND_STATE,
1796 /*	`		a		b		c	*/
1797 CASE_GROUND_STATE,
1798 CASE_GROUND_STATE,
1799 CASE_GROUND_STATE,
1800 CASE_GROUND_STATE,
1801 /*	d		e		f		g	*/
1802 CASE_GROUND_STATE,
1803 CASE_GROUND_STATE,
1804 CASE_GROUND_STATE,
1805 CASE_GROUND_STATE,
1806 /*	h		i		j		k	*/
1807 CASE_GROUND_STATE,
1808 CASE_GROUND_STATE,
1809 CASE_GROUND_STATE,
1810 CASE_GROUND_STATE,
1811 /*	l		m		n		o	*/
1812 CASE_GROUND_STATE,
1813 CASE_GROUND_STATE,
1814 CASE_GROUND_STATE,
1815 CASE_GROUND_STATE,
1816 /*	p		q		r		s	*/
1817 CASE_GROUND_STATE,
1818 CASE_GROUND_STATE,
1819 CASE_GROUND_STATE,
1820 CASE_GROUND_STATE,
1821 /*	t		u		v		w	*/
1822 CASE_GROUND_STATE,
1823 CASE_GROUND_STATE,
1824 CASE_GROUND_STATE,
1825 CASE_GROUND_STATE,
1826 /*	x		y		z		{	*/
1827 CASE_GROUND_STATE,
1828 CASE_GROUND_STATE,
1829 CASE_GROUND_STATE,
1830 CASE_GROUND_STATE,
1831 /*	|		}		~		DEL	*/
1832 CASE_GROUND_STATE,
1833 CASE_GROUND_STATE,
1834 CASE_GROUND_STATE,
1835 CASE_GROUND_STATE,
1836 /*      0x80            0x81            0x82            0x83    */
1837 CASE_IGNORE,
1838 CASE_IGNORE,
1839 CASE_IGNORE,
1840 CASE_IGNORE,
1841 /*      0x84            0x85            0x86            0x87    */
1842 CASE_IGNORE,
1843 CASE_IGNORE,
1844 CASE_IGNORE,
1845 CASE_IGNORE,
1846 /*      0x88            0x89            0x8a            0x8b    */
1847 CASE_IGNORE,
1848 CASE_IGNORE,
1849 CASE_IGNORE,
1850 CASE_IGNORE,
1851 /*      0x8c            0x8d            0x8e            0x8f    */
1852 CASE_IGNORE,
1853 CASE_IGNORE,
1854 CASE_IGNORE,
1855 CASE_IGNORE,
1856 /*      0x90            0x91            0x92            0x93    */
1857 CASE_IGNORE,
1858 CASE_IGNORE,
1859 CASE_IGNORE,
1860 CASE_IGNORE,
1861 /*      0x94            0x95            0x96            0x97    */
1862 CASE_IGNORE,
1863 CASE_IGNORE,
1864 CASE_IGNORE,
1865 CASE_IGNORE,
1866 /*      0x99            0x99            0x9a            0x9b    */
1867 CASE_IGNORE,
1868 CASE_IGNORE,
1869 CASE_IGNORE,
1870 CASE_IGNORE,
1871 /*      0x9c            0x9d            0x9e            0x9f    */
1872 CASE_IGNORE,
1873 CASE_IGNORE,
1874 CASE_IGNORE,
1875 CASE_IGNORE,
1876 /*      nobreakspace    exclamdown      cent            sterling        */
1877 CASE_GROUND_STATE,
1878 CASE_GROUND_STATE,
1879 CASE_GROUND_STATE,
1880 CASE_GROUND_STATE,
1881 /*      currency        yen             brokenbar       section         */
1882 CASE_GROUND_STATE,
1883 CASE_GROUND_STATE,
1884 CASE_GROUND_STATE,
1885 CASE_GROUND_STATE,
1886 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
1887 CASE_GROUND_STATE,
1888 CASE_GROUND_STATE,
1889 CASE_GROUND_STATE,
1890 CASE_GROUND_STATE,
1891 /*      notsign         hyphen          registered      macron          */
1892 CASE_GROUND_STATE,
1893 CASE_GROUND_STATE,
1894 CASE_GROUND_STATE,
1895 CASE_GROUND_STATE,
1896 /*      degree          plusminus       twosuperior     threesuperior   */
1897 CASE_GROUND_STATE,
1898 CASE_GROUND_STATE,
1899 CASE_GROUND_STATE,
1900 CASE_GROUND_STATE,
1901 /*      acute           mu              paragraph       periodcentered  */
1902 CASE_GROUND_STATE,
1903 CASE_GROUND_STATE,
1904 CASE_GROUND_STATE,
1905 CASE_GROUND_STATE,
1906 /*      cedilla         onesuperior     masculine       guillemotright  */
1907 CASE_GROUND_STATE,
1908 CASE_GROUND_STATE,
1909 CASE_GROUND_STATE,
1910 CASE_GROUND_STATE,
1911 /*      onequarter      onehalf         threequarters   questiondown    */
1912 CASE_GROUND_STATE,
1913 CASE_GROUND_STATE,
1914 CASE_GROUND_STATE,
1915 CASE_GROUND_STATE,
1916 /*      Agrave          Aacute          Acircumflex     Atilde          */
1917 CASE_GROUND_STATE,
1918 CASE_GROUND_STATE,
1919 CASE_GROUND_STATE,
1920 CASE_GROUND_STATE,
1921 /*      Adiaeresis      Aring           AE              Ccedilla        */
1922 CASE_GROUND_STATE,
1923 CASE_GROUND_STATE,
1924 CASE_GROUND_STATE,
1925 CASE_GROUND_STATE,
1926 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
1927 CASE_GROUND_STATE,
1928 CASE_GROUND_STATE,
1929 CASE_GROUND_STATE,
1930 CASE_GROUND_STATE,
1931 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
1932 CASE_GROUND_STATE,
1933 CASE_GROUND_STATE,
1934 CASE_GROUND_STATE,
1935 CASE_GROUND_STATE,
1936 /*      Eth             Ntilde          Ograve          Oacute          */
1937 CASE_GROUND_STATE,
1938 CASE_GROUND_STATE,
1939 CASE_GROUND_STATE,
1940 CASE_GROUND_STATE,
1941 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
1942 CASE_GROUND_STATE,
1943 CASE_GROUND_STATE,
1944 CASE_GROUND_STATE,
1945 CASE_GROUND_STATE,
1946 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
1947 CASE_GROUND_STATE,
1948 CASE_GROUND_STATE,
1949 CASE_GROUND_STATE,
1950 CASE_GROUND_STATE,
1951 /*      Udiaeresis      Yacute          Thorn           ssharp          */
1952 CASE_GROUND_STATE,
1953 CASE_GROUND_STATE,
1954 CASE_GROUND_STATE,
1955 CASE_GROUND_STATE,
1956 /*      agrave          aacute          acircumflex     atilde          */
1957 CASE_GROUND_STATE,
1958 CASE_GROUND_STATE,
1959 CASE_GROUND_STATE,
1960 CASE_GROUND_STATE,
1961 /*      adiaeresis      aring           ae              ccedilla        */
1962 CASE_GROUND_STATE,
1963 CASE_GROUND_STATE,
1964 CASE_GROUND_STATE,
1965 CASE_GROUND_STATE,
1966 /*      egrave          eacute          ecircumflex     ediaeresis      */
1967 CASE_GROUND_STATE,
1968 CASE_GROUND_STATE,
1969 CASE_GROUND_STATE,
1970 CASE_GROUND_STATE,
1971 /*      igrave          iacute          icircumflex     idiaeresis      */
1972 CASE_GROUND_STATE,
1973 CASE_GROUND_STATE,
1974 CASE_GROUND_STATE,
1975 CASE_GROUND_STATE,
1976 /*      eth             ntilde          ograve          oacute          */
1977 CASE_GROUND_STATE,
1978 CASE_GROUND_STATE,
1979 CASE_GROUND_STATE,
1980 CASE_GROUND_STATE,
1981 /*      ocircumflex     otilde          odiaeresis      division        */
1982 CASE_GROUND_STATE,
1983 CASE_GROUND_STATE,
1984 CASE_GROUND_STATE,
1985 CASE_GROUND_STATE,
1986 /*      oslash          ugrave          uacute          ucircumflex     */
1987 CASE_GROUND_STATE,
1988 CASE_GROUND_STATE,
1989 CASE_GROUND_STATE,
1990 CASE_GROUND_STATE,
1991 /*      udiaeresis      yacute          thorn           ydiaeresis      */
1992 CASE_GROUND_STATE,
1993 CASE_GROUND_STATE,
1994 CASE_GROUND_STATE,
1995 CASE_GROUND_STATE,
1996 };
1997 
1998 int esctable[] =		/* ESC */
1999 {
2000 /*	NUL		SOH		STX		ETX	*/
2001 CASE_IGNORE,
2002 CASE_IGNORE,
2003 CASE_IGNORE,
2004 CASE_IGNORE,
2005 /*	EOT		ENQ		ACK		BEL	*/
2006 CASE_IGNORE,
2007 CASE_IGNORE,
2008 CASE_IGNORE,
2009 CASE_BELL,
2010 /*	BS		HT		NL		VT	*/
2011 CASE_BS,
2012 CASE_TAB,
2013 CASE_LF,
2014 CASE_LF, /*CASE_UP,*/
2015 /*	NP		CR		SO		SI	*/
2016 CASE_LF, /*CASE_IGNORE,*/
2017 CASE_CR,
2018 CASE_SO,
2019 CASE_SI,
2020 /*	DLE		DC1		DC2		DC3	*/
2021 CASE_IGNORE,
2022 CASE_IGNORE,
2023 CASE_IGNORE,
2024 CASE_IGNORE,
2025 /*	DC4		NAK		SYN		ETB	*/
2026 CASE_IGNORE,
2027 CASE_IGNORE,
2028 CASE_IGNORE,
2029 CASE_IGNORE,
2030 /*	CAN		EM		SUB		ESC	*/
2031 CASE_IGNORE,
2032 CASE_IGNORE,
2033 CASE_IGNORE,
2034 CASE_ESC,
2035 /*	FS		GS		RS		US	*/
2036 CASE_IGNORE,
2037 CASE_IGNORE,
2038 CASE_IGNORE,
2039 CASE_IGNORE,
2040 /*	SP		!		"		#	*/
2041 CASE_ESC_IGNORE,
2042 CASE_ESC_IGNORE,
2043 CASE_ESC_IGNORE,
2044 CASE_SCR_STATE,
2045 /*	$		%		&		'	*/
2046 #ifdef USE_ISO2022
2047 CASE_MBCS,
2048 #else /* !USE_ISO2022 */
2049 CASE_ESC_IGNORE,
2050 #endif /* !USE_ISO2022 */
2051 CASE_ESC_IGNORE,
2052 CASE_ESC_IGNORE,
2053 CASE_ESC_IGNORE,
2054 /*	(		)		*		+	*/
2055 #ifdef USE_ISO2022
2056 CASE_SCS_STATE,
2057 CASE_SCS_STATE,
2058 CASE_SCS_STATE,
2059 CASE_SCS_STATE,
2060 #else /* !USE_ISO2022 */
2061 CASE_SCS0_STATE,
2062 CASE_SCS1_STATE,
2063 CASE_SCS2_STATE,
2064 CASE_SCS3_STATE,
2065 #endif /* !USE_ISO2022 */
2066 /*	,		-		.		/	*/
2067 #ifdef USE_ISO2022
2068 CASE_SCS_STATE,	/* not defined in ISO2022 but used in Mule */
2069 CASE_SCS_STATE,
2070 CASE_SCS_STATE,
2071 CASE_SCS_STATE,
2072 #else /* !USE_ISO2022 */
2073 CASE_ESC_IGNORE,
2074 CASE_ESC_IGNORE,
2075 CASE_ESC_IGNORE,
2076 CASE_ESC_IGNORE,
2077 #endif /* !USE_ISO2022 */
2078 /*	0		1		2		3	*/
2079 CASE_GROUND_STATE,
2080 CASE_GROUND_STATE,
2081 CASE_GROUND_STATE,
2082 CASE_GROUND_STATE,
2083 /*	4		5		6		7	*/
2084 CASE_GROUND_STATE,
2085 CASE_GROUND_STATE,
2086 CASE_GROUND_STATE,
2087 CASE_DECSC,
2088 /*	8		9		:		;	*/
2089 CASE_DECRC,
2090 CASE_GROUND_STATE,
2091 CASE_GROUND_STATE,
2092 CASE_GROUND_STATE,
2093 /*	<		=		>		?	*/
2094 CASE_GROUND_STATE,
2095 CASE_GROUND_STATE,
2096 CASE_GROUND_STATE,
2097 CASE_GROUND_STATE,
2098 /*	@		A		B		C	*/
2099 CASE_GROUND_STATE,
2100 CASE_GROUND_STATE,
2101 CASE_GROUND_STATE,
2102 CASE_GROUND_STATE,
2103 /*	D		E		F		G	*/
2104 CASE_GROUND_STATE,
2105 CASE_GROUND_STATE,
2106 CASE_GROUND_STATE,
2107 CASE_GROUND_STATE,
2108 /*	H		I		J		K	*/
2109 CASE_HTS,
2110 CASE_GROUND_STATE,
2111 CASE_GROUND_STATE,
2112 CASE_GROUND_STATE,
2113 /*	L		M		N		O	*/
2114 CASE_GROUND_STATE,
2115 CASE_RI,
2116 CASE_SS2,
2117 CASE_SS3,
2118 /*	P		Q		R		S	*/
2119 CASE_IGNORE_STATE,
2120 CASE_GROUND_STATE,
2121 CASE_GROUND_STATE,
2122 CASE_GROUND_STATE,
2123 /*	T		U		V		W	*/
2124 CASE_XTERM_TITLE,
2125 CASE_GROUND_STATE,
2126 CASE_GROUND_STATE,
2127 CASE_GROUND_STATE,
2128 /*	X		Y		Z		[	*/
2129 CASE_GROUND_STATE,
2130 CASE_GROUND_STATE,
2131 CASE_GROUND_STATE,
2132 CASE_CSI_STATE,
2133 /*	\		]		^		_	*/
2134 CASE_GROUND_STATE,
2135 CASE_OSC,
2136 CASE_IGNORE_STATE,
2137 CASE_IGNORE_STATE,
2138 /*	`		a		b		c	*/
2139 CASE_GROUND_STATE,
2140 CASE_GROUND_STATE,
2141 CASE_GROUND_STATE,
2142 CASE_RIS,
2143 /*	d		e		f		g	*/
2144 CASE_GROUND_STATE,
2145 CASE_GROUND_STATE,
2146 CASE_GROUND_STATE,
2147 CASE_GROUND_STATE,
2148 /*	h		i		j		k	*/
2149 CASE_GROUND_STATE,
2150 CASE_GROUND_STATE,
2151 CASE_GROUND_STATE,
2152 CASE_GROUND_STATE,
2153 /*	l		m		n		o	*/
2154 CASE_GROUND_STATE,
2155 CASE_GROUND_STATE,
2156 CASE_LS2,
2157 CASE_LS3,
2158 /*	p		q		r		s	*/
2159 CASE_GROUND_STATE,
2160 CASE_GROUND_STATE,
2161 CASE_GROUND_STATE,
2162 CASE_GROUND_STATE,
2163 /*	t		u		v		w	*/
2164 CASE_GROUND_STATE,
2165 CASE_GROUND_STATE,
2166 CASE_GROUND_STATE,
2167 CASE_GROUND_STATE,
2168 /*	x		y		z		{	*/
2169 CASE_GROUND_STATE,
2170 CASE_GROUND_STATE,
2171 CASE_GROUND_STATE,
2172 CASE_GROUND_STATE,
2173 /*	|		}		~		DEL	*/
2174 CASE_LS3R,
2175 CASE_LS2R,
2176 CASE_LS1R,
2177 CASE_GROUND_STATE,
2178 /*      0x80            0x81            0x82            0x83    */
2179 CASE_IGNORE,
2180 CASE_IGNORE,
2181 CASE_IGNORE,
2182 CASE_IGNORE,
2183 /*      0x84            0x85            0x86            0x87    */
2184 CASE_IGNORE,
2185 CASE_IGNORE,
2186 CASE_IGNORE,
2187 CASE_IGNORE,
2188 /*      0x88            0x89            0x8a            0x8b    */
2189 CASE_IGNORE,
2190 CASE_IGNORE,
2191 CASE_IGNORE,
2192 CASE_IGNORE,
2193 /*      0x8c            0x8d            0x8e            0x8f    */
2194 CASE_IGNORE,
2195 CASE_IGNORE,
2196 CASE_IGNORE,
2197 CASE_IGNORE,
2198 /*      0x90            0x91            0x92            0x93    */
2199 CASE_IGNORE,
2200 CASE_IGNORE,
2201 CASE_IGNORE,
2202 CASE_IGNORE,
2203 /*      0x94            0x95            0x96            0x97    */
2204 CASE_IGNORE,
2205 CASE_IGNORE,
2206 CASE_IGNORE,
2207 CASE_IGNORE,
2208 /*      0x99            0x99            0x9a            0x9b    */
2209 CASE_IGNORE,
2210 CASE_IGNORE,
2211 CASE_IGNORE,
2212 CASE_IGNORE,
2213 /*      0x9c            0x9d            0x9e            0x9f    */
2214 CASE_IGNORE,
2215 CASE_IGNORE,
2216 CASE_IGNORE,
2217 CASE_IGNORE,
2218 /*      nobreakspace    exclamdown      cent            sterling        */
2219 CASE_GROUND_STATE,
2220 CASE_GROUND_STATE,
2221 CASE_GROUND_STATE,
2222 CASE_GROUND_STATE,
2223 /*      currency        yen             brokenbar       section         */
2224 CASE_GROUND_STATE,
2225 CASE_GROUND_STATE,
2226 CASE_GROUND_STATE,
2227 CASE_GROUND_STATE,
2228 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
2229 CASE_GROUND_STATE,
2230 CASE_GROUND_STATE,
2231 CASE_GROUND_STATE,
2232 CASE_GROUND_STATE,
2233 /*      notsign         hyphen          registered      macron          */
2234 CASE_GROUND_STATE,
2235 CASE_GROUND_STATE,
2236 CASE_GROUND_STATE,
2237 CASE_GROUND_STATE,
2238 /*      degree          plusminus       twosuperior     threesuperior   */
2239 CASE_GROUND_STATE,
2240 CASE_GROUND_STATE,
2241 CASE_GROUND_STATE,
2242 CASE_GROUND_STATE,
2243 /*      acute           mu              paragraph       periodcentered  */
2244 CASE_GROUND_STATE,
2245 CASE_GROUND_STATE,
2246 CASE_GROUND_STATE,
2247 CASE_GROUND_STATE,
2248 /*      cedilla         onesuperior     masculine       guillemotright  */
2249 CASE_GROUND_STATE,
2250 CASE_GROUND_STATE,
2251 CASE_GROUND_STATE,
2252 CASE_GROUND_STATE,
2253 /*      onequarter      onehalf         threequarters   questiondown    */
2254 CASE_GROUND_STATE,
2255 CASE_GROUND_STATE,
2256 CASE_GROUND_STATE,
2257 CASE_GROUND_STATE,
2258 /*      Agrave          Aacute          Acircumflex     Atilde          */
2259 CASE_GROUND_STATE,
2260 CASE_GROUND_STATE,
2261 CASE_GROUND_STATE,
2262 CASE_GROUND_STATE,
2263 /*      Adiaeresis      Aring           AE              Ccedilla        */
2264 CASE_GROUND_STATE,
2265 CASE_GROUND_STATE,
2266 CASE_GROUND_STATE,
2267 CASE_GROUND_STATE,
2268 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
2269 CASE_GROUND_STATE,
2270 CASE_GROUND_STATE,
2271 CASE_GROUND_STATE,
2272 CASE_GROUND_STATE,
2273 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
2274 CASE_GROUND_STATE,
2275 CASE_GROUND_STATE,
2276 CASE_GROUND_STATE,
2277 CASE_GROUND_STATE,
2278 /*      Eth             Ntilde          Ograve          Oacute          */
2279 CASE_GROUND_STATE,
2280 CASE_GROUND_STATE,
2281 CASE_GROUND_STATE,
2282 CASE_GROUND_STATE,
2283 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
2284 CASE_GROUND_STATE,
2285 CASE_GROUND_STATE,
2286 CASE_GROUND_STATE,
2287 CASE_GROUND_STATE,
2288 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
2289 CASE_GROUND_STATE,
2290 CASE_GROUND_STATE,
2291 CASE_GROUND_STATE,
2292 CASE_GROUND_STATE,
2293 /*      Udiaeresis      Yacute          Thorn           ssharp          */
2294 CASE_GROUND_STATE,
2295 CASE_GROUND_STATE,
2296 CASE_GROUND_STATE,
2297 CASE_GROUND_STATE,
2298 /*      agrave          aacute          acircumflex     atilde          */
2299 CASE_GROUND_STATE,
2300 CASE_GROUND_STATE,
2301 CASE_GROUND_STATE,
2302 CASE_GROUND_STATE,
2303 /*      adiaeresis      aring           ae              ccedilla        */
2304 CASE_GROUND_STATE,
2305 CASE_GROUND_STATE,
2306 CASE_GROUND_STATE,
2307 CASE_GROUND_STATE,
2308 /*      egrave          eacute          ecircumflex     ediaeresis      */
2309 CASE_GROUND_STATE,
2310 CASE_GROUND_STATE,
2311 CASE_GROUND_STATE,
2312 CASE_GROUND_STATE,
2313 /*      igrave          iacute          icircumflex     idiaeresis      */
2314 CASE_GROUND_STATE,
2315 CASE_GROUND_STATE,
2316 CASE_GROUND_STATE,
2317 CASE_GROUND_STATE,
2318 /*      eth             ntilde          ograve          oacute          */
2319 CASE_GROUND_STATE,
2320 CASE_GROUND_STATE,
2321 CASE_GROUND_STATE,
2322 CASE_GROUND_STATE,
2323 /*      ocircumflex     otilde          odiaeresis      division        */
2324 CASE_GROUND_STATE,
2325 CASE_GROUND_STATE,
2326 CASE_GROUND_STATE,
2327 CASE_GROUND_STATE,
2328 /*      oslash          ugrave          uacute          ucircumflex     */
2329 CASE_GROUND_STATE,
2330 CASE_GROUND_STATE,
2331 CASE_GROUND_STATE,
2332 CASE_GROUND_STATE,
2333 /*      udiaeresis      yacute          thorn           ydiaeresis      */
2334 CASE_GROUND_STATE,
2335 CASE_GROUND_STATE,
2336 CASE_GROUND_STATE,
2337 CASE_GROUND_STATE,
2338 };
2339 
2340 int iestable[] =		/* CASE_IGNORE_ESC */
2341 {
2342 /*	NUL		SOH		STX		ETX	*/
2343 CASE_IGNORE_STATE,
2344 CASE_IGNORE_STATE,
2345 CASE_IGNORE_STATE,
2346 CASE_IGNORE_STATE,
2347 /*	EOT		ENQ		ACK		BEL	*/
2348 CASE_IGNORE_STATE,
2349 CASE_IGNORE_STATE,
2350 CASE_IGNORE_STATE,
2351 CASE_IGNORE_STATE,
2352 /*	BS		HT		NL		VT	*/
2353 CASE_IGNORE_STATE,
2354 CASE_IGNORE_STATE,
2355 CASE_IGNORE_STATE,
2356 CASE_IGNORE_STATE,
2357 /*	NP		CR		SO		SI	*/
2358 CASE_IGNORE_STATE,
2359 CASE_IGNORE_STATE,
2360 CASE_IGNORE_STATE,
2361 CASE_IGNORE_STATE,
2362 /*	DLE		DC1		DC2		DC3	*/
2363 CASE_IGNORE_STATE,
2364 CASE_IGNORE_STATE,
2365 CASE_IGNORE_STATE,
2366 CASE_IGNORE_STATE,
2367 /*	DC4		NAK		SYN		ETB	*/
2368 CASE_IGNORE_STATE,
2369 CASE_IGNORE_STATE,
2370 CASE_IGNORE_STATE,
2371 CASE_IGNORE_STATE,
2372 /*	CAN		EM		SUB		ESC	*/
2373 CASE_IGNORE_STATE,
2374 CASE_IGNORE_STATE,
2375 CASE_IGNORE_STATE,
2376 CASE_IGNORE_STATE,
2377 /*	FS		GS		RS		US	*/
2378 CASE_IGNORE_STATE,
2379 CASE_IGNORE_STATE,
2380 CASE_IGNORE_STATE,
2381 CASE_IGNORE_STATE,
2382 /*	SP		!		"		#	*/
2383 CASE_IGNORE_STATE,
2384 CASE_IGNORE_STATE,
2385 CASE_IGNORE_STATE,
2386 CASE_IGNORE_STATE,
2387 /*	$		%		&		'	*/
2388 CASE_IGNORE_STATE,
2389 CASE_IGNORE_STATE,
2390 CASE_IGNORE_STATE,
2391 CASE_IGNORE_STATE,
2392 /*	(		)		*		+	*/
2393 CASE_IGNORE_STATE,
2394 CASE_IGNORE_STATE,
2395 CASE_IGNORE_STATE,
2396 CASE_IGNORE_STATE,
2397 /*	,		-		.		/	*/
2398 CASE_IGNORE_STATE,
2399 CASE_IGNORE_STATE,
2400 CASE_IGNORE_STATE,
2401 CASE_IGNORE_STATE,
2402 /*	0		1		2		3	*/
2403 CASE_IGNORE_STATE,
2404 CASE_IGNORE_STATE,
2405 CASE_IGNORE_STATE,
2406 CASE_IGNORE_STATE,
2407 /*	4		5		6		7	*/
2408 CASE_IGNORE_STATE,
2409 CASE_IGNORE_STATE,
2410 CASE_IGNORE_STATE,
2411 CASE_IGNORE_STATE,
2412 /*	8		9		:		;	*/
2413 CASE_IGNORE_STATE,
2414 CASE_IGNORE_STATE,
2415 CASE_IGNORE_STATE,
2416 CASE_IGNORE_STATE,
2417 /*	<		=		>		?	*/
2418 CASE_IGNORE_STATE,
2419 CASE_IGNORE_STATE,
2420 CASE_IGNORE_STATE,
2421 CASE_IGNORE_STATE,
2422 /*	@		A		B		C	*/
2423 CASE_IGNORE_STATE,
2424 CASE_IGNORE_STATE,
2425 CASE_IGNORE_STATE,
2426 CASE_IGNORE_STATE,
2427 /*	D		E		F		G	*/
2428 CASE_IGNORE_STATE,
2429 CASE_IGNORE_STATE,
2430 CASE_IGNORE_STATE,
2431 CASE_IGNORE_STATE,
2432 /*	H		I		J		K	*/
2433 CASE_IGNORE_STATE,
2434 CASE_IGNORE_STATE,
2435 CASE_IGNORE_STATE,
2436 CASE_IGNORE_STATE,
2437 /*	L		M		N		O	*/
2438 CASE_IGNORE_STATE,
2439 CASE_IGNORE_STATE,
2440 CASE_IGNORE_STATE,
2441 CASE_IGNORE_STATE,
2442 /*	P		Q		R		S	*/
2443 CASE_IGNORE_STATE,
2444 CASE_IGNORE_STATE,
2445 CASE_IGNORE_STATE,
2446 CASE_IGNORE_STATE,
2447 /*	T		U		V		W	*/
2448 CASE_IGNORE_STATE,
2449 CASE_IGNORE_STATE,
2450 CASE_IGNORE_STATE,
2451 CASE_IGNORE_STATE,
2452 /*	X		Y		Z		[	*/
2453 CASE_IGNORE_STATE,
2454 CASE_IGNORE_STATE,
2455 CASE_IGNORE_STATE,
2456 CASE_IGNORE_STATE,
2457 /*	\		]		^		_	*/
2458 CASE_GROUND_STATE,
2459 CASE_IGNORE_STATE,
2460 CASE_IGNORE_STATE,
2461 CASE_IGNORE_STATE,
2462 /*	`		a		b		c	*/
2463 CASE_IGNORE_STATE,
2464 CASE_IGNORE_STATE,
2465 CASE_IGNORE_STATE,
2466 CASE_IGNORE_STATE,
2467 /*	d		e		f		g	*/
2468 CASE_IGNORE_STATE,
2469 CASE_IGNORE_STATE,
2470 CASE_IGNORE_STATE,
2471 CASE_IGNORE_STATE,
2472 /*	h		i		j		k	*/
2473 CASE_IGNORE_STATE,
2474 CASE_IGNORE_STATE,
2475 CASE_IGNORE_STATE,
2476 CASE_IGNORE_STATE,
2477 /*	l		m		n		o	*/
2478 CASE_IGNORE_STATE,
2479 CASE_IGNORE_STATE,
2480 CASE_IGNORE_STATE,
2481 CASE_IGNORE_STATE,
2482 /*	p		q		r		s	*/
2483 CASE_IGNORE_STATE,
2484 CASE_IGNORE_STATE,
2485 CASE_IGNORE_STATE,
2486 CASE_IGNORE_STATE,
2487 /*	t		u		v		w	*/
2488 CASE_IGNORE_STATE,
2489 CASE_IGNORE_STATE,
2490 CASE_IGNORE_STATE,
2491 CASE_IGNORE_STATE,
2492 /*	x		y		z		{	*/
2493 CASE_IGNORE_STATE,
2494 CASE_IGNORE_STATE,
2495 CASE_IGNORE_STATE,
2496 CASE_IGNORE_STATE,
2497 /*	|		}		~		DEL	*/
2498 CASE_IGNORE_STATE,
2499 CASE_IGNORE_STATE,
2500 CASE_IGNORE_STATE,
2501 CASE_IGNORE_STATE,
2502 /*      0x80            0x81            0x82            0x83    */
2503 CASE_IGNORE,
2504 CASE_IGNORE,
2505 CASE_IGNORE,
2506 CASE_IGNORE,
2507 /*      0x84            0x85            0x86            0x87    */
2508 CASE_IGNORE,
2509 CASE_IGNORE,
2510 CASE_IGNORE,
2511 CASE_IGNORE,
2512 /*      0x88            0x89            0x8a            0x8b    */
2513 CASE_IGNORE,
2514 CASE_IGNORE,
2515 CASE_IGNORE,
2516 CASE_IGNORE,
2517 /*      0x8c            0x8d            0x8e            0x8f    */
2518 CASE_IGNORE,
2519 CASE_IGNORE,
2520 CASE_IGNORE,
2521 CASE_IGNORE,
2522 /*      0x90            0x91            0x92            0x93    */
2523 CASE_IGNORE,
2524 CASE_IGNORE,
2525 CASE_IGNORE,
2526 CASE_IGNORE,
2527 /*      0x94            0x95            0x96            0x97    */
2528 CASE_IGNORE,
2529 CASE_IGNORE,
2530 CASE_IGNORE,
2531 CASE_IGNORE,
2532 /*      0x99            0x99            0x9a            0x9b    */
2533 CASE_IGNORE,
2534 CASE_IGNORE,
2535 CASE_IGNORE,
2536 CASE_IGNORE,
2537 /*      0x9c            0x9d            0x9e            0x9f    */
2538 CASE_IGNORE,
2539 CASE_IGNORE,
2540 CASE_IGNORE,
2541 CASE_IGNORE,
2542 /*      nobreakspace    exclamdown      cent            sterling        */
2543 CASE_GROUND_STATE,
2544 CASE_GROUND_STATE,
2545 CASE_GROUND_STATE,
2546 CASE_GROUND_STATE,
2547 /*      currency        yen             brokenbar       section         */
2548 CASE_GROUND_STATE,
2549 CASE_GROUND_STATE,
2550 CASE_GROUND_STATE,
2551 CASE_GROUND_STATE,
2552 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
2553 CASE_GROUND_STATE,
2554 CASE_GROUND_STATE,
2555 CASE_GROUND_STATE,
2556 CASE_GROUND_STATE,
2557 /*      notsign         hyphen          registered      macron          */
2558 CASE_GROUND_STATE,
2559 CASE_GROUND_STATE,
2560 CASE_GROUND_STATE,
2561 CASE_GROUND_STATE,
2562 /*      degree          plusminus       twosuperior     threesuperior   */
2563 CASE_GROUND_STATE,
2564 CASE_GROUND_STATE,
2565 CASE_GROUND_STATE,
2566 CASE_GROUND_STATE,
2567 /*      acute           mu              paragraph       periodcentered  */
2568 CASE_GROUND_STATE,
2569 CASE_GROUND_STATE,
2570 CASE_GROUND_STATE,
2571 CASE_GROUND_STATE,
2572 /*      cedilla         onesuperior     masculine       guillemotright  */
2573 CASE_GROUND_STATE,
2574 CASE_GROUND_STATE,
2575 CASE_GROUND_STATE,
2576 CASE_GROUND_STATE,
2577 /*      onequarter      onehalf         threequarters   questiondown    */
2578 CASE_GROUND_STATE,
2579 CASE_GROUND_STATE,
2580 CASE_GROUND_STATE,
2581 CASE_GROUND_STATE,
2582 /*      Agrave          Aacute          Acircumflex     Atilde          */
2583 CASE_GROUND_STATE,
2584 CASE_GROUND_STATE,
2585 CASE_GROUND_STATE,
2586 CASE_GROUND_STATE,
2587 /*      Adiaeresis      Aring           AE              Ccedilla        */
2588 CASE_GROUND_STATE,
2589 CASE_GROUND_STATE,
2590 CASE_GROUND_STATE,
2591 CASE_GROUND_STATE,
2592 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
2593 CASE_GROUND_STATE,
2594 CASE_GROUND_STATE,
2595 CASE_GROUND_STATE,
2596 CASE_GROUND_STATE,
2597 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
2598 CASE_GROUND_STATE,
2599 CASE_GROUND_STATE,
2600 CASE_GROUND_STATE,
2601 CASE_GROUND_STATE,
2602 /*      Eth             Ntilde          Ograve          Oacute          */
2603 CASE_GROUND_STATE,
2604 CASE_GROUND_STATE,
2605 CASE_GROUND_STATE,
2606 CASE_GROUND_STATE,
2607 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
2608 CASE_GROUND_STATE,
2609 CASE_GROUND_STATE,
2610 CASE_GROUND_STATE,
2611 CASE_GROUND_STATE,
2612 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
2613 CASE_GROUND_STATE,
2614 CASE_GROUND_STATE,
2615 CASE_GROUND_STATE,
2616 CASE_GROUND_STATE,
2617 /*      Udiaeresis      Yacute          Thorn           ssharp          */
2618 CASE_GROUND_STATE,
2619 CASE_GROUND_STATE,
2620 CASE_GROUND_STATE,
2621 CASE_GROUND_STATE,
2622 /*      agrave          aacute          acircumflex     atilde          */
2623 CASE_GROUND_STATE,
2624 CASE_GROUND_STATE,
2625 CASE_GROUND_STATE,
2626 CASE_GROUND_STATE,
2627 /*      adiaeresis      aring           ae              ccedilla        */
2628 CASE_GROUND_STATE,
2629 CASE_GROUND_STATE,
2630 CASE_GROUND_STATE,
2631 CASE_GROUND_STATE,
2632 /*      egrave          eacute          ecircumflex     ediaeresis      */
2633 CASE_GROUND_STATE,
2634 CASE_GROUND_STATE,
2635 CASE_GROUND_STATE,
2636 CASE_GROUND_STATE,
2637 /*      igrave          iacute          icircumflex     idiaeresis      */
2638 CASE_GROUND_STATE,
2639 CASE_GROUND_STATE,
2640 CASE_GROUND_STATE,
2641 CASE_GROUND_STATE,
2642 /*      eth             ntilde          ograve          oacute          */
2643 CASE_GROUND_STATE,
2644 CASE_GROUND_STATE,
2645 CASE_GROUND_STATE,
2646 CASE_GROUND_STATE,
2647 /*      ocircumflex     otilde          odiaeresis      division        */
2648 CASE_GROUND_STATE,
2649 CASE_GROUND_STATE,
2650 CASE_GROUND_STATE,
2651 CASE_GROUND_STATE,
2652 /*      oslash          ugrave          uacute          ucircumflex     */
2653 CASE_GROUND_STATE,
2654 CASE_GROUND_STATE,
2655 CASE_GROUND_STATE,
2656 CASE_GROUND_STATE,
2657 /*      udiaeresis      yacute          thorn           ydiaeresis      */
2658 CASE_GROUND_STATE,
2659 CASE_GROUND_STATE,
2660 CASE_GROUND_STATE,
2661 CASE_GROUND_STATE,
2662 };
2663 
2664 int igntable[] =		/* CASE_IGNORE_STATE */
2665 {
2666 /*	NUL		SOH		STX		ETX	*/
2667 CASE_IGNORE,
2668 CASE_IGNORE,
2669 CASE_IGNORE,
2670 CASE_IGNORE,
2671 /*	EOT		ENQ		ACK		BEL	*/
2672 CASE_IGNORE,
2673 CASE_IGNORE,
2674 CASE_IGNORE,
2675 CASE_IGNORE,
2676 /*	BS		HT		NL		VT	*/
2677 CASE_IGNORE,
2678 CASE_IGNORE,
2679 CASE_IGNORE,
2680 CASE_IGNORE,
2681 /*	NP		CR		SO		SI	*/
2682 CASE_IGNORE,
2683 CASE_IGNORE,
2684 CASE_IGNORE,
2685 CASE_IGNORE,
2686 /*	DLE		DC1		DC2		DC3	*/
2687 CASE_IGNORE,
2688 CASE_IGNORE,
2689 CASE_IGNORE,
2690 CASE_IGNORE,
2691 /*	DC4		NAK		SYN		ETB	*/
2692 CASE_IGNORE,
2693 CASE_IGNORE,
2694 CASE_IGNORE,
2695 CASE_IGNORE,
2696 /*	CAN		EM		SUB		ESC	*/
2697 CASE_GROUND_STATE,
2698 CASE_IGNORE,
2699 CASE_GROUND_STATE,
2700 CASE_IGNORE_ESC,
2701 /*	FS		GS		RS		US	*/
2702 CASE_IGNORE,
2703 CASE_IGNORE,
2704 CASE_IGNORE,
2705 CASE_IGNORE,
2706 /*	SP		!		"		#	*/
2707 CASE_IGNORE,
2708 CASE_IGNORE,
2709 CASE_IGNORE,
2710 CASE_IGNORE,
2711 /*	$		%		&		'	*/
2712 CASE_IGNORE,
2713 CASE_IGNORE,
2714 CASE_IGNORE,
2715 CASE_IGNORE,
2716 /*	(		)		*		+	*/
2717 CASE_IGNORE,
2718 CASE_IGNORE,
2719 CASE_IGNORE,
2720 CASE_IGNORE,
2721 /*	,		-		.		/	*/
2722 CASE_IGNORE,
2723 CASE_IGNORE,
2724 CASE_IGNORE,
2725 CASE_IGNORE,
2726 /*	0		1		2		3	*/
2727 CASE_IGNORE,
2728 CASE_IGNORE,
2729 CASE_IGNORE,
2730 CASE_IGNORE,
2731 /*	4		5		6		7	*/
2732 CASE_IGNORE,
2733 CASE_IGNORE,
2734 CASE_IGNORE,
2735 CASE_IGNORE,
2736 /*	8		9		:		;	*/
2737 CASE_IGNORE,
2738 CASE_IGNORE,
2739 CASE_IGNORE,
2740 CASE_IGNORE,
2741 /*	<		=		>		?	*/
2742 CASE_IGNORE,
2743 CASE_IGNORE,
2744 CASE_IGNORE,
2745 CASE_IGNORE,
2746 /*	@		A		B		C	*/
2747 CASE_IGNORE,
2748 CASE_IGNORE,
2749 CASE_IGNORE,
2750 CASE_IGNORE,
2751 /*	D		E		F		G	*/
2752 CASE_IGNORE,
2753 CASE_IGNORE,
2754 CASE_IGNORE,
2755 CASE_IGNORE,
2756 /*	H		I		J		K	*/
2757 CASE_IGNORE,
2758 CASE_IGNORE,
2759 CASE_IGNORE,
2760 CASE_IGNORE,
2761 /*	L		M		N		O	*/
2762 CASE_IGNORE,
2763 CASE_IGNORE,
2764 CASE_IGNORE,
2765 CASE_IGNORE,
2766 /*	P		Q		R		S	*/
2767 CASE_IGNORE,
2768 CASE_IGNORE,
2769 CASE_IGNORE,
2770 CASE_IGNORE,
2771 /*	T		U		V		W	*/
2772 CASE_IGNORE,
2773 CASE_IGNORE,
2774 CASE_IGNORE,
2775 CASE_IGNORE,
2776 /*	X		Y		Z		[	*/
2777 CASE_IGNORE,
2778 CASE_IGNORE,
2779 CASE_IGNORE,
2780 CASE_IGNORE,
2781 /*	\		]		^		_	*/
2782 CASE_IGNORE,
2783 CASE_IGNORE,
2784 CASE_IGNORE,
2785 CASE_IGNORE,
2786 /*	`		a		b		c	*/
2787 CASE_IGNORE,
2788 CASE_IGNORE,
2789 CASE_IGNORE,
2790 CASE_IGNORE,
2791 /*	d		e		f		g	*/
2792 CASE_IGNORE,
2793 CASE_IGNORE,
2794 CASE_IGNORE,
2795 CASE_IGNORE,
2796 /*	h		i		j		k	*/
2797 CASE_IGNORE,
2798 CASE_IGNORE,
2799 CASE_IGNORE,
2800 CASE_IGNORE,
2801 /*	l		m		n		o	*/
2802 CASE_IGNORE,
2803 CASE_IGNORE,
2804 CASE_IGNORE,
2805 CASE_IGNORE,
2806 /*	p		q		r		s	*/
2807 CASE_IGNORE,
2808 CASE_IGNORE,
2809 CASE_IGNORE,
2810 CASE_IGNORE,
2811 /*	t		u		v		w	*/
2812 CASE_IGNORE,
2813 CASE_IGNORE,
2814 CASE_IGNORE,
2815 CASE_IGNORE,
2816 /*	x		y		z		{	*/
2817 CASE_IGNORE,
2818 CASE_IGNORE,
2819 CASE_IGNORE,
2820 CASE_IGNORE,
2821 /*	|		}		~		DEL	*/
2822 CASE_IGNORE,
2823 CASE_IGNORE,
2824 CASE_IGNORE,
2825 CASE_IGNORE,
2826 /*      0x80            0x81            0x82            0x83    */
2827 CASE_IGNORE,
2828 CASE_IGNORE,
2829 CASE_IGNORE,
2830 CASE_IGNORE,
2831 /*      0x84            0x85            0x86            0x87    */
2832 CASE_IGNORE,
2833 CASE_IGNORE,
2834 CASE_IGNORE,
2835 CASE_IGNORE,
2836 /*      0x88            0x89            0x8a            0x8b    */
2837 CASE_IGNORE,
2838 CASE_IGNORE,
2839 CASE_IGNORE,
2840 CASE_IGNORE,
2841 /*      0x8c            0x8d            0x8e            0x8f    */
2842 CASE_IGNORE,
2843 CASE_IGNORE,
2844 CASE_IGNORE,
2845 CASE_IGNORE,
2846 /*      0x90            0x91            0x92            0x93    */
2847 CASE_IGNORE,
2848 CASE_IGNORE,
2849 CASE_IGNORE,
2850 CASE_IGNORE,
2851 /*      0x94            0x95            0x96            0x97    */
2852 CASE_IGNORE,
2853 CASE_IGNORE,
2854 CASE_IGNORE,
2855 CASE_IGNORE,
2856 /*      0x99            0x99            0x9a            0x9b    */
2857 CASE_IGNORE,
2858 CASE_IGNORE,
2859 CASE_IGNORE,
2860 CASE_IGNORE,
2861 /*      0x9c            0x9d            0x9e            0x9f    */
2862 CASE_IGNORE,
2863 CASE_IGNORE,
2864 CASE_IGNORE,
2865 CASE_IGNORE,
2866 /*      nobreakspace    exclamdown      cent            sterling        */
2867 CASE_GROUND_STATE,
2868 CASE_GROUND_STATE,
2869 CASE_GROUND_STATE,
2870 CASE_GROUND_STATE,
2871 /*      currency        yen             brokenbar       section         */
2872 CASE_GROUND_STATE,
2873 CASE_GROUND_STATE,
2874 CASE_GROUND_STATE,
2875 CASE_GROUND_STATE,
2876 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
2877 CASE_GROUND_STATE,
2878 CASE_GROUND_STATE,
2879 CASE_GROUND_STATE,
2880 CASE_GROUND_STATE,
2881 /*      notsign         hyphen          registered      macron          */
2882 CASE_GROUND_STATE,
2883 CASE_GROUND_STATE,
2884 CASE_GROUND_STATE,
2885 CASE_GROUND_STATE,
2886 /*      degree          plusminus       twosuperior     threesuperior   */
2887 CASE_GROUND_STATE,
2888 CASE_GROUND_STATE,
2889 CASE_GROUND_STATE,
2890 CASE_GROUND_STATE,
2891 /*      acute           mu              paragraph       periodcentered  */
2892 CASE_GROUND_STATE,
2893 CASE_GROUND_STATE,
2894 CASE_GROUND_STATE,
2895 CASE_GROUND_STATE,
2896 /*      cedilla         onesuperior     masculine       guillemotright  */
2897 CASE_GROUND_STATE,
2898 CASE_GROUND_STATE,
2899 CASE_GROUND_STATE,
2900 CASE_GROUND_STATE,
2901 /*      onequarter      onehalf         threequarters   questiondown    */
2902 CASE_GROUND_STATE,
2903 CASE_GROUND_STATE,
2904 CASE_GROUND_STATE,
2905 CASE_GROUND_STATE,
2906 /*      Agrave          Aacute          Acircumflex     Atilde          */
2907 CASE_GROUND_STATE,
2908 CASE_GROUND_STATE,
2909 CASE_GROUND_STATE,
2910 CASE_GROUND_STATE,
2911 /*      Adiaeresis      Aring           AE              Ccedilla        */
2912 CASE_GROUND_STATE,
2913 CASE_GROUND_STATE,
2914 CASE_GROUND_STATE,
2915 CASE_GROUND_STATE,
2916 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
2917 CASE_GROUND_STATE,
2918 CASE_GROUND_STATE,
2919 CASE_GROUND_STATE,
2920 CASE_GROUND_STATE,
2921 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
2922 CASE_GROUND_STATE,
2923 CASE_GROUND_STATE,
2924 CASE_GROUND_STATE,
2925 CASE_GROUND_STATE,
2926 /*      Eth             Ntilde          Ograve          Oacute          */
2927 CASE_GROUND_STATE,
2928 CASE_GROUND_STATE,
2929 CASE_GROUND_STATE,
2930 CASE_GROUND_STATE,
2931 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
2932 CASE_GROUND_STATE,
2933 CASE_GROUND_STATE,
2934 CASE_GROUND_STATE,
2935 CASE_GROUND_STATE,
2936 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
2937 CASE_GROUND_STATE,
2938 CASE_GROUND_STATE,
2939 CASE_GROUND_STATE,
2940 CASE_GROUND_STATE,
2941 /*      Udiaeresis      Yacute          Thorn           ssharp          */
2942 CASE_GROUND_STATE,
2943 CASE_GROUND_STATE,
2944 CASE_GROUND_STATE,
2945 CASE_GROUND_STATE,
2946 /*      agrave          aacute          acircumflex     atilde          */
2947 CASE_GROUND_STATE,
2948 CASE_GROUND_STATE,
2949 CASE_GROUND_STATE,
2950 CASE_GROUND_STATE,
2951 /*      adiaeresis      aring           ae              ccedilla        */
2952 CASE_GROUND_STATE,
2953 CASE_GROUND_STATE,
2954 CASE_GROUND_STATE,
2955 CASE_GROUND_STATE,
2956 /*      egrave          eacute          ecircumflex     ediaeresis      */
2957 CASE_GROUND_STATE,
2958 CASE_GROUND_STATE,
2959 CASE_GROUND_STATE,
2960 CASE_GROUND_STATE,
2961 /*      igrave          iacute          icircumflex     idiaeresis      */
2962 CASE_GROUND_STATE,
2963 CASE_GROUND_STATE,
2964 CASE_GROUND_STATE,
2965 CASE_GROUND_STATE,
2966 /*      eth             ntilde          ograve          oacute          */
2967 CASE_GROUND_STATE,
2968 CASE_GROUND_STATE,
2969 CASE_GROUND_STATE,
2970 CASE_GROUND_STATE,
2971 /*      ocircumflex     otilde          odiaeresis      division        */
2972 CASE_GROUND_STATE,
2973 CASE_GROUND_STATE,
2974 CASE_GROUND_STATE,
2975 CASE_GROUND_STATE,
2976 /*      oslash          ugrave          uacute          ucircumflex     */
2977 CASE_GROUND_STATE,
2978 CASE_GROUND_STATE,
2979 CASE_GROUND_STATE,
2980 CASE_GROUND_STATE,
2981 /*      udiaeresis      yacute          thorn           ydiaeresis      */
2982 CASE_GROUND_STATE,
2983 CASE_GROUND_STATE,
2984 CASE_GROUND_STATE,
2985 CASE_GROUND_STATE,
2986 };
2987 
2988 int scrtable[] =		/* ESC # */
2989 {
2990 /*	NUL		SOH		STX		ETX	*/
2991 CASE_IGNORE,
2992 CASE_IGNORE,
2993 CASE_IGNORE,
2994 CASE_IGNORE,
2995 /*	EOT		ENQ		ACK		BEL	*/
2996 CASE_IGNORE,
2997 CASE_IGNORE,
2998 CASE_IGNORE,
2999 CASE_BELL,
3000 /*	BS		HT		NL		VT	*/
3001 CASE_BS,
3002 CASE_TAB,
3003 CASE_VMOT,
3004 CASE_VMOT,
3005 /*	NP		CR		SO		SI	*/
3006 CASE_VMOT,
3007 CASE_CR,
3008 CASE_SO,
3009 CASE_SI,
3010 /*	DLE		DC1		DC2		DC3	*/
3011 CASE_IGNORE,
3012 CASE_IGNORE,
3013 CASE_IGNORE,
3014 CASE_IGNORE,
3015 /*	DC4		NAK		SYN		ETB	*/
3016 CASE_IGNORE,
3017 CASE_IGNORE,
3018 CASE_IGNORE,
3019 CASE_IGNORE,
3020 /*	CAN		EM		SUB		ESC	*/
3021 CASE_IGNORE,
3022 CASE_IGNORE,
3023 CASE_IGNORE,
3024 CASE_ESC,
3025 /*	FS		GS		RS		US	*/
3026 CASE_IGNORE,
3027 CASE_IGNORE,
3028 CASE_IGNORE,
3029 CASE_IGNORE,
3030 /*	SP		!		"		#	*/
3031 CASE_ESC_IGNORE,
3032 CASE_ESC_IGNORE,
3033 CASE_ESC_IGNORE,
3034 CASE_ESC_IGNORE,
3035 /*	$		%		&		'	*/
3036 CASE_ESC_IGNORE,
3037 CASE_ESC_IGNORE,
3038 CASE_ESC_IGNORE,
3039 CASE_ESC_IGNORE,
3040 /*	(		)		*		+	*/
3041 CASE_ESC_IGNORE,
3042 CASE_ESC_IGNORE,
3043 CASE_ESC_IGNORE,
3044 CASE_ESC_IGNORE,
3045 /*	,		-		.		/	*/
3046 CASE_ESC_IGNORE,
3047 CASE_ESC_IGNORE,
3048 CASE_ESC_IGNORE,
3049 CASE_ESC_IGNORE,
3050 /*	0		1		2		3	*/
3051 CASE_GROUND_STATE,
3052 CASE_GROUND_STATE,
3053 CASE_GROUND_STATE,
3054 CASE_GROUND_STATE,
3055 /*	4		5		6		7	*/
3056 CASE_GROUND_STATE,
3057 CASE_GROUND_STATE,
3058 CASE_GROUND_STATE,
3059 CASE_GROUND_STATE,
3060 /*	8		9		:		;	*/
3061 CASE_DECALN,
3062 CASE_GROUND_STATE,
3063 CASE_GROUND_STATE,
3064 CASE_GROUND_STATE,
3065 /*	<		=		>		?	*/
3066 CASE_GROUND_STATE,
3067 CASE_GROUND_STATE,
3068 CASE_GROUND_STATE,
3069 CASE_GROUND_STATE,
3070 /*	@		A		B		C	*/
3071 CASE_GROUND_STATE,
3072 CASE_GROUND_STATE,
3073 CASE_GROUND_STATE,
3074 CASE_GROUND_STATE,
3075 /*	D		E		F		G	*/
3076 CASE_GROUND_STATE,
3077 CASE_GROUND_STATE,
3078 CASE_GROUND_STATE,
3079 CASE_GROUND_STATE,
3080 /*	H		I		J		K	*/
3081 CASE_GROUND_STATE,
3082 CASE_GROUND_STATE,
3083 CASE_GROUND_STATE,
3084 CASE_GROUND_STATE,
3085 /*	L		M		N		O	*/
3086 CASE_GROUND_STATE,
3087 CASE_GROUND_STATE,
3088 CASE_GROUND_STATE,
3089 CASE_GROUND_STATE,
3090 /*	P		Q		R		S	*/
3091 CASE_GROUND_STATE,
3092 CASE_GROUND_STATE,
3093 CASE_GROUND_STATE,
3094 CASE_GROUND_STATE,
3095 /*	T		U		V		W	*/
3096 CASE_GROUND_STATE,
3097 CASE_GROUND_STATE,
3098 CASE_GROUND_STATE,
3099 CASE_GROUND_STATE,
3100 /*	X		Y		Z		[	*/
3101 CASE_GROUND_STATE,
3102 CASE_GROUND_STATE,
3103 CASE_GROUND_STATE,
3104 CASE_GROUND_STATE,
3105 /*	\		]		^		_	*/
3106 CASE_GROUND_STATE,
3107 CASE_GROUND_STATE,
3108 CASE_GROUND_STATE,
3109 CASE_GROUND_STATE,
3110 /*	`		a		b		c	*/
3111 CASE_GROUND_STATE,
3112 CASE_GROUND_STATE,
3113 CASE_GROUND_STATE,
3114 CASE_GROUND_STATE,
3115 /*	d		e		f		g	*/
3116 CASE_GROUND_STATE,
3117 CASE_GROUND_STATE,
3118 CASE_GROUND_STATE,
3119 CASE_GROUND_STATE,
3120 /*	h		i		j		k	*/
3121 CASE_GROUND_STATE,
3122 CASE_GROUND_STATE,
3123 CASE_GROUND_STATE,
3124 CASE_GROUND_STATE,
3125 /*	l		m		n		o	*/
3126 CASE_GROUND_STATE,
3127 CASE_GROUND_STATE,
3128 CASE_GROUND_STATE,
3129 CASE_GROUND_STATE,
3130 /*	p		q		r		s	*/
3131 CASE_GROUND_STATE,
3132 CASE_GROUND_STATE,
3133 CASE_GROUND_STATE,
3134 CASE_GROUND_STATE,
3135 /*	t		u		v		w	*/
3136 CASE_GROUND_STATE,
3137 CASE_GROUND_STATE,
3138 CASE_GROUND_STATE,
3139 CASE_GROUND_STATE,
3140 /*	x		y		z		{	*/
3141 CASE_GROUND_STATE,
3142 CASE_GROUND_STATE,
3143 CASE_GROUND_STATE,
3144 CASE_GROUND_STATE,
3145 /*	|		}		~		DEL	*/
3146 CASE_GROUND_STATE,
3147 CASE_GROUND_STATE,
3148 CASE_GROUND_STATE,
3149 CASE_GROUND_STATE,
3150 /*      0x80            0x81            0x82            0x83    */
3151 CASE_IGNORE,
3152 CASE_IGNORE,
3153 CASE_IGNORE,
3154 CASE_IGNORE,
3155 /*      0x84            0x85            0x86            0x87    */
3156 CASE_IGNORE,
3157 CASE_IGNORE,
3158 CASE_IGNORE,
3159 CASE_IGNORE,
3160 /*      0x88            0x89            0x8a            0x8b    */
3161 CASE_IGNORE,
3162 CASE_IGNORE,
3163 CASE_IGNORE,
3164 CASE_IGNORE,
3165 /*      0x8c            0x8d            0x8e            0x8f    */
3166 CASE_IGNORE,
3167 CASE_IGNORE,
3168 CASE_IGNORE,
3169 CASE_IGNORE,
3170 /*      0x90            0x91            0x92            0x93    */
3171 CASE_IGNORE,
3172 CASE_IGNORE,
3173 CASE_IGNORE,
3174 CASE_IGNORE,
3175 /*      0x94            0x95            0x96            0x97    */
3176 CASE_IGNORE,
3177 CASE_IGNORE,
3178 CASE_IGNORE,
3179 CASE_IGNORE,
3180 /*      0x99            0x99            0x9a            0x9b    */
3181 CASE_IGNORE,
3182 CASE_IGNORE,
3183 CASE_IGNORE,
3184 CASE_IGNORE,
3185 /*      0x9c            0x9d            0x9e            0x9f    */
3186 CASE_IGNORE,
3187 CASE_IGNORE,
3188 CASE_IGNORE,
3189 CASE_IGNORE,
3190 /*      nobreakspace    exclamdown      cent            sterling        */
3191 CASE_GROUND_STATE,
3192 CASE_GROUND_STATE,
3193 CASE_GROUND_STATE,
3194 CASE_GROUND_STATE,
3195 /*      currency        yen             brokenbar       section         */
3196 CASE_GROUND_STATE,
3197 CASE_GROUND_STATE,
3198 CASE_GROUND_STATE,
3199 CASE_GROUND_STATE,
3200 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
3201 CASE_GROUND_STATE,
3202 CASE_GROUND_STATE,
3203 CASE_GROUND_STATE,
3204 CASE_GROUND_STATE,
3205 /*      notsign         hyphen          registered      macron          */
3206 CASE_GROUND_STATE,
3207 CASE_GROUND_STATE,
3208 CASE_GROUND_STATE,
3209 CASE_GROUND_STATE,
3210 /*      degree          plusminus       twosuperior     threesuperior   */
3211 CASE_GROUND_STATE,
3212 CASE_GROUND_STATE,
3213 CASE_GROUND_STATE,
3214 CASE_GROUND_STATE,
3215 /*      acute           mu              paragraph       periodcentered  */
3216 CASE_GROUND_STATE,
3217 CASE_GROUND_STATE,
3218 CASE_GROUND_STATE,
3219 CASE_GROUND_STATE,
3220 /*      cedilla         onesuperior     masculine       guillemotright  */
3221 CASE_GROUND_STATE,
3222 CASE_GROUND_STATE,
3223 CASE_GROUND_STATE,
3224 CASE_GROUND_STATE,
3225 /*      onequarter      onehalf         threequarters   questiondown    */
3226 CASE_GROUND_STATE,
3227 CASE_GROUND_STATE,
3228 CASE_GROUND_STATE,
3229 CASE_GROUND_STATE,
3230 /*      Agrave          Aacute          Acircumflex     Atilde          */
3231 CASE_GROUND_STATE,
3232 CASE_GROUND_STATE,
3233 CASE_GROUND_STATE,
3234 CASE_GROUND_STATE,
3235 /*      Adiaeresis      Aring           AE              Ccedilla        */
3236 CASE_GROUND_STATE,
3237 CASE_GROUND_STATE,
3238 CASE_GROUND_STATE,
3239 CASE_GROUND_STATE,
3240 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
3241 CASE_GROUND_STATE,
3242 CASE_GROUND_STATE,
3243 CASE_GROUND_STATE,
3244 CASE_GROUND_STATE,
3245 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
3246 CASE_GROUND_STATE,
3247 CASE_GROUND_STATE,
3248 CASE_GROUND_STATE,
3249 CASE_GROUND_STATE,
3250 /*      Eth             Ntilde          Ograve          Oacute          */
3251 CASE_GROUND_STATE,
3252 CASE_GROUND_STATE,
3253 CASE_GROUND_STATE,
3254 CASE_GROUND_STATE,
3255 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
3256 CASE_GROUND_STATE,
3257 CASE_GROUND_STATE,
3258 CASE_GROUND_STATE,
3259 CASE_GROUND_STATE,
3260 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
3261 CASE_GROUND_STATE,
3262 CASE_GROUND_STATE,
3263 CASE_GROUND_STATE,
3264 CASE_GROUND_STATE,
3265 /*      Udiaeresis      Yacute          Thorn           ssharp          */
3266 CASE_GROUND_STATE,
3267 CASE_GROUND_STATE,
3268 CASE_GROUND_STATE,
3269 CASE_GROUND_STATE,
3270 /*      agrave          aacute          acircumflex     atilde          */
3271 CASE_GROUND_STATE,
3272 CASE_GROUND_STATE,
3273 CASE_GROUND_STATE,
3274 CASE_GROUND_STATE,
3275 /*      adiaeresis      aring           ae              ccedilla        */
3276 CASE_GROUND_STATE,
3277 CASE_GROUND_STATE,
3278 CASE_GROUND_STATE,
3279 CASE_GROUND_STATE,
3280 /*      egrave          eacute          ecircumflex     ediaeresis      */
3281 CASE_GROUND_STATE,
3282 CASE_GROUND_STATE,
3283 CASE_GROUND_STATE,
3284 CASE_GROUND_STATE,
3285 /*      igrave          iacute          icircumflex     idiaeresis      */
3286 CASE_GROUND_STATE,
3287 CASE_GROUND_STATE,
3288 CASE_GROUND_STATE,
3289 CASE_GROUND_STATE,
3290 /*      eth             ntilde          ograve          oacute          */
3291 CASE_GROUND_STATE,
3292 CASE_GROUND_STATE,
3293 CASE_GROUND_STATE,
3294 CASE_GROUND_STATE,
3295 /*      ocircumflex     otilde          odiaeresis      division        */
3296 CASE_GROUND_STATE,
3297 CASE_GROUND_STATE,
3298 CASE_GROUND_STATE,
3299 CASE_GROUND_STATE,
3300 /*      oslash          ugrave          uacute          ucircumflex     */
3301 CASE_GROUND_STATE,
3302 CASE_GROUND_STATE,
3303 CASE_GROUND_STATE,
3304 CASE_GROUND_STATE,
3305 /*      udiaeresis      yacute          thorn           ydiaeresis      */
3306 CASE_GROUND_STATE,
3307 CASE_GROUND_STATE,
3308 CASE_GROUND_STATE,
3309 CASE_GROUND_STATE,
3310 };
3311 
3312 int scstable[] =		/* ESC ( etc. */
3313 {
3314 /*	NUL		SOH		STX		ETX	*/
3315 CASE_IGNORE,
3316 CASE_IGNORE,
3317 CASE_IGNORE,
3318 CASE_IGNORE,
3319 /*	EOT		ENQ		ACK		BEL	*/
3320 CASE_IGNORE,
3321 CASE_IGNORE,
3322 CASE_IGNORE,
3323 CASE_BELL,
3324 /*	BS		HT		NL		VT	*/
3325 CASE_BS,
3326 CASE_TAB,
3327 CASE_VMOT,
3328 CASE_VMOT,
3329 /*	NP		CR		SO		SI	*/
3330 CASE_VMOT,
3331 CASE_CR,
3332 CASE_SO,
3333 CASE_SI,
3334 /*	DLE		DC1		DC2		DC3	*/
3335 CASE_IGNORE,
3336 CASE_IGNORE,
3337 CASE_IGNORE,
3338 CASE_IGNORE,
3339 /*	DC4		NAK		SYN		ETB	*/
3340 CASE_IGNORE,
3341 CASE_IGNORE,
3342 CASE_IGNORE,
3343 CASE_IGNORE,
3344 /*	CAN		EM		SUB		ESC	*/
3345 CASE_IGNORE,
3346 CASE_IGNORE,
3347 CASE_IGNORE,
3348 CASE_ESC,
3349 /*	FS		GS		RS		US	*/
3350 CASE_IGNORE,
3351 CASE_IGNORE,
3352 CASE_IGNORE,
3353 CASE_IGNORE,
3354 /*	SP		!		"		#	*/
3355 CASE_ESC_IGNORE,
3356 CASE_ESC_IGNORE,
3357 CASE_ESC_IGNORE,
3358 CASE_ESC_IGNORE,
3359 /*	$		%		&		'	*/
3360 CASE_ESC_IGNORE,
3361 CASE_ESC_IGNORE,
3362 CASE_ESC_IGNORE,
3363 CASE_ESC_IGNORE,
3364 /*	(		)		*		+	*/
3365 CASE_ESC_IGNORE,
3366 CASE_ESC_IGNORE,
3367 CASE_ESC_IGNORE,
3368 CASE_ESC_IGNORE,
3369 /*	,		-		.		/	*/
3370 CASE_ESC_IGNORE,
3371 CASE_ESC_IGNORE,
3372 CASE_ESC_IGNORE,
3373 CASE_ESC_IGNORE,
3374 #ifdef USE_ISO2022
3375 /*	0		1		2		3	*/
3376 CASE_GSETS,
3377 CASE_GSETS,
3378 CASE_GSETS,
3379 CASE_GSETS,
3380 /*	4		5		6		7	*/
3381 CASE_GSETS,
3382 CASE_GSETS,
3383 CASE_GSETS,
3384 CASE_GSETS,
3385 /*	8		9		:		;	*/
3386 CASE_GSETS,
3387 CASE_GSETS,
3388 CASE_GSETS,
3389 CASE_GSETS,
3390 /*	<		=		>		?	*/
3391 CASE_GSETS,
3392 CASE_GSETS,
3393 CASE_GSETS,
3394 CASE_GSETS,
3395 /*	@		A		B		C	*/
3396 CASE_GSETS,
3397 CASE_GSETS,
3398 CASE_GSETS,
3399 CASE_GSETS,
3400 /*	D		E		F		G	*/
3401 CASE_GSETS,
3402 CASE_GSETS,
3403 CASE_GSETS,
3404 CASE_GSETS,
3405 /*	H		I		J		K	*/
3406 CASE_GSETS,
3407 CASE_GSETS,
3408 CASE_GSETS,
3409 CASE_GSETS,
3410 /*	L		M		N		O	*/
3411 CASE_GSETS,
3412 CASE_GSETS,
3413 CASE_GSETS,
3414 CASE_GSETS,
3415 /*	P		Q		R		S	*/
3416 CASE_GSETS,
3417 CASE_GSETS,
3418 CASE_GSETS,
3419 CASE_GSETS,
3420 /*	T		U		V		W	*/
3421 CASE_GSETS,
3422 CASE_GSETS,
3423 CASE_GSETS,
3424 CASE_GSETS,
3425 /*	X		Y		Z		[	*/
3426 CASE_GSETS,
3427 CASE_GSETS,
3428 CASE_GSETS,
3429 CASE_GSETS,
3430 /*	\		]		^		_	*/
3431 CASE_GSETS,
3432 CASE_GSETS,
3433 CASE_GSETS,
3434 CASE_GSETS,
3435 /*	`		a		b		c	*/
3436 CASE_GSETS,
3437 CASE_GSETS,
3438 CASE_GSETS,
3439 CASE_GSETS,
3440 /*	d		e		f		g	*/
3441 CASE_GSETS,
3442 CASE_GSETS,
3443 CASE_GSETS,
3444 CASE_GSETS,
3445 /*	h		i		j		k	*/
3446 CASE_GSETS,
3447 CASE_GSETS,
3448 CASE_GSETS,
3449 CASE_GSETS,
3450 /*	l		m		n		o	*/
3451 CASE_GSETS,
3452 CASE_GSETS,
3453 CASE_GSETS,
3454 CASE_GROUND_STATE, /* GSET('p') >= 0x40 (MBCS flag) */
3455 /*	p		q		r		s	*/
3456 CASE_GROUND_STATE,
3457 CASE_GROUND_STATE,
3458 CASE_GROUND_STATE,
3459 CASE_GROUND_STATE,
3460 /*	t		u		v		w	*/
3461 CASE_GROUND_STATE,
3462 CASE_GROUND_STATE,
3463 CASE_GROUND_STATE,
3464 CASE_GROUND_STATE,
3465 /*	x		y		z		{	*/
3466 CASE_GROUND_STATE,
3467 CASE_GROUND_STATE,
3468 CASE_GROUND_STATE,
3469 CASE_GROUND_STATE,
3470 /*	|		}		~		DEL	*/
3471 CASE_GROUND_STATE,
3472 CASE_GROUND_STATE,
3473 CASE_GROUND_STATE, /* empty character set */
3474 CASE_GROUND_STATE,
3475 #else /* !USE_ISO2022 */
3476 /*	0		1		2		3	*/
3477 CASE_GSETS,
3478 CASE_GSETS,
3479 CASE_GSETS,
3480 CASE_GROUND_STATE,
3481 /*	4		5		6		7	*/
3482 CASE_GROUND_STATE,
3483 CASE_GROUND_STATE,
3484 CASE_GROUND_STATE,
3485 CASE_GROUND_STATE,
3486 /*	8		9		:		;	*/
3487 CASE_GROUND_STATE,
3488 CASE_GROUND_STATE,
3489 CASE_GROUND_STATE,
3490 CASE_GROUND_STATE,
3491 /*	<		=		>		?	*/
3492 CASE_GROUND_STATE,
3493 CASE_GROUND_STATE,
3494 CASE_GROUND_STATE,
3495 CASE_GROUND_STATE,
3496 /*	@		A		B		C	*/
3497 CASE_GROUND_STATE,
3498 CASE_GSETS,
3499 CASE_GSETS,
3500 CASE_GROUND_STATE,
3501 /*	D		E		F		G	*/
3502 CASE_GROUND_STATE,
3503 CASE_GROUND_STATE,
3504 CASE_GROUND_STATE,
3505 CASE_GROUND_STATE,
3506 /*	H		I		J		K	*/
3507 CASE_GROUND_STATE,
3508 CASE_GROUND_STATE,
3509 CASE_GROUND_STATE,
3510 CASE_GROUND_STATE,
3511 /*	L		M		N		O	*/
3512 CASE_GROUND_STATE,
3513 CASE_GROUND_STATE,
3514 CASE_GROUND_STATE,
3515 CASE_GROUND_STATE,
3516 /*	P		Q		R		S	*/
3517 CASE_GROUND_STATE,
3518 CASE_GROUND_STATE,
3519 CASE_GROUND_STATE,
3520 CASE_GROUND_STATE,
3521 /*	T		U		V		W	*/
3522 CASE_GROUND_STATE,
3523 CASE_GROUND_STATE,
3524 CASE_GROUND_STATE,
3525 CASE_GROUND_STATE,
3526 /*	X		Y		Z		[	*/
3527 CASE_GROUND_STATE,
3528 CASE_GROUND_STATE,
3529 CASE_GROUND_STATE,
3530 CASE_GROUND_STATE,
3531 /*	\		]		^		_	*/
3532 CASE_GROUND_STATE,
3533 CASE_GROUND_STATE,
3534 CASE_GROUND_STATE,
3535 CASE_GROUND_STATE,
3536 /*	`		a		b		c	*/
3537 CASE_GROUND_STATE,
3538 CASE_GROUND_STATE,
3539 CASE_GROUND_STATE,
3540 CASE_GROUND_STATE,
3541 /*	d		e		f		g	*/
3542 CASE_GROUND_STATE,
3543 CASE_GROUND_STATE,
3544 CASE_GROUND_STATE,
3545 CASE_GROUND_STATE,
3546 /*	h		i		j		k	*/
3547 CASE_GROUND_STATE,
3548 CASE_GROUND_STATE,
3549 CASE_GROUND_STATE,
3550 CASE_GROUND_STATE,
3551 /*	l		m		n		o	*/
3552 CASE_GROUND_STATE,
3553 CASE_GROUND_STATE,
3554 CASE_GROUND_STATE,
3555 CASE_GROUND_STATE,
3556 /*	p		q		r		s	*/
3557 CASE_GROUND_STATE,
3558 CASE_GROUND_STATE,
3559 CASE_GROUND_STATE,
3560 CASE_GROUND_STATE,
3561 /*	t		u		v		w	*/
3562 CASE_GROUND_STATE,
3563 CASE_GROUND_STATE,
3564 CASE_GROUND_STATE,
3565 CASE_GROUND_STATE,
3566 /*	x		y		z		{	*/
3567 CASE_GROUND_STATE,
3568 CASE_GROUND_STATE,
3569 CASE_GROUND_STATE,
3570 CASE_GROUND_STATE,
3571 /*	|		}		~		DEL	*/
3572 CASE_GROUND_STATE,
3573 CASE_GROUND_STATE,
3574 CASE_GROUND_STATE,
3575 CASE_GROUND_STATE,
3576 #endif /* !USE_ISO2022 */
3577 /*      0x80            0x81            0x82            0x83    */
3578 CASE_IGNORE,
3579 CASE_IGNORE,
3580 CASE_IGNORE,
3581 CASE_IGNORE,
3582 /*      0x84            0x85            0x86            0x87    */
3583 CASE_IGNORE,
3584 CASE_IGNORE,
3585 CASE_IGNORE,
3586 CASE_IGNORE,
3587 /*      0x88            0x89            0x8a            0x8b    */
3588 CASE_IGNORE,
3589 CASE_IGNORE,
3590 CASE_IGNORE,
3591 CASE_IGNORE,
3592 /*      0x8c            0x8d            0x8e            0x8f    */
3593 CASE_IGNORE,
3594 CASE_IGNORE,
3595 CASE_IGNORE,
3596 CASE_IGNORE,
3597 /*      0x90            0x91            0x92            0x93    */
3598 CASE_IGNORE,
3599 CASE_IGNORE,
3600 CASE_IGNORE,
3601 CASE_IGNORE,
3602 /*      0x94            0x95            0x96            0x97    */
3603 CASE_IGNORE,
3604 CASE_IGNORE,
3605 CASE_IGNORE,
3606 CASE_IGNORE,
3607 /*      0x99            0x99            0x9a            0x9b    */
3608 CASE_IGNORE,
3609 CASE_IGNORE,
3610 CASE_IGNORE,
3611 CASE_IGNORE,
3612 /*      0x9c            0x9d            0x9e            0x9f    */
3613 CASE_IGNORE,
3614 CASE_IGNORE,
3615 CASE_IGNORE,
3616 CASE_IGNORE,
3617 /*      nobreakspace    exclamdown      cent            sterling        */
3618 CASE_GROUND_STATE,
3619 CASE_GROUND_STATE,
3620 CASE_GROUND_STATE,
3621 CASE_GROUND_STATE,
3622 /*      currency        yen             brokenbar       section         */
3623 CASE_GROUND_STATE,
3624 CASE_GROUND_STATE,
3625 CASE_GROUND_STATE,
3626 CASE_GROUND_STATE,
3627 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
3628 CASE_GROUND_STATE,
3629 CASE_GROUND_STATE,
3630 CASE_GROUND_STATE,
3631 CASE_GROUND_STATE,
3632 /*      notsign         hyphen          registered      macron          */
3633 CASE_GROUND_STATE,
3634 CASE_GROUND_STATE,
3635 CASE_GROUND_STATE,
3636 CASE_GROUND_STATE,
3637 /*      degree          plusminus       twosuperior     threesuperior   */
3638 CASE_GROUND_STATE,
3639 CASE_GROUND_STATE,
3640 CASE_GROUND_STATE,
3641 CASE_GROUND_STATE,
3642 /*      acute           mu              paragraph       periodcentered  */
3643 CASE_GROUND_STATE,
3644 CASE_GROUND_STATE,
3645 CASE_GROUND_STATE,
3646 CASE_GROUND_STATE,
3647 /*      cedilla         onesuperior     masculine       guillemotright  */
3648 CASE_GROUND_STATE,
3649 CASE_GROUND_STATE,
3650 CASE_GROUND_STATE,
3651 CASE_GROUND_STATE,
3652 /*      onequarter      onehalf         threequarters   questiondown    */
3653 CASE_GROUND_STATE,
3654 CASE_GROUND_STATE,
3655 CASE_GROUND_STATE,
3656 CASE_GROUND_STATE,
3657 /*      Agrave          Aacute          Acircumflex     Atilde          */
3658 CASE_GROUND_STATE,
3659 CASE_GROUND_STATE,
3660 CASE_GROUND_STATE,
3661 CASE_GROUND_STATE,
3662 /*      Adiaeresis      Aring           AE              Ccedilla        */
3663 CASE_GROUND_STATE,
3664 CASE_GROUND_STATE,
3665 CASE_GROUND_STATE,
3666 CASE_GROUND_STATE,
3667 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
3668 CASE_GROUND_STATE,
3669 CASE_GROUND_STATE,
3670 CASE_GROUND_STATE,
3671 CASE_GROUND_STATE,
3672 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
3673 CASE_GROUND_STATE,
3674 CASE_GROUND_STATE,
3675 CASE_GROUND_STATE,
3676 CASE_GROUND_STATE,
3677 /*      Eth             Ntilde          Ograve          Oacute          */
3678 CASE_GROUND_STATE,
3679 CASE_GROUND_STATE,
3680 CASE_GROUND_STATE,
3681 CASE_GROUND_STATE,
3682 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
3683 CASE_GROUND_STATE,
3684 CASE_GROUND_STATE,
3685 CASE_GROUND_STATE,
3686 CASE_GROUND_STATE,
3687 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
3688 CASE_GROUND_STATE,
3689 CASE_GROUND_STATE,
3690 CASE_GROUND_STATE,
3691 CASE_GROUND_STATE,
3692 /*      Udiaeresis      Yacute          Thorn           ssharp          */
3693 CASE_GROUND_STATE,
3694 CASE_GROUND_STATE,
3695 CASE_GROUND_STATE,
3696 CASE_GROUND_STATE,
3697 /*      agrave          aacute          acircumflex     atilde          */
3698 CASE_GROUND_STATE,
3699 CASE_GROUND_STATE,
3700 CASE_GROUND_STATE,
3701 CASE_GROUND_STATE,
3702 /*      adiaeresis      aring           ae              ccedilla        */
3703 CASE_GROUND_STATE,
3704 CASE_GROUND_STATE,
3705 CASE_GROUND_STATE,
3706 CASE_GROUND_STATE,
3707 /*      egrave          eacute          ecircumflex     ediaeresis      */
3708 CASE_GROUND_STATE,
3709 CASE_GROUND_STATE,
3710 CASE_GROUND_STATE,
3711 CASE_GROUND_STATE,
3712 /*      igrave          iacute          icircumflex     idiaeresis      */
3713 CASE_GROUND_STATE,
3714 CASE_GROUND_STATE,
3715 CASE_GROUND_STATE,
3716 CASE_GROUND_STATE,
3717 /*      eth             ntilde          ograve          oacute          */
3718 CASE_GROUND_STATE,
3719 CASE_GROUND_STATE,
3720 CASE_GROUND_STATE,
3721 CASE_GROUND_STATE,
3722 /*      ocircumflex     otilde          odiaeresis      division        */
3723 CASE_GROUND_STATE,
3724 CASE_GROUND_STATE,
3725 CASE_GROUND_STATE,
3726 CASE_GROUND_STATE,
3727 /*      oslash          ugrave          uacute          ucircumflex     */
3728 CASE_GROUND_STATE,
3729 CASE_GROUND_STATE,
3730 CASE_GROUND_STATE,
3731 CASE_GROUND_STATE,
3732 /*      udiaeresis      yacute          thorn           ydiaeresis      */
3733 CASE_GROUND_STATE,
3734 CASE_GROUND_STATE,
3735 CASE_GROUND_STATE,
3736 CASE_GROUND_STATE,
3737 };
3738 
3739 #ifdef USE_MBCS
3740 int mbcstable[] = {
3741 /*	NUL		SOH		STX		ETX	*/
3742 CASE_IGNORE,
3743 CASE_IGNORE,
3744 CASE_IGNORE,
3745 CASE_IGNORE,
3746 /*	EOT		ENQ		ACK		BEL	*/
3747 CASE_IGNORE,
3748 CASE_IGNORE,
3749 CASE_IGNORE,
3750 CASE_BELL,
3751 /*	BS		HT		NL		VT	*/
3752 CASE_BS,
3753 CASE_TAB,
3754 CASE_VMOT,
3755 CASE_VMOT,
3756 /*	NP		CR		SO		SI	*/
3757 CASE_VMOT,
3758 CASE_CR,
3759 CASE_SO,
3760 CASE_SI,
3761 /*	DLE		DC1		DC2		DC3	*/
3762 CASE_IGNORE,
3763 CASE_IGNORE,
3764 CASE_IGNORE,
3765 CASE_IGNORE,
3766 /*	DC4		NAK		SYN		ETB	*/
3767 CASE_IGNORE,
3768 CASE_IGNORE,
3769 CASE_IGNORE,
3770 CASE_IGNORE,
3771 /*	CAN		EM		SUB		ESC	*/
3772 CASE_IGNORE,
3773 CASE_IGNORE,
3774 CASE_IGNORE,
3775 CASE_ESC,
3776 /*	FS		GS		RS		US	*/
3777 CASE_IGNORE,
3778 CASE_IGNORE,
3779 CASE_IGNORE,
3780 CASE_IGNORE,
3781 /*	SP		!		"		#	*/
3782 CASE_ESC_IGNORE,
3783 CASE_ESC_IGNORE,
3784 CASE_ESC_IGNORE,
3785 CASE_ESC_IGNORE,
3786 /*	$		%		&		'	*/
3787 CASE_ESC_IGNORE,
3788 CASE_ESC_IGNORE,
3789 CASE_ESC_IGNORE,
3790 CASE_ESC_IGNORE,
3791 /*	(		)		*		+	*/
3792 CASE_IGNORE, /*CASE_SCS_STATE,*/
3793 CASE_SCS_STATE,
3794 CASE_SCS_STATE,
3795 CASE_SCS_STATE,
3796 /*	,		-		.		/	*/
3797 CASE_ESC_IGNORE,
3798 CASE_SCS_STATE,
3799 CASE_SCS_STATE,
3800 CASE_SCS_STATE,
3801 /*	0		1		2		3	*/
3802 CASE_GROUND_STATE,
3803 CASE_GROUND_STATE,
3804 CASE_GROUND_STATE,
3805 CASE_GROUND_STATE,
3806 /*	4		5		6		7	*/
3807 CASE_GROUND_STATE,
3808 CASE_GROUND_STATE,
3809 CASE_GROUND_STATE,
3810 CASE_GROUND_STATE,
3811 /*	8		9		:		;	*/
3812 CASE_GROUND_STATE,
3813 CASE_GROUND_STATE,
3814 CASE_GROUND_STATE,
3815 CASE_GROUND_STATE,
3816 /*	<		=		>		?	*/
3817 CASE_GROUND_STATE,
3818 CASE_GROUND_STATE,
3819 CASE_GROUND_STATE,
3820 CASE_GROUND_STATE,
3821 /*	@		A		B		C	*/
3822 CASE_GSETS,	/* ESC-$-@ (JIS-78) */
3823 CASE_GSETS,	/* ESC-$-A (GB) */
3824 CASE_GSETS,	/* ESC-$-B (JIS-83) */
3825 CASE_GROUND_STATE,
3826 /*	D		E		F		G	*/
3827 CASE_GROUND_STATE,
3828 CASE_GROUND_STATE,
3829 CASE_GROUND_STATE,
3830 CASE_GROUND_STATE,
3831 /*	H		I		J		K	*/
3832 CASE_GROUND_STATE,
3833 CASE_GROUND_STATE,
3834 CASE_GROUND_STATE,
3835 CASE_GROUND_STATE,
3836 /*	L		M		N		O	*/
3837 CASE_GROUND_STATE,
3838 CASE_GROUND_STATE,
3839 CASE_GROUND_STATE,
3840 CASE_GROUND_STATE,
3841 /*	P		Q		R		S	*/
3842 CASE_IGNORE_STATE,
3843 CASE_GROUND_STATE,
3844 CASE_GROUND_STATE,
3845 CASE_GROUND_STATE,
3846 /*	T		U		V		W	*/
3847 CASE_GROUND_STATE,
3848 CASE_GROUND_STATE,
3849 CASE_GROUND_STATE,
3850 CASE_GROUND_STATE,
3851 /*	X		Y		Z		[	*/
3852 CASE_GROUND_STATE,
3853 CASE_GROUND_STATE,
3854 CASE_GROUND_STATE,
3855 CASE_GROUND_STATE,
3856 /*	\		]		^		_	*/
3857 CASE_GROUND_STATE,
3858 CASE_GROUND_STATE,
3859 CASE_IGNORE_STATE,
3860 CASE_IGNORE_STATE,
3861 /*	`		a		b		c	*/
3862 CASE_GROUND_STATE,
3863 CASE_GROUND_STATE,
3864 CASE_GROUND_STATE,
3865 CASE_GROUND_STATE,
3866 /*	d		e		f		g	*/
3867 CASE_GROUND_STATE,
3868 CASE_GROUND_STATE,
3869 CASE_GROUND_STATE,
3870 CASE_GROUND_STATE,
3871 /*	h		i		j		k	*/
3872 CASE_GROUND_STATE,
3873 CASE_GROUND_STATE,
3874 CASE_GROUND_STATE,
3875 CASE_GROUND_STATE,
3876 /*	l		m		n		o	*/
3877 CASE_GROUND_STATE,
3878 CASE_GROUND_STATE,
3879 CASE_GROUND_STATE,
3880 CASE_GROUND_STATE,
3881 /*	p		q		r		s	*/
3882 CASE_GROUND_STATE,
3883 CASE_GROUND_STATE,
3884 CASE_GROUND_STATE,
3885 CASE_GROUND_STATE,
3886 /*	t		u		v		w	*/
3887 CASE_GROUND_STATE,
3888 CASE_GROUND_STATE,
3889 CASE_GROUND_STATE,
3890 CASE_GROUND_STATE,
3891 /*	x		y		z		{	*/
3892 CASE_GROUND_STATE,
3893 CASE_GROUND_STATE,
3894 CASE_GROUND_STATE,
3895 CASE_GROUND_STATE,
3896 /*	|		}		~		DEL	*/
3897 CASE_GROUND_STATE,
3898 CASE_GROUND_STATE,
3899 CASE_GROUND_STATE,
3900 CASE_GROUND_STATE,
3901 /*      0x80            0x81            0x82            0x83    */
3902 CASE_IGNORE,
3903 CASE_IGNORE,
3904 CASE_IGNORE,
3905 CASE_IGNORE,
3906 /*      0x84            0x85            0x86            0x87    */
3907 CASE_IGNORE,
3908 CASE_IGNORE,
3909 CASE_IGNORE,
3910 CASE_IGNORE,
3911 /*      0x88            0x89            0x8a            0x8b    */
3912 CASE_IGNORE,
3913 CASE_IGNORE,
3914 CASE_IGNORE,
3915 CASE_IGNORE,
3916 /*      0x8c            0x8d            0x8e            0x8f    */
3917 CASE_IGNORE,
3918 CASE_IGNORE,
3919 CASE_IGNORE,
3920 CASE_IGNORE,
3921 /*      0x90            0x91            0x92            0x93    */
3922 CASE_IGNORE,
3923 CASE_IGNORE,
3924 CASE_IGNORE,
3925 CASE_IGNORE,
3926 /*      0x94            0x95            0x96            0x97    */
3927 CASE_IGNORE,
3928 CASE_IGNORE,
3929 CASE_IGNORE,
3930 CASE_IGNORE,
3931 /*      0x99            0x99            0x9a            0x9b    */
3932 CASE_IGNORE,
3933 CASE_IGNORE,
3934 CASE_IGNORE,
3935 CASE_IGNORE,
3936 /*      0x9c            0x9d            0x9e            0x9f    */
3937 CASE_IGNORE,
3938 CASE_IGNORE,
3939 CASE_IGNORE,
3940 CASE_IGNORE,
3941 /*      nobreakspace    exclamdown      cent            sterling        */
3942 CASE_GROUND_STATE,
3943 CASE_GROUND_STATE,
3944 CASE_GROUND_STATE,
3945 CASE_GROUND_STATE,
3946 /*      currency        yen             brokenbar       section         */
3947 CASE_GROUND_STATE,
3948 CASE_GROUND_STATE,
3949 CASE_GROUND_STATE,
3950 CASE_GROUND_STATE,
3951 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
3952 CASE_GROUND_STATE,
3953 CASE_GROUND_STATE,
3954 CASE_GROUND_STATE,
3955 CASE_GROUND_STATE,
3956 /*      notsign         hyphen          registered      macron          */
3957 CASE_GROUND_STATE,
3958 CASE_GROUND_STATE,
3959 CASE_GROUND_STATE,
3960 CASE_GROUND_STATE,
3961 /*      degree          plusminus       twosuperior     threesuperior   */
3962 CASE_GROUND_STATE,
3963 CASE_GROUND_STATE,
3964 CASE_GROUND_STATE,
3965 CASE_GROUND_STATE,
3966 /*      acute           mu              paragraph       periodcentered  */
3967 CASE_GROUND_STATE,
3968 CASE_GROUND_STATE,
3969 CASE_GROUND_STATE,
3970 CASE_GROUND_STATE,
3971 /*      cedilla         onesuperior     masculine       guillemotright  */
3972 CASE_GROUND_STATE,
3973 CASE_GROUND_STATE,
3974 CASE_GROUND_STATE,
3975 CASE_GROUND_STATE,
3976 /*      onequarter      onehalf         threequarters   questiondown    */
3977 CASE_GROUND_STATE,
3978 CASE_GROUND_STATE,
3979 CASE_GROUND_STATE,
3980 CASE_GROUND_STATE,
3981 /*      Agrave          Aacute          Acircumflex     Atilde          */
3982 CASE_GROUND_STATE,
3983 CASE_GROUND_STATE,
3984 CASE_GROUND_STATE,
3985 CASE_GROUND_STATE,
3986 /*      Adiaeresis      Aring           AE              Ccedilla        */
3987 CASE_GROUND_STATE,
3988 CASE_GROUND_STATE,
3989 CASE_GROUND_STATE,
3990 CASE_GROUND_STATE,
3991 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
3992 CASE_GROUND_STATE,
3993 CASE_GROUND_STATE,
3994 CASE_GROUND_STATE,
3995 CASE_GROUND_STATE,
3996 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
3997 CASE_GROUND_STATE,
3998 CASE_GROUND_STATE,
3999 CASE_GROUND_STATE,
4000 CASE_GROUND_STATE,
4001 /*      Eth             Ntilde          Ograve          Oacute          */
4002 CASE_GROUND_STATE,
4003 CASE_GROUND_STATE,
4004 CASE_GROUND_STATE,
4005 CASE_GROUND_STATE,
4006 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
4007 CASE_GROUND_STATE,
4008 CASE_GROUND_STATE,
4009 CASE_GROUND_STATE,
4010 CASE_GROUND_STATE,
4011 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
4012 CASE_GROUND_STATE,
4013 CASE_GROUND_STATE,
4014 CASE_GROUND_STATE,
4015 CASE_GROUND_STATE,
4016 /*      Udiaeresis      Yacute          Thorn           ssharp          */
4017 CASE_GROUND_STATE,
4018 CASE_GROUND_STATE,
4019 CASE_GROUND_STATE,
4020 CASE_GROUND_STATE,
4021 /*      agrave          aacute          acircumflex     atilde          */
4022 CASE_GROUND_STATE,
4023 CASE_GROUND_STATE,
4024 CASE_GROUND_STATE,
4025 CASE_GROUND_STATE,
4026 /*      adiaeresis      aring           ae              ccedilla        */
4027 CASE_GROUND_STATE,
4028 CASE_GROUND_STATE,
4029 CASE_GROUND_STATE,
4030 CASE_GROUND_STATE,
4031 /*      egrave          eacute          ecircumflex     ediaeresis      */
4032 CASE_GROUND_STATE,
4033 CASE_GROUND_STATE,
4034 CASE_GROUND_STATE,
4035 CASE_GROUND_STATE,
4036 /*      igrave          iacute          icircumflex     idiaeresis      */
4037 CASE_GROUND_STATE,
4038 CASE_GROUND_STATE,
4039 CASE_GROUND_STATE,
4040 CASE_GROUND_STATE,
4041 /*      eth             ntilde          ograve          oacute          */
4042 CASE_GROUND_STATE,
4043 CASE_GROUND_STATE,
4044 CASE_GROUND_STATE,
4045 CASE_GROUND_STATE,
4046 /*      ocircumflex     otilde          odiaeresis      division        */
4047 CASE_GROUND_STATE,
4048 CASE_GROUND_STATE,
4049 CASE_GROUND_STATE,
4050 CASE_GROUND_STATE,
4051 /*      oslash          ugrave          uacute          ucircumflex     */
4052 CASE_GROUND_STATE,
4053 CASE_GROUND_STATE,
4054 CASE_GROUND_STATE,
4055 CASE_GROUND_STATE,
4056 /*      udiaeresis      yacute          thorn           ydiaeresis      */
4057 CASE_GROUND_STATE,
4058 CASE_GROUND_STATE,
4059 CASE_GROUND_STATE,
4060 CASE_GROUND_STATE,
4061 };
4062 
4063 int smbcstable[] = {
4064 /*	NUL		SOH		STX		ETX	*/
4065 CASE_IGNORE,
4066 CASE_IGNORE,
4067 CASE_IGNORE,
4068 CASE_IGNORE,
4069 /*	EOT		ENQ		ACK		BEL	*/
4070 CASE_IGNORE,
4071 CASE_IGNORE,
4072 CASE_IGNORE,
4073 CASE_BELL,
4074 /*	BS		HT		NL		VT	*/
4075 CASE_BS,
4076 CASE_TAB,
4077 CASE_VMOT,
4078 CASE_VMOT,
4079 /*	NP		CR		SO		SI	*/
4080 CASE_VMOT,
4081 CASE_CR,
4082 CASE_SO,
4083 CASE_SI,
4084 /*	DLE		DC1		DC2		DC3	*/
4085 CASE_IGNORE,
4086 CASE_IGNORE,
4087 CASE_IGNORE,
4088 CASE_IGNORE,
4089 /*	DC4		NAK		SYN		ETB	*/
4090 CASE_IGNORE,
4091 CASE_IGNORE,
4092 CASE_IGNORE,
4093 CASE_IGNORE,
4094 /*	CAN		EM		SUB		ESC	*/
4095 CASE_IGNORE,
4096 CASE_IGNORE,
4097 CASE_IGNORE,
4098 CASE_ESC,
4099 /*	FS		GS		RS		US	*/
4100 CASE_IGNORE,
4101 CASE_IGNORE,
4102 CASE_IGNORE,
4103 CASE_IGNORE,
4104 /*	SP		!		"		#	*/
4105 CASE_ESC_IGNORE,
4106 CASE_ESC_IGNORE,
4107 CASE_ESC_IGNORE,
4108 CASE_ESC_IGNORE,
4109 /*	$		%		&		'	*/
4110 CASE_ESC_IGNORE,
4111 CASE_ESC_IGNORE,
4112 CASE_ESC_IGNORE,
4113 CASE_ESC_IGNORE,
4114 /*	(		)		*		+	*/
4115 CASE_ESC_IGNORE,
4116 CASE_ESC_IGNORE,
4117 CASE_ESC_IGNORE,
4118 CASE_ESC_IGNORE,
4119 /*	,		-		.		/	*/
4120 CASE_ESC_IGNORE,
4121 CASE_ESC_IGNORE,
4122 CASE_ESC_IGNORE,
4123 CASE_ESC_IGNORE,
4124 /*	0		1		2		3	*/
4125 CASE_GROUND_STATE, /* (2-byte or more) private character set */
4126 CASE_GROUND_STATE,
4127 CASE_GROUND_STATE,
4128 CASE_GROUND_STATE,
4129 /*	4		5		6		7	*/
4130 CASE_GROUND_STATE,
4131 CASE_GROUND_STATE,
4132 CASE_GROUND_STATE,
4133 CASE_GROUND_STATE,
4134 /*	8		9		:		;	*/
4135 CASE_GROUND_STATE,
4136 CASE_GROUND_STATE,
4137 CASE_GROUND_STATE,
4138 CASE_GROUND_STATE,
4139 /*	<		=		>		?	*/
4140 CASE_GROUND_STATE,
4141 CASE_GROUND_STATE,
4142 CASE_GROUND_STATE,
4143 CASE_GROUND_STATE,
4144 /*	@		A		B		C	*/
4145 CASE_GSETS,	/* ESC-$-I-F */
4146 CASE_GSETS,
4147 CASE_GSETS,
4148 CASE_GSETS,
4149 /*	D		E		F		G	*/
4150 CASE_GSETS,
4151 CASE_GSETS,
4152 CASE_GSETS,
4153 CASE_GSETS,
4154 /*	H		I		J		K	*/
4155 CASE_GSETS,
4156 CASE_GSETS,
4157 CASE_GSETS,
4158 CASE_GSETS,
4159 /*	L		M		N		O	*/
4160 CASE_GSETS,
4161 CASE_GSETS,
4162 CASE_GSETS,
4163 CASE_GSETS,
4164 /*	P		Q		R		S	*/
4165 CASE_GSETS,
4166 CASE_GSETS,
4167 CASE_GSETS,
4168 CASE_GSETS,
4169 /*	T		U		V		W	*/
4170 CASE_GSETS,
4171 CASE_GSETS,
4172 CASE_GSETS,
4173 CASE_GSETS,
4174 /*	X		Y		Z		[	*/
4175 CASE_GSETS,
4176 CASE_GSETS,
4177 CASE_GSETS,
4178 CASE_GSETS,
4179 /*	\		]		^		_	*/
4180 CASE_GSETS,
4181 CASE_GSETS,
4182 CASE_GSETS,
4183 CASE_GSETS,
4184 /*	`		a		b		c	*/
4185 CASE_GROUND_STATE, /* 3-byte character set */
4186 CASE_GROUND_STATE,
4187 CASE_GROUND_STATE,
4188 CASE_GROUND_STATE,
4189 /*	d		e		f		g	*/
4190 CASE_GROUND_STATE,
4191 CASE_GROUND_STATE,
4192 CASE_GROUND_STATE,
4193 CASE_GROUND_STATE,
4194 /*	h		i		j		k	*/
4195 CASE_GROUND_STATE,
4196 CASE_GROUND_STATE,
4197 CASE_GROUND_STATE,
4198 CASE_GROUND_STATE,
4199 /*	l		m		n		o	*/
4200 CASE_GROUND_STATE,
4201 CASE_GROUND_STATE,
4202 CASE_GROUND_STATE,
4203 CASE_GROUND_STATE,
4204 /*	p		q		r		s	*/
4205 CASE_GROUND_STATE, /* 4-byte character set */
4206 CASE_GROUND_STATE,
4207 CASE_GROUND_STATE,
4208 CASE_GROUND_STATE,
4209 /*	t		u		v		w	*/
4210 CASE_GROUND_STATE,
4211 CASE_GROUND_STATE,
4212 CASE_GROUND_STATE,
4213 CASE_GROUND_STATE,
4214 /*	x		y		z		{	*/
4215 CASE_GROUND_STATE,
4216 CASE_GROUND_STATE,
4217 CASE_GROUND_STATE,
4218 CASE_GROUND_STATE,
4219 /*	|		}		~		DEL	*/
4220 CASE_GROUND_STATE,
4221 CASE_GROUND_STATE,
4222 CASE_GROUND_STATE,
4223 CASE_GROUND_STATE,
4224 /*      0x80            0x81            0x82            0x83    */
4225 CASE_IGNORE,
4226 CASE_IGNORE,
4227 CASE_IGNORE,
4228 CASE_IGNORE,
4229 /*      0x84            0x85            0x86            0x87    */
4230 CASE_IGNORE,
4231 CASE_IGNORE,
4232 CASE_IGNORE,
4233 CASE_IGNORE,
4234 /*      0x88            0x89            0x8a            0x8b    */
4235 CASE_IGNORE,
4236 CASE_IGNORE,
4237 CASE_IGNORE,
4238 CASE_IGNORE,
4239 /*      0x8c            0x8d            0x8e            0x8f    */
4240 CASE_IGNORE,
4241 CASE_IGNORE,
4242 CASE_IGNORE,
4243 CASE_IGNORE,
4244 /*      0x90            0x91            0x92            0x93    */
4245 CASE_IGNORE,
4246 CASE_IGNORE,
4247 CASE_IGNORE,
4248 CASE_IGNORE,
4249 /*      0x94            0x95            0x96            0x97    */
4250 CASE_IGNORE,
4251 CASE_IGNORE,
4252 CASE_IGNORE,
4253 CASE_IGNORE,
4254 /*      0x99            0x99            0x9a            0x9b    */
4255 CASE_IGNORE,
4256 CASE_IGNORE,
4257 CASE_IGNORE,
4258 CASE_IGNORE,
4259 /*      0x9c            0x9d            0x9e            0x9f    */
4260 CASE_IGNORE,
4261 CASE_IGNORE,
4262 CASE_IGNORE,
4263 CASE_IGNORE,
4264 /*      nobreakspace    exclamdown      cent            sterling        */
4265 CASE_GROUND_STATE,
4266 CASE_GROUND_STATE,
4267 CASE_GROUND_STATE,
4268 CASE_GROUND_STATE,
4269 /*      currency        yen             brokenbar       section         */
4270 CASE_GROUND_STATE,
4271 CASE_GROUND_STATE,
4272 CASE_GROUND_STATE,
4273 CASE_GROUND_STATE,
4274 /*      diaeresis       copyright       ordfeminine     guillemotleft   */
4275 CASE_GROUND_STATE,
4276 CASE_GROUND_STATE,
4277 CASE_GROUND_STATE,
4278 CASE_GROUND_STATE,
4279 /*      notsign         hyphen          registered      macron          */
4280 CASE_GROUND_STATE,
4281 CASE_GROUND_STATE,
4282 CASE_GROUND_STATE,
4283 CASE_GROUND_STATE,
4284 /*      degree          plusminus       twosuperior     threesuperior   */
4285 CASE_GROUND_STATE,
4286 CASE_GROUND_STATE,
4287 CASE_GROUND_STATE,
4288 CASE_GROUND_STATE,
4289 /*      acute           mu              paragraph       periodcentered  */
4290 CASE_GROUND_STATE,
4291 CASE_GROUND_STATE,
4292 CASE_GROUND_STATE,
4293 CASE_GROUND_STATE,
4294 /*      cedilla         onesuperior     masculine       guillemotright  */
4295 CASE_GROUND_STATE,
4296 CASE_GROUND_STATE,
4297 CASE_GROUND_STATE,
4298 CASE_GROUND_STATE,
4299 /*      onequarter      onehalf         threequarters   questiondown    */
4300 CASE_GROUND_STATE,
4301 CASE_GROUND_STATE,
4302 CASE_GROUND_STATE,
4303 CASE_GROUND_STATE,
4304 /*      Agrave          Aacute          Acircumflex     Atilde          */
4305 CASE_GROUND_STATE,
4306 CASE_GROUND_STATE,
4307 CASE_GROUND_STATE,
4308 CASE_GROUND_STATE,
4309 /*      Adiaeresis      Aring           AE              Ccedilla        */
4310 CASE_GROUND_STATE,
4311 CASE_GROUND_STATE,
4312 CASE_GROUND_STATE,
4313 CASE_GROUND_STATE,
4314 /*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
4315 CASE_GROUND_STATE,
4316 CASE_GROUND_STATE,
4317 CASE_GROUND_STATE,
4318 CASE_GROUND_STATE,
4319 /*      Igrave          Iacute          Icircumflex     Idiaeresis      */
4320 CASE_GROUND_STATE,
4321 CASE_GROUND_STATE,
4322 CASE_GROUND_STATE,
4323 CASE_GROUND_STATE,
4324 /*      Eth             Ntilde          Ograve          Oacute          */
4325 CASE_GROUND_STATE,
4326 CASE_GROUND_STATE,
4327 CASE_GROUND_STATE,
4328 CASE_GROUND_STATE,
4329 /*      Ocircumflex     Otilde          Odiaeresis      multiply        */
4330 CASE_GROUND_STATE,
4331 CASE_GROUND_STATE,
4332 CASE_GROUND_STATE,
4333 CASE_GROUND_STATE,
4334 /*      Ooblique        Ugrave          Uacute          Ucircumflex     */
4335 CASE_GROUND_STATE,
4336 CASE_GROUND_STATE,
4337 CASE_GROUND_STATE,
4338 CASE_GROUND_STATE,
4339 /*      Udiaeresis      Yacute          Thorn           ssharp          */
4340 CASE_GROUND_STATE,
4341 CASE_GROUND_STATE,
4342 CASE_GROUND_STATE,
4343 CASE_GROUND_STATE,
4344 /*      agrave          aacute          acircumflex     atilde          */
4345 CASE_GROUND_STATE,
4346 CASE_GROUND_STATE,
4347 CASE_GROUND_STATE,
4348 CASE_GROUND_STATE,
4349 /*      adiaeresis      aring           ae              ccedilla        */
4350 CASE_GROUND_STATE,
4351 CASE_GROUND_STATE,
4352 CASE_GROUND_STATE,
4353 CASE_GROUND_STATE,
4354 /*      egrave          eacute          ecircumflex     ediaeresis      */
4355 CASE_GROUND_STATE,
4356 CASE_GROUND_STATE,
4357 CASE_GROUND_STATE,
4358 CASE_GROUND_STATE,
4359 /*      igrave          iacute          icircumflex     idiaeresis      */
4360 CASE_GROUND_STATE,
4361 CASE_GROUND_STATE,
4362 CASE_GROUND_STATE,
4363 CASE_GROUND_STATE,
4364 /*      eth             ntilde          ograve          oacute          */
4365 CASE_GROUND_STATE,
4366 CASE_GROUND_STATE,
4367 CASE_GROUND_STATE,
4368 CASE_GROUND_STATE,
4369 /*      ocircumflex     otilde          odiaeresis      division        */
4370 CASE_GROUND_STATE,
4371 CASE_GROUND_STATE,
4372 CASE_GROUND_STATE,
4373 CASE_GROUND_STATE,
4374 /*      oslash          ugrave          uacute          ucircumflex     */
4375 CASE_GROUND_STATE,
4376 CASE_GROUND_STATE,
4377 CASE_GROUND_STATE,
4378 CASE_GROUND_STATE,
4379 /*      udiaeresis      yacute          thorn           ydiaeresis      */
4380 CASE_GROUND_STATE,
4381 CASE_GROUND_STATE,
4382 CASE_GROUND_STATE,
4383 CASE_GROUND_STATE,
4384 };
4385 
4386 #endif
4387 
4388 int sjis_groundtable[] =	/* Shift-JIS ground table. */
4389 {
4390 /*	NUL		SOH		STX		ETX	*/
4391 CASE_IGNORE,
4392 CASE_IGNORE,
4393 CASE_IGNORE,
4394 CASE_IGNORE,
4395 /*	EOT		ENQ		ACK		BEL	*/
4396 CASE_IGNORE,
4397 CASE_IGNORE,
4398 CASE_IGNORE,
4399 CASE_BELL,
4400 /*	BS		HT		NL		VT	*/
4401 CASE_BS,
4402 CASE_TAB,
4403 CASE_LF,
4404 CASE_LF, /*CASE_UP,*/
4405 /*	NP		CR		SO		SI	*/
4406 CASE_LF, /*CASE_IGNORE,*/
4407 CASE_CR,
4408 CASE_SO,
4409 CASE_SI,
4410 /*	DLE		DC1		DC2		DC3	*/
4411 CASE_IGNORE,
4412 CASE_IGNORE,
4413 CASE_IGNORE,
4414 CASE_IGNORE,
4415 /*	DC4		NAK		SYN		ETB	*/
4416 CASE_IGNORE,
4417 CASE_IGNORE,
4418 CASE_IGNORE,
4419 CASE_IGNORE,
4420 /*	CAN		EM		SUB		ESC	*/
4421 CASE_IGNORE,
4422 CASE_IGNORE,
4423 CASE_IGNORE,
4424 CASE_ESC,
4425 /*	FS		GS		RS		US	*/
4426 CASE_IGNORE,
4427 CASE_IGNORE,
4428 CASE_IGNORE,
4429 CASE_IGNORE,
4430 /*	SP		!		"		#	*/
4431 CASE_PRINT,
4432 CASE_PRINT,
4433 CASE_PRINT,
4434 CASE_PRINT,
4435 /*	$		%		&		'	*/
4436 CASE_PRINT,
4437 CASE_PRINT,
4438 CASE_PRINT,
4439 CASE_PRINT,
4440 /*	(		)		*		+	*/
4441 CASE_PRINT,
4442 CASE_PRINT,
4443 CASE_PRINT,
4444 CASE_PRINT,
4445 /*	,		-		.		/	*/
4446 CASE_PRINT,
4447 CASE_PRINT,
4448 CASE_PRINT,
4449 CASE_PRINT,
4450 /*	0		1		2		3	*/
4451 CASE_PRINT,
4452 CASE_PRINT,
4453 CASE_PRINT,
4454 CASE_PRINT,
4455 /*	4		5		6		7	*/
4456 CASE_PRINT,
4457 CASE_PRINT,
4458 CASE_PRINT,
4459 CASE_PRINT,
4460 /*	8		9		:		;	*/
4461 CASE_PRINT,
4462 CASE_PRINT,
4463 CASE_PRINT,
4464 CASE_PRINT,
4465 /*	<		=		>		?	*/
4466 CASE_PRINT,
4467 CASE_PRINT,
4468 CASE_PRINT,
4469 CASE_PRINT,
4470 /*	@		A		B		C	*/
4471 CASE_PRINT,
4472 CASE_PRINT,
4473 CASE_PRINT,
4474 CASE_PRINT,
4475 /*	D		E		F		G	*/
4476 CASE_PRINT,
4477 CASE_PRINT,
4478 CASE_PRINT,
4479 CASE_PRINT,
4480 /*	H		I		J		K	*/
4481 CASE_PRINT,
4482 CASE_PRINT,
4483 CASE_PRINT,
4484 CASE_PRINT,
4485 /*	L		M		N		O	*/
4486 CASE_PRINT,
4487 CASE_PRINT,
4488 CASE_PRINT,
4489 CASE_PRINT,
4490 /*	P		Q		R		S	*/
4491 CASE_PRINT,
4492 CASE_PRINT,
4493 CASE_PRINT,
4494 CASE_PRINT,
4495 /*	T		U		V		W	*/
4496 CASE_PRINT,
4497 CASE_PRINT,
4498 CASE_PRINT,
4499 CASE_PRINT,
4500 /*	X		Y		Z		[	*/
4501 CASE_PRINT,
4502 CASE_PRINT,
4503 CASE_PRINT,
4504 CASE_PRINT,
4505 /*	\		]		^		_	*/
4506 CASE_PRINT,
4507 CASE_PRINT,
4508 CASE_PRINT,
4509 CASE_PRINT,
4510 /*	`		a		b		c	*/
4511 CASE_PRINT,
4512 CASE_PRINT,
4513 CASE_PRINT,
4514 CASE_PRINT,
4515 /*	d		e		f		g	*/
4516 CASE_PRINT,
4517 CASE_PRINT,
4518 CASE_PRINT,
4519 CASE_PRINT,
4520 /*	h		i		j		k	*/
4521 CASE_PRINT,
4522 CASE_PRINT,
4523 CASE_PRINT,
4524 CASE_PRINT,
4525 /*	l		m		n		o	*/
4526 CASE_PRINT,
4527 CASE_PRINT,
4528 CASE_PRINT,
4529 CASE_PRINT,
4530 /*	p		q		r		s	*/
4531 CASE_PRINT,
4532 CASE_PRINT,
4533 CASE_PRINT,
4534 CASE_PRINT,
4535 /*	t		u		v		w	*/
4536 CASE_PRINT,
4537 CASE_PRINT,
4538 CASE_PRINT,
4539 CASE_PRINT,
4540 /*	x		y		z		{	*/
4541 CASE_PRINT,
4542 CASE_PRINT,
4543 CASE_PRINT,
4544 CASE_PRINT,
4545 /*	|		}		~		DEL	*/
4546 CASE_PRINT,
4547 CASE_PRINT,
4548 CASE_PRINT,
4549 CASE_PRINT,
4550 /*      0x80            0x81            0x82            0x83    */
4551 CASE_SJIS_INSTRING,
4552 CASE_SJIS_INSTRING,
4553 CASE_SJIS_INSTRING,
4554 CASE_SJIS_INSTRING,
4555 /*      0x84            0x85            0x86            0x87    */
4556 CASE_SJIS_INSTRING,
4557 CASE_SJIS_INSTRING,
4558 CASE_SJIS_INSTRING,
4559 CASE_SJIS_INSTRING,
4560 /*      0x88            0x89            0x8a            0x8b    */
4561 CASE_SJIS_INSTRING,
4562 CASE_SJIS_INSTRING,
4563 CASE_SJIS_INSTRING,
4564 CASE_SJIS_INSTRING,
4565 /*      0x8c            0x8d            0x8e            0x8f    */
4566 CASE_SJIS_INSTRING,
4567 CASE_SJIS_INSTRING,
4568 CASE_SJIS_INSTRING,
4569 CASE_SJIS_INSTRING,
4570 /*      0x90            0x91            0x92            0x93    */
4571 CASE_SJIS_INSTRING,
4572 CASE_SJIS_INSTRING,
4573 CASE_SJIS_INSTRING,
4574 CASE_SJIS_INSTRING,
4575 /*      0x94            0x95            0x96            0x97    */
4576 CASE_SJIS_INSTRING,
4577 CASE_SJIS_INSTRING,
4578 CASE_SJIS_INSTRING,
4579 CASE_SJIS_INSTRING,
4580 /*      0x99            0x99            0x9a            0x9b    */
4581 CASE_SJIS_INSTRING,
4582 CASE_SJIS_INSTRING,
4583 CASE_SJIS_INSTRING,
4584 CASE_SJIS_INSTRING,
4585 /*      0x9c            0x9d            0x9e            0x9f    */
4586 CASE_SJIS_INSTRING,
4587 CASE_SJIS_INSTRING,
4588 CASE_SJIS_INSTRING,
4589 CASE_SJIS_INSTRING,
4590 /*      0xa0		0xa1		0xa2		0xa3	*/
4591 CASE_SJIS_KANA,
4592 CASE_SJIS_KANA,
4593 CASE_SJIS_KANA,
4594 CASE_SJIS_KANA,
4595 /*      0xa4		0xa5		0xa6		0xa7	*/
4596 CASE_SJIS_KANA,
4597 CASE_SJIS_KANA,
4598 CASE_SJIS_KANA,
4599 CASE_SJIS_KANA,
4600 /*      0xa8		0xa9		0xaa		0xab	*/
4601 CASE_SJIS_KANA,
4602 CASE_SJIS_KANA,
4603 CASE_SJIS_KANA,
4604 CASE_SJIS_KANA,
4605 /*      0xac		0xad		0xae		0xaf	*/
4606 CASE_SJIS_KANA,
4607 CASE_SJIS_KANA,
4608 CASE_SJIS_KANA,
4609 CASE_SJIS_KANA,
4610 /*      0xb0		0xb1		0xb2		0xb3	*/
4611 CASE_SJIS_KANA,
4612 CASE_SJIS_KANA,
4613 CASE_SJIS_KANA,
4614 CASE_SJIS_KANA,
4615 /*      0xb4		0xb5		0xb6		0xb7	*/
4616 CASE_SJIS_KANA,
4617 CASE_SJIS_KANA,
4618 CASE_SJIS_KANA,
4619 CASE_SJIS_KANA,
4620 /*      0xb8		0xb9		0xba		0xbb	*/
4621 CASE_SJIS_KANA,
4622 CASE_SJIS_KANA,
4623 CASE_SJIS_KANA,
4624 CASE_SJIS_KANA,
4625 /*      0xbc		0xbd		0xbe		0xbf	*/
4626 CASE_SJIS_KANA,
4627 CASE_SJIS_KANA,
4628 CASE_SJIS_KANA,
4629 CASE_SJIS_KANA,
4630 /*      0xc0		0xc1		0xc2		0xc3	*/
4631 CASE_SJIS_KANA,
4632 CASE_SJIS_KANA,
4633 CASE_SJIS_KANA,
4634 CASE_SJIS_KANA,
4635 /*      0xc4		0xc5		0xc6		0xc7	*/
4636 CASE_SJIS_KANA,
4637 CASE_SJIS_KANA,
4638 CASE_SJIS_KANA,
4639 CASE_SJIS_KANA,
4640 /*      0xc8		0xc9		0xca		0xcb	*/
4641 CASE_SJIS_KANA,
4642 CASE_SJIS_KANA,
4643 CASE_SJIS_KANA,
4644 CASE_SJIS_KANA,
4645 /*      0xcc		0xcd		0xce		0xcf	*/
4646 CASE_SJIS_KANA,
4647 CASE_SJIS_KANA,
4648 CASE_SJIS_KANA,
4649 CASE_SJIS_KANA,
4650 /*      0xd0		0xd1		0xd2		0xd3	*/
4651 CASE_SJIS_KANA,
4652 CASE_SJIS_KANA,
4653 CASE_SJIS_KANA,
4654 CASE_SJIS_KANA,
4655 /*      0xd4		0xd5		0xd6		0xd7	*/
4656 CASE_SJIS_KANA,
4657 CASE_SJIS_KANA,
4658 CASE_SJIS_KANA,
4659 CASE_SJIS_KANA,
4660 /*      0xd8		0xd9		0xda		0xdb	*/
4661 CASE_SJIS_KANA,
4662 CASE_SJIS_KANA,
4663 CASE_SJIS_KANA,
4664 CASE_SJIS_KANA,
4665 /*      0xdc		0xdd		0xde		0xdf	*/
4666 CASE_SJIS_KANA,
4667 CASE_SJIS_KANA,
4668 CASE_SJIS_KANA,
4669 CASE_SJIS_KANA,
4670 /*      0xe0		0xe1		0xe2		0xe3	*/
4671 CASE_SJIS_INSTRING,
4672 CASE_SJIS_INSTRING,
4673 CASE_SJIS_INSTRING,
4674 CASE_SJIS_INSTRING,
4675 /*      0xe4		0xe5		0xe6		0xe7	*/
4676 CASE_SJIS_INSTRING,
4677 CASE_SJIS_INSTRING,
4678 CASE_SJIS_INSTRING,
4679 CASE_SJIS_INSTRING,
4680 /*      0xe8		0xe9		0xea		0xeb	*/
4681 CASE_SJIS_INSTRING,
4682 CASE_SJIS_INSTRING,
4683 CASE_SJIS_INSTRING,
4684 CASE_SJIS_INSTRING,
4685 /*      0xec		0xed		0xee		0xef	*/
4686 CASE_SJIS_INSTRING,
4687 CASE_SJIS_INSTRING,
4688 CASE_SJIS_INSTRING,
4689 CASE_SJIS_INSTRING,
4690 /*      0xf0		0xf1		0xf2		0xf3	*/
4691 CASE_SJIS_INSTRING,
4692 CASE_SJIS_INSTRING,
4693 CASE_SJIS_INSTRING,
4694 CASE_SJIS_INSTRING,
4695 /*      0xf4		0xf5		0xf6		0xf7	*/
4696 CASE_SJIS_INSTRING,
4697 CASE_SJIS_INSTRING,
4698 CASE_SJIS_INSTRING,
4699 CASE_SJIS_INSTRING,
4700 /*      0xf8		0xf9		0xfa		0xfb	*/
4701 CASE_SJIS_INSTRING,
4702 CASE_SJIS_INSTRING,
4703 CASE_SJIS_INSTRING,
4704 CASE_SJIS_INSTRING,
4705 /*      0xfc		0xfd		0xfe		0xff	*/
4706 CASE_SJIS_INSTRING,
4707 CASE_SJIS_INSTRING,
4708 CASE_SJIS_INSTRING,
4709 CASE_SJIS_INSTRING,
4710 };
4711