-
Notifications
You must be signed in to change notification settings - Fork 0
/
ckoco3.c
19831 lines (18719 loc) · 749 KB
/
ckoco3.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* C K O C O 3 . C */
/*
Authors: Frank da Cruz ([email protected]),
Columbia University Academic Information Systems, New York City.
Jeffrey E Altman ([email protected])
Secure Endpoints Inc., New York City
Copyright (C) 1985, 2004, Trustees of Columbia University in the City of
New York. All rights reserved. This copyright notice must not be removed,
altered, or obscured.
*/
#include "ckcdeb.h" /* Typedefs, debug formats, etc */
#include "ckcker.h" /* Kermit definitions */
#include "ckcasc.h" /* ASCII character symbols */
#include "ckcnet.h" /* Network support */
#include "ckuusr.h" /* For terminal type definitions, etc. */
#include "ckcxla.h" /* Character set translation */
#include "ckcuni.h" /* Unicode Character Set Translations */
#ifndef NOLOCAL
#include "ckowys.h"
#include "ckodg.h"
#include "ckoava.h"
#include "ckotvi.h"
#include "ckohzl.h"
#include "ckohp.h"
#include "ckovc.h"
#include "ckoi31.h"
#include "ckoqnx.h"
#include "ckoadm.h"
#endif /* NOLOCAL */
#include <ctype.h> /* Character types */
#include <io.h> /* File io function declarations */
#include <process.h> /* Process-control function declarations */
#include <stdlib.h> /* Standard library declarations */
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#define DECLED
#ifdef NT
#include <windows.h>
#else /* NT */
#ifdef OS2MOUSE
#define INCL_MOU
#endif /* OS2MOUSE */
#define INCL_NOPM
#define INCL_VIO
#define INCL_ERRORS
#define INCL_DOSPROCESS
#define INCL_DOSSEMAPHORES
#define INCL_DOSDEVIOCTL
#define INCL_WINCLIPBOARD
#include <os2.h>
#undef COMMENT /* COMMENT is defined in os2.h */
#endif /* NT */
#include "ckocon.h" /* definitions common to console routines */
#ifndef NOLOCAL
#include "ckokey.h"
#include "ckotek.h"
#include "ckowin.h"
#ifdef CK_NETBIOS
#include "ckonbi.h"
extern UCHAR NetBiosRemote[] ;
#endif /* CK_NETBIOS */
#ifdef KUI
#include "ikui.h"
#endif /* KUI */
#ifdef NETCONN
#ifdef TCPSOCKET
#ifdef CK_NAWS
_PROTOTYP( int tn_snaws, (void) );
#ifdef RLOGCODE
_PROTOTYP( int rlog_naws, (void) ) ;
#endif /* RLOGCODE */
#ifdef SSHBUILTIN
_PROTOTYP( int ssh_snaws, (void));
#endif /* SSHBUILTIN */
extern int me_naws;
#endif /* CK_NAWS */
extern int tn_rem_echo;
extern int tcp_incoming;
#endif /* TCPSOCKET */
#endif /* NETCONN */
_PROTOTYP(void vtescape, (void));
_PROTOTYP(void vt100, (unsigned short vtch));
#endif /* NOLOCAL */
/*
*
* =============================externals=====================================
*/
extern CHAR (*xls[MAXTCSETS+1][MAXFCSETS+1])(CHAR); /* Character set xlate */
extern CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])(CHAR); /* functions. */
extern char *printername;
extern int printpipe;
#ifdef BPRINT
extern int printbidi; /* SET BPRINTER (bidirectional) */
#endif /* BPRINT */
bool winprint = FALSE;
FILE *lst=NULL; /* List (print) device */
#ifdef NT
_PROTOTYP(int Win32PrtOpen, (char *));
_PROTOTYP(int Win32PrtWrite, (char *, int));
_PROTOTYP(int Win32PrtClose, (void));
#endif /* NT */
static time_t printerclose_t=0;
bool printon = FALSE; /* Printer is on */
#ifdef NT
_PROTOTYP( FILE * win95popen, (const char *cmd, const char *mode) );
_PROTOTYP( int win95pclose, (FILE *pipe) );
#define popen _popen
#define pclose _pclose
#endif /* NT */
#ifdef COMMENT
_PROTOTYP( FILE * popen, (const char *cmd, const char *mode));
_PROTOTYP( int pclose, (FILE *pipe));
#endif /* COMMENT */
#ifndef NOLOCAL
extern struct csinfo fcsinfo[]; /* File character set info */
extern int tcsr, tcsl; /* Terminal character sets, remote & local. */
extern int prncs; /* Printer Character Set */
extern int tcs_transp;
extern int ttmdm;
extern int tnlm, tn_nlm; /* Terminal newline mode, ditto for TELNET */
extern int tn_b_nlm ; /* TELNET BINARY newline mode */
extern int tt_crd; /* Carriage-return display mode */
extern int tt_lfd; /* Line-feed display mode */
extern int tt_bell; /* How to handle incoming Ctrl-G characters */
extern int tt_type, tt_type_mode ;
extern int tt_status[VNUM]; /* Terminal status line displayed */
extern int tt_status_usr[VNUM];
extern int tt_modechg; /* Terminal Video-Change (80 or 132 cols) */
extern int tt_senddata; /* May data be sent to the host */
extern int tt_hidattr; /* Attributes do not occupy a space */
#ifdef PCTERM
extern int tt_pcterm;
#endif /* PCTERM */
extern int ttyfd, Shutdown ;
#ifdef CK_TAPI
extern int tttapi;
#endif /* CK_TAPI */
#ifdef KUI
extern CKFLOAT tt_linespacing[VNUM];
#endif /* KUI */
extern long speed, vernum;
extern int local, escape, duplex, parity, flow, seslog, pmask,
cmdmsk, cmask, sosi, xitsta, debses, mdmtyp, carrier, what;
extern int cflg, cnflg, stayflg, tt_escape, tt_scroll;
extern int network, nettype, ttnproto, protocol, inautodl;
extern int cmdlvl,tlevel, ckxech;
extern int ttnum; /* from ckcnet.c */
extern int tt_async;
#ifndef NOXFER
extern int autodl, adl_ask;
int adl_kc0 = TRUE,
adl_zc0 = TRUE; /* Process autodownload C0 chars by emulation */
extern int adl_err, xferstat;
extern CHAR stchr;
#endif /* NOXFER */
int duplex_sav = -1 ;
#ifndef NOSPL
extern struct mtab *mactab; /* Main macro table */
extern int nmac; /* Number of macros */
#endif /* NOSPL */
#ifdef TNCODE
extern int tn_deb;
#endif /* TNCODE */
extern KEY *keymap;
extern MACRO *macrotab;
extern char ttname[], sesfil[];
#ifndef NODIAL
extern char * d_name;
#endif /* NODIAL */
extern int scrninitialized[] ;
extern bool scrollflag[] ;
extern bool viewonly ; /* View Only Terminal mode */
extern int updmode ; /* Fast/Smooth scrolling */
extern int priority ;
extern TID tidRdComWrtScr ;
#ifdef CK_XYZ
extern int p_avail ;
#endif /* CK_XYZ */
extern int beepfreq, beeptime ;
extern int pwidth, pheight;
extern int win95lucida, win95hsl;
/*
* =============================variables==============================
*/
/*
These are RGB bits for the fore- and background colors in the PC's video
adapter, 3 bits for each color. These default values can be changed by the
SET TERMINAL COLOR command (in ckuus7.c) or by CSI3x;4xm escape sequences
from the host.
*/
unsigned char colornormal = 0x17;
unsigned char colorunderline = 0x47;
unsigned char colordebug = 0x47;
unsigned char colorreverse = 0x71;
unsigned char colorgraphic = 0x17;
#ifdef COMMENT
unsigned char colorstatus = 0x37;
unsigned char colorhelp = 0x37;
#else /* COMMENT */
unsigned char colorstatus = 0x71;
unsigned char colorhelp = 0x71;
#endif /* COMMENT */
unsigned char colorselect = 0xe0;
unsigned char colorborder = 0x01;
unsigned char coloritalic = 0x27;
int bgi = FALSE, fgi = FALSE ;
unsigned char colorcmd = 0x07;
int colorreset = TRUE ; /* reset on CSI 0 m - use normal colors */
int erasemode = FALSE ; /* Use current colors when erasing characters */
int user_erasemode= FALSE ; /* Use current colors when erasing characters */
int trueblink = TRUE ;
int truereverse = TRUE ;
int trueunderline = TRUE ;
int truedim = TRUE ;
#ifdef KUI
int trueitalic = TRUE ;
#else /* KUI */
int trueitalic = FALSE ;
#endif /* KUI */
extern enum markmodes markmodeflag[VNUM] = {notmarking, notmarking,
notmarking, notmarking} ;
extern int tn_bold; /* TELNET negotiation bold */
extern int esc_exit; /* Escape back = exit */
extern char * esc_msg;
extern int interm ; /* INPUT echo state */
extern BYTE vmode ;
long waittime; /* Timeout on CTS during CONNECT */
#define INTERVAL 100L
char termessage[MAXTERMCOL];
#ifdef CK_APC
extern int apcactive; /* Application Program Command (APC) */
int apcrecv = 0;
int dcsrecv = 0; /* Device Control String (DCS) */
int oscrecv = 0; /* Operating System Command (OSC) */
int pmrecv = 0; /* Private Message (PM) */
int pu1recv = 0; /* 97801-5xx Private Use One (PU1) */
int pu2recv = 0; /* 97801-5xx Private Use Two (PU2) */
int c1strrecv = 0; /* Other generic C1 strings */
extern int apcstatus; /* items ... */
#ifdef DCMDBUF
extern char *apcbuf;
#else
extern char apcbuf[];
#endif /* DCMDBUF */
int apclength = 0;
int apcbuflen = APCBUFLEN - 2;
#endif /* CK_APC */
extern char * keydefptr;
extern int keymac;
extern int keymacx ;
bool scrollstatus[VNUM] = {FALSE,FALSE,FALSE,FALSE} ;
bool escapestatus[VNUM] = {FALSE,FALSE,FALSE,FALSE} ;
extern int tt_idlelimit; /* Auto-exit Connect when idle */
extern int tt_timelimit; /* Auto-exit Connect after time */
extern bool flipscrnflag[] ;
extern videobuffer vscrn[];
ascreen /* For saving screens: */
vt100screen, /* terminal screen */
commandscreen ; /* OS/2 screen */
extern ascreen mousescreen; /* Screen during mouse actions */
extern unsigned char /* Video attribute bytes */
attribute=NUL, /* Current video attribute byte */
underlineattribute=NUL,
savedattribute[VNUM]={0,0,0,0}, /* Saved video attribute byte */
saveddefaultattribute[VNUM]={0,0,0,0},/* Saved video attribute byte */
savedunderlineattribute[VNUM]={0,0,0,0},/* Saved video attribute byte */
defaultattribute=NUL, /* Default video attribute byte */
italicattribute=NUL, /* Default video attribute byte */
saveditalicattribute[VNUM]={0,0,0,0},
reverseattribute=NUL,
savedreverseattribute[VNUM]={0,0,0,0},
graphicattribute=NUL,
savedgraphicattribute[VNUM]={0,0,0,0},
borderattribute=NUL,
savedborderattribute[VNUM]={0,0,0,0};
vtattrib attrib={0,0,0,0,0,0,0,0,0,0},
savedattrib[VNUM]={{0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0}},
cmdattrib={0,0,0,0,0,0,0,0,0,0};
int wherex[]; /* Screen column, 1-based */
int wherey[]; /* Screen row, 1-based */
int margintop = 1 ; /* Top of scrolling region, 1-based */
int marginbot = 24 ; /* Bottom of same, 1-based */
int marginleft = 1;
int marginright = 80;
int quitnow, hangnow, outshift, tcs, langsv;
int term_io = TRUE; /* Terminal emulator performs I/O */
int prevchar = 0; /* Last char written to terminal screen */
extern char answerback[81]; /* answerback */
char usertext[(MAXTERMCOL) + 1]; /* Status line and its parts */
char statusline[MAXTERMCOL + 1];
char hoststatusline[MAXTERMCOL + 1];
char exittext[(20) + 1];
#define HLPTXTLEN 41
char helptext[HLPTXTLEN];
char filetext[(20) + 1];
char savefiletext[(20) + 1] = { NUL };
#define HSTNAMLEN 41
char hostname[HSTNAMLEN];
#define DEFTABS \
"0\
T0000000T0000000T0000000T0000000T0000000T0000000T0000000T0000000T0000000\
T0000000T0000000T0000000T0000000T0000000T0000000T0000000T0000000T0000000\
T00000";
char htab[MAXTERMCOL+2] = DEFTABS /* Default tab settings */
static int achar; /* Global - current character */
int tt_utf8 = 0; /* Is UTF8 mode active ? */
struct _vtG G[4] = {
TX_ASCII, TX_ASCII, cs94, cs94, TRUE, TRUE, TRUE, NULL, NULL, NULL, NULL, TRUE,
TX_8859_1, TX_8859_1, cs96, cs96, FALSE, TRUE, TRUE, NULL, NULL, NULL, NULL, TRUE,
TX_8859_1, TX_8859_1, cs96, cs96, FALSE, TRUE, TRUE, NULL, NULL, NULL, NULL, TRUE,
TX_8859_1, TX_8859_1, cs96, cs96, FALSE, TRUE, TRUE, NULL, NULL, NULL, NULL, TRUE
};
struct _vtG *GL = &G[0], *SSGL = NULL; /* GL and single shift GL */
struct _vtG *GR = &G[2]; /* GR */
struct _vtG *GNOW = &G[0];
struct _vtG savedG[VNUM][4];
struct _vtG *savedGL[VNUM] = {NULL,NULL,NULL,NULL},
*savedGR[VNUM] = {NULL,NULL,NULL,NULL},
*savedSSGL[VNUM] = {NULL,NULL,NULL,NULL} ;
static int Qsaved = FALSE; /* QANSI charset shifts */
struct _vtG QsavedG[4],
*QsavedGL = NULL,
*QsavedGR = NULL,
*QsavedSSGL = NULL;
bool printregion = FALSE; /* Print extent = full screen */
bool xprintff = FALSE; /* Print formfeed */
bool turnonprinter = FALSE; /* Time to turn on printer */
bool xprint = FALSE; /* Controller print in progress */
bool aprint = FALSE; /* Auto-print in progress */
bool cprint = FALSE; /* Copy-print in progress (for debug) */
bool uprint = FALSE; /* Transparent print */
bool turnoffprinter = FALSE; /* Time to turn it off */
bool wrapit = FALSE;
bool literal_ch= FALSE;
bool screenon = TRUE;
extern bool cursorena[]; /* Cursor enabled / disabled */
extern bool cursoron[] ; /* Cursor state on/off */
bool relcursor = FALSE;
bool keylock = FALSE;
bool vt52graphics = FALSE;
bool saverelcursor[VNUM]={FALSE,FALSE,FALSE,FALSE},
saved[VNUM]={FALSE,FALSE,FALSE,FALSE};
int savedwrap[VNUM]={FALSE,FALSE,FALSE,FALSE} ;
int savedrow[VNUM] = {0,0,0,0};
int savedcol[VNUM] = {0,0,0,0};
bool deccolm = FALSE; /* 80/132-column mode */
bool decscnm = FALSE; /* Normal/reverse screen mode */
int decscnm_usr = FALSE; /* User default for decscnm */
bool decnrcm = FALSE ; /* National Replacement Charset mode */
int decnrcm_usr = FALSE; /* NRC mode - user default */
bool decsasd = SASD_TERMINAL ; /* Active Status Display */
int decssdt = SSDT_INDICATOR ; /* Status Display Type */
bool deckbum = FALSE ; /* Keyboard (Typewriter/DP) */
bool decsace = FALSE; /* DECSACE */
int savdecbkm = 0 ; /* User default Backspace Mode */
bool erm = FALSE ; /* Erasure Mode VT300 */
bool crm = FALSE ; /* Control Mode VT300 */
bool decled[4] = {FALSE,FALSE,FALSE,FALSE} ; /* DEC LEDs */
bool insertmode = FALSE; /* Insert/replace mode */
bool sco8bit = FALSE; /* SCO ANSI 8th bit quoting */
bool scoBCS2 = FALSE; /* SCO ANSI BCS2 */
bool scocompat = FALSE; /* SCO ANSI Backward Compatibility Mode */
extern int wyse8bit; /* WYSE ASCII 8th bit quoting */
bool keyclick = FALSE ;
int dec_upss = TX_8859_1 ;
int dec_lang = VTL_NORTH_AM; /* DEC VT Language = North American */
int dec_nrc = TX_ASCII; /* DEC NRC for use during NRC Mode */
int dec_kbd = TX_8859_1; /* DEC Keyboard character set */
/*
Terminal parameters that can also be set externally by SET commands.
Formerly they were declared and initialized here, and had different
names, as shown in the comments. Now they are declared and
initialized in ckuus7.c. - fdc
*/
int tt_kb_mode = KBM_EN ; /* Keyboard is in English mode */
int tt_kb_glgr = FALSE; /* Kbd Follows GL/GR charset */
bool send_c1 = FALSE; /* Flag for sending C1 controls */
extern int send_c1_usr ; /* User default for send_c1 */
/*
VT220 and higher Pn's for terminal ID string are (* = Not supported):
1 - 132 columns
2 - Printer port
* 3 - ReGIS graphics
* 4 - Sixel graphics
6 - DECSED - Selective erase
* 7 - DRCS - Soft character sets
8 - UDK - User-defined keys
9 - National Replacement Character Sets can be designated by host
* 12 - Serbo-Croation (SCS)
* 13 - Local editing
15 - Technical character set
* 16 - Locator device port
* 18 - Windowing Capability
* 19 - Dual sessions
* 21 - Horizontal Scrolling
22 - Color
23 - Greek
* 24 - Turkish
42 - ISO Latin-2
44 - PC Term
45 - Soft-key mapping
46 - ASCII Terminal emulation
*/
struct tt_info_rec tt_info[] = { /* Indexed by terminal type */
"TTY", {NULL}, "", /* Teletype */
"D200", {"DG200","DATA-GENERAL-200",NULL}, "o#!J ", /* Data General 200 */
"D210", {"DG210","DATA-GENERAL-210",NULL}, "o#(HY", /* Data General 210 */
"D217", {"DG217","DATA-GENERAL-217",NULL}, "o#(HY", /* Data General 217 */
"HP2621", {"HP2621P","HP2621A","HP-2621",NULL},"2621A", /* HP 2621A */
"HPTERM", {"HP-TERM","X-HPTERM",NULL}, "X-hpterm", /* HP TERM */
"H1500", {"HZ1500","HAZELTINE-1500",NULL}, "", /* Hazeltine 1500 */
"VC404", {"VOLKER-CRAIG-404",NULL}, "", /* Volker Craig VC4404/404 */
"WY30", {"WYSE-30","WYSE30",NULL}, "30\r", /* WYSE-30 */
"WY50", {"WYSE-50","WYSE50",NULL}, "50\r", /* WYSE-50 */
"WY60", {"WYSE-60","WYSE60",NULL}, "60\r", /* WYSE-60 */
"WY160", {"WYSE-160","WYSE160",NULL}, "160\r", /* WYSE-160 */
"QNX", {"QNX4",NULL}, "", /* QNX */
"QANSI", {NULL}, "", /* QNX ANSI */
"VT52",{"DEC-VT52",NULL}, "/Z", /* DEC VT52 */
"H19", {"HEATH","ZENITH","Z19",NULL}, "/K", /* Heath-19 */
"IBM3151", {"I3151",NULL}, "", /* IBM 3151 */
"SCOANSI", {"SCO-ANSI","ANSI-850","ANSI-8859",NULL}, "", /* SCO ANSI */
"AT386", {"386AT","ATT6386",NULL}, "", /* AT-386 */
"ANSI", {"DOSANSI","ANSI.SYS","PCANSI",NULL},"", /* "ANSI" */
"VIP7809", {NULL}, "7813 P GC A\003", /* Honeywell MOD400 4.0 */
"LINUX", {NULL}, "", /* Linux */
"HFT", {"IBM8512","IBM8513",NULL}, "[?1;2c", /* IBM HFT */
"AIXTERM", {"AIXTERM-M",NULL}, "[?1;2c", /* IBM AIXTERM */
"SUN", {"SUN-COLOR",NULL}, "", /* SUN Console */
"BA80-08", {"BA80",NULL}, "", /* Nixdorf BA80 */
"BETERM", {NULL}, "", /* BEOS ANSI */
"VT100", {"DEC-VT100","VT100-AM",NULL}, "[?1;2c", /* DEC VT100 */
"VT102", {"DEC-VT102",NULL}, "[?6c", /* DEC VT102 */
"VT220", {"DEC-VT220","DEC-VT200","VT200",NULL}, "[?62;1;2;6;8;9;15;44c", /* DEC VT220 */
"VT220PC", {"DEC-VT220-PC","DEC-VT200-PC","VT200PC",NULL}, "[?62;1;2;6;8;9;15;44c", /* DEC VT220 w/ PC keyboard */
"VT320", {"DEC-VT320","DEC-VT300","VT300",NULL}, "[?63;1;2;6;8;9;15;44c", /* DEC VT320 */
"VT320PC", {"DEC-VT320-PC","DEC-VT300-PC","VT300PC",NULL}, "[?63;1;2;6;8;9;15;44c", /* DEC VT320 w/ PC keyboard */
"WY370", {"WYSE-370","WYSE370","WY350",NULL},"[?63;1;2;6;8;9;15;44c", /* WYSE 370 (same as VT320) */
"97801", {"SNI-97801",NULL}, "[?62;1;2;6;8;9;15;44c", /* Sinix 97801 */
"AAA", { "ANNARBOR", "AMBASSADOR",NULL}, "11;00;00", /* Ann Arbor Ambassador */
#ifdef COMMENT
"VT420", {"DEC-VT420","DEC-VT400","VT400",NULL}, "[?64;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT420 */
"VT525", {"DEC-VT525","DEC-VT500","VT500",NULL}, "[?65;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT520 */
#endif /* COMMENT */
"TVI910", {"TELEVIDEO-910","TVI910+""910",NULL}, "TVS 910 REV.I\r", /* TVI 910+ */
"TVI925", {"TELEVIDEO-925","925",NULL}, "TVS 925 REV.I\r", /* TVI 925 */
"TVI950", {"TELEVIDEO-950","950",NULL}, "1.0,0\r", /* TVI 950 */
"ADM3A", {NULL}, "", /* LSI ADM 3A */
"ADM5", {NULL}, "", /* LSI ADM 5 */
"VTNT", {NULL}, "", /* Microsoft NT VT */
"IBM3101",{"I3101",NULL}, "" /* IBM 31xx */
};
int max_tt = TT_MAX; /* Highest terminal type */
/* SET TERMINAL values ... */
extern int tt_arrow; /* Arrow-key mode */
extern int tt_keypad; /* Keypad mode */
extern int tt_shift_keypad; /* Keypad Shift mode */
extern int tt_wrap; /* Autowrap */
extern int tt_type; /* Terminal type */
extern int tt_cursor_usr; /* Cursor type */
extern int tt_cursorena_usr; /* Cursor enabled by user */
extern int tt_cursor; /* Active cursor mode */
extern int tt_answer; /* Answerback enabled/disabled */
extern int tt_scrsize[]; /* Scrollback buffer size */
extern int tt_roll[]; /* Scrollback style */
extern int tt_rows[]; /* Screen rows */
extern int tt_cols[]; /* Screen columns */
int tt_cols_usr = 80; /* User default screen width */
int tt_szchng[VNUM] = {1,1,1,0}; /* Screen Size Changed */
extern int cmd_rows; /* Screen rows */
extern int cmd_cols; /* Screen columns */
extern int tt_ctstmo; /* CTS timeout */
extern int tt_pacing; /* Output-pacing */
extern int tt_mouse; /* Mouse */
extern int tt_updmode; /* Terminal Screen Update Mode */
extern int tt_url_hilite;
extern int tt_url_hilite_attr;
int tt_type_vt52 = TT_VT52 ; /* Terminal Type Mode before entering VT52 mode */
int holdscreen = FALSE ;
int escstate = ES_NORMAL;
int escnext = 1;
int esclast = 0;
int marginbell = FALSE, marginbellcol = 72 ;
extern int autoscroll ; /* WYSE ASCII Term AutoScroll Mode */
extern int writeprotect ; /* WYSE ASCII WriteProtect Mode */
extern int protect ; /* WYSE ASCII Protect Mode */
extern int wysegraphics ; /* WYSE ASCII Graphics Mode */
extern vtattrib WPattrib ; /* WYSE ASCII WriteProtect Mode Attrib */
extern vtattrib defWPattrib ; /* WYSE ASCII default WP Mode Attrib */
extern int attrmode ; /* WYSE ASCII Attribute Mode */
extern int wy_keymode ; /* WYSE ASCII Key Appl Mode */
extern int wy_enhanced ; /* WYSE ASCII Enhanced Mode */
extern int wy_widthclr ; /* WYSE ASCII Width Clear Mode */
extern int wy_autopage ; /* WYSE ASCII Auto Page Mode */
extern int wy_monitor ; /* WYSE ASCII Monitor Mode */
extern int wy_nullsuppress; /* WYSE ASCII Null Suppression */
extern int tvi_ic ; /* TVI insert character */
extern int wy_block; /* TVI block mode (FALSE = Conversation mode) */
extern int hzgraphics; /* Hazeltine graphics mode */
int tt_sac = SP; /* Spacing Attribute Character */
int sni_pagemode = FALSE; /* 97801 Page Mode */
int sni_pagemode_usr = FALSE; /* 97801 Page Mode (User Default) */
int sni_scroll_mode = FALSE; /* 97801 Roll (power-on) or Scroll */
int sni_scroll_mode_usr = FALSE; /* 97801 Roll or Scroll (User Default) */
int sni_chcode = TRUE; /* 97801 CH.CODE mode */
int sni_chcode_usr = TRUE; /* 97801 CH.CODE mode */
int sni_chcode_7 = TRUE; /* 97801 CH.CODE key enabled 7-bit mode */
int sni_chcode_8 = TRUE; /* 97801 CH.CODE key enabled 8-bit mode */
int sni_bitmode = 8; /* 97801 CH.CODE 8-bit mode */
CHAR sni_kbd_firmware[7]="920031"; /* 97801 Keyboard Firmware Version */
CHAR sni_term_firmware[7]="830851"; /* 97801 Terminal Firmware Version */
/* Escape-sequence processing buffer */
unsigned short escbuffer[ESCBUFLEN+1];
/*
For pushing back input characters,
e.g. converting 8-bit controls to 7-bit escape sequences.
*/
static int f_pushed = 0, c_pushed = 0, f_popped = 0;
int sgrcolors = TRUE; /* Process SGR Color Commands */
static
unsigned char sgrcols[8] = {
/* Black */ 0,
/* Red */ 4,
/* Green */ 2,
/* Brown */ 6,
/* Blue */ 1,
/* Magenta */ 5,
/* Cyan */ 3,
/* White */ 7
};
static
unsigned char isocols[8] = {
/* Black */ 0,
/* Blue */ 1,
/* Green */ 2,
/* Cyan */ 3,
/* Red */ 4,
/* Magenta */ 5,
/* Yellow */ 6,
/* White */ 7
};
/* Function prototypes */
#ifndef NOTTOCI
int ttoci(char c);
#endif /* NOTTOCI */
int status_saved = -1;
extern int os2_outesc ; /* Esc seq recognizer for keys... */
/* BA80 Function Key Label Reader */
static char ba80_fkey_buf[256]="", *ba80_fkey_ptr=NULL;
static int ba80_fkey_read = 0;
/* VTNT variables */
#define VTNT_BUFSZ 36864
#define VTNT_MIN_READ 42
static char vtnt_buf[VTNT_BUFSZ]="";
static unsigned long vtnt_index = 0;
static unsigned long vtnt_read = VTNT_MIN_READ;
/* DEC F-key strings */
char * fkeys[] = {
"[11~","[12~","[13~","[14~","[15~", /* F1 - F5 PC Keyboard */
"[17~","[18~","[19~","[20~","[21~", /* F6 - F10 */
"[23~","[24~","[25~","[26~","[28~", /* F11 - F15 */
"[29~","[31~","[32~","[33~","[34~" /* F16 - F20 */
};
/* DEC Editing key strings */
char * ekeys[] = {
"[1~", /* Find */
"[2~", /* Insert */
"[3~", /* Remove */
"[4~", /* Select */
"[5~", /* Previous Screen */
"[6~", /* Next Screen */
"[H" /* PC Home */
};
/* DEC User Defined Key strings */
/* Also used for SCO ANSI UDK strings */
/* There are 15 DEC strings, and 60 AT386 strings */
/* And 65 Wyse characters */
/* And close to 108 DG keys (regular and unix modes) */
/* 153 SNI 97801 keys */
char * udkfkeys[200]; /* let udkreset() initialize them */
int udklock = 0 ; /* Are User Defined Keys locked? */
#ifndef NOKVERBS
extern struct keytab kverbs[] ; /* Kverbs table */
extern int nkverbs ; /* Num of Kverbs */
/* Compose-key support structures and tables */
struct compose_key_tab {
CHAR c1; /* First char of compose sequence */
CHAR c2; /* Second char of compose sequence */
CHAR c3; /* Character that it maps to */
};
struct compose_key_tab l1ktab[] = { /* The Latin-1 Compose Key Table */
'N', 'B', (CHAR) 0xA0, /* No-Break Space */
'n', 'b', (CHAR) 0xA0, /* No-Break Space */
'A', '`', (CHAR) 0xC0, /* A grave */
'`', 'A', (CHAR) 0xC0, /* A grave */
'A', (CHAR) 0x27, (CHAR) 0xC1, /* A acute */
(CHAR) 0x27, 'A', (CHAR) 0xC1, /* A acute */
'A', '^', (CHAR) 0xC2, /* A circumflex */
'^', 'A', (CHAR) 0xC2, /* A circumflex */
'A', '~', (CHAR) 0xC3, /* A tilde */
'~', 'A', (CHAR) 0xC3, /* A tilde */
'A', '"', (CHAR) 0xC4, /* A diaeresis */
'"', 'A', (CHAR) 0xC4, /* A diaeresis */
'A', '*', (CHAR) 0xC5, /* A ring above */
'*', 'A', (CHAR) 0xC5, /* A ring above */
'A', 'E', (CHAR) 0xC6, /* A with E */
'C', ',', (CHAR) 0xC7, /* C Cedilla */
',', 'C', (CHAR) 0xC7, /* C Cedilla */
'E', '`', (CHAR) 0xC8, /* E grave */
'`', 'E', (CHAR) 0xC8, /* E grave */
'E', (CHAR) 0x27, (CHAR) 0xC9, /* E acute */
(CHAR) 0x27, 'E', (CHAR) 0xC9, /* E acute */
'E', '^', (CHAR) 0xCA, /* E circumflex */
'^', 'E', (CHAR) 0xCA, /* E circumflex */
'E', '"', (CHAR) 0xCB, /* E diaeresis */
'"', 'E', (CHAR) 0xCB, /* E diaeresis */
'I', '`', (CHAR) 0xCC, /* I grave */
'`', 'I', (CHAR) 0xCC, /* I grave */
'I', (CHAR) 0x27, (CHAR) 0xCD, /* I acute */
(CHAR) 0x27, 'I', (CHAR) 0xCD, /* I acute */
'I', '^', (CHAR) 0xCE, /* I circumflex */
'^', 'I', (CHAR) 0xCE, /* I circumflex */
'I', '"', (CHAR) 0xCF, /* I diaeresis */
'"', 'I', (CHAR) 0xCF, /* I diaeresis */
'-', 'D', (CHAR) 0xD0, /* Icelandic Eth */
'D', '-', (CHAR) 0xD0, /* Icelandic Eth */
'N', '~', (CHAR) 0xD1, /* N tilde */
'~', 'N', (CHAR) 0xD1, /* N tilde */
'O', 'E', (CHAR) 0xD7, /* OE digraph (not really in Latin-1) */
'O', '`', (CHAR) 0xD2, /* O grave */
'`', 'O', (CHAR) 0xD2, /* O grave */
'O', (CHAR) 0x27, (CHAR) 0xD3, /* O acute */
(CHAR) 0x27, 'O', (CHAR) 0xD3, /* O acute */
'O', '^', (CHAR) 0xD4, /* O circumflex */
'^', 'O', (CHAR) 0xD4, /* O circumflex */
'O', '~', (CHAR) 0xD5, /* O tilde */
'~', 'O', (CHAR) 0xD5, /* O tilde */
'O', '"', (CHAR) 0xD6, /* O diaeresis */
'"', 'O', (CHAR) 0xD6, /* O diaeresis */
'O', '/', (CHAR) 0xD8, /* O oblique stroke */
'/', 'O', (CHAR) 0xD8, /* O oblique stroke */
'U', '`', (CHAR) 0xD9, /* U grave */
'`', 'U', (CHAR) 0xD9, /* U grave */
'U', (CHAR) 0x27, (CHAR) 0xDA, /* U acute */
(CHAR) 0x27, 'U', (CHAR) 0xDA, /* U acute */
'U', '^', (CHAR) 0xDB, /* U circumflex */
'^', 'U', (CHAR) 0xDB, /* U circumflex */
'U', '"', (CHAR) 0xDC, /* U diaeresis */
'"', 'U', (CHAR) 0xDC, /* U diaeresis */
'Y', (CHAR) 0x27, (CHAR) 0xDD, /* Y acute */
(CHAR) 0x27, 'Y', (CHAR) 0xDD, /* Y acute */
'H', 'T', (CHAR) 0xDE, /* Icelandic Thorn */
'T', 'H', (CHAR) 0xDE, /* Icelandic Thorn */
's', 's', (CHAR) 0xDF, /* German scharfes s */
'a', '`', (CHAR) 0xE0, /* a grave */
'`', 'a', (CHAR) 0xE0, /* a grave */
'a', (CHAR) 0x27, (CHAR) 0xE1, /* a acute */
(CHAR) 0x27, 'a', (CHAR) 0xE1, /* a acute */
'a', '^', (CHAR) 0xE2, /* a circumflex */
'^', 'a', (CHAR) 0xE2, /* a circumflex */
'a', '~', (CHAR) 0xE3, /* a tilde */
'~', 'a', (CHAR) 0xE3, /* a tilde */
'a', '"', (CHAR) 0xE4, /* a diaeresis */
'"', 'a', (CHAR) 0xE4, /* a diaeresis */
'a', '*', (CHAR) 0xE5, /* a ring above */
'*', 'a', (CHAR) 0xE5, /* a ring above */
'a', 'e', (CHAR) 0xE6, /* a with e */
'c', ',', (CHAR) 0xE7, /* c cedilla */
',', 'c', (CHAR) 0xE7, /* c cedilla */
'e', '`', (CHAR) 0xE8, /* e grave */
'`', 'e', (CHAR) 0xE8, /* e grave */
'e', (CHAR) 0x27, (CHAR) 0xE9, /* e acute */
(CHAR) 0x27, 'e', (CHAR) 0xE9, /* e acute */
'e', '^', (CHAR) 0xEA, /* e circumflex */
'^', 'e', (CHAR) 0xEA, /* e circumflex */
'e', '"', (CHAR) 0xEB, /* e diaeresis */
'"', 'e', (CHAR) 0xEB, /* e diaeresis */
'i', '`', (CHAR) 0xEC, /* i grave */
'`', 'i', (CHAR) 0xEC, /* i grave */
'i', (CHAR) 0x27, (CHAR) 0xED, /* i acute */
(CHAR) 0x27, 'i', (CHAR) 0xED, /* i acute */
'i', '^', (CHAR) 0xEE, /* i circumflex */
'^', 'i', (CHAR) 0xEE, /* i circumflex */
'i', '"', (CHAR) 0xEF, /* i diaeresis */
'"', 'i', (CHAR) 0xEF, /* i diaeresis */
'-', 'd', (CHAR) 0xF0, /* Icelandic eth */
'd', '-', (CHAR) 0xF0, /* Icelandic eth */
'n', '~', (CHAR) 0xF1, /* n tilde */
'~', 'n', (CHAR) 0xF1, /* n tilde */
'o', 'e', (CHAR) 0xF7, /* oe digraph (not really in Latin-1) */
'o', '`', (CHAR) 0xF2, /* o grave */
'`', 'o', (CHAR) 0xF2, /* o grave */
'o', (CHAR) 0x27, (CHAR) 0xF3, /* o acute */
(CHAR) 0x27, 'o', (CHAR) 0xF3, /* o acute */
'o', '^', (CHAR) 0xF4, /* o circumflex */
'^', 'o', (CHAR) 0xF4, /* o circumflex */
'o', '~', (CHAR) 0xF5, /* o tilde */
'~', 'o', (CHAR) 0xF5, /* o tilde */
'o', '"', (CHAR) 0xF6, /* o diaeresis */
'"', 'o', (CHAR) 0xF6, /* o diaeresis */
'-', ':', (CHAR) 0xF7, /* Division sign */
'o', '/', (CHAR) 0xF8, /* o oblique stroke */
'/', 'o', (CHAR) 0xF8, /* o oblique stroke */
'u', '`', (CHAR) 0xF9, /* u grave */
'`', 'u', (CHAR) 0xF9, /* u grave */
'u', (CHAR) 0x27, (CHAR) 0xFA, /* u acute */
(CHAR) 0x27, 'u', (CHAR) 0xFA, /* u acute */
'u', '^', (CHAR) 0xFB, /* u circumflex */
'^', 'u', (CHAR) 0xFB, /* u circumflex */
'u', '"', (CHAR) 0xFC, /* u diaeresis */
'"', 'u', (CHAR) 0xFC, /* u diaeresis */
'y', (CHAR) 0x27, (CHAR) 0xFD, /* y acute */
(CHAR) 0x27, 'y', (CHAR) 0xFD, /* y acute */
'h', 't', (CHAR) 0xFE, /* Icelandic thorn */
't', 'h', (CHAR) 0xFE, /* Icelandic thorn */
'y', '"', (CHAR) 0xFF, /* y diaeresis */
'"', 'y', (CHAR) 0xFF, /* y diaeresis */
'+', '+', '#', /* Number sign */
'A', 'A', '@', /* At sign */
'a', 'a', '@', /* At sign */
'(', '(', '[', /* Left bracket */
'/', '/', '\\', /* Backslash */
'/', '<', '\\', /* Backslash */
')', ')', ']', /* Right bracket */
'(', '-', '{', /* Left brace */
'/', '^', '|', /* Vertical bar */
')', '-', '}', /* Right brace */
'!', '!', (CHAR) 0xA1, /* Inverted exclamation */
'C', '/', (CHAR) 0xA2, /* Cent sign */
'c', '/', (CHAR) 0xA2, /* Cent sign */
'L', '-', (CHAR) 0xA3, /* Pound sterling sign */
'l', '-', (CHAR) 0xA3, /* Pound sterling sign */
'Y', '-', (CHAR) 0xA5, /* Yen sign */
'y', '-', (CHAR) 0xA5, /* Yen sign */
'|', '|', (CHAR) 0xA6, /* Broken bar */
'S', 'O', (CHAR) 0xA7, /* Paragraph sign */
'S', '!', (CHAR) 0xA7, /* Paragraph sign */
'S', '0', (CHAR) 0xA7, /* Paragraph sign */
's', 'o', (CHAR) 0xA7, /* Paragraph sign */
's', '!', (CHAR) 0xA7, /* Paragraph sign */
's', '0', (CHAR) 0xA7, /* Paragraph sign */
'X', 'O', (CHAR) 0xA4, /* Currency sign */
'X', '0', (CHAR) 0xA4, /* Currency sign */
'x', 'o', (CHAR) 0xA4, /* Currency sign */
'x', '0', (CHAR) 0xA4, /* Currency sign */
'C', 'O', (CHAR) 0xA9, /* Copyright sign */
'C', '0', (CHAR) 0xA9, /* Copyright sign */
'c', 'o', (CHAR) 0xA9, /* Copyright sign */
'c', '0', (CHAR) 0xA9, /* Copyright sign */
'A', '_', (CHAR) 0xAA, /* Feminine ordinal */
'a', '_', (CHAR) 0xAA, /* Feminine ordinal */
'<', '<', (CHAR) 0xAB, /* Left angle quotation */
'-', ',', (CHAR) 0xAC, /* Not sign */
'-', '-', (CHAR) 0xAD, /* Soft hyphen */
'R', 'O', (CHAR) 0xAE, /* Registered Trademark */
'r', 'o', (CHAR) 0xAE, /* Registered Trademark */
'-', '^', (CHAR) 0xAF, /* Macron */
'0', '^', (CHAR) 0xB0, /* Degree sign */
'+', '-', (CHAR) 0xB1, /* Plus or minus sign */
'2', '^', (CHAR) 0xB2, /* Superscript 2 */
'3', '^', (CHAR) 0xB3, /* Superscript 3 */
(CHAR) 0x27, (CHAR) 0x27, (CHAR) 0xB4, /* Acute accent */
'/', 'U', (CHAR) 0xB5, /* Micro sign */
'U', '/', (CHAR) 0xB5, /* Micro sign */
'/', 'u', (CHAR) 0xB5, /* Micro sign */
'u', '/', (CHAR) 0xB5, /* Micro sign */
'P', '!', (CHAR) 0xB6, /* Pilcrow sign */
'p', '!', (CHAR) 0xB6, /* Pilcrow sign */
'.', '^', (CHAR) 0xB7, /* Middle dot */
',', ',', (CHAR) 0xB8, /* Cedilla */
'1', '^', (CHAR) 0xB9, /* Superscript 1 */
'O', '_', (CHAR) 0xBA, /* Masculine ordinal */
'o', '_', (CHAR) 0xBA, /* Masculine ordinal */
'>', '>', (CHAR) 0xBB, /* Right angle quotation */
'1', '4', (CHAR) 0xBC, /* Fraction one quarter */
'1', '2', (CHAR) 0xBD, /* Fraction one half */
'?', '?', (CHAR) 0xBF, /* Inverted question mark */
'x', 'x', (CHAR) 0xD7, /* Multiplication sign */
'X', 'X', (CHAR) 0xD7, /* Multiplication sign */
/*
The following group is for entering ASCII characters that are otherwise
impossible to enter, e.g. because they are dead-key combinations.
*/
(CHAR)0x27, '.' ,(CHAR) 0x27, /* Apostrophe */
'.', (CHAR)0x27, (CHAR) 0x27, /* Apostrophe */
'^', '^', '^', /* Circumflex or caret */
'`', '`', '`', /* Grave accent or backquote */
'~', '~', '~', /* Tilde */
',', '.', ',', /* Comma */
'.', ',', ',', /* Comma */
'"', '"', '"', /* Doublequote */
':', ':', (CHAR) 0xA8 /* Diaeresis */
};
int nl1ktab = (sizeof(l1ktab) / sizeof(struct compose_key_tab));
struct compose_key_tab l2ktab[] = { /* The Latin-2 Compose Key Table */
'N', 'B', (CHAR) 0xA0, /* No-Break Space */
'A', C_OGONEK, (CHAR) 0xA1, /* A ogonek */
C_OGONEK, 'A', (CHAR) 0xA1, /* A ogonek */
C_BREVE, C_BREVE, (CHAR) 0xF4, /* Breve */
'L', '/', (CHAR) 0xA3, /* L with stroke */
'/', 'L', (CHAR) 0xA3, /* L with stroke */
'X', 'O', (CHAR) 0xA4, /* Currency sign */
'X', '0', (CHAR) 0xA4, /* Currency sign */
'x', 'o', (CHAR) 0xA4, /* Currency sign */
'x', '0', (CHAR) 0xA4, /* Currency sign */
'L', C_CARON, 0xA5, /* L caron */
C_CARON, 'L', 0xA5, /* L caron */
'S', C_ACUTE, (CHAR) 0xA6, /* S acute */
C_ACUTE, 'S', (CHAR) 0xA6, /* S acute */
'S', 'O', (CHAR) 0xA7, /* Paragraph sign */
'S', '!', (CHAR) 0xA7, /* Paragraph sign */
'S', '0', (CHAR) 0xA7, /* Paragraph sign */
's', 'o', (CHAR) 0xA7, /* Paragraph sign */
's', '!', (CHAR) 0xA7, /* Paragraph sign */
's', '0', (CHAR) 0xA7, /* Paragraph sign */
':', ':', (CHAR) 0xA8, /* Diaeresis */
'S', C_CARON, (CHAR) 0xA9, /* S caron */
C_CARON, 'S', (CHAR) 0xA9, /* S caron */
'S', C_CEDILLA, (CHAR) 0xAA, /* S cedilla */
C_CEDILLA, 'S', (CHAR) 0xAA, /* S cedilla */
'T', C_CARON, (CHAR) 0xAB, /* T caron */
C_CARON, 'T', (CHAR) 0xAB, /* T caron */
'Z', C_ACUTE, (CHAR) 0xAC, /* Z acute */
C_ACUTE, 'Z', (CHAR) 0xAC, /* Z acute */
'-', '-', (CHAR) 0xAD, /* Soft hyphen */
'Z', C_CARON, (CHAR) 0xAE, /* Z caron */
C_CARON, 'Z', (CHAR) 0xAE, /* Z caron */
'Z', C_DOT, (CHAR) 0xAF, /* Z dot above */
C_DOT, 'Z', (CHAR) 0xAF, /* Z dot above */
'0', '^', (CHAR) 0xB0, /* Degree sign */
'a', C_OGONEK, (CHAR) 0xB1, /* a ogonek */
C_OGONEK, 'a', (CHAR) 0xB1, /* a ogonek */
C_OGONEK, C_OGONEK, (CHAR) 0xB2, /* Ogonek */
'l', '/', (CHAR) 0xB3, /* l with stroke */
'/', 'l',(CHAR) 0xB3, /* l with stroke */
C_ACUTE, C_ACUTE, (CHAR) 0xB4, /* Acute accent */
'l', C_CARON, (CHAR) 0xB5, /* l caron */
C_CARON, 'l', (CHAR) 0xB5, /* l caron */
's', C_ACUTE, (CHAR) 0xB6, /* s acute */
C_ACUTE, 's', (CHAR) 0xB6, /* s acute */
C_CARON, C_CARON, (CHAR) 0xB7, /* Caron */
C_CEDILLA, C_CEDILLA, (CHAR) 0xB8, /* Cedilla */
's', C_CARON, (CHAR) 0xB9, /* s caron */
C_CARON, 's', (CHAR) 0xB9, /* s caron */
's', C_CEDILLA, (CHAR) 0xBA, /* s cedilla */
C_CEDILLA, 's', (CHAR) 0xBA, /* s cedilla */
't', C_CARON, (CHAR) 0xBB, /* t caron */
C_CARON, 't', (CHAR) 0xBB, /* t caron */
'z', C_ACUTE, (CHAR) 0xBC, /* z acute */
C_ACUTE, 'z', (CHAR) 0xBC, /* z acute */
C_DACUTE, C_DACUTE, (CHAR) 0xBD, /* Double acute */
'z', C_CARON, (CHAR) 0xBE, /* z caron */
C_CARON, 'z', (CHAR) 0xBE, /* z caron */
'z', C_DOT, (CHAR) 0xBF, /* z dot above */
C_DOT, 'z', (CHAR) 0xBF, /* z dot above */
'R', C_ACUTE, (CHAR) 0xC0, /* R acute */
C_ACUTE, 'R', (CHAR) 0xC0, /* R acute */
'A', C_ACUTE, (CHAR) 0xC1, /* A acute */
C_ACUTE, 'A', (CHAR) 0xC1, /* A acute */
'A', '^', (CHAR) 0xC2, /* A circumflex */
'^', 'A', (CHAR) 0xC2, /* A circumflex */
'A', C_BREVE, (CHAR) 0xC3, /* A breve */
C_BREVE, 'A', (CHAR) 0xC3, /* A breve */
'A', '"', (CHAR) 0xC4, /* A diaeresis */
'"', 'A', (CHAR) 0xC4, /* A diaeresis */
'L', C_ACUTE, (CHAR) 0xC5, /* L acute */
C_ACUTE, 'L', (CHAR) 0xC5, /* L acute */
'C', C_ACUTE, (CHAR) 0xC6, /* C acute */
C_ACUTE, 'C', (CHAR) 0xC6, /* C acute */
'C', ',', (CHAR) 0xC7, /* C cedilla */
',', 'C', (CHAR) 0xC7, /* C cedilla */
'C', C_CARON, (CHAR) 0xC8, /* C caron */
C_CARON, 'C', (CHAR) 0xC8, /* C caron */
'E', C_ACUTE, (CHAR) 0xC9, /* E acute */
C_ACUTE, 'E', (CHAR) 0xC9, /* E acute */
'E', C_OGONEK, (CHAR) 0xCA, /* E ogonek */
C_OGONEK, 'E', (CHAR) 0xCA, /* E ogonek */
'E', '"', (CHAR) 0xCB, /* E diaeresis */
'"', 'E', (CHAR) 0xCB, /* E diaeresis */
'E', C_CARON, (CHAR) 0xCC, /* E caron */
C_CARON, 'E', (CHAR) 0xCC, /* E caron */
'I', C_ACUTE, (CHAR) 0xCD, /* I acute */
C_ACUTE, 'I', (CHAR) 0xCD, /* I acute */
'I', '^', (CHAR) 0xCE, /* I circumflex */
'^', 'I', (CHAR) 0xCE, /* I circumflex */
C_CARON, 'D', (CHAR) 0xCF, /* D caron */
'D', C_CARON, (CHAR) 0xCF, /* D caron */
'-', 'D', (CHAR) 0xD0, /* D stroke */
'D', '-', (CHAR) 0xD0, /* D stroke */
'N', C_ACUTE, (CHAR) 0xD1, /* N acute */
C_ACUTE, 'N', (CHAR) 0xD1, /* N acute */
'N', C_CARON, (CHAR) 0xD2, /* N caron */
C_CARON, 'N', (CHAR) 0xD2, /* N caron */
'O', C_ACUTE, (CHAR) 0xD3, /* O acute */
C_ACUTE, 'O', (CHAR) 0xD3, /* O acute */
'O', '^', (CHAR) 0xD4, /* O circumflex */
'^', 'O', (CHAR) 0xD4, /* O circumflex */
'O', C_DACUTE, (CHAR) 0xD5, /* O double acute */
C_DACUTE, 'O', (CHAR) 0xD5, /* O double acute */
'O', '"', (CHAR) 0xD6, /* O diaeresis */
'"', 'O', (CHAR) 0xD6, /* O diaeresis */
'x', 'x', (CHAR) 0xD7, /* Multiplication sign */
'X', 'X', (CHAR) 0xD7, /* Multiplication sign */
'R', C_CARON, (CHAR) 0xD8, /* R caron */
C_CARON, 'R', (CHAR) 0xD8, /* R caron */
'U', C_RING, (CHAR) 0xD9, /* U ring */
C_RING, 'U', (CHAR) 0xD9, /* U ring */
'U', C_ACUTE, (CHAR) 0xDA, /* U acute */
C_ACUTE, 'U', (CHAR) 0xDA, /* U acute */
'U', C_DACUTE, (CHAR) 0xDB, /* U double acute */
C_DACUTE, 'U', (CHAR) 0xDB, /* U double acute */
'U', '"', (CHAR) 0xDC, /* U diaeresis */
'"', 'U', (CHAR) 0xDC, /* U diaeresis */
'Y', C_ACUTE, (CHAR) 0xDD, /* Y acute */