apply 010_makefile-destdir-support
[ckermit.git] / ckuusr.h
1 /*  C K U U S R . H  --  Symbol definitions for C-Kermit ckuus*.c modules  */
2
3 /*
4   Author: Frank da Cruz <fdc@columbia.edu>,
5   Columbia University Academic Information Systems, New York City.
6
7   Copyright (C) 1985, 2004,
8     Trustees of Columbia University in the City of New York.
9     All rights reserved.  See the C-Kermit COPYING.TXT file or the
10     copyright text in the ckcmai.c module for disclaimer and permissions.
11 */
12 #ifndef CKUUSR_H
13 #define CKUUSR_H
14
15 #include "ckucmd.h"                     /* Get symbols from command package */
16
17 #ifndef NOLUCACHE                       /* Use lookup() cache */
18 #ifndef NOSPL                           /* To speed up script programs */
19 #ifndef USE_LUCACHE
20 #define USE_LUCACHE
21 #endif /* USE_LUCACHE */
22 #endif /* NOSPL */
23 #endif /* NOLUCACHE */
24
25 #ifndef NODOUBLEQUOTING                 /* New to 8.0 */
26 #define DOUBLEQUOTING                   /* Allow fields to be enclosed in */
27 #endif /* NODOUBLEQUOTING */            /* doublequotes. */
28
29 #ifndef NOLOCUS                         /* SET LOCUS */
30 #define LOCUS
31 #endif /* NOLOCUS */
32
33 /* Sizes of things */
34
35 #ifdef BIGBUFOK
36 #define FNVALL 10238                    /* Function return value length */
37 #define MAXARGLEN 8191                  /* Max func arg length after eval */
38 #define MAXARGLIST 1024                 /* Max number of args for a macro */
39 #define FSPECL CMDBL                    /* Max length for MSEND/GET string */
40 #define MSENDMAX 1024                   /* Number of filespecs for MSEND */
41 #define MAC_MAX 16384                   /* Maximum number of macros */
42
43 #else  /* Same as above but for smaller builds... */
44
45 #define FNVALL 1022
46 #define MAXARGLEN 1023
47 #define MAXARGLIST 64
48 #define FSPECL 300
49 #define MSENDMAX 128
50 #define MAC_MAX 1024
51 #endif /* BIGBUFOK */
52
53 #define GVARS 127                       /* Highest global var allowed */
54 #ifdef BIGBUFOK
55 #define VNAML 4096                      /* Max length for variable name */
56 #define ARRAYREFLEN 1024                /* Max length for array reference */
57 #define FORDEPTH 32                     /* Maximum depth of nested FOR loops */
58 #define MAXTAKE 54                      /* Maximum nesting of TAKE files */
59 #define MACLEVEL 128                    /* Maximum nesting for macros */
60 #define INPBUFSIZ 4096                  /* Size of INPUT buffer */
61 #define PROMPTL 1024                    /* Max length for prompt */
62 #else
63 #define VNAML 256                       /* Max length for variable name */
64 #define ARRAYREFLEN 128                 /* Max length for array reference */
65 #define FORDEPTH 10                     /* Maximum depth of nested FOR loops */
66 #define MAXTAKE 32                      /* Maximum nesting of TAKE files */
67 #define MACLEVEL 64                     /* Maximum nesting for macros */
68 #define INPBUFSIZ 256
69 #define PROMPTL 256                     /* Max length for prompt */
70 #endif /* BIGBUFOK */
71 #define NARGS 10                        /* Max number of macro arguments */
72 #define LINBUFSIZ (CMDBL + 10)          /* Size of line[] buffer */
73 #define TMPBUFSIZ (CMDBL + 10)          /* Size of temporary buffer */
74 #define LBLSIZ 50                       /* Maximum length for a GOTO label */
75 #define CMDSTKL ( MACLEVEL + MAXTAKE + 2) /* Command stack depth */
76
77 #ifndef NOPURGE                         /* PURGE command */
78 #ifdef UNIX
79 #define CKPURGE
80 #endif /* UNIX */
81 #endif /* NOPURGE */
82
83 #ifndef NOMINPUT                        /* MINPUT command */
84 #ifndef NOSPL
85 #define CK_MINPUT
86 #ifndef MINPMAX
87 #ifdef BIGBUFOK
88 #define MINPMAX 96                      /* Max number of MINPUT strings */
89 #else
90 #define MINPMAX 16
91 #endif /* BIGBUFOK */
92 #endif /* MINPMAX */
93 #define MINPBUFL 256                    /* Size of MINPUT temp buffer */
94 #endif /* NOSPL */
95 #endif /* NOMINPUT */
96
97 #define ARRAYBASE 95                    /* Lowest array-name character */
98
99 #ifndef NOKERBANG
100 #ifndef KERBANG
101 #define KERBANG
102 #endif /* KERBANG */
103 #endif /* NOKERBANG */
104
105 /* Bit values (1, 2, 4, 8, ...) for the ccflgs field */
106
107 #define CF_APC  1                       /* Executing an APC command */
108 #define CF_KMAC 2                       /* Executing a \Kmacro */
109 #define CF_CMDL 4                       /* Macro from -C "blah" command line */
110 #define CF_REXX 8                       /* Macro from REXX interpreter */
111 #define CF_IMAC 16                      /* Internal macro like FOR, WHILE... */
112
113 struct cmdptr {                         /* Command stack structure */
114     int src;                            /* Command Source */
115     int lvl;                            /* Current TAKE or DO level */
116     int ccflgs;                         /* Flags */
117 };
118
119 struct mtab {                           /* Macro table, like keyword table */
120     char *kwd;                          /* But with pointers for vals */
121     char *mval;                         /* instead of ints. */
122     short flgs;
123 };
124
125 struct localvar {                       /* Local variable structure. */
126     char * lv_name;
127     char * lv_value;
128     struct localvar * lv_next;
129 };
130
131 struct stringlist {                     /* General purpose string list */
132     char * sl_name;
133     struct stringlist * sl_next;
134 };
135
136 #ifndef NOICP
137 /*
138   C-Kermit Initialization file...
139
140   System-dependent defaults are built into the program, see below.
141   These can be overridden in either of two ways:
142   1. CK_DSYSINI is defined at compile time, in which case a default
143      system-wide initialization file name is chosen from below, or:
144   2: CK_SYSINI is defined to be a string, which lets the program
145      builder choose the initialization filespec at compile time.
146   These can be given on the CC command line, so the source code need not be
147   changed.
148 */
149
150 #ifndef CK_SYSINI                       /* If no initialization file given, */
151 #ifdef CK_DSYSINI                       /* but CK_DSYSINI is defined... */
152
153 /* Supply system-dependent "default default" initialization file */
154
155 #ifdef UNIX                             /* For UNIX, system-wide */
156 /* This allows one copy of the standard init file on the whole system, */
157 /* rather than a separate copy in each user's home directory. */
158 #ifdef HPUX10
159 #define CK_SYSINI "/usr/share/lib/kermit/ckermit.ini"
160 #else
161 #ifdef CU_ACIS
162 #define CK_SYSINI "/usr/share/lib/kermit/ckermit.ini"
163 #else
164 #ifdef __linux__
165 #define CK_SYSINI "/usr/share/kermit/ckermit.ini"
166 #else
167 #define CK_SYSINI "/usr/local/bin/ckermit.ini"
168 #endif /* linux */
169 #endif /* CU_ACIS */
170 #endif /* HPUX10 */
171 /* Fill in #else..#ifdef's here for VMS, OS/2, etc. */
172 /* Fill in matching #endif's here. */
173 #endif /* UNIX */
174
175 #endif /* CK_DSYSINI */
176 #endif /* CK_SYSINI */
177
178 #ifdef CK_SYSINI                        /* Init-file precedence */
179 #ifndef CK_INI_A                        /* A means system-wide file first */
180 #ifndef CK_INI_B                        /* B means user's first */
181 #define CK_INI_A                        /* A is default */
182 #endif /* CK_INI_B */
183 #endif /* CK_INI_A */
184 #else
185 #ifdef CK_INI_A                         /* Otherwise */
186 #undef CK_INI_A                         /* make sure these aren't defined */
187 #endif /* CK_INI_A */
188 #ifdef CK_INI_B
189 #undef CK_INI_B
190 #endif /* CK_INI_B */
191 #endif /* CK_SYSINI */
192
193 #ifdef CK_SYSINI                        /* One more check... */
194 #ifdef CK_INI_A                         /* Make sure they're not both */
195 #ifdef CK_INI_B                         /* defined. */
196 #undef CK_INI_B
197 #endif /* CK_INI_B */
198 #endif /* CK_INI_A */
199 #endif /* CK_SYSINI */
200 /*
201   If neither CK_DSYSINI nor CK_SYSINI are defined, these are the
202   built-in defaults for each platform.  USE_CUSTOM means to execute the
203   customization file automatically if the initialization file is not found.
204 */
205 #ifndef NOCUSTOM
206 #ifndef USE_CUSTOM
207 #define USE_CUSTOM
208 #endif /* USE_CUSTOM */
209 #endif /* NOCUSTOM */
210
211 #ifndef  KERMRCL                        /* Path length for init file */
212 #define KERMRCL CKMAXPATH
213 #endif /*  KERMRCL */
214
215 #ifdef vms
216 #define KERMRC "CKERMIT.INI"            /* Init file name */
217 #define MYCUSTOM "CKERMOD.INI"          /* Customization file name */
218 #else
219 #ifdef OS2
220 #ifdef NT
221 #define KERMRC "k95.ini"
222 #define MYCUSTOM "k95custom.ini"
223 #else
224 #define KERMRC "k2.ini"
225 #define MYCUSTOM "k2custom.ini"
226 #endif /* NT */
227 #else
228 #ifdef UNIXOROSK
229 #define KERMRC ".kermrc"
230 #define MYCUSTOM ".mykermrc"
231 #else
232 #ifdef STRATUS
233 #define KERMRC "ckermit.ini"
234 #define MYCUSTOM "ckermod.ini"
235 #else
236 #define KERMRC "CKERMIT.INI"
237 #define MYCUSTOM "ckermod.ini"
238 #endif /* STRATUS */
239 #endif /* UNIXOROSK */
240 #endif /* OS2 */
241 #endif /* vms */
242
243 #ifndef KERMRCL
244 #define KERMRCL 256
245 #endif /* KERMRCL */
246 #endif /* NOICP */
247
248 /* User interface features */
249
250 #ifdef CK_CURSES                        /* Thermometer */
251 #ifndef NO_PCT_BAR
252 #ifndef CK_PCT_BAR
253 #define CK_PCT_BAR
254 #endif /* NO_PCT_BAR */
255 #endif /* CK_PCT_BAR */
256 #endif /* CK_CURSES */
257
258 #ifdef KUI                              /* KUI requires the Thermometer code */
259 #ifndef NO_PCT_BAR
260 #ifndef CK_PCT_BAR
261 #define CK_PCT_BAR
262 #endif /* NO_PCT_BAR */
263 #endif /* CK_PCT_BAR */
264 #endif /* KUI */
265
266 /* Includes */
267
268 #ifdef MINIX
269 /* why? */
270 #include <sys/types.h>
271 #endif /* MINIX */
272
273 /* Symbols for command source */
274
275 #define CMD_KB 0                        /* KeyBoard or standard input */
276 #define CMD_TF 1                        /* TAKE command File */
277 #define CMD_MD 2                        /* Macro Definition */
278
279 /*
280   SET TRANSFER CANCELLATION command should be available in all versions.
281   But for now...
282 */
283 #ifdef UNIX                             /* UNIX has it */
284 #ifndef XFRCAN
285 #define XFRCAN
286 #endif /* XFRCAN */
287 #endif /* UNIX */
288 #ifdef VMS                              /* VMS has it */
289 #ifndef XFRCAN
290 #define XFRCAN
291 #endif /* XFRCAN */
292 #endif /* VMS */
293 #ifdef datageneral                      /* DG AOS/VS has it */
294 #ifndef XFRCAN
295 #define XFRCAN
296 #endif /* XFRCAN */
297 #endif /* datageneral */
298 #ifdef STRATUS                          /* Stratus VOS has it */
299 #ifndef XFRCAN
300 #define XFRCAN
301 #endif /* XFRCAN */
302 #endif /* STRATUS */
303 #ifdef OSK                              /* OS-9 */
304 #ifndef XFRCAN
305 #define XFRCAN
306 #endif /* XFRCAN */
307 #endif /* OSK */
308
309 #ifndef NOCMDL
310 /* Extended Command-Line Option Codes (keep alphabetical by keyword) */
311
312 #define XA_ANON 0                       /* --anonymous */
313 #define XA_BAFI 1                       /* --bannerfile */
314 #define XA_CDFI 2                       /* --cdfile */
315 #define XA_CDMS 3                       /* --cdmessage */
316 #define XA_HELP 4                       /* --help */
317 #define XA_HEFI 5                       /* --helpfile */
318 #define XA_IKFI 6                       /* --xferfile */
319 #define XA_IKLG 7                       /* --xferlog */
320 #define XA_ANFI 8                       /* --initfile */
321 #define XA_PERM 9                       /* --permissions */
322 #define XA_ROOT 10                      /* --root */
323 #define XA_SYSL 11                      /* --syslog */
324 #define XA_USFI 12                      /* --userfile */
325 #define XA_WTFI 13                      /* --wtmpfile */
326 #define XA_WTMP 14                      /* --wtmplog */
327 #define XA_TIMO 15                      /* --timeout */
328 #define XA_NOIN 16                      /* --nointerrupts */
329 #define XA_DBAS 17                      /* --database */
330 #define XA_DBFI 18                      /* --dbfile */
331 #define XA_PRIV 19                      /* --privid */
332 #define XA_VERS 20                      /* --version */
333 #define XA_NPRM 21                      /* --noperms */
334 #define XA_XPOS 22                      /* Window position X coordinate */
335 #define XA_YPOS 23                      /* Window position Y coordinate */
336 #define XA_FNAM 24                      /* Font Facename */
337 #define XA_FSIZ 25                      /* Font Size */
338 #define XA_TERM 26                      /* Terminal type */
339 #define XA_CSET 27                      /* Remote Character Set */
340 #define XA_ROWS 28                      /* Screen rows (height) */
341 #define XA_COLS 29                      /* Screen columns (width) */
342 #define XA_TEL  30                      /* Make a Telnet connection */
343 #define XA_FTP  31                      /* Make an FTP connection */
344 #define XA_SSH  32                      /* Make an SSH connection */
345 #define XA_USER 33                      /* Username for login */
346 #define XA_PASS 34                      /* Password for login */
347 #define XA_TITL 35                      /* Window Title */
348 #define XA_NOMN 36                      /* No GUI Menu Bar */
349 #define XA_NOTB 37                      /* No GUI Tool Bar */
350 #define XA_NOSB 38                      /* No GUI Status Bar */
351 #define XA_NOPUSH 39                    /* Disable external commands */
352 #define XA_NOSCROLL 40                  /* Disable scrollback operations */
353 #define XA_NOESCAPE 41                  /* Disable escape from connect mode */
354 #define XA_LOCK 42                      /* All lockdown options */
355 #define XA_NOBAR 43                     /* No GUI Bars */
356 #define XA_WMAX  44
357 #define XA_WMIN  45
358 #define XA_SCALE 46                     /* GUI Scale Font */
359 #define XA_CHGD  47                     /* GUI Change Dimensions */
360 #define XA_MAX  47                      /* Highest extended option number */
361 #endif /* NOCMDL */
362
363 #ifndef NOICP
364 /* Top Level Commands */
365 /* Values associated with top-level commands must be 0 or greater. */
366
367 #define XXBYE   0       /* BYE */
368 #define XXCLE   1       /* CLEAR */
369 #define XXCLO   2       /* CLOSE */
370 #define XXCON   3       /* CONNECT */
371 #define XXCPY   4       /* COPY */
372 #define XXCWD   5       /* CWD (Change Working Directory) */
373 #define XXDEF   6       /* DEFINE (a macro or variable) */
374 #define XXDEL   7       /* (Local) DELETE */
375 #define XXDIR   8       /* (Local) DIRECTORY */
376
377 /* DIRECTORY Command options... */
378 #define DIR_BRF 1       /* BRIEF */
379 #define DIR_VRB 2       /* VERBOSE */
380 #define DIR_PAG 3       /* PAGE */
381 #define DIR_NOP 4       /* NOPAGE */
382 #define DIR_ISO 5       /* ISODATE */
383 #define DIR_DAT 6       /* ENGLISHDATE */
384 #define DIR_HDG 7       /* HEADINGS */
385 #define DIR_NOH 8       /* NOHEADINGS */
386 #define DIR_SRT 9       /* SORT */
387 #define DIR_NOS 10      /* NOSORT */
388 #define DIR_ASC 11      /* ASCENDING */
389 #define DIR_DSC 12      /* DESCENDING */
390 #define DIR_REC 13      /* RECURSIVE */
391 #define DIR_NOR 14      /* NORECURIVE */
392 #define DIR_DOT 15      /* DOTFILES */
393 #define DIR_NOD 16      /* NODOTFILES */
394 #define DIR_DIR 17      /* DIRECTORIES */
395 #define DIR_FIL 18      /* FILES */
396 #define DIR_ALL 19      /* ALL */
397 #define DIR_NAM 20      /* NAMES: */
398 #define DIR_TYP 21      /* FILETYPES */
399 #define DIR_NOT 22      /* NOFILETYPES */
400 #define DIR_BUP 23      /* BACKUP */
401 #define DIR_NOB 24      /* NOBACKUP */
402 #define DIR_MSG 25      /* MESSAGE */
403 #define DIR_NOM 26      /* NOMESSAGE */
404 #define DIR_ARR 27      /* ARRAY: */
405 #define DIR_NAR 28      /* NOARRAY */
406 #define DIR_EXC 29      /* EXCEPT: */
407 #define DIR_LAR 30      /* LARGER-THAN: */
408 #define DIR_SMA 31      /* SMALLER-THAN: */
409 #define DIR_AFT 32      /* AFTER: */
410 #define DIR_NAF 33      /* NOT-AFTER: */
411 #define DIR_BEF 34      /* BEFORE: */
412 #define DIR_NBF 35      /* NOT-BEFORE: */
413 #define DIR_SUM 36      /* SUMMARY */
414 #define DIR_BIN 37      /* TYPE (only show binary or text) */
415 #define DIR_LNK 38      /* follow symlinks */
416 #define DIR_NLK 39      /* don't follow symlinks */
417 #define DIR_OUT 40      /* Output file for listing */
418
419 #define DIRS_NM 0       /* Sort directory by NAME */
420 #define DIRS_DT 1       /* Sort directory by DATE */
421 #define DIRS_SZ 2       /* Sort directory by SIZE */
422
423 #define XXDIS   9       /* DISABLE */
424 #define XXECH  10       /* ECHO */
425 #define XXEXI  11       /* EXIT */
426 #define XXFIN  12       /* FINISH */
427 #define XXGET  13       /* GET */
428 #define XXHLP  14       /* HELP */
429 #define XXINP  15       /* INPUT */
430 #define XXLOC  16       /* LOCAL */
431 #define XXLOG  17       /* LOG */
432 #define XXMAI  18       /* MAIL */
433 #define XXMOU  19       /* (Local) MOUNT */
434 #define XXMSG  20       /* (Local) MESSAGE */
435 #define XXOUT  21       /* OUTPUT */
436 #define XXPAU  22       /* PAUSE */
437 #define XXPRI  23       /* (Local) PRINT */
438 #define XXQUI  24       /* QUIT */
439 #define XXREC  25       /* RECEIVE */
440 #define XXREM  26       /* REMOTE */
441 #define XXREN  27       /* (Local) RENAME */
442 #define XXSEN  28       /* SEND */
443
444 /* SEND switches */
445
446 #define SND_BIN  0      /* Binary mode */
447 #define SND_DEL  1      /* Delete after */
448 #define SND_EXC  2      /* Except */
449 #define SND_LAR  3      /* Larger than */
450 #define SND_MAI  4      /* Mail */
451 #define SND_BEF  5      /* Before */
452 #define SND_AFT  6      /* After */
453 #define SND_PRI  7      /* Print */
454 #define SND_SHH  8      /* Quiet */
455 #define SND_REC  9      /* Recursive */
456 #define SND_SMA 10      /* Smaller than */
457 #define SND_STA 11      /* Starting-from */
458 #define SND_TXT 12      /* Text mode */
459 #define SND_CMD 13      /* From command (pipe)  */
460 #define SND_RES 14      /* Resend/Recover */
461 #define SND_PRO 15      /* Protocol */
462 #define SND_ASN 16      /* As-name */
463 #define SND_IMG 17      /* Image */
464 #define SND_LBL 18      /* Labeled */
465 #define SND_NAF 19      /* Not-After */
466 #define SND_NBE 20      /* Not-Before */
467 #define SND_FLT 21      /* Filter */
468 #define SND_PTH 22      /* Pathnames */
469 #define SND_NAM 23      /* Filenames */
470 #define SND_MOV 24      /* MOVE to another directory */
471 #define SND_REN 25      /* RENAME after sending */
472 #define SND_CAL 26      /* Calibrate */
473 #define SND_FIL 27      /* File containing list of files to send */
474 #define SND_NOB 28      /* Skip backup files  */
475 #define SND_DOT 29      /* Include dot-files */
476 #define SND_NOD 30      /* Exclude dot-files */
477 #define SND_ARR 31      /* Send from array */
478 #define SND_TYP 32      /* TYPE (only send text (or binary)) */
479 #define SND_XPA 33      /* TRANSPARENT */
480 #define SND_PIP 34      /* PIPES */
481 #define SND_ERR 35      /* ERROR */
482 #define SND_CSL 36      /* Local character set */
483 #define SND_CSR 37      /* Remote character set */
484 #define SND_UPD 38      /* Update */
485 #define SND_COL 39      /* Collision */
486 #define SND_NML 40      /* Namelist */
487 #define SND_SRN 41      /* Server-Rename */
488 #define SND_LNK 42      /* Follow links */
489 #define SND_NLK 43      /* Don't follow links */
490 #define SND_SIM 44      /* Simulate */
491 #define SND_DIF 45      /* If dates Differ */
492 #define SND_PAT 46      /* Pattern to use locally when GET'ing */
493 #define SND_NLS 47      /* (FTP only) MGET forces NLST */
494 #define SND_MLS 48      /* (FTP only) MGET forces MLSD */
495
496 #define SND_MAX 48      /* Highest SEND switch */
497
498 #define XXSER  29       /* SERVER */
499 #define XXSET  30       /* SET */
500 #define XXSHE  31       /* Command for SHELL */
501 #define XXSHO  32       /* SHOW */
502 #define XXSPA  33       /* (Local) SPACE */
503 #define XXSTA  34       /* STATISTICS */
504 #define XXSUB  35       /* (Local) SUBMIT */
505 #define XXTAK  36       /* TAKE */
506 #define XXTRA  37       /* TRANSMIT */
507 #define XXTYP  38       /* (Local) TYPE */
508 #define XXWHO  39       /* (Local) WHO */
509 #define XXDIAL 40       /* (Local) DIAL */
510 #define XXLOGI 41       /* (Local) SCRIPT */
511 #define XXCOM  42       /* Comment */
512 #define XXHAN  43       /* HANGUP */
513 #define XXXLA  44       /* TRANSLATE */
514 #define XXIF   45       /* IF */
515 #define XXLBL  46       /* label */
516 #define XXGOTO 47       /* GOTO */
517 #define XXEND  48       /* END */
518 #define XXSTO  49       /* STOP */
519 #define XXDO   50       /* DO */
520 #define XXPWD  51       /* PWD */
521 #define XXTES  52       /* TEST */
522 #define XXASK  53       /* ASK */
523 #define XXASKQ 54       /* ASKQ */
524 #define XXASS  55       /* ASSIGN */
525 #define XXREI  56       /* REINPUT */
526 #define XXINC  57       /* INCREMENT */
527 #define XXDEC  59       /* DECREMENT */
528 #define XXELS  60       /* ELSE */
529 #define XXEXE  61       /* EXECUTE */
530 #define XXWAI  62       /* WAIT */
531 #define XXVER  63       /* VERSION */
532 #define XXENA  64       /* ENABLE */
533 #define XXWRI  65       /* WRITE */
534 #define XXCLS  66       /* CLS (clear screen) */
535 #define XXRET  67       /* RETURN */
536 #define XXOPE  68       /* OPEN */
537 #define XXREA  69       /* READ */
538 #define XXON   70       /* ON */
539 #define XXDCL  71       /* DECLARE */
540 #define XXBEG  72       /* BEGIN (not used) */
541 #define XXFOR  72       /* FOR */
542 #define XXWHI  73       /* WHILE */
543 #define XXIFX  74       /* Extended IF */
544 #define XXCMS  75       /* SEND from command output (not yet) */
545 #define XXCMR  76       /* RECEIVE to a command's input (not yet) */
546 #define XXCMG  77       /* GET to a command's input (not yet) */
547 #define XXSUS  78       /* SUSPEND */
548 #define XXERR  79       /* ERROR */
549 #define XXMSE  80       /* MSEND */
550 #define XXBUG  81       /* BUG */
551 #define XXPAD  82       /* PAD (as in X.25 PAD) ANYX25 */
552 #define XXRED  83       /* REDIAL */
553 #define XXGTA  84       /* _getargs (invisible internal) */
554 #define XXPTA  85       /* _putargs (invisible internal) */
555 #define XXGOK  86       /* GETOK - Ask for YES/NO */
556 #define XXTEL  87       /* TELNET */
557 #define XXASX  88       /* _ASSIGN (evaluates var name) */
558 #define XXDFX  89       /* _DEFINE (evaluates var name) */
559 #define XXPNG  90       /* PING (for TCP/IP) */
560 #define XXINT  91       /* INTRODUCTION */
561 #define XXCHK  92       /* CHECK (a feature) */
562 #define XXMSL  93       /* MSLEEP, MPAUSE (millisecond sleep) */
563 #define XXNEW  94       /* NEWS */
564 #define XXAPC  95       /* APC */
565 #define XXFUN  96       /* REDIRECT */
566 #define XXWRL  97       /* WRITE-LINE */
567 #define XXREXX 98       /* Rexx */
568 #define XXMINP 100      /* MINPUT */
569 #define XXRSEN 101      /* RESEND */
570 #define XXPSEN 102      /* PSEND */
571 #define XXGETC 103      /* GETC */
572 #define XXEVAL 104      /* EVALUATE */
573 #define XXFWD  105      /* FORWARD */
574 #define XXUPD  106      /* UPDATES */
575 #define XXBEEP 107      /* BEEP */
576 #define XXMOVE 108      /* MOVE */
577 #define XXMMOVE 109     /* MMOVE */
578 #define XXREGET 110     /* REGET */
579 #define XXLOOK  111     /* LOOKUP */
580 #define XXVIEW  112     /* VIEW (terminal buffer) */
581 #define XXANSW  113     /* ANSWER (the phone) */
582 #define XXPDIA  114     /* PDIAL (partial dial) */
583 #define XXASC   115     /* ASCII / TEXT */
584 #define XXBIN   116     /* BINARY */
585 #define XXFTP   117     /* FTP */
586 #define XXMKDIR 118     /* MKDIR */
587 #define XXRMDIR 119     /* RMDIR */
588 #define XXTELOP 120     /* TELOPT */
589 #define XXRLOG  121     /* RLOGIN */
590 #define XXUNDEF 122     /* UNDEFINE */
591 #define XXNPSH  123     /* NOPUSH */
592 #define XXADD   124     /* ADD */
593 #define ADD_SND   0     /* ADD SEND-LIST */
594 #define ADD_BIN   1     /* ADD BINARY-PATTERNS */
595 #define ADD_TXT   2     /* ADD TEXT-PATTERNS */
596 #define XXLOCAL 125     /* LOCAL */
597 #define XXKERMI 126     /* KERMIT */
598 #define XXDATE  127     /* DATE */
599 #define XXSWIT  128     /* SWITCH */
600 #define XXXFWD  129     /* _FORWARD */
601 #define XXSAVE  130     /* SAVE */
602 #define XXXECH  131     /* XECHO */
603 #define XXRDBL  132     /* READBLOCK */
604 #define XXWRBL  133     /* WRITEBLOCK */
605 #define XXRETR  134     /* RETRIEVE */
606 #define XXEIGHT 135     /* EIGHTBIT */
607 #define XXEDIT  136     /* EDIT */
608 #define XXCSEN  137     /* CSEND */
609 #define XXCREC  138     /* CRECEIVE */
610 #define XXCQ    139     /* CQ */
611 #define XXTAPI  140     /* TAPI actions such as dialogs */
612 #define XXRES   141     /* RESET */
613 #define XXCGET  142     /* CGET */
614 #define XXFUNC  143     /* Function (help-only) */
615 #define XXKVRB  144     /* Kverb (help-only) */
616 #define XXBROWS 145     /* BROWSE */
617 #define XXMGET  146     /* MGET */
618 #define XXBACK  147     /* BACK */
619 #define XXWHERE 148     /* WHERE */
620 #define XXREDO  149     /* REDO */
621 #define XXEXCH  150     /* EXCHANGE */
622 #define XXREMV  151     /* REMOVE */
623 #define XXCHRT  152     /* CHROOT */
624 #define XXOPTS  153     /* Options (help-only) */
625 #define XXAUTH  154     /* AUTHORIZE */
626 #define XXPIPE  155     /* PIPE */
627 #define XXSSH   156     /* SSH */
628 #define XXTERM  157     /* TERMINAL */
629 #define XXSTATUS 158    /* STATUS */
630 #define XXCPR   159     /* COPYRIGHT */
631 #define XXASSER 160     /* ASSERT */
632 #define XXSUCC  161     /* SUCCEED */
633 #define XXFAIL  162     /* FAIL */
634 #define XXLOGIN 163     /* LOGIN */
635 #define XXLOGOUT 164    /* LOGOUT */
636 #define XXNLCL  165     /* NOLOCAL */
637 #define XXWILD  166     /* WILDCARDS (help-only) */
638
639 /* One-word synonyms for REMOTE commands */
640
641 #define XXRCPY  167     /* REMOTE COPY */
642 #define XXRCWD  168     /* Change Working Directory */
643 #define XXRDEL  169     /* Delete */
644 #define XXRDIR  170     /* Directory */
645 #define XXRHLP  171     /* Help */
646 #define XXRHOS  172     /* Host */
647 #define XXRKER  173     /* Kermit */
648 #define XXRMSG  174     /* Message */
649 #define XXRPRI  175     /* Print */
650 #define XXRREN  176     /* Rename */
651 #define XXRSET  177     /* Set */
652 #define XXRSPA  178     /* Space */
653 #define XXRSUB  179     /* Submit */
654 #define XXRTYP  180     /* Type */
655 #define XXRWHO  181     /* Who */
656 #define XXRPWD  182     /* Print Working Directory */
657 #define XXRQUE  183     /* Query */
658 #define XXRASG  184     /* Assign */
659 #define XXRMKD  185     /* mkdir */
660 #define XXRRMD  186     /* rmdir */
661 #define XXRXIT  187     /* Exit */
662
663 /* Top-Level commands, cont'd... */
664
665 #define XXGETK  188     /* GETKEYCODE */
666 #define XXMORE  189     /* MORE */
667 #define XXXOPTS 190     /* Extended-Options (help-only) */
668 #define XXIKSD  191     /* IKSD */
669 #define XXRESET 192     /* RESET */
670 #define XXASSOC 193     /* ASSOCIATE */
671
672 #define ASSOC_FC  0     /* ASSOCIATE FILE-CHARACTER-SET */
673 #define ASSOC_TC  1     /* ASSOCIATE TRANSFER-CHARACTER-SET */
674
675 #define XXSHIFT 194     /* SHIFT */
676 #define XXMAN   195     /* MANUAL */
677 #define XXLS    196     /* LS */
678 #define XXSORT  197     /* SORT */
679 #define XXPURGE 198     /* PURGE */
680 #define XXFAST  199     /* FAST */
681 #define XXCAU   200     /* CAUTIOUS */
682 #define XXROB   201     /* ROBUST */
683 #define XXMACRO 202     /* Immediate macro */
684 #define XXSCRN  203     /* SCREEN */
685 #define XXLNOUT 204     /* LINEOUT */
686 #define XX_INCR 205     /* _INCREMENT */
687 #define XX_DECR 206     /* _DECREMENT */
688 #define XX_EVAL 207     /* _EVALUATE */
689 #define XXARRAY 208     /* ARRAY */
690 #define XXPARSE 209     /* PARSE */
691 #define XXHTTP  210     /* HTTP */
692
693 #ifdef CKCHANNELIO
694 #define XXFILE  211     /* FILE */
695 #define XXF_CL  212     /* FCLOSE */
696 #define XXF_FL  213     /* FFLUSH */
697 #define XXF_LI  214     /* FLIST */
698 #define XXF_OP  215     /* FOPEN */
699 #define XXF_RE  216     /* FREAD */
700 #define XXF_SE  217     /* FSEEK */
701 #define XXF_ST  218     /* FSTATUS */
702 #define XXF_WR  219     /* FWRITE */
703 #define XXF_RW  220     /* FREWIND */
704 #define XXF_CO  221     /* FCOUNT */
705 #endif /* CKCHANNELIO */
706
707 #define XXEXEC  222     /* exec() */
708 #define XXTRACE 223     /* TRACE */
709 #define XXNOTAV 224     /* The "not available" command */
710 #define XXPTY   225     /* PTY (like PIPE) */
711 #define XXCHMOD 226     /* CHMOD */
712 #define XXPROMP 227     /* PROMPT */
713 #define XXFEACH 228     /* FOREACH */
714 #define XXGREP  229     /* GREP */
715 #define XXSEXP  230     /* S-Expression */
716 #define XXUNDCL 231     /* UNDECLARE */
717 #define XXVOID  232     /* VOID */
718 #define XXPUT   233     /* PUT */
719 #define XXUNDFX 234     /* _UNDEFINE */
720 #define XXHEAD  235     /* HEAD */
721 #define XXTAIL  236     /* TAIL */
722 #define XXDEBUG 237     /* DEBUG */
723 #define XXLEARN 238     /* LEARN */
724 #define XXPAT   239     /* PATTERNS (help only) */
725
726 #define XXCDUP  240     /* CDUP (Change working directory upwards) */
727 #define XXRCDUP 241     /* REMOTE CDUP */
728 #define XXCAT   242     /* CAT (= TYPE /NOPAGE) */
729 #define XXFIREW 243     /* FIREWALL (help only) */
730
731 #define XXLCWD  244     /* Local C(W)D */
732 #define XXLCDU  245     /* Local CDUP */
733 #define XXLPWD  246     /* Local PWD */
734 #define XXLDEL  247     /* Local DELETE */
735 #define XXLDIR  248     /* Local DIRECTORY */
736 #define XXLREN  249     /* Local RENAME */
737 #define XXLMKD  250     /* Local MKDIR */
738 #define XXLRMD  251     /* Local RMDIR */
739 #define XXUSER  252     /* (FTP) USER */
740 #define XXACCT  253     /* (FTP) ACCOUNT */
741 #define XXLINK  254     /* LINK source destination */
742 #define XXORIE  255     /* ORIENT(ATION) */
743 #define XXDIALER 256    /* DIALER */
744 #define XXKCD   257     /* KCD */
745 #define XXSITE  258     /* (FTP) SITE */
746 #define XXPASV  259     /* (FTP) PASSIVE */
747 #define XXCONT  260     /* CONTINUE */
748 #define XXNSCR  261     /* NOSCROLL */
749 #define XXSFTP  262     /* SFTP */
750 #define XXSKRM  263     /* SKERMIT */
751
752 /* End of Top-Level Commands */
753
754 #define SCN_CLR   0                     /* SCREEN CLEAR */
755 #define SCN_CLE   1                     /* SCREEN CLEOL */
756 #define SCN_MOV   2                     /* SCREEN MOVE */
757
758 /* ARRAY operations */
759
760 #define ARR_DCL   0                     /* Declare */
761 #define ARR_CPY   1                     /* Copy */
762 #define ARR_RSZ   2                     /* Resize */
763 #define ARR_SRT   3                     /* Sort */
764 #define ARR_CLR   4                     /* Clear */
765 #define ARR_SEA   5                     /* Search */
766 #define ARR_DST   6                     /* Destroy */
767 #define ARR_SHO   7                     /* Show */
768 #define ARR_SET   8                     /* Set */
769 #define ARR_EQU   9                     /* Equate */
770
771 /* SORT options */
772
773 #define SRT_CAS   0                     /* /CASE */
774 #define SRT_KEY   1                     /* /KEY:n */
775 #define SRT_REV   2                     /* /REVERSE */
776 #define SRT_RNG   3                     /* /RANGE:n:m */
777 #define SRT_NUM   4                     /* /NUMERIC */
778
779 /* PURGE command options */
780
781 #define PU_KEEP 0                       /* /KEEP: */
782 #define PU_LIST 1                       /* /LIST */
783 #define PU_PAGE 2                       /* /PAGE */
784 #define PU_NOPA 3                       /* /NOPAGE */
785 #define PU_NODE 4                       /* /SIMULATE */
786 #define PU_DELE 5                       /* /DELETE */
787 #define PU_NOLI 6                       /* /NOLIST */
788 #define PU_QUIE 7                       /* /QUIET (= NOLIST) */
789 #define PU_VERB 8                       /* /VERBOSE (= LIST) */
790 #define PU_ASK  9                       /* /ASK */
791 #define PU_NASK 10                      /* /NOASK */
792 #define PU_LAR  11                      /* /LARGER-THAN: */
793 #define PU_SMA  12                      /* /SMALLER-THAN: */
794 #define PU_AFT  13                      /* /AFTER: */
795 #define PU_NAF  14                      /* /NOT-AFTER: */
796 #define PU_BEF  15                      /* /BEFORE: */
797 #define PU_NBF  16                      /* /NOT-BEFORE: */
798 #define PU_EXC  17                      /* /EXCEPT: */
799 #define PU_RECU 18                      /* /RECURSIVE */
800 #define PU_DOT  19                      /* /DOTFILES */
801 #define PU_NODOT 20                     /* /NODOTFILES */
802 #define PU_HDG  21                      /* /HEADING */
803 #define PU_NOH  22                      /* /NOHEADING */
804
805 /* DELETE command options */
806
807 #define DEL_NOL 0                       /* /NOLIST */
808 #define DEL_LIS 1                       /* /LIST */
809 #define DEL_HDG 2                       /* /HEADINGS */
810 #define DEL_NOH 2                       /* /NOHEADINGS */
811 #define DEL_BEF 3                       /* /BEFORE: */
812 #define DEL_NBF 4                       /* /NOT-BEFORE: */
813 #define DEL_AFT 5                       /* /AFTER: */
814 #define DEL_NAF 6                       /* /NOT-AFTER: */
815 #define DEL_DOT 7                       /* /DOTFILES */
816 #define DEL_NOD 8                       /* /NODOTFILES */
817 #define DEL_EXC 9                       /* /EXCEPT:*/
818 #define DEL_PAG 10                      /* /PAGE */
819 #define DEL_NOP 11                      /* /NOPAGE */
820 #define DEL_REC 12                      /* /RECURSIVE */
821 #define DEL_NOR 13                      /* /NORECURSIVE */
822 #define DEL_VRB 14                      /* /VERBOSE */
823 #define DEL_QUI 15                      /* /QUIET */
824 #define DEL_SMA 16                      /* /SMALLER-THAN: */
825 #define DEL_LAR 17                      /* /LARGER-THAN: */
826 #define DEL_SIM 18                      /* /SIMULATE */
827 #define DEL_ASK 19                      /* /ASK */
828 #define DEL_NAS 20                      /* /NOASK */
829 #define DEL_SUM 21                      /* /SUMMARY */
830 #define DEL_DIR 22                      /* /DIRECTORY */
831 #define DEL_ALL 23                      /* /ALL */
832 #define DEL_TYP 24                      /* /TYPE: */
833 #define DEL_LNK 25                      /* /FOLLOWLINKS */
834 #define DEL_NLK 26                      /* /NOFOLLOWLINKS */
835
836 /* FILE operations */
837
838 #define FIL_OPN  0                      /* OPEN */
839 #define FIL_CLS  1                      /* CLOSE */
840 #define FIL_REA  2                      /* READ */
841 #define FIL_GET  3                      /* GET */
842 #define FIL_WRI  4                      /* WRITE */
843 #define FIL_REW  5                      /* REWIND */
844 #define FIL_LIS  6                      /* LIST */
845 #define FIL_FLU  7                      /* FLUSH */
846 #define FIL_SEE  8                      /* SEEK */
847 #define FIL_STA  9                      /* STATUS */
848 #define FIL_COU 10                      /* COUNT */
849
850 /* OPEN / CLOSE items */
851
852 #define OPN_FI_R 1                      /* FILE READ */
853 #define OPN_FI_W 2                      /* FILE WRITE */
854 #define OPN_FI_A 3                      /* FILE APPEND */
855 #define OPN_PI_R 4                      /* PIPE READ */
856 #define OPN_PI_W 5                      /* PIPE WRITE */
857 #define OPN_PT_R 6                      /* PTY READ */
858 #define OPN_PT_W 7                      /* PTY WRITE */
859 #define OPN_SER  8                      /* PORT or LINE */
860 #define OPN_NET  9                      /* HOST */
861
862 /* KERBEROS command switches */
863
864 #define KRB_S_VE  0     /* /VERSION */
865 #define KRB_S_CA  1     /* /CACHE: */
866 #define KRB_S_MAX 1     /* Highest KERBEROS switch number */
867
868 #ifdef CK_KERBEROS
869
870 /* KERBEROS actions */
871
872 #define KRB_A_IN  0     /* INITIALIZE */
873 #define KRB_A_DE  1     /* DESTROY */
874 #define KRB_A_LC  2     /* LIST-CREDENTIALS */
875
876 /* KERBEROS INIT switches */
877
878 #define KRB_I_FW  0     /* /FORWARDABLE */
879 #define KRB_I_LF  1     /* /LIFETIME: */
880 #define KRB_I_PD  2     /* /POSTDATE: */
881 #define KRB_I_PR  3     /* /PROXIABLE */
882 #define KRB_I_RB  4     /* /RENEWABLE: */
883 #define KRB_I_RN  5     /* /RENEW */
884 #define KRB_I_SR  6     /* /SERVICE: */
885 #define KRB_I_VA  7     /* /VALIDATE */
886 #define KRB_I_RL  8     /* /REALM: */
887 #define KRB_I_IN  9     /* /INSTANCE: */
888 #define KRB_I_PW  10    /* /PASSWORD: */
889 #define KRB_I_PA  11    /* /PREAUTH */
890 #define KRB_I_VB  12    /* /VERBOSE */
891 #define KRB_I_BR  13    /* /BRIEF */
892 #define KRB_I_NFW 14    /* /NOT-FORWARDABLE */
893 #define KRB_I_NPR 15    /* /NOT-PROXIABLE */
894 #define KRB_I_NPA 16    /* /NOT-PREAUTH */
895 #define KRB_I_K4  17    /* /KERBEROS4    (should k5 get k4 as well) */
896 #define KRB_I_NK4 18    /* /NO-KERBEROS4 */
897 #define KRB_I_POP 19    /* /POPUP */
898 #define KRB_I_ADR 20    /* /ADDRESSES: */
899 #define KRB_I_NAD 21    /* /NO-ADDRESSES */
900 #define KRB_I_MAX 21    /* Highest KERBEROS INIT switch number */
901
902 #endif /* CK_KERBEROS */
903
904 /* SET parameters */
905
906 #define XYBREA  0       /* BREAK simulation */
907 #define XYCHKT  1       /* Block check type */
908 #define XYDEBU  2       /* Debugging */
909 #define XYDELA  3       /* Delay */
910 #define XYDUPL  4       /* Duplex */
911 #define XYEOL   5       /* End-Of-Line (packet terminator) */
912 #define XYESC   6       /* Escape character */
913 #define XYFILE  7       /* File Parameters (see ckcker.h for values) */
914                         /* (this space available) */
915 #define XYFLOW  9       /* Flow Control */
916 #define XYHAND 10       /* Handshake */
917 #define XYIFD  11       /* Incomplete File Disposition */
918 #define XYIMAG 12       /* "Image Mode" */
919 #define XYINPU 13       /* INPUT command parameters */
920 #define XYLEN  14       /* Maximum packet length to send */
921 #define XYLINE 15       /* Communication line to use */
922
923 /* SET LINE / SET HOST command switches */
924
925 #define SL_CNX   0      /* /CONNECT */
926 #define SL_SRV   1      /* /SERVER */
927 #define SL_SHR   2      /* /SHARE */
928 #define SL_NSH   3      /* /NOSHARE */
929 #define SL_BEE   4      /* /BEEP */
930 #define SL_ANS   5      /* /ANSWER */
931 #define SL_DIA   6      /* /DIAL:xxx */
932 #define SL_SPD   7      /* /SPEED:xxx */
933 #define SL_FLO   8      /* /FLOW:xxx */
934 #define SL_TMO   9      /* /TIMEOUT:xxx */
935 #define SL_CMD  10      /* /COMMAND */
936 #define SL_PSW  11      /* /PASSWORD:xxx */
937 #define SL_IKS  12      /* /KERMIT-SERVICE */
938 #define SL_NET  13      /* /NETWORK-TYPE:xxx */
939 #define SL_ENC  14      /* /ENCRYPT:type (telnet) /ENCRYPT (rlogin) */
940 #define SL_KRB4 15      /* /KERBEROS 4 (rlogin/telnet) */
941 #define SL_KRB5 16      /* /KERBEROS 5 (rlogin/telnet) */
942 #define SL_SRP  17      /* /SRP (telnet) */
943 #define SL_NTLM 18      /* /NTLM (telnet) */
944 #define SL_SSL  19      /* /SSL (telnet) */
945 #define SL_UID  20      /* /USERID:xxxx */
946 #define SL_AUTH 21      /* /AUTH:type */
947 #define SL_WAIT 22      /* /WAIT */
948 #define SL_NOWAIT 23    /* /NOWAIT */
949 #define SL_PTY  24      /* /PTY */
950
951 #define XYLOG  16       /* Log file */
952 #define XYMARK 17       /* Start of Packet mark */
953 #define XYNPAD 18       /* Amount of padding */
954 #define XYPADC 19       /* Pad character */
955 #define XYPARI 20       /* Parity */
956 #define XYPAUS 21       /* Interpacket pause */
957 #define XYPROM 22       /* Program prompt string */
958 #define XYQBIN 23       /* 8th-bit prefix */
959 #define XYQCTL 24       /* Control character prefix */
960 #define XYREPT 25       /* Repeat count prefix */
961 #define XYRETR 26       /* Retry limit */
962 #define XYSPEE 27       /* Line speed (baud rate) */
963 #define XYTACH 28       /* Character to be doubled */
964 #define XYTIMO 29       /* Timeout interval */
965 #define XYMODM 30       /* Modem - also see XYDIAL */
966
967 #define XYSEND 31       /* SET SEND parameters */
968 #define XYRECV 32       /* SET RECEIVE parameters */
969 #define XYTERM 33       /* SET TERMINAL parameters */
970 #define   XYTBYT 0      /*  Terminal Bytesize (7 or 8) */
971 #define   XYTTYP 1      /*  Terminal emulation Type */
972 #define     TT_NONE  0  /*    NONE, no emulation */
973 #ifdef OS2
974 /*
975   Note, the symbols for VT and VT-like terminals should be in ascending
976   numerical order, so that higher ones can be treated as supersets of
977   lower ones with respect to capabilities.
978
979   This is no longer the case with the influx of new terminal types.
980   Just make sure that the ISXXXXX() macros include the proper family
981   groups.
982 */
983 #define     TT_DG200    1       /*    Data General 200 */
984 #define     TT_DG210    2       /*    Data General 210 */
985 #define     TT_DG217    3       /*    Data General 217 */
986 #define     TT_HP2621   4       /*    Hewlett-Packard 2621A */
987 #define     TT_HPTERM   5       /*    Hewlett-Packard Console */
988 #define     TT_HZL1500  6       /*    Hazeltine 1500 */
989 #define     TT_VC4404   7       /*    Volker Craig VC4404/404 */
990 #define     TT_WY30     8       /*    WYSE-30/30+ */
991 #define     TT_WY50     9       /*    WYSE-50/50+ */
992 #define     TT_WY60    10       /*    WYSE-60    */
993 #define     TT_WY160   11       /*    WYSE-160   */
994 #define     TT_QNX     12       /*    QNX */
995 #define     TT_QANSI   13       /*    QNX Ansi emulation */
996 #define     TT_VT52    14       /*    DEC VT-52  */
997 #define     TT_H19     15       /*    Heath-19 */
998 #define     TT_IBM31   16       /*    IBM 31xx */
999 #define     TT_SCOANSI 17       /*    SCOANSI (Unix mode) */
1000 #define     TT_AT386   18       /*    Unixware AT386 (Unix mode) */
1001 #define     TT_ANSI    19       /*    IBM ANSI.SYS (BBS) */
1002 #define     TT_VIP7809 20       /*    Honeywell VIP7809 */
1003 #define     TT_LINUX   21       /*    Linux Console */
1004 #define     TT_HFT     22       /*    IBM High Function Terminal */
1005 #define     TT_AIXTERM 23       /*    IBM AIXterm */
1006 #define     TT_SUN     24       /*    SUN Console */
1007 #define     TT_BA80    25       /*    Nixdorf BA80 */
1008 #define     TT_BEOS    26       /*    BeOS Ansi */
1009 #define     TT_VT100   27       /*    DEC VT-100 */
1010 #define     TT_VT102   28       /*    DEC VT-102 */
1011 #define     TT_VT220   29       /*    DEC VT-220 */
1012 #define     TT_VT220PC 30       /*    DEC VT-220 with PC keyboard */
1013 #define     TT_VT320   31       /*    DEC VT-320 */
1014 #define     TT_VT320PC 32       /*    DEC VT-320 with PC keyboard */
1015 #define     TT_WY370   33       /*    WYSE 370 ANSI Terminal */
1016 #define     TT_97801   34       /*    Sinix 97801-5xx terminal */
1017 #define     TT_AAA     35       /*    Ann Arbor Ambassador */
1018 #define     TT_TVI910  36       /*    TVI 910+ */
1019 #define     TT_TVI925  37       /*    TVI 925  */
1020 #define     TT_TVI950  38       /*    TVI950   */
1021 #define     TT_ADM3A   39       /*    LSI ADM 3A */
1022 #define     TT_ADM5    40               /*    LSI ADM 5 */
1023 #define     TT_VTNT    41       /*    Microsoft NT Virtual Terminal */
1024 #define     TT_MAX   TT_VTNT
1025 #define     TT_VT420   96       /*    DEC VT-420 */
1026 #define     TT_VT520   97       /*    DEC VT-520/525 */
1027 #define     TT_TEK40 99 /*    Tektronix 401x */
1028 #define     TT_KBM_EMACS   TT_MAX+1
1029 #define     TT_KBM_HEBREW  TT_MAX+2
1030 #define     TT_KBM_RUSSIAN TT_MAX+3
1031 #define     TT_KBM_WP      TT_MAX+4
1032
1033 #define ISAAA(x)   (x == TT_AAA)
1034 #define ISANSI(x)  (x >= TT_SCOANSI && x <= TT_ANSI)
1035 #define ISBA80(x)  (x == TT_BA80)
1036 #define ISBEOS(x)  (x == TT_BEOS)
1037 #define ISQNX(x)   (x == TT_QNX)
1038 #define ISQANSI(x)   (x == TT_QANSI)
1039 #define ISLINUX(x) (x == TT_LINUX)
1040 #define ISSCO(x)   (x == TT_SCOANSI)
1041 #define ISAT386(x) (x == TT_AT386)
1042 #define ISAVATAR(x) (x == TT_ANSI)
1043 #define ISSUN(x)    (x == TT_SUN)
1044 #define ISUNIXCON(x) (x == TT_SCOANSI || x == TT_AT386 || \
1045                       x == TT_LINUX   || x == TT_SUN)
1046 #define ISDG200(x) (x >= TT_DG200 && x <= TT_DG217)
1047 #define ISHZL(x)   (x == TT_HZL1500)
1048 #define ISH19(x)   (x == TT_H19)
1049 #define ISIBM31(x) (x == TT_IBM31)
1050 #define ISTVI(x)   (x >= TT_TVI910 && x <= TT_TVI950)
1051 #define ISTVI910(x) (x == TT_TVI910)
1052 #define ISTVI925(x) (x == TT_TVI925)
1053 #define ISTVI950(x) (x == TT_TVI950)
1054 #define ISVT52(x)  (x == TT_VT52 || x == TT_H19)
1055 #ifdef COMMENT
1056 #define ISVT520(x) (x == TT_VT520)
1057 #define ISVT420(x) (x >= TT_VT420 && x <= TT_VT520)
1058 #else /* COMMENT */
1059 /* Since we do not yet support 420/520 extend 320 */
1060 #define ISVT520(x) (ISVT320(x))
1061 #define ISVT420(x) (ISVT320(x))
1062 #endif /* COMMENT */
1063 #define ISVT320(x) (x >= TT_VT320 && x <= TT_AAA)
1064 #define ISVT220(x) (x >= TT_VT220 && x <= TT_AAA || \
1065                     ISBEOS(x) || ISQANSI(x) || \
1066                     ISLINUX(x) || ISSUN(x))
1067 #define ISVT102(x) (x >= TT_VIP7809 && x <= TT_BA80 || \
1068                     x == TT_VT102 || ISVT220(x))
1069 #define ISVT100(x) (x == TT_VT100 || ISVT102(x))
1070 #define ISWY30(x)  (x == TT_WY30)
1071 #define ISWYSE(x)  (x >= TT_WY30 && x <= TT_WY160)
1072 #define ISWY50(x)  (x == TT_WY50)
1073 #define ISWY60(x)  (x == TT_WY60 || x == TT_WY160)
1074 #define ISWY160(x) (x == TT_WY160)
1075 #define ISWY370(x) (x == TT_WY370)
1076 #define ISVC(x)    (x == TT_VC4404)
1077 #define ISHP(x)    (x == TT_HPTERM || x == TT_HP2621)
1078 #define ISHPTERM(x) (x == TT_HPTERM)
1079 #define ISVIP(x)   (x == TT_VIP7809)
1080 #define IS97801(x) (x == TT_97801)
1081 #define ISHFT(x)   (x == TT_HFT || x == TT_AIXTERM)
1082 #define ISAIXTERM(x) (x == TT_AIXTERM)
1083 #define ISTEK(x)   (x == TT_TEK40)
1084 #define ISVTNT(x)  (x == TT_VTNT)
1085 #define ISADM3A(x) (x == TT_ADM3A)
1086 #define ISADM5(x)  (x == TT_ADM5)
1087 #endif /* OS2 */
1088
1089 #define   XYTCS  2      /*  Terminal Character Set */
1090 #define   XYTSO  3      /*  Terminal Shift-In/Shift-Out */
1091 #define   XYTNL  4      /*  Terminal newline mode */
1092 #ifdef OS2
1093 #define   XYTCOL 5      /*  Terminal colors */
1094 #endif /* OS2 */
1095 #define   XYTEC  6      /*  Terminal echo = duplex = local-echo */
1096 #ifdef OS2
1097 #define   XYTCUR 7      /*  Terminal cursor */
1098 #define     TTC_ULINE 0
1099 #define     TTC_HALF  1
1100 #define     TTC_BLOCK 2
1101 #define   XYTARR 8      /*  Terminal arrow-key mode */
1102 #define   XYTKPD 9      /*  Terminal keypad mode */
1103 #define    TTK_NORM 0   /*    Normal mode for arrow / keyad keys */
1104 #define    TTK_APPL 1   /*    Application mode for arrow / keyad keys */
1105 #define   XYTWRP 10     /*  Terminal wrap */
1106 #endif /* OS2 */
1107 #define   XYTCRD 11     /*  Terminal CR-display */
1108 #define   XYTANS 12     /*  Terminal answerback */
1109 #ifdef OS2
1110 #define   XYSCRS 13     /*  Terminal scrollback buffer size */
1111 #endif /* OS2 */
1112 #define   XYTAPC 14     /*  Terminal APC */
1113 #ifdef OS2
1114 #define   XYTBEL 15     /*  Terminal Bell */
1115 #endif /* OS2 */
1116 #define   XYTDEB 16     /*  Terminal Debug */
1117 #ifdef OS2
1118 #define   XYTROL 17     /*  Terminal Rollback */
1119 #define     TTR_OVER   0  /*  Rollback Overwrite */
1120 #define     TTR_INSERT 1  /*  Rollback Insert */
1121 #define     TTR_KEYS   2  /*  Keystrokes */
1122 #define       TTRK_IGN 0  /*    Ignore */
1123 #define       TTRK_RST 2  /*    Restore and Send */
1124 #define       TTRK_SND 1  /*    Send */
1125 #define   XYTCTS 18     /*  Terminal Transmit-Timeout */
1126 #define   XYTCPG 19     /*  Terminal Code Page */
1127 #ifdef COMMENT
1128 #define   XYTHCU 20     /*  Terminal Hide-Cursor */
1129 #endif /* COMMENT */
1130 #define   XYTPAC 21         /*  Terminal Output-Pacing */
1131 #define   XYTMOU 22         /*  Terminal Mouse */
1132 #endif /* OS2 */
1133 #define   XYTHIG 23     /*  Terminal Width */
1134 #define   XYTWID 24     /*  Terminal Height */
1135 #ifdef OS2
1136 #define   XYTUPD 25     /*  Terminal Screen-update */
1137 #define    TTU_FAST 0   /*     FAST but jerky */
1138 #define    TTU_SMOOTH 1 /*     SMOOTH but slow */
1139 #define   XYTFON 26     /*  Terminal Full screen Font */
1140 #define    TTF_ROM    0 /*     ROM font */
1141 #define    TTF_CY1    1 /*     CYRILL1 font */
1142 #define    TTF_CY2    2 /*     CYRILL2 font */
1143 #define    TTF_CY3    3 /*     CYRILL3 font */
1144 #define    TTF_111  111 /*     CP111 font */
1145 #define    TTF_112  112 /*     CP112 font */
1146 #define    TTF_113  113 /*     CP113 font */
1147 #define    TTF_437  437 /*     CP437 font */
1148 #define    TTF_850  850 /*     CP850 font */
1149 #define    TTF_851  851 /*     CP851 font */
1150 #define    TTF_852  852 /*     CP852 font */
1151 #define    TTF_853  853 /*     CP853 font */
1152 #define    TTF_860  860 /*     CP860 font */
1153 #define    TTF_861  861 /*     CP861 font */
1154 #define    TTF_862  862 /*     CP862 font */
1155 #define    TTF_863  863 /*     CP863 font */
1156 #define    TTF_864  864 /*     CP864 font */
1157 #define    TTF_865  865 /*     CP865 font */
1158 #define    TTF_866  866 /*     CP866 font */
1159 #define    TTF_880  880 /*     CP880 font */
1160 #define    TTF_881  881 /*     CP881 font */
1161 #define    TTF_882  882 /*     CP882 font */
1162 #define    TTF_883  883 /*     CP883 font */
1163 #define    TTF_884  884 /*     CP884 font */
1164 #define    TTF_885  885 /*     CP885 font */
1165 #define   XYTVCH 27     /* SET TERMINAL VIDEO-CHANGE */
1166 #define    TVC_DIS   0  /*     DISABLED */
1167 #define    TVC_ENA   1  /*     ENABLED  */
1168 #define    TVC_W95   2  /*     WIN95-SAFE */
1169 #endif /* OS2 */
1170 #define   XYTAUTODL 28  /* SET TERMINAL AUTODOWNLOAD */
1171 #define    TAD_OFF     0 /*    OFF */
1172 #define    TAD_ON      1 /*    ON  */
1173 #define    TAD_K       2 /*    KERMIT */
1174 #define    TAD_Z       3 /*    ZMODEM */
1175 #define    TAD_X_STR     0 /*    STRING */
1176 #define    TAD_X_DETECT  1 /*    DETECTION ( PACKET, STRING ) */
1177 #define    TAD_X_C0      2 /*    C0 CONFLICTS */
1178 #define    TAD_ERR     4 /*    ERROR { STOP, CONTINUE } */
1179 #define    TAD_ASK     5 /*    ASK (dialog) */
1180 #define   XYTAUTOUL 29  /* SET TERMINAL AUTOUPLOAD   */
1181 #ifdef OS2
1182 #define   XYTATTBUG 30  /* SET TERM ATTR-BUG */
1183 #define   XYTSTAT   31  /* SET TERM STATUSLINE */
1184 #endif /* OS2 */
1185 #define   XYTESC    32  /* SET TERM ESCAPE-CHARACTER */
1186 #define   XYTCTRL   33  /* SET TERM CONTROLS */
1187 #ifdef OS2
1188 #define   XYTATTR   34  /* SET TERM ATTRIBUTE representation */
1189 #define   XYTSGRC   35  /* SET TERM SGRCOLORS */
1190 #endif /* OS2 */
1191 #define   XYTLCS    36  /* SET TERM LOCAL-CHARACTER-SET */
1192 #define   XYTRCS    37  /* SET TERM REMOTE-CHARACTER-SET */
1193 #define   XYTUNI    38  /* SET TERM UNICODE */
1194 #define   XYTKEY    39  /* SET TERM KEY */
1195 #ifdef OS2
1196 #define   XYTSEND   40  /* SET TERM SEND-DATA */
1197 #define   XYTSEOB   41  /* SET TERM SEND-END-OF-BLOCK */
1198 #define   XYTMBEL   42  /* SET TERM MARGIN-BELL */
1199 #endif /* OS2 */
1200 #define   XYTIDLE   43  /* SET TERM IDLE-SEND */
1201 #ifdef OS2
1202 #define   XYTKBMOD  44  /* SET TERM KEYBOARD-MODE */
1203 #define   XYTUNX    45  /* SET TERM UNIX-MODE (DG) */
1204 #define   XYTASCRL  46  /* SET TERM AUTOSCROLL */
1205 #define   XYTAPAGE  47  /* SET TERM AUTOPAGE */
1206 #endif /* OS2 */
1207 #define   XYTRIGGER 48  /* SET TERM TRIGGER */
1208 #ifdef OS2
1209 #define   XYTPCTERM 49  /* SET TERM PCTERM */
1210 #define   XYTOPTI   50  /* SET TERM SCREEN-OPTIMIZE */
1211 #define   XYTSCNM   51  /* SET TERM SCREEN-MODE (DECSCNM) */
1212 #endif /* OS2 */
1213 #define   XYTPRN    52  /* SET TERM PRINT {AUTO, COPY, OFF} */
1214 #ifdef OS2
1215 #define   XYTSAC    53  /* SET TERM SPACING-ATTRIBUTE-CHARACTER (inv) */
1216 #define   XYTSNIPM  54  /* SET TERM SNI-AUTOROLL */
1217 #define   XYTSNISM  55  /* SET TERM SNI-SCROLLMODE */
1218 #define   XYTKBDGL  56  /* SET TERM KBD-FOLLOWS-GL/GR */
1219 #define   XYTVTLNG  57  /* SET TERM VT-LANGUAGE */
1220 #define     VTL_NORTH_AM  1
1221 #define     VTL_BRITISH   2
1222 #define     VTL_BELGIAN   3
1223 #define     VTL_FR_CAN    4
1224 #define     VTL_DANISH    5
1225 #define     VTL_FINNISH   6
1226 #define     VTL_GERMAN    7
1227 #define     VTL_DUTCH     8
1228 #define     VTL_ITALIAN   9
1229 #define     VTL_SW_FR    10
1230 #define     VTL_SW_GR    11
1231 #define     VTL_SWEDISH  12
1232 #define     VTL_NORWEGIA 13
1233 #define     VTL_FRENCH   14
1234 #define     VTL_SPANISH  15
1235 #define     VTL_PORTUGES 16
1236 #define     VTL_HEBREW   19
1237 #define     VTL_GREEK    22
1238 #define     VTL_CANADIAN 28
1239 #define     VTL_TURK_Q   29
1240 #define     VTL_TURK_F   30
1241 #define     VTL_HUNGARIA 31
1242 #define     VTL_SLOVAK   33
1243 #define     VTL_CZECH    34
1244 #define     VTL_POLISH   35
1245 #define     VTL_ROMANIAN 36
1246 #define     VTL_SCS      38
1247 #define     VTL_RUSSIAN  39
1248 #define     VTL_LATIN_AM 40
1249 #define   XYTVTNRC  58  /* SET TERM VT-NRC-MODE */
1250 #define   XYTSNICC  59  /* SET TERM SNI-CH.CODE */
1251 #define   XYTSNIFV  60  /* SET TERM SNI-FIRMWARE-VERSIONS */
1252 #define   XYTURLHI  61  /* SET TERM URL-HIGHLIGHT */
1253 #endif /* OS2 */
1254 #define   XYTITMO   62  /* SET TERM IDLE-TIMEOUT */
1255 #define   XYTIACT   63  /* SET TERM IDLE-ACTION  */
1256 #define   XYTLSP    64  /* SET TERM LINE-SPACING */
1257
1258 #define XYATTR 34       /* Attribute packets  */
1259 #define XYSERV 35       /* Server parameters  */
1260 #define   XYSERT 0      /*  Server timeout    */
1261 #define   XYSERD 1      /*  Server display    */
1262 #define   XYSERI 2      /*  Server idle       */
1263 #define   XYSERP 3      /*  Server get-path   */
1264 #define   XYSERL 4      /*  Server login      */
1265 #define   XYSERC 5      /*  Server CD-Message */
1266 #define   XYSERK 6      /*  Server keepalive  */
1267 #define XYWIND 36       /* Window size */
1268 #define XYXFER 37       /* Transfer */
1269 #define   XYX_CAN 0     /*   Cancellation  */
1270 #define   XYX_CSE 1     /*   Character-Set */
1271 #define   XYX_LSH 2     /*   Locking-Shift */
1272 #define   XYX_PRO 3     /*   Protocol      */
1273 #define   XYX_MOD 4     /*   Mode          */
1274 #define   XYX_DIS 5     /*   Display       */
1275 #define   XYX_SLO 6     /*   Slow-start    */
1276 #define   XYX_CRC 7     /*   CRC calculation */
1277 #define   XYX_BEL 8     /*   Bell */
1278 #define   XYX_PIP 9     /*   Pipes */
1279 #define   XYX_INT 10    /*   Interruption */
1280 #define   XYX_XLA 11    /*   (character-set) Translation On/Off */
1281 #define   XYX_MSG 12    /*   Message */
1282 #define   XYX_RPT 13    /*   Report */
1283 #define XYLANG 38       /* Language */
1284 #define XYCOUN 39       /* Count */
1285 #define XYTAKE 40       /* Take */
1286 #define XYUNCS 41       /* Unknown-character-set */
1287 #define XYKEY  42       /* Key */
1288 #define XYMACR 43       /* Macro */
1289 #define XYHOST 44       /* Hostname on network */
1290 #define XYNET  45       /* SET NETWORK things */
1291
1292 #define XYNET_D 99      /* NETWORK DIRECTORY */
1293 #define XYNET_T 100     /* NETWORK TYPE */
1294
1295 #define XYCARR 46       /* Carrier */
1296 #define XYXMIT 47       /* Transmit */
1297
1298 #define XYDIAL 48       /* Dial options */
1299
1300 /* And now we interrupt the flow to bring you lots of stuff about dialing */
1301
1302 #ifndef MAXTOLLFREE     /* Maximum number of toll-free area codes */
1303 #define MAXTOLLFREE 8
1304 #endif /* MAXTOLLFREE */
1305
1306 #ifndef MAXTPCC         /* Maximum Tone or Pulse dialing countries */
1307 #define MAXTPCC 160
1308 #endif /* MAXTPCC */
1309
1310 #ifndef MAXPBXEXCH      /* Maximum number of PBX exchanges */
1311 #define MAXPBXEXCH 8
1312 #endif /* MAXPBXEXCH */
1313
1314 #ifndef MAXLOCALAC
1315 #define MAXLOCALAC 32
1316 #endif /* MAXLOCALAC */
1317
1318 #ifndef MAXDNUMS
1319 #ifdef BIGBUFOK
1320 #define MAXDDIR 32      /* Maximum number of dialing directories */
1321 #define MAXDNUMS 4095   /* Max numbers to fetch from dialing directories */
1322 #else
1323 #define MAXDDIR 12
1324 #define MAXDNUMS 1024
1325 #endif /* BIGBUFOK */
1326 #endif /* MAXDNUMS */
1327 /*
1328   IMPORTANT: In 5A(192), the old SET DIAL command was split into two commands:
1329   SET MODEM (for modem-related parameters) and SET DIAL (for dialing items).
1330   To preserve the old formats, etc, invisibly we keep one symbol space for
1331   both commands.
1332 */
1333 #define  XYDHUP  0      /*   Dial Hangup */
1334 #define  XYDINI  1      /*   MODEM (dial) Initialization string */
1335 #define  XYDKSP  2      /*   MODEM (dial) Kermit-Spoof */
1336 #define  XYDTMO  3      /*   Dial Timeout */
1337 #define  XYDDPY  4      /*   Dial Display */
1338 #define  XYDSPD  5      /*   Dial Speed matching */
1339 #define  XYDMNP  6      /*   MODEM (dial) MNP negotiation enabled (obsolete) */
1340 #define  XYDEC   7      /*   MODEM (dial) error correction enabled */
1341 #define  XYDDC   8      /*   MODEM (dial) compression enabled */
1342 #define  XYDHCM  9      /*   MODEM (dial) hangup-string (moved elsewhere) */
1343 #define  XYDDIR 10      /*   Dial directory */
1344 #define  XYDDIA 11      /*   MODEM (dial) dial-command */
1345 #define  XYDMHU 12      /*   MODEM HANGUP (dial modem-hangup) */
1346
1347 #ifndef DEFMDHUP        /* Default MODEM HANGUP-METHOD */
1348 #define DEFMDMHUP 1     /* 0 = RS232, 1 = modem command */
1349 #endif /* DEFMDMHUP */
1350
1351 #define  XYDNPR 13      /*   Dial PREFIX */
1352 #define  XYDSTR 14      /*   MODEM COMMAND (dial string) ... */
1353
1354 #define   XYDS_DC 0     /*    Data compression */
1355 #define   XYDS_EC 1     /*    Error correction */
1356 #define   XYDS_HU 2     /*    Hangup command */
1357 #define   XYDS_HW 3     /*    Hardware flow control */
1358 #define   XYDS_IN 4     /*    Init-string */
1359 #define   XYDS_NF 5     /*    No flow control */
1360 #define   XYDS_PX 6     /*    Prefix (no, this goes in SET DIAL) */
1361 #define   XYDS_SW 7     /*    Software flow control */
1362 #define   XYDS_DT 8     /*    Tone dialing command */
1363 #define   XYDS_DP 9     /*    Pulse dialing command */
1364 #define   XYDS_AN 10    /*    Autoanswer */
1365 #define   XYDS_RS 11    /*    Reset */
1366 #define   XYDS_MS 12    /*    Dial mode string */
1367 #define   XYDS_MP 13    /*    Dial mode prompt */
1368 #define   XYDS_SP 14    /*    Modem speaker */
1369 #define   XYDS_VO 15    /*    Modem speaker volume */
1370 #define   XYDS_ID 16    /*    Ignore dialtone */
1371 #define   XYDS_I2 17    /*    Init string #2 */
1372
1373 #define   XYDM_A  9     /*    Method: Auto */
1374 #define   XYDM_D  0     /*      Default */
1375 #define   XYDM_T  2     /*      Tone */
1376 #define   XYDM_P  3     /*      Pulse */
1377
1378 #define  XYDFC   15     /*   MODEM (dial) flow-control */
1379 #define  XYDMTH  16     /*   Dial method */
1380 #define  XYDESC  17     /*   MODEM (dial) escape-character */
1381 #define  XYDMAX  18     /*   MODEM (dial) maximum interface speed */
1382 #define  XYDCAP  19     /*   MODEM (dial) capabilities */
1383 #define  XYDTYP  20     /*   MODEM TYPE */
1384 #define  XYDINT  21     /*   DIAL retries */
1385 #define  XYDRTM  22     /*   DIAL time between retries */
1386 #define  XYDNAM  23     /*   MODEM NAME */
1387 #define  XYDLAC  24     /*   DIAL (LOCAL-)AREA-CODE */
1388 #define  XYDMCD  25     /*   MODEM CARRIER */
1389
1390 #define  XYDCNF  26     /*   DIAL CONFIRMATION */
1391 #define  XYDCVT  27     /*   DIAL CONVERT-DIRECTORY */
1392 #define  XYDIXP  28     /*   DIAL INTERNATIONAL-PREFIX */
1393 #define  XYDIXS  29     /*   DIAL INTERNATIONAL-SUFFIX */
1394 #define  XYDLCC  30     /*   DIAL LOCAL-COUNTRY-CODE */
1395 #define  XYDLDP  31     /*   DIAL LONG-DISTANCE-PREFIX */
1396 #define  XYDLDS  32     /*   DIAL LONG-DISTANCE-SUFFIX */
1397 #define  XYDPXX  33     /*   DIAL PBX-EXCHANGE */
1398 #define  XYDPXI  34     /*   DIAL PBX-INTERNAL-PREFIX */
1399 #define  XYDPXO  35     /*   DIAL PBX-OUTSIDE-PREFIX */
1400 #define  XYDSFX  36     /*   DIAL SUFFIX */
1401 #define  XYDSRT  37     /*   DIAL SORT */
1402 #define  XYDTFC  38     /*   DIAL TOLL-FREE-AREA-CODE */
1403 #define  XYDTFP  39     /*   DIAL TOLL-FREE-PREFIX */
1404 #define  XYDTFS  40     /*   DIAL TOLL-FREE-SUFFIX */
1405 #define  XYDCON  41     /*   DIAL CONNECT */
1406 #define  XYDRSTR 42     /*   DIAL RESTRICT */
1407 #define  XYDRSET 43     /*   MODEM RESET */
1408 #define  XYDLCP  44     /*   DIAL LOCAL-PREFIX */
1409 #define  XYDLCS  45     /*   DIAL LOCAL-SUFFIX */
1410 #define  XYDLLAC 46     /*   DIAL LC-AREA-CODES */
1411 #define  XYDFLD  47     /*   DIAL FORCE LONG-DISTANCE */
1412 #define  XYDSPK  48     /*   MODEM SPEAKER */
1413 #define  XYDVOL  49     /*   MODEM VOLUME */
1414 #define  XYDIDT  50     /*   IGNORE DIALTONE */
1415 #define  XYDPAC  51     /*   PACING */
1416 #define  XYDMAC  52     /*   MACRO */
1417 #define  XYDPUCC 53     /*   PULSE-COUNTRIES */
1418 #define  XYDTOCC 54     /*   TONE-COUNTRIES */
1419 #define  XYDTEST 55     /*   TEST */
1420
1421 #define XYA_CID   1     /* SET ANSWER CALLER-ID */
1422 #define XYA_RNG   2     /* SET ANSWER RINGS */
1423
1424 #define XYSESS 49       /* SET SESSION options */
1425 #define XYBUF  50       /* Buffer length */
1426 #define XYBACK 51       /* Background */
1427 #define XYDFLT 52       /* Default */
1428 #define XYDBL  53       /* Double */
1429 #define XYCMD  54       /* COMMAND */
1430 #define XYCASE 55       /* Case */
1431 #define XYCOMP 56       /* Compression */
1432 #define XYX25  57       /* X.25 parameter (ANYX25) */
1433 #define XYPAD  58       /* X.3 PAD parameter (ANYX25) */
1434 #define XYWILD 59       /* Wildcard expansion method */
1435 #define XYSUSP 60       /* Suspend */
1436 #define XYMAIL 61       /* Mail-Command */
1437 #define XYPRIN 62       /* Print-Command */
1438 #define XYQUIE 63       /* Quiet */
1439 #define XYLCLE 64       /* Local-echo */
1440 #define XYSCRI 65       /* SCRIPT command paramaters */
1441 #define XYMSGS 66       /* MESSAGEs ON/OFF */
1442 #ifdef TNCODE
1443 #define XYTEL  67       /* SET TELNET parameters */
1444 #define  CK_TN_EC 0     /*  TELNET ECHO */
1445 #define  CK_TN_TT 1     /*  TELNET TERMINAL-TYPE */
1446 #define  CK_TN_NL 2     /*  TELNET NEWLINE-MODE */
1447 #define  CK_TN_BM 3     /*  TELNET BINARY-MODE */
1448 #define  CK_TN_BUG 4    /*  TELNET BUG */
1449 #define  CK_TN_ENV 5    /*  TELNET ENVIRONMENT */
1450 #define    TN_ENV_USR  0 /*    VAR USER */
1451 #define    TN_ENV_JOB  1 /*    VAR JOB */
1452 #define    TN_ENV_ACCT 2 /*    VAR ACCT */
1453 #define    TN_ENV_PRNT 3 /*    VAR PRINTER */
1454 #define    TN_ENV_SYS  4 /*    VAR SYSTEMTYPE */
1455 #define    TN_ENV_DISP 5 /*    VAR DISPLAY */
1456 #define    TN_ENV_UVAR 6 /*    USERVAR */
1457 #define    TN_ENV_LOC  7 /*    USERVAR LOCATION */
1458 #define    TN_ENV_ON  98 /*    ON (enabled) */
1459 #define    TN_ENV_OFF 99 /*    OFF (disabled) */
1460 #define  CK_TN_LOC 6    /*  TELNET LOCATION */
1461 #define  CK_TN_AU  7    /*  TELNET AUTHENTICATION */
1462 #define    TN_AU_FWD   4 /*    AUTH FORWARD */
1463 #define    TN_AU_TYP   5 /*    AUTH TYPE */
1464 #define      AUTH_NONE 0 /*      AUTH NONE */
1465 #define      AUTH_KRB4 1 /*      AUTH Kerberos IV */
1466 #define      AUTH_KRB5 2 /*      AUTH Kerberos V */
1467 #define      AUTH_SSL  7 /*      AUTH Secure Sockets Layer */
1468 #define      AUTH_TLS 98 /*      AUTH Transport Layer Security */
1469 #define      AUTH_SRP  5 /*      AUTH Secure Remote Password */
1470 #define      AUTH_NTLM 15 /*      AUTH NT Lan Manager */
1471 #define      AUTH_AUTO 99 /*     AUTH AUTOMATIC */
1472 #define    TN_AU_HOW  8  /*    AUTH HOW FLAG */
1473 #define    TN_AU_ENC  9  /*    AUTH ENCRYPT FLAG */
1474 #define  CK_TN_ENC 8    /*  TELNET ENCRYPTION */
1475 #define    TN_EN_TYP   4 /*      ENCRYPT TYPE */
1476 #define    TN_EN_START 5 /*      ENCRYPT START */
1477 #define    TN_EN_STOP  6 /*      ENCRYPT STOP  */
1478 #define  CK_TN_IKS 9    /*  TELNET KERMIT-SERVER */
1479 #define  CK_TN_RE  10   /*  TELNET REMOTE-ECHO */
1480 #define  CK_TN_TLS 11   /*  TELNET START_TLS */
1481 #define  CK_TN_XD  12   /*  TELNET XDISPLOC */
1482 #define  CK_TN_NAWS 13  /*  TELNET NAWS */
1483 #define  CK_TN_WAIT 14  /*  TELNET WAIT-FOR-NEGOTIATIONS */
1484 #define  CK_TN_SGA  15  /*  TELNET SGA */
1485 #define  CK_TN_CLIENT 16  /* TELNET CLIENT */
1486 #define  CK_TN_SERVER 17  /* TELNET SERVER */
1487 #define  CK_TN_PHR    18  /* TELNET PRAGMA-HEARTBEAT */
1488 #define  CK_TN_PLG    19  /* TELNET PRAGMA-LOGON */
1489 #define  CK_TN_PSP    20  /* TELNET PRAGMA-SSPI */
1490 #define  CK_TN_SAK    21  /* TELNET IBM SAK */
1491 #define  CK_TN_FLW    22  /* TELNET LFLOW */
1492 #define  CK_TN_XF     23  /* TELNET TRANSFER-MODE */
1493 #define  CK_TN_PUID   24  /* TELNET PROMPT-FOR-USERID */
1494 #define  CK_TN_NE     25  /* TELNET NO-ENCRYPT-DURING-XFER */
1495 #define  CK_TN_CPC    26  /* TELNET COM-PORT-CONTROL */
1496 #define  CK_TN_DB     27  /* TELNET DEBUG */
1497 #define  CK_TN_FX     28  /* TELNET FORWARD_X */
1498 #define  CK_TN_DL     29  /* TELNET DELAY-SB */
1499 #define  CK_TN_SFU    30  /* TELNET SFU-COMPATIBILITY */
1500 #define  CK_TN_LOG    31  /* TELNET LOGOUT */
1501 #endif /* TNCODE */
1502 #define XYOUTP 68       /* OUTPUT command parameters */
1503 #define   OUT_PAC 0     /*   OUTPUT PACING */
1504 #define   OUT_ESC 1     /*   OUTPUT SPECIAL-ESCAPES */
1505 #define XYEXIT  69      /* SET EXIT */
1506 #define XYPRTR  70      /* SET PRINTER */
1507 #define XYFPATH 71      /* PATHNAME */
1508
1509 #ifdef OS2
1510 #define XYMOUSE 72      /* MOUSE SUPPORT */
1511 #define  XYM_ON     0   /* Mouse ON/OFF        */
1512 #define  XYM_BUTTON 1   /* Define Mouse Events */
1513 #define  XYM_CLEAR  2   /* Clear Mouse Events  */
1514 #define  XYM_DEBUG  3   /* Debug Mode ON/OFF */
1515 /* These must match similar definitions in ckokey.h */
1516 #define   XYM_B1 0      /* Mouse Button One */
1517 #define   XYM_B2 1      /* Mouse Button Two */
1518 #define   XYM_B3 2      /* Mouse Button Three */
1519 #define   XYM_ALT   1     /* Alt */
1520 #define   XYM_CTRL  2     /* Ctrl */
1521 #define   XYM_SHIFT 4     /* Shift */
1522 #define   XYM_C1    0     /* Single Click */
1523 #define   XYM_C2    8     /* Double Click */
1524 #define   XYM_DRAG  16    /* Drag Event */
1525 #endif /* OS2 */
1526
1527 #define XYBELL 73   /* BELL */
1528
1529 #ifdef OS2
1530 #define XYPRTY     74   /* Thread Priority Level */
1531 #define   XYP_IDLE  1
1532 #define   XYP_REG   2
1533 #define   XYP_SRV   4
1534 #define   XYP_RTP   3
1535 #endif /* OS2 */
1536
1537 #define XYALRM     75   /* SET ALARM */
1538 #define XYPROTO    76   /* SET PROTOCOL */
1539 #define XYPREFIX   77   /* SET PREFIXING */
1540 #define XYLOGIN    78   /* Login info for script programs... */
1541
1542 #define  LOGI_UID   0   /* User ID  */
1543 #define  LOGI_PSW   1   /* Password */
1544 #define  LOGI_PRM   2   /* Prompt   */
1545
1546 #define XYSTARTUP  79    /* Startup file */
1547 #define XYTMPDIR   80    /* Temporary directory */
1548
1549 #ifdef OS2
1550 #define XYTAPI     81    /* Microsoft Telephone API options */
1551 #define   XYTAPI_CFG     1  /* TAPI Configure-Line Dialog */
1552 #define   XYTAPI_DIAL    2  /* TAPI Dialing-Properties Dialog */
1553 #define   XYTAPI_LIN     3  /* TAPI Line */
1554 #define   XYTAPI_LOC     4  /* TAPI Location */
1555 #define   XYTAPI_PASS    5  /* TAPI Passthrough */
1556 #define   XYTAPI_CON     6  /* TAPI Conversions */
1557 #define   XYTAPI_LGHT    7  /* TAPI Modem Lights */
1558 #define   XYTAPI_PRE     8  /* TAPI Pre-dialing Terminal */
1559 #define   XYTAPI_PST     9  /* TAPI Post-dialing Terminal */
1560 #define   XYTAPI_INA    10  /* TAPI Inactivity Timeout */
1561 #define   XYTAPI_BNG    11  /* TAPI Wait for Credit Card Tone */
1562 #define   XYTAPI_MAN    12  /* TAPI Manual Dialing */
1563 #define   XYTAPI_USE    13  /* TAPI Use Line Config settings */
1564 #endif /* OS2 */
1565
1566 #ifdef TCPSOCKET
1567 #define XYTCP  82       /* TCP options */
1568 #define  XYTCP_NODELAY   1  /* No Delay */
1569 #define  XYTCP_SENDBUF   2  /* Send Buffer Size */
1570 #define  XYTCP_LINGER    3  /* Linger */
1571 #define  XYTCP_RECVBUF   4  /* Receive Buffer Size */
1572 #define  XYTCP_KEEPALIVE 5  /* Keep Alive packets */
1573 #define  XYTCP_UCX       6  /* UCX 2.0 port swabbing bug */
1574 #define  XYTCP_NAGLE     7  /* Delay - inverse of 1 */
1575 #define  XYTCP_RDNS      8  /* Reverse DNS lookup */
1576 #define  XYTCP_ADDRESS   9  /* Set preferred IP Address */
1577 #define  XYTCP_DNS_SRV  10  /* Use DNS Service Records */
1578 #define  XYTCP_DONTROUTE 11 /* Dont Route */
1579 #define  XYTCP_SOCKS_SVR 12 /* Name of Socks Server */
1580 #define  XYTCP_HTTP_PROXY 13 /* Name/Port of HTTP Proxy Server */
1581 #define  XYTCP_SOCKS_NS  14 /* Name of Socks Name Server */
1582 #endif /* TCPSOCKET */
1583
1584 #ifdef OS2
1585 #define XYMSK  83       /* MS-DOS Kermit compatibility options */
1586 #define  MSK_COLOR 0    /*  Terminal color handling   */
1587 #define  MSK_KEYS  1    /*  SET KEY uses MSK keycodes */
1588 #endif /* OS2 */
1589
1590 #define XYDEST  84      /* SET DESTINATION as in MS-DOS Kermit */
1591
1592 #ifdef OS2
1593 #define XYWIN95 85      /* SET WIN95 work arounds  */
1594 #define   XYWKEY 0      /*    Keyboard translation */
1595 #define   XYWAGR 1      /*    Alt-Gr               */
1596 #define   XYWOIO 2      /*    Overlapped I/O       */
1597 #define   XYWLUC 3      /*    Lucida Console substitutions */
1598 #define   XYWSELECT 4   /*    Select on Write Bug */
1599 #define   XYW8_3 5      /*    Use 8.3 filenames? */
1600 #define   XYWPOPUP 6    /*    Use Popups?  */
1601 #define   XYWHSL 7      /*    Horz Scan Line substitutions */
1602 #define XYDLR   86      /* SET K95 DIALER work arounds */
1603 #define XYTITLE 87      /* SET TITLE of window */
1604 #endif /* OS2 */
1605
1606 #define XYIGN   88      /* SET IGNORE-CHARACTER */
1607 #define XYEDIT  89      /* SET EDITOR */
1608 #define XYFLTR  90      /* SET { SEND, RECEIVE } FILTER */
1609 #define XYBROWSE 91     /* SET BROWSER */
1610 #define XYEOF    92     /* EOF (= FILE EOF) */
1611 #ifdef OS2
1612 #define XYBDCP   93     /* BPRINTER */
1613 #endif /* OS2 */
1614 #define XYFLAG   94     /* FLAG */
1615 #define XYLIMIT  95     /* SESSION-LIMIT */
1616 #define XYINIL   96     /* Protocol negotiation string max length */
1617 #define XYRELY   97     /* RELIABLE */
1618 #define XYSTREAM 98     /* STREAMING */
1619 #define XYTLOG   99     /* TRANSACTION-LOG */
1620 #define XYCLEAR 100     /* CLEARCHANNEL */
1621 #define XYAUTH  101     /* AUTHENTICATION */
1622
1623 #ifdef TNCODE
1624 #define XYKRBPR   0     /* Kerberos Principal */
1625 #define XYKRBRL   1     /* Kerberos Realm */
1626 #define XYKRBCC   2     /* Kerberos 5 Credentials-Cache */
1627 #define XYKRBSRV  3     /* Kerberos Service Name */
1628 #define XYKRBDBG  4     /* Kerberos Debugging */
1629 #define XYKRBLIF  5     /* Kerberos Lifetime */
1630 #define XYKRBPRE  6     /* Kerberos 4 Preauth */
1631 #define XYKRBINS  7     /* Kerberos 4 Instance */
1632 #define XYKRBFWD  8     /* Kerberos 5 Forwardable */
1633 #define XYKRBPRX  9     /* Kerberos 5 Proxiable */
1634 #define XYKRBRNW  10    /* Kerberos 5 Renewable lifetime */
1635 #define XYKRBGET  11    /* Kerberos Auto-Get-TGTs */
1636 #define XYKRBDEL  12    /* Kerberos Auto-Destroy-TGTs */
1637 #define   KRB_DEL_NO  0 /*   Kerberos No Auto Destroy */
1638 #define   KRB_DEL_CL  1 /*   Kerberos Auto Destory on Close */
1639 #define   KRB_DEL_EX  2 /*   Kerberos Auto Destroy on Exit  */
1640 #define XYKRBK5K4 13    /* Kerberos 5 Get K4 Tickets */
1641 #define XYKRBPRM  14    /* Kerberos 4/5 Prompt */
1642 #define XYKRBADR  15    /* Kerberos 4/5 CheckAddrs */
1643 #define XYKRBNAD  16    /* Kerberos 5 No Addresses */
1644 #define XYKRBADD  17    /* Kerberos 5 Address List */
1645 #define XYKRBKTB  18    /* Kerberos 4/5 Key Table */
1646 #define XYSRPPRM   0    /* SRP Prompt */
1647 #define XYSSLRCFL  0    /* SSL/TLS RSA Certs file */
1648 #define XYSSLCOK   1    /* SSL/TLS Certs-Ok flag */
1649 #define XYSSLCRQ   2    /* SSL/TLS Certs-Required flag */
1650 #define XYSSLCL    3    /* SSL/TLS Cipher List */
1651 #define XYSSLDBG   4    /* SSL/TLS Debug flag */
1652 #define XYSSLRKFL  5    /* SSL/TLS RSA Key File */
1653 #define XYSSLLFL   6    /* SSL/TLS Log File */
1654 #define XYSSLON    7    /* SSL/TLS Only flag */
1655 #define XYSSLSEC   8    /* SSL/TLS Secure flag */
1656 #define XYSSLVRB   9    /* SSL/TLS Verbose flag */
1657 #define XYSSLVRF  10    /* SSL/TLS Verify flag */
1658 #define XYSSLDUM  11    /* SSL/TLS Dummy flag */
1659 #define XYSSLDCFL 12    /* SSL/TLS DSA Certs file */
1660 #define XYSSLDKFL 13    /* SSL/TLS DH Certs file */
1661 #define XYSSLDPFL 14    /* SSL/TLS DH Param file */
1662 #define XYSSLCRL  15    /* SSL/TLS CRL file */
1663 #define XYSSLCRLD 16    /* SSL/TLS CRL dir */
1664 #define XYSSLVRFF 17    /* SSL/TLS Verify file */
1665 #define XYSSLVRFD 18    /* SSL/TLS Verify dir */
1666 #define XYSSLRND  19    /* SSL/TLS Random file */
1667 #define XYSSLDCCF 20    /* SSL/TLS DSA Certs Chain File */
1668 #define XYSSLRCCF 21    /* SSL/TLS RSA Certs Chain File */
1669
1670 /* The following must be powers of 2 for a bit mask */
1671
1672 #define  XYKLCEN  1     /* Kerberos List Credentials: Encryption */
1673 #define  XYKLCFL  2     /* Kerberos List Credentials: Flags */
1674 #define  XYKLCAD  4     /* Kerberos List Credentials: Addresses */
1675 #endif /* TNCODE */
1676
1677 #define XYFUNC   102    /* SET FUNCTION */
1678
1679 #define  FUNC_DI   0    /* FUNCTION DIAGNOSTICS */
1680 #define  FUNC_ER   1    /* FUNCTION ERROR */
1681
1682 #define XYFTP    103    /* FTP application */
1683 #define XYSLEEP  104    /* SLEEP / PAUSE options */
1684 #define XYSSH    105    /* SSH options */
1685 #define XYTELOP  106    /* TELNET OPTIONS (TELOPT) */
1686 #define XYCD     107    /* SET CD */
1687 #define XYCSET   108    /* CHARACTER-SET */
1688 #define XYSTOP   109    /* STOP-BITS */
1689 #define XYSERIAL 110    /* SERIAL */
1690 #define XYDISC   111    /* CLOSE-ON-DISCONNECT */
1691 #define XYOPTS   112    /* OPTIONS */
1692 #define XYQ8FLG  113    /* Q8FLAG (invisible) */
1693 #define XYTIMER  114    /* TIMER */
1694 #define XYFACKB  115    /* F-ACK-BUG */
1695 #define XYBUP    116    /* SET SEND/RECEIVE BACKUP */
1696 #define XYMOVE   117    /* SET SEND/RECEIVE MOVE-TO */
1697 #define XYRENAME 118    /* SET SEND/RECEIVE RENAME-TO */
1698 #define XYHINTS  119    /* SET HINTS */
1699 #define XYEVAL   120    /* SET EVALUATE */
1700 #define XYFACKP  121    /* F-ACK-PATH */
1701 #define XYSYSL   122    /* SysLog */
1702 #define XYQNXPL  123    /* QNX Port Lock */
1703 #define XYIKS    124    /* SET IKS ... */
1704 #define XYROOT   125    /* SET ROOT */
1705 #define XYFTPX   126    /* SET FTP */
1706 #define XYSEXP   127    /* SET SEXP */
1707 #define XYGPR    128    /* SET GET-PUT-REMOTE */
1708 #define XYLOCUS  129    /* SET LOCUS */
1709 #define XYGUI    130    /* SET GUI */
1710 #define XYANSWER 131    /* SET ANSWER */
1711 #define XYMATCH  132    /* SET MATCHDOT */
1712 #define XYSFTP   133    /* SET SFTP */
1713
1714 /* End of SET commands */
1715
1716 /* S-Expressions -- floating-point support required */
1717
1718 #ifndef CKFLOAT
1719 #ifndef NOSEXP
1720 #define NOSEXP
1721 #endif /* NOSEXP */
1722 #endif /* CKFLOAT */
1723
1724 /* Maximum number of elements in an S-Expression */
1725
1726 #ifndef NOSEXP
1727 #ifndef SEXPMAX
1728 #ifdef BIGBUFOK
1729 #define SEXPMAX 1024
1730 #else
1731 #define SEXPMAX 32
1732 #endif /* BIGBUFOK */
1733 #endif /* SEXPMAX */
1734 #endif /* NOSEXP */
1735
1736 #ifdef ANYX25
1737 /* PAD command parameters */
1738
1739 #define XYPADL 0        /* clear virtual call */
1740 #define XYPADS 1        /* status of virtual call */
1741 #define XYPADR 2        /* reset of virtual call */
1742 #define XYPADI 3        /* send an interrupt packet */
1743
1744 /* Used with XYX25... */
1745 #define XYUDAT 0       /* X.25 call user data */
1746 #define XYCLOS 1       /* X.25 closed user group call */
1747 #define XYREVC 2       /* X.25 reverse charge call */
1748 #endif /* ANYX25 */
1749
1750 #ifdef OS2
1751 /* SET PRINTER switches */
1752
1753 #define PRN_OUT 0                       /* Output only */
1754 #define PRN_BID 1                       /* Bidirectional */
1755 #define PRN_DOS 2                       /* DOS device */
1756 #define PRN_WIN 3                       /* Windows queue */
1757 #define PRN_TMO 4                       /* Timeout */
1758 #define PRN_TRM 5                       /* Terminator */
1759 #define PRN_SEP 6                       /* Separator */
1760 #define PRN_SPD 7                       /* COM-port speed */
1761 #define PRN_FLO 8                       /* COM-port flow control */
1762 #define PRN_PAR 9                       /* COM-port parity */
1763 #define PRN_NON 10                      /* No printer */
1764 #define PRN_FIL 11                      /* Filename */
1765 #define PRN_PIP 12                      /* Pipename */
1766 #define PRN_PS  13                      /* Text to PS */
1767 #define PRN_WID 14                      /* PS Width */
1768 #define PRN_LEN 15                      /* PS Length */
1769 #define PRN_RAW 16                      /* Non-PS */
1770 #define PRN_CS  17                      /* Character Set */
1771 #define PRN_MAX 17                      /* Number of switches defined */
1772
1773 /* Printer types */
1774
1775 #define PRT_DOS 0                       /* DOS */
1776 #define PRT_WIN 1                       /* Windows Queue */
1777 #define PRT_FIL 2                       /* File */
1778 #define PRT_PIP 3                       /* Pipe */
1779 #define PRT_NON 4                       /* None */
1780
1781 #define PRINTSWI
1782 #endif /* OS2 */
1783 #endif /* NOICP */
1784
1785 #ifndef NODIAL
1786 /*
1787   Symbols for modem types, moved here from ckudia.c, May 1997, because now
1788   they are also used in some other modules.  The numbers MUST correspond to
1789   the ordering of entries within the modemp[] array.
1790 */
1791 #ifdef MINIDIAL                         /* Minimum dialer support */
1792
1793 #define         n_DIRECT         0      /* Direct connection -- no modem */
1794 #define         n_CCITT          1      /* CCITT/ITU-T V.25bis */
1795 #define         n_HAYES          2      /* Hayes 2400 */
1796 #define         n_UNKNOWN        3      /* Unknown */
1797 #define         n_UDEF           4      /* User-Defined */
1798 #define         n_GENERIC        5      /* Generic High Speed */
1799 #define         n_ITUTV250       6      /* ITU-T V.250 */
1800 #define         MAX_MDM          6      /* Number of modem types */
1801
1802 #else                                   /* Full-blown dialer support */
1803
1804 #define         n_DIRECT         0      /* Direct connection -- no modem */
1805 #define         n_ATTDTDM        1
1806 #define         n_ATTISN         2
1807 #define         n_ATTMODEM       3
1808 #define         n_CCITT          4
1809 #define         n_CERMETEK       5
1810 #define         n_DF03           6
1811 #define         n_DF100          7
1812 #define         n_DF200          8
1813 #define         n_GDC            9
1814 #define         n_HAYES         10
1815 #define         n_PENRIL        11
1816 #define         n_RACAL         12
1817 #define         n_UNKNOWN       13
1818 #define         n_VENTEL        14
1819 #define         n_CONCORD       15
1820 #define         n_ATTUPC        16      /* aka UNIX PC and ATT7300 */
1821 #define         n_ROLM          17      /* Rolm CBX DCM */
1822 #define         n_MICROCOM      18      /* Microcoms in SX command mode */
1823 #define         n_USR           19      /* Modern USRs */
1824 #define         n_TELEBIT       20      /* Telebits of all kinds */
1825 #define         n_DIGITEL       21      /* Digitel DT-22 (CCITT variant) */
1826 #define         n_H_1200        22      /* Hayes 1200 */
1827 #define         n_H_ULTRA       23      /* Hayes Ultra and maybe Optima */
1828 #define         n_H_ACCURA      24      /* Hayes Accura and maybe Optima */
1829 #define         n_PPI           25      /* Practical Peripherals */
1830 #define         n_DATAPORT      26      /* AT&T Dataport */
1831 #define         n_BOCA          27      /* Boca */
1832 #define         n_MOTOROLA      28      /* Motorola Fastalk or Lifestyle */
1833 #define         n_DIGICOMM      29      /* Digicomm Connection */
1834 #define         n_DYNALINK      30      /* Dynalink 1414VE */
1835 #define         n_INTEL         31      /* Intel 14400 Faxmodem */
1836 #define         n_UCOM_AT       32      /* Microcoms in AT mode */
1837 #define         n_MULTI         33      /* Multitech MT1432 */
1838 #define         n_SUPRA         34      /* SupraFAXmodem */
1839 #define         n_ZOLTRIX       35      /* Zoltrix */
1840 #define         n_ZOOM          36      /* Zoom */
1841 #define         n_ZYXEL         37      /* ZyXEL */
1842 #define         n_TAPI          38      /* TAPI Line modem - whatever it is */
1843 #define         n_TBNEW         39      /* Newer Telebit models */
1844 #define         n_MAXTECH       40      /* MaxTech XM288EA */
1845 #define         n_UDEF          41      /* User-Defined */
1846 #define         n_RWV32         42      /* Generic Rockwell V.32 */
1847 #define         n_RWV32B        43      /* Generic Rockwell V.32bis */
1848 #define         n_RWV34         44      /* Generic Rockwell V.34 */
1849 #define         n_MWAVE         45      /* IBM Mwave Adapter */
1850 #define         n_TELEPATH      46      /* Gateway Telepath */
1851 #define         n_MICROLINK     47      /* MicroLink modems */
1852 #define         n_CARDINAL      48      /* Cardinal modems */
1853 #define         n_GENERIC       49      /* Generic high-speed */
1854 #define         n_XJACK         50      /* Megahertz X-Jack */
1855 #define         n_SPIRITII      51      /* Quickcomm Spirit II */
1856 #define         n_MONTANA       52      /* Motorola Montana */
1857 #define         n_COMPAQ        53      /* Compaq Data+Fax Modem */
1858 #define         n_FUJITSU       54      /* Fujitsu Fax/Modem Adpater */
1859 #define         n_MHZATT        55      /* Megahertz AT&T V.34 */
1860 #define         n_SUPRASON      56      /* SupraSonic */
1861 #define         n_BESTDATA      57      /* Best Data */
1862 #define         n_ATT1900       58      /* AT&T STU III Model 1900 */
1863 #define         n_ATT1910       59      /* AT&T STU III Model 1910 */
1864 #define         n_KEEPINTOUCH   60      /* AT&T KeepinTouch */
1865 #define         n_USRX2         61      /* USR XJ-1560 X2 56K */
1866 #define         n_ROLMAT        62      /* Rolm with AT command set */
1867 #define         n_ATLAS         63      /* Atlas / Newcom ixfC 33.6 */
1868 #define         n_CODEX         64      /* Motorola Codex 326X Series */
1869 #define         n_MT5634ZPX     65      /* Multitech MT5634ZPX */
1870 #define         n_ULINKV250     66      /* Microlink ITU-T V.250 56K */
1871 #define         n_ITUTV250      67      /* Generic ITU-T V.250 */
1872 #define         n_RWV90         68      /* Generic Rockwell V.90 */
1873 #define         n_SUPRAX        69      /* Diamond Supra Express V.90 */
1874 #define         n_LUCENT        70      /* Lucent Venus chipset */
1875 #define         n_PCTEL         71      /* PCTel chipset */
1876 #define         n_CONEXANT      72      /* Conexant modem family */
1877 #define         n_ZOOMV34       73      /* Zoom */
1878 #define         n_ZOOMV90       74      /* Zoom */
1879 #define         n_ZOOMV92       75      /* ZOOM V.92 */
1880 #define         n_MOTSM56       76      /* Motorola SM56 chipset */
1881 #define         MAX_MDM         76      /* Number of modem types */
1882
1883 #endif /* MINIDIAL */
1884 #endif /* NODIAL */
1885
1886 #ifndef NOICP
1887 /* SHOW command symbols */
1888
1889 #define SHPAR 0                         /* Parameters */
1890 #define SHVER 1                         /* Versions */
1891 #define SHCOM 2                         /* Communications */
1892 #define SHPRO 3                         /* Protocol */
1893 #define SHFIL 4                         /* File */
1894 #define SHLNG 5                         /* Language */
1895 #define SHCOU 6                         /* Count */
1896 #define SHMAC 7                         /* Macros */
1897 #define SHKEY 8                         /* Key */
1898 #define SHSCR 9                         /* Scripts */
1899 #define SHSPD 10                        /* Speed */
1900 #define SHSTA 11                        /* Status */
1901 #define SHSER 12                        /* Server */
1902 #define SHXMI 13                        /* Transmit */
1903 #define SHATT 14                        /* Attributes */
1904 #define SHMOD 15                        /* Modem */
1905 #define SHDFLT 16                       /* Default (as in VMS) */
1906 #define SHVAR 17                        /* Show global variables */
1907 #define SHARG 18                        /* Show macro arguments */
1908 #define SHARR 19                        /* Show arrays */
1909 #define SHBUI 20                        /* Show builtin variables */
1910 #define SHFUN 21                        /* Show functions */
1911 #define SHPAD 22                        /* Show (X.25) PAD */
1912 #define SHTER 23                        /* Show terminal settings */
1913 #define SHESC 24                        /* Show escape character */
1914 #define SHDIA 25                        /* Show DIAL parameters */
1915 #define SHNET 26                        /* Show network parameters */
1916 #define SHLBL 27                        /* Show VMS labeled file parameters */
1917 #define SHSTK 28                        /* Show stack, MAC debugging */
1918 #define SHCSE 29                        /* Show character sets */
1919 #define SHFEA 30                        /* Show features */
1920 #define SHCTL 31                        /* Show control-prefix table */
1921 #define SHEXI 32                        /* Show EXIT items */
1922 #define SHPRT 33                        /* Show printer */
1923 #define SHCMD 34                        /* Show command parameters */
1924 #define SHKVB 35                        /* Show \Kverbs */
1925 #define SHMOU 36                        /* Show Mouse (like Show Key) */
1926 #define SHTAB 37                        /* Show Tabs (OS/2) */
1927 #define SHVSCRN 38                      /* Show Virtual Screen (OS/2) */
1928 #define SHALRM  39                      /* ALARM */
1929 #define SHSFL   40                      /* SEND-LIST */
1930 #define SHUDK   41                      /* DEC VT UDKs (OS/2) */
1931 #define SHDBL   42                      /* DOUBLE/IGNORE characters */
1932 #define SHEDIT    43                    /* EDITOR */
1933 #define SHBROWSE  44                    /* BROWSER */
1934 #define SHTAPI    45                    /* TAPI */
1935 #define SHTAPI_L  46                    /* TAPI Location */
1936 #define SHTAPI_M  47                    /* TAPI Modem Properties */
1937 #define SHTAPI_C  48                    /* TAPI Comm Properties  */
1938 #define SHTEL     49                    /* SHOW TELNET */
1939 #define SHINP     50                    /* SHOW INPUT */
1940 #define SHTRIG    51                    /* SHOW TRIGGER */
1941 #define SHLOG     52                    /* SHOW LOGS */
1942 #define SHOUTP    53                    /* SHOW OUTPUT */
1943 #define SHOPAT    54                    /* SHOW PATTERNS */
1944 #define SHOSTR    55                    /* SHOW STREAMING */
1945 #define SHOAUTH   56                    /* SHOW AUTHENTICATION */
1946 #define SHOFTP    57                    /* SHOW FTP */
1947 #define SHTOPT    58                    /* SHOW TELOPT */
1948 #define SHXOPT    59                    /* SHOW EXTENDED-OPTIONS */
1949 #define SHCD      60                    /* SHOW CD */
1950 #define SHASSOC   61                    /* SHOW ASSOCIATIONS */
1951 #define SHCONNX   62                    /* SHOW CONNECTION */
1952 #define SHOPTS    63                    /* SHOW OPTIONS */
1953 #define SHOFLO    64                    /* SHOW FLOW-CONTROL */
1954 #define SHOXFER   65                    /* SHOW TRANSFER */
1955 #define SHTCP     66                    /* SHOW TCP */
1956 #define SHHISTORY 67                    /* SHOW (command) HISTORY */
1957 #define SHSEXP    68                    /* SHOW SEXPRESSIONS */
1958 #define SHOSSH    69                    /* SHOW SSH */
1959 #define SHOIKS    70                    /* SHOW IKS */
1960 #define SHOGUI    71                    /* SHOW RGB */
1961
1962 /* REMOTE command symbols */
1963
1964 #define XZCPY  0        /* Copy */
1965 #define XZCWD  1        /* Change Working Directory */
1966 #define XZDEL  2        /* Delete */
1967 #define XZDIR  3        /* Directory */
1968 #define XZHLP  4        /* Help */
1969 #define XZHOS  5        /* Host */
1970 #define XZKER  6        /* Kermit */
1971 #define XZLGI  7        /* Login */
1972 #define XZLGO  8        /* Logout */
1973 #define XZMAI  9        /* Mail <-- wrong, this should be top-level */
1974 #define XZMOU 10        /* Mount */
1975 #define XZMSG 11        /* Message */
1976 #define XZPRI 12        /* Print */
1977 #define XZREN 13        /* Rename */
1978 #define XZSET 14        /* Set */
1979 #define XZSPA 15        /* Space */
1980 #define XZSUB 16        /* Submit */
1981 #define XZTYP 17        /* Type */
1982 #define XZWHO 18        /* Who */
1983 #define XZPWD 19        /* Print Working Directory */
1984 #define XZQUE 20        /* Query */
1985 #define XZASG 21        /* Assign */
1986 #define XZMKD 22        /* mkdir */
1987 #define XZRMD 23        /* rmdir */
1988 #define XZXIT 24        /* Exit */
1989 #define XZCDU 25        /* CDUP */
1990
1991 /* SET INPUT command parameters */
1992
1993 #define IN_DEF  0                       /* Default timeout */
1994 #define IN_TIM  1                       /* Timeout action */
1995 #define IN_CAS  2                       /* Case (matching) */
1996 #define IN_ECH  3                       /* Echo */
1997 #define IN_SIL  4                       /* Silence */
1998 #define IN_BUF  5                       /* Buffer size */
1999 #define IN_PAC  6                       /* Input Pacing (debug) */
2000 #define IN_TRM  7                       /* Input Terminal Display */
2001 #define IN_ADL  8                       /* Input autodownload */
2002 #define IN_PAT  9                       /* Pattern to match */
2003 #define IN_ASG 10                       /* Assign matching text to variable */
2004 #define IN_CAN 11                       /* Keyboard cancellation of INPUT */
2005 #define IN_SCA 12                       /* Timeout scaling */
2006
2007 /* ENABLE/DISABLE command parameters */
2008
2009 #define EN_ALL  0                       /* ALL */
2010 #define EN_CWD  1                       /* CD/CWD */
2011 #define EN_DIR  2                       /* DIRECTORY */
2012 #define EN_FIN  3                       /* FINISH */
2013 #define EN_GET  4                       /* GET */
2014 #define EN_HOS  5                       /* HOST command */
2015 #define EN_KER  6                       /* KERMIT command */
2016 #define EN_LOG  7                       /* LOGIN */
2017 #define EN_SEN  8                       /* SEND */
2018 #define EN_SET  9                       /* SET */
2019 #define EN_SPA 10                       /* SPACE */
2020 #define EN_TYP 11                       /* TYPE */
2021 #define EN_WHO 12                       /* WHO, finger */
2022 #define EN_DEL 13                       /* Delete */
2023 #define EN_BYE 14                       /* BYE (as opposed to FINISH) */
2024 #define EN_QUE 15                       /* QUERY */
2025 #define EN_ASG 16                       /* ASSIGN */
2026 #define EN_CPY 17                       /* COPY */
2027 #define EN_REN 18                       /* RENAME */
2028 #define EN_RET 19                       /* RETRIEVE */
2029 #define EN_MAI 20                       /* MAIL */
2030 #define EN_PRI 21                       /* PRINT */
2031 #define EN_MKD 22                       /* MKDIR */
2032 #define EN_RMD 23                       /* RMDIR */
2033 #define EN_XIT 24                       /* EXIT */
2034 #define EN_ENA 25                       /* ENABLE */
2035 #endif /* NOICP */
2036
2037 #ifndef NOICP
2038 /* CLEAR command symbols */
2039 #define CLR_DEV    1                    /* Clear Device Buffers */
2040 #define CLR_INP    2                    /* Clear Input Buffers */
2041 #define CLR_BTH    CLR_DEV|CLR_INP      /* Clear Device and Input */
2042 #define CLR_SCL    4                    /* Clear Scrollback buffer */
2043 #define CLR_CMD    8                    /* Clear Command Screen */
2044 #define CLR_TRM   16                    /* Clear Terminal Screen */
2045 #define CLR_DIA   32                    /* Clear Dial Status */
2046 #define CLR_SFL   64                    /* Clear Send-File-List */
2047 #define CLR_APC  128                    /* Clear APC */
2048 #define CLR_ALR  256                    /* Clear Alarm */
2049 #define CLR_TXT  512                    /* Clear text-patterns */
2050 #define CLR_BIN 1024                    /* Clear binary-patterns */
2051 #define CLR_SCR 2048                    /* Clear screen */
2052 #define CLR_KBD 4096                    /* Clear keyboard buffer */
2053 #endif /* NOICP */
2054
2055 /* Symbols for logs */
2056
2057 #define LOGD 0                          /* Debugging */
2058 #define LOGP 1                          /* Packets */
2059 #define LOGS 2                          /* Session */
2060 #define LOGT 3                          /* Transaction */
2061 #define LOGX 4                          /* Screen */
2062 #define LOGR 5                          /* The "open read" file */
2063 #define LOGW 6                          /* The "open write/append" file */
2064 #define LOGE 7                          /* Error (e.g. stderr) */
2065 #define LOGM 8                          /* The dialing log */
2066
2067 #ifndef NOSPL
2068 /* Symbols for builtin variables */
2069
2070 #define VN_ARGC 0                       /* ARGC */
2071 #define VN_COUN 1                       /* COUNT */
2072 #define VN_DATE 2                       /* DATE */
2073 #define VN_DIRE 3                       /* DIRECTORY */
2074 #define VN_ERRO 4                       /* ERRORLEVEL */
2075 #define VN_TIME 5                       /* TIME */
2076 #define VN_VERS 6                       /* VERSION */
2077 #define VN_IBUF 7                       /* INPUT buffer */
2078 #define VN_SUCC 8                       /* SUCCESS flag */
2079 #define VN_LINE 9                       /* LINE */
2080 #define VN_ARGS 10                      /* Program command-line arg count */
2081 #define VN_SYST 11                      /* System type */
2082 #define VN_SYSV 12                      /* System version */
2083 #define VN_RET  13                      /* RETURN value */
2084 #define VN_FILE 14                      /* Most recent filespec */
2085 #define VN_NDAT 15                      /* Numeric date yyyy/mm/dd */
2086 #define VN_HOME 16                      /* Home directory */
2087 #define VN_SPEE 17                      /* Transmission speed */
2088 #define VN_HOST 18                      /* Host name */
2089 #define VN_TTYF 19                      /* TTY file descriptor (UNIX only) */
2090 #define VN_PROG 20                      /* Program name */
2091 #define VN_NTIM 21                      /* NTIME */
2092 #define VN_FFC  22                      /* Characters in last file xferred */
2093 #define VN_TFC  23                      /* Chars in last file group xferred */
2094 #define VN_CPU  24                      /* CPU type */
2095 #define VN_CMDL 25                      /* Command level */
2096 #define VN_DAY  26                      /* Day of week, string */
2097 #define VN_NDAY 27                      /* Day of week, numeric */
2098 #define VN_LCL  28                      /* Local (vs) remote mode */
2099 #define VN_CMDS 29                      /* Command source */
2100 #define VN_CMDF 30                      /* Command file name */
2101 #define VN_MAC  31                      /* Macro name */
2102 #define VN_EXIT 32                      /* Exit status */
2103 #define VN_ICHR 33                      /* INPUT character */
2104 #define VN_ICNT 34                      /* INPUT count */
2105 #define VN_PRTY 35                      /* Current parity */
2106 #define VN_DIAL 36                      /* DIAL status */
2107 #define VN_KEYB 37                      /* Keyboard type */
2108 #define VN_CPS  38                      /* Chars per second, last transfer */
2109 #define VN_RPL  39                      /* Receive packet length */
2110 #define VN_SPL  40                      /* Send packet length */
2111 #define VN_MODE 41                      /* Transfer mode (text, binary) */
2112 #define VN_REXX 42                      /* Rexx return value */
2113 #define VN_NEWL 43                      /* Newline character or sequence */
2114 #define VN_COLS 44                      /* Columns on console screen */
2115 #define VN_ROWS 45                      /* Rows on console screen */
2116 #define VN_TTYP 46                      /* Terminal type */
2117 #define VN_MINP 47                      /* MINPUT result */
2118 #define VN_CONN 48                      /* Connection type */
2119 #define VN_SYSI 49                      /* System ID */
2120 #define VN_TZ   50                      /* Timezone */
2121 #define VN_SPA  51                      /* Space */
2122 #define VN_QUE  52                      /* Query */
2123 #define VN_STAR 53                      /* Startup directory */
2124 #define VN_CSET 54                      /* Local character set */
2125 #define VN_MDM  55                      /* Modem type */
2126 #define VN_EVAL 56                      /* Most recent EVALUATE result */
2127
2128 #define VN_D_CC 57                      /* DIAL COUNTRY-CODE */
2129 #define VN_D_AC 58                      /* DIAL AREA-CODE */
2130 #define VN_D_IP 59                      /* DIAL INTERNATIONAL-PREFIX */
2131 #define VN_D_LP 60                      /* DIAL LD-PREFIX */
2132
2133 #define VN_UID  61
2134 #define VN_PWD  62
2135 #define VN_PRM  63
2136
2137 #define VN_PROTO 64                     /* Protocol */
2138 #define VN_DLDIR 65                     /* Download directory */
2139
2140 #define VN_M_AAA 66                     /* First MODEM one */
2141 #define VN_M_INI 66                     /* Modem init string */
2142 #define VN_M_DCM 67                     /* Modem dial command */
2143 #define VN_M_DCO 68                     /* Modem data compression on */
2144 #define VN_M_DCX 69                     /* Modem data compression off */
2145 #define VN_M_ECO 70                     /* Modem error correction on */
2146 #define VN_M_ECX 71                     /* Modem error correction off */
2147 #define VN_M_AAO 72                     /* Modem autoanswer on */
2148 #define VN_M_AAX 73                     /* Modem autoanswer off */
2149 #define VN_M_HUP 74                     /* Modem hangup command */
2150 #define VN_M_HWF 75                     /* Modem hardware flow command */
2151 #define VN_M_SWF 76                     /* Modem software flow command */
2152 #define VN_M_NFC 77                     /* Modem no flow-control command */
2153 #define VN_M_PDM 78                     /* Modem pulse dialing mode */
2154 #define VN_M_TDM 79                     /* Modem tone dialing mode */
2155 #define VN_M_ZZZ 79                     /* Last MODEM one */
2156
2157 #define VN_SELCT 80                     /* Selected Text from Mark Mode */
2158 #define VN_TEMP  81                     /* Temporary directory */
2159 #define VN_ISTAT 82                     /* INPUT command status */
2160 #define VN_INI   83                     /* INI (kermrc) directory */
2161 #define VN_EXEDIR 84                    /* EXE directory */
2162 #define VN_ERRNO  85                    /* Value of errno */
2163 #define VN_ERSTR  86                    /* Corresponding error message */
2164 #define VN_TFLN   87                    /* TAKE file line number */
2165 #define VN_XVNUM  88                    /* Product-specific version number */
2166 #define VN_RPSIZ  89                    /* Receive packet length */
2167 #define VN_WINDO  90                    /* Window size */
2168 #define VN_MDMSG  91                    /* Modem message */
2169 #define VN_DNUM   92                    /* Dial number */
2170 #define VN_APC    93                    /* APC active */
2171 #define VN_IPADDR 94                    /* My IP address */
2172 #define VN_CRC16  95                    /* CRC-16 of most recent file group */
2173 #define VN_TRMK   96                    /* Macro executed from Terminal Mode */
2174 #define VN_PID    97                    /* Process ID */
2175 #define VN_FNAM   98                    /* Name of file being transferred */
2176 #define VN_FNUM   99                    /* Number of file being transferred */
2177 #define VN_PEXIT  100                   /* Process exit status */
2178 #define VN_P_CTL  101                   /* Control Prefix */
2179 #define VN_P_8BIT 102                   /* 8-bit prefix */
2180 #define VN_P_RPT  103                   /* Repeat count prefix */
2181 #define VN_D_LCP  104                   /* DIAL LOCAL-PREFIX */
2182 #define VN_URL    105                   /* Last URL selected */
2183 #define VN_REGN   106                   /* Registration Name */
2184 #define VN_REGO   107                   /* Registration Organization */
2185 #define VN_REGS   108                   /* Registration Serial number */
2186 #define VN_XPROG  109                   /* xprogram (like xversion) */
2187 #define VN_EDITOR 110                   /* Editor */
2188 #define VN_EDOPT  111                   /* Editor options */
2189 #define VN_EDFILE 112                   /* Editor file */
2190 #define VN_BROWSR 113                   /* Browser */
2191 #define VN_BROPT  114                   /* Browser options */
2192 #define VN_HERALD 115                   /* Program herald */
2193 #define VN_TEST   116                   /* Program test level or "0" */
2194 #define VN_XFSTAT 117                   /* File-Transfer status */
2195 #define VN_XFMSG  119                   /* File-Transfer message */
2196 #define VN_SNDL   120                   /* Send-list status */
2197 #define VN_TRIG   121                   /* Trigger value */
2198 #define VN_MOU_X  122                   /* OS/2 Mouse Cursor X */
2199 #define VN_MOU_Y  123                   /* OS/2 Mouse Cursor Y */
2200 #define VN_PRINT  124                   /* Printer */
2201 #define VN_ESC    125                   /* Escape character */
2202 #define VN_INTIME 126                   /* INPUT elapsed time */
2203 #define VN_K4RLM  127                   /* Kerberos 4 Realm */
2204 #define VN_K5RLM  128                   /* Kerberos 5 Realm */
2205 #define VN_K4PRN  129                   /* Kerberos 4 Principal */
2206 #define VN_K5PRN  130                   /* Kerberos 5 Principal */
2207 #define VN_K4CC   131                   /* Kerberos 4 Credentials Cache */
2208 #define VN_K5CC   132                   /* Kerberos 5 Credentials Cache */
2209 #define VN_OSNAM  133                   /* OS name */
2210 #define VN_OSVER  134                   /* OS version */
2211 #define VN_OSREL  135                   /* OS release */
2212 #define VN_NAME   136                   /* Name I was called by */
2213 #define VN_MODL   137                   /* CPU model */
2214 #define VN_X25LA  138                   /* X.25 local address */
2215 #define VN_X25RA  139                   /* X.25 remote address */
2216 #define VN_K4SRV  140                   /* Kerberos 4 Service Name */
2217 #define VN_K5SRV  141                   /* Kerberos 5 Service Name */
2218 #define VN_PDSFX  142                   /* PDIAL suffix */
2219 #define VN_DTYPE  143                   /* DIAL type */
2220 #define VN_LCKPID 144                   /* Lockfile PID (UNIX) */
2221 #define VN_BLK    145                   /* Block check */
2222 #define VN_TFTIM  146                   /* File transfer elapsed time */
2223 #define VN_D_PXX  147                   /* DIAL PBX-EXCHANGE */
2224 #define VN_HWPAR  148                   /* Hardware Parity */
2225 #define VN_SERIAL 149                   /* SET SERIAL value */
2226 #define VN_LCKDIR 150                   /* Lockfile directory (UNIX) */
2227
2228 #define VN_K4ENO  151                   /* Kerberos 4 Last Errno */
2229 #define VN_K4EMSG 152                   /* Kerberos 4 Last Err Msg */
2230 #define VN_K5ENO  153                   /* Kerberos 5 Last Errno */
2231 #define VN_K5EMSG 154                   /* Kerberos 5 Last Err Msg */
2232
2233 #define VN_INTMO  155                   /* Input timeout */
2234 #define VN_AUTHS  156                   /* Authentication State */
2235
2236 #define VN_DM_LP  157                   /* Dial Modifier: Long Pause */
2237 #define VN_DM_SP  158                   /* Dial Modifier: Short Pause */
2238 #define VN_DM_PD  159                   /* Dial Modifier: Pulse Dial */
2239 #define VN_DM_TD  160                   /* Dial Modifier: Tone Dial */
2240 #define VN_DM_WA  161                   /* Dial Modifier: Wait for Answer */
2241 #define VN_DM_WD  162                   /* Dial Modifier: Wait for Dialtone */
2242 #define VN_DM_RC  163                   /* Dial Modifier: Return to Command */
2243
2244 /* (more below...) */
2245
2246 #define VN_TY_LN  164                   /* TYPE command line number */
2247 #define VN_TY_LC  165                   /* TYPE command line count */
2248 #define VN_TY_LM  166                   /* TYPE command match count */
2249
2250 #define VN_MACLVL 167                   /* \v(maclevel) */
2251
2252 #define VN_XF_BC  168                   /* Transfer blockcheck errors */
2253 #define VN_XF_TM  169                   /* Transfer timeouts */
2254 #define VN_XF_RX  170                   /* Transfer retransmissions */
2255
2256 #define VN_M_NAM  171                   /* Modem full name  */
2257 #define VN_MS_CD  172                   /* Modem signal CD  */
2258 #define VN_MS_CTS 173                   /* Modem signal CTS */
2259 #define VN_MS_DSR 174                   /* Modem signal DSR */
2260 #define VN_MS_DTR 175                   /* Modem signal DTR */
2261 #define VN_MS_RI  176                   /* Modem signal RI  */
2262 #define VN_MS_RTS 177                   /* Modem signal RTS */
2263
2264 #define VN_MATCH  178                   /* Most recent pattern match */
2265 #define VN_SLMSG  179                   /* SET LINE (error) message */
2266 #define VN_TXTDIR 180                   /* Kermit text-file directory */
2267 #define VN_MA_PI  181                   /* Math constant Pi */
2268 #define VN_MA_E   182                   /* Math constant e */
2269 #define VN_MA_PR  183                   /* Math precision (digits) */
2270 #define VN_CMDBL  184                   /* Command buffer length */
2271
2272 #define VN_AUTHT  185                   /* Authentication Type */
2273
2274 #ifdef CKCHANNELIO
2275 #define VN_FERR   186                   /* FILE error */
2276 #define VN_FMAX   187                   /* FILE max */
2277 #define VN_FCOU   188                   /* Result of last FILE COUNT */
2278 #endif /* CKCHANNELIO */
2279
2280 #define VN_DRTR   189                   /* DIAL retry counter */
2281 #define VN_CXTIME 190                   /* Elapsed time in session */
2282 #define VN_BYTE   191                   /* Byte order */
2283 #define VN_AUTHN  192                   /* Authentication Name */
2284 #define VN_KBCHAR 193                   /* kbchar */
2285 #define VN_TTYNAM 194                   /* Name of controlling terminal */
2286
2287 #define VN_X509_S 195                   /* X.509 Certificate Subject */
2288 #define VN_X509_I 196                   /* X.509 Certificate Issuer  */
2289
2290 #define VN_PROMPT 197                   /* C-Kermit's prompt */
2291 #define VN_BUILD  198                   /* Build ID string */
2292
2293 #define VN_SEXP   199                   /* Last S-Expression */
2294 #define VN_VSEXP  200                   /* Value of last S-Expression */
2295 #define VN_LSEXP  201                   /* SEXP depth */
2296
2297 #define VN_FTIME  202                   /* Time as floating-poing number */
2298
2299 #define VN_FTP_C  203                   /* FTP Reply Code */
2300 #define VN_FTP_M  204                   /* FTP Reply Message */
2301 #define VN_FTP_S  205                   /* FTP Server type */
2302 #define VN_FTP_H  206                   /* FTP Host */
2303 #define VN_FTP_X  207                   /* FTP Connected */
2304 #define VN_FTP_L  208                   /* FTP Logged in */
2305 #define VN_FTP_G  209                   /* FTP GET-PUT-REMOTE setting */
2306
2307 #define VN_SECURE 210                   /* Encrypted connection 0 or 1 */
2308
2309 #define VN_DM_HF  211                   /* Dial Modifier: Hook Flash */
2310 #define VN_DM_WB  212                   /* Dial Modifier: Wait for Bong */
2311 #define VN_CX_STA 213                   /* CX_STATUS */
2312
2313 #define VN_FTP_B  214                   /* FTP CPL */
2314 #define VN_FTP_D  215                   /* FTP DPL */
2315 #define VN_FTP_Z  216                   /* FTP SECURITY */
2316 #define VN_HTTP_C 217                   /* HTTP Code */
2317 #define VN_HTTP_N 218                   /* HTTP Connected */
2318 #define VN_HTTP_H 219                   /* HTTP Host */
2319 #define VN_HTTP_M 220                   /* HTTP Message */
2320 #define VN_HTTP_S 221                   /* HTTP Security */
2321
2322 #define VN_NOW    222                   /* Timestamp yyyymmdd hh:mm:ss */
2323 #define VN_HOUR   223                   /* Current hour of the day 0-23 */
2324
2325 #define VN_CI_DA  224                   /* Caller ID date */
2326 #define VN_CI_TI  225                   /* Caller ID time */
2327 #define VN_CI_NA  226                   /* Caller ID name */
2328 #define VN_CI_NU  227                   /* Caller ID number */
2329 #define VN_CI_ME  228                   /* Caller ID message */
2330 #define VN_PERSONAL 229                 /* Personal Directory on Windows */
2331 #define VN_APPDATA  230                 /* User AppData directory */
2332 #define VN_COMMON   231                 /* Common AppData directory */
2333 #define VN_DESKTOP  232                 /* User Desktop directory */
2334 #define VN_TNC_SIG  233                 /* RFC 2717 Signature */
2335
2336 #ifdef KUI
2337 #define VN_GUI_XP   234                 /* GUI Window X position */
2338 #define VN_GUI_YP   235                 /* GUI Window Y position */
2339 #define VN_GUI_XR   236                 /* GUI Window X resolution */
2340 #define VN_GUI_YR   237                 /* GUI Window Y resolution */
2341 #define VN_GUI_RUN  238                 /* GUI Window Run mode */
2342 #define VN_GUI_FNM  239                 /* GUI Window Font Name */
2343 #define VN_GUI_FSZ  240                 /* GUI Window Font Size */
2344 #endif /* KUI */
2345
2346 #define VN_LOG_PKT  241                 /* Packet Log Filename */
2347 #define VN_LOG_TRA  242                 /* Transaction Log Filename */
2348 #define VN_LOG_SES  243                 /* Session Log Filename */
2349 #define VN_LOG_DEB  244                 /* Debug Log Filename */
2350 #define VN_LOG_CON  245                 /* Connection Log Filename */
2351
2352 #define VN_ISCALE   246                 /* INPUT scale factor */
2353 #endif /* NOSPL */
2354
2355 /* INPUT status values */
2356
2357 #define INP_OK  0                       /* Succeeded */
2358 #define INP_TO  1                       /* Timed out */
2359 #define INP_UI  2                       /* User interrupted */
2360 #define INP_IE  3                       /* Internal error */
2361 #define INP_IO  4                       /* I/O error or connection lost */
2362 #define INP_IKS 5                       /* Kermit Server Active */
2363
2364 #ifndef NOSPL
2365 /* Symbols for builtin functions */
2366
2367 #define FNARGS 6                        /* Maximum number of function args */
2368
2369 #define FN_IND      0                   /* Index (of string 1 in string 2) */
2370 #define FN_LEN      1                   /* Length (of string) */
2371 #define FN_LIT      2                   /* Literal (don't expand the string) */
2372 #define FN_LOW      3                   /* Lower (convert to lowercase) */
2373 #define FN_MAX      4                   /* Max (maximum) */
2374 #define FN_MIN      5                   /* Min (minimum) */
2375 #define FN_MOD      6                   /* Mod (modulus) */
2376 #define FN_EVA      7                   /* Eval (evaluate arith expression) */
2377 #define FN_SUB      8                   /* Substr (substring) */
2378 #define FN_UPP      9                   /* Upper (convert to uppercase) */
2379 #define FN_REV      10                  /* Reverse (a string) */
2380 #define FN_REP      11                  /* Repeat (a string) */
2381 #define FN_EXE      12                  /* Execute (a macro) */
2382 #define FN_VAL      13                  /* Return value (of a macro) */
2383 #define FN_LPA      14                  /* LPAD (left pad) */
2384 #define FN_RPA      15                  /* RPAD (right pad) */
2385 #define FN_DEF      16                  /* Definition of a macro, unexpanded */
2386 #define FN_CON      17                  /* Contents of a variable, ditto */
2387 #define FN_FIL      18                  /* File list */
2388 #define FN_FC       19                  /* File count */
2389 #define FN_CHR      20                  /* Character (like BASIC CHR$()) */
2390 #define FN_RIG      21                  /* Right (like BASIC RIGHT$()) */
2391 #define FN_COD      22                  /* Code value of character */
2392 #define FN_RPL      23                  /* Replace */
2393 #define FN_FD       24                  /* File date */
2394 #define FN_FS       25                  /* File size */
2395 #define FN_RIX      26                  /* Rindex (index from right) */
2396 #define FN_VER      27                  /* Verify */
2397 #define FN_IPA      28                  /* Find and return IP address */
2398 #define FN_CRY      39                  /* ... */
2399 #define FN_OOX      40                  /* ... */
2400 #define FN_HEX      41                  /* Hexify */
2401 #define FN_UNH      42                  /* Unhexify */
2402 #define FN_BRK      43                  /* Break */
2403 #define FN_SPN      44                  /* Span */
2404 #define FN_TRM      45                  /* Trim */
2405 #define FN_LTR      46                  /* Left-Trim */
2406 #define FN_CAP      47                  /* Capitalize */
2407 #define FN_TOD      48                  /* Time-of-day-to-secs-since-midnite */
2408 #define FN_SEC      49                  /* Secs-since-midnite-to-time-of-day */
2409 #define FN_FFN      50                  /* Full file name */
2410 #define FN_CHK      51                  /* Checksum of text */
2411 #define FN_CRC      52                  /* CRC-16 of text */
2412 #define FN_BSN      53                  /* Basename of file */
2413 #define FN_CMD      54                  /* Output of a command (cooked) */
2414 #define FN_RAW      55                  /* Output of a command (raw) */
2415 #define FN_STX      56                  /* Strip from right */
2416 #define FN_STL      57                  /* Strip from left */
2417 #define FN_STN      58                  /* Strip n chars */
2418 #define FN_SCRN_CX  59                  /* Screen Cursor X Pos */
2419 #define FN_SCRN_CY  60                  /* Screen Cursor Y Pos */
2420 #define FN_SCRN_STR 61                  /* Screen String */
2421 #define FN_2HEX     62                  /* Number (not string) to hex */
2422 #define FN_2OCT     63                  /* Number (not string) to octal */
2423 #define FN_RFIL     64                  /* Recursive file list */
2424 #define FN_DIR      65                  /* Directory list */
2425 #define FN_RDIR     66                  /* Recursive directory list */
2426 #define FN_DNAM     67                  /* Directory part of filename */
2427 #define FN_RAND     68                  /* Random number */
2428 #define FN_WORD     69                  /* Word extraction */
2429 #define FN_SPLIT    70                  /* Split string into words */
2430 #define FN_KRB_TK   71                  /* Kerberos tickets */
2431 #define FN_KRB_NX   72                  /* Kerberos next ticket */
2432 #define FN_KRB_IV   73                  /* Kerberos ticket is valid */
2433 #define FN_KRB_TT   74                  /* Kerberos ticket time */
2434 #define FN_ERRMSG   75                  /* Error code to message */
2435
2436 #ifndef UNIX
2437 #ifndef VMS
2438 #undef FN_ERRMSG
2439 #endif /* VMS */
2440 #endif /* UNIX */
2441
2442 #define FN_DIM      76                  /* Dimension of array */
2443 #define FN_DTIM     77                  /* Convert to standard date/time */
2444 #define FN_JDATE    78                  /* Regular date to day of year */
2445 #define FN_PNCVT    79                  /* Convert phone number for dialing */
2446 #define FN_DATEJ    80                  /* Day of year to date */
2447 #define FN_MJD      81                  /* Date to modified Julian date */
2448 #define FN_MJD2     82                  /* Modified Julian date to date */
2449 #define FN_DAY      83                  /* Day of week of given date */
2450 #define FN_NDAY     84                  /* Numeric day of week of given date */
2451 #define FN_TIME     85                  /* Convert to hh:mm:ss */
2452 #define FN_NTIM     86                  /* Convert to seconds since midnite */
2453 #define FN_N2TIM    87                  /* Sec since midnite to hh:mm:ss */
2454 #define FN_PERM     88                  /* Permissions of file */
2455 #define FN_KRB_FG   89                  /* Kerberos Ticket Flags */
2456 #define FN_SEARCH   90                  /* Search for pattern in string */
2457 #define FN_RSEARCH  91                  /* Ditto, but right to left */
2458 #define FN_XLATE    92                  /* Translate string charset */
2459 #define FN_ALOOK    93                  /* Array lookup */
2460 #define FN_TLOOK    94                  /* Table lookup */
2461 #define FN_TOB64    95                  /* Encode into Base64 */
2462 #define FN_FMB64    96                  /* Decode from Base64 */
2463
2464 #define FN_ABS      97                  /* Absolute value */
2465
2466 #ifdef CKFLOAT
2467 #define FN_FPADD    98                  /* Floating-point add */
2468 #define FN_FPSUB    99                  /* Floating-point substract */
2469 #define FN_FPMUL   100                  /* Floating-point multiply */
2470 #define FN_FPDIV   101                  /* Floating-point divide */
2471 #define FN_FPEXP   102                  /* Floating-point e to the x */
2472 #define FN_FPLN    103                  /* Floating-point natural log */
2473 #define FN_FPLOG   104                  /* Floating-point base-10 log */
2474 #define FN_FPPOW   105                  /* Floating-point raise to power */
2475 #define FN_FPSQR   106                  /* Floating-point square root */
2476 #define FN_FPABS   107                  /* Floating-point absolute value */
2477 #define FN_FPMOD   108                  /* Floating-point modulus */
2478 #define FN_FPMAX   109                  /* Floating-point maximum */
2479 #define FN_FPMIN   110                  /* Floating-point minimum*/
2480 #define FN_FPINT   111                  /* Floating-point to integer */
2481 #define FN_FPROU   112                  /* Floating-point round */
2482 #define FN_FPSIN   113                  /* FP sine */
2483 #define FN_FPCOS   114                  /* FP cosine */
2484 #define FN_FPTAN   115                  /* FP tangent */
2485 #endif /* CKFLOAT */
2486
2487 #ifdef CKCHANNELIO
2488 #define FN_FSTAT   116                  /* File status */
2489 #define FN_FPOS    117                  /* File position */
2490 #define FN_FEOF    118                  /* File eof */
2491 #define FN_FILNO   119                  /* File number / handle */
2492 #define FN_FGCHAR  120                  /* File getchar */
2493 #define FN_FGLINE  121                  /* File getline */
2494 #define FN_FGBLK   122                  /* File getblock */
2495 #define FN_FPCHAR  123                  /* File putchar */
2496 #define FN_FPLINE  124                  /* File putline */
2497 #define FN_FPBLK   125                  /* File putblock */
2498 #define FN_NLINE   126                  /* File get current line number */
2499 #define FN_FERMSG  127                  /* File error message */
2500 #endif /* CKCHANNELIO */
2501
2502 #define FN_LEF     128                  /* Left (= substr starting on left) */
2503 #define FN_AADUMP  129                  /* Associative Array Dump */
2504 #define FN_STB     130                  /* \fstripb()  */
2505 #define FN_PATTERN 131                  /* \fpattern() */
2506 #define FN_HEX2N   132                  /* \fhexton()  */
2507 #define FN_OCT2N   133                  /* \foctton()  */
2508 #define FN_HEX2IP  134                  /* \fhextoip() */
2509 #define FN_IP2HEX  135                  /* \fiptohex() */
2510 #define FN_RADIX   136                  /* \fradix()   */
2511 #define FN_JOIN    137                  /* \fjoin()    */
2512 #define FN_SUBST   138                  /* \fsubstitute() */
2513 #define FN_SEXP    139                  /* \fsexpression() */
2514 #define FN_CMDSTK  140                  /* \fcmdstack() */
2515 #define FN_TOGMT   141                  /* \ftogmt() */
2516 #define FN_CMPDATE 142                  /* \fcmpdates() */
2517 #define FN_DIFDATE 143                  /* \fdiffdates() */
2518 #ifdef TCPSOCKET
2519 #define FN_HSTADD  144                  /* \faddr2name() */
2520 #define FN_HSTNAM  145                  /* \fname2addr() */
2521 #endif /* TCPSOCKET */
2522 #define FN_DELSEC  146                  /* \fdelta2sec() */
2523 #define FN_PC_DU   147                  /* Path conversion DOS to Unix */
2524 #define FN_PC_VU   148                  /* Path conversion VMS to Unix */
2525 #define FN_PC_UD   149                  /* Path conversion Unix to DOS */
2526 #define FN_PC_UV   150                  /* Path conversion Unix to VMS */
2527 #define FN_KWVAL   151                  /* \fkeywordvalue() */
2528 #define FN_SLEEP   152                  /* \fsleep() */
2529 #define FN_MSLEEP  153                  /* \fmsleep() */
2530 #define FN_LNAME   154                  /* \fLongPathName() (Windows) */
2531 #define FN_SNAME   155                  /* \fShortPathName() (Windows) */
2532 #define FN_UNTAB   156                  /* \funtabify() */
2533
2534 #endif /* NOSPL */
2535
2536 /* Time Units */
2537
2538 #define TU_DAYS   0
2539 #define TU_WEEKS  1
2540 #define TU_MONTHS 2
2541 #define TU_YEARS  3
2542
2543 #ifdef CK_CURSES
2544 /* Screen line numbers for fullscreen file-transfer display */
2545
2546 #define CW_BAN  0                       /* Curses Window Banner */
2547 #define CW_DIR  2                       /* Current directory */
2548 #define CW_LIN  3                       /* Communication device */
2549 #define CW_SPD  4                       /* Communication speed */
2550 #define CW_PAR  5                       /* Parity */
2551 #define CW_TMO  6
2552 #define CW_NAM  7                       /* Filename */
2553 #define CW_TYP  8                       /* File type */
2554 #define CW_SIZ  9                       /* File size */
2555 #define CW_PCD 10                       /* Percent done */
2556
2557 #ifndef CK_PCT_BAR
2558 #define CW_TR  11                       /* Time remaining */
2559 #define CW_CP  12                       /* Characters per second */
2560 #define CW_WS  13                       /* Window slots */
2561 #define CW_PT  14                       /* Packet type */
2562 #define CW_PC  15                       /* Packet count */
2563 #define CW_PL  16                       /* Packet length */
2564 #define CW_PR  17                       /* Packet retry */
2565 #ifdef COMMENT
2566 #define CW_PB  17                       /* Packet block check */
2567 #endif /* COMMENT */
2568 #else /* CK_PCT_BAR */
2569 #define CW_BAR 11                       /* Percent Bar Scale */
2570 #define CW_TR  12                       /* Time remaining */
2571 #define CW_CP  13                       /* Chars per sec */
2572 #define CW_WS  14                       /* Window slots */
2573 #define CW_PT  15                       /* Packet type */
2574 #define CW_PC  16                       /* Packet count */
2575 #define CW_PL  17                       /* Packet length */
2576 #define CW_PR  18                       /* Packet retry */
2577 #ifdef COMMENT
2578 #define CW_PB  18                       /* Packet block check */
2579 #endif /* COMMENT */
2580 #endif /* CK_PCT_BAR */
2581
2582 #define CW_ERR 19                       /* Error message */
2583 #define CW_MSG 20                       /* Info message */
2584 #define CW_INT 22                       /* Instructions */
2585 #define CW_FFC 99                       /* File Characters Sent/Received */
2586 #endif /* CK_CURSES */
2587
2588 #ifndef NOICP
2589 /* Save Commands */
2590 #define XSKEY   0                       /* Key map file */
2591 #define XSCMD   1                       /* Command mode */
2592 #define XSTERM  2                       /* Terminal mode */
2593 #endif /* NOICP */
2594
2595 #ifndef NODIAL
2596 /* Dial routine sort priorities */
2597 #define DN_INTERN 0
2598 #define DN_FREE   1
2599 #define DN_LOCAL  2
2600 #define DN_UNK    3
2601 #define DN_LONG   4
2602 #define DN_INTL   5
2603 #endif /* NODIAL */
2604
2605 #ifdef SSHBUILTIN
2606 #define XSSH_OPN 1
2607 #define XSSH_V2  2
2608 #define XSSH_FLP 3
2609 #define XSSH_FRP 4
2610 #define XSSH_ADD 5
2611 #define XSSH_KEY 6
2612 #define XSSH_CLR 7
2613 #define XSSH_AGT 8
2614
2615 #define SSHKT_1R   0                    /* SSH KEY TYPE symbols */
2616 #define SSHKT_2R   1                    /* must match ssh/key.h values */
2617 #define SSHKT_2D   2
2618 #define SSHKT_SRP  3
2619
2620 #define SSHKD_IN   1                    /* SSH KEY DISPLAY /IN-FORMAT */
2621 #define SSHKD_OUT  2                    /* SSH KEY DISPLAY /OUT-FORMAT */
2622
2623 #define SKDF_OSSH  1                    /* Key display format OpenSSH */
2624 #define SKDF_SSHC  2                    /* Key display format SSH.COM */
2625 #define SKDF_IETF  3                    /* Key display format IETF */
2626 #define SKDF_FING  4                    /* Key display format FINGERPRINT */
2627
2628 #define SSHSW_USR 1
2629 #define SSHSW_VER 2
2630 #define SSHSW_CMD 3
2631 #define SSHSW_X11 4
2632 #define SSHSW_PWD 5
2633 #define SSHSW_SUB 6
2634
2635 #define SSHC_LPF 1
2636 #define SSHC_RPF 2
2637
2638 #define XSSH2_RKE 1
2639
2640 #define SSHF_LCL   1
2641 #define SSHF_RMT   2
2642
2643 #define SSHA_ADD   1
2644 #define SSHA_DEL   2
2645 #define SSHA_LST   3
2646
2647 #define SSHASW_FP 1
2648
2649 #define SSHK_PASS  1
2650 #define SSHK_CREA  2
2651 #define SSHK_DISP  3
2652 #define SSHK_V1    4
2653
2654 #define SSHKC_BI  1
2655 #define SSHKC_PP  2
2656 #define SSHKC_TY  3
2657 #define SSHKC_1R  4
2658
2659 #define SKRM_OPN  1
2660 #endif /* SSHBUILTIN */
2661
2662 #ifdef SFTP_BUILTIN
2663 #define SFTP_OPN    1
2664 #define SFTP_CD     2
2665 #define SFTP_CHGRP  3
2666 #define SFTP_CHMOD  4
2667 #define SFTP_CHOWN  5
2668 #define SFTP_DIR    6
2669 #define SFTP_GET    7
2670 #define SFTP_MKDIR  8
2671 #define SFTP_PWD    9
2672 #define SFTP_PUT    10
2673 #define SFTP_REN    11
2674 #define SFTP_RM     12
2675 #define SFTP_RMDIR  13
2676 #define SFTP_LINK   14
2677 #define SFTP_VER    15
2678
2679 #define XY_SFTP_RCS 1
2680 #define XY_SFTP_EOL 2
2681 #endif /* SFTP_BUILTIN */
2682
2683 /* ANSI-C prototypes for user interface functions */
2684
2685 #ifndef NOICP
2686 _PROTOTYP( int matchname, ( char *, int, int ) );
2687 _PROTOTYP( int ck_cls, ( void ) );
2688 _PROTOTYP( int ck_cleol, ( void ) );
2689 _PROTOTYP( int ck_curpos, ( int, int ) );
2690 _PROTOTYP( int cmdsrc, ( void ) );
2691 _PROTOTYP( int parser, ( int ) );
2692 _PROTOTYP( int chkvar, (char *) );
2693 _PROTOTYP( int zzstring, (char *, char **, int *) );
2694 #ifndef NOFRILLS
2695 _PROTOTYP( int yystring, (char *, char **) );
2696 #endif /* NOFRILLS */
2697 _PROTOTYP( int getncm, (char *, int) );
2698 _PROTOTYP( int getnct, (char *, int, FILE *, int) );
2699 #endif /* NOICP */
2700 _PROTOTYP( VOID bgchk, (void) );
2701 _PROTOTYP( char * nvlook, (char *) );
2702 _PROTOTYP( int xarray, (char *) );
2703 _PROTOTYP( int arraynam, (char *, int *, int *) );
2704 _PROTOTYP( int arraybounds, (char *, int *, int *) );
2705 _PROTOTYP( int arrayitoa, (int) );
2706 _PROTOTYP( int arrayatoi, (int) );
2707 _PROTOTYP( char * bldlen, (char *, char *) );
2708 _PROTOTYP( int chkarray, (int, int) );
2709 _PROTOTYP( int dclarray, (char, int) );
2710 _PROTOTYP( int pusharray, (int, int) );
2711 _PROTOTYP( int parsevar, (char *, int *, int *) );
2712 _PROTOTYP( int macini, (void) );
2713 _PROTOTYP( VOID initmac, (void) );
2714 _PROTOTYP( int delmac, (char *, int) );
2715 _PROTOTYP( int addmac, (char *, char *) );
2716 _PROTOTYP( int domac, (char *, char *, int) );
2717 _PROTOTYP( int addmmac, (char *, char *[]) );
2718 _PROTOTYP( int dobug, (void) );
2719 _PROTOTYP( int docd, (int) );
2720 _PROTOTYP( int doclslog, (int) );
2721 _PROTOTYP( int docmd, (int) );
2722 _PROTOTYP( int dodir, (int) );
2723 _PROTOTYP( int dodo, (int, char *, int) );
2724 _PROTOTYP( int doenable, (int, int) );
2725 _PROTOTYP( int dogoto, (char *, int) );
2726 _PROTOTYP( int dogta, (int) );
2727 _PROTOTYP( int dohlp, (int) );
2728 _PROTOTYP( int dohrmt, (int) );
2729 _PROTOTYP( int doif, (int) );
2730 _PROTOTYP( int doinput, (int, char *[], int[], int) );
2731 _PROTOTYP( int doreinp, (int, char *, int) );
2732 _PROTOTYP( int dolog, (int) );
2733 _PROTOTYP( int dologin, (char *) );
2734 _PROTOTYP( int doopen, (void) );
2735 _PROTOTYP( int doprm, (int, int) );
2736 _PROTOTYP( int doreturn, (char *) );
2737 _PROTOTYP( int dormt, (int) );
2738 _PROTOTYP( int dosort, (void) );
2739 _PROTOTYP( int dostat, (int) );
2740 _PROTOTYP( int dostop, (void) );
2741 _PROTOTYP( int dotype, (char *, int, int, int, char *, int, char *, int, int,
2742                         char *, int));
2743 _PROTOTYP( int transmit, (char *, char, int, int, int) );
2744 _PROTOTYP( int xlate, (char *, char *, int, int) );
2745 _PROTOTYP( int litcmd, (char **, char **, int) );
2746 _PROTOTYP( int incvar, (char *, int, int) );
2747 _PROTOTYP( int ckdial, (char *, int, int, int, int) );
2748 _PROTOTYP( int hmsg, (char *) );
2749 _PROTOTYP( int hmsga, (char * []) );
2750 _PROTOTYP( int mlook, (struct mtab [], char *, int) );
2751 _PROTOTYP( int mxlook, (struct mtab [], char *, int) );
2752 _PROTOTYP( int mxxlook, (struct mtab [], char *, int) );
2753 _PROTOTYP( int prtopt, (int *, char *) );
2754 _PROTOTYP( CHAR rfilop, (char *, char) );
2755 _PROTOTYP( int setcc, (char *, int *) );
2756 _PROTOTYP( int setnum, (int *, int, int, int) );
2757 _PROTOTYP( int seton, (int *) );
2758 _PROTOTYP( int setonaut, (int *) );
2759 _PROTOTYP( VOID shmdmlin, (void) );
2760 _PROTOTYP( VOID initmdm, (int) );
2761 _PROTOTYP( char * showoff, (int) );
2762 _PROTOTYP( char * showooa, (int) );
2763 _PROTOTYP( char * showstring, (char *) );
2764 _PROTOTYP( int pktopn, (char *,int) );
2765 _PROTOTYP( int traopn, (char *,int) );
2766 _PROTOTYP( int sesopn, (char *,int) );
2767 _PROTOTYP( int debopn, (char *,int) );
2768 _PROTOTYP( int diaopn, (char *,int,int) );
2769 _PROTOTYP( int prepop, (void) );
2770 _PROTOTYP( int popclvl, (void) );
2771 _PROTOTYP( int varval, (char *, int *) );
2772 _PROTOTYP( char * evala, (char *) );
2773 _PROTOTYP( char * evalx, (char *) );
2774 _PROTOTYP( int setalarm, (long) );
2775 _PROTOTYP( int setat, (int) );
2776 _PROTOTYP( int setinp, (void) );
2777 _PROTOTYP( VOID dolognet, (void) );
2778 _PROTOTYP( VOID dologline, (void) );
2779 _PROTOTYP( int setlin, (int, int, int) );
2780 _PROTOTYP( int setmodem, (void) );
2781 _PROTOTYP( int setfil, (int) );
2782 _PROTOTYP( char * homepath, (void) );
2783 #ifdef OS2
2784 _PROTOTYP( int settapi, (void) ) ;
2785 #ifdef OS2MOUSE
2786 _PROTOTYP( int setmou, (void) );
2787 #endif /* OS2MOUSE */
2788 #endif /* OS2 */
2789 #ifdef LOCUS
2790 _PROTOTYP( VOID setlocus, (int,int) );
2791 _PROTOTYP( VOID setautolocus, (int) );
2792 #endif /* LOCUS */
2793 _PROTOTYP( int setbell, (void) );
2794 _PROTOTYP( VOID setcmask, (int));
2795 _PROTOTYP( VOID setautodl, (int,int));
2796 _PROTOTYP( VOID setdebses, (int));
2797 _PROTOTYP( VOID setseslog, (int));
2798 _PROTOTYP( VOID setaprint, (int));
2799 _PROTOTYP( int settrm, (void) );
2800 _PROTOTYP( int settrmtyp, (void) );
2801 _PROTOTYP( int setsr, (int, int) );
2802 _PROTOTYP( int setxmit, (void) );
2803 _PROTOTYP( int dosetkey, (void) );
2804 _PROTOTYP( int dochk, (void) );
2805 _PROTOTYP( int ludial, (char *, int) );
2806 _PROTOTYP( char * getdnum, (int) );
2807 _PROTOTYP( VOID getnetenv, (void) );
2808 _PROTOTYP( int getyesno, (char *, int) );
2809 _PROTOTYP( VOID xwords, (char *, int, char *[], int) );
2810 #ifdef OS2
2811 _PROTOTYP( VOID keynaminit, (void) );
2812 #endif /* OS2 */
2813 _PROTOTYP( int xlookup, (struct keytab[], char *, int, int *) );
2814 _PROTOTYP( char * rlookup, (struct keytab[], int, int) );
2815 _PROTOTYP( int hupok, (int) );
2816 _PROTOTYP( char * zzndate, (void) );
2817 _PROTOTYP( char * zjdate, (char *) );
2818 _PROTOTYP( char * jzdate, (char *) );
2819 _PROTOTYP( char * ckdate, (void) );
2820 _PROTOTYP( char * chk_ac, (int, char[]) );
2821 _PROTOTYP( char * gmdmtyp, (void) );
2822 _PROTOTYP( char * gfmode, (int, int) );
2823 _PROTOTYP( int setdest, (void) );
2824 _PROTOTYP( VOID ndinit, (void) );
2825 _PROTOTYP( int doswitch, (void) );
2826 _PROTOTYP( int dolocal, (void) );
2827 _PROTOTYP( long tod2sec, (char *) );
2828 _PROTOTYP( int lunet, (char *) );
2829 _PROTOTYP( int doxdis, (int) );
2830 _PROTOTYP( int dosave, (int) );
2831 _PROTOTYP( int doxsend, (int) );
2832 _PROTOTYP( int doxget, (int) );
2833 _PROTOTYP( int doxconn, (int) );
2834 _PROTOTYP( int clsconnx, (int) );
2835 _PROTOTYP( VOID ftreset, (void) );
2836 #ifdef CK_KERBEROS
2837 _PROTOTYP (int cp_auth, ( void ) );
2838 #endif /* CK_KERBEROS */
2839 _PROTOTYP( long mjd, (char *) );
2840 _PROTOTYP( char * mjd2date, (long) );
2841 _PROTOTYP( char * ckgetpid, (void) );
2842
2843 _PROTOTYP( int dogrep, (void) );
2844
2845 #ifndef NOFTP
2846 #ifndef SYSFTP
2847 _PROTOTYP( int doxftp, (void) );
2848 _PROTOTYP( int doftphlp, (void) );
2849 _PROTOTYP( int dosetftp, (void) );
2850 _PROTOTYP( int dosetftphlp, (void) );
2851 _PROTOTYP( int shoftp, (int) );
2852 #endif /* SYSFTP */
2853 #endif /* NOFTP */
2854
2855 _PROTOTYP( VOID cmhistory, (void) );
2856 _PROTOTYP( char * getdcset, (void) );
2857 _PROTOTYP( char * ttgtpn, (void) );
2858
2859 #ifndef NOSHOW
2860 _PROTOTYP( int doshow, (int) );
2861 _PROTOTYP( int shotcp, (int) );
2862 _PROTOTYP( VOID shopar, (void) );
2863 _PROTOTYP( VOID shofil, (void) );
2864 _PROTOTYP( VOID shoparp, (void) );
2865 _PROTOTYP( int shoatt, (void) );
2866 _PROTOTYP( VOID shover, (void) );
2867 _PROTOTYP( VOID shoctl, (void) );
2868 _PROTOTYP( VOID shodbl, (void) );
2869 #ifndef NOSPL
2870 _PROTOTYP( int shomac, (char *, char *) );
2871 _PROTOTYP( int doshift, (int) );
2872 #endif /* NOSPL */
2873 #ifndef NOCSETS
2874 _PROTOTYP( VOID shocharset, (void) );
2875 _PROTOTYP( VOID shoparl, (void) );
2876 _PROTOTYP( VOID shotcs, (int, int) );
2877 #endif /* NOCSETS */
2878 #ifndef NOLOCAL
2879 _PROTOTYP( VOID shoparc, (void) );
2880 _PROTOTYP( int shomodem, (void) );
2881 #ifndef NODIAL
2882 _PROTOTYP( VOID shods, (char *) );
2883 _PROTOTYP( VOID shodial, (void) );
2884 _PROTOTYP( int doshodial, (void) );
2885 #endif /* NODIAL */
2886 #ifndef NONET
2887 _PROTOTYP( int shonet, (void) );
2888 _PROTOTYP( int shotopt, (int) );
2889 _PROTOTYP( int shotel, (int) );
2890 #ifdef CK_AUTHENTICATION
2891 _PROTOTYP (int sho_auth,( int  ) );
2892 #endif /* CK_AUTHENTICATION */
2893 #endif /* NONET */
2894 _PROTOTYP( VOID shomdm, (void) );
2895 #endif /* NOLOCAL */
2896 #ifdef OS2
2897 _PROTOTYP( VOID shokeycode, (int,int) );
2898 #else
2899 _PROTOTYP( VOID shokeycode, (int) );
2900 #endif /* OS2 */
2901 _PROTOTYP( VOID showassoc, (void) );
2902 _PROTOTYP( VOID showdiropts, (void) );
2903 _PROTOTYP( VOID showdelopts, (void) );
2904 _PROTOTYP( VOID showtypopts, (void) );
2905 _PROTOTYP( VOID showpurgopts, (void) );
2906 _PROTOTYP( VOID shoflow, (void) );
2907 _PROTOTYP( VOID shoxfer, (void) );
2908 #ifdef ANYSSH
2909 _PROTOTYP( VOID shossh, (void) );
2910 #endif  /* ANYSSH */
2911 #endif /* NOSHOW */
2912
2913 _PROTOTYP( VOID shostrdef, (CHAR *) );
2914
2915 #ifndef NOSPL
2916 _PROTOTYP( int addlocal, (char *) );
2917 #endif /* NOSPL */
2918
2919 _PROTOTYP( int setdelopts, (void) );
2920
2921 #ifdef VMS
2922 _PROTOTYP( int cvtdir, (char *, char *, int) );
2923 #endif /* VMS */
2924
2925 #ifdef FNFLOAT
2926 _PROTOTYP( VOID initfloat, (void) );
2927 #endif /* FNFLOAT */
2928
2929 #ifdef CKCHANNELIO
2930 _PROTOTYP( int dofile, (int) );
2931 #endif /* CKCHANNELIO */
2932
2933 #ifdef CKROOT
2934 _PROTOTYP( int dochroot, (void) );
2935 #endif /* CKROOT */
2936
2937 #ifdef NEWFTP
2938 _PROTOTYP( int doftpusr,    (void) );
2939 _PROTOTYP( int doftpput,    (int,int) );
2940 _PROTOTYP( int doftpget,    (int,int) );
2941 _PROTOTYP( int doftprmt,    (int,int) );
2942 _PROTOTYP( int ftpopen,     (char *, char *, int) );
2943 _PROTOTYP( int cmdlinget,   (int) );
2944 _PROTOTYP( int cmdlinput,   (int) );
2945 _PROTOTYP( int doftparg,    (char) );
2946 _PROTOTYP( int doftpacct,   (void) );
2947 _PROTOTYP( int doftpsite,   (void) );
2948 _PROTOTYP( int dosetftppsv, (void) );
2949 _PROTOTYP( int ftpbye,      (void) );
2950 #endif /* NEWFTP */
2951
2952 #ifdef COMMENT
2953 /* These prototypes are no longer used */
2954 _PROTOTYP( char * getdws, (int) );
2955 _PROTOTYP( char * getdcs, (int) );
2956 _PROTOTYP( int doget, (int) );
2957 _PROTOTYP( char * arrayval, (int, int) );
2958 #endif /* COMMENT */
2959
2960 #ifdef KUI
2961 _PROTOTYP(int BuildFontTable,
2962           (struct keytab ** pTable, struct keytab ** pTable2, int * pN));
2963 #endif /* KUI */
2964
2965 _PROTOTYP(int cx_net, (int net, int protocol, char * xhost, char * svc, 
2966         char * username, char * password, char * command,
2967         int param1, int param2, int param3, 
2968         int cx, int sx, int flag, int gui));
2969 _PROTOTYP(int cx_serial, (char *device, 
2970         int cx, int sx, int shr, int flag, int gui, int special));
2971
2972 #endif /* CKUUSR_H */
2973
2974 /* End of ckuusr.h */