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