-
Notifications
You must be signed in to change notification settings - Fork 0
/
ckuusr.h
3081 lines (2826 loc) · 112 KB
/
ckuusr.h
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 U U S R . H -- Symbol definitions for C-Kermit ckuus*.c modules */
/*
Author: Frank da Cruz <fdc@columbia.edu>,
Columbia University Academic Information Systems, New York City.
Copyright (C) 1985, 2017,
Trustees of Columbia University in the City of New York.
All rights reserved. See the C-Kermit COPYING.TXT file or the
copyright text in the ckcmai.c module for disclaimer and permissions.
*/
#ifndef CKUUSR_H
#define CKUUSR_H
#include "ckucmd.h" /* Get symbols from command package */
#ifndef NOLUCACHE /* Use lookup() cache */
#ifndef NOSPL /* To speed up script programs */
#ifndef USE_LUCACHE
#define USE_LUCACHE
#endif /* USE_LUCACHE */
#endif /* NOSPL */
#endif /* NOLUCACHE */
#ifndef NODOUBLEQUOTING /* New to 8.0 */
#define DOUBLEQUOTING /* Allow fields to be enclosed in */
#endif /* NODOUBLEQUOTING */ /* doublequotes. */
#ifndef NOLOCUS /* SET LOCUS */
#define LOCUS
#endif /* NOLOCUS */
/* Sizes of things - FNVALL and MAXARGLEN increased from 8K 2005/09/12 */
/* Other things increased even more for 64-bit builds 2016/02/03 */
#ifdef BIGBUFOK
#define FNVALL CMDBL /* Function return value length */
#define MAXARGLEN CMDBL /* Max func arg length after eval */
#define MAXARGLIST 1024 /* Max number of args for a macro */
#define FSPECL CMDBL /* Max length for MSEND/GET string */
#define MSENDMAX 1024 /* Number of filespecs for MSEND */
#define MAC_MAX 16384 /* Maximum number of macros */
#else /* Same as above but for smaller builds... */
#define FNVALL 1022
#define MAXARGLEN 1023
#define MAXARGLIST 64
#define FSPECL 300
#define MSENDMAX 128
#define MAC_MAX 1024
#endif /* BIGBUFOK */
#define GVARS 127 /* Highest global var allowed */
#ifdef BIGBUFOK
#define VNAML 4096 /* Max length for variable name */
#define ARRAYREFLEN 1024 /* Max length for array reference */
#define FORDEPTH 32 /* Maximum depth of nested FOR loops */
#define MAXTAKE 54 /* Maximum nesting of TAKE files */
#define MACLEVEL 128 /* Maximum nesting for macros */
#define INPBUFSIZ 4096 /* Size of INPUT buffer */
#define PROMPTL 1024 /* Max length for prompt */
#define LBLSIZ 8192 /* Maximum length for a GOTO label */
#else
#define VNAML 256 /* Max length for variable name */
#define ARRAYREFLEN 128 /* Max length for array reference */
#define FORDEPTH 10 /* Maximum depth of nested FOR loops */
#define MAXTAKE 32 /* Maximum nesting of TAKE files */
#define MACLEVEL 64 /* Maximum nesting for macros */
#define INPBUFSIZ 256
#define PROMPTL 256 /* Max length for prompt */
#define LBLSIZ 128 /* Maximum length for a GOTO label */
#endif /* BIGBUFOK */
#define NARGS 10 /* Max number of macro arguments */
#define LINBUFSIZ (CMDBL + 10) /* Size of line[] buffer */
#define TMPBUFSIZ (CMDBL + 10) /* Size of temporary buffer */
#define CMDSTKL ( MACLEVEL + MAXTAKE + 2) /* Command stack depth */
#ifndef NOPURGE /* PURGE command */
#ifdef UNIX
#define CKPURGE
#endif /* UNIX */
#endif /* NOPURGE */
#ifndef NOMINPUT /* MINPUT command */
#ifndef NOSPL
#define CK_MINPUT
#ifndef MINPMAX
#ifdef BIGBUFOK
#define MINPMAX 96 /* Max number of MINPUT strings */
#else
#define MINPMAX 16
#endif /* BIGBUFOK */
#endif /* MINPMAX */
#define MINPBUFL 256 /* Size of MINPUT temp buffer */
#endif /* NOSPL */
#endif /* NOMINPUT */
#define ARRAYBASE 95 /* Lowest array-name character */
#ifndef NOKERBANG
#ifndef KERBANG
#define KERBANG
#endif /* KERBANG */
#endif /* NOKERBANG */
/* Bit values (1, 2, 4, 8, ...) for the ccflgs field */
#define CF_APC 1 /* Executing an APC command */
#define CF_KMAC 2 /* Executing a \Kmacro */
#define CF_CMDL 4 /* Macro from -C "blah" command line */
#define CF_REXX 8 /* Macro from REXX interpreter */
#define CF_IMAC 16 /* Internal macro like FOR, WHILE... */
struct cmdptr { /* Command stack structure */
int src; /* Command Source */
int lvl; /* Current TAKE or DO level */
int ccflgs; /* Flags */
};
struct mtab { /* Macro table, like keyword table */
char *kwd; /* But with pointers for vals */
char *mval; /* instead of ints. */
short flgs;
};
struct localvar { /* Local variable structure. */
char * lv_name;
char * lv_value;
struct localvar * lv_next;
};
struct stringlist { /* General purpose string list */
char * sl_name;
struct stringlist * sl_next;
};
struct stringint { /* String and (wide) integer */
char * sval; /* used mainly with command switches */
int ival;
CK_OFF_T wval;
};
#ifndef NOICP
/*
C-Kermit Initialization file...
System-dependent defaults are built into the program, see below.
These can be overridden in either of two ways:
1. CK_DSYSINI is defined at compile time, in which case a default
system-wide initialization file name is chosen from below, or:
2: CK_SYSINI is defined to be a string, which lets the program
builder choose the initialization filespec at compile time.
These can be given on the CC command line, so the source code need not be
changed.
*/
#ifndef CK_SYSINI /* If no initialization file given, */
#ifdef CK_DSYSINI /* but CK_DSYSINI is defined... */
/* Supply system-dependent "default default" initialization file */
#ifdef UNIX /* For UNIX, system-wide */
/* This allows one copy of the standard init file on the whole system, */
/* rather than a separate copy in each user's home directory. */
#ifdef HPUX10
#define CK_SYSINI "/usr/share/lib/kermit/ckermit.ini"
#else
#ifdef CU_ACIS
#define CK_SYSINI "/usr/share/lib/kermit/ckermit.ini"
#else
#ifdef __linux__
#define CK_SYSINI "/usr/share/kermit/ckermit.ini"
#else
#define CK_SYSINI "/usr/local/bin/ckermit.ini"
#endif /* linux */
#endif /* CU_ACIS */
#endif /* HPUX10 */
/* Fill in #else..#ifdef's here for VMS, OS/2, etc. */
/* Fill in matching #endif's here. */
#endif /* UNIX */
#endif /* CK_DSYSINI */
#endif /* CK_SYSINI */
#ifdef CK_SYSINI /* Init-file precedence */
#ifndef CK_INI_A /* A means system-wide file first */
#ifndef CK_INI_B /* B means user's first */
#define CK_INI_A /* A is default */
#endif /* CK_INI_B */
#endif /* CK_INI_A */
#else
#ifdef CK_INI_A /* Otherwise */
#undef CK_INI_A /* make sure these aren't defined */
#endif /* CK_INI_A */
#ifdef CK_INI_B
#undef CK_INI_B
#endif /* CK_INI_B */
#endif /* CK_SYSINI */
#ifdef CK_SYSINI /* One more check... */
#ifdef CK_INI_A /* Make sure they're not both */
#ifdef CK_INI_B /* defined. */
#undef CK_INI_B
#endif /* CK_INI_B */
#endif /* CK_INI_A */
#endif /* CK_SYSINI */
/*
If neither CK_DSYSINI nor CK_SYSINI are defined, these are the
built-in defaults for each platform. USE_CUSTOM means to execute the
customization file automatically if the initialization file is not found.
*/
#ifndef NOCUSTOM
#ifndef USE_CUSTOM
#define USE_CUSTOM
#endif /* USE_CUSTOM */
#endif /* NOCUSTOM */
#ifndef KERMRCL /* Path length for init file */
#define KERMRCL CKMAXPATH
#endif /* KERMRCL */
#ifdef vms
#define KERMRC "CKERMIT.INI" /* Init file name */
#define MYCUSTOM "CKERMOD.INI" /* Customization file name */
#else
#ifdef OS2
#ifdef NT
#define KERMRC "k95.ini"
#define MYCUSTOM "k95custom.ini"
#else
#define KERMRC "k2.ini"
#define MYCUSTOM "k2custom.ini"
#endif /* NT */
#else
#ifdef UNIXOROSK
#define KERMRC ".kermrc"
#define MYCUSTOM ".mykermrc"
#else
#ifdef STRATUS
#define KERMRC "ckermit.ini"
#define MYCUSTOM "ckermod.ini"
#else
#define KERMRC "CKERMIT.INI"
#define MYCUSTOM "ckermod.ini"
#endif /* STRATUS */
#endif /* UNIXOROSK */
#endif /* OS2 */
#endif /* vms */
#ifndef KERMRCL
#define KERMRCL 256
#endif /* KERMRCL */
#endif /* NOICP */
/* User interface features */
#ifndef NORPLWORDMODE /* \freplace() word mode */
#define RPLWORDMODE
#endif /* NORPLWORDMODE */
#ifdef CK_CURSES /* Thermometer */
#ifndef NO_PCT_BAR
#ifndef CK_PCT_BAR
#define CK_PCT_BAR
#endif /* NO_PCT_BAR */
#endif /* CK_PCT_BAR */
#endif /* CK_CURSES */
#ifdef KUI /* KUI requires the Thermometer code */
#ifndef NO_PCT_BAR
#ifndef CK_PCT_BAR
#define CK_PCT_BAR
#endif /* NO_PCT_BAR */
#endif /* CK_PCT_BAR */
#endif /* KUI */
/* Includes */
#ifdef MINIX
/* why? */
#include <sys/types.h>
#endif /* MINIX */
/* Symbols for command source */
#define CMD_KB 0 /* KeyBoard or standard input */
#define CMD_TF 1 /* TAKE command File */
#define CMD_MD 2 /* Macro Definition */
/*
SET TRANSFER CANCELLATION command should be available in all versions.
But for now...
*/
#ifdef UNIX /* UNIX has it */
#ifndef XFRCAN
#define XFRCAN
#endif /* XFRCAN */
#endif /* UNIX */
#ifdef VMS /* VMS has it */
#ifndef XFRCAN
#define XFRCAN
#endif /* XFRCAN */
#endif /* VMS */
#ifdef datageneral /* DG AOS/VS has it */
#ifndef XFRCAN
#define XFRCAN
#endif /* XFRCAN */
#endif /* datageneral */
#ifdef STRATUS /* Stratus VOS has it */
#ifndef XFRCAN
#define XFRCAN
#endif /* XFRCAN */
#endif /* STRATUS */
#ifdef OSK /* OS-9 */
#ifndef XFRCAN
#define XFRCAN
#endif /* XFRCAN */
#endif /* OSK */
#ifndef NOCMDL
/* Extended Command-Line Option Codes (keep alphabetical by keyword) */
#define XA_ANON 0 /* --anonymous */
#define XA_BAFI 1 /* --bannerfile */
#define XA_CDFI 2 /* --cdfile */
#define XA_CDMS 3 /* --cdmessage */
#define XA_HELP 4 /* --help */
#define XA_HEFI 5 /* --helpfile */
#define XA_IKFI 6 /* --xferfile */
#define XA_IKLG 7 /* --xferlog */
#define XA_ANFI 8 /* --initfile */
#define XA_PERM 9 /* --permissions */
#define XA_ROOT 10 /* --root */
#define XA_SYSL 11 /* --syslog */
#define XA_USFI 12 /* --userfile */
#define XA_WTFI 13 /* --wtmpfile */
#define XA_WTMP 14 /* --wtmplog */
#define XA_TIMO 15 /* --timeout */
#define XA_NOIN 16 /* --nointerrupts */
#define XA_DBAS 17 /* --database */
#define XA_DBFI 18 /* --dbfile */
#define XA_PRIV 19 /* --privid */
#define XA_VERS 20 /* --version */
#define XA_NPRM 21 /* --noperms */
#define XA_XPOS 22 /* Window position X coordinate */
#define XA_YPOS 23 /* Window position Y coordinate */
#define XA_FNAM 24 /* Font Facename */
#define XA_FSIZ 25 /* Font Size */
#define XA_TERM 26 /* Terminal type */
#define XA_CSET 27 /* Remote Character Set */
#define XA_ROWS 28 /* Screen rows (height) */
#define XA_COLS 29 /* Screen columns (width) */
#define XA_TEL 30 /* Make a Telnet connection */
#define XA_FTP 31 /* Make an FTP connection */
#define XA_SSH 32 /* Make an SSH connection */
#define XA_USER 33 /* Username for login */
#define XA_PASS 34 /* Password for login */
#define XA_TITL 35 /* Window Title */
#define XA_NOMN 36 /* No GUI Menu Bar */
#define XA_NOTB 37 /* No GUI Tool Bar */
#define XA_NOSB 38 /* No GUI Status Bar */
#define XA_NOPUSH 39 /* Disable external commands */
#define XA_NOSCROLL 40 /* Disable scrollback operations */
#define XA_NOESCAPE 41 /* Disable escape from connect mode */
#define XA_LOCK 42 /* All lockdown options */
#define XA_NOBAR 43 /* No GUI Bars */
#define XA_WMAX 44
#define XA_WMIN 45
#define XA_SCALE 46 /* GUI Scale Font */
#define XA_CHGD 47 /* GUI Change Dimensions */
#define XA_NOCLOSE 48 /* GUI Disable Close Window */
#define XA_UNBUF 49 /* UNIX unbuffered console */
#define XA_NOLOCALE 50 /* Don't access or use locale */
#define XA_MAX 50 /* Highest extended option number */
#endif /* NOCMDL */
#ifndef NOICP
/* Top Level Commands */
/* Values associated with top-level commands must be 0 or greater. */
#define XXBYE 0 /* BYE */
#define XXCLE 1 /* CLEAR */
#define XXCLO 2 /* CLOSE */
#define XXCON 3 /* CONNECT */
#define XXCPY 4 /* COPY */
#define XXCWD 5 /* CWD (Change Working Directory) */
#define XXDEF 6 /* DEFINE (a macro or variable) */
#define XXDEL 7 /* (Local) DELETE */
#define XXDIR 8 /* (Local) DIRECTORY */
/* DIRECTORY Command options... */
#define DIR_BRF 1 /* BRIEF */
#define DIR_VRB 2 /* VERBOSE */
#define DIR_PAG 3 /* PAGE */
#define DIR_NOP 4 /* NOPAGE */
#define DIR_ISO 5 /* ISODATE */
#define DIR_DAT 6 /* ENGLISHDATE */
#define DIR_HDG 7 /* HEADINGS */
#define DIR_NOH 8 /* NOHEADINGS */
#define DIR_SRT 9 /* SORT */
#define DIR_NOS 10 /* NOSORT */
#define DIR_ASC 11 /* ASCENDING */
#define DIR_DSC 12 /* DESCENDING */
#define DIR_REC 13 /* RECURSIVE */
#define DIR_NOR 14 /* NORECURIVE */
#define DIR_DOT 15 /* DOTFILES */
#define DIR_NOD 16 /* NODOTFILES */
#define DIR_DIR 17 /* DIRECTORIES */
#define DIR_FIL 18 /* FILES */
#define DIR_ALL 19 /* ALL */
#define DIR_NAM 20 /* NAMES: */
#define DIR_TYP 21 /* FILETYPES */
#define DIR_NOT 22 /* NOFILETYPES */
#define DIR_BUP 23 /* BACKUP */
#define DIR_NOB 24 /* NOBACKUP */
#define DIR_MSG 25 /* MESSAGE */
#define DIR_NOM 26 /* NOMESSAGE */
#define DIR_ARR 27 /* ARRAY: */
#define DIR_NAR 28 /* NOARRAY */
#define DIR_EXC 29 /* EXCEPT: */
#define DIR_LAR 30 /* LARGER-THAN: */
#define DIR_SMA 31 /* SMALLER-THAN: */
#define DIR_AFT 32 /* AFTER: */
#define DIR_NAF 33 /* NOT-AFTER: */
#define DIR_BEF 34 /* BEFORE: */
#define DIR_NBF 35 /* NOT-BEFORE: */
#define DIR_SUM 36 /* SUMMARY */
#define DIR_BIN 37 /* TYPE (only show binary or text) */
#define DIR_LNK 38 /* follow symlinks */
#define DIR_NLK 39 /* don't follow symlinks */
#define DIR_OUT 40 /* Output file for listing */
#define DIR_TOP 41 /* Top n lines */
#define DIR_COU 42 /* COUNT:var */
#define DIR_NOL 43 /* NOLINKS (don't show symlinks at at all) */
#define DIR_MOD 44 /* Set modification time (used only by TOUCH) */
#define DIR_SIM 45 /* /SIMULATE (for TOUCH) */
#define DIR_DES 46 /* /DESTINATION: (for CHANGE) */
#define DIR_BAK 47 /* /BACKUP: (for CHANGE) */
#define DIRS_NM 0 /* Sort directory by NAME */
#define DIRS_DT 1 /* Sort directory by DATE */
#define DIRS_SZ 2 /* Sort directory by SIZE */
#define XXDIS 9 /* DISABLE */
#define XXECH 10 /* ECHO */
#define XXEXI 11 /* EXIT */
#define XXFIN 12 /* FINISH */
#define XXGET 13 /* GET */
#define XXHLP 14 /* HELP */
#define XXINP 15 /* INPUT */
#define XXLOC 16 /* LOCAL */
#define XXLOG 17 /* LOG */
#define XXMAI 18 /* MAIL */
#define XXMOU 19 /* (Local) MOUNT */
#define XXMSG 20 /* (Local) MESSAGE */
#define XXOUT 21 /* OUTPUT */
#define XXPAU 22 /* PAUSE */
#define XXPRI 23 /* (Local) PRINT */
#define XXQUI 24 /* QUIT */
#define XXREC 25 /* RECEIVE */
#define XXREM 26 /* REMOTE */
#define XXREN 27 /* (Local) RENAME */
#define XXSEN 28 /* SEND */
/* SEND switches */
#define SND_BIN 0 /* Binary mode */
#define SND_DEL 1 /* Delete after */
#define SND_EXC 2 /* Except */
#define SND_LAR 3 /* Larger than */
#define SND_MAI 4 /* Mail */
#define SND_BEF 5 /* Before */
#define SND_AFT 6 /* After */
#define SND_PRI 7 /* Print */
#define SND_SHH 8 /* Quiet */
#define SND_REC 9 /* Recursive */
#define SND_SMA 10 /* Smaller than */
#define SND_STA 11 /* Starting-from */
#define SND_TXT 12 /* Text mode */
#define SND_CMD 13 /* From command (pipe) */
#define SND_RES 14 /* Resend/Recover */
#define SND_PRO 15 /* Protocol */
#define SND_ASN 16 /* As-name */
#define SND_IMG 17 /* Image */
#define SND_LBL 18 /* Labeled */
#define SND_NAF 19 /* Not-After */
#define SND_NBE 20 /* Not-Before */
#define SND_FLT 21 /* Filter */
#define SND_PTH 22 /* Pathnames */
#define SND_NAM 23 /* Filenames */
#define SND_MOV 24 /* MOVE to another directory */
#define SND_REN 25 /* RENAME after sending */
#define SND_CAL 26 /* Calibrate */
#define SND_FIL 27 /* File containing list of files to send */
#define SND_NOB 28 /* Skip backup files */
#define SND_DOT 29 /* Include dot-files */
#define SND_NOD 30 /* Exclude dot-files */
#define SND_ARR 31 /* Send from array */
#define SND_TYP 32 /* TYPE (only send text (or binary)) */
#define SND_XPA 33 /* TRANSPARENT */
#define SND_PIP 34 /* PIPES */
#define SND_ERR 35 /* ERROR */
#define SND_CSL 36 /* Local character set */
#define SND_CSR 37 /* Remote character set */
#define SND_UPD 38 /* Update */
#define SND_COL 39 /* Collision */
#define SND_NML 40 /* Namelist */
#define SND_SRN 41 /* Server-Rename */
#define SND_LNK 42 /* Follow links */
#define SND_NLK 43 /* Don't follow links */
#define SND_SIM 44 /* Simulate */
#define SND_DIF 45 /* If dates Differ */
#define SND_PAT 46 /* Pattern to use locally when GET'ing */
#define SND_NLS 47 /* (FTP only) MGET forces NLST */
#define SND_MLS 48 /* (FTP only) MGET forces MLSD */
#define SND_MAX 48 /* Highest SEND switch */
#define XXSER 29 /* SERVER */
#define XXSET 30 /* SET */
#define XXSHE 31 /* Command for SHELL */
#define XXSHO 32 /* SHOW */
#define XXSPA 33 /* (Local) SPACE */
#define XXSTA 34 /* STATISTICS */
#define XXSUB 35 /* (Local) SUBMIT */
#define XXTAK 36 /* TAKE */
#define XXTRA 37 /* TRANSMIT */
#define XXTYP 38 /* (Local) TYPE */
#define XXWHO 39 /* (Local) WHO */
#define XXDIAL 40 /* (Local) DIAL */
#define XXLOGI 41 /* (Local) SCRIPT */
#define XXCOM 42 /* Comment */
#define XXHAN 43 /* HANGUP */
#define XXXLA 44 /* TRANSLATE */
#define XXIF 45 /* IF */
#define XXLBL 46 /* label */
#define XXGOTO 47 /* GOTO */
#define XXEND 48 /* END */
#define XXSTO 49 /* STOP */
#define XXDO 50 /* DO */
#define XXPWD 51 /* PWD */
#define XXTES 52 /* TEST */
#define XXASK 53 /* ASK */
#define XXASKQ 54 /* ASKQ */
#define XXASS 55 /* ASSIGN */
#define XXREI 56 /* REINPUT */
#define XXINC 57 /* INCREMENT */
#define XXDEC 59 /* DECREMENT */
#define XXELS 60 /* ELSE */
#define XXEXE 61 /* EXECUTE */
#define XXWAI 62 /* WAIT */
#define XXVER 63 /* VERSION */
#define XXENA 64 /* ENABLE */
#define XXWRI 65 /* WRITE */
#define XXCLS 66 /* CLS (clear screen) */
#define XXRET 67 /* RETURN */
#define XXOPE 68 /* OPEN */
#define XXREA 69 /* READ */
#define XXON 70 /* ON */
#define XXDCL 71 /* DECLARE */
#define XXBEG 72 /* BEGIN (not used) */
#define XXFOR 72 /* FOR */
#define XXWHI 73 /* WHILE */
#define XXIFX 74 /* Extended IF */
#define XXCMS 75 /* SEND from command output (not yet) */
#define XXCMR 76 /* RECEIVE to a command's input (not yet) */
#define XXCMG 77 /* GET to a command's input (not yet) */
#define XXSUS 78 /* SUSPEND */
#define XXERR 79 /* ERROR */
#define XXMSE 80 /* MSEND */
#define XXBUG 81 /* BUG */
#define XXPAD 82 /* PAD (as in X.25 PAD) ANYX25 */
#define XXRED 83 /* REDIAL */
#define XXGTA 84 /* _getargs (invisible internal) */
#define XXPTA 85 /* _putargs (invisible internal) */
#define XXGOK 86 /* GETOK - Ask for YES/NO */
#define XXTEL 87 /* TELNET */
#define XXASX 88 /* _ASSIGN (evaluates var name) */
#define XXDFX 89 /* _DEFINE (evaluates var name) */
#define XXPNG 90 /* PING (for TCP/IP) */
#define XXINT 91 /* INTRODUCTION */
#define XXCHK 92 /* CHECK (a feature) */
#define XXMSL 93 /* MSLEEP, MPAUSE (millisecond sleep) */
#define XXNEW 94 /* NEWS */
#define XXAPC 95 /* APC */
#define XXFUN 96 /* REDIRECT */
#define XXWRL 97 /* WRITE-LINE */
#define XXREXX 98 /* Rexx */
#define XXMINP 100 /* MINPUT */
#define XXRSEN 101 /* RESEND */
#define XXPSEN 102 /* PSEND */
#define XXGETC 103 /* GETC */
#define XXEVAL 104 /* EVALUATE */
#define XXFWD 105 /* FORWARD */
#define XXUPD 106 /* UPDATES */
#define XXBEEP 107 /* BEEP */
#define XXMOVE 108 /* MOVE */
#define XXMMOVE 109 /* MMOVE */
#define XXREGET 110 /* REGET */
#define XXLOOK 111 /* LOOKUP */
#define XXVIEW 112 /* VIEW (terminal buffer) */
#define XXANSW 113 /* ANSWER (the phone) */
#define XXPDIA 114 /* PDIAL (partial dial) */
#define XXASC 115 /* ASCII / TEXT */
#define XXBIN 116 /* BINARY */
#define XXFTP 117 /* FTP */
#define XXMKDIR 118 /* MKDIR */
#define XXRMDIR 119 /* RMDIR */
#define XXTELOP 120 /* TELOPT */
#define XXRLOG 121 /* RLOGIN */
#define XXUNDEF 122 /* UNDEFINE */
#define XXNPSH 123 /* NOPUSH */
#define XXADD 124 /* ADD */
#define ADD_SND 0 /* ADD SEND-LIST */
#define ADD_BIN 1 /* ADD BINARY-PATTERNS */
#define ADD_TXT 2 /* ADD TEXT-PATTERNS */
#define XXLOCAL 125 /* LOCAL */
#define XXKERMI 126 /* KERMIT */
#define XXDATE 127 /* DATE */
#define XXSWIT 128 /* SWITCH */
#define XXXFWD 129 /* _FORWARD */
#define XXSAVE 130 /* SAVE */
#define XXXECH 131 /* XECHO */
#define XXRDBL 132 /* READBLOCK */
#define XXWRBL 133 /* WRITEBLOCK */
#define XXRETR 134 /* RETRIEVE */
#define XXEIGHT 135 /* EIGHTBIT */
#define XXEDIT 136 /* EDIT */
#define XXCSEN 137 /* CSEND */
#define XXCREC 138 /* CRECEIVE */
#define XXCQ 139 /* CQ */
#define XXTAPI 140 /* TAPI actions such as dialogs */
#define XXRES 141 /* RESET */
#define XXCGET 142 /* CGET */
#define XXFUNC 143 /* Function (help-only) */
#define XXKVRB 144 /* Kverb (help-only) */
#define XXBROWS 145 /* BROWSE */
#define XXMGET 146 /* MGET */
#define XXBACK 147 /* BACK */
#define XXWHERE 148 /* WHERE */
#define XXREDO 149 /* REDO */
#define XXEXCH 150 /* EXCHANGE */
#define XXREMV 151 /* REMOVE */
#define XXCHRT 152 /* CHROOT */
#define XXOPTS 153 /* Options (help-only) */
#define XXAUTH 154 /* AUTHORIZE */
#define XXPIPE 155 /* PIPE */
#define XXSSH 156 /* SSH */
#define XXTERM 157 /* TERMINAL */
#define XXSTATUS 158 /* STATUS */
#define XXCPR 159 /* COPYRIGHT */
#define XXASSER 160 /* ASSERT */
#define XXSUCC 161 /* SUCCEED */
#define XXFAIL 162 /* FAIL */
#define XXLOGIN 163 /* LOGIN */
#define XXLOGOUT 164 /* LOGOUT */
#define XXNLCL 165 /* NOLOCAL */
#define XXWILD 166 /* WILDCARDS (help-only) */
/* One-word synonyms for REMOTE commands */
#define XXRCPY 167 /* REMOTE COPY */
#define XXRCWD 168 /* Change Working Directory */
#define XXRDEL 169 /* Delete */
#define XXRDIR 170 /* Directory */
#define XXRHLP 171 /* Help */
#define XXRHOS 172 /* Host */
#define XXRKER 173 /* Kermit */
#define XXRMSG 174 /* Message */
#define XXRPRI 175 /* Print */
#define XXRREN 176 /* Rename */
#define XXRSET 177 /* Set */
#define XXRSPA 178 /* Space */
#define XXRSUB 179 /* Submit */
#define XXRTYP 180 /* Type */
#define XXRWHO 181 /* Who */
#define XXRPWD 182 /* Print Working Directory */
#define XXRQUE 183 /* Query */
#define XXRASG 184 /* Assign */
#define XXRMKD 185 /* mkdir */
#define XXRRMD 186 /* rmdir */
#define XXRXIT 187 /* Exit */
/* Top-Level commands, cont'd... */
#define XXGETK 188 /* GETKEYCODE */
#define XXMORE 189 /* MORE */
#define XXXOPTS 190 /* Extended-Options (help-only) */
#define XXIKSD 191 /* IKSD */
#define XXRESET 192 /* RESET */
#define XXASSOC 193 /* ASSOCIATE */
#define ASSOC_FC 0 /* ASSOCIATE FILE-CHARACTER-SET */
#define ASSOC_TC 1 /* ASSOCIATE TRANSFER-CHARACTER-SET */
#define XXSHIFT 194 /* SHIFT */
#define XXMAN 195 /* MANUAL */
#define XXLS 196 /* LS */
#define XXSORT 197 /* SORT */
#define XXPURGE 198 /* PURGE */
#define XXFAST 199 /* FAST */
#define XXCAU 200 /* CAUTIOUS */
#define XXROB 201 /* ROBUST */
#define XXMACRO 202 /* Immediate macro */
#define XXSCRN 203 /* SCREEN */
#define XXLNOUT 204 /* LINEOUT */
#define XX_INCR 205 /* _INCREMENT */
#define XX_DECR 206 /* _DECREMENT */
#define XX_EVAL 207 /* _EVALUATE */
#define XXARRAY 208 /* ARRAY */
#define XXPARSE 209 /* PARSE */
#define XXHTTP 210 /* HTTP */
#ifdef CKCHANNELIO
#define XXFILE 211 /* FILE */
#define XXF_CL 212 /* FCLOSE */
#define XXF_FL 213 /* FFLUSH */
#define XXF_LI 214 /* FLIST */
#define XXF_OP 215 /* FOPEN */
#define XXF_RE 216 /* FREAD */
#define XXF_SE 217 /* FSEEK */
#define XXF_ST 218 /* FSTATUS */
#define XXF_WR 219 /* FWRITE */
#define XXF_RW 220 /* FREWIND */
#define XXF_CO 221 /* FCOUNT */
#endif /* CKCHANNELIO */
#define XXEXEC 222 /* exec() */
#define XXTRACE 223 /* TRACE */
#define XXNOTAV 224 /* The "not available" command */
#define XXPTY 225 /* PTY (like PIPE) */
#define XXCHMOD 226 /* CHMOD */
#define XXPROMP 227 /* PROMPT */
#define XXFEACH 228 /* FOREACH */
#define XXGREP 229 /* GREP */
#define XXSEXP 230 /* S-Expression */
#define XXUNDCL 231 /* UNDECLARE */
#define XXVOID 232 /* VOID */
#define XXPUT 233 /* PUT */
#define XXUNDFX 234 /* _UNDEFINE */
#define XXHEAD 235 /* HEAD */
#define XXTAIL 236 /* TAIL */
#define XXDEBUG 237 /* DEBUG */
#define XXLEARN 238 /* LEARN */
#define XXPAT 239 /* PATTERNS (help only) */
#define XXCDUP 240 /* CDUP (Change working directory upwards) */
#define XXRCDUP 241 /* REMOTE CDUP */
#define XXCAT 242 /* CAT (= TYPE /NOPAGE) */
#define XXFIREW 243 /* FIREWALL (help only) */
#define XXLCWD 244 /* Local C(W)D */
#define XXLCDU 245 /* Local CDUP */
#define XXLPWD 246 /* Local PWD */
#define XXLDEL 247 /* Local DELETE */
#define XXLDIR 248 /* Local DIRECTORY */
#define XXLREN 249 /* Local RENAME */
#define XXLMKD 250 /* Local MKDIR */
#define XXLRMD 251 /* Local RMDIR */
#define XXUSER 252 /* (FTP) USER */
#define XXACCT 253 /* (FTP) ACCOUNT */
#define XXLINK 254 /* LINK source destination */
#define XXORIE 255 /* ORIENT(ATION) */
#define XXDIALER 256 /* DIALER */
#define XXKCD 257 /* KCD */
#define XXSITE 258 /* (FTP) SITE */
#define XXPASV 259 /* (FTP) PASSIVE */
#define XXCONT 260 /* CONTINUE */
#define XXNSCR 261 /* NOSCROLL */
#define XXSFTP 262 /* SFTP */
#define XXSKRM 263 /* SKERMIT */
#define XXWDIR 264 /* WDIRECTORY */
#define XXHDIR 265 /* HDIRECTORY */
#define XXTOUC 266 /* TOUCH */
#define XXLOCU 267 /* LOCUS (for HELP) */
#define XXPUTE 268 /* PUTENV */
#define XXXMSG 269 /* XMESSAGE */
#define XXCHG 270 /* CHANGE */
/* End of Top-Level Commands */
#define SCN_CLR 0 /* SCREEN CLEAR */
#define SCN_CLE 1 /* SCREEN CLEOL */
#define SCN_MOV 2 /* SCREEN MOVE */
/* ARRAY operations */
#define ARR_DCL 0 /* Declare */
#define ARR_CPY 1 /* Copy */
#define ARR_RSZ 2 /* Resize */
#define ARR_SRT 3 /* Sort */
#define ARR_CLR 4 /* Clear */
#define ARR_SEA 5 /* Search */
#define ARR_DST 6 /* Destroy */
#define ARR_SHO 7 /* Show */
#define ARR_SET 8 /* Set */
#define ARR_EQU 9 /* Equate */
/* SORT options */
#define SRT_CAS 0 /* /CASE */
#define SRT_KEY 1 /* /KEY:n */
#define SRT_REV 2 /* /REVERSE */
#define SRT_RNG 3 /* /RANGE:n:m */
#define SRT_NUM 4 /* /NUMERIC */
/* PURGE command options */
#define PU_KEEP 0 /* /KEEP: */
#define PU_LIST 1 /* /LIST */
#define PU_PAGE 2 /* /PAGE */
#define PU_NOPA 3 /* /NOPAGE */
#define PU_NODE 4 /* /SIMULATE */
#define PU_DELE 5 /* /DELETE */
#define PU_NOLI 6 /* /NOLIST */
#define PU_QUIE 7 /* /QUIET (= NOLIST) */
#define PU_VERB 8 /* /VERBOSE (= LIST) */
#define PU_ASK 9 /* /ASK */
#define PU_NASK 10 /* /NOASK */
#define PU_LAR 11 /* /LARGER-THAN: */
#define PU_SMA 12 /* /SMALLER-THAN: */
#define PU_AFT 13 /* /AFTER: */
#define PU_NAF 14 /* /NOT-AFTER: */
#define PU_BEF 15 /* /BEFORE: */
#define PU_NBF 16 /* /NOT-BEFORE: */
#define PU_EXC 17 /* /EXCEPT: */
#define PU_RECU 18 /* /RECURSIVE */
#define PU_DOT 19 /* /DOTFILES */
#define PU_NODOT 20 /* /NODOTFILES */
#define PU_HDG 21 /* /HEADING */
#define PU_NOH 22 /* /NOHEADING */
/* DELETE command options */
#define DEL_NOL 0 /* /NOLIST */
#define DEL_LIS 1 /* /LIST */
#define DEL_HDG 2 /* /HEADINGS */
#define DEL_NOH 2 /* /NOHEADINGS */
#define DEL_BEF 3 /* /BEFORE: */
#define DEL_NBF 4 /* /NOT-BEFORE: */
#define DEL_AFT 5 /* /AFTER: */
#define DEL_NAF 6 /* /NOT-AFTER: */
#define DEL_DOT 7 /* /DOTFILES */
#define DEL_NOD 8 /* /NODOTFILES */
#define DEL_EXC 9 /* /EXCEPT:*/
#define DEL_PAG 10 /* /PAGE */
#define DEL_NOP 11 /* /NOPAGE */
#define DEL_REC 12 /* /RECURSIVE */
#define DEL_NOR 13 /* /NORECURSIVE */
#define DEL_VRB 14 /* /VERBOSE */
#define DEL_QUI 15 /* /QUIET */
#define DEL_SMA 16 /* /SMALLER-THAN: */
#define DEL_LAR 17 /* /LARGER-THAN: */
#define DEL_SIM 18 /* /SIMULATE */
#define DEL_ASK 19 /* /ASK */
#define DEL_NAS 20 /* /NOASK */
#define DEL_SUM 21 /* /SUMMARY */
#define DEL_DIR 22 /* /DIRECTORY */
#define DEL_ALL 23 /* /ALL */
#define DEL_TYP 24 /* /TYPE: */
#define DEL_LNK 25 /* /FOLLOWLINKS */
#define DEL_NLK 26 /* /NOFOLLOWLINKS */
/* RENAME switches that can be used in the same table as the DEL switches */
#define REN_LOW 100 /* Convert to lowercase */
#define REN_UPP 101 /* Converto to uppercase */
#define REN_RPL 102 /* String replacement */
#define REN_OVW 103 /* Overwrite file with same name */
#define REN_XLA 104 /* Translate character sets */
#define REN_SPA 105 /* Fix spaces */
/* FILE operations */
#define FIL_OPN 0 /* OPEN */
#define FIL_CLS 1 /* CLOSE */
#define FIL_REA 2 /* READ */
#define FIL_GET 3 /* GET */
#define FIL_WRI 4 /* WRITE */
#define FIL_REW 5 /* REWIND */
#define FIL_LIS 6 /* LIST */
#define FIL_FLU 7 /* FLUSH */
#define FIL_SEE 8 /* SEEK */
#define FIL_STA 9 /* STATUS */
#define FIL_COU 10 /* COUNT */
/* OPEN / CLOSE items */
#define OPN_FI_R 1 /* FILE READ */
#define OPN_FI_W 2 /* FILE WRITE */
#define OPN_FI_A 3 /* FILE APPEND */
#define OPN_PI_R 4 /* PIPE READ */
#define OPN_PI_W 5 /* PIPE WRITE */
#define OPN_PT_R 6 /* PTY READ */
#define OPN_PT_W 7 /* PTY WRITE */
#define OPN_SER 8 /* PORT or LINE */
#define OPN_NET 9 /* HOST */
/* KERBEROS command switches */
#define KRB_S_VE 0 /* /VERSION */
#define KRB_S_CA 1 /* /CACHE: */
#define KRB_S_MAX 1 /* Highest KERBEROS switch number */
#ifdef CK_KERBEROS
/* KERBEROS actions */
#define KRB_A_IN 0 /* INITIALIZE */
#define KRB_A_DE 1 /* DESTROY */
#define KRB_A_LC 2 /* LIST-CREDENTIALS */
/* KERBEROS INIT switches */
#define KRB_I_FW 0 /* /FORWARDABLE */
#define KRB_I_LF 1 /* /LIFETIME: */
#define KRB_I_PD 2 /* /POSTDATE: */
#define KRB_I_PR 3 /* /PROXIABLE */
#define KRB_I_RB 4 /* /RENEWABLE: */
#define KRB_I_RN 5 /* /RENEW */
#define KRB_I_SR 6 /* /SERVICE: */
#define KRB_I_VA 7 /* /VALIDATE */
#define KRB_I_RL 8 /* /REALM: */
#define KRB_I_IN 9 /* /INSTANCE: */
#define KRB_I_PW 10 /* /PASSWORD: */
#define KRB_I_PA 11 /* /PREAUTH */
#define KRB_I_VB 12 /* /VERBOSE */
#define KRB_I_BR 13 /* /BRIEF */
#define KRB_I_NFW 14 /* /NOT-FORWARDABLE */
#define KRB_I_NPR 15 /* /NOT-PROXIABLE */
#define KRB_I_NPA 16 /* /NOT-PREAUTH */
#define KRB_I_K4 17 /* /KERBEROS4 (should k5 get k4 as well) */
#define KRB_I_NK4 18 /* /NO-KERBEROS4 */
#define KRB_I_POP 19 /* /POPUP */
#define KRB_I_ADR 20 /* /ADDRESSES: */
#define KRB_I_NAD 21 /* /NO-ADDRESSES */
#define KRB_I_MAX 21 /* Highest KERBEROS INIT switch number */
#endif /* CK_KERBEROS */
/* SET parameters */
#define XYBREA 0 /* BREAK simulation */
#define XYCHKT 1 /* Block check type */
#define XYDEBU 2 /* Debugging */
#define XYDELA 3 /* Delay */
#define XYDUPL 4 /* Duplex */
#define XYEOL 5 /* End-Of-Line (packet terminator) */
#define XYESC 6 /* Escape character */
#define XYFILE 7 /* File Parameters (see ckcker.h for values) */
/* (this space available) */
#define XYFLOW 9 /* Flow Control */
#define XYHAND 10 /* Handshake */
#define XYIFD 11 /* Incomplete File Disposition */
#define XYIMAG 12 /* "Image Mode" */
#define XYINPU 13 /* INPUT command parameters */
#define XYLEN 14 /* Maximum packet length to send */
#define XYLINE 15 /* Communication line to use */
/* SET LINE / SET HOST command switches */
#define SL_CNX 0 /* /CONNECT */
#define SL_SRV 1 /* /SERVER */
#define SL_SHR 2 /* /SHARE */
#define SL_NSH 3 /* /NOSHARE */
#define SL_BEE 4 /* /BEEP */
#define SL_ANS 5 /* /ANSWER */
#define SL_DIA 6 /* /DIAL:xxx */
#define SL_SPD 7 /* /SPEED:xxx */
#define SL_FLO 8 /* /FLOW:xxx */
#define SL_TMO 9 /* /TIMEOUT:xxx */
#define SL_CMD 10 /* /COMMAND */
#define SL_PSW 11 /* /PASSWORD:xxx */
#define SL_IKS 12 /* /KERMIT-SERVICE */
#define SL_NET 13 /* /NETWORK-TYPE:xxx */
#define SL_ENC 14 /* /ENCRYPT:type (telnet) /ENCRYPT (rlogin) */
#define SL_KRB4 15 /* /KERBEROS 4 (rlogin/telnet) */
#define SL_KRB5 16 /* /KERBEROS 5 (rlogin/telnet) */
#define SL_SRP 17 /* /SRP (telnet) */
#define SL_NTLM 18 /* /NTLM (telnet) */
#define SL_SSL 19 /* /SSL (telnet) */
#define SL_UID 20 /* /USERID:xxxx */
#define SL_AUTH 21 /* /AUTH:type */
#define SL_WAIT 22 /* /WAIT */
#define SL_NOWAIT 23 /* /NOWAIT */
#define SL_PTY 24 /* /PTY */
#define XYLOG 16 /* Log file */
#define XYMARK 17 /* Start of Packet mark */
#define XYNPAD 18 /* Amount of padding */
#define XYPADC 19 /* Pad character */
#define XYPARI 20 /* Parity */
#define XYPAUS 21 /* Interpacket pause */
#define XYPROM 22 /* Program prompt string */
#define XYQBIN 23 /* 8th-bit prefix */
#define XYQCTL 24 /* Control character prefix */
#define XYREPT 25 /* Repeat count prefix */
#define XYRETR 26 /* Retry limit */