new patch: 020_fix_ptys
[ckermit.git] / ckuus2.c
1 #ifdef SSHTEST
2 #define SSHBUILTIN
3 #endif /* SSHTEST */
4
5 /*  C K U U S 2  --  User interface strings & help text module for C-Kermit  */
6
7 /*
8   Authors:
9     Frank da Cruz <fdc@columbia.edu>,
10       The Kermit Project, Columbia University, New York City
11     Jeffrey E Altman <jaltman@secure-endpoints.com>
12       Secure Endpoints Inc., New York City
13
14   Copyright (C) 1985, 2011,
15     Trustees of Columbia University in the City of New York.
16     All rights reserved.  See the C-Kermit COPYING.TXT file or the
17     copyright text in the ckcmai.c module for disclaimer and permissions.
18
19   This module contains HELP command and other long text strings.
20
21   IMPORTANT: Character string constants longer than about 250 are not portable.
22   Longer strings should be broken up into arrays of strings and accessed with
23   hmsga() rather than hmsg().  (This statement was true in the 1980s and
24   probably is not a big concern in the 21st Century, but you never know;
25   there still might exist some 16-bit platforms and C compilers that have
26   restrictions like this.
27 */
28 #include "ckcsym.h"
29 #include "ckcdeb.h"
30 #include "ckcnet.h"
31 #include "ckcasc.h"
32 #include "ckcker.h"
33 #include "ckuusr.h"
34 #include "ckcxla.h"
35 #ifdef OS2
36 #ifdef NT
37 #include <windows.h>
38 #else /* not NT */
39 #define INCL_KBD
40 #ifdef OS2MOUSE
41 #define INCL_MOU
42 #endif /* OS2MOUSE */
43 #define INCL_DOSMISC
44 #define INCL_DOSDEVICES
45 #include <os2.h>                /* This pulls in a whole load of stuff */
46 #undef COMMENT
47 #endif /* NT */
48 #include "ckocon.h"
49 #include "ckokvb.h"
50 #include "ckokey.h"
51 #endif /* OS2 */
52
53 extern char * ck_cryear;                /* For copyright notice */
54
55 extern xx_strp xxstring;
56 extern char * ccntab[];
57 /*
58   hlptok contains the string for which the user requested help.  This is
59   useful for distinguishing synonyms, in case different help text is needed
60   depending on which synonym was given.
61 */
62 extern char * hlptok;
63
64 #ifndef NOIKSD
65     extern int inserver;
66 #endif /* IKSD */
67
68 #ifndef NOICP
69 extern int cmflgs;
70
71 #ifdef DCMDBUF
72 extern char *cmdbuf, *atmbuf;
73 #else
74 extern char cmdbuf[], atmbuf[];
75 #endif /* DCMDBUF */
76 #endif /* NOICP */
77
78 extern char *xarg0;
79 extern int nrmt, nprm, dfloc, local, parity, escape;
80 extern int turn, flow;
81 extern int binary, quiet, keep;
82 extern int success, xaskmore;
83 #ifdef OS2
84 extern int tt_rows[], tt_cols[];
85 #else /* OS2 */
86 extern int tt_rows, tt_cols;
87 #endif /* OS2 */
88 extern int cmd_rows, cmd_cols;
89
90 extern long speed;
91 extern char *dftty, *versio, *ckxsys;
92 #ifndef NOHELP
93 extern char *helpfile;
94 #endif /* NOHELP */
95 extern struct keytab prmtab[];
96 #ifndef NOXFER
97 extern struct keytab remcmd[];
98 #endif /* NOXFER */
99
100 #ifndef NOICP
101
102 /*  Interactive help strings  */
103
104 /* Top-level HELP text.  IMPORTANT: Also see tophlpi[] for IKSD. */
105
106 static char *tophlp[] = {
107 "Trustees of Columbia University in the City of New York.\n",
108
109 #ifndef NOHELP
110 "  Type EXIT    to exit.",
111 #ifdef OS2
112 "  Type INTRO   for a brief introduction to the Kermit Command screen.",
113 "  Type LICENSE to see the Kermit 95 license.",
114 #else
115 "  Type INTRO   for a brief introduction to C-Kermit.",
116 "  Type LICENSE to see the C-Kermit license.",
117 #endif /* OS2 */
118 "  Type HELP    followed by a command name for help about a specific command.",
119 #ifndef NOPUSH
120 #ifdef UNIX
121 "  Type MANUAL  to access the C-Kermit manual page.",
122 #else
123 #ifdef VMS
124 "  Type MANUAL  to access the C-Kermit help topic.",
125 #else
126 #ifdef OS2
127 "  Type MANUAL  to access the K95 manual.",
128 #else
129 "  Type MANUAL  to access the C-Kermit manual.",
130 #endif /* OS2 */
131 #endif /* VMS */
132 #endif /* UNIX */
133 #endif /* NOPUSH */
134 "  Type NEWS    for news about new features.",
135 "  Type SUPPORT to learn how to get technical support.",
136 "  Press ?      (question mark) at the prompt, or anywhere within a command,",
137 "               for a menu (context-sensitive help, menu on demand).",
138 #else
139 "Press ? for a list of commands; see documentation for detailed descriptions.",
140 #endif /* NOHELP */
141
142 #ifndef NOCMDL
143 #ifndef NOHELP
144 " ",
145 "  Type HELP OPTIONS for help with command-line options.",
146 #endif /* NOHELP */
147 #endif /* NOCMDL */
148 " ",
149 #ifndef OS2
150 #ifdef MAC
151 "Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and",
152 "Christine M. Gianone, Digital Press, 1997, ISBN: 1-55558-164-1",
153 #else
154 "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
155 "2nd Edition, Digital Press / Butterworth-Heinemann 1997, ISBN 1-55558-164-1,",
156 "plus supplements at http://kermit.columbia.edu/ckermit.html#doc.",
157 #endif /* MAC */
158 #endif /* OS2 */
159 #ifdef MAC
160 " ",
161 "Also see the Mac Kermit Doc and Bwr files on the Mac Kermit diskette.\n",
162 #else
163 #ifdef HPUX10
164 " ",
165 "See the files in /usr/share/lib/kermit/ for additional information.",
166 #endif /* HPUX10 */
167 #endif /* MAC */
168 ""
169 };
170
171 #ifndef NOIKSD
172 static char *tophlpi[] = {              /* Top-level help for IKSD */
173
174 "Trustees of Columbia University in the City of New York.\n",
175
176 #ifndef NOHELP
177 "  Type INTRO   for a brief introduction to Kermit commands.",
178 "  Type VERSION for version and copyright information.",
179 "  Type HELP    followed by a command name for help about a specific command.",
180 "  Type SUPPORT to learn how to get technical support.",
181 "  Type LOGOUT  (or EXIT) to log out.",
182 "  Press ?      (question mark) at the prompt, or anywhere within a command,",
183 "               for a menu (context-sensitive help, menu on demand).",
184 #else
185 "Press ? for a list of commands; see documentation for detailed descriptions.",
186 #endif /* NOHELP */
187 " ",
188 "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
189 "2nd Edition, Digital Press (1997), ISBN 1-55558-164-1.  More info at the",
190 "Kermit Project website, http://kermit.columbia.edu/.",
191 ""
192 };
193 #endif /* NOIKSD */
194
195 #ifndef NOHELP
196 char *newstxt[] = {
197 #ifdef OS2
198 "Welcome to Kermit 95 3.x.x.  Major new features since 2.1.3 include:",
199 #else
200 "Welcome to C-Kermit 9.0.300.  New features since 8.0.211 include:",
201 #endif /* OS2 */
202 " . Open Source Simplified 3-Clause BSD License",
203 " . Full 64-bit memory model on platforms that support it",
204 " . Large file support (64-bit file size) on most platforms",
205 " . Long integer variables and constants in commands and scripts",
206 " . Bigger maximum command and macro lengths",
207 " . Bigger filename expansion space",
208 " . New super-flexible RENAME command",
209 " . New COPY and DIRECTORY command options",
210 " . New TOUCH command",
211 " . Raw SSL/TLS connections for connecting to POP3 and similar services",
212 " . At prompt, Ctrl-K recalls most recent filename",
213 " . Scripting and performance improvements and bug fixes",
214 " ",
215 "Documentation:",
216 " 1. http://kermit.columbia.edu/usingckermit.html",
217 "    \"Using C-Kermit\", second edition (1997), current with C-Kermit 6.0.",
218 " ",
219 " 2. http://kermit.columbia.edu/ckermit70.html",
220 "    which documents the new features of C-Kermit 7.0.",
221 " ",
222 " 3. http://kermit.columbia.edu/ckermit80.html",
223 "    which documents the new features of C-Kermit 8.0.",
224 " ",
225 " 4. http://kermit.columbia.edu/ckermit90.html",
226 "    which documents the new features of C-Kermit 9.0.",
227 " ",
228 "If the release date shown by the VERSION command is long past, be sure to",
229 "check with the Kermit website to see if there have been updates:",
230 " ",
231 #ifdef OS2
232 "  http://kermit.columbia.edu/k95.html     (Kermit 95 home page)",
233 #else
234 "  http://kermit.columbia.edu/ckermit.html (C-Kermit home page)",
235 #endif  /* OS2 */
236 "  http://kermit.columbia.edu/             (Kermit Project home page)",
237 ""
238 };
239 #endif /* NOHELP */
240
241 #ifndef NOHELP
242 char *introtxt[] = {
243 #ifdef OS2
244 "Welcome to K-95, Kermit communications software for:",
245 #else
246 #ifdef UNIX
247 #ifdef HPUX
248 "Welcome to HP-UX C-Kermit communications software for:",
249 #else
250 "Welcome to UNIX C-Kermit communications software for:",
251 #endif /* HPUX */
252 #else
253 #ifdef VMS
254 "Welcome to VMS C-Kermit communications software for:",
255 #else
256 #ifdef VOS
257 "Welcome to VOS C-Kermit communications software for:",
258 #else
259 #ifdef MAC
260 "Welcome to Mac Kermit communications software for:",
261 #else
262 "Welcome to C-Kermit communications software for:",
263 #endif /* MAC */
264 #endif /* VOS */
265 #endif /* VMS */
266 #endif /* UNIX */
267 #endif /* OS2 */
268 #ifndef NOXFER
269 " . Error-free and efficient file transfer",
270 #endif /* NOXFER */
271 #ifndef NOLOCAL
272 #ifdef OS2
273 " . VT320/220/102/100/52, ANSI, Wyse, Linux, Televideo, and other emulations",
274 #else
275 #ifdef MAC
276 " . VT220 terminal emulation",
277 #else
278 " . Terminal connection",
279 #endif /* MAC */
280 #endif /* OS2 */
281 #endif /* NOLOCAL */
282 #ifndef NOSPL
283 " . Script programming",
284 #endif /* NOSPL */
285 #ifndef NOICS
286 " . International character set conversion",
287 #endif /* NOICS */
288 #ifndef NODIAL
289 #ifndef NOSPL
290 " . Numeric and alphanumeric paging",
291 #endif /* NOSPL */
292 #endif /* NODIAL */
293
294 #ifndef NOLOCAL
295 " ",
296 "Supporting:",
297 " . Serial connections, direct or dialed.",
298 #ifndef NODIAL
299 " . Automatic modem dialing",
300 #endif /* NODIAL */
301 #ifdef TCPSOCKET
302 " . TCP/IP network connections:",
303 #ifdef TNCODE
304 "   - Telnet sessions",
305 #endif /* TNCODE */
306 #ifdef SSHBUILTIN
307 "   - SSH v1 and v2 connections",
308 #else
309 #ifdef ANYSSH
310 "   - SSH connections via external agent",
311 #endif /* ANYSSH */
312 #endif /* SSHBUILTIN */
313 #ifdef RLOGCODE
314 "   - Rlogin sessions",
315 #endif /* RLOGCODE */
316 #ifdef NEWFTP
317 "   - FTP sessions",
318 #endif /* NEWFTP */
319 #ifdef CKHTTP
320 "   - HTTP 1.1 sessions",
321 #endif /* CKHTTP */
322 #ifdef IKSD
323 "   - Internet Kermit Service",
324 #endif /* IKSD */
325 #endif /* TCPSOCKET */
326 #ifdef ANYX25
327 " . X.25 network connections",
328 #endif /* ANYX25 */
329 #ifdef OS2
330 #ifdef DECNET
331 " . DECnet/PATHWORKS LAT Ethernet connections",
332 #endif /* DECNET */
333 #ifdef SUPERLAT
334 " . Meridian Technologies' SuperLAT connections",
335 #endif /* SUPERLAT */
336 #ifdef NPIPE
337 " . Named-pipe connections",
338 #endif /* NPIPE */
339 #ifdef CK_NETBIOS
340 " . NETBIOS connections",
341 #endif /* CK_NETBIOS */
342 #endif /* OS2 */
343 #endif /* NOLOCAL */
344
345 " ",
346 "While typing commands, you may use the following special characters:",
347 " . DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
348 " . CTRL-W:      Delete the most recent word typed.",
349 " . CTRL-U:      Delete the current line.",
350 " . CTRL-R:      Redisplay the current line.",
351
352 #ifdef CK_RECALL
353 #ifdef OS2
354 " . Uparrow:     Command recall - go backwards in command recall buffer.",
355 " . Downarrow:   Command recall - go forward in command recall buffer.",
356 #ifndef NOIKSD
357 "   (Note: Arrow keys can be used only on the PC's physical keyboard.)",
358 #endif /* NOIKSD */
359 #endif /* OS2 */
360 " . CTRL-P:      Command recall - go backwards in command recall buffer.",
361 " . CTRL-B:      Command recall - same as Ctrl-P.",
362 " . CTRL-N:      Command recall - go forward in command recall buffer.",
363 #endif /* CK_RECALL */
364 #ifndef NOLASTFILE
365 " . CTRL-K:      Insert the most recently entered local file specifiction.",
366 #endif  /* NOLASTFILE */
367
368 " . ?            (question mark) Display a menu for the current command field."
369 ,
370 " . ESC          (or TAB or Ctrl-I) Attempt to complete the current field.",
371 " . \\            (backslash) include the following character literally",
372 #ifndef NOSPL
373 "                or introduce a backslash code, variable, or function.",
374 #else
375 "                or introduce a numeric backslash code.",
376 #endif /* NOSPL */
377 " ",
378
379 "IMPORTANT: Since backslash (\\) is Kermit's command-line escape character,",
380 "you must enter DOS, Windows, or OS/2 pathnames using either forward slash (/)"
381 ,
382 "or double backslash (\\\\) as the directory separator in most contexts.",
383 "Examples: C:/TMP/README.TXT, C:\\\\TMP\\\\README.TXT.",
384 " ",
385
386 "Command words other than filenames can be abbreviated in most contexts.",
387 " ",
388
389 "Basic commands:",
390 "  EXIT          Exit from Kermit",
391 "  HELP          Request general help",
392 "  HELP command  Request help about the given command",
393 "  TAKE          Execute commands from a file",
394 "  TYPE          Display a file on your screen",
395 "  ORIENTATION   Explains directory structure",
396 " ",
397
398 #ifndef NOXFER
399 "Commands for file transfer:",
400 "  SEND          Send files",
401 "  RECEIVE       Receive files",
402 "  GET           Get files from a Kermit server",
403 #ifdef CK_RESEND
404 "  RESEND        Recover an interrupted send",
405 "  REGET         Recover an interrupted get from a server",
406 #endif /* CK_RESEND */
407 #ifndef NOSERVER
408 "  SERVER        Be a Kermit server",
409 #endif /* NOSERVER */
410 " ",
411 "File-transfer speed selection:",
412 "  FAST          Use fast settings -- THIS IS THE DEFAULT",
413 "  CAUTIOUS      Use slower, more cautious settings",
414 "  ROBUST        Use extremely slow and cautious settings",
415 " ",
416 "File-transfer performance fine tuning:",
417 "  SET RECEIVE PACKET-LENGTH  Kermit packet size",
418 "  SET WINDOW                 Number of sliding window slots",
419 "  SET PREFIXING              Amount of control-character prefixing",
420 #endif /* NOXFER */
421
422 #ifndef NOLOCAL
423 " ",
424 "To make a direct serial connection:",
425 #ifdef OS2
426 #ifdef NT
427 #ifdef CK_TAPI
428 "  SET PORT TAPI Select TAPI communication device",
429 #endif /* CK_TAPI */
430 "  SET PORT      Select serial communication device",
431 #else
432 "  SET PORT      Select serial communication port or server",
433 #endif /* NT */
434 #else
435 "  SET LINE      Select serial communication device",
436 #endif /* OS2 */
437 "  SET SPEED     Select communication speed",
438 "  SET PARITY    Communications parity (if necessary)",
439 #ifdef CK_RTSCTS
440 "  SET FLOW      Communications flow control, such as RTS/CTS",
441 #else
442 "  SET FLOW      Communications flow control, such as XON/XOFF",
443 #endif /* CK_RTSCTS */
444 "  CONNECT       Begin terminal connection",
445
446 #ifndef NODIAL
447 " ",
448 "To dial out with a modem:",
449 "  SET DIAL DIRECTORY     Specify dialing directory file (optional)",
450 "  SET DIAL COUNTRY-CODE  Country you are dialing from (*)",
451 "  SET DIAL AREA-CODE     Area-code you are dialing from (*)",
452 "  LOOKUP                 Lookup entries in your dialing directory (*)",
453 "  SET MODEM TYPE         Select modem type",
454 #ifdef OS2
455 #ifdef NT
456 #ifdef CK_TAPI
457 "  SET PORT TAPI          Select TAPI communication device",
458 #endif /* CK_TAPI */
459 "  SET PORT               Select serial communication device",
460 #else
461 "  SET PORT               Select serial communication port or server",
462 #endif /* NT */
463 #else
464 "  SET LINE               Select serial communication device",
465 #endif /* OS2 */
466 "  SET SPEED              Select communication speed",
467 "  SET PARITY             Communications parity (if necessary)",
468 "  DIAL                   Dial the phone number",
469 "  CONNECT                Begin terminal connection",
470 " ",
471 #ifdef OS2
472 "Further info:   HELP DIAL, HELP SET MODEM, HELP SET PORT, HELP SET DIAL",
473 #else
474 "Further info:   HELP DIAL, HELP SET MODEM, HELP SET LINE, HELP SET DIAL",
475 #endif /* OS2 */
476 "(*) (For use with optional dialing directory)",
477 #endif /* NODIAL */
478
479 #ifdef NETCONN
480 " ",
481 "To make a network connection:",
482 #ifndef NODIAL
483 "  SET NETWORK DIRECTORY  Specify a network services directory (optional)",
484 "  LOOKUP                 Lookup entries in your network directory",
485 #endif /* NODIAL */
486 "  SET NETWORK TYPE       Select network type (if more than one available)",
487 "  SET HOST               Make a network connection but stay in command mode",
488 "  CONNECT                Begin terminal connection",
489 #ifdef TNCODE
490 "  TELNET                 Select a Telnet host and CONNECT to it",
491 #endif /* TNCODE */
492 #ifdef RLOGCODE
493 "  RLOGIN                 Select an Rlogin host and CONNECT to it",
494 #endif /* RLOGCODE */
495 #ifdef ANYSSH
496 "  SSH [ OPEN ]           Select an SSH host and CONNECT to it",
497 #endif /* ANYSSH */
498 #ifdef NEWFTP
499 "  FTP [ OPEN ]           Make an FTP connection",
500 #endif /* NEWFTP */
501 #ifdef CKHTTP
502 "  HTTP OPEN              Make an HTTP connection",
503 #endif /* CKHTTP */
504 #endif /* NETCONN */
505
506 #ifdef NT
507 " ",
508 "To return from the terminal window to the K-95> prompt:",
509 #else
510 #ifdef OS2
511 " ",
512 "To return from the terminal window to the K/2> prompt:",
513 #else
514 " ",
515 "To return from a terminal connection to the C-Kermit prompt:",
516 #endif /* OS2 */
517 #endif /* NT */
518 #ifdef OS2
519 "  \
520 Press the key or key-combination shown after \"Command:\" in the status line",
521 "  (such as Alt-x) or type your escape character followed by the letter C.",
522 #else
523 "  Type your escape character followed by the letter C.",
524 #endif /* OS2 */
525 " ",
526 "To display your escape character:",
527 "  SHOW ESCAPE",
528 " ",
529 "To display other settings:",
530 "  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
531 #else  /* !NOLOCAL */
532 " ",
533 "To display settings:",
534 "  SHOW COMMUNICATIONS, SHOW FILE, SHOW PROTOCOL, etc.",
535 #endif /* NOLOCAL */
536 " ",
537 "The manual for C-Kermit is the book \"Using C-Kermit\".  For information",
538 "about the manual, visit:",
539 "  http://kermit.columbia.edu/usingckermit.html",
540 " ",
541 #ifdef OS2
542 "For a Kermit 95 tutorial, visit:",
543 "  http://kermit.columbia.edu/k95tutor.html",
544 " ",
545 #endif /* OS2 */
546 "For an online C-Kermit tutorial, visit:",
547 "  http://kermit.columbia.edu/ckututor.html",
548 " ",
549 "To learn about script programming and automation:",
550 "  http://kermit.columbia.edu/ckscripts.html",
551 " ",
552 "For further information about a particular command, type HELP xxx,",
553 "where xxx is the name of the command.  For documentation, news of new",
554 "releases, and information about other Kermit software, visit the",
555 "Kermit Project website:",
556 " ",
557 "  http://kermit.columbia.edu/",
558 " ",
559 "For information about technical support please visit this page:",
560 " ",
561 "  http://kermit.columbia.edu/support.html",
562 ""
563 };
564
565 static char * hmxymatch[] = {
566 "SET MATCH { DOTFILE, FIFO } { ON, OFF }",
567 "  Tells whether wildcards should match dotfiles (files whose names begin",
568 "  with period) or UNIX FIFO special files.  MATCH FIFO default is OFF.",
569 "  MATCH DOTFILE default is OFF in UNIX, ON elsewhere.",
570 ""
571 };
572
573 #ifndef NOSEXP
574 static char * hmxysexp[] = {
575 "SET SEXPRESSION { DEPTH-LIMIT, ECHO-RESULT, TRUNCATE-ALL-RESULTS }",
576 "  DEPTH-LIMIT sets a limit on the depth of nesting or recursion in",
577 "  S-Expressions to prevent the program from crashing from memory exhaustion.",
578 "  ECHO-RESULT tells whether S-Expression results should be displayed as",
579 "  a result of evaluating an expression; the default is to display only at",
580 "  top (interactive) level; OFF means never display; ON means always display.",
581 "  TRUNCATE-ALL-RESULTS ON means the results of all arithmetic operations",
582 "  should be forced to integers (whole numbers) by discarding any fractional",
583 "  part.  The default is OFF.  SHOW SEXPRESSION displays the current settings."
584 ,""
585 };
586 #endif  /* NOSEXP */
587
588 #ifdef OS2
589 #ifdef KUI
590 static char * hmxygui[] = {
591 "SET GUI CLOSE OFF",
592 "  Disables the System Menu Close and File->Exit functions which could be",
593 "  used to exit Kermit.  Once disabled these functions cannot be re-enabled",
594 "  and the only way to exit Kermit is via the Kermit Script EXIT command.",
595 " ",
596 "SET GUI DIALOGS { ON, OFF }",
597 "  ON means that popups, alerts, use GUI dialogs; OFF means to use",
598 "  text-mode popups or prompts.  ON by default.",
599 " ",
600 "SET GUI FONT name size",
601 "  Chooses the font and size.  Type \"set gui font ?\" to see the list of",
602 "  choices.  The size can be a whole number or can contain a decimal point",
603 "  and a fraction (which is rounded to the nearest half point).",
604 " ",
605 "SET GUI MENUBAR OFF",
606 "  Disables menubar functions which could be used to modify the Kermit",
607 "  session configuration.  Once disabled the menubar functions cannot be",
608 "  re-enabled.", 
609 " ",
610 "SET GUI RGBCOLOR colorname redvalue greenvalue bluevalue",
611 "  Specifies the red-green-blue mixture to be used to render the given",
612 "  color name.  Type \"set gui rgbcolor\" to see a list of colornames.",
613 "  the RGB values are whole numbers from 0 to 255.",
614 " ",
615 "SET GUI TOOLBAR OFF", 
616 "  Disables toolbar functions which could be used to modify the Kermit",
617 "  session configuration.  Once disabled the toolbar functions cannot be",
618 "  re-enabled.", 
619 " ",
620 "SET GUI WINDOW POSITION x y",
621 "  Moves the K95 window to the given X,Y coordinates, pixels from top left.",
622 "  (Not yet implemented -- use command-line options to do this.)",
623 " ",
624 "SET GUI WINDOW RESIZE-MODE { CHANGE-DIMENSIONS, SCALE-FONT }",
625 "  Default is CHANGE-DIMENSIONS.",
626 "",
627 "SET GUI WINDOW RUN-MODE { MAXIMIZE, MINIMIZE, RESTORE }",
628 "  Changes the run mode state of the GUI window.",
629 ""
630 };
631 #endif /* KUI */
632 #endif /* OS2 */
633
634 #ifdef ANYSSH
635 static char * hmxxssh[] = {
636 #ifdef SSHBUILTIN
637 "Syntax: SSH { ADD, AGENT, CLEAR, KEY, [ OPEN ], V2 } operands...",
638 "  Performs an SSH-related action, depending on the keyword that follows:",
639 " ",
640 "SSH ADD LOCAL-PORT-FORWARD local-port host port",
641 "  Adds a port forwarding triplet to the local port forwarding list.",
642 "  The triplet specifies a local port to be forwarded and the hostname /",
643 "  ip-address and port number to which the port should be forwarded from",
644 "  the remote host.  Port forwarding is activated at connection",
645 "  establishment and continues until the connection is terminated.",
646 " ",
647 "SSH ADD REMOTE-PORT-FORWARD remote-port host port",
648 "  Adds a port forwarding triplet to the remote port forwarding list.",
649 "  The triplet specifies a remote port to be forwarded and the",
650 "  hostname/ip-address and port number to which the port should be",
651 "  forwarded from the local machine.  Port forwarding is activated at",
652 "  connection establishment and continues until the connection is",
653 "  terminated.",
654 " ",
655 "SSH AGENT ADD [ identity-file ]",
656 "  Adds the contents of the identity-file (if any) to the SSH AGENT",
657 "  private key cache.  If no identity-file is specified, all files",
658 "  specified with SET SSH IDENTITY-FILE are added to the cache.",
659 " ",
660 "SSH AGENT DELETE [ identity-file ]",
661 "  Deletes the contents of the identity-file (if any) from the SSH AGENT",
662 "  private key cache.  If no identity-file is specified, all files",
663 "  specified with SET SSH IDENTITY-FILE are deleted from the cache.",
664 " ",
665 "SSH AGENT LIST [ /FINGERPRINT ]",
666 "  Lists the contents of the SSH AGENT private key cache.  If /FINGERPRINT",
667 "  is specified, the fingerprint of the private keys are displayed instead",
668 "  of the keys.",
669 " ",
670 "SSH CLEAR LOCAL-PORT-FORWARD",
671 "  Clears the local port forwarding list.",
672 " ",
673 "SSH CLEAR REMOTE-PORT-FORWARD",
674 "  Clears the remote port forwarding list.",
675 " ",
676 "SSH KEY commands:",
677 "  The SSH KEY commands create and manage public and private key pairs",
678 "  (identities).  There are three forms of SSH keys.  Each key pair is",
679 "  stored in its own set of files:",
680 " ",
681 "   Key Type      Private Key File           Public Key File",
682 "    v1 RSA keys   \\v(appdata)ssh/identity   \\v(appdata)ssh/identity.pub",
683 "    v2 RSA keys   \\v(appdata)ssh/id_rsa     \\v(appdata)ssh/id_rsa.pub",
684 "    v2 DSA keys   \\v(appdata)ssh/id_dsa     \\v(appdata)ssh/id_dsa.pub",
685 " ",
686 "  Keys are stored using the OpenSSH keyfile format.  The private key",
687 "  files can be (optionally) protected by specifying a passphrase.  A",
688 "  passphrase is a longer version of a password.  English text provides",
689 "  no more than 2 bits of key data per character.  56-bit keys can be",
690 "  broken by a brute force attack in approximately 24 hours.  When used,",
691 "  private key files should therefore be protected by a passphrase of at",
692 "  least 40 characters (about 80 bits).",
693 " ",
694 "  To install a public key file on the host, you must transfer the file",
695 "  to the host and append it to your \"authorized_keys\" file.  The file",
696 "  permissions must be 600 (or equivalent).",
697 " ",
698 "SSH KEY CHANGE-PASSPHRASE [ /NEW-PASSPHRASE:passphrase",
699 "      /OLD-PASSPHRASE:passphrase ] filename",
700 "  This re-encrypts the specified private key file with a new passphrase.",
701 "  The old passphrase is required.  If the passphrases (and filename) are",
702 "  not provided Kermit prompts your for them.",
703 " ",
704 "SSH KEY CREATE [ /BITS:bits /PASSPHRASE:passphrase",
705 "    /TYPE:{ V1-RSA, V2-DSA, V2-RSA } /V1-RSA-COMMENT:comment ] filename",
706 "  This command creates a new private/public key pair.  The defaults are:",
707 "  BITS:1024 and TYPE:V2-RSA.  The filename is the name of the private",
708 "  key file.  The public key is created with the same name with .pub",
709 "  appended to it.  If a filename is not specified Kermit prompts you for",
710 "  it.  V1 RSA key files may have an optional comment, which is ignored",
711 "  for other key types.",
712 " ",
713 "SSH KEY DISPLAY [ /FORMAT:{FINGERPRINT,IETF,OPENSSH,SSH.COM} ] filename",
714 "  This command displays the contents of a public or private key file.",
715 "  The default format is OPENSSH.",
716 " ",
717 "SSH KEY V1 SET-COMMENT filename comment",
718 "  This command replaces the comment associated with a V1 RSA key file.",
719 " ",
720 "SSH [ OPEN ] host [ port ] [ /COMMAND:command /USER:username",
721 "      /PASSWORD:pwd /VERSION:{ 1, 2 } /X11-FORWARDING:{ ON, OFF } ]",
722 "  This command establishes a new connection using SSH version 1 or",
723 "  version 2 protocol.  The connection is made to the specified host on",
724 "  the SSH port (you can override the port by including a port name or",
725 "  number after the host name).  Once the connection is established the",
726 "  authentication negotiations begin.  If the authentication is accepted,",
727 "  the local and remote port forwarding lists are used to establish the",
728 "  desired connections.  If X11 Forwarding is active, this results in a",
729 "  remote port forwarding between the X11 clients on the remote host and",
730 "  X11 Server on the local machine.  If a /COMMAND is provided, the",
731 "  command is executed on the remote host in place of your default shell.",
732 " ",
733 "  An example of a /COMMAND to execute C-Kermit in SERVER mode is:",
734 "     SSH OPEN hostname /COMMAND:{kermit -x -l 0}",
735 " ",
736 "SSH V2 REKEY",
737 "  Requests that an existing SSH V2 connection generate new session keys.",
738 #else  /* SSHBUILTIN */
739 "Syntax: SSH [ options ] <hostname> [ command ]",
740 "  Makes an SSH connection using the external ssh program via the SET SSH",
741 "  COMMAND string, which is \"ssh -e none\" by default.  Options for the",
742 "  external ssh program may be included.  If the hostname is followed by a",
743 "  command, the command is executed on the host instead of an interactive",
744 "  shell.",
745 #endif /* SSHBUILTIN */
746 ""
747 };
748
749 static char *hmxyssh[] = {
750 #ifdef SSHBUILTIN
751 "SET SSH AGENT-FORWARDING { ON, OFF }",
752 "  If an authentication agent is in use, setting this value to ON",
753 "  results in the connection to the agent being forwarded to the remote",
754 "  computer.  The default is OFF.",
755 " ",
756 "SET SSH CHECK-HOST-IP { ON, OFF }",
757 "  Specifies whether the remote host's ip-address should be checked",
758 "  against the matching host key in the known_hosts file.  This can be",
759 "  used to determine if the host key changed as a result of DNS spoofing.",
760 "  The default is ON.",
761 " ",
762 "SET SSH COMPRESSION { ON, OFF }",
763 "  Specifies whether compression will be used.  The default is ON.",
764 " ",
765 "SET SSH DYNAMIC-FORWARDING { ON, OFF }",
766 "  Specifies whether Kermit is to act as a SOCKS4 service on port 1080",
767 "  when connected to a remote host via SSH.  When Kermit acts as a SOCKS4",
768 "  service, it accepts connection requests and forwards the connections",
769 "  through the remote host.  The default is OFF.",
770 " ",
771 "SET SSH GATEWAY-PORTS { ON, OFF }",
772 "  Specifies whether Kermit should act as a gateway for forwarded",
773 "  connections received from the remote host.  The default is OFF.",
774 " ",
775 "SET SSH GSSAPI DELEGATE-CREDENTIALS { ON, OFF }",
776 "  Specifies whether Kermit should delegate GSSAPI credentials to ",
777 "  the remote host after authentication.  Delegating credentials allows",
778 "  the credentials to be used from the remote host.  The default is OFF.",
779 " ",
780 "SET SSH HEARTBEAT-INTERVAL <seconds>",
781 "  Specifies a number of seconds of idle time after which an IGNORE",
782 "  message will be sent to the server.  This pulse is useful for",
783 "  maintaining connections through HTTP Proxy servers and Network",
784 "  Address Translators.  The default is OFF (0 seconds).",
785 " ",
786 "SET SSH IDENTITY-FILE filename [ filename [ ... ] ]",
787 "  Specifies one or more files from which the user's authorization",
788 "  identities (private keys) are to be read when using public key",
789 "  authorization.  These are files used in addition to the default files:",
790 " ",
791 "    \\v(appdata)ssh/identity      V1 RSA",
792 "    \\v(appdata)ssh/id_rsa        V2 RSA",
793 "    \\v(appdata)ssh/id_dsa        V2 DSA",
794 " ",
795 "SET SSH KERBEROS4 TGT-PASSING { ON, OFF }",
796 "  Specifies whether Kermit should forward Kerberos 4 TGTs to the host.",
797 "  The default is OFF.",
798 " ",
799 "SET SSH KERBEROS5 TGT-PASSING { ON, OFF }",
800 "  Specifies whether Kermit should forward Kerberos 5 TGTs to to the",
801 "  host.  The default is OFF.",
802 " ",
803 "SET SSH PRIVILEGED-PORT { ON, OFF }",
804 "  Specifies whether a privileged port (less than 1024) should be used",
805 "  when connecting to the host.  Privileged ports are not required except",
806 "  when using SSH V1 with Rhosts or RhostsRSA authorization.  The default",
807 "  is OFF.",
808 " ",
809 "SET SSH QUIET { ON, OFF }",
810 "  Specifies whether all messages generated in conjunction with SSH",
811 "  protocols should be suppressed.  The default is OFF.",
812 " ",
813 "SET SSH STRICT-HOST-KEY-CHECK { ASK, ON, OFF }",
814 "  Specifies how Kermit should behave if the the host key check fails.",
815 "  When strict host key checking is OFF, the new host key is added to the",
816 "  protocol-version-specific user-known-hosts-file.  When strict host key",
817 "  checking is ON, the new host key is refused and the connection is",
818 "  dropped.  When set to ASK, Kermit prompt you to say whether the new",
819 "  host key should be accepted.  The default is ASK.",
820 " ",
821 "  Strict host key checking protects you against Trojan horse attacks.",
822 "  It depends on you to maintain the contents of the known-hosts-file",
823 "  with current and trusted host keys.",
824 " ",
825 "SET SSH USE-OPENSSH-CONFIG { ON, OFF }",
826 "  Specifies whether Kermit should parse an OpenSSH configuration file",
827 "  after applying Kermit's SET SSH commands.  The configuration file",
828 "  would be located at \\v(home)ssh/ssh_config.  The default is OFF.",
829 " ",
830 "SET SSH V1 CIPHER { 3DES, BLOWFISH, DES }",
831 "  Specifies which cipher should be used to protect SSH version 1",
832 "  connections.  The default is 3DES.",
833 " ",
834 "SET SSH V1 GLOBAL-KNOWN-HOSTS-FILE filename",
835 "  Specifies the location of the system-wide known-hosts file.  The",
836 "  default is:",
837 " ",
838 "    \v(common)ssh_known_hosts",
839 " ",
840 "SET SSH V1 USER-KNOWN-HOSTS-FILE filename",
841 "  Specifies the location of the user-known-hosts-file.  The default",
842 "  location is:",
843 " ",
844 "    \\v(appdata)ssh/known_hosts",
845 " ",
846 "SET SSH V2 AUTHENTICATION { EXTERNAL-KEYX, GSSAPI, HOSTBASED, ",
847 "    KEYBOARD-INTERACTIVE, PASSWORD, PUBKEY, SRP-GEX-SHA1 } [ ... ]",
848 "  Specifies an ordered list of SSH version 2 authentication methods to",
849 "  be used when connecting to the remote host.  The default list is:",
850 " ",
851 "    external-keyx gssapi hostbased publickey srp-gex-sha1 publickey",
852 "    keyboard-interactive password none",
853 " ",
854 "SET SSH V2 AUTO-REKEY { ON, OFF }",
855 "  Specifies whether Kermit automatically issues rekeying requests",
856 "  once an hour when SSH version 2 in in use.  The default is ON.",
857 " ",
858 "SET SSH V2 CIPHERS { 3DES-CBC, AES128-CBC AES192-CBC AES256-CBC",
859 "     ARCFOUR BLOWFISH-CBC CAST128-CBC RIJNDAEL128-CBC RIJNDAEL192-CBC",
860 "     RIJNDAEL256-CBC }",
861 "  Specifies an ordered list of SSH version ciphers to be used to encrypt",
862 "  the established connection.  The default list is:",
863 " ",
864 "    aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour aes192-cbc",
865 "    aes256-cbc",
866 " ",
867 "  \"rijndael\" is an alias for \"aes\".",
868 " ",
869 "SET SSH V2 GLOBAL-KNOWN-HOSTS-FILE filename",
870 "  Specifies the location of the system-wide known-hosts file.  The default",
871 "  location is:",
872 " ",
873 "    \\v(common)ssh/known_hosts2",
874 " ",
875 "SET SSH V2 HOSTKEY-ALGORITHMS { SSH-DSS, SSH-RSA }",
876 "  Specifies an ordered list of hostkey algorithms to be used to verify",
877 "  the identity of the host.  The default list is",
878 " ",
879 "    ssh-rsa ssh-dss",
880 " ",
881 "SET SSH V2 MACS { HMAC-MD5 HMAC-MD5-96 HMAC-RIPEMD160 HMAC-SHA1",
882 "     HMAC-SHA1-96 }",
883 "  Specifies an ordered list of Message Authentication Code algorithms to",
884 "  be used for integrity  protection of the established connection.  The",
885 "  default list is:",
886 " ",
887 "    hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 hmac-md5-96",
888 " ",
889 "SET SSH V2 USER-KNOWN-HOSTS-FILE filename",
890 "  Specifies the location of the user-known-hosts file.  The default",
891 "  location is:",
892 " ",
893 "    \\v(appdata)ssh/known_hosts2",
894 " ",
895 "SET SSH VERBOSE level",
896 "  Specifies how many messages should be generated by the OpenSSH engine.",
897 "  The level can range from 0 to 7.  The default value is 2.",
898 " ",
899 "SET SSH VERSION { 1, 2, AUTOMATIC }",
900 "  Specifies which SSH version should be negotiated.  The default is",
901 "  AUTOMATIC which means use version 2 if supported; otherwise to fall",
902 "  back to version 1.",
903 " ",
904 "SET SSH X11-FORWARDING { ON, OFF }",
905 "  Specifies whether X Windows System Data is to be forwarded across the",
906 "  established SSH connection.  The default is OFF.  When ON, the DISPLAY",
907 "  value is either set using the SET TELNET ENV DISPLAY command or read",
908 "  from the DISPLAY environment variable.",
909 " ",
910 "SET SSH XAUTH-LOCATION filename",
911 "  Specifies the location of the xauth executable (if provided with the",
912 "  X11 Server software.)",
913 #else  /* SSHBUILTIN */
914 "Syntax: SET SSH COMMAND command",
915 "  Specifies the external command to be used to make an SSH connection.",
916 "  By default it is \"ssh -e none\" (ssh with no escape character).",
917 #endif /* SSHBUILTIN */
918 ""
919 };
920 #endif /* ANYSSH */
921
922 #ifdef NEWFTP
923 static char *hmxygpr[] = {
924 "Syntax: SET GET-PUT-REMOTE { AUTO, FTP, KERMIT}",
925 "  Tells Kermit whether GET, PUT, and REMOTE commands should be directed",
926 "  at a Kermit server or an FTP server.  The default is AUTO, meaning that",
927 "  if you have only one active connection, the appropriate action is taken",
928 "  when you give a GET, PUT, or REMOTE command.  SET GET-PUT-REMOTE FTP forces"
929 ,
930 "  Kermit to treat GET, PUT, and REMOTE as FTP client commands; setting this",
931 "  to KERMIT forces these commands to be treated as Kermit client commands.",
932 "  NOTE: PUT includes SEND, MPUT, MSEND, and all other similar commands.",
933 "  Also see HELP REMOTE, HELP SET LOCUS, HELP FTP.",
934 ""
935 };
936 #endif /* NEWFTP */
937
938 #ifdef LOCUS
939 static char *hmxylocus[] = {
940 #ifdef KUI
941 "Syntax: SET LOCUS { ASK, AUTO, LOCAL, REMOTE }",
942 #else
943 "Syntax: SET LOCUS { AUTO, LOCAL, REMOTE }",
944 #endif /* KUI */
945 "  Specifies whether unprefixed file management commands should operate",
946 "  locally or (when there is a connection to a remote FTP or Kermit",
947 "  server) sent to the server.  The affected commands are: CD (CWD), PWD,",
948 "  CDUP, DIRECTORY, DELETE, RENAME, MKDIR, and RMDIR.  To force any of",
949 "  these commands to be executed locally, give it an L-prefix: LCD, LDIR,",
950 "  etc.  To force remote execution, use the R-prefix: RCD, RDIR, and so",
951 "  on.  SHOW COMMAND shows the current Locus.",
952 " ",
953 "  By default, the Locus for file management commands is switched",
954 "  automatically whenever you make or close a connection: if you make an",
955 "  FTP connection, the Locus becomes REMOTE; if you close an FTP connection",
956 "  or make any other kind of connection, the Locus becomes LOCAL.",
957 #ifdef KUI
958 " ",
959 "  There are two kinds of automatic switching: ASK (the default) which",
960 "  asks you if it's OK to switch, and AUTO, which switches without asking.",
961 #endif /* KUI */
962 " ",
963 "  If you give a SET LOCUS LOCAL or SET LOCUS REMOTE command, this sets",
964 "  the locus as indicated and disables automatic switching.",
965 #ifdef KUI
966 "  SET LOCUS AUTO or SET LOCUS ASK restores automatic switching.",
967 "  You can also change Locus switching and behavior in the Actions menu.",
968 #else
969 "  SET LOCUS AUTO restores automatic switching.",
970 #endif /* KUI */
971 "",
972 };
973 #endif /* LOCUS */
974
975 #ifdef UNIX
976 #ifndef NOPUTENV
977 static char *hmxxputenv[] = {
978 "Syntax: PUTENV name value",
979 "  Creates or modifies the environment variable with the given name to have",
980 "  the given value.  Purpose: to pass parameters to subprocesses without",
981 "  having them appear on the command line.  If the value is blank (empty),",
982 "  the variable is deleted.  The result is visible to this instantiation of",
983 "  C-Kermit via \\$(name) and to any inferior processes by whatever method",
984 "  they use to access environment variables.  The value may be enclosed in",
985 "  doublequotes or braces, but it need not be; if it is the outermost",
986 "  doublequotes or braces are removed.",
987 " ",
988 "  Note the syntax:",
989 "    PUTENV name value",
990 "  not:",
991 "    PUTENV name=value",
992 " ",
993 "  There is no equal sign between name and value, and the name itself may",
994 "  not include an equal sign.",
995 "",
996 };
997 #endif  /* NOPUTENV */
998 #endif  /* UNIX */
999
1000 static char *hmxxtak[] = {
1001 "Syntax: TAKE filename [ arguments ]",
1002 "  Tells Kermit to execute commands from the named file.  Optional argument",
1003 "  words, are automatically assigned to the macro argument variables \\%1",
1004 "  through \\%9.  Kermit command files may themselves contain TAKE commands,",
1005 "  up to any reasonable depth of nesting.",
1006 ""
1007 };
1008
1009 #ifdef TCPSOCKET
1010 static char *hmxxfirew[] = {
1011 #ifdef OS2
1012 "Firewall Traversal in Kermit 95",
1013 #else
1014 "Firewall Traversal in C-Kermit",
1015 #endif
1016 " ",
1017 #ifndef NEWFTP
1018 #ifndef CKHTTP
1019 #ifndef CK_SOCKS
1020 #define NOFIREWALL
1021 #endif
1022 #endif
1023 #endif
1024 #ifdef NOFIREWALL
1025 "This version of Kermit was built with no support for firewall traversal",
1026 "protocols.  Kermit can be built with support for HTTP Proxy Servers,",
1027 "SOCKS authorized firewall traversal, and FTP Passive connection modes.",
1028 " ",
1029 #else /* NOFIREWALL */
1030 #ifdef CKHTTP
1031 "The simplist form of firewall traversal is the HTTP CONNECT command. The",
1032 "CONNECT command was implemented to allow a public web server which usually",
1033 "resides on the boundary between the public and private networks to forward",
1034 "HTTP requests from clients on the private network to public web sites.  To",
1035 "allow secure web connections, the HTTP CONNECT command authenticates the",
1036 "client with a username/password and then establishes a tunnel to the",
1037 "desired host.",
1038
1039 " ",
1040
1041 "Web servers that support the CONNECT command can be configured to allow",
1042 "outbound connections for authenticated users to any TCP/IP hostname-port",
1043 "combination accessible to the Web server.  HTTP CONNECT can be used only",
1044 "with TCP-based protocols.  Protocols such as Kerberos authentication that",
1045 "use UDP/IP cannot be tunneled using HTTP CONNECT.",
1046
1047 " ",
1048
1049 "SET TCP HTTP-PROXY [switches] [<hostname or ip-address>[:<port>]]",
1050 "  If a hostname or ip-address is specified, Kermit uses the given",
1051 "  proxy server when attempting outgoing TCP connections.  If no hostnamer",
1052 "  or ip-address is specified, any previously specified Proxy server is",
1053 "  removed.  If no port number is specified, the \"http\" service is used.",
1054 "  [switches] can be one or more of:",
1055 "     /AGENT:<agent> /USER:<user> /PASSWORD:<password>",
1056 "  Switch parameters are used when connecting to the proxy server and",
1057 "  override any other values associated with the connection.",
1058 " ",
1059
1060 #endif /* CKHTTP */
1061 #ifdef CK_SOCKS
1062
1063 "In the early 1990s as firewalls were becoming prevalent, David Koblas",
1064 "developed the SOCKS protocol for TCP/IP firewall traversal.  Two versions",
1065 "of SOCKS are currently in use: Version 4.2 lets TCP/IP client applications",
1066 "traverse firewalls, similar to HTTP CONNECT, except that the SOCKS client",
1067 "is aware of the public source IP address and port, which can be used within",
1068 "the application protocol to assist in securing the connection (e.g. FTP",
1069 "sessions secured with GSSAPI Kerberos 5).",
1070
1071 " ",
1072
1073 "In 1995 the IETF issued SOCKS Protocol Version 5 (RFC 1928), which is",
1074 "significantly more general than version 4.  Besides supporting client-",
1075 "to-server TCP/IP connections, it also includes:",
1076
1077 " ",
1078 " . Authenticated firewall traversal of UDP/IP packets.",
1079 " . Authenticated binding of incoming public ports on the firewall.",
1080 " ",
1081
1082 "This lets a service on the private network offer public services.  It also",
1083 "lets client applications like FTP establish a temporary public presence",
1084 "that can be used by the FTP server to create a data channel.  By allowing",
1085 "the client to bind to a public port on the firewall and be aware of the",
1086 "public address, SOCKS 5 lets the application protocol communicate this",
1087 "information to the server.",
1088
1089 " ",
1090
1091 #ifdef OS2
1092 #ifdef NT
1093 "Kermit 95 supports SOCKS 4.2.  The SOCKS Server is specified with:",
1094 " ",
1095 "  SET TCP SOCKS-SERVER hostname/ip-address",
1096 " ",
1097 "The SOCKS.CONF file is found by examining the ETC environment variable;",
1098 "searching in \\WINDOWS on Windows 95/98/ME; or the",
1099 "\\WINDOWS\\SYSTEM\\DRIVERS\\ETC directory on NT\\2000\\XP systems.",
1100
1101 #else /* NT */
1102
1103 "Kermit/2 provides support for SOCKS 4.2 servers when using IBM TCP/IP 2.0,",
1104 "IBM OS/2 WARP, or a compatible protocol stack. SOCKS is one popular means",
1105 "of implementing a firewall between a private network and the Internet.",
1106 " ",
1107 "Kermit/2 shares the same SOCKS environment variables as IBM Gopher. It also",
1108 "supports the use of local SOCKS configuration files.",
1109 " ",
1110 "To specify the default SOCKS Server, add SET SOCKS_SERVER= to your",
1111 "CONFIG.SYS file.",
1112 " ",
1113 "If you must use a SOCKS Distributed Name Server, add SET SOCKS_NS= to your",
1114 "CONFIG.SYS file.",
1115 " ",
1116
1117 "If you must use a specific with your SOCKS server, be sure to add SET USER=",
1118 "to your CONFIG.SYS file. Otherwise, \"os2user\" is used by default.",
1119
1120 " ",
1121
1122 "The SOCKS configuration file must be placed in the directory pointed to by",
1123 "the ETC environment variable as declared in your CONFIG.SYS file. The name",
1124 "should be SOCKS.CONF. On a FAT file system, use SOCKS.CNF.",
1125
1126 " ",
1127 "The format of the lines in the SOCKS configuration file are as follows:",
1128 " ",
1129 " . # comments",
1130 " . deny [*=userlist] dst_addr dst_mask [op port]",
1131 " . direct [*=userlist] dst_addr dst_mask [op port]",
1132 " . sockd [@=serverlist] [*=userlist] dst_addr dst_mask [op port]",
1133 " ",
1134
1135 "op must be one of 'eq', 'neq', 'lt', 'gt', 'le', or 'ge'. dst_addr,",
1136 "dst_mask, and port may be either numeric or name equivalents.",
1137
1138 " ",
1139
1140 "Kermit/2 ignores the [*=userlist] and [@=serverlist] fields. Matches are",
1141 "determined on a first match not a best match basis. Addresses for which no",
1142 "match is found default to \"sockd\".",
1143
1144 " ",
1145
1146 "For completeness: Fields in square brackets are optional. The optional",
1147 "@=serverlist field with a 'sockd' line specifies the list of SOCKS servers",
1148 "the client should try (in the given order) instead of the default SOCKS",
1149 "server. If the @=serverlist part is omitted, then the default SOCKS server",
1150 "is used.  Commas are used in the userlist and serverlist as separators, no",
1151 "white spaces are allowed.",
1152
1153 #endif /* NT */
1154
1155 " ",
1156
1157 #else /* OS2 */
1158 #ifdef CK_SOCKS5
1159 "This version of C-Kermit supports SOCKS version 5.",
1160 #else /* CK_SOCKS5 */
1161 "This version of C-Kermit supports SOCKS version 4.",
1162 #endif /* CK_SOCKS5 */
1163
1164 "See the man page (or other system documentation) for information on",
1165 "configuring the SOCKS library via the /etc/socks.conf file.",
1166
1167 #endif /* OS2 */
1168 " ",
1169 #endif /* CK_SOCKS */
1170
1171 #ifdef NEWFTP
1172
1173 "FTP is one of the few well-known Internet services that requires",
1174 "multiple connections.  As described above, FTP originally required the",
1175 "server to establish the data connection to the client using a destination",
1176 "address and port provided by the client.  This doesn't work with port",
1177 "filtering firewalls.",
1178
1179 " ",
1180
1181 "Later, FTP protocol added a \"passive\" mode, in which connections for",
1182 "the data channels are created in the reverse direction.  Instead of the",
1183 "server establishing a connection to the client, the client makes a second",
1184 "connection with the server as the destination.  This works just fine as",
1185 "long as the client is behind the firewall and the server is in public",
1186 "address space.  If the server is behind a firewall then the traditional",
1187 "active mode must be used.  If both the client and server are behind their",
1188 "own port filtering firewalls then data channels cannot be established.",
1189
1190 " ",
1191
1192 "In Kermit's FTP client, passive mode is controlled with the command:",
1193
1194 " ",
1195 "  SET FTP PASSIVE-MODE { ON, OFF }",
1196 " ",
1197
1198 "The default is ON, meaning to use passive mode.",
1199
1200 #endif /* NEWFTP */
1201 #endif /* NOFIREWALL */
1202
1203 ""
1204 };
1205 #endif /* TCPSOCKET */
1206
1207 static char *hmxxsave[] = {
1208 "Syntax: SAVE item filename { NEW, APPEND }",
1209 "  Saves the requested material in the given file.  A new file is created",
1210 "  by default; include APPEND at the end of the command to append to an",
1211 "  existing file.  Items:",
1212 #ifndef NOSETKEY
1213 "    KEYMAP               Saves the current key settings.",
1214 #endif /* NOSETKEY */
1215 #ifdef CK_RECALL
1216 "    COMMAND HISTORY      Saves the current command recall (history) buffer",
1217 #endif /* CK_RECALL */
1218 #ifdef OS2
1219 "    COMMAND SCROLLBACK   Saves the current command-screen scrollback buffer",
1220 "    TERMINAL SCROLLBACK  Saves the current terminal-screen scrollback buffer",
1221 #endif /* OS2 */
1222 ""
1223 };
1224
1225 #ifdef CKROOT
1226 static char *hmxxchroot[] = {
1227 "Syntax: SET ROOT directoryname",
1228 "  Sets the root for file access to the given directory and disables access",
1229 "  to system and shell commands and external programs.  Once this command",
1230 "  is given, no files or directories outside the tree rooted by the given",
1231 "  directory can be opened, read, listed, deleted, renamed, or accessed in",
1232 "  any other way.  This command can not be undone by a subsequent SET ROOT",
1233 "  command.  Primarily for use with server mode, to restrict access of",
1234 "  clients to a particular directory tree.  Synonym: CHROOT.",
1235 ""
1236 };
1237 #endif /* CKROOT */
1238
1239 static char *hmxxscrn[] = {
1240 "Syntax: SCREEN { CLEAR, CLEOL, MOVE row column }",
1241 #ifdef OS2
1242 "  Performs screen-formatting actions.",
1243 #else
1244 "  Performs screen-formatting actions.  Correct operation of these commands",
1245 "  depends on proper terminal setup on both ends of the connection -- mainly",
1246 "  that the host terminal type is set to agree with the kind of terminal or",
1247 "  the emulation you are viewing C-Kermit through.",
1248 #endif /* OS2 */
1249 " ",
1250 "SCREEN CLEAR",
1251 "  Moves the cursor to home position and clears the entire screen.",
1252 #ifdef OS2
1253 "  Synonyms: CLS, CLEAR SCREEN, CLEAR COMMAND-SCREEN ALL",
1254 #else
1255 "  Synonyms: CLS, CLEAR SCREEN.",
1256 #endif /* OS2 */
1257 " ",
1258 "SCREEN CLEOL",
1259 "  Clears from the current cursor position to the end of the line.",
1260 #ifdef OS2
1261 "  Synonym: CLEAR COMMAND-SCREEN EOL",
1262 #endif /* OS2 */
1263 " ",
1264 "SCREEN MOVE row column",
1265 "  Moves the cursor to the indicated row and column.  The row and column",
1266 "  numbers are 1-based so on a 24x80 screen, the home position is 1 1 and",
1267 "  the lower right corner is 24 80.  If a row or column number is given that",
1268 "  too large for what Kermit or the operating system thinks is your screen",
1269 "  size, the appropriate number is substituted.",
1270 " ",
1271 "Also see:",
1272 #ifdef OS2
1273 "  HELP FUNCTION SCRNCURX, HELP FUNCTION SCRNCURY, HELP FUNCTION SCRSTR,",
1274 #endif /* OS2 */
1275 "  SHOW VARIABLE TERMINAL, SHOW VARIABLE COLS, SHOW VAR ROWS, SHOW COMMAND.",
1276 ""
1277 };
1278
1279 #ifndef NOSPL
1280 static char *hmfword[] = {
1281 "Function \\fword(s1,n1,s2,s3,n2,n3) - Extracts a word from a string.",
1282 "    s1 = source string.",
1283 "    n1 = word number (1-based) counting from left; if negative, from right.",
1284 "    s2 = optional break set.",
1285 "    s3 = optional include set (or ALL, CSV, or TSV).",
1286 "    n2 = optional grouping mask.",
1287 "    n3 = optional separator flag:",
1288 "       0 = collapse adjacent separators;",
1289 "       1 = don't collapse adjacent separators.",
1290 " ",
1291 "  \\fword() returns the n1th \"word\" of the string s1, according to the",
1292 "  criteria specified by the other parameters.",
1293 " ",
1294 "  The BREAK SET is the set of all characters that separate words. The",
1295 "  default break set is all characters except ASCII letters and digits.",
1296 "  ASCII (C0) control characters are treated as break characters by default,",
1297 "  as are spacing and punctuation characters, brackets, and so on, and",
1298 "  all 8-bit characters.",
1299 " ",
1300 "  The INCLUDE SET is the set of characters that are to be treated as ",
1301 "  parts of words even though they normally would be separators.  The",
1302 "  default include set is empty.  Three special symbolic include sets are",
1303 "  also allowed:",
1304 "   ",
1305 "    ALL (meaning include all bytes that are not in the break set)",
1306 "    CSV (special treatment for Comma-Separated-Value records)",
1307 "    TSV (special treatment for Tab-Separated-Value records)",
1308 " ",
1309 "  For operating on 8-bit character sets, the include set should be ALL.",
1310 " ",
1311 "  If the GROUPING MASK is given and is nonzero, words can be grouped by",
1312 "  quotes or brackets selected by the sum of the following:",
1313 " ",
1314 "     1 = doublequotes:    \"a b c\"",
1315 "     2 = braces:          {a b c}",
1316 "     4 = apostrophes:     'a b c'",
1317 "     8 = parentheses:     (a b c)",
1318 "    16 = square brackets: [a b c]",
1319 "    32 = angle brackets:  <a b c>",
1320 " ",
1321 "  Nesting is possible with {}()[]<> but not with quotes or apostrophes.",
1322 " ",
1323 "Returns string:",
1324 "  Word number n1, if there is one, otherwise an empty string.",
1325 " ",
1326 "Also see:",
1327 "  HELP FUNCTION SPLIT",
1328 ""
1329 };
1330
1331 static char *hmxxprompt[] = {
1332 "Syntax: PROMPT [ text ]",
1333 "  Enters interactive command level from within a script in such a way that",
1334 "  the script can be continued with an END or RETURN command.  STOP, EXIT,",
1335 "  SHOW STACK, TRACE, and Ctrl-C all have their normal effects.  The PROMPT",
1336 "  command allows variables to be examined or changed, or any other commands",
1337 "  to be given, in any number, prior to returning to the script, allowing",
1338 "  Kermit to serve as its own debugger; adding the PROMPT command to a script",
1339 "  is like setting a breakpoint.  If the optional text is included, it is",
1340 "  used as the new prompt for this level, e.g. \"prompt Breakpoint_1>\".",
1341 ""
1342 };
1343
1344 static char *hxxinp[] = {
1345 "Syntax:  INPUT [ /COUNT:n /CLEAR /NOMATCH /NOWRAP ] \
1346 { number-of-seconds, time-of-day } [ text ]",
1347 " ",
1348 "Examples:",
1349 "  INPUT 5 Login:",
1350 "  INPUT 23:59:59 RING",
1351 "  INPUT /NOMATCH 10",
1352 "  INPUT /CLEAR 10 \\13\\10",
1353 "  INPUT /CLEAR 10 \\13\\10$\32",
1354 "  INPUT /COUNT:256 10",
1355 "  INPUT 10 \\fpattern(<*@*.*>)",
1356 " ",
1357 "  Waits up to the given number of seconds, or until the given time of day,",
1358 "  for the given text to arrive on the connection. For use in script programs",
1359 "  with IF FAILURE or IF SUCCESS, which tell whether the desired text arrived",
1360 "  within the given amount of time.",
1361 " ",
1362 "  The text, if given, can be a regular text or it can be a \\pattern()",
1363 "  invocation, in which case it is treated as a pattern rather than a literal",
1364 "  string (HELP PATTERNS for details).",
1365 " ",
1366 "  If the /COUNT: switch is included, INPUT waits for the given number of",
1367 "  characters to arrive.",
1368 " ",
1369 "  If no text is specified, INPUT waits for the first character that arrives",
1370 "  and makes it available in the \\v(inchar) variable.  This is equivalent to",
1371 "  including a /COUNT: switch with an argument of 1.",
1372 " ",
1373 "  If the /NOMATCH switch is included, INPUT does not attempt to match any",
1374 "  characters, but continues reading from the communication connection until",
1375 "  the timeout interval expires.  If the timeout interval is 0, the INPUT",
1376 "  command does not wait; i.e. the given text must already be available for",
1377 "  reading for the INPUT command to succeed.  If the interval is negative,",
1378 "  the INPUT command waits forever.",
1379 " ",
1380 "  The INPUT buffer, \\v(input), is normally circular.  Incoming material is",
1381 "  appended to it until it reaches the end, and then it wraps around to the",
1382 "  beginning.  If the /CLEAR switch is given, INPUT clears its buffer before",
1383 "  reading from the connection.",
1384 " ",
1385 "  Typical example of use:",
1386 " ",
1387 "    INPUT 10 login:",
1388 "    IF FAIL EXIT 1 \"Timed out waiting for login prompt\"",
1389 "    LINEOUT myuserid",
1390 "    INPUT 10 Password:",
1391 "    IF FAIL EXIT 1 \"Timed out waiting for Password prompt\"",
1392 "    LINEOUT xxxxxxx",
1393 " ",
1394 "  The /NOWRAP switch means that INPUT should return with failure status",
1395 "  and with \\v(instatus) set to 6 if its internal buffer fills up before",
1396 "  any of the other completion criteria are met.  This allows for capture",
1397 "  of the complete incoming data stream (except NUL bytes, which are",
1398 "  discarded).  CAUTION: if the search target (if any) spans the INPUT buffer",
1399 "  boundary, INPUT will not succeed.",
1400 " ",
1401 "  \
1402 \\v(instatus) values are: 0 (success), 1 (timed out), 2 (keyboard interrupt),",
1403 "  3 (internal error), 4 (I/O error or connection lost), 5 (INPUT disabled),",
1404 "  and 6 (buffer filled and /NOWRAP set); these are shown by \\v(inmessage).",
1405 " ",
1406 "  Also see OUTPUT, MINPUT, REINPUT, SET INPUT and CLEAR.  See HELP PAUSE for",
1407 "  details on time-of-day format and HELP PATTERNS for pattern syntax.",
1408 ""};
1409
1410 static char *hxxout[] = {
1411 "Syntax: OUTPUT text",
1412 "  Sends the text out the communications connection, as if you had typed it",
1413 "  during CONNECT mode.  The text may contain backslash codes, variables,",
1414 "  etc, plus the following special codes:",
1415 " ",
1416 "    \\N - Send a NUL (ASCII 0) character (you can't use \\0 for this).",
1417 "    \\B - Send a BREAK signal.",
1418 "    \\L - Send a Long BREAK signal.",
1419 " ",
1420 "Also see SET OUTPUT.",
1421 "" };
1422 #endif /* NOSPL */
1423
1424 static char *hxypari[] = {
1425 "SET PARITY NONE",
1426 "  Chooses 8 data bits and no parity.",
1427 " ",
1428 "SET PARITY { EVEN, ODD, MARK, SPACE }",
1429 "  Chooses 7 data bits plus the indicated kind of parity.",
1430 "  Forces 8th-bit prefixing during file transfer.",
1431 " ",
1432 #ifdef HWPARITY
1433 "SET PARITY HARDWARE { EVEN, ODD }",
1434 "  Chooses 8 data bits plus the indicated kind of parity.",
1435 " ",
1436 "Also see SET TERMINAL BYTESIZE, SET SERIAL, and SET STOP-BITS.",
1437 #else
1438 "Also see SET TERMINAL BYTESIZE and SET SERIAL.",
1439 #endif /* HWPARITY */
1440 ""};
1441
1442 #ifndef NOLOCAL
1443 static char *hxyesc[] = {
1444 #ifdef OS2
1445 "Syntax: SET ESCAPE number",
1446 "  Decimal ASCII value for escape character during CONNECT, normally 29",
1447 "  (Control-]).  Type the escape character followed by C to get back to the",
1448 "  C-Kermit prompt or followed by ? to see other options, or use the \\Kexit",
1449 "  keyboard verb, normally assigned to Alt-x.",
1450 #else
1451 #ifdef NEXT
1452 "Syntax: SET ESCAPE number",
1453 "  Decimal ASCII value for escape character during CONNECT, normally 29",
1454 "  (Control-]).  Type the escape character followed by C to get back to the",
1455 "  C-Kermit prompt or followed by ? to see other options.",
1456 #else
1457 "Syntax: SET ESCAPE number",
1458 "  Decimal ASCII value for escape character during CONNECT, normally 28",
1459 "  (Control-\\).  Type the escape character followed by C to get back to the",
1460 "  C-Kermit prompt or followed by ? to see other options.",
1461 #endif /* NEXT */
1462 #endif /* OS2 */
1463 " ",
1464 "You may also enter the escape character as ^X (circumflex followed by a",
1465 "letter or one of: @, ^, _, [, \\, or ], to indicate a control character;",
1466 "for example, SET ESC ^_ sets your escape character to Ctrl-Underscore.",
1467 " ",
1468 "You can also specify an 8-bit character (128-255) as your escape character,",
1469 "either by typing it literally or by entering its numeric code.",
1470 "" };
1471 #endif /* NOLOCAL */
1472
1473 #ifndef NOSPL
1474 static char *hxyout[] = {
1475 "SET OUTPUT PACING <number>",
1476 "  How many milliseconds to pause after sending each OUTPUT character,",
1477 "  normally 0.",
1478 " ",
1479 "SET OUTPUT SPECIAL-ESCAPES { ON, OFF }",
1480 "  Whether to process the special OUTPUT-only escapes \\B, \\L, and \\N.",
1481 "  Normally ON (they are processed).",
1482 "" };
1483
1484 static char *hxyinp[] = {
1485 "Syntax: SET INPUT parameter value",
1486 " ",
1487 #ifdef CK_AUTODL
1488 "SET INPUT AUTODOWNLOAD { ON, OFF }",
1489 "  Controls whether autodownloads are allowed during INPUT command execution.",
1490 " ",
1491 #endif /* CK_AUTODL */
1492 "SET INPUT BUFFER-LENGTH number-of-bytes",
1493 "  Removes the old INPUT buffer and creates a new one with the given length.",
1494 " ",
1495 "SET INPUT CANCELLATION { ON, OFF }",
1496 "  Whether an INPUT in progress can be can interrupted from the keyboard.",
1497 " ",
1498 "SET INPUT CASE { IGNORE, OBSERVE }",
1499 "  Tells whether alphabetic case is to be significant in string comparisons.",
1500 "  This setting is local to the current macro or command file, and is",
1501 "  inherited by subordinate macros and take files.",
1502 " ",
1503 "SET INPUT ECHO { ON, OFF }",
1504 "  Tells whether to display arriving characters read by INPUT on the screen.",
1505 " ",
1506 #ifdef CKFLOAT
1507 "SET INPUT SCALE-FACTOR <number>",
1508 "  A number to multiply all INPUT timeouts by, which may include a fractional",
1509 "  part, e.g. 2.5.  All INPUT commands that specify a timeout in seconds",
1510 "  (as opposed to a specific time of day) have their time limit adjusted",
1511 "  automatically by this factor, which is also available in the built-in",
1512 "  read-only variable \\v(inscale).  The default value is 1.0.",
1513 " ",
1514
1515 #endif  /* CKFLOAT */
1516
1517 "SET INPUT SILENCE <number>",
1518 "  The maximum number to seconds of silence (no input at all) before the",
1519 "  INPUT command times out, 0 for no maximum.",
1520 " ",
1521 #ifdef OS2
1522 "SET INPUT TERMINAL { ON, OFF }",
1523 "  Determines whether the data received during an INPUT command is displayed",
1524 "  in the terminal window.  Default is ON.",
1525 " ",
1526 #endif /* OS2 */
1527 "SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }",
1528 "  Tells whether to proceed or quit from a script program if an INPUT command",
1529 "  fails.  PROCEED (default) allows use of IF SUCCESS / IF FAILURE commands.",
1530 "  This setting is local to the current macro or command file, and is",
1531 "  inherited by subordinate macros and take files.",
1532 "" };
1533
1534 static char *hxyfunc[] = {
1535 "SET FUNCTION DIAGNOSTICS { ON, OFF }",
1536 "  Whether to issue diagnostic messages for illegal function calls and",
1537 "  references to nonexistent built-in variables.  ON by default.",
1538 " ",
1539 "SET FUNCTION ERROR { ON, OFF }",
1540 "  Whether an illegal function call or reference to a nonexistent built-in",
1541 "  variable should cause a command to fail.  OFF by default.",
1542 "" };
1543 #endif /* NOSPL */
1544
1545 static char *hxyxyz[] = {
1546 #ifdef CK_XYZ
1547 #ifdef XYZ_INTERNAL
1548
1549 /* This is for built-in protocols */
1550
1551 "Syntax: SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 [ s3 ] ]",
1552 "  Selects protocol to use for transferring files.  String s1 is a command to",
1553 "  send to the remote host prior to SENDing files with this protocol in",
1554 "  binary mode; string s2 is the same thing but for text mode.  Use \"%s\" in",
1555 "  any of these strings to represent the filename(s).  If the protocol is",
1556 "  KERMIT, you may also specify a string s3, the command to start a Kermit",
1557 "  server on the remote host when you give a GET, REGET, REMOTE, or other",
1558 "  client command.  Use { braces } if any command contains spaces.  Examples:",
1559 " ",
1560 "    set proto xmodem {rx %s} {rx -a %s}",
1561 "    set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
1562
1563 #else /* This is for when non-Kermit protocols are external */
1564
1565 "Syntax: \
1566 SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 s3 s4 s5 s6 ]",
1567 "  Selects protocol to use for transferring files.  s1 and s2 are commands to",
1568 "  output prior to SENDing with this protocol, to automatically start the",
1569 "  RECEIVE process on the other end in binary or text mode, respectively.",
1570 "  If the protocol is KERMIT, s3 is the command to start a Kermit server on",
1571 "  the remote computer, and there are no s4-s6 commands.  Otherwise, s3 and",
1572 "  s4 are commands used on this computer for sending files with this protocol",
1573 "  in binary or text mode, respectively; s5 and s6 are the commands for",
1574 "  receiving files with this protocol.  Use \"%s\" in any of these strings",
1575 "  to represent the filename(s).  Use { braces } if any command contains",
1576 "  spaces.  Examples:",
1577 " ",
1578 "    set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
1579 "    set proto ymodem rb {rb -a} {sb %s} {sb -a %s} rb rb",
1580 " ",
1581 "External protocols require REDIRECT and external file transfer programs that",
1582 "use redirectable standard input/output.",
1583 #endif /* XYZ_INTERNAL */
1584 #else
1585 "Syntax: \
1586 SET PROTOCOL KERMIT [ s1 [ s2 [ s3 ] ] ]",
1587 "  Lets you specify the autoupload binary, autoupload text, and autoserver",
1588 "  command strings to be sent to the remote system in advance of any SEND",
1589 "  or GET commands.  By default these are \"kermit -ir\", \"kermit -r\", and",
1590 "  \"kermit -x\".  Use { braces } around any command that contains spaces.",
1591 "  Example:",
1592 " ",
1593 "    set proto kermit {kermit -Yir} {kermit -YTr} {kermit -Yx}",
1594 #endif /* CK_XYZ */
1595 " ",
1596 "  SHOW PROTOCOL displays the current settings.",
1597 ""};
1598
1599 static char *hmxxbye = "Syntax: BYE\n\
1600   Shut down and log out a remote Kermit server";
1601
1602 #ifdef CK_PERMS
1603 #ifdef UNIX
1604 static char *hmxxchmod[] = {
1605 "Syntax: CHMOD [ switches ] code filespec",
1606 "  UNIX only.  Changes permissions of the given file(s) to the given code,",
1607 "  which must be an octal number such as 664 or 775.  Optional switches:",
1608 " ",
1609 "   /FILES        Only change permissions of regular files.",
1610 "   /DIRECTORIES  Only change permissions of directory files.",
1611 "   /TYPE:BINARY  Only change permissions of binary files.",
1612 "   /TYPE:TEXT    Only change permissions of text files.",
1613 "   /DOTFILES     Include files whose names begin with dot (.).",
1614 "   /RECURSIVE    Change permissions in subdirectories too.",
1615 "   /LIST         List each file (synonym: /VERBOSE).",
1616 "   /NOLIST       Operate silently (synonym: /QUIET).",
1617 "   /PAGE         When listing, pause at end of each screen (implies /LIST).",
1618 "   /NOPAGE       When listing, don't pause at end of each screen.",
1619 "   /SIMULATE     Show what would be done but don't actually do it.",
1620 ""
1621 };
1622 #endif /* UNIX */
1623 #endif /* CK_PERMS */
1624
1625 #ifndef NOSPL
1626 #ifndef NOSEXP
1627 static char *hmxxsexp[] = {
1628 "Syntax: (operation operand [ operand [ ... ] ])",
1629 " ",
1630 "  C-Kermit includes a simple LISP-like S-Expression parser operating on",
1631 "  numbers only.  An S-Expression is always enclosed in parentheses.  The",
1632 "  parentheses can contain (a) a number, (b) a variable, (c) a function that",
1633 "  returns a number, or (d) an operator followed by one or more operands.",
1634 "  Operands can be any of (a) through (c) or an S-Expression.  Numbers can be",
1635 "  integers or floating-point.  Any operand that is not a number and does not",
1636 "  start with backslash (\\) is treated as a Kermit macro name.  Operators:",
1637 " ",
1638 " Operator  Action                                 Example           Value",
1639 "  EVAL (.)  Returns the contained value            (6)               6",
1640 "  QUOTE (') Inhibits evaluation of following value (quote a)         a",
1641 "  SETQ      Assigns a value to a global variable   (setq a 2)        2",
1642 "  LET       Assigns a value to a local variable    (let b -1.3)     -1.3",
1643 "  +         Adds all operands (1 or more)          (+ a b)           0.7",
1644 "  -         Subtracts all operands (1 or more)     (- 9 5 2 1)       1",
1645 "  *         Multiplies all operands (1 or more)    (* a (+ b 1) 3)  -1.8",
1646 "  /         Divides all operands (1 or more)       (/ b a 2)        -0.325",
1647 "  ^         Raise given number to given power      (^ 3 2)           9",
1648 "  ++        Increments a variable                  (++ a 1.2)        3.2",
1649 "  --        Decrements a variable                  (-- a)            1",
1650 "  ABS       Absolute value of 1 operand            (abs (* a b 3))   7.8",
1651 "  MAX       Maximum of all operands (1 or more)    (max 1 2 3 4)     4",
1652 "  MIN       Minimum of all operands (1 or more)    (min 1 2 3 4)     1",
1653 "  MOD       Modulus of all operands (1 or more)    (mod 7 4 2)       1",
1654 "  TRUNCATE  Integer part of floating-point operand (truncate 1.333)  1",
1655 "  CEILING   Ceiling of floating-point operand      (ceiling 1.25)    2",
1656 "  FLOOR     Floor of floating-point operand        (floor 1.25)      1",
1657 "  ROUND     Operand rounded to nearest integer     (round 1.75)      2",
1658 "  SQRT      Square root of 1 operand               (sqrt 2)          1.414..",
1659 "  EXP       e (2.71828..) to the given power       (exp -1)          0.367..",
1660 "  SIN       Sine of angle expressed in radians     (sin (/ pi 2))    1.0",
1661 "  COS       Cosine of given number                 (cos pi)         -1.0",
1662 "  TAN       Tangent of given number                (tan pi)          0.0",
1663 "  LOG       Natural log (base e) of given number   (log 2.7183)      1.000..",
1664 "  LOG10     Log base 10 of given number            (log10 1000)      3.0",
1665 " ",
1666 "Predicate operators return 0 if false, 1 if true, and if it is the outermost",
1667 "operator, sets SUCCESS or FAILURE accordingly:",
1668 " ",
1669 "  <         Operands in strictly descending order  (< 6 5 4 3 2 1)   1",
1670 "  <=        Operands in descending order           (<= 6 6 5 4 3 2)  1",
1671 "  !=        Operands are not equal                 (!= 1 1 1.0)      0",
1672 "  =   (==)  All operands are equal                 (= 3 3 3 3)       1",
1673 "  >         Operands in strictly ascending order   (> 1 2 3 4 5 6)   1",
1674 "  >=        Operands in ascending order            (> 1 1 2 3 4 5)   1",
1675 "  AND (&&)  Operands are all true                  (and 1 1 1 1 0)   0",
1676 "  OR  (||)  At least one operand is true           (or 1 1 1 1 0)    1",
1677 "  XOR       Logical Exclusive OR                   (xor 3 1)         0",
1678 "  NOT (!)   Reverses truth value of operand        (not 3)           0",
1679 " ",
1680 "Bit-oriented operators:",
1681 " ",
1682 "  &         Bitwise AND                            (& 7 2)           2",
1683 "  |         Bitwise OR                             (| 1 2 3 4)       7",
1684 "  #         Bitwise Exclusive OR                   (# 3 1)           2",
1685 "  ~         Reverses all bits                      (~ 3)            -4",
1686 " ",
1687 "Operators that work on truth values:",
1688 " ",
1689 "  IF        Conditional evaluation                 (if (1) 2 3)      2",
1690 " ",
1691 "Operators can also be names of Kermit macros that return either numeric",
1692 "values or no value at all.",
1693 " ",
1694 "Built-in constants are:",
1695 " ",
1696 "  t         True (1)",
1697 "  nil       False (empty)",
1698 "  pi        The value of Pi (3.1415926...)",
1699 " ",
1700 "If SET SEXPRESSION TRUNCATE-ALL-RESULTS is ON, all results are trunctated",
1701 "to integer values by discarding any fractional part.  Otherwise results",
1702 "are floating-point if there fractional part and integer otherwise.",
1703 "If SET SEXPRESSION ECHO-RESULT is AUTO (the default), the value of the",
1704 "S-Expression is printed if the S-Expression is given at top level; if ON,",
1705 "it is printed at any level; if OFF it is not printed.  At all levels, the",
1706 "variable \\v(sexpression) is set to the most recent S-Expression, and",
1707 "\\v(svalue) is set to its value.  You can use the \\fsexpresssion() function",
1708 "to evaluate an S-Expression anywhere in a Kermit command.",
1709 ""
1710 };
1711 #endif /* NOSEXP */
1712 #endif /* NOSPL */
1713
1714 static char *hmxxgrep[] = {
1715 #ifdef UNIXOROSK
1716 "Syntax: GREP [ options ] pattern filespec",
1717 #else
1718 "Syntax: FIND [ options ] pattern filespec",
1719 #endif /* UNIXOROSK */
1720 "  Searches through the given file or files for the given character string",
1721 "  or pattern.  In the normal case, all lines containing any text that matches"
1722 ,
1723 "  the pattern are printed.  Pattern syntax is as described in HELP PATTERNS",
1724 "  except that '*' is implied at the beginning unless the pattern starts with",
1725 "  '^' and also at the end unless the pattern ends with '$'.  Therefore,",
1726 "  \"grep something *.txt\" lists all lines in all *.txt files that contain",
1727 "  the word \"something\", but \"grep ^something *.txt\" lists only the lines",
1728 "  that START with \"something\".  The command succeeds if any of the given",
1729 "  files contained any lines that match the pattern, otherwise it fails.",
1730 #ifdef UNIXOROSK
1731 "  Synonym: FIND.",
1732 #else
1733 "  Synonym: GREP.",
1734 #endif /* UNIXOROSK */
1735 " ",
1736 "File selection options:",
1737 "  /NOBACKUPFILES",
1738 "    Excludes backup files (like oofa.txt.~3~) from the search.",
1739 "  /DOTFILES",
1740 "    Includes files whose names start with dot (.) in the search.",
1741 "  /NODOTFILES",
1742 "    Excludes files whose names start with dot (.) from the search.",
1743 #ifdef RECURSIVE
1744 "  /RECURSIVE",
1745 "    Searches through files in subdirectories too.",
1746 #endif /* RECURSIVE */
1747 "  /TYPE:TEXT",
1748 "    Search only text files (requires FILE SCAN ON).",
1749 "  /TYPE:BINARY",
1750 "    Search only binary files (requires FILE SCAN ON).",
1751 " ",
1752 "Pattern-matching options:",
1753 "  /NOCASE",
1754 "    Ignores case of letters (ASCII only) when comparing.",
1755 "  /NOMATCH",
1756 "    Searches for lines that do NOT match the pattern.",
1757 "  /EXCEPT:pattern",
1758 "    Exclude lines that match the main pattern that also match this pattern.",
1759 " ",
1760 "Display options:",
1761 "  /COUNT:variable-name",
1762 "    For each file, prints only the filename and a count of matching lines",
1763 "    and assigns the total match count to the variable, if one is given.",
1764 "  /NAMEONLY",
1765 "    Prints the name of each file that contains at least one matching line,",
1766 "    one name per line, rather than showing each matching line.",
1767 "  /NOLIST",
1768 "    Doesn't print anything (but sets SUCCESS or FAILURE appropriately).",
1769 "  /LINENUMBERS",
1770 "    Precedes each file line by its line number within the file.",
1771 "  /PAGE",
1772 "    Pauses after each screenful.",
1773 "  /NOPAGE",
1774 "    Doesn't pause after each screenful.",
1775 "  /OUTPUT:name",
1776 "    Sends results to the given file.  If this switch is omitted, the",
1777 "    results appear on your screen.  This switch overrides any express or",
1778 "    implied /PAGE switch.",
1779 ""};
1780
1781 static char *hmxxdir[] = {
1782 #ifdef DOMYDIR
1783 "Syntax: DIRECTORY [ switches ] [ filespec [ filespec [ ... ] ] ]",
1784 #ifdef LOCUS
1785 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
1786 "  this command is equivalent to REMOTE DIRECTORY (RDIR).  Otherwise:",
1787 " ",
1788 #endif /* LOCUS */
1789 "  Lists local files.  The filespec may be a filename, possibly containing",
1790 "  wildcard characters, or a directory name.  If no filespec is given, all",
1791 "  files in the current directory are listed.  If a directory name is given,",
1792 "  all the  files in it are listed.  Multiple filespecs can be given.",
1793 "  Optional switches:",
1794 " ",
1795 "   /BRIEF           List filenames only.",
1796 #ifdef CK_PERMS
1797 "   /VERBOSE       + Also list permissions, size, and date.",
1798 #else
1799 "   /VERBOSE       + Also list date and size.",
1800 #endif /* CK_PERMS */
1801 "   /FILES           Show files but not directories.",
1802 "   /DIRECTORIES     Show directories but not files.",
1803 "   /ALL           + Show both files and directories.",
1804 "   /ARRAY:&a        Store file list in specified array (e.g. \\%a[]).",
1805 "   /PAGE            Pause after each screenful.",
1806 "   /NOPAGE          Don't pause after each screenful.",
1807 "   /TOP:n           Only show the top n lines of the directory listing.",
1808 #ifdef UNIXOROSK
1809 "   /DOTFILES        Include files whose names start with dot (period).",
1810 "   /NODOTFILES    + Don't include files whose names start with dot.",
1811 "   /FOLLOWLINKS     Follow symbolic links.",
1812 "   /NOFOLLOWLINKS + Don't follow symbolic links.",
1813 "   /NOLINKS         Don't list symbolic links at all.",
1814 "   /BACKUP        + Include backup files (names end with .~n~).",
1815 "   /NOBACKUPFILES   Don't include backup files.",
1816 #endif /* UNIXOROSK */
1817 "   /OUTPUT:file     Store directory listing in the given file.",
1818 "   /HEADING         Include heading and summary.",
1819 "   /NOHEADING     + Don't include heading or summary.",
1820 "   /COUNT:var       Put the number of matching files in the given variable.",
1821 "   /SUMMARY         Print only count and total size of matching files.",
1822 "   /XFERMODE        Show pattern-based transfer mode (T=Text, B=Binary).",
1823 "   /TYPE:           Show only files of the specified type (text or binary).",
1824 "   /MESSAGE:text    Add brief message to each listing line.",
1825 "   /NOMESSAGE     + Don't add message to each listing line.",
1826 "   /NOXFERMODE    + Don't show pattern-based transfer mode",
1827 "   /ISODATE       + In verbose listings, show date in ISO 8061 format.",
1828 "   /ENGLISHDATE     In verbose listings, show date in \"English\" format.",
1829 #ifdef RECURSIVE
1830 "   /RECURSIVE       Descend through subdirectories.",
1831 "   /NORECURSIVE   + Don't descend through subdirectories.",
1832 #endif /* RECURSIVE */
1833 "   /SORT:key        Sort by key, NAME, DATE, or SIZE; default key is NAME.",
1834 "   /NOSORT        + Don't sort.",
1835 "   /ASCENDING     + If sorting, sort in ascending order.",
1836 "   /REVERSE         If sorting, sort in reverse order.",
1837 " ",
1838 "Factory defaults are marked with +.  Default for paging depends on SET",
1839 "COMMAND MORE-PROMPTING.  Use SET OPTIONS DIRECTORY [ switches ] to change",
1840 "defaults; use SHOW OPTIONS to display customized defaults.  Also see",
1841 "WDIRECTORY.",
1842 #else
1843 "Syntax: DIRECTORY [ filespec ]",
1844 "  Lists the specified file or files.  If no filespec is given, all files",
1845 "  in the current directory are listed.",
1846 #endif /* DOMYDIR */
1847 ""};
1848
1849 static char *hmxxtouc[] = {
1850 "Syntax: TOUCH [ switches ] filespec",
1851 "  Updates the modification time of the given file or files to the current",
1852 "  date and time.  If the filespec is the name of a single file that does not",
1853 "  exist, the file is created.  The optional switches are the same as for",
1854 "  the DIRECTORY command.  TOUCH operates silently unless the /VERBOSE",
1855 "  switch is given, in which case it lists each file it affects.",
1856 ""};
1857
1858 #ifndef NOSPL
1859 static char *hmxxkcd[] = {
1860 "Syntax: KCD symbolic-directory-name",
1861 "  Kermit Change Directory: Like CD (q.v.) but (a) always acts locally, and",
1862 "  (b) takes a symbolic directory name rather than an actual directory name.",
1863 "  The symbolic names correspond to Kermit's directory-valued built-in",
1864 "  variables, such as \\v(download), \\v(exedir), and so on.  Here's the list:"
1865 ,
1866 " ",
1867 #ifdef NT
1868 "    appdata       Your personal Kermit 95 application data directory",
1869 "    common        Kermit 95's application data directory for all users",
1870 "    desktop       Your Windows desktop",
1871 #endif /* NT */
1872 "    download      Your download directory (if any)",
1873 #ifdef OS2ORUNIX
1874 "    exedir        The directory where the Kermit executable resides",
1875 #endif /* OS2ORUNIX */
1876 "    home          Your home, login, or default directory",
1877 "    inidir        The directory where Kermit's initialization was found",
1878 #ifdef UNIX
1879 "    lockdir       The UNIX UUCP lockfile directory on this computer",
1880 #endif /* UNIX */
1881 #ifdef NT
1882 "    personal      Your \"My Documents\" directory",
1883 #endif /* NT */
1884 "    startup       Your current directory at the time Kermit started",
1885 "    textdir       The directory where Kermit text files reside, if any",
1886 "    tmpdir        Your temporary directory",
1887 " ",
1888 "  Also see CD, SET FILE DOWNLOAD, SET TEMP-DIRECTORY.",
1889 ""
1890 };
1891 #endif /* NOSPL */
1892
1893 static char *hmxxcwd[] = {
1894 #ifdef LOCUS
1895 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
1896 "  this command is equivalent to REMOTE CD (RCD).  Otherwise:",
1897 " ",
1898 #endif /* LOCUS */
1899 #ifdef vms
1900 "Syntax: CD [ directory or device:directory ]",
1901 "  Change Working Directory.  Equivalent to VMS SET DEFAULT command.",
1902 #else
1903 #ifdef datageneral
1904 "Change Working Directory, equivalent to AOS/VS 'dir' command.",
1905 #else
1906 #ifdef OS2
1907 "Syntax: CD [ disk or directory name ]",
1908 "  Change Disk or Directory.  If a disk or directory name is not specified,",
1909 "  your current directory becomes the one specified by HOME environment",
1910 "  variable, if any.  A disk letter must be followed by a colon.",
1911 #else
1912 "Syntax: CD [ directory name ]",
1913 "  Change Directory.  Changes your current, working, default directory to the",
1914 "  one given, so that future non-absolute filename references are relative to",
1915 "  this directory.  If the directory name is omitted, your home (login)",
1916 "  directory is supplied.",
1917 #endif /* OS2 */
1918 #endif /* datageneral */
1919 #endif /* vms */
1920 "  C-Kermit's default prompt shows your current directory.",
1921 "  Synonyms: LCD, CWD.",
1922 #ifdef LOCUS
1923 "  Also see: SET LOCUS, PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
1924 #else
1925 "  Also see: PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
1926 #endif /* LOCUS */
1927 #ifndef NOSPL
1928 "  And see: HELP KCD.",
1929 #endif /* NOSPL */
1930 "  Relevant environment variables: CDPATH, HOME.",
1931 ""};
1932
1933 static char *hmxxdel[] = {
1934 "Syntax: DELETE [ switches... ] filespec",
1935 #ifdef LOCUS
1936 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
1937 "  this command is equivalent to REMOTE DELETE (RDELETE).  Otherwise:",
1938 " ",
1939 #endif /* LOCUS */
1940 "  Deletes a file or files on the computer where C-Kermit is running.",
1941 "  The filespec may denote a single file or can include wildcard characters",
1942 "  to match multiple files.  RM is a synonym for DELETE.  Switches include:",
1943 " ",
1944 "/AFTER:date-time",
1945 #ifdef VMS
1946 "  Specifies that only those files created after the given date-time are",
1947 #else
1948 "  Specifies that only those files modified after the given date-time are",
1949 #endif /* VMS */
1950 "  to be deleted.  HELP DATE for info about date-time formats.",
1951 " ",
1952 "/BEFORE:date-time",
1953 #ifdef VMS
1954 "  Specifies that only those files modified before the given date-time",
1955 #else
1956 "  Specifies that only those files modified before the given date-time",
1957 #endif /* VMS */
1958 "  are to be deleted.",
1959 " ",
1960 "/NOT-AFTER:date-time",
1961 #ifdef VMS
1962 "  Specifies that only those files modified at or before the given date-time",
1963 #else
1964 "  Specifies that only those files modified at or before the given date-time",
1965 #endif /* VMS */
1966 "  are to be deleted.",
1967 " ",
1968 "/NOT-BEFORE:date-time",
1969 #ifdef VMS
1970 "  Specifies that only those files modified at or after the given date-time",
1971 #else
1972 "  Specifies that only those files modified at or after the given date-time",
1973 #endif /* VMS */
1974 "  are to be deleted.",
1975 " ",
1976 "/LARGER-THAN:number",
1977 "  Specifies that only those files longer than the given number of bytes are",
1978 "  to be deleted.",
1979 " ",
1980 "/SMALLER-THAN:number",
1981 "  Specifies that only those files smaller than the given number of bytes are",
1982 "  to be sent.",
1983 " ",
1984 "/EXCEPT:pattern",
1985 "  Specifies that any files whose names match the pattern, which can be a",
1986 "  regular filename or may contain wildcards, are not to be deleted.  To",
1987 "  specify multiple patterns (up to 8), use outer braces around the group",
1988 "  and inner braces around each pattern:",
1989 " ",
1990 "    /EXCEPT:{{pattern1}{pattern2}...}",
1991 " ",
1992 #ifdef UNIXOROSK
1993 "/DOTFILES",
1994 "  Include (delete) files whose names begin with \".\".",
1995 " ",
1996 "/NODOTFILES",
1997 "  Skip (don't delete) files whose names begin with \".\".",
1998 " ",
1999 #endif /* UNIXOROSK */
2000 "/TYPE:TEXT",
2001 "  Delete only regular text files (requires FILE SCAN ON)",
2002 " ",
2003 "/TYPE:BINARY",
2004 "  Delete only regular binary files (requires FILE SCAN ON)",
2005 " ",
2006 "/DIRECTORIES",
2007 "  Include directories.  If this switch is not given, only regular files",
2008 "  are deleted.  If it is given, Kermit attempts to delete any directories",
2009 "  that match the given file specification, which succeeds only if the",
2010 "  directory is empty.",
2011 " ",
2012 #ifdef RECURSIVE
2013 "/RECURSIVE",
2014 "  The DELETE command applies to the entire directory tree rooted in the",
2015 "  current or specified directory.  When the /DIRECTORIES switch is also",
2016 "  given, Kermit deletes all the (matching) files in each directory before",
2017 "  attempting to delete the directory itself.",
2018 " ",
2019 #endif /* RECURSIVE */
2020 #ifdef UNIX
2021 #ifdef RECURSIVE
2022 "/ALL",
2023 "  This is a shortcut for /RECURSIVE /DIRECTORIES /DOTFILES.",
2024 #else
2025 "/ALL",
2026 "  This is a shortcut for /DIRECTORIES /DOTFILES.",
2027 #endif /* RECURSIVE */
2028 #else  /* !UNIX */
2029 #ifdef RECURSIVE
2030 "/ALL",
2031 "  This is a shortcut for /RECURSIVE /DIRECTORIES.",
2032 #else
2033 "/ALL",
2034 "  This is a synonym for /DIRECTORIES.",
2035 #endif /* RECURSIVE */
2036 #endif /* UNIX */
2037 " ",
2038 "/LIST",
2039 "  List each file and tell whether it was deleted.  Synonyms: /LOG, /VERBOSE.",
2040 " ",
2041 "/NOLIST",
2042 "  Don't list files while deleting.  Synonyms: /NOLOG, /QUIET.",
2043 " ",
2044 "/HEADING",
2045 "  Print heading and summary information.",
2046 " ",
2047 "/NOHEADING",
2048 "  Don't print heading and summary information.",
2049 " ",
2050 "/SUMMARY",
2051 "  Like /HEADING /NOLIST, but only prints the summary line.",
2052 " ",
2053 "/PAGE",
2054 "  If listing, pause after each screenful.",
2055 " ",
2056 "/NOPAGE",
2057 "  Don't pause after each screenful.",
2058 " ",
2059 "/ASK",
2060 "  Interactively ask permission to delete each file.  Reply Yes or OK to",
2061 "  delete it, No not to delete it, Quit to cancel the DELETE command, and",
2062 "  Go to go ahead and delete all the rest of the files without asking.",
2063 " ",
2064 "/NOASK",
2065 "  Delete files without asking permission.",
2066 " ",
2067 "/SIMULATE",
2068 "  Preview files selected for deletion without actually deleting them.",
2069 "  Implies /LIST.",
2070 " ",
2071 "Use SET OPTIONS DELETE to make selected switches effective for every DELETE",
2072 "command \
2073 unless you override them; use SHOW OPTIONS to see selections currently",
2074 #ifdef LOCUS
2075 "in effect.  Also see HELP SET LOCUS, HELP PURGE, HELP WILDCARD.",
2076 #else
2077 "in effect.  Also see HELP PURGE, HELP WILDCARD.",
2078 #endif /* LOCUS */
2079 ""};
2080
2081 #ifndef NOHTTP
2082 static char *hmxxhttp[] = {
2083 "Syntax:",
2084 #ifdef CK_SSL
2085 "HTTP [ <switches> ] OPEN [{ /SSL, /TLS }] <hostname> <service/port>",
2086 #else
2087 "HTTP [ <switches> ] OPEN <hostname> <service/port>",
2088 #endif /*CK_SSL */
2089 "  Instructs Kermit to open a new connection for HTTP communication with",
2090 "  the specified host on the specified port.  The default port is \"http\".",
2091 #ifdef CK_SSL
2092 "  If /SSL or /TLS are specified or if the service is \"https\" or port 443,",
2093 "  a secure connection will be established using the current authentication",
2094 "  settings.  See HELP SET AUTH for details.",
2095 #endif /* CK_SSL */
2096 "  If <switches> are specified, they are applied to all subsequent HTTP",
2097 "  actions (GET, PUT, ...) until an HTTP CLOSE command is executed.",
2098 "  A URL can be included in place of the hostname and service or port.",
2099 " ",
2100 "HTTP CLOSE",
2101 "  Instructs Kermit to close any open HTTP connection and clear any saved",
2102 "  switch values.",
2103 " ",
2104 "HTTP [ <switches> ] CONNECT <host>[:<port>]",
2105 "  Instructs the server to establish a connection with the specified host",
2106 "  and to redirect all data transmitted between Kermit and the host for the",
2107 "  life of the connection.",
2108 " ",
2109 "HTTP [ <switches> ] GET <remote-filename> [ <local-filename> ]",
2110 "  Retrieves the named file on the currently open HTTP connection.  The",
2111 "  default local filename is the same as the remote filename, but with any",
2112 "  path stripped.  If you want the file to be displayed on the screen instead",
2113 "  of stored on disk, include the /TOSCREEN switch and omit the local",
2114 "  filename.  If you give a URL instead of a remote filename, this commands",
2115 "  opens the connection, GETs the file, and closes the connection; the same",
2116 "  is true for the remaining HTTP commands for which you can specify a",
2117 "  remote filename, directory name, or path.",
2118 " ",
2119 "HTTP [ <switches> ] HEAD <remote-filename> [ <local-filename> ]",
2120 "  Like GET except without actually getting the file; instead it gets only",
2121 "  the headers, storing them into the given file (if a local filename is",
2122 "  specified), one line per header item as shown in the /ARRAY: switch",
2123 "  description.",
2124 " ",
2125 "HTTP [ <switches> ] INDEX <remote-directory> [ <local-filename> ]",
2126 "  Retrieves the file listing for the given server directory.",
2127 "  NOTE: This command is not supported by most Web servers, and even when",
2128 "  the server understand it, there is no stardard response format.",
2129 " ",
2130 "HTTP [ <switches> ] POST [ /MIME-TYPE:<type> ] <local-file> <remote-path>",
2131 "     [ <dest-file> ]",
2132 "  Used to send a response as if it were sent from a form.  The data to be",
2133 "  posted must be read from a file.",
2134 " ",
2135 "HTTP [ <switches> ] PUT [ /MIME-TYPE:<type> ] <local-file> <remote-file>",
2136 "     [ <dest-file> ]",
2137 "  Uploads the given local file to server file.  If the remote filename is",
2138 "  omitted, the local name is used, but with any path stripped.",
2139 " ",
2140 "HTTP [ <switches> ] DELETE <remote-filename>",
2141 "  Instructs the server to delete the specified filename.",
2142 " ",
2143 "where <switches> are:",
2144 "/AGENT:<user-agent>",
2145 "  Identifies the client to the server; \"C-Kermit\" or \"Kermit-95\"",
2146 "  by default.",
2147 " ",
2148 "/HEADER:<header-line>",
2149 "  Used for specifying any optional headers.  A list of headers is provided",
2150 "  using braces for grouping:",
2151 " ",
2152 "    /HEADER:{{<tag>:<value>}{<tag>:<value>}...}",
2153 " ",
2154 "  For a listing of valid <tag> value and <value> formats see RFC 1945:",
2155 "  \"Hypertext Transfer Protocol -- HTTP/1.0\".  A maximum of eight headers",
2156 "  may be specified.",
2157 " ",
2158 "/TOSCREEN",
2159 "  Display server responses on the screen.",
2160 " ",
2161 "/USER:<name>",
2162 "  In case a page requires a username for access.",
2163 " ",
2164 "/PASSWORD:<password>",
2165 "  In case a page requires a password for access.",
2166 " ",
2167 "/ARRAY:<arrayname>",
2168 "  Tells Kermit to store the response headers in the given array, one line",
2169 "  per element.  The array need not be declared in advance.  Example:",
2170 " ",
2171 "    http /array:c get kermit/index.html",
2172 "    show array c",
2173 "    Dimension = 9",
2174 "    1. Date: Fri, 26 Nov 1999 23:12:22 GMT",
2175 "    2. Server: Apache/1.3.4 (Unix)",
2176 "    3. Last-Modified: Mon, 06 Sep 1999 22:35:58 GMT",
2177 "    4. ETag: \"bc049-f72-37d441ce\"",
2178 "    5. Accept-Ranges: bytes",
2179 "    6. Content-Length: 3954",
2180 "    7. Connection: close     ",
2181 "    8. Content-Type: text/html",
2182 " ",
2183 "As you can see, the header lines are like MIME e-mail header lines:",
2184 "identifier, colon, value.  The /ARRAY switch is the only method available",
2185 "to a script to process the server responses for a POST or PUT command.",
2186 " ",
2187 ""
2188 };
2189 #endif /* NOHTTP */
2190
2191 #ifdef CK_KERBEROS
2192 static char *hmxxauth[] = {
2193 "Syntax:",
2194 "AUTHENTICATE { KERBEROS4, KERBEROS5 [ switches ] } <action> [ switches ]",
2195 "  Obtains or destroys Kerberos tickets and lists information about them.",
2196 "  Actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS.  KERBEROS4 can be",
2197 "  abbreviated K4 or KRB4; KERBEROS5 can be abbreviated K5 or KRB5.  Use ? to",
2198 "  see which keywords, switches, or other quantities are valid at each point",
2199 "  in the command.",
2200 " ",
2201 "  The actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS:",
2202 " ",
2203 "    AUTH { K4, K5 } { INITIALIZE [switches], DESTROY,",
2204 "      LIST-CREDENTIALS [switches] }",
2205 " ",
2206 "  The INITIALIZE action is the most complex, and its format is different",
2207 "  for Kerberos 4 and Kerberos 5.  The format for Kerberos 4 is:",
2208 " ",
2209 "  AUTH K4 INITIALIZE [ /INSTANCE:<name> /LIFETIME:<minutes> -",
2210 "    /PASSWORD:<password> /PREAUTH /REALM:<name> <principal> ]",
2211 " ",
2212 "  All switches are optional.  Kerberos 4 INITIALIZE switches are:",
2213 " ",
2214 "  /INSTANCE:<name>",
2215 "    Allows an Instance (such as a hostname) to be specified.",
2216 " ",
2217 "  /LIFETIME:<number>",
2218 "    Specifies the requested lifetime in minutes for the ticket.  If no",
2219 "    lifetime is specified, 600 minutes is used.  If the lifetime is greater",
2220 "    than the maximum supported by the ticket granting service, the resulting",
2221 "    lifetime is shortened accordingly.",
2222 " ",
2223 "  /NOT-PREAUTH",
2224 "    Instructs Kermit to send a ticket getting ticket (TGT) request to the",
2225 "    KDC without any preauthentication data.",
2226 " ",
2227 "  /PASSWORD:<string>",
2228 "    Allows a password to be included on the command line or in a script",
2229 "    file.  If no /PASSWORD switch is included, you are prompted on a separate"
2230 ,
2231 "    line.  The password switch is provided on a use-at-your-own-risk basis",
2232 "    for use in automated scripts.  WARNING: Passwords should not be stored in"
2233 ,
2234 "    files.",
2235 " ",
2236 "  /PREAUTH",
2237 "    Instructs Kermit to send a preauthenticated Ticket-Getting Ticket (TGT)",
2238 "    request to the KDC instead of a plaintext request.  The default when",
2239 "    supported by the Kerberos libraries.",
2240 " ",
2241 "  /REALM:<name>",
2242 "    Allows a realm to be specified (overriding the default realm).",
2243 " ",
2244 "  <principal>",
2245 "    Your identity in the given or default Kerberos realm, of the form:",
2246 "    userid[.instance[.instance]]@[realm]  ",
2247 "    Can be omitted if it is the same as your username or SET LOGIN USERID",
2248 "    value on the client system.",
2249 " ",
2250 "  The format for Kerberos 5 is as follows:",
2251 " ",
2252 "  AUTH K5 [ /CACHE:<filename> ] { INITIALIZE [ switches ], DESTROY,",
2253 "    LIST-CREDENTIALS ...}",
2254 " ",
2255 "The INITIALIZE command for Kerberos 5 can include a number of switches;",
2256 "all are optional:",
2257 " ",
2258 "AUTH K5 [ /CACHE:<filename> ] INITITIALIZE [ /ADDRESSES:<addr-list>",
2259 "  /FORWARDABLE /KERBEROS4 /LIFETIME:<minutes> /PASSWORD:<password>",
2260 "  /POSTDATE:<date-time> /PROXIABLE /REALM:<name> /RENEW /RENEWABLE:<minutes>",
2261 "  /SERVICE:<name> /VALIDATE <principal> ]",
2262 " ",
2263 "  All Kerberos 5 INITIALIZE switches are optional:",
2264 " ",
2265 "  /ADDRESSES:{list of ip-addresses}",
2266 "    Specifies a list of IP addresses that should be placed in the Ticket",
2267 "    Getting Ticket in addition to the local machine addresses.",
2268 " ",
2269 "  /FORWARDABLE",
2270 "    Requests forwardable tickets.",
2271 " ",
2272 "  /INSTANCE:<name>",
2273 "    Allows an Instance (such as a hostname) to be specified.",
2274 " ",
2275 "  /KERBEROS4",
2276 "    Instructs Kermit to get Kerberos 4 tickets in addition to Kerberos 5",
2277 "    tickets.  If Kerberos 5 tickets are not supported by the server, a",
2278 "    mild warning is printed and Kerberos 4 tickets are requested.",
2279 " ",
2280 "  /LIFETIME:<number>",
2281 "    Specifies the requested lifetime in minutes for the ticket.  If no",
2282 "    lifetime is specified, 600 minutes is used.  If the lifetime is greater",
2283 "    than the maximum supported by the ticket granting service, the resulting",
2284 "    lifetime is shortened.",
2285 " ",
2286 "  /NO-KERBEROS4",
2287 "    Instructs Kermit to not attempt to retrieve Kerberos 4 credentials.",
2288 " ",
2289 "  /NOT-FORWARDABLE",
2290 "    Requests non-forwardable tickets.",
2291 " ",
2292 "  /NOT-PROXIABLE",
2293 "    Requests non-proxiable tickets.",
2294 " ",
2295 "  /PASSWORD:<string>",
2296 "    Allows a password to be included on the command line or in a script",
2297 "    file.  If no /PASSWORD switch is included, you are prompted on a separate"
2298 ,
2299 "    line.  The password switch is provided on a use-at-your-own-risk basis",
2300 "    for use in automated scripts.  WARNING: Passwords should not be stored in"
2301 ,
2302 "    files.",
2303 " ",
2304 "  /POSTDATE:<date-time>",
2305 "    Requests a postdated ticket, valid starting at <date-time>.  Postdated",
2306 "    tickets are issued with the invalid flag set, and need to be fed back to",
2307 "    the KDC before use with the /VALIDATE switch.  Type HELP DATE for info",
2308 "    on date-time formats.",
2309 " ",
2310 "  /PROXIABLE",
2311 "    Requests proxiable tickets.",
2312 " ",
2313 "  /REALM:<string>",
2314 "    Allows an alternative realm to be specified.",
2315 " ",
2316 "  /RENEW",
2317 "    Requests renewal of a renewable Ticket-Granting Ticket.  Note that ",
2318 "    an expired ticket cannot be renewed even if it is within its renewable ",
2319 "    lifetime.",
2320 " ",
2321 "  /RENEWABLE:<number>",
2322 "    Requests renewable tickets, with a total lifetime of <number> minutes.",
2323 " ",
2324 "  /SERVICE:<string>",
2325 "    Allows a service other than the ticket granting service to be specified.",
2326 " ",
2327 "  /VALIDATE",
2328 "    Requests that the Ticket Granting Ticket in the cache (with the invalid",
2329 "    flag set) be passed to the KDC for validation.  If the ticket is within",
2330 "    its requested time range, the cache is replaced with the validated",
2331 "    ticket.",
2332 " ",
2333 "  <principal>",
2334 "    Your identity in the given or default Kerberos realm, of the form:",
2335 "    userid[/instance][@realm]  ",
2336 "    Can be omitted if it is the same as your username or SET LOGIN USERID",
2337 "    value on the client system.",
2338 " ",
2339 "  Note: Kerberos 5 always attempts to retrieve a Ticket-Getting Ticket (TGT)",
2340 "  using the preauthenticated TGT request.",
2341 " ",
2342 "  AUTHORIZE K5 LIST-CREDENTIALS [ /ADDRESSES /FLAGS /ENCRYPTION ]",
2343 " ",
2344 "  Shows start time, expiration time, service or principal name, plus",
2345 "  the following additional information depending the switches:",
2346 " ",
2347 "  /ADDRESSES displays the hostnames and/or IP addresses embedded within",
2348 "    the tickets.",
2349 " ",
2350 "  /FLAGS provides the following information (if applicable) for each ticket:",
2351 "    F - Ticket is Forwardable",
2352 "    f - Ticket was Forwarded",
2353 "    P - Ticket is Proxiable",
2354 "    p - Ticket is a Proxy",
2355 "    D - Ticket may be Postdated",
2356 "    d - Ticket has been Postdated",
2357 "    i - Ticket is Invalid",
2358 "    R - Ticket is Renewable",
2359 "    I - Ticket is the Initial Ticket",
2360 "    H - Ticket has been authenticated by Hardware",
2361 "    A - Ticket has been Pre-authenticated",
2362 " ",
2363 "  /ENCRYPTION displays the encryption used by each ticket (if applicable):",
2364 "    DES-CBC-CRC",
2365 "    DES-CBC-MD4",
2366 "    DES-CBC-MD5",
2367 "    DES3-CBC-SHA",
2368 ""
2369 };
2370 #endif /* CK_KERBEROS */
2371
2372 #ifndef NOCSETS
2373 static char *hmxxassoc[] = {
2374 "ASSOCIATE FILE-CHARACTER-SET <file-character-set> <transfer-character-set>",
2375 "  Tells C-Kermit that whenever the given file-character set is selected, and",
2376 "  SEND CHARACTER-SET (q.v.) is AUTOMATIC, the given transfer character-set",
2377 "  is selected automatically.",
2378 " ",
2379 "ASSOCIATE XFER-CHARACTER-SET <xfer-character-set> <file-character-set>",
2380 "  Tells C-Kermit that whenever the given transfer-character set is selected,",
2381 "  either by command or by an announcer attached to an incoming text file,",
2382 "  and SEND CHARACTER-SET is AUTOMATIC, the specified file character-set is",
2383 "  to be selected automatically.  Synonym: ASSOCIATE TRANSFER-CHARACTER-SET.",
2384 " ",
2385 "Use SHOW ASSOCIATIONS to list the current character-set associations, and",
2386 "SHOW CHARACTER-SETS to list the current settings.",
2387 ""
2388 };
2389 #endif /* NOCSETS */
2390
2391 static char *hmxxpat[] = {
2392 "A \"pattern\" is notation used in a search string when searching through",
2393 "text.  C-Kermit uses three kinds of patterns: floating patterns, anchored",
2394 "patterns, and wildcards.  Wildcards are anchored patterns that are used to",
2395 "match file names; type HELP WILDCARD to learn about them.",
2396 " ",
2397 "In a pattern, certain characters are special:",
2398 " ",
2399 "* Matches any sequence of zero or more characters.  For example, \"k*t\"",
2400 "  matches all strings that start with \"k\" and end with \"t\" including",
2401 "  \"kt\", \"kit\", \"knight\", or \"kermit\".",
2402 " ",
2403 #ifdef VMS
2404 "% Matches any single character.  For example, \"k%%%%t\" matches all strings",
2405 #else
2406 "? Matches any single character.  For example, \"k????t\" matches all strings",
2407 #endif /* VMS */
2408 "  that are exactly 6 characters long and start with \"k\" and end with",
2409 #ifdef VMS
2410 "  with \"t\".",
2411 #else
2412 "  with \"t\".  When typing commands at the prompt, you must precede any",
2413 "  question mark to be used for matching by a backslash (\\) to override the",
2414 "  normal function of question mark in interactive commands, which is to",
2415 "  provide menus and file lists.",
2416 #endif /* VMS */
2417 " ",
2418 #ifdef OS2ORUNIX
2419 #ifdef CKREGEX
2420 "[abc]",
2421 "  Square brackets enclosing a list of characters matches any character in",
2422 "  the list.  Example: h[aou]t matches hat, hot, and hut.",
2423 " ",
2424 "[a-z]",
2425 "  Square brackets enclosing a range of characters matches any character in",
2426 "  the range; a hyphen (-) separates the low and high elements of the range.",
2427 "  For example, [a-z] matches any character from a to z.",
2428 " ",
2429 "[acdm-z]",
2430 "  Lists and ranges may be combined.  This example matches a, c, d, or any",
2431 "  letter from m through z.",
2432 " ",
2433 "{string1,string2,...}",
2434 "  Braces enclose a list of strings to be matched.  For example:",
2435 "  ker{mit,nel,beros} matches kermit, kernel, and kerberos.  The strings",
2436 "  may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
2437 #endif /* CKREGEX */
2438 #endif /* OS2ORUNIX */
2439 #ifndef NOSPL
2440 " ",
2441 "To force a special pattern character to be taken literally, precede it with",
2442 "a backslash, e.g. [a\\-z] matches a, hyphen, or z rather than a through z.",
2443 " ",
2444 "A floating  pattern can also include the following special characters:",
2445 " ",
2446 "^ (First character of pattern) Anchors the pattern at the beginning.",
2447 "$ (Last character of pattern) Anchors the pattern at the end.",
2448 " ",
2449 "If a floating pattern does not start with \"^\", the pattern can match",
2450 "anywhere in the string instead of only at the beginning; in other words, a",
2451 "leading \"*\" is assumed.  Similarly, if the pattern doesn't end with \"$\",",
2452 "a trailing \"*\" is assumed.",
2453 " ",
2454 "The following commands and functions use floating patterns:",
2455 "  GREP [ <switches> ] <pattern> <filespec>",
2456 "  TYPE /MATCH:<pattern> <file>",
2457 "  \\farraylook(<pattern>,<arrayname>)",
2458 "  \\fsearch(<pattern>,<string>[,<offset>])",
2459 "  \\frsearch(<pattern>,<string>[,<offset>])",
2460 "  The /EXCEPT: clause in SEND, GET, DELETE, etc.",
2461 " ",
2462 "Example:",
2463 "  \\fsearch(abc,xxabcxxx) succeeds because xxabcxx contains abc.",
2464 "  \\fsearch(^abc,xxabcxx) fails because xxabcxx does not start with abc.",
2465 " ",
2466
2467 "All other commands and functions use anchored patterns, meaning that ^ and $",
2468 "are not treated specially, and * is not assumed at the beginning or end of",
2469 "the pattern.  This is true mainly of filename patterns (wildcards), since",
2470 "you would not want a command like \"delete x\" to delete all files whose", 
2471 "names contained \"x\"!",
2472
2473 " ",
2474 "You can use anchored patterns not only in filenames, but also in SWITCH",
2475 "case labels, in the INPUT and MINPUT commands, and in file binary- and",
2476 "text-patterns for filenames.  The IF MATCH pattern is also anchored.",
2477 #endif /* NOSPL */
2478 "" };
2479
2480 static char *hmxxwild[] = {
2481
2482 "A \"wildcard\" is a notation used in a filename to match multiple files.",
2483 "For example, in \"send *.txt\" the asterisk is a wildcard.  Kermit commands",
2484 "that accept filenames also accepts wildcards, except commands that are",
2485 "allowed to operate on only one file, such as TRANSMIT.",
2486 "This version of Kermit accepts the following wildcards:",
2487 " ",
2488 "* Matches any sequence of zero or more characters.  For example, \"ck*.c\"",
2489 "  matches all files whose names start with \"ck\" and end with \".c\"",
2490 "  including \"ck.c\".",
2491 " ",
2492 #ifdef VMS
2493 "% Matches any single character.  For example, \"ck%.c\" matches all files",
2494 #else
2495 "? Matches any single character.  For example, \"ck?.c\" matches all files",
2496 #endif /* VMS */
2497 "  whose names are exactly 5 characters long and start with \"ck\" and end",
2498 #ifdef VMS
2499 "  with \".c\".",
2500 #else
2501 "  with \".c\".  When typing commands at the prompt, you must precede any",
2502 "  question mark to be used for matching by a backslash (\\) to override the",
2503 "  normal function of question mark in interactive commands, which is to",
2504 "  provide menus and file lists.  You don't, however, need to quote filename",
2505 "  question marks in command files (script programs).",
2506 #endif /* VMS */
2507 " ",
2508 #ifdef OS2ORUNIX
2509 #ifdef CKREGEX
2510 "[abc]",
2511 "  Square brackets enclosing a list of characters matches any character in",
2512 "  the list.  Example: ckuusr.[ch] matches ckuusr.c and ckuusr.h.",
2513 " ",
2514 "[a-z]",
2515 "  Square brackets enclosing a range of characters matches any character in",
2516 "  the range; a hyphen (-) separates the low and high elements of the range.",
2517 "  For example, [a-z] matches any character from a to z.",
2518 " ",
2519 "[acdm-z]",
2520 "  Lists and ranges may be combined.  This example matches a, c, d, or any",
2521 "  letter from m through z.",
2522 " ",
2523 "{string1,string2,...}",
2524 "  Braces enclose a list of strings to be matched.  For example:",
2525 "  ck{ufio,vcon,cmai}.c matches ckufio.c, ckvcon.c, or ckcmai.c.  The strings",
2526 "  may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
2527 #endif /* CKREGEX */
2528 #endif /* OS2ORUNIX */
2529 " ",
2530 "To force a special pattern character to be taken literally, precede it with",
2531 "a backslash, e.g. [a\\-z] matches a, hyphen, or z rather than a through z.",
2532 "Or tell Kermit to SET WILDCARD-EXPANSION OFF before entering or referring",
2533 "to the filename.",
2534 " ",
2535 #ifndef NOSPL
2536 "Similar notation can be used in general-purpose string matching.  Type HELP",
2537 "PATTERNS for details.  Also see HELP SET MATCH.",
2538 #endif /* NOSPL */
2539 "" };
2540
2541 #ifndef NOXFER
2542 static char *hmxxfast[] = {
2543 "FAST, CAUTIOUS, and ROBUST are predefined macros that set several",
2544 "file-transfer parameters at once to achieve the desired file-transfer goal.",
2545 "FAST chooses a large packet size, a large window size, and a fair amount of",
2546 "control-character unprefixing at the risk of possible failure on some",
2547 "connections.  FAST is the default tuning in C-Kermit 7.0 and later.  In case",
2548 "FAST file transfers fail for you on a particular connection, try CAUTIOUS.",
2549 "If that fails too, try ROBUST.  You can also change the definitions of each",
2550 "macro with the DEFINE command.  To see the current definitions, type",
2551 "\"show macro fast\", \"show macro cautious\", or \"show macro robust\".",
2552 ""
2553 };
2554 #endif /* NOXFER */
2555
2556 #ifdef VMS
2557 static char * hmxxpurge[] = {
2558 "Syntax: PURGE [ switches ] [ filespec ]",
2559 "  Runs the DCL PURGE command.  Switches and filespec are not parsed or",
2560 "  verified by Kermit, but passed directly to DCL.",
2561 ""
2562 };
2563 #else
2564 #ifdef CKPURGE
2565 static char * hmxxpurge[] = {
2566 "Syntax: PURGE [ switches ] [ filespec ]",
2567 "  Deletes backup files; that is, files whose names end in \".~n~\", where",
2568 "  n is a number.  PURGE by itself deletes all backup files in the current",
2569 "  directory.  Switches:",
2570
2571 " ",
2572 "/AFTER:date-time",
2573 #ifdef VMS
2574 "  Specifies that only those files created after the given date-time are",
2575 #else
2576 "  Specifies that only those files modified after the given date-time are",
2577 #endif /* VMS */
2578 "  to be purged.  HELP DATE for info about date-time formats.",
2579 " ",
2580 "/BEFORE:date-time",
2581 #ifdef VMS
2582 "  Specifies that only those files modified before the given date-time",
2583 #else
2584 "  Specifies that only those files modified before the given date-time",
2585 #endif /* VMS */
2586 "  are to be purged.",
2587 " ",
2588 "/NOT-AFTER:date-time",
2589 #ifdef VMS
2590 "  Specifies that only those files modified at or before the given date-time",
2591 #else
2592 "  Specifies that only those files modified at or before the given date-time",
2593 #endif /* VMS */
2594 "  are to be purged.",
2595 " ",
2596 "/NOT-BEFORE:date-time",
2597 #ifdef VMS
2598 "  Specifies that only those files modified at or after the given date-time",
2599 #else
2600 "  Specifies that only those files modified at or after the given date-time",
2601 #endif /* VMS */
2602 "  are to be purged.",
2603 " ",
2604 "/LARGER-THAN:number",
2605 "  Specifies that only those files longer than the given number of bytes are",
2606 "  to be purged.",
2607 " ",
2608 "/SMALLER-THAN:number",
2609 "  Specifies that only those files smaller than the given number of bytes are",
2610 "  to be purged.",
2611 " ",
2612 "/EXCEPT:pattern",
2613 "  Specifies that any files whose names match the pattern, which can be a",
2614 "  regular filename or may contain wildcards, are not to be purged.  To",
2615 "  specify multiple patterns (up to 8), use outer braces around the group",
2616 "  and inner braces around each pattern:",
2617 " ",
2618 "    /EXCEPT:{{pattern1}{pattern2}...}",
2619 " ",
2620 #ifdef UNIXOROSK
2621 "/DOTFILES",
2622 "  Include (purge) files whose names begin with \".\".",
2623 " ",
2624 "/NODOTFILES",
2625 "  Skip (don't purge) files whose names begin with \".\".",
2626 " ",
2627 #endif /* UNIXOROSK */
2628 #ifdef RECURSIVE
2629 "/RECURSIVE",
2630 "  Descends through the current or specified directory tree.",
2631 " ",
2632 #endif /* RECURSIVE */
2633 "/KEEP:n",
2634 "  Retain the 'n' most recent (highest-numbered) backup files for each file.",
2635 "  By default, none are kept.  If /KEEP is given without a number, 1 is used.",
2636 " ",
2637 "/LIST",
2638 "  Display each file as it is processed and say whether it is purged or kept.",
2639 "  Synonyms: /LOG, /VERBOSE.",
2640 " ",
2641 "/NOLIST",
2642 "  The PURGE command should operate silently (default).",
2643 "  Synonyms: /NOLOG, /QUIET.",
2644 " ",
2645 "/HEADING",
2646 "  Print heading and summary information.",
2647 " ",
2648 "/NOHEADING",
2649 "  Don't print heading and summary information.",
2650 " ",
2651 "/PAGE",
2652 "  When /LIST is in effect, pause at the end of each screenful, even if",
2653 "  COMMAND MORE-PROMPTING is OFF.",
2654 " ",
2655 "/NOPAGE",
2656 "  Don't pause, even if COMMAND MORE-PROMPTING is ON.",
2657 " ",
2658 "/ASK",
2659 "  Interactively ask permission to delete each backup file.",
2660 " ",
2661 "/NOASK",
2662 "  Purge backup files without asking permission.",
2663 " ",
2664 "/SIMULATE",
2665 "  Inhibits the actual deletion of files; use to preview which files would",
2666 "  actually be deleted.  Implies /LIST.",
2667 " ",
2668 "Use SET OPTIONS PURGE [ switches ] to change defaults; use SHOW OPTIONS to",
2669 "display customized defaults.  Also see HELP DELETE, HELP WILDCARD.",
2670 ""
2671 };
2672 #endif /* CKPURGE */
2673 #endif /* VMS */
2674
2675 static char *hmxxclo[] = {
2676 "Syntax:  CLOSE [ item ]",
2677 "  Close the indicated item.  The default item is CONNECTION, which is the",
2678 "  current SET LINE or SET HOST connection.  The other items are:",
2679 " ",
2680 #ifdef CKLOGDIAL
2681 "    CX-LOG          (connection log, opened with LOG CX)",
2682 #endif /* CKLOGDIAL */
2683 #ifndef NOLOCAL
2684 "    SESSION-LOG     (opened with LOG SESSION)",
2685 #endif /* NOLOCAL */
2686 #ifdef TLOG
2687 "    TRANSACTION-LOG (opened with LOG TRANSACTIONS)",
2688 #endif /* TLOG */
2689 "    PACKET-LOG      (opened with LOG PACKETS)",
2690 #ifdef DEBUG
2691 "    DEBUG-LOG       (opened with LOG DEBUG)",
2692 #endif /* DEBUG */
2693 #ifndef NOSPL
2694 "    READ-FILE       (opened with OPEN READ)",
2695 "    WRITE-FILE      (opened with OPEN WRITE or OPEN APPEND)",
2696 #endif /* NOSPL */
2697 " ",
2698 "Type HELP LOG and HELP OPEN for further info.",
2699 ""
2700 };
2701
2702 #ifdef CKLEARN
2703 static char * hmxxlearn[] = {
2704 "Syntax: LEARN [ /ON /OFF /CLOSE ] [ filename ]",
2705 "  Records a login script.  If you give a filename, the file is opened for",
2706 "  subsequent recording.  If you don't give any switches, /ON is assumed.",
2707 "  /ON enables recording to the current file (if any); /OFF disables",
2708 "  recording.  /CLOSE closes the current file (if any).  After LEARN /CLOSE",
2709 "  or exit from Kermit, your script is available for execution by the TAKE",
2710 "  command.",
2711 ""
2712 };
2713 #endif /* CKLEARN */
2714
2715 #ifdef CK_MINPUT
2716 static char *hmxxminp[] = {
2717 "Syntax:  MINPUT [ switches ] n [ string1 [ string2 [ ... ] ] ]",
2718 "Example: MINPUT 5 Login: {Username: } {NO CARRIER} BUSY RING",
2719 "  For use in script programs.  Waits up to n seconds for any one of the",
2720 "  strings to arrive on the communication device.  If no strings are given,",
2721 "  the command waits for any character at all to arrive.  Strings are",
2722 "  separated by spaces; use {braces} or \"doublequotes\" for grouping.  If",
2723 "  any of the strings is encountered within the timeout interval, the command",
2724 "  succeeds and the \\v(minput) variable is set to the number of the string",
2725 "  that was matched: 1, 2, 3, etc.  If none of the strings arrives, the",
2726 "  command times out, fails, and \\v(minput) is set to 0.  In all other",
2727 "  respects, MINPUT is like INPUT.  See HELP INPUT for the available switches",
2728 "  and other details of operation.",
2729 "" };
2730 #endif /* CK_MINPUT */
2731
2732 #ifndef NOLOCAL
2733 static char *hmxxcon[] = {
2734 "Syntax: CONNECT (or C, or CQ) [ switches ]",
2735 "  Connect to a remote computer via the serial communications device given in",
2736 #ifdef OS2
2737 "  the most recent SET PORT command, or to the network host named in the most",
2738 #else
2739 "  the most recent SET LINE command, or to the network host named in the most",
2740 #endif /* OS2 */
2741 "  recent SET HOST command.  Type the escape character followed by C to get",
2742 "  back to the C-Kermit prompt, or followed by ? for a list of CONNECT-mode",
2743 #ifdef OS2
2744 "  escape commands.  You can also assign the \\Kexit verb to the key or",
2745 "  key-combination of your choice; by default it is assigned to Alt-x.",
2746 #else
2747 "  escape commands.",
2748 " ",
2749 "Include the /QUIETLY switch to suppress the informational message that",
2750 "tells you how to escape back, etc.  CQ is a synonym for CONNECT /QUIETLY.",
2751 #endif /* OS2 */
2752 " ",
2753 "Other switches include:",
2754 #ifdef CK_TRIGGER
2755 " ",
2756 "/TRIGGER:string",
2757 "  One or more strings to look for that will cause automatic return to",
2758 "  command mode.  To specify one string, just put it right after the",
2759 "  colon, e.g. \"/TRIGGER:Goodbye\".  If the string contains any spaces, you",
2760 "  must enclose it in braces, e.g. \"/TRIGGER:{READY TO SEND...}\".  To",
2761 "  specify more than one trigger, use the following format:",
2762 " ",
2763 "    /TRIGGER:{{string1}{string2}...{stringn}}",
2764 " ",
2765 "  Upon return from CONNECT mode, the variable \\v(trigger) is set to the",
2766 "  trigger string, if any, that was actually encountered.  This value, like",
2767 "  all other CONNECT switches applies only to the CONNECT command with which",
2768 "  it is given, and overrides (temporarily) any global SET TERMINAL TRIGGER",
2769 "  string that might be in effect.",
2770 #endif /* CK_TRIGGER */
2771 #ifdef OS2
2772 " ",
2773 "/IDLE-LIMIT:number",
2774 "  The number of seconds of idle time, after which Kermit returns",
2775 "  automatically to command mode; default 0 (no limit).",
2776 " ",
2777 "/IDLE-INTERVAL:number",
2778 "  The number of seconds of idle time, after which Kermit automatically",
2779 "  transmits the idle string.",
2780 " ",
2781 "/IDLE-STRING:string",
2782 "  The string to transmit whenever the idle interval has passed.",
2783 " ",
2784 "/TIME-LIMIT:number",
2785 "  The maximum number of seconds for which the CONNECT session may last.",
2786 "  The default is 0 (no limit).  If a nonzero number is given, Kermit returns",
2787 "  automatically to command mode after this many seconds.",
2788 #endif /* OS2 */
2789 "" };
2790 #endif /* NOLOCAL */
2791
2792 static char *hmxxmget[] = {
2793 "Syntax: MGET [ switches... ] remote-filespec [ remote-filespec ... ]",
2794 " ",
2795 "Just like GET (q.v.) except allows a list of remote file specifications,",
2796 "separated by spaces.",
2797 ""
2798 };
2799
2800 static char *hmxxget[] = {
2801 "Syntax: GET [ switches... ] remote-filespec [ as-name ]",
2802 "  Tells the other Kermit, which must be in (or support autoswitching into)",
2803 "  server mode, to send the named file or files.  If the remote-filespec or",
2804 "  the as-name contain spaces, they must be enclosed in braces.  If as-name",
2805 "  is the name of an existing local directory, incoming files are placed in",
2806 "  that directory; if it is the name of directory that does not exist, Kermit",
2807 "  tries to create it.  Optional switches include:",
2808 " ",
2809 "/AS-NAME:text",
2810 "  Specifies \"text\" as the name to store the incoming file under, or",
2811 "  directory to store it in.  You can also specify the as-name as the second",
2812 "  filename on the GET command line.",
2813 " ",
2814 "/BINARY",
2815 "  Performs this transfer in binary mode without affecting the global",
2816 "  transfer mode.",
2817 " ",
2818 "/COMMAND",
2819 "  Receives the file into the standard input of a command, rather than saving",
2820 "  it on  disk.  The /AS-NAME or the second \"filename\" on the GET command",
2821 "  line is interpreted as the name of a command.",
2822 " ",
2823 "/DELETE",
2824 "  Asks the other Kermit to delete the file (or each file in the group)",
2825 "  after it has been transferred successfully.",
2826 " ",
2827 "/EXCEPT:pattern",
2828 "  Specifies that any files whose names match the pattern, which can be a",
2829 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
2830 "  are to be refused.  To specify multiple patterns (up to 8), use outer",
2831 "  braces around the group, and inner braces around each pattern:",
2832 " ",
2833 "    /EXCEPT:{{pattern1}{pattern2}...}",
2834 " ",
2835 "/FILENAMES:{CONVERTED,LITERAL}",
2836 "  Overrides the global SET FILE NAMES setting for this transfer only.",
2837 " ",
2838 "/FILTER:command",
2839 "  Causes the incoming file to passed through the given command (standard",
2840 "  input/output filter) before being written to disk.",
2841 " ",
2842 #ifdef VMS
2843 "/IMAGE",
2844 "  Transfer in image mode.",
2845 " ",
2846 #endif /* VMS */
2847 #ifdef CK_LABELED
2848 "/LABELED",
2849 "  VMS and OS/2 only: Specifies labeled transfer mode.",
2850 " ",
2851 #endif /* CK_LABELED */
2852
2853 "/MOVE-TO:directory-name",
2854 "  Specifies that each file that arrives should be moved to the specified",
2855 "  directory after, and only if, it has been received successfully.",
2856 " ",
2857 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
2858 "  Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
2859 " ",
2860 "/PIPES:{ON,OFF}",
2861 "  Overrides the TRANSFER PIPES setting for this command only.  ON allows",
2862 "  reception of files with names like \"!tar xf -\" to be automatically",
2863 "  directed to a pipeline.",
2864 " ",
2865 "/QUIET",
2866 "  When sending in local mode, this suppresses the file-transfer display.",
2867 " ",
2868 "/RECOVER",
2869 "  Used to recover from a previously interrupted transfer; GET /RECOVER",
2870 "  is equivalent REGET.  Works only in binary mode.",
2871 " ",
2872 "/RECURSIVE",
2873 "  Tells the server to descend through the directory tree when locating",
2874 "  the files to be sent.",
2875 " ",
2876 "/RENAME-TO:string",
2877 "  Specifies that each file that arrives should be renamed as specified",
2878 "  after, and only if, it has been received successfully.  The string should",
2879 "  normally contain variables like \\v(filename) or \\v(filenum).",
2880 " ",
2881 "/TEXT",
2882 "  Performs this transfer in text mode without affecting the global",
2883 "  transfer mode.",
2884 " ",
2885 "/TRANSPARENT",
2886 "  Inhibits character-set translation of incoming text files for the duration",
2887 "  of the GET command without affecting subsequent commands.",
2888 " ",
2889 "Also see HELP MGET, HELP SEND, HELP RECEIVE, HELP SERVER, HELP REMOTE.",
2890 ""};
2891
2892 static char *hmxxlg[] = {
2893 "Syntax: LOG (or L) log-type [ filename [ { NEW, APPEND } ] ]",
2894 " ",
2895 "Record information in a log file:",
2896 " ",
2897 #ifdef CKLOGDIAL
2898 "CX",
2899 "  Connections made with SET LINE, SET PORT, SET HOST, DIAL, TELNET, etc.",
2900 "  The default filename is CX.LOG in your home directory and APPEND is the",
2901 "  default mode for opening.",
2902 " ",
2903 #endif /* CKLOGDIAL */
2904 #ifdef DEBUG
2905 "DEBUG",
2906 "  Debugging information, to help track down bugs in the C-Kermit program.",
2907 "  The default log name is debug.log in current directory.",
2908 " ",
2909 #endif /* DEBUG */
2910 "PACKETS",
2911 "  Kermit packets, to help with protocol problems.  The default filename is",
2912 "  packet.log in current directory.",
2913 " ",
2914 #ifndef NOLOCAL
2915 "SESSION",
2916 "  Records your CONNECT session (default: session.log in current directory).",
2917 " ",
2918 #endif /* NOLOCAL */
2919 #ifdef TLOG
2920 "TRANSACTIONS",
2921 "  Names and statistics about files transferred (default: transact.log in",
2922 "  current directory; see HELP SET TRANSACTION-LOG for transaction-log format",
2923 "  options.)",
2924 " ",
2925 #endif /* TLOG */
2926 "If you include the APPEND keyword after the filename, the existing log file,",
2927 "if any, is appended to; otherwise a new file is created (except APPEND is",
2928 "the default for the connection log).  Use CLOSE <keyword> to stop logging.",
2929 #ifdef OS2ORUNIX
2930 " ",
2931 "Note: The filename can also be a pipe, e.g.:",
2932 " ",
2933 "  log transactions |lpr",
2934 "  log debug {| grep \"^TELNET\" > debug.log}",
2935 " ",
2936 "Braces are required if the pipeline or filename contains spaces.",
2937 #endif /* OS2ORUNIX */
2938 "" };
2939
2940 #ifndef NOSCRIPT
2941 static char *hmxxlogi[] = { "\
2942 Syntax: SCRIPT text",
2943 "  A limited and cryptic \"login assistant\", carried over from old C-Kermit",
2944 "  releases for comptability, but not recommended for use.  Instead, please",
2945 "  use the full script programming language described in chapters 17-19 of",
2946 "  \"Using C-Kermit\".",
2947 " ",
2948 "  Login to a remote system using the text provided.  The login script",
2949 "  is intended to operate similarly to UNIX uucp \"L.sys\" entries.",
2950 "  A login script is a sequence of the form:",
2951 " ",
2952 "    expect send [expect send] . . .",
2953 " ",
2954 "  where 'expect' is a prompt or message to be issued by the remote site, and",
2955 "  'send' is the names, numbers, etc, to return.  The send may also be the",
2956 "  keyword EOT to send Control-D, or BREAK (or \\\\b) to send a break signal.",
2957 "  Letters in send may be prefixed by ~ to send special characters:",
2958 " ",
2959 "  ~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t",
2960 "  append a return, and ~o[o[o]] for octal of a character.  As with some",
2961 "  UUCP systems, sent strings are followed by ~r unless they end with ~c.",
2962 " ",
2963 "  Only the last 7 characters in each expect are matched.  A null expect,",
2964 "  e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect",
2965 "  that a sequence might not arrive, as with uucp, conditional sequences",
2966 "  may be expressed in the form:",
2967 " ",
2968 "    -send-expect[-send-expect[...]]",
2969 " ",
2970 "  where dashed sequences are followed as long as previous expects fail.",
2971 "" };
2972 #endif /* NOSCRIPT */
2973
2974 #ifndef NOFRILLS
2975 static char * hmxxtyp[] = {
2976 "Syntax: TYPE [ switches... ] file",
2977 "  Displays a file on the screen.  Pauses automatically at end of each",
2978 "  screenful if COMMAND MORE-PROMPTING is ON.  Optional switches:",
2979 " ",
2980 "  /PAGE",
2981 "     Pause at the end of each screenful even if COMMAND MORE-PROMPTING OFF.",
2982 "     Synonym: /MORE",
2983 "  /NOPAGE",
2984 "     Don't pause at the end of each screen even if COMMAND MORE-PROMPTING ON."
2985 ,
2986 "  /HEAD:n",
2987 "     Only type the first 'n' lines of the file.",
2988 "  /TAIL:n",
2989 "     Only type the last 'n' lines of the file.",
2990 "  /MATCH:pattern",
2991 "     Only type lines that match the given pattern.  HELP WILDCARDS for info",
2992 "     info about patterns.  /HEAD and /TAIL apply after /MATCH.",
2993 "  /PREFIX:string",
2994 "     Print the given string at the beginning of each line.",
2995 "  /NUMBER",
2996 "     Add line numbers (conflicts with /PREFIX)",
2997 "  /WIDTH:number",
2998 "     Truncate each line at the given column number before printing.",
2999 #ifdef KUI
3000 "     Or when combined with /GUI specifies the width of the dialog box.",
3001 "  /HEIGHT:number",
3002 "     When combined with /GUI specifies the height of the dialog box.",
3003 "  /GUI:string",
3004 "     Specifies the title to use for the dialog box.",
3005 #endif /* KUI */
3006 "  /COUNT",
3007 "     Count lines (and matches) and print the count(s) but not the lines.",
3008 #ifdef UNICODE
3009 "  /CHARACTER-SET:name",
3010 "     Translates from the named character set.",
3011 #ifndef OS2
3012 "  /TRANSLATE-TO:name",
3013 "     Translates to the named character set (default = current file charset).",
3014 #endif /* OS2 */
3015 "  /TRANSPARENT",
3016 "     Inhibits character-set translation.",
3017 #endif /* UNICODE */
3018 "  /OUTPUT:name",
3019 "     Sends results to the given file.  If this switch is omitted, the",
3020 "     results appear on your screen.  This switch overrides any express or",
3021 "     implied /PAGE switch.",
3022 " ",
3023 "You can use SET OPTIONS TYPE to set the defaults for /PAGE or /NOPAGE and",
3024 "/WIDTH.  Use SHOW OPTIONS to see current TYPE options.",
3025 ""
3026 };
3027
3028 static char * hmxxcle[] = {
3029 "Syntax: CLEAR [ item-name ]",
3030 " ",
3031 "Clears the named item.  If no item is named, DEVICE-AND-INPUT is assumed.",
3032 " ",
3033 "  ALARM            Clears any pending alarm (see SET ALARM).",
3034 #ifdef CK_APC
3035 "  APC-STATUS       Clears Application Program Command status.",
3036 #endif /* CK_APC */
3037 #ifdef PATTERNS
3038 "  BINARY-PATTERNS  Clears the file binary-patterns list.",
3039 #endif /* PATTERNS */
3040 #ifdef OS2
3041 "  COMMAND-SCREEN   Clears the current command screen.",
3042 #endif /* OS2 */
3043 "  DEVICE           Clears the current port or network input buffer.",
3044 "  DEVICE-AND-INPUT Clears both the device and the INPUT buffer.",
3045 "  DIAL-STATUS      Clears the \\v(dialstatus) variable.",
3046 "  \
3047 INPUT            Clears the INPUT-command buffer and the \\v(input) variable.",
3048 "  KEYBOARD-BUFFER  Clears the command terminal keyboard input buffer.",
3049 #ifdef OS2
3050 "  \
3051 SCROLLBACK       empties the scrollback buffer including the current screen.",
3052 #endif /* OS2 */
3053 "  SEND-LIST        Clears the current SEND list (see ADD).",
3054 #ifdef OS2
3055 "  \
3056 TERMINAL-SCREEN  Clears the current screen a places it into the scrollback.",
3057 "    buffer.",
3058 #endif /* OS2 */
3059 #ifdef PATTERNS
3060 "  TEXT-PATTERNS    Clears the file text-patterns list.",
3061 #endif /* PATTERNS */
3062 ""};
3063 #endif /* NOFRILLS */
3064
3065 static char * hmxxdate[] = {
3066 "Syntax: DATE [ date-time [ timezone ] ] [ delta-time ]",
3067 "  Prints a date-time in standard format: yyyymmdd_hh:mm:ss.",
3068 "  Various date-time formats are accepted:",
3069 " ",
3070 "  . The date, if given, must precede the time.",
3071 "  . The year must be four digits or else a 2-digit format dd mmm yy,",
3072 "    in which case if (yy < 50) yyyy = yy + 2000; else yyyy = yy + 1900.",
3073 "  . If the year comes first, the second field is the month.",
3074 "  . The day, month, and year may be separated by spaces, /, -, or underscore."
3075 ,"  . The date and time may be separated by spaces or underscore.",
3076 "  . The month may be numeric (1 = January) or spelled out or abbreviated in",
3077 "    English.",
3078 "  . The time may be in 24-hour format or 12-hour format.",
3079 "  . If the hour is 12 or less, AM is assumed unless AM or PM is included.",
3080 "  . If the date is omitted but a time is given, the current date is supplied."
3081 ,
3082 "  . If the time is given but date omitted, 00:00:00 is supplied.",
3083 "  . If both the date and time are omitted, the current date and time are",
3084 "    supplied.",
3085 " ",
3086 "  The following shortcuts can also be used in place of dates:",
3087 " ",
3088 "  NOW",
3089 "    Stands for the current date and time.",
3090 " ",
3091 "  TODAY",
3092 "    Today's date, optionally followed by a time; 00:00:00 if no time given.",
3093 " ",
3094 "  YESTERDAY",
3095 "    Yesterday's date, optionally followed by a time (default 00:00:00).",
3096 " ",
3097 "  TOMORROW",
3098 "    Tomorrows's date, optionally followed by a time (default 00:00:00).",
3099 " ",
3100 "  Timezone specifications are similar to those used in e-mail and HTTP",
3101 "    headers, either a USA timezone name, e.g. EST, or a signed four-digit",
3102 "    timezone offset, {+,-}hhmm, e.g., -0500; it is used to convert date-time,"
3103 ,
3104 "    a local time in that timezone, to GMT which is then converted to the",
3105 "    local time at the host.  If no timezone is given, the date-time is local."
3106 ,"    To convert local time (or a time in a specified timezone) to UTC (GMT),",
3107 "    use the function \futcdate().",
3108 " ",
3109 "  Delta times are given as {+,-}[number date-units][hh[:mm[:ss]]]",
3110 "    A date in the future/past relative to the date-time; date-units may be",
3111 "    DAYS, WEEKS, MONTHS, YEARS: +3days, -7weeks, +3:00, +1month 8:00.",
3112 " ",
3113 "All the formats shown above are acceptable as arguments to date-time switches"
3114 ,
3115 "such as /AFTER: or /BEFORE:, and to functions such as \\fcvtdate(),",
3116 "\\fdiffdate(), and \\futcdate(), that take date-time strings as arguments.",
3117 ""
3118 };
3119
3120
3121 #ifndef NOXFER
3122 static char * hmxxsen[] = {
3123 "Syntax: SEND (or S) [ switches...] [ filespec [ as-name ] ]",
3124 "  Sends the file or files specified by filespec.  If the filespec is omitted",
3125 "  the SEND-LIST is used (HELP ADD for more info).  The filespec may contain",
3126 "  wildcard characters.  An 'as-name' may be given to specify the name(s)",
3127 "  the files(s) are sent under; if the as-name is omitted, each file is",
3128 "  sent under its own name.  Also see HELP MSEND, HELP WILDCARD.",
3129 "  Optional switches include:",
3130 " ",
3131 #ifndef NOSPL
3132 "/ARRAY:<arrayname>",
3133 "  Specifies that the data to be sent comes from the given array, such as",
3134 "  \\&a[].  A range may be specified, e.g. SEND /ARRAY:&a[100:199].  Leave",
3135 "  the brackets empty or omit them altogether to send the whole 1-based array."
3136 ,
3137 "  Include /TEXT to have Kermit supply a line terminator at the end of each",
3138 "  array element (and translate character sets if character-set translations",
3139 "  are set up), or /BINARY to treat the array as one long string of characters"
3140 ,
3141 "  to be sent as-is.  If an as-name is not specified, the array is sent with",
3142 "  the name _ARRAY_X_, where \"X\" is replaced by actual array letter.",
3143 " ",
3144 #endif /* NOSPL */
3145
3146 "/AS-NAME:<text>",
3147 "  Specifies <text> as the name to send the file under instead of its real",
3148 "  name.  This is equivalent to giving an as-name after the filespec.",
3149 " ",
3150 "/BINARY",
3151 "  Performs this transfer in binary mode without affecting the global",
3152 "  transfer mode.",
3153 " ",
3154 "/TEXT",
3155 "  Performs this transfer in text mode without affecting the global",
3156 "  transfer mode.",
3157 " ",
3158 "/TRANSPARENT",
3159 "  Inhibits character-set translation for text files for the duration of",
3160 "  the SEND command without affecting subsequent commands.",
3161 " ",
3162 "/NOBACKUPFILES",
3163 "  Skip (don't send) Kermit or EMACS backup files (files with names that",
3164 "  end with .~n~, where n is a number).",
3165 " ",
3166 #ifdef UNIXOROSK
3167 "/DOTFILES",
3168 "  Include (send) files whose names begin with \".\".",
3169 " ",
3170 "/NODOTFILES",
3171 "  Don't send files whose names begin with \".\".",
3172 " ",
3173 "/FOLLOWLINKS",
3174 "  Send files that are pointed to by symbolic links.",
3175 " ",
3176 "/NOFOLLOWLINKS",
3177 "  Skip over symbolic links (default).",
3178 " ",
3179 #endif /* UNIXOROSK */
3180
3181 #ifdef VMS
3182 "/IMAGE",
3183 "  Performs this transfer in image mode without affecting the global",
3184 "  transfer mode.",
3185 " ",
3186 #endif /* VMS */
3187 #ifdef CK_LABELED
3188 "/LABELED",
3189 "  Performs this transfer in labeled mode without affecting the global",
3190 "  transfer mode.",
3191 " ",
3192 #endif /* CK_LABELED */
3193 "/COMMAND",
3194 "  Sends the output from a command, rather than the contents of a file.",
3195 "  The first \"filename\" on the SEND command line is interpreted as the name",
3196 "  of a command; the second (if any) is the as-name.",
3197 " ",
3198 "/FILENAMES:{CONVERTED,LITERAL}",
3199 "  Overrides the global SET FILE NAMES setting for this transfer only.",
3200 " ",
3201 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE}",
3202 "  Overrides the global SET SEND PATHNAMES setting for this transfer.",
3203 " ",
3204 "/FILTER:command",
3205 "  Specifies a command \
3206 (standard input/output filter) to pass the file through",
3207 "  before sending it.",
3208 " ",
3209 "/DELETE",
3210 "  Deletes the file (or each file in the group) after it has been sent",
3211 "  successfully (applies only to real files).",
3212 " ",
3213 "/QUIET",
3214 "  When sending in local mode, this suppresses the file-transfer display.",
3215 " ",
3216 "/RECOVER",
3217 "  Used to recover from a previously interrupted transfer; SEND /RECOVER",
3218 "  is equivalent RESEND (use in binary mode only).",
3219 " ",
3220 "/RECURSIVE",
3221 "  Tells C-Kermit to look not only in the given or current directory for",
3222 "  files that match the filespec, but also in all its subdirectories, and",
3223 "  all their subdirectories, etc.",
3224 " ",
3225 "/RENAME-TO:name",
3226 "  Tells C-Kermit to rename each source file that is sent successfully to",
3227 "  the given name (usually you should include \\v(filename) in the new name,",
3228 "  which is replaced by the original filename.",
3229 " ",
3230 "/MOVE-TO:directory",
3231 "  Tells C-Kermit to move each source file that is sent successfully to",
3232 "  the given directory.",
3233 " ",
3234 "/STARTING:number",
3235 "  Starts sending the file from the given byte position.",
3236 "  SEND /STARTING:n filename is equivalent to PSEND filename n.",
3237 " ",
3238 "/SUBJECT:text",
3239 "  Specifies the subject of an email message, to be used with /MAIL.  If the",
3240 "  text contains spaces, it must be enclosed in braces.",
3241 " ",
3242 "/MAIL:address",
3243 "  Sends the file as e-mail to the given address; use with /SUBJECT:.",
3244 " ",
3245 "/PRINT:options",
3246 "  Sends the file to be printed, with optional options for the printer.",
3247 " ",
3248 #ifdef CK_XYZ
3249 "/PROTOCOL:name",
3250 "  Uses the given protocol to send the file (Kermit, Zmodem, etc) for this",
3251 "  transfer without changing global protocol.",
3252 " ",
3253 #endif /* CK_XYZ */
3254 "/AFTER:date-time",
3255 #ifdef VMS
3256 "  Specifies that only those files created after the given date-time are",
3257 #else
3258 "  Specifies that only those files modified after the given date-time are",
3259 #endif /* VMS */
3260 "  to be sent.  HELP DATE for info about date-time formats.",
3261 " ",
3262 "/BEFORE:date-time",
3263 #ifdef VMS
3264 "  Specifies that only those files modified before the given date-time",
3265 #else
3266 "  Specifies that only those files modified before the given date-time",
3267 #endif /* VMS */
3268 "  are to be sent.",
3269 " ",
3270 "/NOT-AFTER:date-time",
3271 #ifdef VMS
3272 "  Specifies that only those files modified at or before the given date-time",
3273 #else
3274 "  Specifies that only those files modified at or before the given date-time",
3275 #endif /* VMS */
3276 "  are to be sent.",
3277 " ",
3278 "/NOT-BEFORE:date-time",
3279 #ifdef VMS
3280 "  Specifies that only those files modified at or after the given date-time",
3281 #else
3282 "  Specifies that only those files modified at or after the given date-time",
3283 #endif /* VMS */
3284 "  are to be sent.",
3285 " ",
3286 "/LARGER-THAN:number",
3287 "  Specifies that only those files longer than the given number of bytes are",
3288 "  to be sent.",
3289 " ",
3290 "/SMALLER-THAN:number",
3291 "  Specifies that only those files smaller than the given number of bytes are",
3292 "  to be sent.",
3293 " ",
3294 "/EXCEPT:pattern",
3295 "  Specifies that any files whose names match the pattern, which can be a",
3296 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
3297 "  are not to be sent.  To specify multiple patterns (up to 8), use outer",
3298 "  braces around the group, and inner braces around each pattern:",
3299 " ",
3300 "    /EXCEPT:{{pattern1}{pattern2}...}",
3301 " ",
3302 "/TYPE:{ALL,TEXT,BINARY}",
3303 "  Send only files of the given type (see SET FILE SCAN).",
3304 " ",
3305 "/LISTFILE:filename",
3306 "  Specifies the name of a file that contains the list of names of files",
3307 "  that are to be sent.  The filenames should be listed one name per line",
3308 "  in this file (but a name can contain wildcards).",
3309 " ",
3310 "Also see HELP RECEIVE, HELP GET, HELP SERVER, HELP REMOTE.",
3311 ""};
3312
3313 static char *hmxxrc[] = {
3314 "Syntax: RECEIVE (or R) [ switches... ] [ as-name ]",
3315 "  Wait for a file to arrive from the other Kermit, which must be given a",
3316 "  SEND command.  If the optional as-name is given, the incoming file or",
3317 "  files are stored under that name, otherwise it will be stored under",
3318 #ifndef CK_TMPDIR
3319 "  the name it arrives with.",
3320 #else
3321 #ifdef OS2
3322 "  the name it arrives with.  If the filespec denotes a disk and/or",
3323 "  directory, the incoming file or files will be stored there.",
3324 #else
3325 "  the name it arrives with.  If the filespec denotes a directory, the",
3326 "  incoming file or files will be placed in that directory.",
3327 #endif /* OS2 */
3328 #endif /* CK_TMPDIR */
3329 " ",
3330 "Optional switches include:",
3331 " ",
3332 "/AS-NAME:text",
3333 "  Specifies \"text\" as the name to store the incoming file under.",
3334 "  You can also specify the as-name as a filename on the command line.",
3335 " ",
3336 "/BINARY",
3337 "  Skips text-mode conversions unless the incoming file arrives with binary",
3338 "  attribute",
3339 " ",
3340 "/COMMAND",
3341 "  Receives the file into the standard input of a command, rather than saving",
3342 "  it on disk.  The /AS-NAME or the \"filename\" on the RECEIVE command line",
3343 "  is interpreted as the name of a command.",
3344 " ",
3345 "/EXCEPT:pattern",
3346 "  Specifies that any files whose names match the pattern, which can be a",
3347 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
3348 "  are to be refused.  To specify multiple patterns (up to 8), use outer",
3349 "  braces around the group, and inner braces around each pattern:",
3350 " ",
3351 "    /EXCEPT:{{pattern1}{pattern2}...}",
3352 " ",
3353 "/FILENAMES:{CONVERTED,LITERAL}",
3354 "  Overrides the global SET FILE NAMES setting for this transfer only.",
3355 " ",
3356 "/FILTER:command",
3357 "  Causes the incoming file to passed through the given command (standard",
3358 "  input/output filter) before being written to disk.",
3359 " ",
3360 #ifdef VMS
3361 "/IMAGE",
3362 "  Receives the file in image mode.",
3363 " ",
3364 #endif /* VMS */
3365 #ifdef CK_LABELED
3366 "/LABELED",
3367 "  Specifies labeled transfer mode.",
3368 " ",
3369 #endif /* CK_LABELED */
3370
3371 "/MOVE-TO:directory-name",
3372 "  Specifies that each file that arrives should be moved to the specified",
3373 "  directory after, and only if, it has been received successfully.",
3374 " ",
3375 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
3376 "  Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
3377 " ",
3378 "/PIPES:{ON,OFF}",
3379 "  Overrides the TRANSFER PIPES setting for this command only.  ON allows",
3380 "  reception of files with names like \"!tar xf -\" to be automatically",
3381 "  directed to a pipeline.",
3382 " ",
3383 "/PROTOCOL:name",
3384 "  Use the given protocol to receive the incoming file(s).",
3385 " ",
3386 "/QUIET",
3387 "  When sending in local mode, this suppresses the file-transfer display.",
3388 " ",
3389 "/RECURSIVE",
3390 "  Equivalent to /PATHNAMES:RELATIVE.",
3391 " ",
3392 "/RENAME-TO:string",
3393 "  Specifies that each file that arrives should be renamed as specified",
3394 "  after, and only if, it has been received successfully.  The string should",
3395 "  normally contain variables like \\v(filename) or \\v(filenum).",
3396 " ",
3397 "/TEXT",
3398 "  Forces text-mode conversions unless the incoming file has the binary",
3399 "  attribute",
3400 " ",
3401 "/TRANSPARENT",
3402 "  Inhibits character-set translation of incoming text files for the duration",
3403 "  of the RECEIVE command without affecting subsequent commands.",
3404 " ",
3405 "Also see HELP SEND, HELP GET, HELP SERVER, HELP REMOTE.",
3406 "" };
3407
3408 #ifndef NORESEND
3409 static char *hmxxrsen = "\
3410 Syntax: RESEND filespec [name]\n\n\
3411   Resends the file or files, whose previous transfer was interrupted.\n\
3412   Picks up from where previous transfer left off, IF the receiver kept the\n\
3413   partially received file.  Works only for binary-mode transfers.\n\
3414   Requires file-transfer partner to support recovery.  Synonym: REPUT.";
3415
3416 static char *hmxxrget = "\
3417 Syntax: REGET filespec\n\n\
3418   Ask a server to RESEND a file to C-Kermit.";
3419
3420 static char *hmxxpsen = "\
3421 Syntax: PSEND filespec position [name]\n\n\
3422   Just like SEND, except sends the file starting at the given byte position.";
3423 #endif /* NORESEND */
3424
3425 #ifndef NOMSEND
3426 static char *hmxxmse[] = {
3427 "Syntax: MSEND [ switches... ] filespec [ filespec [ ... ] ]",
3428 "  Sends the files specified by the filespecs.  One or more filespecs may be",
3429 "  listed, separated by spaces.  Any or all filespecs may contain wildcards",
3430 "  and they may be in different directories.  Alternative names cannot be",
3431 "  given.  Switches include /BINARY /DELETE /MAIL /PROTOCOL /QUIET /RECOVER",
3432 "  /TEXT /TYPE; see HELP SEND for descriptions.",
3433 ""
3434 };
3435 #endif /* NOMSEND */
3436
3437 static char *hmxxadd[] = {
3438 #ifndef NOMSEND
3439 "ADD SEND-LIST filespec [ <mode> [ <as-name> ] ]",
3440 "  Adds the specified file or files to the current SEND list.  Use SHOW",
3441 "  SEND-LIST and CLEAR SEND-LIST to display and clear the list; use SEND",
3442 "  by itself to send the files from it.",
3443 " ",
3444 #endif /* NOMSEND */
3445 #ifdef PATTERNS
3446 "ADD BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3447 "  Adds the pattern(s), if any, to the SET FILE BINARY-PATTERNS list.",
3448 " ",
3449 "ADD TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3450 "  Adds the pattern(s), if any, to the SET FILE TEXT-PATTERNS list.",
3451 "  Use SHOW PATTERNS to see the lists.  See HELP SET FILE for further info.",
3452 #endif /* PATTERNS */
3453 ""};
3454
3455 static char *hmxxremv[] = {
3456 #ifdef PATTERNS
3457 "REMOVE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3458 "  Removes the pattern(s), if any, from the SET FILE BINARY-PATTERNS list",
3459 " ",
3460 "REMOVE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3461 "  Removes the given patterns from the SET FILE TEXT-PATTERNS list.",
3462 "  Use SHOW PATTERNS to see the lists.  See HELP SET FILE for further info.",
3463 #endif /* PATTERNS */
3464 ""};
3465 #endif /* NOXFER */
3466
3467 #ifndef NOSERVER
3468 static char *hmxxser = "Syntax: SERVER\n\
3469   Enter server mode on the current connection.  All further commands\n\
3470   are taken in packet form from the other Kermit program.  Use FINISH,\n\
3471   BYE, or REMOTE EXIT to get C-Kermit out of server mode.";
3472 #endif /* NOSERVER */
3473
3474 static char *hmhset[] = {
3475 "  The SET command establishes communication, file, scripting, or other",
3476 "  parameters.  The SHOW command can be used to display the values of",
3477 "  SET parameters.  Help is available for each individual parameter;",
3478 "  type HELP SET ? to see what's available.",
3479 "" };
3480
3481 #ifndef NOSETKEY
3482 static char *hmhskey[] = {
3483 "Syntax: SET KEY k text",
3484 "Or:     SET KEY CLEAR",
3485 "  Configure the key whose \"scan code\" is k to send the given text when",
3486 "  pressed during CONNECT mode.  SET KEY CLEAR restores all the default",
3487 "  key mappings.  If there is no text, the default key binding is restored",
3488 #ifndef NOCSETS
3489 "  for the key k.  SET KEY mappings take place before terminal character-set",
3490 "  translation.",
3491 #else
3492 "  the key k.",
3493 #endif /* NOCSETS */
3494 #ifdef OS2
3495 " ",
3496 "  The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
3497 "  keypad, function, or editing keys, etc.  For a list of available keyboard",
3498 "  verbs, type SHOW KVERBS.",
3499 #endif /* OS2 */
3500 " ",
3501 "  To find out the scan code and mapping for a particular key, use the",
3502 "  SHOW KEY command.",
3503 ""};
3504 #endif /* NOSETKEY */
3505
3506 static char *hmxychkt[] = { "Syntax: SET BLOCK-CHECK number",
3507 " ",
3508 "Type of block check to be used for error detection on file-transfer",
3509 "packets: 1, 2, 3, 4, or 5.  This command must be given to the file",
3510 "sender prior to the transfer.",
3511 " ",
3512 "Type 1 is standard and supported by all Kermit protocol implementations,",
3513 "  but it's only a 6-bit checksum, represented in a single printable ASCII",
3514 "  character.  It's fine for reliable connections (error-correcting modems,",
3515 "  TCP/IP, etc) but type 3 is recommended for connections where errors can",
3516 "  occur.",
3517 " ",
3518 "Type 2 is a 12-bit checksum represented in two printable characters.",
3519 " ",
3520 "Type 3 is a 16-bit cyclic redundancy check, the strongest error",
3521 "  detection method supported by Kermit protocol, represented in three",
3522 "  printable characters.",
3523 " ",
3524 "Type 4 (alias \"BLANK-FREE-2\") is a 12-bit checksum guaranteed to",
3525 "  contain no blanks in its representation; this is needed for connections",
3526 "  where trailing blanks are stripped from incoming lines of text.",
3527 " ",
3528 "Type 5 (alias \"FORCE-3\") means to force a Type 3 block check on",
3529 "  every packet, including the first packet, which normally has a type 1",
3530 "  block check.  This is for use in critical applications on noisy",
3531 "  connections.  As with types 2, 3, and 4, if the Kermit file",
3532 "  transfer partner does not support this type, the transfer fails",
3533 "  immediately at the beginning of the transfer.",
3534 "" };
3535
3536 static char * hmxydeb[] = {
3537 "Syntax: SET DEBUG { SESSION, ON, OFF, TIMESTAMP, MESSAGES }",
3538 " ",
3539 "SET DEBUG ON",
3540 #ifdef DEBUG
3541 "  Opens a debug log file named debug.log in the current directory.",
3542 "  Use LOG DEBUG if you want specify a different log file name or path.",
3543 #else
3544 "  (Has no effect in this version of Kermit.)",
3545 #endif /* DEBUG */
3546 " ",
3547 "SET DEBUG OFF",
3548 "  Stops debug logging and session debugging.",
3549 " ",
3550 "SET DEBUG SESSION",
3551 #ifndef NOLOCAL
3552 "  Displays control and 8-bit characters symbolically during CONNECT mode.",
3553 "  Equivalent to SET TERMINAL DEBUG ON.",
3554 #else
3555 "  (Has no effect in this version of Kermit.)",
3556 #endif /* NOLOCAL */
3557 " ",
3558 "SET DEBUG TIMESTAMP { ON, OFF }",
3559 "  Enables/Disables timestamps on debug log entries.",
3560 " ",
3561 "SET DEBUG MESSAGES { ON, OFF, STDERR } [C-Kermit 9.0]",
3562 "  Enables/Disables messages printed by the DEBUG command.",
3563 "  SET DEBUG OFF causes DEBUG messages not to be printed.",
3564 "  SET DEBUG ON sends DEBUG messages to standard output (stdout);",
3565 "  SET DEBUG STDERR sends DEBUG messages to standard error (stderr);",
3566 "" };
3567
3568 #ifdef CK_SPEED
3569 static char *hmxyqctl[] = {
3570 "Syntax: SET CONTROL-CHARACTER { PREFIXED, UNPREFIXED } { <code>..., ALL }",
3571 " ",
3572 "  <code> is the numeric ASCII code for a control character 1-31,127-159,255."
3573 ,
3574 "  The word \"ALL\" means all characters in this range.",
3575 " ",
3576 "  PREFIXED <code> means the given control character must be converted to a",
3577 "  printable character and prefixed, the default for all control characters.",
3578 " ",
3579 "  UNPREFIXED <code> means you think it is safe to send the given control",
3580 "  character as-is, without a prefix.  USE THIS OPTION AT YOUR OWN RISK!",
3581 " ",
3582 "  SHOW CONTROL to see current settings.  SET CONTROL PREFIXED ALL is",
3583 "  recommended for safety.  You can include multiple <code> values in one",
3584 "  command, separated by spaces.",
3585 "" };
3586 #endif /* CK_SPEED */
3587
3588 #ifndef NODIAL
3589 static char *hxymodm[] = {
3590 "Syntax: SET MODEM <parameter> <value> ...",
3591 " ",
3592 "Note: Many of the SET MODEM parameters are configured automatically when",
3593 "you SET MODEM TYPE, according to the modem's capabilities.  SHOW MODEM to",
3594 "see them.  Also see HELP DIAL and HELP SET DIAL.",
3595 " ",
3596 "SET MODEM TYPE <name>",
3597
3598 " Tells Kermit which kind of modem you have, so it can issue the",
3599 " appropriate modem-specific commands for configuration, dialing, and",
3600 " hanging up.  For a list of the modem types known to Kermit, type \"set",
3601 " modem type ?\".  The default modem type is GENERIC, which should work",
3602 " with any AT command-set modem that is configured for error correction,",
3603 " data compression, and hardware flow control.  Use SET MODEM TYPE NONE",
3604 " for direct serial, connections.  Use SET MODEM TYPE USER-DEFINED to use",
3605 " a type of modem that is not built in to Kermit, and then use SET MODEM",
3606 " CAPABILITIES, SET MODEM, DIAL-COMMAND, and SET MODEM COMMAND to tell",
3607 " Kermit how to configure and control it.",
3608
3609 " ",
3610
3611 "SET MODEM CAPABILITIES <list>",
3612 "  Use this command for changing Kermit's idea of your modem's capabilities,",
3613 "  for example, if your modem is supposed to have built-in error correction",
3614 "  but in fact does not.  Also use this command to define the capabilities",
3615 "  of a USER-DEFINED modem.  Capabilities are:",
3616 " ",
3617 "    AT      AT-commands",
3618 "    DC      data-compression",
3619 "    EC      error-correction",
3620 "    HWFC    hardware-flow",
3621 "    ITU     v25bis-commands",
3622 "    SWFC    software-flow",
3623 "    KS      kermit-spoof",
3624 "    SB      speed-buffering",
3625 "    TB      Telebit",
3626 " ",
3627 "SET MODEM CARRIER-WATCH { AUTO, ON, OFF }",
3628 "  Synonym for SET CARRIER-WATCH (q.v.)",
3629 " ",
3630 "SET MODEM COMPRESSION { ON, OFF }",
3631 "  Enables/disables the modem's data compression feature, if any.",
3632 " ",
3633 "SET MODEM DIAL-COMMAND <text>",
3634 "  The text replaces Kermit's built-in modem dialing command.  It must",
3635 "  include '%s' (percent s) as a place-holder for the telephone numbers",
3636 "  given in your DIAL commands.",
3637 " ",
3638 "SET MODEM ERROR-CORRECTION { ON, OFF }",
3639 "  Enables/disables the modem's error-correction feature, if any.",
3640 " ",
3641 "SET MODEM ESCAPE-CHARACTER number",
3642 "  Numeric ASCII value of modem's escape character, e.g. 43 for '+'.",
3643 "  For Hayes-compatible modems, Kermit uses three copies, e.g. \"+++\".",
3644 " ",
3645 "SET MODEM FLOW-CONTROL {AUTO, NONE, RTS/CTS, XON/XOFF}",
3646 "  Selects the type of local flow control to be used by the modem.",
3647 " ",
3648 "SET MODEM HANGUP-METHOD { MODEM-COMMAND, RS232-SIGNAL, DTR }",
3649 "  How hangup operations should be done.  MODEM-COMMAND means try to",
3650 "  escape back to the modem's command processor and give a modem-specific",
3651 "  hangup command.  RS232-SIGNAL means turn off the DTR signal.  DTR is a",
3652 "  synonym for RS232-SIGNAL.",
3653 " ",
3654 "SET MODEM KERMIT-SPOOF {ON, OFF}",
3655 "  If the selected modem type supports the Kermit protocol directly,",
3656 "  use this command to turn its Kermit protocol function on or off.",
3657 " ",
3658 "SET MODEM MAXIMUM-SPEED <number>",
3659 "  Specify the maximum interface speed for the modem.",
3660 " ",
3661 "SET MODEM NAME <text>",
3662 "  Descriptive name for a USER-DEFINED modem.",
3663 " ",
3664 "SET MODEM SPEAKER {ON, OFF}",
3665 "  Turns the modem's speaker on or off during dialing.",
3666 " ",
3667 "SET MODEM SPEED-MATCHING {ON, OFF}",
3668 "  ON means that C-Kermit changes its serial interface speed to agree with",
3669 "  the speed reported by the modem's CONNECT message, if any.  OFF means",
3670 "  Kermit should not change its interface speed.",
3671 " ",
3672 "SET MODEM VOLUME {LOW, MEDIUM, HIGH}",
3673 "  Selects the desired modem speaker volume for when the speaker is ON.",
3674 " ",
3675 "SET MODEM COMMAND commands are used to override built-in modem commands for",
3676 "each modem type, or to fill in commands for the USER-DEFINED modem type.",
3677 "Omitting the optional [ text ] restores the built-in modem-specific command,",
3678 "if any:",
3679 " ",
3680 "SET MODEM COMMAND AUTOANSWER {ON, OFF} [ text ]",
3681 "  Modem commands to turn autoanswer on and off.",
3682 " ",
3683 "SET MODEM COMMAND COMPRESSION {ON, OFF} [ text ]",
3684 "  Modem commands to turn data compression on and off.",
3685 " ",
3686 "SET MODEM COMMAND ERROR-CORRECTION {ON, OFF} [ text ]",
3687 "  Modem commands to turn error correction on and off.",
3688 " ",
3689 "SET MODEM COMMAND HANGUP [ text ]",
3690 "  Command that tells the modem to hang up the connection.",
3691 " ",
3692 "SET MODEM COMMAND IGNORE-DIALTONE [ text ]",
3693 "  Command that tells the modem not to wait for dialtone before dialing.",
3694 " ",
3695 "SET MODEM COMMAND INIT-STRING [ text ]",
3696 "  The 'text' is a replacement for C-Kermit's built-in initialization command",
3697 "  for the modem.",
3698 " ",
3699 "SET MODEM COMMAND PREDIAL-INIT [ text ]",
3700 "  A second INIT-STRING that is to be sent to the modem just prior to \
3701 dialing.",
3702 " ",
3703 "SET MODEM COMMAND HARDWARE-FLOW [ text ]",
3704 "  Modem command to enable hardware flow control (RTS/CTS) in the modem.",
3705 " ",
3706 "SET MODEM COMMAND SOFTWARE-FLOW [ text ]",
3707 "  Modem command to enable local software flow control (Xon/Xoff) in modem.",
3708 " ",
3709 "SET MODEM COMMAND SPEAKER { ON, OFF } [ text ]",
3710 "  Modem command to turn the modem's speaker on or off.",
3711 " ",
3712 "SET MODEM COMMAND NO-FLOW-CONTROL [ text ]",
3713 "  Modem command to disable local flow control in the modem.",
3714 " ",
3715 "SET MODEM COMMAND PULSE [ text ]",
3716 "  Modem command to select pulse dialing.",
3717 " ",
3718 "SET MODEM COMMAND TONE [ text ]",
3719 "  Modem command to select tone dialing.",
3720 " ",
3721 "SET MODEM COMMAND VOLUME { LOW, MEDIUM, HIGH } [ text ]",
3722 "  Modem command to set the modem's speaker volume.",
3723 ""};
3724
3725 static char *hmxydial[] = {
3726 "The SET DIAL command establishes or changes all parameters related to",
3727 "dialing the telephone.  Also see HELP DIAL and HELP SET MODEM.  Use SHOW",
3728 "DIAL to display all of the SET DIAL values.",
3729 " ",
3730 "SET DIAL COUNTRY-CODE <number>",
3731 "  Tells Kermit the telephonic country-code of the country you are dialing",
3732 "  from, so it can tell whether a portable-format phone number from your",
3733 "  dialing directory will result in a national or an international call.",
3734 "  Examples: 1 for USA, Canada, Puerto Rico, etc; 7 for Russia, 39 for Italy,",
3735 "  351 for Portugal, 47 for Norway, 44 for the UK, 972 for Israel, 81 for",
3736 "  Japan, ...",
3737 " ",
3738 "  If you have not already set your DIAL INTL-PREFIX and LD-PREFIX, then this",
3739 "  command sets default values for them: 011 and 1, respectively, for country",
3740 "  code 1; 00 and 0, respectively, for all other country codes.  If these are",
3741 "  not your true international and long-distance dialing prefixes, then you",
3742 "  should follow this command by DIAL INTL-PREFIX and LD-PREFIX to let Kermit",
3743 "  know what they really are.",
3744 " ",
3745 "SET DIAL AREA-CODE [ <number> ]",
3746 "  Tells Kermit the area or city code that you are dialing from, so it can",
3747 "  tell whether a portable-format phone number from the dialing directory is",
3748 "  local or long distance.  Be careful not to include your long-distance",
3749 "  dialing prefix as part of your area code; for example, the area code for",
3750 "  central London is 171, not 0171.",
3751 " ",
3752 "SET DIAL CONFIRMATION {ON, OFF}",
3753 "  Kermit does various transformations on a telephone number retrieved from",
3754 "  the dialing directory prior to dialing (use LOOKUP <name> to see them).",
3755 "  In case the result might be wrong, you can use SET DIAL CONFIRM ON to have",
3756 "  Kermit ask you if it is OK to dial the number, and if not, to let you type",
3757 "  in a replacement.",
3758 " ",
3759 "SET DIAL CONNECT { AUTO, ON, OFF }",
3760 "  Whether to CONNECT (enter terminal mode) automatically after successfully",
3761 "  dialing.  ON means to do this; OFF means not to.  AUTO (the default) means",
3762 "  do it if the DIAL command was given interactively, but don't do it if the",
3763 "  DIAL command was issued from a macro or command file.  If you specify ON",
3764 "  or AUTO, you may follow this by one of the keywords VERBOSE or QUIET, to",
3765 "  indicate whether the verbose 4-line 'Connecting...' message is to be",
3766 "  displayed if DIAL succeeds and Kermit goes into CONNECT mode.",
3767 " ",
3768 "SET DIAL CONVERT-DIRECTORY {ASK, ON, OFF}",
3769 "  The format of Kermit's dialing directory changed in version 5A(192).  This",
3770 "  command tells Kermit what to do when it encounters an old-style directory:",
3771 "  ASK you whether to convert it, or convert it automatically (ON), or leave",
3772 "  it alone (OFF).  Old-style directories can still be used without",
3773 "  conversion, but the parity and speed fields are ignored.",
3774 " ",
3775 "SET DIAL DIRECTORY [ filename [ filename [ filename [ ... ] ] ] ]",
3776 "  The name(s) of your dialing directory file(s).  If you do not supply any",
3777 "  filenames, the  dialing directory feature is disabled and all numbers are",
3778 "  dialed literally as given in the DIAL command.  If you supply more than",
3779 "  one directory, all of them are searched.",
3780 " ",
3781 "SET DIAL SORT {ON, OFF}",
3782 "  When multiple entries are obtained from your dialing directory, they are",
3783 "  sorted in \"cheapest-first\" order.  If this does not produce the desired",
3784 "  effect, SET DIAL SORT OFF to disable sorting, and the numbers will be",
3785 "  dialed in the order in which they were found.",
3786 " ",
3787 "SET DIAL DISPLAY {ON, OFF}",
3788 "  Whether to display dialing progress on the screen; default is OFF.",
3789 " ",
3790 "SET DIAL HANGUP {ON, OFF}",
3791 "  Whether to hang up the phone prior to dialing; default is ON.",
3792 " ",
3793 "SET DIAL IGNORE-DIALTONE {ON, OFF}",
3794 "  Whether to ignore dialtone when dialing; default is OFF.",
3795 " ",
3796 #ifndef NOSPL
3797 "SET DIAL MACRO [ name ]",
3798 "  Specify the name of a macro to execute on every phone number dialed, just",
3799 "  prior to dialing it, in order to perform any last-minute alterations.",
3800 " ",
3801 #endif /* NOSPL */
3802 "SET DIAL METHOD {AUTO, DEFAULT, TONE, PULSE}",
3803 "  Whether to use the modem's DEFAULT dialing method, or to force TONE or",
3804 "  PULSE dialing.  AUTO (the default) means to choose tone or pulse dialing",
3805 "  based on the country code.  (Also see SET DIAL TONE-COUNTRIES and SET DIAL",
3806 "  PULSE-COUNTRIES.)",
3807 " ",
3808 "SET DIAL PACING number",
3809 "  How many milliseconds to pause between sending each character to the modem",
3810 "  dialer.  The default is -1, meaning to use the number from the built-in",
3811 " modem database.",
3812 "  ",
3813 "SET DIAL PULSE-COUNTRIES [ cc [ cc [ ... ] ] ]",
3814 "  Sets the list of countries in which pulse dialing is required.  Each cc",
3815 "  is a country code.",
3816 " ",
3817 "SET DIAL TEST { ON, OFF }",
3818 "  OFF for normal dialing.  Set to ON to test dialing procedures without",
3819 "  actually dialing.",
3820 " ",
3821 "SET DIAL TONE-COUNTRIES [ cc [ cc [ ... ] ] ]",
3822 "  Sets the list of countries in which tone dialing is available.  Each cc",
3823 "  is a country code.",
3824 " ",
3825 "SET DIAL TIMEOUT number",
3826 "  How many seconds to wait for a dialed call to complete.  Use this command",
3827 "  to override the DIAL command's automatic timeout calculation.  A value",
3828 "  of 0 turns off this feature and returns to Kermit's automatic dial",
3829 "  timeout calculation.",
3830 " ",
3831 "SET DIAL RESTRICT { INTERNATIONAL, LOCAL, LONG-DISTANCE, NONE }",
3832 "  Prevents placing calls of the type indicated, or greater.  For example",
3833 "  SET DIAL RESTRICT LONG prevents placing of long-distance and international",
3834 "  calls.  If this command is not given, there are no restrictions.  Useful",
3835 "  when dialing a list of numbers fetched from a dialing directory.",
3836 " ",
3837 "SET DIAL RETRIES <number>",
3838 "  How many times to redial each number if the dialing result is busy or no",
3839 "  no answer, until the call is successfully answered.  The default is 0",
3840 "  because automatic redialing is illegal in some countries.",
3841 " ",
3842 "SET DIAL INTERVAL <number>",
3843 "  How many seconds to pause between automatic redial attempts; default 10.",
3844 " ",
3845 "The following commands apply to all phone numbers, whether given literally",
3846 "or found in the dialing directory:",
3847 " ",
3848 "SET DIAL PREFIX [ text ]",
3849 "  Establish a prefix to be applied to all phone numbers that are dialed,",
3850 "  for example to disable call waiting.",
3851 " ",
3852 "SET DIAL SUFFIX [ text ]",
3853 "  Establish a suffix to be added after all phone numbers that are dialed.",
3854 " ",
3855 "The following commands apply only to portable-format numbers obtained from",
3856 "the dialing directory; i.e. numbers that start with a \"+\" sign and",
3857 "country code, followed by area code in parentheses, followed by the phone",
3858 "number.",
3859 " ",
3860 "SET DIAL LC-AREA-CODES [ <list> ]",
3861 "  Species a list of area codes to which dialing is local, i.e. does not",
3862 "  require the LD-PREFIX.  Up to 32 area codes may be listed, separated by",
3863 "  spaces.  Any area codes in this list will be included in the final dial",
3864 "  string so do not include your own area code if it should not be dialed.",
3865 " ",
3866 "SET DIAL LC-PREFIX [ <text> ]",
3867 "  Specifies a prefix to be applied to local calls made from portable dialing",
3868 "  directory entries.  Normally no prefix is used for local calls.",
3869 " ",
3870 "SET DIAL LC-SUFFIX [ <text> ]",
3871 "  Specifies a suffix to be applied to local calls made from portable dialing",
3872 "  directory entries.  Normally no suffix is used for local calls.",
3873 " ",
3874 "SET DIAL LD-PREFIX [ <text> ]",
3875 "  Your long-distance dialing prefix, to be used with portable dialing",
3876 "  directory entries that result in long-distance calls.",
3877 " ",
3878 "SET DIAL LD-SUFFIX [ <text> ]",
3879 "  Long-distance dialing suffix, if any, to be used with portable dialing",
3880 "  directory entries that result in long-distance calls.  This would normally",
3881 "  be used for appending a calling-card number to the phone number.",
3882 " ",
3883 "SET DIAL FORCE-LONG-DISTANCE { ON, OFF }",
3884 "  Whether to force long-distance dialing for calls that normally would be",
3885 "  local.  For use (e.g.) in France.",
3886 " ",
3887 "SET DIAL TOLL-FREE-AREA-CODE [ <number> [ <number> [ ... ] ] ]",
3888 "  Tells Kermit the toll-free area code(s) in your country.",
3889 " ",
3890 "SET DIAL TOLL-FREE-PREFIX [ <text> ]",
3891 "  You toll-free dialing prefix, in case it is different from your long-",
3892 "  distance dialing prefix.",
3893 " ",
3894 "SET DIAL INTL-PREFIX <text>",
3895 "  Your international dialing prefix, to be used with portable dialing",
3896 "  directory entries that result in international calls.",
3897 " ",
3898 "SET DIAL INTL-SUFFIX <text>",
3899 "  International dialing suffix, if any, to be used with portable dialing",
3900 "  directory entries that result in international calls.",
3901 " ",
3902 "SET DIAL PBX-OUTSIDE-PREFIX <text>",
3903 "  Use this to tell Kermit how to get an outside line when dialing from a",
3904 "  Private Branch Exchange (PBX).",
3905 " ",
3906 "SET DIAL PBX-EXCHANGE <text> [ <text> [ ... ] ]",
3907 "  If PBX-OUTSIDE-PREFIX is set, then you can use this command to tell Kermit",
3908 "  the leading digits of one or more local phone numbers that identify it as",
3909 "  being on your PBX, so it can make an internal call by deleting those digits"
3910 ,
3911 "  from the phone number.",
3912 " ",
3913 "SET DIAL PBX-INTERNAL-PREFIX <text>",
3914 "  If PBX-EXCHANGE is set, and Kermit determines from it that a call is",
3915 "  internal, then this prefix, if any, is added to the number prior to",
3916 "  \
3917 dialing.  Use this if internal calls from your PBX require a special prefix.",
3918 "" };
3919 #endif /* NODIAL */
3920
3921 static char *hmxyflo[] = { "Syntax: SET FLOW [ switch ] value",
3922 " ",
3923 #ifndef NOLOCAL
3924 "  Selects the type of flow control to use during file transfer, terminal",
3925 "  connection, and script execution.",
3926 #else
3927 "  Selects the type of flow control to use during file transfer.",
3928 #endif /* NOLOCAL */
3929 " ",
3930 "  Switches let you associate a particular kind of flow control with each",
3931 "  kind of connection: /REMOTE, /MODEM, /DIRECT-SERIAL, /TCPIP, etc; type",
3932 "  \"set flow ?\" for a list of available switches.  Then whenever you make",
3933 "  a connection, the associated flow-control is chosen automatically.",
3934 "  The flow-control values are NONE, KEEP, XON/XOFF, and possibly RTS/CTS",
3935 "  and some others; again, type \"set flow ?\" for a list.  KEEP tells Kermit",
3936 "  not to try to change the current flow-control method for the connection.",
3937 " ",
3938 "  If you omit the switch and simply supply a value, this value becomes the",
3939 "  current flow control type, overriding any default value that might have",
3940 "  been chosen in your most recent SET LINE, SET PORT, or SET HOST, or other",
3941 "  connection-establishment command.",
3942 " ",
3943 "  Type SHOW FLOW-CONTROL to see the current defaults for each connection type"
3944 ,
3945 "  as well as the current connection type and flow-control setting.  SHOW",
3946 "  COMMUNICATIONS also shows the current flow-control setting.",
3947 ""};
3948
3949 static char *hmxyf[] = {
3950 "Syntax: SET FILE parameter value",
3951 " ",
3952 "Sets file-related parameters.  Use SHOW FILE to view them.  Also see SET",
3953 "(and SHOW) TRANSFER and PROTOCOL.",
3954 " ",
3955 #ifdef VMS
3956 "SET FILE TYPE { TEXT, BINARY, IMAGE, LABELED }",
3957 #else
3958 #ifdef STRATUS
3959 "SET FILE TYPE { TEXT, BINARY, LABELED }",
3960 #else
3961 #ifdef MAC
3962 "SET FILE TYPE { TEXT, BINARY, MACBINARY }",
3963 #else
3964 "SET FILE TYPE { TEXT, BINARY }",
3965 #endif /* STRATUS */
3966 #endif /* MAC */
3967 #endif /* VMS */
3968 "  How file contents are to be treated during file transfer in the absence",
3969 "  of any other indication.  TYPE can be TEXT for conversion of record format",
3970 "  and character set, which is usually needed when transferring text files",
3971 "  between unlike platforms (such as UNIX and Windows), or BINARY for no",
3972 "  conversion if TRANSFER MODE is MANUAL, which is not the default.  Use",
3973 "  BINARY with TRANSFER MODE MANUAL for executable programs or binary data or",
3974 "  whenever you wish to duplicate the original contents of the file, byte for"
3975 ,
3976 "  byte.  In most modern Kermit programs, the file sender informs the receiver"
3977 ,
3978 "  of the file type automatically.  However, when sending files from C-Kermit",
3979 "  to an ancient or non-Columbia Kermit implementation, you might need to set",
3980 "  the corresponding file type at the receiver as well.",
3981 " ",
3982 #ifdef VMS
3983 "  FILE TYPE settings of TEXT and BINARY have no effect when sending files,",
3984 "  since VMS C-Kermit determines each file's type automatically from its",
3985 "  record format: binary for fixed, text for others.  For incoming files,",
3986 "  these settings are effective only in the absence of a file-type indication",
3987 "  from the sender.",
3988 " ",
3989 "  You may include an optional record-format after the word BINARY.  This may",
3990 "  be FIXED (the default) or UNDEFINED.  UNDEFINED is used when you need to",
3991 "  receive binary files in binary mode and have them stored with UNDEFINED",
3992 "  record format, which is required by certain VMS applications.",
3993 " ",
3994 "  Two additional VMS file types are also supported: IMAGE and LABELED.",
3995 "  IMAGE means raw block i/o, no interference from RMS, applies to file",
3996 "  transmission only, and overrides the normal automatica file type",
3997 "  determination.   LABELED means to send or interpret RMS attributes",
3998 "  with the file.",
3999 " ",
4000 #else
4001 "  When TRANSFER MODE is AUTOMATIC (as it is by default), various automatic",
4002 "  methods (depending on the platform) are used to determine whether a file",
4003 "  is transferred in text or binary mode; these methods (which might include",
4004 "  content scan (see SET FILE SCAN below), filename pattern matching (SET FILE"
4005 ,
4006 "  PATTERNS), client/server \"kindred-spirit\" recognition, or source file",
4007 "  record format) supersede the FILE TYPE setting but can, themselves, be",
4008 "  superseded by including a /BINARY or /TEXT switch in the SEND, GET, or",
4009 "  RECEIVE command.",
4010 " ",
4011 "  When TRANSFER MODE is MANUAL, the automatic methods are skipped for sending"
4012 ,
4013 "  files; the FILE TYPE setting is used instead, which can be superseded on",
4014 "  a per-command basis with a /TEXT or /BINARY switch.",
4015 #endif /* VMS */
4016 " ",
4017
4018 #ifndef NOXFER
4019
4020 "SET FILE BYTESIZE { 7, 8 }",
4021 "  Normally 8.  If 7, Kermit truncates the 8th bit of all file bytes.",
4022 " ",
4023 #ifndef NOCSETS
4024 "SET FILE CHARACTER-SET name",
4025 "  Tells the encoding of the local file, ASCII by default.",
4026 "  The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646",
4027 "  national character sets.  LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1",
4028 "  for Western European languages.",
4029 "  NEXT is the 8-bit character set of the NeXT workstation.",
4030 "  The CPnnn sets are for PCs.  MACINTOSH-LATIN is for the Macintosh.",
4031 #ifndef NOLATIN2
4032 "  LATIN2 is ISO 8859-2 for Eastern European languages that are written with",
4033 "  Roman letters.  Mazovia is a PC code page used in Poland.",
4034 #endif /* NOLATIN2 */
4035 #ifdef CYRILLIC
4036 "  KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.",
4037 "  SHORT-KOI is a 7-bit ASCII coding for Cyrillic.  BULGARIA-PC is a PC code",
4038 "  page used in Bulgaria",
4039 #endif /* CYRILLIC */
4040 #ifdef HEBREW
4041 "  HEBREW-ISO is ISO 8859-8 Latin/Hebrew.  CP862 is the Hebrew PC code page.",
4042 "  HEBREW-7 is like ASCII with the lowercase letters replaced by Hebrew.",
4043 #endif /* HEBREW */
4044 #ifdef GREEK
4045 "  GREEK-ISO is ISO 8859-7 Latin/Greek.  CP869 is the Greek PC code page.",
4046 "  ELOT-927 is like ASCII with the lowercase letters replaced by Greek.",
4047 #endif /* GREEK */
4048 #ifdef KANJI
4049 "  JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI are Japanese",
4050 "  Kanji character sets.",
4051 #endif /* KANJI */
4052 #ifdef UNICODE
4053 "  UCS-2 is the 2-byte form of the Universal Character Set.",
4054 "  UTF-8 is the serialized form of the Universal Character Set.",
4055 #endif /* UNICODE */
4056 "  Type SET FILE CHAR ? for a complete list of file character sets.",
4057 " ",
4058 "SET FILE DEFAULT 7BIT-CHARACTER-SET",
4059 "  When automatically switching among different kinds of files while sending",
4060 "  this tells the character set to be used for 7-bit text files.",
4061 " ",
4062 "SET FILE DEFAULT 8BIT-CHARACTER-SET",
4063 "  This tells the character set to be used for 8-bit text files when",
4064 "  switching automatically among different kinds of files.",
4065 " ",
4066 #endif /* NOCSETS */
4067
4068 "SET FILE COLLISION option",
4069 "  Tells what to do when a file arrives that has the same name as",
4070 "  an existing file.  The options are:",
4071 "   BACKUP (default) - Rename the old file to a new, unique name and store",
4072 "     the incoming file under the name it was sent with.",
4073 "   OVERWRITE - Overwrite (replace) the existing file.",
4074 "   APPEND - Append the incoming file to the end of the existing file.",
4075 "   REJECT - Refuse and/or discard the incoming file (= DISCARD).",
4076 "   RENAME - Give the incoming file a unique name.",
4077 "   UPDATE - Accept the incoming file only if newer than the existing file.",
4078 " ",
4079
4080 "SET FILE DESTINATION { DISK, PRINTER, SCREEN, NOWHERE }",
4081 "  DISK (default): Store incoming files on disk.",
4082 "  PRINTER:        Send incoming files to SET PRINTER device.",
4083 "  SCREEN:         Display incoming files on screen (local mode only).",
4084 "  NOWHERE:        Do not put incoming files anywhere (use for calibration).",
4085 " ",
4086 "SET FILE DISPLAY option",
4087 "  Selects the format of the file transfer display for local-mode file",
4088 "  transfer.  The choices are:",
4089 " ",
4090 "  BRIEF      A line per file, showing size, mode, status, and throughput.",
4091 "  SERIAL     One dot is printed for every K bytes transferred.",
4092 "  CRT        Numbers are continuously updated on a single screen line.",
4093 "             This format can be used on any video display terminal.",
4094 #ifdef CK_CURSES
4095 "  FULLSCREEN A fully formatted 24x80 screen showing lots of information.",
4096 "             This requires a terminal or terminal emulator.",
4097 #endif /* CK_CURSES */
4098 "  NONE       No file transfer display at all.",
4099 " ",
4100
4101 "SET FILE DOWNLOAD-DIRECTORY [ <directory-name> ]",
4102 "  The directory into which all received files should be placed.  By default,",
4103 "  received files go into your current directory.",
4104 " ",
4105 #endif /* NOXFER */
4106
4107 #ifdef CK_CTRLZ
4108 "SET FILE EOF { CTRL-Z, LENGTH }",
4109 "  End-Of-File detection method, normally LENGTH.  Applies only to text-mode",
4110 "  transfers.  When set to CTRL-Z, this makes the file sender treat the first",
4111 "  Ctrl-Z in the input file as the end of file (EOF), and it makes the file",
4112 "  receiver tack a Ctrl-Z onto the end of the output file if it does not",
4113 "  already end with Ctrl-Z.",
4114 " ",
4115 #endif /* CK_CTRLZ */
4116
4117 "SET FILE END-OF-LINE { CR, CRLF, LF }",
4118 "  Use this command to specify nonstandard line terminators for text files.",
4119 " ",
4120
4121 #ifndef NOXFER
4122 "SET FILE INCOMPLETE { AUTO, KEEP, DISCARD }",
4123 "  What to do with an incompletely received file: KEEP, DISCARD, or AUTO.",
4124 "  AUTO (the default) means DISCARD if transfer is in text mode, KEEP if it",
4125 "  is in binary mode.",
4126 " ",
4127 #ifdef VMS
4128 "SET FILE LABEL { ACL, BACKUP-DATE, NAME, OWNER, PATH } { ON, OFF }",
4129 "  Tells which items to include (ON) or exclude (OFF) in labeled file",
4130 "  transfers",
4131 " ",
4132 #else
4133 #ifdef OS2
4134 "SET FILE LABEL { ARCHIVE, READ-ONLY, HIDDEN, SYSTEM, EXTENDED } { ON, OFF }",
4135 "  Tells which items to include (ON) or exclude (OFF) in labeled file",
4136 "  transfers.",
4137 " ",
4138 #endif /* OS2 */
4139 #endif /* VMS */
4140
4141 #ifdef UNIX
4142 #ifdef DYNAMIC
4143 "SET FILE LISTSIZE number",
4144 "  Changes the size of the internal wildcard expansion list.  Use SHOW FILE",
4145 "  to see the current size.  Use this command to increase the size if you get",
4146 "  a \"?Too many files\" error.  Also see SET FILE STRINGSPACE.",
4147 " ",
4148 #endif /* DYNAMIC */
4149 #endif /* UNIX */
4150
4151 "SET FILE NAMES { CONVERTED, LITERAL }",
4152 "  File names are normally CONVERTED to \"common form\" during transmission",
4153 "  (e.g. lowercase to uppercase, extra periods changed to underscore, etc).",
4154 "  LITERAL means use filenames literally (useful between like systems).  Also",
4155 "  see SET SEND PATHNAMES and SET RECEIVE PATHNAMES.",
4156 " ",
4157
4158 #ifdef UNIX
4159 "SET FILE OUTPUT { { BUFFERED, UNBUFFERED } [ size ], BLOCKING, NONBLOCKING }",
4160 "  Lets you control the disk output buffer for incoming files.  Buffered",
4161 "  blocking writes are normal.  Nonblocking writes might be faster on some",
4162 "  systems but might also be risky, depending on the underlying file service.",
4163 "  Unbuffered writes might be useful in critical applications to ensure that",
4164 "  cached disk writes are not lost in a crash, but will probably also be",
4165 "  slower.  The optional size parameter after BUFFERED or UNBUFFERED lets you",
4166 "  change the disk output buffer size; this might make a difference in",
4167 "  performance.",
4168 " ",
4169 #endif /* UNIX */
4170
4171 #ifdef PATTERNS
4172 "SET FILE PATTERNS { ON, OFF, AUTO }",
4173 "  ON means to use filename pattern lists to determine whether to send a file",
4174 "  in text or binary mode.  OFF means to send all files in the prevailing",
4175 "  mode.  AUTO (the default) is like ON if the other Kermit accepts Attribute",
4176 "  packets and like OFF otherwise.  FILE PATTERNS are used only if FILE SCAN",
4177 "  is OFF (see SET FILE SCAN).",
4178 " ",
4179 "SET FILE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
4180 "  Zero or more filename patterns which, if matched, cause a file to be sent",
4181 "  in binary mode when FILE PATTERNS are ON.  HELP WILDCARDS for a description"
4182 ,
4183 "  of pattern syntax.  SHOW PATTERNS to see the current file pattern lists.",
4184 " ",
4185 "SET FILE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
4186 "  Zero or more filename patterns which, if matched, cause a file to be sent",
4187 "  in text mode when FILE PATTERNS is ON; if a file does not match a text or",
4188 "  binary pattern, the prevailing SET FILE TYPE is used.",
4189 " ",
4190 #endif /* PATTERNS */
4191
4192 #ifdef VMS
4193 "SET FILE RECORD-LENGTH number",
4194 "  Sets the record length for received files of type BINARY.  Use this to",
4195 "  receive VMS BACKUP savesets or other fixed-format files that do not use",
4196 "  the default record length of 512.",
4197 " ",
4198 #endif /* VMS */
4199
4200 "SET FILE SCAN { ON [ size ], OFF }",
4201 "  If TRANSFER MODE is AUTOMATIC and FILE SCAN is ON (as it is by default)",
4202 "  Kermit peeks at the file's contents to see if it's text or binary.  Use",
4203 "  SET FILE SCAN OFF to disable file peeking, while still keeping TRANSFER",
4204 "  MODE automatic to allow name patterns and other methods.  The optional",
4205 "  size is the number of file bytes to scan, 49152 by default.  -1 means to",
4206 "  scan the whole file.  Also see SET FILE PATTERNS.",
4207 " ",
4208
4209 #ifdef UNIX
4210 #ifdef DYNAMIC
4211 "SET FILE STRINGSPACE number",
4212 "  Changes the size (in bytes) of the internal buffer that holds lists of",
4213 "  filenames such as wildcard expansion lists.  Use SHOW FILE to see the",
4214 "  current size.  Use this command to increase the size if you get a",
4215 "  \"?String space exhausted\" error.  Also see SET FILE LISTSIZE.",
4216 " ",
4217 #endif /* DYNAMIC */
4218 #endif /* UNIX */
4219
4220 #ifdef UNICODE
4221 "SET FILE UCS BOM { ON, OFF }",
4222 "  Whether to write a Byte Order Mark when creating a UCS-2 file.",
4223 " ",
4224 "SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }",
4225 "  Byte order to use when creating UCS-2 files, and to use when reading UCS-2",
4226 "  files that do not start with a Byte Order Mark.",
4227 " ",
4228 #endif /* UNICODE */
4229
4230 "SET FILE WARNING { ON, OFF }",
4231 "  SET FILE WARNING is superseded by the newer command, SET FILE",
4232 "  COLLISION.  SET FILE WARNING ON is equivalent to SET FILE COLLISION RENAME",
4233 "  and SET FILE WARNING OFF is equivalent to SET FILE COLLISION OVERWRITE.",
4234 #endif /* NOXFER */
4235 "" };
4236
4237 static char *hmxyhsh[] = {
4238 "Syntax: SET HANDSHAKE { NONE, XON, LF, BELL, ESC, CODE number }",
4239 "  Character to use for half duplex line turnaround handshake during file",
4240 "  transfer.  C-Kermit waits for this character from the other computer",
4241 "  before sending its next packet.  Default is NONE; you can give one of the",
4242 "  other names like BELL or ESC, or use SET HANDSHAKE CODE to specify the",
4243 "  numeric code value of the handshake character.  Type SET HANDSH ? for a",
4244 "  complete list of possibilities.",
4245 "" };
4246
4247 #ifndef NOSERVER
4248 static char *hsetsrv[] = {
4249 "SET SERVER CD-MESSAGE {ON,OFF}",
4250 "  Tells whether the server, after successfully executing a REMOTE CD",
4251 "  command, should send the contents of the new directory's READ.ME",
4252 "  (or similar) file to your screen.",
4253 " ",
4254 "SET SERVER CD-MESSAGE FILE name",
4255 "  Tells the name of the file to be displayed as a CD-MESSAGE, such as",
4256 "  READ.ME (SHOW SERVER tells the current CD-MESSAGE FILE name).",
4257 "  To specify more than one filename to look for, use {{name1}{name2}..}.",
4258 "  Synonym: SET CD MESSAGE FILE <list>.",
4259 " ",
4260 "SET SERVER DISPLAY {ON,OFF}",
4261 "  Tells whether local-mode C-Kermit during server operation should put a",
4262 "  file transfer display on the screen.  Default is OFF.",
4263 " ",
4264 "SET SERVER GET-PATH [ directory [ directory [ ... ] ] ]",
4265 "  Tells the C-Kermit server where to look for files whose names it receives",
4266 "  from client GET commands when the names are not fully specified pathnames.",
4267 "  Default is no GET-PATH, so C-Kermit looks only in its current directory.",
4268 " ",
4269 "SET SERVER IDLE-TIMEOUT seconds",
4270 "  Idle time limit while in server mode, 0 for no limit.",
4271 #ifndef OS2
4272 "  NOTE: SERVER IDLE-TIMEOUT and SERVER TIMEOUT are mutually exclusive.",
4273 #endif /* OS2 */
4274 " ",
4275 "SET SERVER KEEPALIVE {ON,OFF}",
4276 "  Tells whether C-Kermit should send \"keepalive\" packets while executing",
4277 "  REMOTE HOST commands, which is useful in case the command takes a long",
4278 "  time to produce any output and therefore might cause the operation to time",
4279 "  out.  ON by default; turn it OFF if it causes trouble with the client or",
4280 "  slows down the server too much.",
4281 " ",
4282 "SET SERVER LOGIN [ username [ password [ account ] ] ]",
4283 "  Sets up a username and optional password which must be supplied before",
4284 "  the server will respond to any commands other than REMOTE LOGIN.  The",
4285 "  account is ignored.  If you enter SET SERVER LOGIN by itself, then login",
4286 "  is no longer required.  Only one SET SERVER LOGIN command can be in effect",
4287 "  at a time; C-Kermit does not support multiple user/password pairs.",
4288 " ",
4289 "SET SERVER TIMEOUT n",
4290 "  Server command wait timeout interval, how often the C-Kermit server issues",
4291 "  a NAK while waiting for a command packet.  Specify 0 for no NAKs at all.",
4292 "  Default is 0.",
4293 ""
4294 };
4295 #endif /* NOSERVER */
4296
4297 static char *hmhrmt[] = {
4298 #ifdef NEWFTP
4299 "The REMOTE command sends file management instructions or other commands",
4300 "to a Kermit or FTP server.  If you have a single connection, the command is",
4301 "directed to the server you are connected to; if you have multiple connections"
4302 ,
4303 "the command is directed according to your GET-PUT-REMOTE setting.",
4304 #else
4305 "The REMOTE command sends file management instructions or other commands",
4306 "to a Kermit server.  There should already be a Kermit running in server",
4307 "mode on the other end of the connection.",
4308 #endif /* NEWFTP */
4309 "Type REMOTE ? to see a list of available remote commands.  Type HELP REMOTE",
4310 "xxx to get further information about a particular remote command xxx.",
4311 " ",
4312 "All REMOTE commands except LOGIN and LOGOUT have R-command shortcuts;",
4313 "for example, RDIR for REMOTE DIR, RCD for REMOTE CD, etc.",
4314 " ",
4315 #ifdef NEWFTP
4316 #ifdef LOCUS
4317 "Also see: HELP SET LOCUS, HELP FTP, HELP SET GET-PUT-REMOTE.",
4318 #else
4319 "Also see: HELP FTP, HELP SET GET-PUT-REMOTE.",
4320 #endif /* LOCUS */
4321 #else
4322 #ifdef LOCUS
4323 "Also see: HELP SET LOCUS.",
4324 #endif /* LOCUS */
4325 #endif /* NEWFTP */
4326 "" };
4327
4328 #ifndef NOSPL
4329 static char *ifhlp[] = { "Syntax: IF [NOT] condition commandlist",
4330 " ",
4331 "If the condition is (is not) true, do the commandlist.  The commandlist",
4332 "can be a single command, or a list of commands separated by commas and",
4333 "enclosed in braces.  The condition can be a single condition or a group of",
4334 "conditions separated by AND (&&) or OR (||) and enclosed in parentheses.",
4335 "If parentheses are used they must be surrounded by spaces.  Examples:",
4336 " ",
4337 "  IF EXIST oofa.txt <command>",
4338 "  IF ( EXIST oofa.txt || = \\v(nday) 3 ) <command>",
4339 "  IF ( EXIST oofa.txt || = \\v(nday) 3 ) { <command>, <command>, ... }",
4340 " ",
4341 "The conditions are:",
4342 " ",
4343 "  SUCCESS     - The previous command succeeded",
4344 "  OK          - Synonym for SUCCESS",
4345 "  FAILURE     - The previous command failed",
4346 "  ERROR       - Synonym for FAILURE",
4347 "  FLAG        - Succeeds if SET FLAG ON, fails if SET FLAG OFF",
4348 "  BACKGROUND  - C-Kermit is running in the background",
4349 #ifdef CK_IFRO
4350 "  FOREGROUND  - C-Kermit is running in the foreground",
4351 "  REMOTE-ONLY - C-Kermit was started with the -R command-line option",
4352 #else
4353 "  FOREGROUND  - C-Kermit is running in the foreground",
4354 #endif /* CK_IFRO */
4355 "  KERBANG     - A Kerbang script is running",
4356 "  ALARM       - SET ALARM time has passed",
4357 "  ASKTIMEOUT  - The most recent ASK, ASKQ, GETC, or GETOK timed out",
4358 "  EMULATION   - Succeeds if executed while in CONNECT mode",
4359 #ifdef OS2
4360 "  TAPI        - Current connection is via a Microsoft TAPI device",
4361 #endif /* OS2 */
4362 " ",
4363 "  MS-KERMIT   - Program is MS-DOS Kermit",
4364 "  C-KERMIT    - Program is C-Kermit",
4365 "  K-95        - Program is Kermit 95",
4366 "  GUI         - Program runs in a GUI window",
4367 " ",
4368 "  AVAILABLE CRYPTO                  - Encryption is available",
4369 "  AVAILABLE KERBEROS4               - Kerberos 4 authentication is available",
4370 "  AVAILABLE KERBEROS5               - Kerberos 5 authentication is available",
4371 "  AVAILABLE NTLM                    - NTLM authentication is available",
4372 "  AVAILABLE SRP                     - SRP authentication is available",
4373 "  AVAILABLE SSL                     - SSL/TLS authentication is available",
4374 "  MATCH string pattern              - Succeeds if string matches pattern",
4375 #ifdef CKFLOAT
4376 "  FLOAT number                      - Succeeds if floating-point number",
4377 #endif /* CKFLOAT */
4378 "  COMMAND word                      - Succeeds if word is built-in command",
4379 "  DEFINED variablename or macroname - The named variable or macro is defined",
4380 "  DECLARED arrayname                - The named array is declared",
4381 "  NUMERIC variable or constant      - The variable or constant is numeric",
4382 "  EXIST filename                    - The named file exists",
4383 "  ABSOLUTE filename                 - The filename is absolute, not relative",
4384 #ifdef CK_TMPDIR
4385 "  DIRECTORY string                  - The string is the name of a directory",
4386 #endif /* CK_TMPDIR */
4387 #ifdef UNIX
4388 "  LINK string                       - The string is a symbolic link",
4389 #endif  /* UNIX */
4390 "  READABLE filename                 - Succeeds if the file is readable",
4391 "  WRITEABLE filename                - Succeeds if the file is writeable",
4392 #ifdef ZFCDAT
4393 "  NEWER file1 file2                 - The 1st file is newer than the 2nd one",
4394 #endif /* ZFCDAT */
4395 "  OPEN { READ-FILE,SESSION-LOG,...} - The given file or log is open",
4396 #ifndef NOLOCAL
4397 "  OPEN CONNECTION                   - A connection is open",
4398 #endif /* NOLOCAL */
4399 "  KBHIT                             - A key has been pressed",
4400 " ",
4401 "  VERSION - equivalent to \"if >= \\v(version) ...\"",
4402 "  COUNT   - subtract one from COUNT, execute the command if the result is",
4403 "            greater than zero (see SET COUNT)",
4404 " ",
4405 "  EQUAL s1 s2 - s1 and s2 (character strings or variables) are equal",
4406 "  LLT s1 s2   - s1 is lexically (alphabetically) less than s2",
4407 "  LGT s1 s1   - s1 is lexically (alphabetically) greater than s2",
4408 " ",
4409 "  =  n1 n2 - n1 and n2 (numbers or variables containing numbers) are equal",
4410 "  <  n1 n2 - n1 is arithmetically less than n2",
4411 "  <= n1 n2 - n1 is arithmetically less than or equal to n2",
4412 "  >  n1 n2 - n1 is arithmetically greater than n2",
4413 "  >= n1 n2 - n1 is arithmetically greater than or equal to n2",
4414 " ",
4415 "  (number by itself) - fails if the number is 0, succeeds otherwise",
4416 " ",
4417 "  TRUE     - always succeeds",
4418 "  FALSE    - always fails",
4419 " ",
4420 "The IF command may be followed on the next line by an ELSE command. Example:",
4421 " ",
4422 "  IF < \\%x 10 ECHO It's less",
4423 "  ELSE echo It's not less",
4424 " ",
4425 "It can also include an ELSE part on the same line if braces are used:",
4426 " ",
4427 "  IF < \\%x 10 { ECHO It's less } ELSE { ECHO It's not less }",
4428 " ",
4429 "Also see HELP WILDCARD (for IF MATCH pattern syntax).",
4430 "" };
4431
4432 static char *hmxxeval[] = { "Syntax: EVALUATE variable expression",
4433 "  Evaluates the expression and assigns its value to the given variable.",
4434 "  The expression can contain numbers and/or numeric-valued variables or",
4435 "  functions, combined with mathematical operators and parentheses in",
4436 "  traditional notation.  Operators include +-/*(), etc.  Example:",
4437 "  EVALUATE \\%n (1+1) * (\\%a / 3).",
4438 " ",
4439 "  NOTE: Prior to C-Kermit 7.0, the syntax was \"EVALUATE expression\"",
4440 "  (no variable), and the result was printed.  Use SET EVAL { OLD, NEW }",
4441 "  to choose the old or new behavior, which is NEW by default.",
4442 " ",
4443 "Alse see: HELP FUNCTION EVAL.",
4444 "" };
4445 #endif /* NOSPL */
4446
4447 static char *hmxxexit[] = {
4448 "Syntax: EXIT (or QUIT) [ number [ text ] ]",
4449 "  Exits from the Kermit program, closing all open files and devices.",
4450 "  If a number is given it becomes Kermit's exit status code.  If text is",
4451 "  included, it is printed.  Also see SET EXIT.",
4452 "" };
4453
4454 #ifndef NOSPL
4455 static char *ifxhlp[] = { "\
4456 Syntax: XIF condition { commandlist } [ ELSE { commandlist } ]",
4457 "  Obsolete.  Same as IF (see HELP IF).",
4458 "" };
4459
4460 static char *forhlp[] = { "\
4461 Syntax: FOR variablename initial-value final-value increment { commandlist }",
4462 "  FOR loop.  Execute the comma-separated commands in the commandlist the",
4463 "  number of times given by the initial value, final value and increment.",
4464 "  Example:  FOR \\%i 10 1 -1 { pause 1, echo \\%i }", "" };
4465
4466 static char *whihlp[] = { "\
4467 Syntax: WHILE condition { commandlist }",
4468 "  WHILE loop.  Execute the comma-separated commands in the bracketed",
4469 "  commandlist while the condition is true.  Conditions are the same as for",
4470 "  IF commands.",
4471 "" };
4472
4473 static char *swihlp[] = {
4474 "Syntax: SWITCH <variable> { case-list }",
4475 "  Selects from a group of commands based on the value of a variable.",
4476 "  The case-list is a series of lines like these:",
4477 " ",
4478 "    :x, command, command, ..., break",
4479 " ",
4480 "  where \"x\" is a possible value for the variable.  At the end of the",
4481 "  case-list, you can put a \"default\" label to catch when the variable does",
4482 "  not match any of the labels:",
4483 " ",
4484 "    :default, command, command, ...",
4485 " ",
4486 "The case label \"x\" can be a character, a string, a variable, a function",
4487 "invocation, a pattern, or any combination of these.  See HELP WILDCARDS",
4488 "for information about patterns.",
4489 ""};
4490
4491 static char *openhlp[] = {
4492 "Syntax:  OPEN mode filename",
4493 "  For use with READ and WRITE commands.  Open the local file in the",
4494 "  specified mode: READ, WRITE, or APPEND.  !READ and !WRITE mean to read",
4495 "  from or write to a system command rather than a file.  Examples:",
4496 " ",
4497 "    OPEN READ oofa.txt",
4498 "    OPEN !READ sort foo.bar",
4499 "" };
4500
4501 static char *hxxask[] = {
4502 "Syntax:  ASK [ switches ] variablename [ prompt ]",
4503 "Example: ASK \\%n { What is your name\\? }",
4504 "  Issues the prompt and defines the variable to be whatever is typed in",
4505 "  response, up to the terminating carriage return.  Use braces to preserve",
4506 "  leading and/or trailing spaces in the prompt.",
4507 " ",
4508 "Syntax:  ASKQ [ switches ] variablename [ prompt ]",
4509 "Example: ASKQ \\%p { Password:}",
4510 "  Like ASK except the response does not echo on the screen or, if specified",
4511 "  it echoes as asterisks or other specified character.",
4512 " ",
4513 "Switches:",
4514 " /DEFAULT:text",
4515 "  Text to supply if the user enters a blank response or the /TIMEOUT",
4516 "  limit expired with no response.",
4517 " ",
4518 " /ECHO:char",
4519 "  (ASKQ only) Character to be echoed each time the user presses a key",
4520 "  corresponding to a printable character.  This lets users see what they are",
4521 "  doing when they are typing (e.g.) passwords, and makes editing easier.",
4522 " ",
4523 #ifdef OS2
4524 " /POPUP",
4525 "  The prompt and response dialog takes place in a text-mode popup.",
4526 "  K95 only; in C-Kermit this switch is ignored.",
4527 " ",
4528 #ifdef KUI
4529 " /GUI",
4530 "  The prompt and response dialog takes place in a GUI popup.",
4531 "  K95 GUI version only; in C-Kermit and the K95 console version,", 
4532 "  this switch is ignored.",
4533 " ",
4534 #endif /* KUI */
4535 #endif /* OS2 */
4536 " /TIMEOUT:number",
4537 "  If the response is not entered within the given number of seconds, the",
4538 "  command fails.  This is equivalent to setting ASK-TIMER to a positive",
4539 "  number, except it applies only to this command.  Also see SET ASK-TIMER.",
4540 "  NOTE: If a /DEFAULT: value was also given, it is supplied automatically",
4541 "  upon timeout and the command does NOT fail.",
4542
4543 " ",
4544 " /QUIET",
4545 "  Suppresses \"?Timed out\" message when /TIMEOUT is given and user doesn't",
4546 "  respond within the time limit.",
4547 ""};
4548 static char *hxxgetc[] = {
4549 "Syntax:  GETC variablename [ prompt ]",
4550 "Example: GETC \\%c { Type any character to continue...}",
4551 "  Issues the prompt and sets the variable to the first character you type.",
4552 "  Use braces to preserve leading and/or trailing spaces in the prompt.",
4553 " ",
4554 "Also see SET ASK-TIMER.",
4555 ""};
4556
4557 static char *hmxytimer[] = {
4558 "Syntax: SET ASK-TIMER number",
4559 "  For use with ASK, ASKQ, GETOK, and GETC.  If ASK-TIMER is set to a number",
4560 "  greater than 0, these commands will time out after the given number of",
4561 "  seconds with no response.  This command is \"sticky\", so to revert to",
4562 " \
4563 untimed ASKs after a timed one, use SET ASK-TIMER 0.  Also see IF ASKTIMEOUT.",
4564 ""};
4565
4566 static char *hxxdot[] = {
4567 "Syntax: .<variable-name> <assignment-operator> <value>",
4568 "  Assigns the value to the variable in the manner indicated by the",
4569 "  assignment operator:",
4570 "  =   Copies without evaluation (like DEFINE).",
4571 "  :=  Copies with evaluation (like ASSIGN).",
4572 "  ::= Copies with arithmetic evaluation (like EVALUATE).",
4573 ""};
4574
4575 static char *hxxdef[] = {
4576 "Syntax: DEFINE name [ definition ]",
4577 "  Defines a macro or variable.  Its value is the definition, taken",
4578 "  literally.  No expansion or evaluation of the definition is done.  Thus",
4579 "  if the definition includes any variable or function references, their",
4580 "  names are included, rather than their values (compare with ASSIGN).  If",
4581 "  the definition is omitted, then the named variable or macro is undefined.",
4582 " ",
4583 "A typical macro definition looks like this:",
4584 " ",
4585 "  DEFINE name command, command, command, ...",
4586 " ",
4587 "for example:",
4588 " ",
4589 "  DEFINE vax set parity even, set duplex full, set flow xon/xoff",
4590 " ",
4591 "which defines a Kermit command macro called 'vax'.  The definition is a",
4592 "comma-separated list of Kermit commands.  Use the DO command to execute",
4593 "the macro, or just type its name, followed optionally by arguments.",
4594 " ",
4595 "The definition of a variable can be anything at all, for example:",
4596 " ",
4597 "  DEFINE \\%a Monday",
4598 "  DEFINE \\%b 3",
4599 " ",
4600 "These variables can be used almost anywhere, for example:",
4601 " ",
4602 "  ECHO Today is \\%a",
4603 "  SET BLOCK-CHECK \\%b",
4604 "" };
4605
4606 static char *hxxass[] = {
4607 "Syntax:  ASSIGN variablename string.",
4608 "Example: ASSIGN \\%a My name is \\%b.",
4609 "  Assigns the current value of the string to the variable (or macro).",
4610 "  The definition string is fully evaluated before it is assigned, so that",
4611 "  the values of any variables that are contained are used, rather than their",
4612 "  names.  Compare with DEFINE.  To illustrate the difference, try this:",
4613 " ",
4614 "    DEFINE \\%a hello",
4615 "    DEFINE \\%x \\%a",
4616 "    ASSIGN \\%y \\%a",
4617 "    DEFINE \\%a goodbye",
4618 "    ECHO \\%x \\%y",
4619 " ",
4620 "  This prints 'goodbye hello'.", "" };
4621
4622 static char *hxxdec[] = {
4623 "Syntax: DECREMENT variablename [ number ]",
4624 "  Decrement (subtract one from) the value of a variable if the current value",
4625 "  is numeric.  If the number argument is given, subtract that number",
4626 "  instead.",
4627 " ",
4628 "Examples: DECR \\%a, DECR \\%a 7, DECR \\%a \\%n", "" };
4629
4630 static char *hxxinc[] = {
4631 "Syntax: INCREMENT variablename [ number ]",
4632 "  Increment (add one to) the value of a variable if the current value is",
4633 "  numeric.  If the number argument is given, add that number instead.",
4634 " ",
4635 "Examples: INCR \\%a, INCR \\%a 7, INCR \\%a \\%n", "" };
4636 #endif /* NOSPL */
4637
4638 #ifdef ANYX25
4639 #ifndef IBMX25
4640 static char *hxxpad[] = {
4641 "Syntax: PAD command",
4642 "X.25 PAD commands:",
4643 " ",
4644 "    PAD CLEAR     - Clear the virtual call",
4645 "    PAD STATUS    - Return the status of virtual call",
4646 "    PAD RESET     - Send a reset packet",
4647 "    PAD INTERRUPT - Send an interrupt packet",
4648 ""};
4649 #endif /* IBMX25 */
4650
4651 static char *hxyx25[] = {
4652 "Syntax: SET X.25 option { ON [ data ], OFF }",
4653 " ",
4654 "X.25 call options:",
4655 "  CLOSED-USER-GROUP { ON index, OFF }",
4656 "    Enable or disable closed user group call, where index is the group",
4657 "    index, 0 to 99.",
4658 "  REVERSE-CHARGE { ON, OFF }",
4659 "    Tell whether you want to reverse the charges for the call.",
4660 "  CALL-USER-DATA { ON string, OFF }",
4661 "    Specify call user-data for the X.25 call.",
4662 ""};
4663 #endif /* ANYX25 */
4664
4665 static char *hxyprtr[] = {
4666 #ifdef PRINTSWI
4667 "Syntax: SET PRINTER [ switches ] [ name ]",
4668 " ",
4669 "  Specifies the printer to be used for transparent-print, autoprint, and",
4670 "  screen-dump material during terminal emulation, as well as for the PRINT",
4671 "  command, plus various options governing print behavior.",
4672 " ",
4673 "Switches for specifying the printer by type:",
4674 " ",
4675 "/NONE",
4676 "  Include this switch to specify that all printer actions should simply be",
4677 "  skipped.  Use this, for example, if you have no printer.",
4678 " ",
4679 "/DOS-DEVICE[:name]",
4680 "  Include this to declare a DOS printer and to specify its name, such as",
4681 "  PRN, LPT1, etc.",
4682 " ",
4683 #ifdef NT
4684 "/WINDOWS-QUEUE[:[queue-name]]",
4685 "  Include this to declare a Windows printer and specify its queue name.",
4686 "  Type question mark (?) after the colon (:) to see a list of known queue",
4687 "  names.  If the colon is absent, the switch indicates the currently",
4688 "  selected printer is a Windows Print Queue.  If the colon is provided",
4689 "  and the name is absent, the Windows Print Queue chosen as the Default",
4690 "  Printer is selected.",
4691 " ",
4692 #endif /* NT */
4693 "/FILE[:name]",
4694 "  Specifies that all printer material is to be appended to the named file,",
4695 "  rather than being sent to a printer.  If the file does not exist, it is",
4696 "  created the first time any material is to be printed.",
4697 " ",
4698 "/PIPE[:name]",
4699 "  Specifies that all printer material is to be sent as standard input to",
4700 "  the program or command whose name is given.  Example:",
4701 " ",
4702 "    SET PRINTER /PIPE:{textps > lpt1}",
4703 " ",
4704 "If you give a printer name without specifying any of these switches, then it",
4705 "is assumed to be a DOS printer device or filename unless the name given",
4706 "(after removing enclosing braces, if any) starts with \"|\", \
4707 in which case it",
4708 "is a pipe.  Examples:",
4709 " ",
4710 "  SET PRINTER LPT1               <-- DOS device",
4711 "  SET PRINTER {| textps > lpt1}  <-- Pipe",
4712 " ",
4713 "The next group of switches tells whether the printer is one-way or",
4714 "bidirectional (two-way):",
4715 " ",
4716 "/OUTPUT-ONLY",
4717 "  Include this to declare the printer capable only of receiving material to",
4718 "  be printed, but not sending anything back.  This is the normal kind of",
4719 "  printer, Kermit's default kind, and the opposite of /BIDIRECTIONAL.",
4720 " ",
4721 "/BIDIRECTIONAL",
4722 "  Include this to declare the printer bidirectional.  This is the opposite ",
4723 "  of /OUTPUT-ONLY.  You can also use this option with serial printers, even",
4724 "  if they aren't bidirectional, in case you need to specify speed, flow",
4725 "  control, or parity.",
4726 " ",
4727 "The next group applies only to bidirectional and/or serial printers:",
4728 " ",
4729 "/FLOW-CONTROL:{NONE,XON/XOFF,RTS/CTS,KEEP}",
4730 "  Flow control to use with a serial bidirectional printer, default KEEP;",
4731 #ifdef NT
4732 "  i.e. use whatever the Windows driver for the port normally uses.",
4733 #else
4734 "  i.e. use whatever the OS/2 driver for the port normally uses.",
4735 #endif /* NT */
4736 " ",
4737 "/PARITY:{NONE,EVEN,ODD,SPACE,MARK}",
4738 "  Parity to use with a serial printer, default NONE; i.e. use 8 data bits",
4739 "  and no parity.  If you omit the colon and the keyword, NONE is selected.",
4740 " ",
4741 "/SPEED:number",
4742 "  Interface speed, in bits per second, to use with a serial printer, such as",
4743 "  2400, 9600, 19200, etc.  Type SET PRINTER /SPEED:? for a list of possible",
4744 "  speeds.",
4745 " ",
4746 "The next group deals with print jobs -- how to identify them, how to start",
4747 "them, how to terminate them:",
4748 " ",
4749 "/TIMEOUT[:number]",
4750 "  Used with host-directed transparent or auto printing, this is the number",
4751 "  of seconds to wait after the host closes the printer before terminating",
4752 "  the print job if the printer is not opened again during the specified",
4753 "  amount of time.",
4754 " ",
4755 "/JOB-HEADER-FILE[:filename]",
4756 "  The name of a file to be sent to the printer at the beginning of each",
4757 "  print job, as a burst page, or to configure the printer.  Normally no file",
4758 "  is is sent.",
4759 " ",
4760 "/END-OF-JOB-STRING[:string]",
4761 "  String of characters to be sent to the printer at the end of the print",
4762 "  job, usually used to force the last or only page out of the printer.  When",
4763 "  such a string is needed, it usually consists of a single formfeed: \"set",
4764 "  printer /end-of-job:{\\12}\".  No end-of-job string is sent unless you",
4765 "  specify one with this option.  If the string contains any spaces or",
4766 "  control characters (even in backslash notation, as above), enclose it in",
4767 "  braces.",
4768 " ",
4769 "The next group is for use with printers that print only PostScript:",
4770 " ",
4771 "/POSTSCRIPT or /PS",
4772 "  Indicates that K95 should convert all text to PostScript before sending",
4773 "  it to the printer.  The fixed-pitch Courier-11 font is used.",
4774 " ",
4775 "/WIDTH:number",
4776 "  Specifies the width of the page in characters.  If this switch is not",
4777 "  given, 80 is used.",
4778 " ",
4779 "/HEIGHT:number",
4780 "  Specifies the height of the page in lines.  If this switch is not given",
4781 "  66 is used.",
4782 " ",
4783 "/NOPOSTSCRIPT or /NOPS",
4784 "  Indicates that K95 should not convert all text to PostScript before",
4785 "  sending it to the printer.",
4786 " ",
4787 "The final switch is for use with AutoPrint mode and Screen Dumps",
4788 " ",
4789 "/CHARACTER-SET:<character-set>",
4790 "  Specifies the character set used by the printer which may be different",
4791 "  from both the character set used by the host and by the local computer.",
4792 "  The default value is CP437.",
4793 " ",
4794 "SHOW PRINTER displays your current printer settings.",
4795 #else
4796 #ifdef UNIX
4797 "Syntax: SET PRINTER [ { |command, filename } ]",
4798 "  Specifies the command (such as \"|lpr\") or filename to be used by the",
4799 "  PRINT command.  If a filename is given, each PRINT command appends to the",
4800 "  given file.  If the SET PRINTER argument contains spaces, it must be",
4801 "  enclosed in braces, e.g. \"set printer {| lpr -Plaser}\". If the argument",
4802 "  is omitted the default value is restored.  SHOW PRINTER lists the current",
4803 "  printer.  See HELP PRINT for further info.",
4804 #else
4805 "Sorry, SET PRINTER not available yet.",
4806 #endif /* UNIX */
4807 #endif /* PRINTSWI */
4808 ""};
4809
4810 #ifdef OS2
4811 #ifdef BPRINT
4812 static char *hxybprtr[] = {
4813 "Syntax: SET BPRINTER [ portname speed [ parity [ flow-control ] ] ]",
4814 "  (Obsolete, replaced by SET PRINTER /BIDIRECTIONAL.)",
4815 ""};
4816 #endif /* BPRINT */
4817 #endif /* OS2 */
4818
4819 static char *hxyexit[] = {
4820 "Syntax: SET EXIT HANGUP { ON, OFF }",
4821 "  When ON (which is the default), C-Kermit executes an implicit HANGUP and",
4822 "  CLOSE command on the communications device or connection when it exits.",
4823 "  When OFF, Kermit skips this sequence.",
4824 " ",
4825 "Syntax: SET EXIT ON-DISCONNECT { ON, OFF }",
4826 "  When ON, C-Kermit EXITs automatically when a network connection",
4827 "  is terminated either by the host or by issuing a HANGUP command.",
4828 " ",
4829 "Syntax: SET EXIT STATUS number",
4830 #ifdef NOSPL
4831 "  Set C-Kermit's program return code to the given number.",
4832 #else
4833 "  Set C-Kermit's program return code to the given number, which can be a",
4834 "  constant, variable, function result, or arithmetic expression.",
4835 #endif /* NOSPL */
4836 " ",
4837 "Syntax: SET EXIT WARNING { ON, OFF, ALWAYS }",
4838 "  When EXIT WARNING is ON, issue a warning message and ask for confirmation",
4839 "  before EXITing if a connection to another computer might still be open.",
4840 "  When EXIT WARNING is ALWAYS, confirmation is always requested.  When OFF",
4841 "  it is never requested.  The default is ON.",
4842 "" };
4843
4844 #ifndef NOSPL
4845 static char *hxxpau[] = {
4846 "Syntax:  PAUSE [ { number-of-seconds, hh:mm:ss } ]",
4847 "Example: PAUSE 3  or  PAUSE 14:52:30",
4848 "  Do nothing for the specified number of seconds or until the given time of",
4849 "  day in 24-hour hh:mm:ss notation.  If the time of day is earlier than the",
4850 "  current time, it is assumed to be tomorrow.  If no argument given, one",
4851 "  second is used.  The pause can be interrupted by typing any character on",
4852 "  the keyboard unless SLEEP CANCELLATION is OFF.  If interrupted, PAUSE",
4853 "  fails, otherwise it succeeds.  Synonym: SLEEP.",
4854 "" };
4855
4856 static char *hxxmsl[] = {
4857 "Syntax:  MSLEEP [ number ]",
4858 "Example: MSLEEP 500",
4859 "  Do nothing for the specified number of milliseconds; if no number given,",
4860 "  100 milliseconds.","" };
4861 #endif /* NOSPL */
4862
4863 #ifndef NOPUSH
4864 extern int nopush;
4865 static char *hxxshe[] = {
4866 "Syntax: !, @, RUN, PUSH, or SPAWN, optionally followed by a command.",
4867 "  Gives the command to the local operating system's command processor, and",
4868 "  displays the results on the screen.  If the command is omitted, enters the",
4869 "  system's command line interpreter or shell; exit from it (the command for",
4870 "  this is usually EXIT or QUIT or LOGOUT) to return to Kermit.",
4871 ""
4872 };
4873 #endif /* NOPUSH */
4874
4875 #ifndef NOXMIT
4876 static char *hxxxmit[] = {
4877 "Syntax: TRANSMIT [ switches ] filename",
4878 "  Sends the contents of a file, without any error checking or correction,",
4879 "  to the computer on the other end of your SET LINE or SET HOST connection",
4880 "  (or if C-Kermit is in remote mode, displays it on the screen).  The",
4881 "  filename is the name of a single file (no wildcards) to be sent or, if",
4882 "  the /PIPE switch is included, the name of a command whose output is to be",
4883 "  sent.",
4884 " ",
4885 "  The file is sent according to your current FILE TYPE setting (BINARY or",
4886 "  TEXT), which you can override with a /BINARY or /TEXT switch without",
4887 "  changing the global setting.  In text mode, it is sent a line at a time,",
4888 "  with carriage return at the end of each line (as if you were typing it at",
4889 "  your keyboard), and C-Kermit waits for a linefeed to echo before sending",
4890 "  the next line; use /NOWAIT to eliminate the feedback requirement.  In",
4891 "  binary mode, it is sent a character at a time, with no feedback required.",
4892 " ",
4893 "  Normally the transmitted material is echoed to your screen.  Use SET",
4894 "  TRANSMIT ECHO OFF or the /NOECHO switch to suppress echoing.  Note that",
4895 "  TRANSMIT /NOECHO /NOWAIT /BINARY is a special case, that more or less",
4896 "  blasts the file out at full speed.",
4897 " ",
4898 #ifndef NOCSETS
4899 "  Character sets are translated according to your current FILE and TERMINAL",
4900 "  CHARACTER-SET settings when TRANSMIT is in text mode.  Include /TRANSPARENT"
4901 ,
4902 "  to disable character-set translation in text mode (/TRANSPARENT implies",
4903 "  /TEXT).",
4904 " ",
4905 #endif /* NOCSETS */
4906 "  There can be no guarantee that the other computer will receive the file",
4907 "  correctly and completely.  Before you start the TRANSMIT command, you",
4908 "  must put the other computer in data collection mode, for example by",
4909 "  starting a text editor.  TRANSMIT may be interrupted by Ctrl-C.  Synonym:",
4910 "  XMIT.  See HELP SET TRANSMIT for further information.",
4911 "" };
4912 #endif /* NOXMIT */
4913
4914 #ifndef NOCSETS
4915 static char *hxxxla[] = {
4916 "Syntax: TRANSLATE file1 cs1 cs2 [ file2 ]",
4917 "  Translates file1 from the character set cs1 into the character set cs2",
4918 "  and stores the result in file2.  The character sets can be any of",
4919 "  C-Kermit's file character sets.  If file2 is omitted, the translation",
4920 "  is displayed on the screen.  An appropriate intermediate character-set",
4921 "  is chosen automatically, if necessary.  Synonym: XLATE.  Example:",
4922 " ",
4923 "    TRANSLATE lasagna.lat latin1 italian lasagna.nrc",
4924 " ",
4925 "  Multiple files can be translated if file2 is a directory or device name,",
4926 "  rather than a filename, or if file2 is omitted.",
4927 "" };
4928 #endif /* NOCSETS */
4929
4930 #ifndef NOSPL
4931 static char *hxxwai[] = {
4932 "Syntax: WAIT { number-of-seconds, hh:mm:ss } [ <what> ]",
4933 " ",
4934 "Examples:",
4935 "  wait 5 cd cts",
4936 "  wait 23:59:59 cd",
4937 " ",
4938 "  Waits up to the given number of seconds or the given time of day for the",
4939 "  specified item or event, which can be FILE, the name(s) of one or more",
4940 "  modem signals, or nothing.  If nothing is specified, WAIT acts like SLEEP.",
4941 "  If one or more modem signal names are given, Kermit waits for the specified"
4942 ,
4943 "  modem signals to appear on the serial communication device.",
4944 "  Sets FAILURE if the signals do not appear in the given time or interrupted",
4945 "  from the keyboard during the waiting period.",
4946 " ",
4947 "Signals:",
4948 "  cd  = Carrier Detect;",
4949 "  dsr = Dataset Ready;",
4950 "  cts = Clear To Send;",
4951 "  ri  = Ring Indicate.",
4952 " ",
4953 "If you want Kermit to wait for a file event, then the syntax is:",
4954 " ",
4955 "  WAIT <time> FILE { CREATION, DELETION, MODIFICATION } <filename>",
4956 " ",
4957 "where <time> is as above, and <filename> is the name of a single file.",
4958 "Kermit waits up to the given amount of time for the specified event to occur",
4959 "with the specified file, succeeds if it does, fails if it doesn't.",
4960 "" };
4961 #endif /* NOSPL */
4962
4963 static char *hxxwri[] = {
4964 "Syntax: WRITE name text",
4965 "  Writes the given text to the named log or file.  The text text may include",
4966 "  backslash codes, and is not terminated by a newline unless you include the",
4967 "  appropriate code.  The name parameter can be any of the following:",
4968 " ",
4969 "   DEBUG-LOG",
4970 "   ERROR (standard error)",
4971 #ifndef NOSPL
4972 "   FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)",
4973 #endif /* NOSPL */
4974 "   PACKET-LOG",
4975 "   SCREEN (compare with ECHO)",
4976 #ifndef NOLOCAL
4977 "   SESSION-LOG",
4978 #endif /* NOLOCAL */
4979 "   TRANSACTION-LOG", "" };
4980
4981 #ifndef NODIAL
4982 static char *hxxlook[] = { "Syntax: LOOKUP name",
4983 "  Looks up the given name in the dialing directory or directories, if any,",
4984 "  specified in the most recent SET DIAL DIRECTORY command.  Each matching",
4985 "  entry is shown, along with any transformations that would be applied to",
4986 "  portable-format entries based on your locale.  HELP DIAL, HELP SET DIAL",
4987 "  for further info.",
4988 ""
4989 };
4990
4991 static char *hxxansw[] = { "Syntax:  ANSWER [ <seconds> ]",
4992 #ifdef OS2
4993 "  Waits for a modem call to come in.  Prior SET MODEM TYPE and SET PORT",
4994 #else
4995 "  Waits for a modem call to come in.  Prior SET MODEM TYPE and SET LINE",
4996 #endif /* OS2 */
4997 "  required.  If <seconds> is 0 or not specified, Kermit waits forever or",
4998 "  until interrupted, otherwise Kermit waits the given number of seconds.",
4999 "  The ANSWER command puts the modem in autoanswer mode.  Subsequent DIAL",
5000 "  commands will automatically put it (back) in originate mode.  SHOW MODEM,",
5001 "  HELP SET MODEM for more info.",
5002 ""
5003 };
5004
5005 static char *hxxdial[] = { "Syntax:  DIAL phonenumber",
5006 "Example: DIAL 7654321",
5007 "  \
5008 Dials a number using an autodial modem.  First you must SET MODEM TYPE, then",
5009 #ifdef OS2
5010 "  SET PORT (or in Windows only, SET PORT TAPI instead of SET MODEM TYPE and",
5011 "  SET LINE), then SET SPEED. Then give the DIAL command, including the phone",
5012 #else
5013 "  SET LINE, then SET SPEED.  Then give the DIAL command, including the phone",
5014 #endif /* OS2 */
5015 "  number, for example:",
5016 " ",
5017 "   DIAL 7654321",
5018 #ifdef NETCONN
5019 " ",
5020 "  If the modem is on a network modem server, SET HOST first, then SET MODEM",
5021 "  TYPE, then DIAL.",
5022 #endif /* NETCONN */
5023 " ",
5024 "If you give the DIAL command interactively at the Kermit prompt, and the",
5025 "call is placed successfully, Kermit automatically enters CONNECT mode.",
5026 "If the DIAL command is given from a macro or command file, Kermit remains",
5027 "in command mode after the call is placed, successfully or not.  You can",
5028 "change this behavior with the SET DIAL CONNECT command.",
5029 " ",
5030 "If the phonenumber starts with a letter, and if you have used the SET DIAL",
5031 "DIRECTORY command to specify one or more dialing-directory files, Kermit",
5032 "looks it up in the given file(s); if it is found, the name is replaced by",
5033 "the number or numbers associated with the name.  If it is not found, the",
5034 "name is sent to the modem literally.",
5035 " ",
5036 "If the phonenumber starts with an equals sign (\"=\"), this forces the part",
5037 "after the = to be sent literally to the modem, even if it starts with a",
5038 "letter, without any directory lookup.",
5039 " ",
5040 "You can also give a list of phone numbers enclosed in braces, e.g:",
5041 " ",
5042 "  dial {{7654321}{8765432}{+1 (212 555-1212}}",
5043 " ",
5044 "(Each number is enclosed in braces and the entire list is also enclosed in",
5045 "braces.)  In this case, each number is tried until there is an answer.  The",
5046 "phone numbers in this kind of list can not be names of dialing directory",
5047 "entries.",
5048 " ",
5049 "A dialing directory is a plain text file, one entry per line:",
5050 " ",
5051 "  name  phonenumber  ;  comments",
5052 " ",
5053 "for example:",
5054 " ",
5055 "  work    9876543              ; This is a comment",
5056 "  e-mail  +1  (212) 555 4321   ; My electronic mailbox",
5057 "  germany +49 (511) 555 1234   ; Our branch in Hanover",
5058 " ",
5059 "If a phone number starts with +, then it must include country code and",
5060 "area code, and C-Kermit will try to handle these appropriately based on",
5061 "the current locale (HELP SET DIAL for further info); these are called",
5062 "PORTABLE entries.  If it does not start with +, it is dialed literally.",
5063 " ",
5064 "If more than one entry is found with the same name, Kermit dials all of",
5065 "them until the call is completed; if the entries are in portable format,",
5066 "Kermit dials them in cheap-to-expensive order: internal, then local, then",
5067 "long-distance, then international, based on its knowledge of your local",
5068 "country code and area code (see HELP SET DIAL).",
5069 " ",
5070 "Specify your dialing directory file(s) with the SET DIAL DIRECTORY command.",
5071 " ",
5072 #ifdef NETCONN
5073 "See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED, REDIAL, and",
5074 "PDIAL.",
5075 #else
5076 "See also SET DIAL, SET MODEM, SET LINE, SET SPEED, PDIAL, and REDIAL.",
5077 #endif /* NETCONN */
5078 "" };
5079
5080 #ifdef CK_TAPI
5081 static char *hxxtapi[] = {
5082 "TAPI CONFIGURE-LINE <tapi-line>",
5083 "  Displays the TAPI Configure Line Dialog box and allows you to",
5084 "  alter the default configuration for the specified <tapi-line>.",
5085 " ",
5086 "TAPI DIALING-PROPERTIES",
5087 "  Displays the TAPI Dialing Properties (locations) Dialog box.  The",
5088 "  Dialing rules may be changed and locations created and deleted.",
5089 "  When the dialog box is closed, K-95 imports the current Dialing",
5090 "  Properties' Location into the Kermit DIAL command settings.",
5091 ""};
5092
5093 static char *hxytapi[] = {
5094 "SET TAPI LINE <tapi-line>",
5095 "  Opens a TAPI device for use by Kermit.",
5096 " ",
5097 "SET TAPI MODEM-DIALING {ON, [OFF]}",
5098 "  If TAPI MODEM-DIALING is OFF when SET TAPI LINE is issued, Kermit opens",
5099 "  the TAPI device directly as a \"raw port\".  The device is unavailable to",
5100 "  other applications and Kermit performs dialing functions using its",
5101 "  built-in dialing and modem databases.  If TAPI MODEM-DIALING is ON, TAPI",
5102 "  handles all dialing functions and the port may be shared with other",
5103 "  applications when a call is not active.  When TAPI MODEM-DIALING is OFF,",
5104 "  SET MODEM TYPE TAPI Kermit uses the TAPI modem commands imported from the",
5105 "  Windows Registry during the previous SET TAPI LINE call.",
5106 " ",
5107 "SET TAPI LOCATION <tapi-location>",
5108 "  Specifies the TAPI location to make current for the entire system.  The",
5109 "  <tapi-location>'s dialing properties are imported into Kermit's SET DIAL",
5110 "  command database.",
5111 " ",
5112 "SET TAPI PHONE-NUMBER-CONVERSIONS {ON, OFF, [AUTO]}",
5113 "  Controls whether the phone number conversions are performed by TAPI (ON)",
5114 "  or by Kermit (OFF), or according the type of port that was selected",
5115 "  (AUTO); AUTO is the default, and is equivalent to ON if the current",
5116 "  LINE/PORT is a TAPI device and TAPI MODEM-DIALING is ON, OFF otherwise.",
5117 " ",
5118 "SET TAPI MODEM-LIGHTS {[ON], OFF}",
5119 "  Displays a modem lights indicator on the Windows 95 Taskbar.  Does nothing",
5120 "  in Windows NT 4.0.",
5121 " ",
5122 "SET TAPI MANUAL-DIALING {ON, [OFF]}",
5123 "  Displays a dialog box during dialing requesting that you manually dial the",
5124 "  phone before continuing.  Applies only when TAPI MODEM-DIALING is ON.",
5125 " ",
5126 "SET TAPI WAIT-FOR-CREDIT-CARD-TONE <seconds>",
5127 "  Some modems don't support the '$' (BONG) symbol during dialing, which",
5128 "  means \"wait for credit card tone before continuing.\"  If TAPI recognizes",
5129 "  the modem as one that does not support BONG, it replaces the '$' with",
5130 "  <seconds> worth of pauses.  The default is 8 seconds.  This command",
5131 "  applies only when TAPI MODEM-DIALING is ON",
5132 " ",
5133 "SET TAPI PRE-DIAL-TERMINAL {ON, [OFF]}",
5134 "SET TAPI POST-DIAL-TERMINAL {ON, [OFF]}",
5135 "  Displays a small terminal window that may be used to communicate with the",
5136 "  modem or the host prior to or immediately after dialing; applies only when",
5137 "  TAPI MODEM-DIALING is ON",
5138 " ",
5139 "SET TAPI INACTIVITY-TIMEOUT <minutes>",
5140 "  Specifies the number of minutes of inactivity that may go by before TAPI",
5141 "  disconnects the line.  The default is 0 which means disable this function.",
5142 "  Applies only when TAPI MODEM-DIALING is ON.",
5143 " ",
5144 "SET TAPI USE-WINDOWS-CONFIGURATION {ON, [OFF]}",
5145 "  Specifies whether the TAPI modem values for speed, parity, stop bits, flow",
5146 "  control, etc. are used in preference to the current values specified",
5147 "  within Kermit-95.",
5148 " ",
5149 ""};
5150 #endif /* CK_TAPI */
5151
5152 #endif /* NODIAL */
5153
5154 #ifdef TNCODE
5155 static char *hmxxiks[] = {
5156 "Syntax: IKS [ switches ] [ host [ service ] ]",
5157 "  Establishes a new connection to an Internet Kermit Service daemon.",
5158 "  Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host KERMIT /TELNET,",
5159 "  IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)",
5160 "  is resumed.  Depending on how Kermit has been built switches may be",
5161 "  available to require a secure authentication method and bidirectional",
5162 "  encryption.  See HELP SET TELNET for more info.",
5163 " ",
5164 #ifdef CK_AUTHENTICATION
5165 " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
5166 "   SET TELOPT AUTH REQUIRED with the following exceptions.  If the type",
5167 "   is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
5168 "   is NONE, then SET TELOPT AUTH REFUSED is executed.",
5169 " ",
5170 #endif /* CK_AUTHENTICATION */
5171 #ifdef CK_ENCRYPTION
5172 " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
5173 "   and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
5174 "   If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
5175 "   and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
5176 "   executed.",
5177 " ",
5178 #endif /* CK_ENCRYPTION */
5179 " /USERID:[<name>]",
5180 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
5181 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
5182 "   Telnet negotiations; if this switch is given but the string is omitted,",
5183 "   no user ID is sent to the host.  If this switch is not given, your",
5184 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
5185 "   host it is a request to login as the specified user.",
5186 " ",
5187 #ifdef CK_AUTHENTICATION
5188 " /PASSWORD:[<string>]",
5189 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
5190 "   it is treated as the password to be used (if required) by any Telnet",
5191 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
5192 "   Password, or X.509 certificate private key decryption.)  If no password",
5193 "   switch is specified a prompt is issued to request the password if one",
5194 "   is required for the negotiated authentication method.",
5195 #endif /* CK_AUTHENTICATION */
5196 ""};
5197
5198 static char *hmxxtel[] = {
5199 "Syntax: TELNET [ switches ] [ host [ service ] ]",
5200 "  Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /TELNET,",
5201 "  IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)",
5202 "  is resumed.  Depending on how Kermit has been built switches may be",
5203 "  available to require a secure authentication method and bidirectional",
5204 "  encryption.  See HELP SET TELNET for more info.",
5205 " ",
5206 #ifdef CK_AUTHENTICATION
5207 " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
5208 "   SET TELOPT AUTH REQUIRED with the following exceptions.  If the type",
5209 "   is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
5210 "   is NONE, then SET TELOPT AUTH REFUSED is executed.",
5211 " ",
5212 #endif /* CK_AUTHENTICATION */
5213 #ifdef CK_ENCRYPTION
5214 " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
5215 "   and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
5216 "   If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
5217 "   and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
5218 "   executed.",
5219 " ",
5220 #endif /* CK_ENCRYPTION */
5221 " /USERID:[<name>]",
5222 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
5223 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
5224 "   Telnet negotiations; if this switch is given but the string is omitted,",
5225 "   no user ID is sent to the host.  If this switch is not given, your",
5226 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
5227 "   host it is a request to login as the specified user.",
5228 " ",
5229 #ifdef CK_AUTHENTICATION
5230 " /PASSWORD:[<string>]",
5231 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
5232 "   it is treated as the password to be used (if required) by any Telnet",
5233 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
5234 "   Password, or X.509 certificate private key decryption.)  If no password",
5235 "   switch is specified a prompt is issued to request the password if one",
5236 "   is required for the negotiated authentication method.",
5237 #endif /* CK_AUTHENTICATION */
5238 ""};
5239
5240 static char *hxtopt[] = {
5241 "TELOPT { AO, AYT, BREAK, CANCEL, EC, EL, EOF, EOR, GA, IP, DMARK, NOP, SE,",
5242 "         SUSP, SB [ option ], DO [ option ], DONT [ option ],",
5243 "         WILL [ option ], WONT [option] }",
5244 "  This command lets you send all the Telnet protocol commands.  Note that",
5245 "  certain commands do not require a response, and therefore can be used as",
5246 "  nondestructive \"probes\" to see if the Telnet session is still open;",
5247 "  e.g.:",
5248 " ",
5249 "    set host xyzcorp.com",
5250 "    ...",
5251 "    telopt nop",
5252 "    telopt nop",
5253 "    if fail stop 1 Connection lost",
5254 " ",
5255 "  TELOPT NOP is sent twice because the failure of the connection will not",
5256 "  be detected until the second send is attempted.  This command is meant",
5257 "  primarily as a debugging tool for the expert user.",
5258 ""};
5259 #endif /* TNCODE */
5260
5261 #endif /* NOHELP */
5262
5263 /*  D O H L P  --  Give a help message  */
5264
5265 _PROTOTYP( int dohset, (int) );
5266 #ifndef NOCMDL
5267 _PROTOTYP( int dohopts, (void) );
5268 #endif /* NOCMDL */
5269 #ifndef NOSPL
5270 _PROTOTYP( int dohfunc, (int) );
5271 extern struct keytab fnctab[];
5272 extern int nfuncs;
5273 #endif /* NOSPL */
5274 #ifdef OS2
5275 #ifndef NOKVERBS
5276 _PROTOTYP( int dohkverb, (int) );
5277 extern struct keytab kverbs[];
5278 extern int nkverbs;
5279 #endif /* NOKVERBS */
5280 #endif /* OS2 */
5281
5282 #ifndef NOSPL
5283 static char * hxxdcl[] = {
5284 "Syntax: ARRAY verb operands...",
5285 " ",
5286 "Declares arrays and performs various operations on them.  Arrays have",
5287 "the following syntax:",
5288 " ",
5289 "  \\&a[n]",
5290 " ",
5291 "where \"a\" is a letter and n is a number or a variable with a numeric value",
5292 "or an arithmetic expression.  The value of an array element can be anything",
5293 "at all -- a number, a character, a string, a filename, etc.",
5294 " ",
5295 "The following ARRAY verbs are available:",
5296 " ",
5297 "[ ARRAY ] DECLARE arrayname[n] [ = initializers... ]",
5298 "  Declares an array of the given size, n.  The resulting array has n+1",
5299 "  elements, 0 through n.  Array elements can be used just like any other",
5300 "  variables.  Initial values can be given for elements 1, 2, ... by",
5301 "  including = followed by one or more values separated by spaces.  If you",
5302 "  omit the size, the array is sized according to the number of initializers;",
5303 "  if none are given the array is destroyed and undeclared if it already",
5304 "  existed.  The ARRAY keyword is optional.  Synonym: [ ARRAY ] DCL.",
5305 " ",
5306 "[ ARRAY ] UNDECLARE arrayname",
5307 "  Destroys and undeclares the given array.  Synonym: ARRAY DESTROY.",
5308 " ",
5309 "ARRAY SHOW [ arrayname ]",
5310 "  Displays the contents of the given array.  A range specifier can be",
5311 "  included to display a segment of the array, e.g. \"array show \\&a[1:24].\""
5312 ,
5313 "  If the arrayname is omitted, all declared arrays are listed, but their",
5314 "  contents is not shown.  Synonym: SHOW ARRAY.",
5315 " ",
5316 "ARRAY CLEAR arrayname",
5317 "  Clears all elements of the array, i.e. sets them to empty values.",
5318 "  You may include a range specifier to clear a segment of the array rather",
5319 "  than the whole array, e.g. \"array clear \\%a[22:38]\"",
5320 " ",
5321 "ARRAY SET arrayname value",
5322 "  Sets all elements of the array to the given value.  You may specify a",
5323 "  range to set a segment of the array, e.g. \"array set \\%a[2:9] 0\"",
5324 " ",
5325 "ARRAY RESIZE arrayname number",
5326 "  Changes the size of the given array, which must already exist, to the",
5327 "  number given.  If the number is smaller than the current size, the extra",
5328 "  elements are discarded; if it is larger, new empty elements are added.",
5329 " ",
5330 "ARRAY COPY array1 array2",
5331 "  Copies array1 to array2.  If array2 has not been declared, it is created",
5332 "  automatically.  Range specifiers may be given on one or both arrays.",
5333 " ",
5334 "ARRAY LINK array1 arra2",
5335 "  Makes array1 a link to array2.",
5336 " ",
5337 "[ ARRAY ] SORT [ switches ] array-name [ array2 ]",
5338 "  Sorts the given array lexically according to the switches.  Element 0 of",
5339 "  the array is excluded from sorting by default.  The ARRAY keyword is",
5340 "  optional.  If a second array name is given, that array is sorted according",
5341 "  to the first one.  Switches:",
5342 " ",
5343 "  /CASE:{ON,OFF}",
5344 "    If ON, alphabetic case matters; if OFF it is ignored.  If this switch is",
5345 "    omitted, the current SET CASE setting applies.",
5346 " ",
5347 "  /KEY:number",
5348 "    \
5349 Position (1-based column number) at which comparisons begin, 1 by default.",
5350 " ",
5351 "  /NUMERIC",
5352 "    Specifies a numeric rather than lexical sort.",
5353 " ",
5354 "  /RANGE:low[:high]",
5355 "    The range of elements, low through high, to be sorted.  If this switch",
5356 "    is not given, elements 1 through the dimensioned size are sorted.  If",
5357 "    :high is omitted, the dimensioned size is used.  To include element 0 in",
5358 "    a sort, use /RANGE:0 (to sort the whole array) or /RANGE:0:n (to sort",
5359 "    elements 0 through n).  You can use a range specifier in the array name",
5360 "    instead of the /RANGE switch.",
5361 " ",
5362 "  /REVERSE",
5363 "    Sort in reverse order.  If this switch is not given, the array is sorted",
5364 "    in ascending order.",
5365 " ",
5366 "Various functions are available for array operations; see HELP FUNCTION for",
5367 "details.  These include \\fdimension(), \\farraylook(), \\ffiles(), \
5368 \\fsplit(),",
5369 "and many more.",
5370 ""};
5371 #endif /* NOSPL */
5372
5373 #ifdef ZCOPY
5374 static char * hmxxcpy[] = {
5375 "Syntax: COPY [ switches ] file1 file2",
5376 "  Copies the source file (file1) to the destination file (file2).  If file2",
5377 "  is a directory, file1 can contain wildcards to denote a group of files to",
5378 "  be copied to the given directory.  Switches:",
5379 " ",
5380 "  /LIST",
5381 "    Print the filenames and status while copying.  Synonyms: /LOG, /VERBOSE.",
5382 " ",
5383 "  /NOLIST",
5384 "    Copy silently (default). Synonyms: /NOLOG, /QUIET.",
5385 " ",
5386 "  /PRESERVE",
5387 "    Copy timestamp and permissions from source file to destination file.",
5388 " ",
5389 "  /OVERWRITE:{ALWAYS,NEVER,NEWER,OLDER}",
5390 "    When copying from one directory to another, this tells what to do when",
5391 "    the destination file already exists: overwrite it always; never; only if",
5392 "    the source file is newer; or only if the source file is older.",
5393 " ",
5394 "  /APPEND",
5395 "    Append the source file to the destination file.  In this case the source",
5396 "    file specification can contain wildcards, and all the matching source",
5397 "    files are appended, one after the other in alphabetical order by name,",
5398 "    to the destination file.",
5399 " ",
5400 "  /SWAP-BYTES",
5401 "    Swap bytes while copying (e.g. for converting between Big-Endian and",
5402 "    Little-Endian binary data formats).",
5403 #ifndef NOSPL
5404 " ",
5405 "  /FROMB64",
5406 "    Convert from Base64 encoding while copying.",
5407 " ",
5408 "  /TOB64",
5409 "    Convert to Base64 encoding while copying.",
5410 #endif /* NOSPL */
5411 ""
5412 };
5413 #endif /* ZCOPY */
5414
5415 #ifndef NOFRILLS
5416 static char * hmxxren[] = {
5417 #ifdef LOCUS
5418 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
5419 "  this command is equivalent to REMOTE RENAME (RREN).  Otherwise:",
5420 " ",
5421 #endif /* LOCUS */
5422 "Syntax: RENAME [ switches ] name1 [ name2 ]",
5423 "  Renames the source file (name1) to the target name2.  If name2 is a",
5424 "  directory, name1 is allowed to contain wildcards, and the file(s) matching",
5425 "  name1 are moved to directory name2, subject to rules of the underlying",
5426 "  operating system regarding renaming across disk boundaries, etc. Switches:",
5427 " ",
5428 "  /LIST",
5429 "    Print the filenames and status while renaming.  Synonyms: /LOG, /VERBOSE",
5430 " ",
5431 "  /NOLIST",
5432 "    Rename silently (default). Synonyms: /NOLOG, /QUIET",
5433 " ",
5434 "  /COLLISION:{FAIL,SKIP,OVERWRITE}",
5435 "    Tells what to do if a file with the given (or derived) new name already",
5436 "    exists: fail (and stop without renaming any files); skip this file",
5437 "    without renaming it and go on to the next one, if any; or overwrite (the",
5438 "    existing file).  PROCEED is a synonym for SKIP.",
5439 " ",
5440 "  /SIMULATE",
5441 "    Show what the effects of the RENAME command would be without actually",
5442 "    renaming any files.",
5443 " ",
5444 "  When any of the following switches is given, name2 must either be the",
5445 "  the name of a directory, or else omitted, and name1 is allowed to contain",
5446 "  contain wildcards, allowing multiple files to be renamed at once. If name2",
5447 "  is given, then all files matching name1 are moved to the name2 directory",
5448 "  after being renamed.",
5449 " ",
5450 "  /LOWER:{ALL,UPPER}",
5451 "    Converts letters in the filename to lowercase.  ALL means to convert",
5452 "    all matching filenames, UPPER means to convert only those filenames",
5453 "    that contain no lowercase letters.  The switch argument can be omitted,",
5454 "    in which case ALL filenames are converted.",
5455 " ",
5456 "  /UPPER:{ALL,LOWER}",
5457 "    Converts letters in the filename to uppercase.  ALL means to convert",
5458 "    all matching filenames, LOWER means to convert only those filenames",
5459 "    that contain no uppercase letters.  As with /LOWER, ALL is the default",
5460 "    switch argument.",
5461 " ",
5462 "  /FIXSPACES:s",
5463 "    Replaces all spaces in each matching filename by the string s, which may",
5464 "    be empty, a single character, or a string of characters.  The default",
5465 "    replacement (if no argument is given) is underscore (_).",
5466 " ",
5467 "  /REPLACE:{{string1}{string2}{options}}",
5468 "    Replaces all or selected occurrences of string1 with string2 in the",
5469 "    matching filenames.  The braces are part of the command.  The options",
5470 "    string can contain the following characters:",
5471 "     A: String matching is case-sensitive.",
5472 "     a: String matching is case-insensitive.",
5473 "     ^: String matching is anchored to the beginning of the filename.",
5474 "     $: String matching is anchored to the end of the filename.",
5475 "     1: Only the first occurrence of the string (if any) will be changed.",
5476 "     2: Only the second occurrence, and so on for all digits up to 9.",
5477 "     -: (before a digit) Occurrences are counted from the right.",
5478 "     ~: (before occurrence) All occurences BUT the one given are changed.",
5479 " ",
5480 "  /CONVERT:cset1:cset1",
5481 "    Converts each matching filename from character-set 1 to character-set 2.",
5482 "    Character sets are the same as for SET FILE CHARACTER-SET.",
5483 " ",
5484 "  Global values for /LIST and COLLISION can be set with SET RENAME and",
5485 "  displayed with SHOW RENAME.",
5486 ""
5487 };
5488 #endif /* NOFRILLS */
5489
5490 static char *
5491 cmdlhlp[] = {
5492 "Command-line options are given after the program name in the system",
5493 "command that you use to start Kermit.  Example:",
5494 " ",
5495 " kermit -i -s oofa.exe",
5496 " ",
5497 "tells Kermit to send (-s) the file oofa.exe in binary (-i) mode.",
5498 " ",
5499 "Command-line options are case-sensitive; \"-s\" is different from \"-S\".",
5500 #ifdef VMS
5501 "In VMS, uppercase options must be enclosed in doublequotes: ",
5502 " ",
5503 " $ kermit \"-Y\" \"-S\" -s oofa.txt ",
5504 #endif /* VMS */
5505 " ",
5506 "If any \"action options\" are included on the command line, Kermit exits",
5507 "after executing its command-line options.  If -S is included, or no action",
5508 "options were given, Kermit enters its interactive command parser and",
5509 "issues its prompt.",
5510 " ",
5511 "Command-line options are single characters preceded by dash (-).  Some",
5512 "require an \"argument,\" others do not.  If an argument contains spaces, it",
5513 "must be enclosed in doublequotes:",
5514 " ",
5515 " kermit -s \"filename with spaces\"",
5516 " ",
5517 "\
5518 An option that does not require an argument can be bundled with other options:"
5519 ,
5520 " ",
5521 " kermit -Qis oofa.exe",
5522 " ",
5523 "Exceptions to the rules:",
5524 " ",
5525 " . If the first command-line option is a filename, Kermit executes commands",
5526 "   from the file.  Additional command-line options can follow the filename.",
5527 " ",
5528 " . The special option \"=\" (equal sign) or \"--\" (double hyphen) means to",
5529 "   treat the rest of the command line as data, rather than commands; this",
5530 "   data is placed in the argument vector array, \\&@[], along with the other",
5531 "   items on the command line, and also in the top-level \\%1..\\%9 variables."
5532 ,
5533 " ",
5534 #ifdef KERBANG
5535 " . A similar option \"+\" (plus sign) means: the name of a Kermit script",
5536 "   file follows.  This file is to be executed, and its name assigned to \\%0",
5537 "   and \\&_[0].  All subsequent command-line arguments are to be ignored by",
5538 "   Kermit but made available to the script as \\%1, \\%2, ..., as well as",
5539 "   in the argument-vector arrays.  The initialization file is not executed",
5540 "   automatically in this case.",
5541 " ",
5542 #endif /* KERBANG */
5543 " . The -s option can accept multiple filenames, separated by spaces.",
5544 " ",
5545 " . the -j and -J options allow an optional second argument, the TCP port",
5546 "   name or number.",
5547 " ",
5548 "Type \"help options all\" to list all the command-line options.",
5549 "Type \"help option x\" to see the help message for option x.",
5550 " ",
5551 "Kermit also offers a selection of \"extended command-line\" options.",
5552 "These begin with two dashes, followed by a keyword, and then, if the option",
5553 "has arguments, a colon (:) or equal sign (=) followed by the argument.",
5554 "Unlike single-letter options, extended option keywords aren't case sensitive",
5555 "and they can be abbreviated to any length that still distinguishes them from",
5556 "other extended-option keywords.  Example:",
5557 " ",
5558 "  kermit --banner:oofa.txt",
5559 " ",
5560 "which designates the file oofa.txt to be printed upon startup, rather than",
5561 "the built-in banner (greeting) text.  To obtain a list of available",
5562 "extended options, type \"help extended-options ?\".  To get help about all",
5563 "extended options, type \"help extended-options\".  To get help about a",
5564 "particular extended option, type \"help extended-option xxx\", where \"xxx\"",
5565 "is the option keyword.",
5566 #ifdef COMMENT
5567 #ifndef NOIKSD
5568 " ",
5569 "At present, most of the extended options apply only to the Internet Kermit",
5570 "Service Daemon (IKSD).  Type \"help iksd\" for details.",
5571 #endif /* NOIKSD */
5572 #endif /* COMMENT */
5573 ""
5574 };
5575
5576
5577 #ifndef NOHELP
5578 #ifndef NOCMDL
5579 int
5580 doxopts() {
5581     extern char * xopthlp[], * xarghlp[];
5582     extern struct keytab xargtab[];
5583     extern int nxargs;
5584     int i, x, y, n = 0;
5585 #ifdef CK_TTGWSIZ
5586 #ifdef OS2
5587     ttgcwsz();
5588 #else /* OS2 */
5589     /* Check whether window size changed */
5590     if (ttgwsiz() > 0) {
5591         if (tt_rows > 0 && tt_cols > 0) {
5592             cmd_rows = tt_rows;
5593             cmd_cols = tt_cols;
5594         }
5595     }
5596 #endif /* OS2 */
5597 #endif /* CK_TTGWSIZ */
5598     y = cmkey(xargtab,
5599               nxargs,
5600               "Extended argument without the \"--\" prefix",
5601               "",
5602               xxstring
5603               );
5604     if (y == -3) {
5605         printf("\n");
5606         if ((x = cmcfm()) < 0)
5607           return(x);
5608         for (i = 0; i <= XA_MAX; i++) {
5609             if (xopthlp[i]) {
5610                 printf("%s\n",xopthlp[i]);
5611                 printf("   %s\n",xarghlp[i]);
5612                 printf("\n");
5613                 n += 3;
5614                 if (n > (cmd_rows - 6)) {
5615                     if (!askmore())
5616                       return(0);
5617                     else
5618                       n = 0;
5619                 }
5620             }
5621         }
5622         return(1);
5623     } else if (y < 0)
5624       return(y);
5625     if ((x = cmcfm()) < 0)
5626       return(x);
5627     printf("\n%s\n",xopthlp[y]);
5628     printf("   %s\n\n",xarghlp[y]);
5629     return(1);
5630 }
5631
5632 int
5633 dohopts() {
5634     int i, n, x, y, z, all = 0, msg = 0;
5635     char *s;
5636     extern char *opthlp[], *arghlp[];
5637     extern char * xopthlp[], * xarghlp[];
5638     extern int optact[];
5639     if ((x = cmtxt("A command-line option character,\n\
5640 or the word ALL, or carriage return for an overview",
5641                    "", &s, xxstring)) < 0)
5642       return(x);
5643     if (!*s)
5644       msg = 1;
5645     else if (!strcmp(s,"all") || (!strcmp(s,"ALL")))
5646       all = 1;
5647     else if (*s == '-')                 /* Be tolerant of leading hyphen */
5648       s++;
5649     if (!all && (int)strlen(s) > 1) {
5650         printf("?A single character, please, or carriage to list them all.\n");
5651         return(-9);
5652     }
5653     if (all) {
5654         y = 33;
5655         z = 127;
5656     } else {
5657         y = *s;
5658         z = (y == 0) ? 127 : y;
5659         if (y == 0) y = 33;
5660     }
5661 #ifdef CK_TTGWSIZ
5662 #ifdef OS2
5663     ttgcwsz();
5664 #else /* OS2 */
5665     /* Check whether window size changed */
5666     if (ttgwsiz() > 0) {
5667         if (tt_rows > 0 && tt_cols > 0) {
5668             cmd_rows = tt_rows;
5669             cmd_cols = tt_cols;
5670         }
5671     }
5672 #endif /* OS2 */
5673 #endif /* CK_TTGWSIZ */
5674     printf("\n");
5675     for (i = 0, n = 1; msg != 0 && *cmdlhlp[i]; i++) {
5676         printf("%s\n",cmdlhlp[i]);
5677         if (++n > (cmd_rows - 3)) {
5678            if (!askmore())
5679              return(0);
5680            else
5681              n = 0;
5682         }
5683     }
5684     if (all) {
5685         printf("The following command-line options are available:\n\n");
5686         n += 2;
5687     }
5688     for (i = y; msg == 0 && i <= z; i++) {
5689         if (!opthlp[i])
5690           continue;
5691         if (arghlp[i]) {                /* Option with arg */
5692             printf(" -%c <arg>%s\n",(char)i,(optact[i]?" (action option)":""));
5693
5694             printf("     %s\n",opthlp[i]);
5695             printf("     Argument: %s\n\n",arghlp[i]);
5696             x = 4;
5697         } else {                        /* Option without arg */
5698             printf(" -%c  %s%s\n",
5699                    (char)i, opthlp[i],
5700                    (optact[i]?" (action option)":"")
5701                   );
5702             printf("     Argument: (none)\n\n");
5703             x = 3;
5704         }
5705         n += x;
5706         if (n > (cmd_rows - x - 1)) {
5707             if (!askmore())
5708               return(0);
5709            else
5710               n = 0;
5711         }
5712     }
5713     if (all) {                          /* Jeff, Jan 2003 */
5714         printf("\n");
5715         if (++n >= cmd_rows) {
5716             if (!askmore())
5717               return(0);
5718             else
5719               n = 0;
5720         }
5721         printf("The following extended options are available:\n");
5722         if (++n >= cmd_rows) {
5723             if (!askmore())
5724               return(0);
5725             else
5726               n = 0;
5727         }
5728         printf("\n");
5729         if (++n >= cmd_rows) {
5730             if (!askmore())
5731               return(0);
5732             else
5733               n = 0;
5734         }
5735         for (i = 0; i <= XA_MAX; i++) {
5736             if (xopthlp[i]) {
5737                 printf("%s\n",xopthlp[i]);
5738                 printf("   %s\n",xarghlp[i]);
5739                 printf("\n");
5740                 n += 3;
5741                 if (n > (cmd_rows - 4)) {
5742                     if (!askmore())
5743                       return(0);
5744                     else
5745                       n = 0;
5746                 }
5747             }
5748         }
5749     }
5750     return(1);
5751 }
5752 #endif /* NOCMDL */
5753 #endif /* NOHELP */
5754
5755 #ifdef CKCHANNELIO
5756 static char * hxxfile[] = {
5757 "Syntax: FILE <subcommand> [ switches ] <channel> [ <data> ]",
5758 "  Opens, closes, reads, writes, and manages local files.",
5759 " ",
5760 "The FILE commands are:",
5761 " ",
5762 "  FILE OPEN   (or FOPEN)   -- Open a local file.",
5763 "  FILE CLOSE  (or FCLOSE)  -- Close an open file.",
5764 "  FILE READ   (or FREAD)   -- Read data from an open file.",
5765 "  FILE WRITE  (or FWRITE)  -- Write data to an open file.",
5766 "  FILE LIST   (or FLIST)   -- List open files.",
5767 "  FILE STATUS (or FSTATUS) -- Show status of a channel.",
5768 "  FILE REWIND (or FREWIND) -- Rewind an open file",
5769 "  FILE COUNT  (or FCOUNT)  -- Count lines or bytes in an open file",
5770 "  FILE SEEK   (or FSEEK)   -- Seek to specified spot in an open file.",
5771 "  FILE FLUSH  (or FFLUSH)  -- Flush output buffers for an open file.",
5772 " ",
5773 "Type HELP FILE OPEN or HELP FOPEN for details about FILE OPEN;",
5774 "type HELP FILE CLOSE or HELP FCLOSE for details about FILE CLOSE, and so on.",
5775 " ",
5776 "The following variables are related to the FILE command:",
5777 " ",
5778 "  \\v(f_max)     -- Maximum number of files that can be open at once",
5779 "  \\v(f_error)   -- Completion code of most recent FILE command or function",
5780 "  \\v(f_count)   -- Result of most recent FILE COUNT command",
5781 " ",
5782 "The following functions are related to the FILE command:",
5783 " ",
5784 "  \\F_eof()      -- Check if channel is at EOF",
5785 "  \\F_pos()      -- Get channel read/write position (byte number)",
5786 "  \\F_line()     -- Get channel read/write position (line number)",
5787 "  \\F_handle()   -- Get file handle",
5788 "  \\F_status()   -- Get channel status",
5789 "  \\F_getchar()  -- Read character",
5790 "  \\F_getline()  -- Read line",
5791 "  \\F_getblock() -- Read block",
5792 "  \\F_putchar()  -- Write character",
5793 "  \\F_putline()  -- Write line",
5794 "  \\F_putblock() -- Write block",
5795 "  \\F_errmsg()   -- Error message from most recent FILE command or function",
5796 " ",
5797 "Type HELP <function-name> for information about each one.",
5798 ""
5799 };
5800
5801 static char * hxxf_op[] = {
5802 "Syntax: FILE OPEN [ switches ] <variable> <filename>",
5803 "  Opens the file indicated by <filename> in the mode indicated by the",
5804 "  switches, if any, or if no switches are included, in read-only mode, and",
5805 "  assigns a channel number for the file to the given variable.",
5806 "  Synonym: FOPEN.  Switches:",
5807 " ",
5808 "/READ",
5809 "  Open the file for reading.",
5810 " ",
5811 "/WRITE",
5812 "  Open the file for writing.  If /READ was not also specified, this creates",
5813 "  a new file.  If /READ was specified, the existing file is preserved, but",
5814 "  writing is allowed.  In both cases, the read/write pointer is initially",
5815 "  at the beginning of the file.",
5816 " ",
5817 "/APPEND",
5818 "  If the file does not exist, create a new file and open it for writing.",
5819 "  If the file exists, open it for writing, but with the write pointer",
5820 "  positioned at the end.",
5821 " ",
5822 "/BINARY",
5823 #ifdef VMS
5824 "  Opens the file in binary mode to inhibit end-of-line conversions.",
5825 #else
5826 #ifdef OS2
5827 "  Opens the file in binary mode to inhibit end-of-line conversions.",
5828 #else
5829 #ifdef UNIX
5830 "  This option is ignored in UNIX.",
5831 #else
5832 "  This option is ignored on this platform.",
5833 #endif /* UNIX */
5834 #endif /* OS2 */
5835 #endif /* VMS */
5836 " ",
5837 "Switches can be combined in an way that makes sense and is supported by the",
5838 "underlying operating system.",
5839 ""
5840 };
5841
5842 static char * hxxf_cl[] = {
5843 "Syntax: FILE CLOSE <channel>",
5844 "  Closes the file on the given channel if it was open.",
5845 "  Also see HELP FILE OPEN.  Synonym: FCLOSE.",
5846 ""
5847 };
5848
5849 static char * hxxf_fl[] = {
5850 "Syntax: FILE FLUSH <channel>",
5851 "  Flushes output buffers on the given channel if it was open, forcing",
5852 "  all material previously written to be committed to disk.  Synonym: FFLUSH.",
5853 "  Also available as \\F_flush().",
5854 ""
5855 };
5856
5857 static char * hxxf_li[] = {
5858 "Syntax: FILE LIST",
5859 "  Lists the channel number, name, modes, and position of each file opened",
5860 "  with FILE OPEN.  Synonym: FLIST.",
5861 ""
5862 };
5863
5864 static char * hxxf_re[] = {
5865 "Syntax: FILE READ [ switches ] <channel> [ <variable> ]",
5866 "  Reads data from the file on the given channel number into the <variable>,",
5867 "  if one was given; if no variable was given, the result is printed on",
5868 "  the screen.  The variable should be a macro name rather than a \\%x",
5869 "  variable or array element if you want backslash characters in the file to",
5870 "  be taken literally.  Synonym: FREAD.  Switches:",
5871 " ",
5872 "/LINE",
5873 "  Specifies that a line of text is to be read.  A line is defined according",
5874 "  to the underlying operating system's text-file format.  For example, in",
5875 "  UNIX a line is a sequence of characters up to and including a linefeed.",
5876 "  The line terminator (if any) is removed before assigning the text to the",
5877 "  variable.  If no switches are included with the FILE READ command, /LINE",
5878 "  is assumed.",
5879 " ",
5880 "/SIZE:number",
5881 "  Specifies that the given number of bytes (characters) is to be read.",
5882 "  This gives a semblance of \"record i/o\" for files that do not necessarily",
5883 "  contain lines.  The resulting block of characters is assigned to the",
5884 "  variable without any editing.",
5885 " ",
5886 "/CHARACTER",
5887 "  Equivalent to /SIZE:1.  If FILE READ /CHAR succeeds but the <variable> is",
5888 "  empty, this indicates a NUL byte was read.",
5889 " ",
5890 "/TRIM",
5891 "  Tells Kermit to trim trailing whitespace when used with /LINE.  Ignored",
5892 "  if used with /CHAR or /SIZE.",
5893 " ",
5894 "/UNTABIFY",
5895 "  Tells Kermit to convert tabs to spaces (assuming tabs set every 8 spaces)",
5896 "  when used with /LINE.  Ignored if used with /CHAR or /SIZE.",
5897 " ",
5898 "Synonym: FREAD.",
5899 "Also available as \\F_getchar(), \\F_getline(), \\F_getblock().",
5900 ""
5901 };
5902
5903 static char * hxxf_rw[] = {
5904 "Syntax: FILE REWIND <channel>",
5905 "  If the channel is open, moves the read/write pointer to the beginning of",
5906 "  the file.  Equivalent to FILE SEEK <channel> 0.  Synonym: FREWIND.",
5907 "  Also available as \\F_rewind().",
5908 ""
5909 };
5910
5911 static char * hxxf_se[] = {
5912 "Syntax: FILE SEEK [ switches ] <channel> { [{+,-}]<number>, EOF }",
5913 "  Switches are /BYTE, /LINE, /RELATIVE, /ABSOLUTE, and /FIND:pattern.",
5914 "  Moves the file pointer for this file to the given position in the",
5915 "  file.  Subsequent FILE READs or WRITEs will take place at that position.",
5916 "  If neither the /RELATIVE nor /ABSOLUTE switch is given, an unsigned",
5917 "  <number> is absolute; a signed number is relative.  EOF means to move to",
5918 "  the end of the file.  If a /FIND: switch is included, Kermit seeks to the",
5919 "  specified spot (e.g. 0 for the beginning) and then begins searching line",
5920 "  by line for the first line that matches the given pattern.  To start",
5921 "  searching from the current file position specify a line number of +0.",
5922 "  To start searching from the line after the current one, use +1 (etc).",
5923 "  Synonym: FSEEK.",
5924 ""
5925 };
5926
5927 static char * hxxf_st[] = {
5928 "Syntax: FILE STATUS <channel>",
5929 "  If the channel is open, this command shows the name of the file, the",
5930 "  switches it was opened with, and the current read/write position.",
5931 "  Synonym: FSTATUS",
5932 ""
5933 };
5934
5935 static char * hxxf_co[] = {
5936 "Syntax: FILE COUNT [ { /BYTES, /LINES, /LIST, /NOLIST } ] <channel>",
5937 "  If the channel is open, this command prints the nubmer of bytes (default)",
5938 "  or lines in the file if at top level or if /LIST is included; if /NOLIST",
5939 "  is given, the result is not printed.  In all cases the result is assigned",
5940 "  to \\v(f_count).  Synonym: FCOUNT",
5941 ""
5942 };
5943
5944 static char * hxxf_wr[] = {
5945 "FILE WRITE [ switches ] <channel> <text>",
5946 "  Writes the given text to the file on the given channel number.  The <text>",
5947 "  can be literal text or a variable, or any combination.  If the text might",
5948 "  contain leading or trailing spaces, it must be enclosed in braces if you",
5949 "  want to preserve them.  Synonym: FWRITE.  Switches:",
5950 " ",
5951 "/LINE",
5952 "  Specifies that an appropriate line terminator is to be added to the",
5953 "  end of the <text>.  If no switches are included, /LINE is assumed.",
5954 " ",
5955 "/SIZE:number",
5956 "  Specifies that the given number of bytes (characters) is to be written.",
5957 "  If the given <text> is longer than the requested size, it is truncated;",
5958 "  if is shorter, it is padded according /LPAD and /RPAD switches.  Synonym:",
5959 "  /BLOCK.",
5960 " ",
5961 "/LPAD[:value]",
5962 "  If /SIZE was given, but the <text> is shorter than the requested size,",
5963 "  the text is padded on the left with sufficient copies of the character",
5964 "  whose ASCII value is given to write the given length.  If no value is",
5965 "  specified, 32 (the code for Space) is used.  The value can also be 0 to",
5966 "  write the indicated number of NUL bytes.  If /SIZE was not given, this",
5967 "  switch is ignored.",
5968 " ",
5969 "/RPAD[:value]",
5970 "  Like LPAD, but pads on the right.",
5971 " ",
5972 "/STRING",
5973 "  Specifies that the <text> is to be written as-is, with no terminator added."
5974 ,
5975 " ",
5976 "/CHARACTER",
5977 "  Specifies that one character should be written.  If the <text> is empty or",
5978 "  not given, a NUL character is written; otherwise the first character of",
5979 "  <text> is given.",
5980 " ",
5981 "Synonym FWRITE.",
5982 "Also available as \\F_putchar(), \\F_putline(), \\F_putblock().",
5983 ""
5984 };
5985
5986 static int
5987 dohfile(cx) int cx; {
5988     extern struct keytab fctab[];
5989     extern int nfctab;
5990     int x;
5991     if (cx == XXFILE) {                 /* FILE command was given */
5992         /* Get subcommand */
5993         if ((cx = cmkey(fctab,nfctab,"Operation","",xxstring)) < 0) {
5994             if (cx == -3) {
5995                 if ((x = cmcfm()) < 0)
5996                   return(x);
5997                 cx = XXFILE;
5998             } else
5999               return(cx);
6000         }
6001         if ((x = cmcfm()) < 0)
6002           return(x);
6003         switch (cx) {
6004           case FIL_CLS: cx = XXF_CL; break;
6005           case FIL_FLU: cx = XXF_FL; break;
6006           case FIL_LIS: cx = XXF_LI; break;
6007           case FIL_OPN: cx = XXF_OP; break;
6008           case FIL_REA: cx = XXF_RE; break;
6009           case FIL_REW: cx = XXF_RW; break;
6010           case FIL_SEE: cx = XXF_SE; break;
6011           case FIL_STA: cx = XXF_ST; break;
6012           case FIL_WRI: cx = XXF_WR; break;
6013           case FIL_COU: cx = XXF_CO; break;
6014         }
6015     }
6016     switch (cx) {
6017       case XXFILE: return(hmsga(hxxfile));
6018       case XXF_CL: return(hmsga(hxxf_cl));
6019       case XXF_FL: return(hmsga(hxxf_fl));
6020       case XXF_LI: return(hmsga(hxxf_li));
6021       case XXF_OP: return(hmsga(hxxf_op));
6022       case XXF_RE: return(hmsga(hxxf_re));
6023       case XXF_RW: return(hmsga(hxxf_rw));
6024       case XXF_SE: return(hmsga(hxxf_se));
6025       case XXF_ST: return(hmsga(hxxf_st));
6026       case XXF_WR: return(hmsga(hxxf_wr));
6027       case XXF_CO: return(hmsga(hxxf_co));
6028       default:
6029         return(-2);
6030     }
6031 }
6032 #endif /* CKCHANNELIO */
6033
6034 int
6035 dohlp(xx) int xx; {
6036     int x,y;
6037
6038     debug(F101,"DOHELP xx","",xx);
6039     if (xx < 0) return(xx);
6040
6041 #ifdef NOHELP
6042     if ((x = cmcfm()) < 0)
6043       return(x);
6044     printf("\n%s, Copyright (C) 1985, %s,",versio, ck_cryear);
6045 #ifndef NOIKSD
6046     if (inserver)
6047       return(hmsga(tophlpi));
6048     else
6049 #endif /* IKSD */
6050       return(hmsga(tophlp));
6051
6052 #else /* help is available */
6053
6054     if (helpfile)
6055       return(dotype(helpfile,xaskmore,0,0,NULL,0,NULL,0,0,NULL,0));
6056
6057 #ifdef CKCHANNELIO
6058     if (xx == XXFILE)
6059       return(dohfile(xx));
6060     else if (xx == XXF_RE || xx == XXF_WR || xx == XXF_OP ||
6061              xx == XXF_CL || xx == XXF_SE || xx == XXF_RW ||
6062              xx == XXF_FL || xx == XXF_LI || xx == XXF_ST || xx == XXF_CO)
6063       return(dohfile(xx));
6064 #endif /* CKCHANNELIO */
6065
6066     switch (xx) {
6067
6068 #ifndef NOSPL
6069 case XXASS:                             /* ASSIGN */
6070     return(hmsga(hxxass));
6071
6072 case XXASK:                             /* ASK */
6073 case XXASKQ:                            /* ASKQ */
6074     return(hmsga(hxxask));
6075
6076 case XXAPC:
6077     return(hmsg("Syntax: APC text\n\
6078   Echoes the text within a VT220/320/420 Application Program Command."));
6079 #endif /* NOSPL */
6080
6081 #ifndef NOFRILLS
6082 case XXBUG:
6083     return(hmsg("Describes how to get technical support."));
6084 #endif /* NOFRILLS */
6085
6086 #ifndef NOSPL
6087 case XXBEEP:
6088 #ifdef OS2
6089     return(hmsg("Syntax: BEEP [ { ERROR, INFORMATION, WARNING } ]\n\
6090   Generates a bell according to the current settings.  If SET BELL is set to\n\
6091   \"system-sounds\" then the appropriate System Sound will be generated.\n\
6092   Default is INFORMATION."));
6093 #else /* OS2 */
6094     return(hmsg("Syntax: BEEP\n\
6095 Sends a BEL character to your terminal."));
6096 #endif /* OS2 */
6097 #endif /* NOSPL */
6098
6099 case XXBYE:                             /* BYE */
6100     return(hmsg(hmxxbye));
6101
6102 case XXCHK:                             /* check */
6103     return(hmsg("\
6104 Syntax: CHECK name\n\
6105   Checks\
6106   to see if the named feature is included in this version of Kermit.\n\
6107   To list the features you can check, type \"check ?\"."));
6108
6109 #ifndef NOFRILLS
6110 case XXCLE:                             /* clear */
6111     return(hmsga(hmxxcle));
6112 #endif /* NOFRILLS */
6113
6114 case XXCLO:                             /* close */
6115     return(hmsga(hmxxclo));
6116
6117 case XXCOM:                             /* comment */
6118 #ifndef STRATUS /* Can't use # for comments in Stratus VOS */
6119     return(hmsg("\
6120 Syntax: COMMENT text\n\
6121 Example: COMMENT - this is a comment.\n\
6122   Introduces a comment.  Beginning of command line only.  Commands may also\n\
6123   have trailing comments, introduced by ; or #."));
6124 #else
6125     return(hmsg("\
6126 Syntax: COMMENT text\n\
6127 Example: COMMENT - this is a comment.\n\
6128   Introduces a comment.  Beginning of command line only.  Commands may also\n\
6129   have trailing comments, introduced by ; (semicolon)."));
6130 #endif /* STRATUS */
6131
6132 #ifndef NOLOCAL
6133 case XXCON:                             /* CONNECT */
6134 case XXCQ:                              /* CQ == CONNECT /QUIETLY */
6135     hmsga(hmxxcon);
6136     printf("Your escape character is Ctrl-%c (ASCII %d, %s)\r\n",
6137            ctl(escape), escape, (escape == 127 ? "DEL" : ccntab[escape]));
6138     return(0);
6139 #endif /* NOLOCAL */
6140
6141 #ifdef ZCOPY
6142 case XXCPY:
6143     return(hmsga(hmxxcpy));
6144 #endif /* ZCOPY */
6145
6146 #ifdef NT
6147 case XXLINK:
6148 return(hmsg(
6149 "  LINK source destination\n\
6150    creates a hard link to the file specified by source to the filename\n\
6151    specified by destination.  Hard links are only supported on NTFS.\n\
6152    destination can either be a filename or a directory.  source may\n\
6153    contain wildcards if destination is a directory."));
6154 #endif /* NT */
6155
6156 #ifndef NOFRILLS
6157 case XXLREN:                            /* LRENAME */
6158     return(hmsg(
6159 "  LRENAME is an alias for the RENAME command forcing it to execute\n\
6160   on the local computer.  Also see: RENAME, RRENAME, SET LOCUS."));
6161
6162 case XXREN:
6163     return(hmsga(hmxxren));
6164 #endif /* NOFRILLS */
6165
6166 case XXCDUP:                             /* CDUP */
6167 case XXLCDU:
6168     return(hmsg(
6169 "Change working directory to the one just above the current one."));
6170
6171 case XXLCWD:
6172     return(hmsg(
6173 "  LCD (LCWD) is an alias for the CD (CWD) command forcing it to execute\n\
6174   on the local computer.  Also see: CD, CDUP, RCD, SET LOCUS."));
6175
6176 case XXCWD:                             /* CD / CWD */
6177     return(hmsga(hmxxcwd));
6178
6179 #ifndef NOSPL
6180 case XXKCD:
6181     return(hmsga(hmxxkcd));
6182
6183 case XXARRAY:
6184 case XXDCL:                             /* DECLARE */
6185 case XXSORT:
6186     return(hmsga(hxxdcl));
6187
6188 case XXDEF:                             /* DEFINE */
6189 #ifndef NOSPL
6190     if (hlptok)                         /* What they actually typed... */
6191       if (hlptok[0] == '.')
6192         return(hmsga(hxxdot));
6193 #endif /* NOSPL */
6194     return(hmsga(hxxdef));
6195
6196 case XXUNDEF:                           /* UNDEFINE */
6197     return(hmsg("Syntax:  UNDEFINE variable-name\n\
6198   Undefines a macro or variable."));
6199 #endif /* NOSPL */
6200
6201 case XXMSG:
6202     return(hmsg("Syntax: MESSAGE text-to-print-if-debugging\n\
6203   Prints the given text to stdout if SET DEBUG MESSAGE is ON; prints it\n\
6204   to stderr if SET DEBUG MESSAGE is STDERR; doesn't print it at all if SET\n\
6205   DEBUG MESSAGE is OFF.  Synonym: MSG."));
6206
6207 #ifndef NOFRILLS
6208 case XXLDEL:
6209     return(hmsg(
6210 "  LDELETE is an alias for the DELETE command forcing it to execute\n\
6211   on the local computer.  Also see: DELETE, RDELETE, SET LOCUS."));
6212
6213 case XXDEL:                             /* delete */
6214     return(hmsga(hmxxdel));
6215 #endif /* NOFRILLS */
6216
6217 #ifndef NODIAL
6218 case XXDIAL:                            /* DIAL, etc... */
6219     return(hmsga(hxxdial));
6220
6221 case XXPDIA:                            /* PDIAL */
6222     return(hmsg("Syntax: PDIAL phonenumber\n\
6223   Partially dials a phone number.  Like DIAL but does not wait for carrier\n\
6224   or CONNECT message."));
6225
6226 case XXRED:
6227     return(hmsg("Redial the number given in the most recent DIAL commnd."));
6228
6229 case XXANSW:                            /* ANSWER */
6230     return(hmsga(hxxansw));
6231
6232 case XXLOOK:                            /* LOOKUP number in directory */
6233     return(hmsga(hxxlook));
6234 #endif /* NODIAL */
6235
6236 case XXLDIR:                            /* LDIRECTORY */
6237     return(hmsg(
6238 "  LDIRIRECTORY is an alias for the DIRECTORY command forcing it to execute\n\
6239   on the local computer.  Also see: DIRECTORY, SET LOCUS, RDIRECTORY."));
6240
6241 case XXDIR:                             /* DIRECTORY */
6242     return(hmsga(hmxxdir));
6243
6244 case XXTOUC:                            /* TOUCH */
6245     return(hmsga(hmxxtouc));
6246
6247 case XXWDIR:                            /* WDIRECTORY */
6248   return(hmsg("  WDIRECTORY is shorthand for DIRECTORY /SORT:DATE /REVERSE;\n\
6249   it produces a listing in reverse chronological order.  See the DIRECTORY\n\
6250   command for further information."));
6251
6252 case XXHDIR:                            /* HDIRECTORY */
6253   return(hmsg("  HDIRECTORY is shorthand for DIRECTORY /SORT:SIZE /REVERSE;\n\
6254   it produces a listing showing the biggest files first.  See the DIRECTORY\n\
6255   command for further information."));
6256
6257 case XXLMKD:                            /* LMKDIR */
6258     return(hmsg(
6259 "  LMKDIR is an alias for the MKDIR command forcing it to execute\n\
6260   on the local computer.  Also see: MKDIR, RMKDIR, SET LOCUS."));
6261
6262 case XXMKDIR:                           /* MKDIR */
6263     return(hmsg("Creates a directory.  Also see LRMDIR, RRMDIR, SET LOCUS."));
6264
6265 case XXLRMD:                            /* LRMDIR */
6266     return(hmsg(
6267 "  LRMDIR is an alias for the RMDIR command forcing it to execute\n\
6268   on the local computer.  Also see: RMDIR, RRMDIR, SET LOCUS."));
6269
6270 case XXRMDIR:                           /* RMDIR */
6271     return(hmsg("Removes a directory.  Also see LRMDIR, RRMDIR, SET LOCUS."));
6272
6273 case XXLS:
6274 #ifdef UNIXOROSK
6275     return(hmsg("Syntax: LS [ args ]\n\
6276   Runs \"ls\" with the given arguments."));
6277 #else
6278     return(hmsga(hmxxdir));
6279 #endif /* UNIXOROSK */
6280
6281 #ifndef NOSERVER
6282 #ifndef NOFRILLS
6283 case XXDIS:
6284     return(hmsg("Syntax: DISABLE command\n\
6285   Security for the Kermit server.  Prevents the client Kermit program from\n\
6286   executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc."));
6287 #endif /* NOFRILLS */
6288 #endif /* NOSERVER */
6289
6290 #ifndef NOSPL
6291 case XXDO:                              /* do */
6292     return(hmsg("Syntax: [ DO ] macroname [ arguments ]\n\
6293   Executes a macro that was defined with the DEFINE command.  The word DO\n\
6294   can be omitted.  Trailing argument words, if any, are automatically\n\
6295   assigned to the macro argument variables \\%1 through \\%9."));
6296 #endif /* NOSPL */
6297
6298 #ifndef NOSPL
6299 case XXDEC:
6300     return(hmsga(hxxdec));
6301 #endif /* NOSPL */
6302
6303 case XXECH:                             /* echo */
6304     return(hmsg("Syntax: ECHO text\n\
6305   Displays the text on the screen, followed by a line terminator.  The ECHO\n\
6306   text may contain backslash codes.  Example: ECHO \\7Wake up!\\7.  Also see\n\
6307   XECHO and WRITE SCREEN."));
6308
6309 case XXXECH:                            /* xecho */
6310     return(hmsg("Syntax: XECHO text\n\
6311   Just like ECHO but does not add a line terminator to the text.  See ECHO."));
6312
6313 case XXVOID:
6314     return(hmsg("Syntax: VOID text\n\
6315   Like ECHO but doesn't print anything; can be used to invoke functions\n\
6316   when you don't need to display or use their results."));
6317
6318 #ifndef NOSERVER
6319 #ifndef NOFRILLS
6320 case XXENA:
6321     return(hmsg("Syntax: ENABLE capability\n\
6322   For use with server mode.  Allows the client Kermit program access to the\n\
6323   named capability, such as CD, DELETE, RECEIVE, etc.  Opposite of DISABLE."));
6324 #endif /* NOFRILLS */
6325 #endif /* NOSERVER */
6326
6327 #ifndef NOSPL
6328 case XXEND:                             /* end */
6329     return(hmsg("Syntax: END [ number [ message ] ]\n\
6330   Exits from the current macro or TAKE file, back to wherever invoked from.\n\
6331   Number is return code.  Message, if given, is printed."));
6332
6333 case XXEVAL:                            /* evaluate */
6334     return(hmsga(hmxxeval));
6335 #endif /* NOSPL */
6336
6337 #ifndef NOFRILLS
6338 case XXERR:                             /* e-packet */
6339     return(hmsg("Syntax: E-PACKET\n\
6340   Sends an Error packet to the other Kermit."));
6341 #endif /* NOFRILLS */
6342
6343 case XXEXI:                             /* exit */
6344 case XXQUI:
6345     return(hmsga(hmxxexit));
6346
6347 case XXFIN:
6348     return(hmsg("Syntax: FINISH\n\
6349   Tells the remote Kermit server to shut down without logging out."));
6350
6351 #ifndef NOSPL
6352   case XXFOR:
6353     return(hmsga(forhlp));
6354 #endif /* NOSPL */
6355
6356   case XXGET:
6357     return(hmsga(hmxxget));
6358   case XXMGET:
6359     return(hmsga(hmxxmget));
6360
6361 #ifndef NOSPL
6362 #ifndef NOFRILLS
6363   case XXGOK:
6364     return(hmsg("Syntax: GETOK [ switches ] prompt\n\
6365   Prints the prompt, makes user type 'yes', 'no', or 'ok', and sets SUCCESS\n\
6366   or FAILURE accordingly.  The optional switches are the same as for ASK."));
6367 #endif /* NOFRILLS */
6368 #endif /* NOSPL */
6369
6370 #ifndef NOSPL
6371   case XXGOTO:
6372     return(hmsg("Syntax: GOTO label\n\
6373   In a TAKE file or macro, go to the given label.  A label is a word on the\n\
6374   left margin that starts with a colon (:).  Example:\n\n\
6375   :oofa\n\
6376   echo Hello!\n\
6377   goto oofa"));
6378 #endif /* NOSPL */
6379
6380   case XXHAN:
6381     return(hmsg("Syntax: HANGUP\n\
6382 Hang up the phone or network connection."));
6383
6384   case XXHLP:
6385 /*
6386   We get confirmation here, even though we do it again in hmsga(), to prevent
6387   the Copyright message from being printed prematurely.  This doesn't do any
6388   harm, because the first call to cmcfm() sets cmflgs to 1, making the second
6389   call return immediately.
6390 */
6391     if ((x = cmcfm()) < 0)
6392       return(x);
6393
6394     if (helpfile) {
6395         printf("\n%s, Copyright (C) 1985, %s,\n\
6396 Trustees of Columbia University in the City of New York.\n\n",
6397                versio,
6398                ck_cryear
6399                );
6400         return(dotype(helpfile,xaskmore,3,0,NULL,0,NULL,0,0,NULL,0));
6401     } else {
6402         printf("\n%s, Copyright (C) 1985, %s,",versio,ck_cryear);
6403         return(hmsga(tophlp));
6404     }
6405
6406 case XXINT:
6407 #ifdef OS2
6408     return(hmsg("The INTRO command gives a brief introduction to Kermit 95."));
6409 #else
6410     return(hmsg("The INTRO command gives a brief introduction to C-Kermit."));
6411 #endif /* OS2 */
6412
6413 #ifndef NOSPL
6414 case XXIF:
6415     return(hmsga(ifhlp));
6416
6417 case XXINC:
6418     return(hmsga(hxxinc));
6419
6420 case XXINP:
6421    return(hmsga(hxxinp));
6422 #endif /* NOSPL */
6423
6424 #ifdef CK_MINPUT
6425 case XXMINP:
6426     return(hmsga(hmxxminp));
6427 #endif /* CK_MINPUT */
6428
6429 #ifndef NOSPL
6430 case XXREI:
6431     return(hmsg("Syntax: REINPUT n string\n\
6432   Looks for the string in the text that has recently been INPUT, set SUCCESS\n\
6433   or FAILURE accordingly.  Timeout, n, must be specified but is ignored."));
6434 #endif /* NOSPL */
6435
6436 #ifndef NOSPL
6437 case XXLBL:
6438     return(hmsg("\
6439   Introduces a label, like :loop, for use with GOTO in TAKE files or macros.\n\
6440 See GOTO."));
6441 #endif /* NOSPL */
6442
6443 case XXLOG:
6444     return(hmsga(hmxxlg));
6445
6446 #ifndef NOSCRIPT
6447 case XXLOGI:
6448     return(hmsga(hmxxlogi));
6449 #endif
6450
6451 #ifndef NOFRILLS
6452 case XXMAI:
6453     return(hmsg("Syntax: MAIL filename address\n\
6454   Equivalent to SEND /MAIL:address filename."));
6455 #endif /* NOFRILLS */
6456
6457 #ifndef NOMSEND
6458 case XXMSE:
6459     return(hmsga(hmxxmse));
6460
6461 case XXADD:
6462     return(hmsga(hmxxadd));
6463
6464 case XXMMOVE:
6465     return(hmsg("MMOVE is exactly like MSEND, except each file that is\n\
6466 sent successfully is deleted after it is sent."));
6467 #endif /* NOMSEND */
6468
6469 #ifndef NOSPL
6470 case XXOPE:
6471     return(hmsga(openhlp));
6472 #endif /* NOSPL */
6473
6474 case XXNEW:
6475     return(hmsg(
6476 "  Prints news of new features since publication of \"Using C-Kermit\"."));
6477
6478 case XXUPD:
6479     return(hmsg(
6480 "  New features are described in the online Kermit 95 manual,\n\
6481    accessible via the MANUAL command."));
6482
6483 #ifndef NOSPL
6484 case XXOUT:
6485     return(hmsga(hxxout));
6486 #endif /* NOSPL */
6487
6488 #ifdef ANYX25
6489 #ifndef IBMX25
6490 case XXPAD:
6491     return(hmsga(hxxpad));
6492 #endif /* IBMX25 */
6493 #endif /* ANYX25 */
6494
6495 #ifndef NOSPL
6496 case XXPAU:
6497     return(hmsga(hxxpau));
6498
6499 case XXMSL:
6500     return(hmsga(hxxmsl));
6501 #endif /* NOSPL */
6502
6503 #ifdef TCPSOCKET
6504 case XXPNG:
6505     return(hmsg("Syntax: PING [ IP-hostname-or-number ]\n\
6506   Checks if the given IP network host is reachable.  Default host is from\n\
6507   most recent SET HOST or TELNET command.  Runs system PING program, if any.")
6508            );
6509
6510 case XXFTP:
6511 #ifdef SYSFTP
6512     return(hmsg("Syntax: FTP [ IP-hostname-or-number ]\n\
6513   Makes an FTP connection to the given IP host or, if no host specified, to\n\
6514   the current host.  Uses the system's FTP program, if any."));
6515 #else
6516 #ifndef NOFTP
6517     return(doftphlp());
6518 #endif /* NOFTP */
6519 #endif /* SYSFTP */
6520 #endif /* TCPSOCKET */
6521
6522 #ifndef NOFRILLS
6523 case XXPRI:
6524 #ifdef UNIX
6525     return(hmsg("Syntax: PRINT file [ options ]\n\
6526   Prints the local file on a local printer with the given options.  Also see\n\
6527   HELP SET PRINTER."));
6528 #else
6529 #ifdef VMS
6530     return(hmsg("Syntax: PRINT file [ options ]\n\
6531   Prints the local file on a local printer with the given options.  Also see\n\
6532   HELP SET PRINTER."));
6533 #else
6534     return(hmsg("Syntax: PRINT file\n\
6535   Prints the local file on a local printer.  Also see HELP SET PRINTER."));
6536 #endif /* UNIX */
6537 #endif /* VMS */
6538 #endif /* NOFRILLS */
6539
6540 case XXPWD:
6541 case XXLPWD:
6542     return(hmsg("Syntax: PWD\n\
6543 Print the name of the current working directory."));
6544
6545 #ifndef NOSPL
6546 case XXREA:
6547     return(hmsg("Syntax: READ variablename\n\
6548   Reads a line from the currently open READ or !READ file into the variable\n\
6549   (see OPEN)."));
6550 #endif /* NOSPL */
6551
6552 #ifndef NOXFER
6553 case XXREC:
6554     return(hmsga(hmxxrc));
6555
6556 case XXREM:
6557     y = cmkey(remcmd,nrmt,"Remote command","",xxstring);
6558     return(dohrmt(y));
6559 #endif /* NOXFER */
6560
6561 #ifndef NOSPL
6562 case XXRET:
6563     return(hmsg("Syntax: RETURN [ value ]\n\
6564   Return from a macro.  An optional return value can be given for use with\n\
6565   \\fexecute(macro), which allows macros to be used like functions."));
6566 #endif /* NOSPL */
6567
6568 #ifndef NOXFER
6569 case XXSEN:
6570     return(hmsga(hmxxsen));
6571 case XXMOVE:
6572     return(hmsg("MOVE is exactly like SEND, except each file that is\n\
6573 sent successfully is deleted after it is sent."));
6574 #ifndef NORESEND
6575 case XXRSEN:
6576     return(hmsg(hmxxrsen));
6577 case XXREGET:
6578     return(hmsg(hmxxrget));
6579 case XXPSEN:
6580     return(hmsg(hmxxpsen));
6581 #endif /* NORESEND */
6582
6583 #ifndef NOSERVER
6584 case XXSER:
6585     return(hmsg(hmxxser));
6586 #endif /* NOSERVER */
6587 #endif /* NOXFER */
6588
6589 #ifndef NOJC
6590 case XXSUS:
6591     return(hmsg("Syntax: SUSPEND or Z\n\
6592   Suspends Kermit.  Continue Kermit with the appropriate system command,\n\
6593   such as fg."));
6594 #endif /* NOJC */
6595
6596 case XXSET:
6597     y = cmkey(prmtab,nprm,"Parameter","",xxstring);
6598     debug(F101,"HELP SET y","",y);
6599     return(dohset(y));
6600
6601 #ifndef NOPUSH
6602 case XXSHE:
6603     if (nopush) {
6604         if ((x = cmcfm()) < 0) return(x);
6605         printf("Sorry, help not available for \"%s\"\n",cmdbuf);
6606         break;
6607     } else
6608        return(hmsga(hxxshe));
6609 #ifdef CK_REDIR
6610 case XXFUN:
6611     return(hmsg("Syntax: REDIRECT command\n\
6612   Runs the given local command with its standard input and output redirected\n\
6613   to the current SET LINE or SET HOST communications path.\n\
6614   Synonym: < (Left angle bracket)."));
6615 #endif /* CK_REDIR */
6616
6617 #ifdef CK_REXX
6618 case XXREXX:
6619     return(hmsg("Syntax: REXX text\n\
6620   The text is a Rexx command to be executed. The \\v(rexx) variable is set\n\
6621   to the Rexx command's return value.\n\
6622   To execute a rexx program file, use:  REXX call <filename>\n\
6623   Rexx programs may call Kermit functions by placing the Kermit command\n\
6624   in single quotes.  For instance:  'set parity none'."));
6625 #endif /* CK_REXX */
6626 #endif /* NOPUSH */
6627
6628 #ifndef NOSHOW
6629 case XXSHO:
6630     return(hmsg("\
6631   Display current values of various items (SET parameters, variables, etc).\n\
6632   Type SHOW ? for a list of categories."));
6633 #endif /* NOSHOW */
6634
6635 case XXSPA:
6636 #ifdef datageneral
6637     return(hmsg("\
6638   Display disk usage in current device, directory,\n\
6639   or return space for a specified device, directory."));
6640 #else
6641     return(hmsg("Syntax: SPACE\n\
6642   Display disk usage in current device and/or directory"));
6643 #endif
6644
6645 case XXSTA:
6646     return(hmsg("Syntax: STATISTICS [/BRIEF]\n\
6647   Display statistics about most recent file transfer"));
6648
6649 #ifndef NOSPL
6650 case XXSTO:
6651     return(hmsg("Syntax: STOP [ number [ message ] ]\n\
6652   Stop executing the current macro or TAKE file and return immediately to\n\
6653   the Kermit prompt.  Number is a return code.  Message printed if given."));
6654 #endif /* NOSPL */
6655
6656 case XXTAK:
6657     return(hmsga(hmxxtak));
6658
6659 #ifdef TCPSOCKET
6660 #ifdef TNCODE
6661 case XXIKSD:
6662     return(hmsga(hmxxiks));
6663
6664 case XXTEL:
6665     return(hmsga(hmxxtel));
6666
6667 case XXTELOP:
6668     return(hmsga(hxtopt));
6669 #endif /* TNCODE */
6670
6671 #ifdef RLOGCODE
6672 case XXRLOG:
6673     return(hmsg("Syntax: RLOGIN [ switches ] [ host [ username ] ]\n\
6674   Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /RLOGIN,\n\
6675   IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)\n\
6676   is resumed.  Depending on how Kermit has been built switches may be\n\
6677   available to require Kerberos authentication and DES encryption."));
6678 #endif /* RLOGCODE */
6679 #endif /* TCPSOCKET */
6680
6681 #ifndef NOXMIT
6682 case XXTRA:
6683     return(hmsga(hxxxmit));
6684 #endif /* NOXMIT */
6685
6686 #ifndef NOFRILLS
6687 case XXTYP:
6688     return(hmsga(hmxxtyp));
6689 case XXMORE:
6690     return(hmsg("Syntax: MORE [ switches ] filename\n\
6691   Equivalent to TYPE /PAGE filename; see HELP TYPE."));
6692 case XXCAT:
6693     return(hmsg("Syntax: MORE [ switches ] filename\n\
6694   Equivalent to TYPE /NOPAGE filename; see HELP TYPE."));
6695 case XXHEAD:
6696     return(hmsg("Syntax: HEAD [ switches ] filename\n\
6697   Equivalent to TYPE /HEAD filename; see HELP TYPE."));
6698 case XXTAIL:
6699     return(hmsg("Syntax: TAIL [ switches ] filename\n\
6700   Equivalent to TYPE /TAIL filename; see HELP TYPE."));
6701 #endif /* NOFRILLS */
6702
6703 #ifndef NOSPL
6704 case XXWHI:
6705     return(hmsga(whihlp));
6706
6707 case XXSWIT:
6708     return(hmsga(swihlp));
6709 #endif /* NOSPL */
6710
6711 #ifndef NOCSETS
6712 case XXXLA:
6713     return(hmsga(hxxxla));
6714 #endif /* NOCSETS */
6715
6716 case XXVER:
6717     return(hmsg("Syntax: VERSION\nDisplays the program version number."));
6718
6719 #ifndef NOSPL
6720 case XXWAI:
6721     return(hmsga(hxxwai));
6722 #endif /* NOSPL */
6723
6724 #ifndef NOFRILLS
6725 case XXWHO:
6726     return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));
6727
6728 case XXWRI:
6729     return(hmsga(hxxwri));
6730
6731 case XXWRL:
6732     return(hmsg(
6733 "WRITE-LINE (WRITELN) is just like WRITE, but includes a line terminator\n\
6734 at the end of text.  See WRITE."));
6735 #endif /* NOFRILLS */
6736
6737 #ifndef NOSPL
6738 case XXIFX:
6739     return(hmsga(ifxhlp));
6740
6741 case XXGETC:                            /* GETC */
6742     return(hmsga(hxxgetc));
6743
6744 case XXFWD:                             /* FORWARD */
6745     return(hmsg(
6746 "Like GOTO, but searches only forward for the label.  See GOTO."));
6747
6748 case XXLOCAL:                           /* LOCAL */
6749     return(hmsg(
6750 "Declares a variable to be local to the current macro or command file."));
6751 #endif /* NOSPL */
6752
6753 case XXVIEW:
6754     return(hmsg(
6755 "View the terminal emulation screen even when there is no connection."));
6756
6757 #ifdef NEWFTP
6758 case XXASC:
6759     return(hmsg(
6760 "Inhibits automatic transfer-mode switching and forces TEXT (ASCII) transfer\n\
6761 mode for all files in both Kermit and FTP protocols."));
6762 case XXBIN:
6763     return(hmsg(
6764 "Inhibits automatic transfer-mode switching and forces BINARY transfer mode\n\
6765 for all files in both Kermit and FTP protocols."));
6766 #else
6767 case XXASC:
6768     return(hmsg(
6769 "Inhibits automatic transfer-mode switching and forces TEXT (ASCII) transfer\n\
6770 mode for all files."));
6771 case XXBIN:
6772     return(hmsg(
6773 "Inhibits automatic transfer-mode switching and forces BINARY transfer mode\n\
6774 for all files."));
6775 #endif  /* NEWFTP */
6776
6777 case XXDATE:
6778     return(hmsga(hmxxdate));
6779
6780 case XXRETR:
6781     return(hmsg(
6782 "Just like GET but asks the server to delete each file that has been\n\
6783 sent successfully."));
6784
6785 case XXEIGHT:
6786     return(hmsg(
6787 "Equivalent to SET PARITY NONE, SET COMMAND BYTE 8, SET TERMINAL BYTE 8."));
6788
6789 case XXSAVE:
6790     return(hmsga(hmxxsave));
6791
6792 #ifndef NOFRILLS
6793 #ifndef NOPUSH
6794 case XXEDIT:
6795     return(hmsg("Syntax: EDIT [ <file> ]\n\
6796 Starts your preferred editor on the given file, or if none given, the most\n\
6797 recently edited file, if any.  Also see SET EDITOR."));
6798 #endif /* NOPUSH */
6799 #endif /* NOFRILLS */
6800
6801 #ifdef BROWSER
6802 case XXBROWS:
6803     return(hmsg("Syntax: BROWSE [ <url> ]\n\
6804 Starts your preferred Web browser on the given URL, or if none given, the\n\
6805 most recently visited URL, if any.  Also see SET BROWSER."));
6806 #endif /* BROWSER */
6807
6808 #ifdef CK_TAPI
6809 case XXTAPI:
6810     return(hmsga(hxxtapi));
6811 #endif /* CK_TAPI */
6812
6813 #ifdef PIPESEND
6814 case XXCSEN:
6815     return(hmsg("Syntax: CSEND [ switches ] <command> [ <as-name> ]\n\
6816 Sends from the given <command> rather than from a file.  Equivalent to\n\
6817 SEND /COMMAND; see HELP SEND for details."));
6818
6819 case XXCREC:
6820     return(hmsg("Syntax: CRECEIVE [ switches ] <command>\n\
6821 Receives to the given <command> rather than to a file.  Equivalent to\n\
6822 RECEIVE /COMMAND; see HELP RECEIVE for details."));
6823
6824 case XXCGET:
6825     return(hmsg("Syntax: CGET <remote-file-or-command> <local-command>\n\
6826 Equivalent to GET /COMMAND; see HELP GET for details."));
6827 #endif /* PIPESEND */
6828
6829 #ifndef NOSPL
6830 case XXFUNC:
6831 /*
6832   Tricky parsing.  We want to let them type the function name in any format
6833   at all: \fblah(), \fblah, \\fblah(), fblah, blah, blah(), etc, but of course
6834   only one of these is recognized by cmkey().  So we call cmkeyx() (the "no
6835   complaints" version of cmkey()), and if it fails, we try the other formats
6836   silently, and still allow for <no-name-given>, editing and reparse, etc.
6837 */
6838     y = cmkeyx(fnctab,nfuncs,"Name of function","",NULL);
6839     if (y == -1) {                      /* Reparse needed */
6840         return(y);
6841     } else if (y == -3) {
6842         if ((x = cmcfm()) < 0)          /* For recall buffer... */
6843           return(x);
6844         return(dohfunc(y));             /* -3 gives general message */
6845     }
6846     if (y < 0) {                        /* Something given but didn't match */
6847         int dummy;
6848         char * p;
6849         for (p = atmbuf; *p; p++) {     /* Chop off trailing parens if any */
6850             if (*p == '(') {
6851                 *p = NUL;
6852                 break;
6853             }
6854         }
6855         /* Chop off leading "\\f" or "\f" or "f" */
6856         p = atmbuf;
6857         if (*p == CMDQ)                 /* Allow for \\f... */
6858           p++;
6859         if (*p == CMDQ && (*(p+1) == 'f' || *(p+1) == 'F')) { /* or \f */
6860             p += 2;
6861         } else if (*p == 'f' || *p == 'F') { /* or just f */
6862             p++;
6863         }
6864         y = lookup(fnctab,p,nfuncs,&dummy); /* Look up the result */
6865     }
6866     if (y < 0) {
6867         printf("?No such function - \"%s\"\n",atmbuf);
6868         return(-9);
6869     }
6870     x = cmgbrk();                       /* Find out how user terminated */
6871     if (x == LF || x == CR)             /* if with CR or LF */
6872       cmflgs = 1;                       /* restore cmflgs to say so */
6873     if ((x = cmcfm()) < 0)              /* And THEN confirm so command will */
6874       return(x);                        /* get into recall buffer. */
6875     return(dohfunc(y));
6876 #endif /* NOSPL */
6877
6878 #ifndef NOCMDL
6879 case XXOPTS:                            /* Command-line options */
6880     return(dohopts());
6881
6882 case XXXOPTS:                           /* Extended command-line options */
6883     return(doxopts());
6884 #endif /* NOCMDL */
6885
6886 #ifdef OS2
6887 #ifndef NOKVERBS
6888 case XXKVRB: {
6889     y = cmkeyx(kverbs,nkverbs,"Name of keyboard verb without \\k","",NULL);
6890     if (y == -1) {                      /* Reparse needed */
6891         return(y);
6892     } else if (y == -3) {
6893         if ((x = cmcfm()) < 0)          /* For recall buffer... */
6894           return(x);
6895         return(dohkverb(y));            /* -3 gives general message */
6896     }
6897     if (y < 0) {                        /* Something given but didn't match */
6898         int dummy;
6899         char * p;
6900         for (p = atmbuf; *p; p++) {     /* Chop off trailing parens if any */
6901             if (*p == '(') {
6902                 *p = NUL;
6903                 break;
6904             }
6905         }
6906         /* Chop off leading "\\k" or "\k" or "k" */
6907         p = atmbuf;
6908         if (*p == CMDQ)                 /* Allow for \\k... */
6909           p++;
6910         if (*p == CMDQ && (*(p+1) == 'k' || *(p+1) == 'K')) { /* or \k */
6911             p += 2;
6912         } else if (*p == 'k' || *p == 'K') { /* or just k */
6913             p++;
6914         }
6915         y = lookup(kverbs,p,nkverbs,&dummy); /* Look up the result */
6916     }
6917     if (y < 0) {
6918         printf("?No such function - \"%s\"\n",atmbuf);
6919         return(-9);
6920     }
6921     x = cmgbrk();                       /* Find out how user terminated */
6922     if (x == LF || x == CR)             /* if with CR or LF */
6923       cmflgs = 1;                       /* restore cmflgs to say so */
6924     if ((x = cmcfm()) < 0)              /* And THEN confirm so command will */
6925       return(x);                        /* get into recall buffer. */
6926     return(dohkverb(y));
6927 }
6928 #endif /* NOKVERBS */
6929 #endif /* OS2 */
6930
6931 case XXKERMI:
6932     return(hmsg("Syntax: KERMIT [command-line-options]\n\
6933   Lets you give command-line options at the prompt or in a script.\n\
6934   HELP OPTIONS for more info."));
6935
6936 case XXBACK:
6937     return(hmsg("Syntax: BACK\n  Returns to your previous directory."));
6938
6939 case XXWHERE:
6940     return(hmsg("Syntax: WHERE\n  Tells where your transferred files went."));
6941
6942 #ifndef NOXFER
6943 case XXREMV:
6944     return(hmsga(hmxxremv));
6945 #endif /* NOXFER */
6946
6947 #ifdef CK_KERBEROS
6948 case XXAUTH:
6949     return(hmsga(hmxxauth));
6950 #endif /* CK_KERBEROS */
6951
6952 #ifndef NOHTTP
6953 case XXHTTP:
6954     return(hmsga(hmxxhttp));
6955 #endif /* NOHTTP */
6956
6957 #ifdef NETCMD
6958 case XXPIPE:
6959     return(hmsg("Syntax: PIPE [ command ]\n\
6960 Makes a connection through the program whose command line is given. Example:\n\
6961 \n pipe rlogin xyzcorp.com"));
6962 #endif /* NETCMD */
6963
6964 case XXSTATUS:
6965     return(hmsg(
6966 "STATUS is the same as SHOW STATUS; prints SUCCESS or FAILURE for the\n\
6967 previous command."));
6968
6969 #ifndef NOSPL
6970 case XXASSER:
6971     return(hmsg("Syntax: ASSERT <condition>\n\
6972 Succeeds or fails depending on <condition>; see HELP IF for <condition>s."));
6973
6974 case XXFAIL:
6975     return(hmsg("Always fails."));
6976
6977 case XXSUCC:
6978     return(hmsg("Always succeeds."));
6979 #endif /* NOSPL */
6980
6981 #ifdef CK_LOGIN
6982 case XXLOGOUT:
6983     return(hmsg(
6984 "If you haved logged in to Kermit as an Internet Kermit server, the LOGOUT\n\
6985 command, given at the prompt, logs you out and closes your session."));
6986 #endif /* CK_LOGIN */
6987
6988 case XXRESET:
6989     return(hmsg("Closes all open files and logs."));
6990
6991 #ifndef NOCSETS
6992 case XXASSOC:
6993     return(hmsga(hmxxassoc));
6994 #endif /* NOCSETS */
6995
6996 #ifndef NOSPL
6997 case XXSHIFT:
6998     return(hmsg("Syntax: SHIFT [ n ]\n\
6999   Shifts \\%1..9 variables n places to the left; default n = 1."));
7000 #endif /* NOSPL */
7001
7002 #ifndef NOPUSH
7003 case XXMAN:
7004 #ifdef UNIX
7005     return(hmsg("Syntax: MANUAL [ topic ]\n\
7006   Runs the \"man\" command on the given topic (default \"kermit\")."));
7007 #else
7008 #ifdef OS2
7009     return(hmsg("Syntax: MANUAL\n\
7010   Accesses the Kermit 95 HTML manual using the current browser."));
7011 #else
7012     return(hmsg("Syntax: MANUAL [ topic ]\n\
7013   Runs the \"help\" command on the given topic (default \"kermit\")."));
7014 #endif /* OS2 */
7015 #endif /* UNIX */
7016 #endif /* NOPUSH */
7017
7018 case XXWILD:
7019     return(hmsga(hmxxwild));
7020
7021 #ifdef LOCUS
7022 case XXLOCU:
7023     return(hmsga(hmxylocus));
7024 #endif  /* LOCUS */
7025
7026 case XXPAT:
7027     return(hmsga(hmxxpat));
7028
7029 #ifndef NOXFER
7030 case XXFAST:
7031 case XXCAU:
7032 case XXROB:
7033     return(hmsga(hmxxfast));
7034 #endif /* NOXFER */
7035
7036 #ifdef CKPURGE
7037 case XXPURGE:
7038     return(hmsga(hmxxpurge));
7039 #else
7040 #ifdef VMS
7041 case XXPURGE:
7042     return(hmsga(hmxxpurge));
7043 #endif /* VMS */
7044 #endif /* CKPURGE */
7045
7046 #ifndef NOXFER
7047   case XXRASG:
7048     return(hmsg("  RASG and RASSIGN are short forms of REMOTE ASSIGN."));
7049   case XXRCWD:
7050     return(hmsg("  RCD and RCWD are short forms of REMOTE CD."));
7051   case XXRCPY:
7052     return(hmsg("  RCOPY is a short form of REMOTE COPY."));
7053   case XXRDEL:
7054     return(hmsg("  RDELETE is a short form of REMOTE RELETE."));
7055   case XXRDIR:
7056     return(hmsg("  RDIRECTORY is a short form of REMOTE DIRECTORY."));
7057   case XXRXIT:
7058     return(hmsg("  REXIT is a short form of REMOTE EXIT."));
7059   case XXRHLP:
7060     return(hmsg("  RHELP is a short form of REMOTE HELP."));
7061   case XXRHOS:
7062     return(hmsg("  RHOST is a short form of REMOTE HOST."));
7063   case XXRKER:
7064     return(hmsg("  RKERMIT is a short form of REMOTE KERMIT."));
7065   case XXRMKD:
7066     return(hmsg("  RMKDIR is a short form of REMOTE MKDIR."));
7067   case XXRMSG:
7068     return(hmsg("  RMESSAGE and RMSG are short forms of REMOTE MESSAGE."));
7069   case XXRPRI:
7070     return(hmsg("  RPRINT is a short form of REMOTE PRINT."));
7071   case XXRPWD:
7072     return(hmsg("  RPWD is a short form of REMOTE PWD."));
7073   case XXRQUE:
7074     return(hmsg("  QUERY and RQUERY are short forms of REMOTE QUERY."));
7075   case XXRREN:
7076     return(hmsg("  RRENAME is a short form of REMOTE RENAME."));
7077   case XXRRMD:
7078     return(hmsg("  RRMDIR is a short form of REMOTE RMDIR."));
7079   case XXRSET:
7080     return(hmsg("  RSET is a short form of REMOTE SET."));
7081   case XXRSPA:
7082     return(hmsg("  RSPACE is a short form of REMOTE SPACE."));
7083   case XXRTYP:
7084     return(hmsg("  RTYPE is a short form of REMOTE TYPE."));
7085   case XXRWHO:
7086     return(hmsg("  RWHO is a short form of REMOTE WHO."));
7087 #endif /* NOXFER */
7088
7089   case XXSCRN:
7090     return(hmsga(hmxxscrn));
7091
7092 #ifdef CKEXEC
7093   case XXEXEC:
7094     return(hmsg("Syntax: EXEC <command> [ <arg1> [ <arg2> [ ... ] ]\n\
7095   C-Kermit overlays itself with the given system command and starts it with\n\
7096   the given arguments.  Upon any error, control returns to C-Kermit."));
7097 #endif /* CKEXEC */
7098
7099 #ifndef NOSPL
7100   case XXTRACE:
7101     return(hmsg(
7102 "Syntax: TRACE { /ON, /OFF } { ASSIGNMENTS, COMMAND-LEVEL, ALL }\n\
7103   Turns tracing of the given object on or off."));
7104 #endif /* NOSPL */
7105
7106 #ifdef CK_PERMS
7107 #ifdef UNIX
7108   case XXCHMOD:
7109     return(hmsga(hmxxchmod));
7110 #endif /* UNIX */
7111 #endif /* CK_PERMS */
7112
7113 #ifdef CKROOT
7114   case XXCHRT:
7115     return(hmsga(hmxxchroot));
7116 #endif /* CKROOT */
7117
7118 #ifndef NOSPL
7119   case XXPROMP:
7120     return(hmsga(hmxxprompt));
7121 #endif /* NOSPL */
7122
7123   case XXGREP:
7124     return(hmsga(hmxxgrep));
7125
7126 #ifndef NOSEXP
7127 #ifndef NOSPL
7128   case XXSEXP:
7129     return(hmsga(hmxxsexp));
7130 #endif /* NOSPL */
7131 #endif /* NOSEXP */
7132
7133 #ifdef CKLEARN
7134   case XXLEARN:
7135     return(hmsga(hmxxlearn));
7136 #endif /* CKLEARN */
7137
7138 #ifdef ANYSSH
7139   case XXSSH:
7140     return(hmsga(hmxxssh));
7141 #endif /* ANYSSH */
7142
7143 #ifdef TCPSOCKET
7144   case XXFIREW:
7145     return(hmsga(hmxxfirew));
7146 #endif /* TCPSOCKET */
7147
7148 #ifdef NEWFTP
7149   case XXUSER:
7150     return(hmsg(" Equivalent to FTP USER."));
7151   case XXACCT:
7152     return(hmsg(" Equivalent to FTP ACCOUNT."));
7153 #endif /* NEWFTP */
7154
7155   case XXORIE:
7156     return(hmsg(" Shows the directories important to Kermit."));
7157
7158   case XXCONT:
7159     return(hmsg(" In a FOR or WHILE loop: continue the loop.\n\
7160  At the prompt: continue a script that has \"shelled out\" to the prompt."));
7161
7162   case XXREDO:
7163     return(hmsg(" Syntax: REDO xxx (or) ^xxx\n\
7164  Re-executes the most recent command starting with xxx."));
7165
7166 #ifdef UNIX
7167 #ifndef NOPUTENV
7168   case XXPUTE:
7169     return(hmsga(hmxxputenv));
7170 #endif  /* NOPUTENV */
7171 #endif  /* UNIX */
7172
7173   case XXNOTAV:
7174     return(hmsg(" This command is not configured in this version of Kermit."));
7175
7176 default: {
7177         char *s;
7178         if ((x = cmcfm()) < 0) return(x);
7179         s = cmdbuf + (int)strlen(cmdbuf) -1;
7180         while (s >= cmdbuf && *s == SP)
7181           *s-- = NUL;
7182         while (s >= cmdbuf && *s != SP)
7183           s--;
7184         while (*s == SP) s++;
7185         printf("Sorry, help not available for \"%s\"\n",s);
7186         break;
7187       }
7188     } /* switch */
7189 #endif /* NOHELP */
7190
7191     return(success = 0);
7192 }
7193
7194 /*  H M S G  --  Get confirmation, then print the given message  */
7195
7196 int
7197 hmsg(s) char *s; {
7198     int x;
7199     if ((x = cmcfm()) < 0) return(x);
7200     printf("\n%s\n\n",s);
7201     return(0);
7202 }
7203
7204 #ifdef NOHELP
7205
7206 int                                     /* Print an array of lines, */
7207 hmsga(s) char *s[]; {                   /* cheap version. */
7208     int i;
7209     if ((i = cmcfm()) < 0) return(i);
7210     printf("\n");                       /* Start off with a blank line */
7211     for (i = 0; *s[i]; i++) {           /* Print each line. */
7212         printf("%s\n",s[i]);
7213     }
7214     printf("\n");
7215     return(0);
7216 }
7217
7218 #else /* NOHELP not defined... */
7219
7220 int                                     /* Print an array of lines, */
7221 hmsga(s) char *s[]; {                   /* pausing at end of each screen. */
7222     extern int hmtopline;               /* (This should be a parameter...) */
7223     int x, y, i, j, k, n;
7224     if ((x = cmcfm()) < 0) return(x);
7225
7226 #ifdef CK_TTGWSIZ
7227 #ifdef OS2
7228     ttgcwsz();
7229 #else /* OS2 */
7230     /* Check whether window size changed */
7231     if (ttgwsiz() > 0) {
7232         if (tt_rows > 0 && tt_cols > 0) {
7233             cmd_rows = tt_rows;
7234             cmd_cols = tt_cols;
7235         }
7236     }
7237 #endif /* OS2 */
7238 #endif /* CK_TTGWSIZ */
7239
7240     printf("\n");                       /* Start off with a blank line */
7241     n = (hmtopline > 0) ? hmtopline : 1; /* Line counter */
7242     for (i = 0; *s[i]; i++) {
7243         printf("%s\n",s[i]);            /* Print a line. */
7244         y = (int)strlen(s[i]);
7245         k = 1;
7246         for (j = 0; j < y; j++)         /* See how many newlines were */
7247           if (s[i][j] == '\n') k++;     /* in the string... */
7248         n += k;
7249         if (n > (cmd_rows - 3) && *s[i+1]) /* After a screenful, give them */
7250           if (!askmore()) return(0);    /* a "more?" prompt. */
7251           else n = 0;
7252     }
7253     printf("\n");
7254     return(0);
7255 }
7256
7257 #ifndef NOFRILLS
7258 static char * supporttext[] = {
7259
7260 "Live technical support for Kermit software is no longer available",
7261 "from Columbia University, as it was from mid-1981 until mid-2011 when",
7262
7263 #ifdef OS2
7264
7265 "the Kermit Project was cancelled.  Beginning with version 3.0, Kermit 95",
7266
7267 #else
7268
7269 "the Kermit Project was cancelled.  Beginning with version 9.0, C-Kermit",
7270
7271 #endif  /* OS2 */
7272
7273 "is Open Source software.  The Kermit website is supposed remain open",
7274 "indefinitely at:",
7275 " ",
7276 "  http://kermit.columbia.edu/",
7277 " ",
7278
7279 #ifdef OS2
7280
7281 "The Kermit 95 page is here:",
7282 " ",
7283 "  http://kermit.columbia.edu/k95.html",
7284 " ",
7285 "The Kermit 95 manual is here:",
7286 " ",
7287 "  http://kermit.columbia.edu/k95manual/",
7288 " ",
7289 "The Kermit 95 Frequently Asked Questions page is here:",
7290 " ",
7291 "  http://kermit.columbia.edu/k95faq.html",
7292 " ",
7293 "and many other resources are listed on the Kermit 95 home page.",
7294 " ",
7295
7296 #else
7297
7298 "The C-Kermit home page is here:",
7299 " ",
7300 "  http://kermit.columbia.edu/ckermit.html",
7301 " ",
7302 "The documentation for C-Kermit is listed here:",
7303 " ",
7304 "  http://kermit.columbia.edu/ckermit.html#doc",
7305 " ",
7306 "The C-Kermit Frequently Asked Questions page is here:",
7307 " ",
7308 "  http://kermit.columbia.edu/ckfaq.html",
7309 " ",
7310 "and many other resources are listed on the C-Kermit home page.",
7311 " ",
7312
7313 #endif  /* OS2 */
7314
7315 "Time will tell what sort of development and support structures arise",
7316 "in the Open Source community.",
7317 ""
7318 };
7319
7320 /* Do the BUG command */
7321 int
7322 dobug() {
7323     return(hmsga(supporttext));
7324 }
7325 #endif /* NOFRILLS */
7326
7327 #ifndef NOXMIT
7328 static char *hsetxmit[] = {
7329 "Syntax: SET TRANSMIT parameter value",
7330 " ",
7331 "Controls the behavior of the TRANSMIT command (see HELP TRANSMIT):",
7332 " ",
7333 "SET TRANSMIT ECHO { ON, OFF }",
7334 "  Whether to echo text to your screen as it is being transmitted.",
7335 " ",
7336 "SET TRANSMIT EOF text",
7337 "  Text to send after end of file is reached, e.g. \\4 for Ctrl-D",
7338 " ",
7339 "SET TRANSMIT FILL number",
7340 "  ASCII value of a character to insert into blank lines, 0 for none.",
7341 "  Applies only to text mode.  0 by default.",
7342 " ",
7343 "SET TRANSMIT LINEFEED { ON, OFF }",
7344 "  Transmit Linefeed as well as Carriage Return (CR) at the end of each line.",
7345 "  Normally, only CR  is sent.",
7346 " ",
7347 "SET TRANSMIT LOCKING-SHIFT { ON, OFF }",
7348 "  Whether to use SO/SI for transmitting 8-bit data when PARITY is not NONE.",
7349 " ",
7350 "SET TRANSMIT PAUSE number",
7351 "  How many milliseconds to pause after transmitting each line (text mode),",
7352 "  or each character (binary mode).",
7353 " ",
7354 "SET TRANSMIT PROMPT number",
7355 "  ASCII value of character to look for from host before sending next line",
7356 "  when TRANSMITting in text mode; normally 10 (Linefeed).  0 means none;",
7357 "  don't wait for a prompt.",
7358 " ",
7359 "SET TRANSMIT TIMEOUT number",
7360 "  Number of seconds to wait for each character to echo when TRANSMIT ECHO",
7361 "  is ON or TRANSMIT PROMPT is not 0.  If 0 is specified, this means wait",
7362 "  indefinitely for each echo.",
7363 " ",
7364 "Synonym: SET XMIT.  SHOW TRANSMIT displays current settings.",
7365 "" };
7366 #endif /* NOXMIT */
7367
7368 static char *hsetbkg[] = {
7369 "Syntax: SET BACKGROUND { OFF, ON }",
7370 " ",
7371 "  SET BACKGROUND OFF forces prompts and messages to appear on your screen",
7372 "  even though Kermit thinks it is running in the background.",
7373 "" };
7374
7375 #ifdef DYNAMIC
7376 static char *hsetbuf[] = {
7377 "Syntax: SET BUFFERS n1 [ n2 ]",
7378 " ",
7379 "  Changes the overall amount of memory allocated for SEND and RECEIVE packet",
7380 "  buffers, respectively.  Bigger numbers let you have longer packets and",
7381 "  more window slots.  If n2 is omitted, the same value as n1 is used.",
7382 #ifdef BIGBUFOK
7383 " ",
7384 "  NOTE: This command is not needed in this version of Kermit, which is",
7385 "  already configured for maximum-size packet buffers.",
7386 #endif /* BIGBUFOK */
7387 "" };
7388 #endif /* DYNAMIC */
7389
7390 static char *hsetcmd[] = {
7391 "Syntax: SET COMMAND parameter value",
7392 " ",
7393
7394 #ifdef CK_AUTODL
7395 "SET COMMAND AUTODOWNLOAD { ON, OFF }",
7396 "  Enables/Disables automatic recognition of Kermit packets while in",
7397 "  command mode.  ON by default.",
7398 " ",
7399 #endif /* CK_AUTODL */
7400
7401 "SET COMMAND BYTESIZE { 7, 8 }",
7402 "  Informs Kermit of the bytesize of the communication path between itself",
7403 "  and your keyboard and screen.  8 is assumed.  SET COMMAND BYTE 7 only if",
7404 "  8-bit characters cannot pass.",
7405 " ",
7406
7407 #ifdef OS2
7408 "SET COMMAND COLOR <foreground-color> <background-color>",
7409 "  Lets you choose colors for Command screen.  Use ? in the color fields to",
7410 "  to get lists of available colors.",
7411 " ",
7412 "SET COMMAND CURSOR-POSITION <row> <column>",
7413 "  Moves the command-screen cursor to the given position (1-based).  This",
7414 "  command should be used in scripts instead of relying on ANSI.SYS escape",
7415 "  sequences.",
7416 " ",
7417 #endif /* OS2 */
7418
7419 "SET COMMAND ERROR { 0,1,2,3 }",
7420 "  Sets the verbosity level of command error messages; the higher the number,",
7421 "  the more verbose the message.  The default is 1.  Higher values are",
7422 "  useful only for debugging scripts.",
7423 " ",
7424
7425 #ifdef OS2
7426 #ifdef NT
7427 "SET COMMAND HEIGHT <number>",
7428 "  Changes the number of rows (lines) in your command screen, not",
7429 "  counting the status line.  Recommended values are 24, 42, and 49 (or 25,",
7430 "  43, and 50 if SET COMMAND STATUSLINE is OFF.)",
7431 #else
7432 "SET COMMAND HEIGHT <number>"
7433 "  Changes the number of rows (lines) in your command screen, not",
7434 "  counting the status line.  Windowed sessions can use any value from 8 to",
7435 "  101.  Fullscreen sessions are limited to 24, 42, 49, or 59.  Not all"
7436 "  heights are supported by all video adapters.",
7437 #endif /* NT */
7438 #else  /* OS2 */
7439 "SET COMMAND HEIGHT <number>",
7440 "  Informs Kermit of the number of rows in your command screen for the",
7441 "  purposes of More?-prompting.",
7442 #endif /* OS2 */
7443 " ",
7444 "SET COMMAND WIDTH <number>",
7445 "  Informs Kermit of the number of characters across your screen for",
7446 "  purposes of screen formatting.",
7447 " ",
7448 "SET COMMAND MORE-PROMPTING { ON, OFF }",
7449 "  ON (the default) enables More?-prompting when Kermit needs to display",
7450 "  text that does not fit vertically on your screen.  OFF allows the text to",
7451 "  scroll by without intervention.  If your command window has scroll bars,",
7452 "  you might prefer OFF.",
7453 " ",
7454
7455 #ifdef CK_RECALL
7456 "SET COMMAND RECALL-BUFFER-SIZE number",
7457 "  How big you want Kermit's command recall buffer to be.  By default, it",
7458 "  holds 10 commands.  You can make it any size you like, subject to memory",
7459 "  constraints of the computer.  A size of 0 disables command recall.",
7460 "  Whenever you give this command, previous command history is lost.",
7461 " ",
7462 #endif /* CK_RECALL */
7463
7464 "SET COMMAND QUOTING { ON, OFF }",
7465 "  Whether to treat backslash and question mark as special characters (ON),",
7466 "  or as ordinary data characters (OFF) in commands.  ON by default.",
7467 " ",
7468 #ifdef DOUBLEQUOTING
7469 "SET COMMAND DOUBLEQUOTING { ON, OFF }",
7470 "  Whether to allow doublequotes (\") to be used to enclose fields,",
7471 "  filenames, directory names, and macro arguments that might contain",
7472 "  spaces.  ON by default; use OFF to force compatibility with older",
7473 "  versions.",
7474 " ",
7475 #endif /* DOUBLEQUOTING */
7476
7477 #ifdef CK_RECALL
7478 "SET COMMAND RETRY { ON, OFF }",
7479 "  Whether to reprompt you with the correct but incomplete portion of a",
7480 "  syntactically incorrect command.  ON by default.",
7481 " ",
7482 #endif /* CK_RECALL */
7483
7484 #ifdef OS2
7485 "SET COMMAND SCROLLBACK <lines>",
7486 "  Sets size of virtual Command screen buffer to the given number of lines,",
7487 "  which includes the active Command screen.  The minimum is 256.  The max",
7488 "  is 2 million.  The default is 512.",
7489 " ",
7490 "SET COMMAND STATUSLINE { ON, OFF }",
7491 "  ON (default) enables the Kermit status line in the command screen.",
7492 "  OFF removes it, making the line available for use by the host.",
7493 " ",
7494 #endif /* OS2 */
7495
7496 "Use SHOW COMMAND to display these settings.",
7497 "" };
7498
7499 #ifndef NOLOCAL
7500 static char *hsetcar[] = {
7501 "Syntax: SET CARRIER-WATCH { AUTO, OFF, ON }",
7502 " ",
7503 "  Attempts to control treatment of carrier (the Data Carrier Detect signal)",
7504 "  on serial communication (SET LINE or SET PORT) devices.  ON means that",
7505 "  carrier is required at all times.  OFF means carrier is never required.",
7506 "  AUTO (the default) means carrier is required at all times except during",
7507 "  the DIAL command.  Correct operation of carrier-watch depends on the",
7508 "  capabilities of the underlying OS, drivers, devices, and cables.  If you",
7509 "  need to CONNECT to a serial device that is not asserting carrier, and",
7510 "  Kermit won't let you, use SET CARRIER-WATCH OFF.  Use SHOW COMMUNICATIONS",
7511 "  to display the CARRIER-WATCH setting.",
7512 "" };
7513 #endif /* NOLOCAL */
7514
7515 static char *hsetat[] = {
7516 "Syntax: SET ATTRIBUTES name ON or OFF",
7517 " ",
7518 "  Use this command to enable (ON) or disable (OFF) the transmission of",
7519 "  selected file attributes along with each file, and to handle or ignore",
7520 "  selected incoming file attributes, including:",
7521 " ",
7522 #ifndef NOCSETS
7523 "   CHARACTER-SET:  The transfer character set for text files",
7524 #endif /* NOCSETS */
7525 "   DATE:           The file's creation date",
7526 "   DISPOSITION:    Unusual things to do with the file, like MAIL or PRINT",
7527 "   LENGTH:         The file's length",
7528 "   PROTECTION:     The file's protection (permissions)",
7529 "   SYSTEM-ID:      Machine/Operating system of origin",
7530 "   TYPE:           The file's type (text or binary)",
7531 " ",
7532 "You can also specify ALL to select all of them.  Examples:",
7533 " ",
7534 "   SET ATTR DATE OFF",
7535 "   SET ATTR LENGTH ON",
7536 "   SET ATTR ALL OFF",
7537 " ",
7538 "Also see HELP SET SEND and HELP SET RECEIVE.",
7539 ""
7540 };
7541
7542 static char *hxytak[] = {
7543 "Syntax: SET TAKE parameter value",
7544 " ",
7545 "  Controls behavior of TAKE command:",
7546 " ",
7547 "SET TAKE ECHO { ON, OFF }",
7548 "  Tells whether commands read from a TAKE file should be displayed on the",
7549 "  screen (if so, each command is shown at the time it is read, and labeled",
7550 "  with a line number).",
7551 " ",
7552 "SET TAKE ERROR { ON, OFF }",
7553 "  Tells whether a TAKE command file should be automatically terminated when",
7554 "  a command fails.  This setting is local to the current command file, and",
7555 "  inherited by subordinate command files.",
7556 "" };
7557
7558 #ifndef NOLOCAL
7559 #ifdef OS2MOUSE
7560 static char *hxymouse[] = {
7561 "Syntax: SET MOUSE ACTIVATE { ON, OFF }",
7562 "  Enables or disables the mouse in Connect mode.  Default is ON",
7563 " ",
7564 "Syntax: SET MOUSE BUTTON <number> <key-modifier> <action> [ <text> ]",
7565 " where:",
7566 "  <number> is the mouse button number, 1, 2, or 3;",
7567 "  <key-modifier> denotes modifier keys held down during the mouse event:",
7568 "   ALT, ALT-SHIFT, CTRL, CTRL-ALT CTRL-ALT-SHIFT, CTRL-SHIFT, SHIFT, NONE;",
7569 "  <action> is the mouse action, CLICK, DRAG, or DOUBLE-CLICK.",
7570 " ",
7571 " The <text> has exactly the same properties as the <text> from the SET KEY",
7572 " command -- it can be a character, a string, one or more Kverbs, a macro",
7573 " invoked as a Kverb, or any combination of these.  Thus, anything that can",
7574 " be assigned to a key can also be assigned to the mouse -- and vice versa.",
7575 " If the <text> is omitted, the action will be ignored.  Examples:",
7576 " ",
7577 " SET MOUSE BUTTON 1 NONE DOUBLE \\KmouseCurPos",
7578 " SET MOU B 2 SHIFT CLICK help\\13",
7579 " ",
7580 " DRAG operations perform a \"mark mode\" selection of Text. You should",
7581 " assign only the following actions to drag operations:",
7582 " ",
7583 "  \\Kdump         - copy marked text to printer (or file)",
7584 "  \\Kmarkcopyclip - copy marked text to PM Clipboard",
7585 "  \\Kmarkcopyhost - copy marked text direct to Host",
7586 "  \\Kmousemark    - mark text, no copy operation performed",
7587 " ",
7588 " The following Kverb is only for use with the mouse:",
7589 " ",
7590 "  \\KmouseCurPos",
7591 " ",
7592 " which represents the mouse-directed terminal cursor feature.",
7593 " ",
7594 "Syntax: SET MOUSE CLEAR",
7595 " Restores all mouse events to their default definitions",
7596 "   Button 1 Ctrl-Click = Kverb: \\Kmouseurl",
7597 "   Button 1 Double-Click = Kverb: \\Kmousecurpos",
7598 "   Button 1 Drag = Kverb: \\Kmarkcopyclip",
7599 "   Button 1 Alt-Drag = Kverb: \\Kmarkcopyclip_noeol",
7600 "   Button 1 Ctrl-Drag = Kverb: \\Kmarkcopyhost",
7601 "   Button 1 Ctrl-Alt-Drag = Kverb: \\Kmarkcopyhost_noeol",
7602 "   Button 1 Ctrl-Shift-Drag = Kverb: \\Kdump",
7603 "   Button 2 Double-Click = Kverb: \\Kpaste",
7604 "   Button 2 Drag = Kverb: \\Kmarkcopyhost",
7605 "   Button 2 Alt-Drag = Kverb: \\Kmarkcopyhost_noeol     ",    
7606 "   Button 3 Double-Click = Kverb: \\Kpaste",
7607 ""};
7608 #endif /* OS2MOUSE */
7609
7610 static char *hxyterm[] = {
7611 "Syntax: SET TERMINAL parameter value",
7612 " ",
7613 #ifdef OS2
7614 "SET TERMINAL TYPE { ANSI, VT52, VT100, VT102, VT220, VT320, ... }",
7615 "  Selects type type of terminal to emulate.  Type SET TERMINAL TYPE ? to",
7616 "  see a complete list.",
7617 " ",
7618 "SET TERMINAL ANSWERBACK { OFF, ON }",
7619 "  Disables/enables the ENQ/Answerback sequence (\"K-95 version term-type\").",
7620 " ",
7621 "SET TERMINAL ANSWERBACK MESSAGE <extension>",
7622 "  Allows you to specify an extension to the default answerback message.",
7623 " ",
7624 #else
7625 "SET TERMINAL TYPE ...",
7626 "  This command is not available because this version of Kermit does not",
7627 "  include a terminal emulator.  Instead, it is a \"semitransparent pipe\"",
7628 "  (or a totally transparent one, if you configure it that way) to the",
7629 "  computer or service you have made a connection to.  Your console,",
7630 "  workstation window, or the terminal emulator or terminal from which you",
7631 "  are running Kermit provides the emulation.",
7632 " ",
7633 #endif /* OS2 */
7634
7635 #ifdef CK_APC
7636 "SET TERMINAL APC { ON, OFF, NO-INPUT, NO-INPUT-UNCHECKED, UNCHECKED }",
7637 #ifdef OS2
7638 "  Controls execution of Application Program Commands sent by the host while",
7639 "  K-95 is either in CONNECT mode or processing INPUT commands.  ON allows",
7640 "  execution of \"safe\" commands and disallows potentially dangerous ones",
7641 "  such as DELETE, RENAME, OUTPUT, and RUN.  OFF prevents execution of APCs.",
7642 "  UNCHECKED allows execution of all APCs.  OFF is the default.",
7643 #else /* OS2 */
7644 "  Controls execution of Application Program Commands sent by the host while",
7645 "  C-Kermit is in CONNECT mode.  ON allows execution of \"safe\" commands and",
7646 "  disallows potentially dangerous commands such as DELETE, RENAME, OUTPUT,",
7647 "  and RUN.  OFF prevents execution of APCs.  UNCHECKED allows execution of",
7648 "  all APCs.  OFF is the default.",
7649 #endif /* OS2 */
7650 " ",
7651 #endif /* CK_APC */
7652
7653 #ifdef OS2
7654 "SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }",
7655 "  Sets the mode for the arrow keys during VT terminal emulation.",
7656 " ",
7657 "SET TERMINAL ATTRIBUTE { BLINK, DIM, PROTECTED, REVERSE, UNDERLINE }",
7658 "  Determines how attributes are displayed by Kermit-95.",
7659 " ",
7660 "SET TERMINAL ATTRIBUTE { BLINK, DIM, REVERSE, UNDERLINE } { ON, OFF }",
7661 "  Determines whether real Blinking, Dim, Reverse, and Underline are used in",
7662 "  the terminal display.  When BLINK is turned OFF, reverse background",
7663 "  intensity is used.  When DIM is turned OFF, dim characters appear BOLD.",
7664 "  When REVERSE and UNDERLINE are OFF, the colors selected with SET",
7665 "  TERMINAL COLOR { REVERSE,UNDERLINE } are used instead.  This command",
7666 "  affects the entire current screen and terminal scrollback buffer.",
7667 " ",
7668 "SET TERMINAL ATTRIBUTE PROTECTED [ -",
7669 "   { BOLD, DIM, INVISIBLE, NORMAL, REVERSE, UNDERLINED } ]",
7670 "  Sets the attributes used to represent Protected text in Wyse and Televideo",
7671 "  terminal emulations.  Any combination of attributes may be used.  The",
7672 "  default is DIM.)",
7673 " ",
7674 #endif /* OS2 */
7675
7676 #ifdef OS2
7677 #ifdef CK_XYZ
7678 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7679 "  enables/disables automatic switching into file-transfer mode when a Kermit",
7680 "  or ZMODEM file transfer has been detected during CONNECT mode or while",
7681 "  an INPUT command is active.  Default is OFF.",
7682 #else
7683 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7684 "  enables/disables automatic switching into file-transfer mode when a Kermit",
7685 "  file transfer has been detected during CONNECT mode or while an INPUT",
7686 "  command is active.  Default is OFF.",
7687 #endif /* CK_XYZ */
7688
7689 " ",
7690 "  When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
7691 "  tells what to do if an error occurs during a file transfer or other",
7692 "  protocol operation initiated by the terminal emulator: STOP (the default)",
7693 "  means to remain in command mode so you can see what happened; CONTINUE",
7694 "  means to resume the CONNECT session (e.g. so a far-end script can continue",
7695 "  its work).",
7696 " ",
7697
7698 #ifdef CK_XYZ
7699 "SET TERM... AUTO... { KERMIT, ZMODEM } C0-CONFLICTS { IGNORED, PROCESSED }",
7700 "  Determines whether the active terminal emulator should process or ignore",
7701 "  C0 control characters which are also used for the specified file transfer",
7702 "  protocol.  Kermit by default uses ^A (SOH) and Zmodem uses ^X (CAN).",
7703 "  Default is PROCESSED.",
7704 " ",
7705 "SET TERM... AUTO... { KERMIT, ZMODEM } DETECTION-METHOD { PACKET, STRING }",
7706 "  Determines whether the specified file transfer protocol should be detected",
7707 "  by looking for valid packets or by identifying a specified text string.",
7708 "  Default is PACKET.",
7709 " ",
7710 "SET TERM... AUTO... { KERMIT, ZMODEM } STRING <text>",
7711 "  Lets you assign an autodownload detection string for use with the",
7712 "  specified file transfer protocol.",
7713 "  Default for Kermit is \"READY TO SEND...\", for Zmodem is \"rz\\{13}\".",
7714 " ",
7715 #else /* CK_XYZ */
7716 "SET TERM... AUTO... KERMIT C0-CONFLICTS { IGNORED, PROCESSED }",
7717 "  Determines whether the active terminal emulator should process or ignore",
7718 "  C0 control characters which are also used for the specified file transfer",
7719 "  protocol.  Kermit by default uses ^A <SOH>.  Default is PROCESSED.",
7720 " ",
7721 "SET TERM... AUTO... KERMIT DETECTION-METHOD { PACKET, STRING }",
7722 "  Determines whether the specified file transfer protocol should be detected",
7723 "  by looking for valid packets or by identifying a specified text string.",
7724 "  Default is PACKET.",
7725 " ",
7726 "SET TERM... AUTO... KERMIT STRING <text>",
7727 "  Lets you assign an autodownload detection string for use with the",
7728 "  specified file transfer protocol.  Default is \"READY TO SEND...\".",
7729 " ",
7730 #endif /* CK_XYZ */
7731 "SET TERMINAL AUTOPAGE { ON, OFF }",
7732 " ",
7733 "SET TERMINAL AUTOSCROLL { ON, OFF }",
7734 " ",
7735 #else /* OS2 */
7736 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7737 "  Enables/disables automatic switching into file-transfer mode when a valid",
7738 #ifdef CK_XYZ
7739 "  Kermit or ZMODEM packet of the appropriate type is received during CONNECT",
7740 "  mode.  Default is OFF.",
7741 #else
7742 "  Kermit packet of the appropriate type is received during CONNECT mode.",
7743 "  Default is OFF.",
7744 #endif /* CK_XYZ */
7745
7746 " ",
7747 "  When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
7748 "  tells what to do if an error occurs during a file transfer or other",
7749 "  protocol operation initiated by the terminal emulator: STOP (the default)",
7750 "  means to remain in command mode so you can see what happened; CONTINUE",
7751 "  means to resume the CONNECT session (e.g. so a far-end script can continue",
7752 "  its work).",
7753 " ",
7754
7755 #endif /* OS2 */
7756
7757 #ifdef OS2
7758 "SET TERMINAL BELL { AUDIBLE, VISIBLE, NONE }",
7759 "  Specifies how Control-G (bell) characters are handled.  AUDIBLE means",
7760 "  a beep is sounded; VISIBLE means the screen is flashed momentarily.",
7761 " ",
7762 "  (This command has been superseded by SET BELL.)",
7763 " ",
7764 #endif /* OS2 */
7765
7766 "SET TERMINAL BYTESIZE { 7, 8 }",
7767 "  Use 7- or 8-bit characters between Kermit and the remote computer during",
7768 "  terminal sessions.  The default is 8.",
7769 " ",
7770
7771 #ifndef NOCSETS
7772 #ifdef OS2
7773 "SET TERMINAL CHARACTER-SET <remote-cs>",
7774 "  Specifies the character set used by the remote host, <remote-cs>.",
7775 "  Equivalent to SET TERM REMOTE-CHARACTER-SET <remote-cs> ALL.  For more",
7776 "  control over the details, use SET TERM REMOTE-CHARACTER-SET and (in",
7777 "  non-GUI K95 versions) SET TERM LOCAL-CHARACTER-SET; these are explained",
7778 "  below.  The default TERMINAL CHARACTER-SET is LATIN1 (ISO 8859-1).",
7779 #else  /* not OS2 */
7780 "SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ]",
7781 "  Specifies the character set used by the remote host, <remote-cs>, and the",
7782 "  character set used by C-Kermit locally, <local-cs>.  If you don't specify",
7783 "  the local character set, the current FILE CHARACTER-SET is used.  When",
7784 "  you specify two different character sets, C-Kermit translates between them",
7785 "  during CONNECT.  By default, both character sets are TRANSPARENT, and",
7786 "  no translation is done.",
7787 #endif /* OS2 */
7788 " ",
7789 #endif /* NOCSETS */
7790
7791 #ifdef OS2
7792
7793 "SET TERMINAL CODE-PAGE <number>",
7794 "  Lets you change the PC code page.  Only works for code pages that are",
7795 "  successfully prepared in CONFIG.SYS.  Use SHOW TERMINAL to list the",
7796 "  current code page and the available code pages.",
7797 #ifdef OS2ONLY
7798 " ",
7799 "  Also see SET TERMINAL FONT if the desired code page in not available in",
7800 "  your version of OS/2.",
7801 #endif /* OS2ONLY */
7802 " ",
7803
7804 #ifndef NT
7805 "SET TERMINAL COLOR BORDER <foreground>",
7806 #endif /* NT */
7807 "SET TERMINAL COLOR <screenpart> <foreground> <background>",
7808 " Sets the colors of the terminal emulation screen.",
7809 " <screenpart> may be any of the following:",
7810 "  DEBUG, HELP-TEXT, REVERSE, SELECTION, STATUS-LINE, TERMINAL-SCREEN, or",
7811 "  UNDERLINED-TEXT.",
7812 " <foreground> and <background> may be any of:",
7813 "  BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LGRAY, DGRAY, LBLUE,",
7814 "  LGREEN, LCYAN, LRED, LMAGENTA, YELLOW or WHITE.",
7815 " The L prefix for the color names means Light.",
7816 " ",
7817
7818 "SET TERMINAL COLOR ERASE { CURRENT-COLOR, DEFAULT-COLOR }",
7819 "  Determines whether the current color as set by the host or the default",
7820 "  color as set by the user (SET TERMINAL COLOR TERMINAL) is used to clear",
7821 "  the screen when erase commands are received from the host.",
7822 " ",
7823
7824 "SET TERMINAL COLOR RESET-ON-ESC[0m { CURRENT-COLOR, DEFAULT-COLOR }",
7825 "  Determines whether the current color or the default color is used after",
7826 "  <ESC>[0m (\"reset attributes\") command sequence is received from the",
7827 "  host.",
7828 " ",
7829
7830 "SET TERMINAL CONTROLS { 7, 8 }",
7831 "  Determines whether VT220/320 or Wyse 370 function keys, arrow keys, etc,",
7832 "  that generate ANSI-format escape sequences should send 8-bit control",
7833 "  characters or 7-bit escape sequences.",
7834 " ",
7835 #endif /* OS2 */
7836
7837 "SET TERMINAL CR-DISPLAY { CRLF, NORMAL }",
7838 "  Specifies how incoming carriage return characters are to be displayed",
7839 "  on your screen.",
7840 " ",
7841
7842 #ifdef OS2
7843 #ifdef KUI
7844 "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF, NOBLINK}",
7845 "  Selects the cursor style and visibility for the terminal screen.",
7846 #else
7847 "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF}",
7848 "  Selects the cursor style and visibility for the terminal screen.",
7849 #endif /* KUI */
7850 " ",
7851 #endif /* OS2 */
7852
7853 "SET TERMINAL DEBUG { ON, OFF }",
7854 "  Turns terminal session debugging on and off.  When ON, incoming control",
7855 "  characters are displayed symbolically, rather than be taken as formatting",
7856 "  commands.  SET TERMINAL DEBUG ON implies SET TELNET DEBUG ON.",
7857 " ",
7858 #ifdef OS2
7859 "SET TERMINAL DG-UNIX-MODE { ON, OFF }",
7860 "  Specifies whether the Data General emulations should accept control",
7861 "  sequences in Unix compatible format or in native DG format.  The",
7862 "  default is OFF, DG format.",
7863 " ",
7864 #endif /* OS2 */
7865
7866 "SET TERMINAL ECHO { LOCAL, REMOTE }",
7867 "  Specifies which side does the echoing during terminal connection.",
7868 " ",
7869
7870 "SET TERMINAL ESCAPE-CHARACTER { ENABLED, DISABLED }",
7871 "  Turns on/off the ability to escape back from CONNECT mode using the SET",
7872 #ifdef OS2
7873 "  ESCAPE character.  If you disable it you can still get back using Alt-key",
7874 "  combinations as shown in the status line.  Also see HELP SET ESCAPE.",
7875 #else
7876 "  ESCAPE character.  If you disable it, Kermit returns to its prompt only",
7877 "  when the connection is closed by the other end.  USE WITH EXTREME CAUTION.",
7878 "  Also see HELP SET ESCAPE.",
7879 #endif /* OS2 */
7880 " ",
7881
7882 #ifdef OS2
7883 #ifdef KUI
7884 "SET TERMINAL FONT <facename> <height>",
7885 "  Specifies the font to be used in the Kermit 95 window.  The font is",
7886 "  determined by the choice of a facename and a height measured in Points.",
7887 "  The available facenames are those installed in the Font Control Panel.",
7888 " ",
7889 #else /* KUI */
7890 #ifdef OS2ONLY
7891 "SET TERMINAL FONT { CP437, CP850, CP852, CP862, CP866, DEFAULT }",
7892 "  CP437 - Original PC code page",
7893 "  CP850 - \"Multilingual\" (West Europe) code page",
7894 "  CP852 - East Europe Roman Alphabet code page (for Czech, Polish, etc)",
7895 "  CP862 - Hebrew code page",
7896 "  CP866 - Cyrillic (Russian, Belorussian, and Ukrainian) code page",
7897 " ",
7898 "  Loads a soft into the video adapter for use during terminal emulation.",
7899 "  Use this command when your OS/2 system does not have the desired code.",
7900 "  page.  Can be used only in full-screen sessions.  Also see SET TERMINAL",
7901 "  CODE-PAGE and SET TERMINAL REMOTE-CHARACTER-SET.",
7902 " ",
7903 #endif /* OS2ONLY */
7904 #endif /* KUI */
7905
7906 #ifdef NT
7907 "SET TERMINAL HEIGHT <number>",
7908 "  Changes the number of rows (lines) to use during terminal emulation, not",
7909 "  counting the status line.  Recommended values are 24, 42, and 49 (or 25,",
7910 "  43, and 50 if SET TERMINAL STATUSLINE is OFF.)",
7911 #else
7912 "SET TERMINAL HEIGHT <number>"
7913 "  Changes the number of rows (lines) to use during terminal emulation, not",
7914 "  counting the status line.  Windowed sessions can use any value from 8 to",
7915 "  101.  Fullscreen sessions are limited to 24, 42, 49, or 59.  Not all"
7916 "  heights are supported by all video adapters.",
7917 #endif /* NT */
7918 #else  /* OS2 */
7919 "SET TERMINAL HEIGHT <number>",
7920 "  Tells C-Kermit how many rows (lines) are on your CONNECT-mode screen.",
7921 #endif /* OS2 */
7922 " ",
7923
7924 #ifdef CKTIDLE
7925 "SET TERMINAL IDLE-TIMEOUT <number>",
7926 "  Sets the limit on idle time in CONNECT mode to the given number of",
7927 "  seconds.  0 (the default) means no limit.",
7928 " ",
7929 "SET TERMINAL IDLE-ACTION { EXIT, HANGUP, OUTPUT [ text ], RETURN }",
7930 "  Specifies the action to be taken when a CONNECT session is idle for the",
7931 "  number of seconds given by SET TERMINAL IDLE-TIMEOUT.  The default action",
7932 "  is to RETURN to command mode.  EXIT exits from Kermit; HANGUP hangs up the",
7933 "  connection, and OUTPUT sends the given text to the host without leaving",
7934 "  CONNECT mode; if no text is given a NUL (0) character is sent.",
7935 #ifdef TNCODE
7936 " ",
7937 "SET TERMINAL IDLE-ACTION { TELNET-NOP, TELNET-AYT }",
7938 "  For TELNET connections only: Sends the indicated Telnet protocol message:",
7939 "  No Operation (NOP) or \"Are You There?\" (AYT).",
7940 #endif /* TNCODE */
7941 " ",
7942 #endif /* CKTIDLE */
7943
7944 #ifdef OS2
7945
7946 "SET TERMINAL KDB-FOLLOWS-GL/GR { ON, OFF }",
7947 " Specifies whether or not the keyboard character set should follow the",
7948 "  active GL and GR character sets.  This feature is OFF by default and",
7949 "  should not be used unless it is specificly required by the host",
7950 "  application.",
7951 " ",
7952
7953 "SET TERMINAL KEY <mode> /LITERAL <keycode> <text>",
7954 "SET TERMINAL KEY <mode> DEFAULT",
7955 "SET TERMINAL KEY <mode> CLEAR",
7956 "  Configures the key whose <keycode> is given to send the given text when",
7957 "  pressed while <mode> is active.  <mode> may be any of the valid terminal",
7958 "  types or the special modes \"EMACS\", \"HEBREW\" or \"RUSSIAN\".  DEFAULT",
7959 "  restores all default key mappings for the specified mode.  CLEAR erases",
7960 "  all the key mappings.  If there is no text, the default key binding is",
7961 #ifndef NOCSETS
7962 "  restored for the key k.  SET TERMINAL KEY mappings take place before",
7963 "  terminal character-set translation.  SET KEY mappings take precedence over",
7964 "  SET TERMINAL KEY <terminal type> settings.",
7965 #else
7966 "  restored for the key.  SET KEY mappings take precedence over SET TERMINAL",
7967 "  KEY <terminal type> settings.",
7968 #endif /* NOCSETS */
7969 "  The /LITERAL switch may be used to instruct Kermit to ignore character-set",
7970 "  translations when sending this definition to the host.",
7971 " ",
7972 "  The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
7973 "  keypad, function, or editing keys, etc.  For a list of available keyboard",
7974 "  verbs, type SHOW KVERBS.",
7975 " ",
7976 "  To find out the keycode and mapping for a particular key, use the SHOW",
7977 "  KEY command.  Use the SAVE KEYS command to save all settings to a file.",
7978 " ",
7979 "SET TERMINAL KEYBOARD-MODE { NORMAL, EMACS, RUSSIAN, HEBREW }",
7980 "  Select a special keyboard mode for use in the terminal screen.",
7981 " ",
7982
7983 "SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC }",
7984 "  Specifies the \"mode\" of the numeric keypad for VT terminal emulation.",
7985 "  Use this command in case the host or application wants the keypad to be",
7986 "  in a different mode than it's in, but did not send the escape sequence",
7987 "  to put it in the needed mode.",
7988 " ",
7989
7990 #endif  /* OS2 */
7991
7992 "SET TERMINAL LF-DISPLAY { CRLF, NORMAL }",
7993 "  Specifies how incoming linefeed characters are to be displayed",
7994 "  on your screen.",
7995 " ",
7996
7997 #ifdef OS2
7998
7999 #ifdef KUI
8000 "SET TERMINAL LINE-SPACING <float>",
8001 "  Specifies the line spacing used when displaying text.  The default is 1.0.",
8002 "  Valid values range from 1.0 to 3.0 inclusive.",
8003 " ",
8004 #endif /* KUI */
8005 #endif /* OS2 */
8006
8007 #ifndef NOCSETS
8008 #ifdef OS2
8009 "SET TERMINAL LOCAL-CHARACTER-SET <local-cs>",
8010 "  Specifies the character set used by K-95 locally.  If you don't specify",
8011 #ifdef OS2ONLY
8012 "  the local character-set, the current TERMINAL FONT is used if you have",
8013 "  given a SET TERMINAL FONT command; otherwise the current codepage is used.",
8014 #else
8015 "  the local character-set, the current code page is used.",
8016 #endif /* OS2ONLY */
8017 " ",
8018 "  When the local and remote character sets differ, Kermit translates between",
8019 "  them during CONNECT.  By default, the remote character set is Latin1 and",
8020 "  the local one is your current code page.",
8021 #ifdef NT
8022 " ",
8023 "  In Windows NT, Unicode is used as the local character-set regardless of",
8024 "  this setting.",
8025 #endif /* NT */
8026 " ",
8027 "See also SET TERMINAL REMOTE-CHARACTER-SET",
8028 " ",
8029 #endif /* OS2 */
8030 #endif /* NOCSETS */
8031
8032 #ifdef OS2
8033 "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
8034 "  Tells whether to send Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch",
8035 "  between 7-bit and 8-bit characters sent during terminal emulation over",
8036 "  7-bit connections.  OFF by default.",
8037 #else
8038 "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
8039 "  Tells Kermit whether to use Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to",
8040 "  switch between 7-bit and 8-bit characters during CONNECT.  OFF by default.",
8041 #endif /* OS2 */
8042 " ",
8043
8044 #ifdef OS2
8045 "SET TERMINAL MARGIN-BELL { ON [column], OFF }",
8046 "  Determines whether the margin-bell is activated and what column it should",
8047 "  ring at.  OFF by default.",
8048 " ",
8049 #endif /* OS2 */
8050
8051 "SET TERMINAL NEWLINE-MODE { OFF, ON }",
8052 "  Tells whether to send CRLF (Carriage Return and Line Feed) when you type",
8053 "  CR (press the Return or Enter key) in CONNECT mode.",
8054 " ",
8055
8056 #ifdef OS2
8057 "SET TERMINAL OUTPUT-PACING <milliseconds>",
8058 "  Tells how long to pause between sending each character to the host during",
8059 "  CONNECT mode.  Normally not needed but sometimes required to work around",
8060 "  TRANSMISSION BLOCKED conditions when pasting into the terminal window.",
8061 " ",
8062
8063 #ifdef PCTERM
8064 "SET TERMINAL PCTERM { ON, OFF }",
8065 "  Activates or deactivates the PCTERM terminal emulation keyboard mode.",
8066 "  When PCTERM is ON all keystrokes in the terminal screen are sent to the",
8067 "  host as make/break (down/up) codes instead of as characters from the",
8068 "  REMOTE-CHARACTER-SET, and all keyboard mappings, including Kverbs and the",
8069 "  escape character are disabled.  To turn off PCTERM keyboard mode while in",
8070 "  CONNECT mode press Control-CapsLock.  PCTERM is OFF by default.",
8071 " ",
8072 #endif /* PCTERM */
8073 #endif /* OS2 */
8074
8075 #ifdef OS2
8076 "SET TERMINAL PRINT { AUTO, COPY, OFF, USER }",
8077 "  Allows selective control of various types of printing from the Terminal",
8078 "  session.  AUTO prints a line of text from the terminal screen whenever",
8079 "  the cursor is moved off the line.  COPY prints every byte received as",
8080 "  it is received without interpretation.  USER prints every byte after",
8081 "  interpretation by the terminal emulator translates character-sets and",
8082 "  construct escape sequences, ...  The default is OFF.",
8083 " ",
8084 #else
8085 #ifdef XPRINT
8086 "SET TERMINAL PRINT { ON, OFF }",
8087 "  Enables and disables host-initiated transparent printing in CONNECT mode.",
8088 " ",
8089 #endif /* XPRINT */
8090 #endif /* OS2 */
8091
8092 #ifdef OS2
8093 #ifndef NOCSETS
8094 "SET TERMINAL REMOTE-CHARACTER-SET <remote-cs> [ { G0,G1,G2,G3 }... ]",
8095 "  Specifies the character set used by the remote host, <remote-cs>.",
8096 "  When the local and remote character sets differ, Kermit translates",
8097 "  between them during CONNECT.  By default, the remote character set is",
8098 "  Latin1 and the local one is your current code page.  Optionally, you can",
8099 "  also designate the character set to the G0..G3 graphic tables.",
8100 " ",
8101 #endif /* NOCSETS */
8102 #endif /* OS2 */
8103
8104 #ifdef OS2
8105 "SET TERMINAL ROLL-MODE { INSERT, OVERWRITE, KEYSTROKES [ option ] }",
8106 "  Tells whether new data when received from the host is entered into the",
8107 "  scrollback buffer at the current rollback position (OVERWRITE) or at the",
8108 "  end of the buffer (INSERT).  The default is INSERT.  Typing is allowed",
8109 "  during rollbacks in either mode, according to SET TERM ROLL KEYSTROKES:",
8110 "  SEND (the default) means to process keystrokes normally; IGNORE means to",
8111 "  ignore them when the screen is scrolled back; RESTORE-AND-SEND is like",
8112 "  SEND but restores the screen to its active position first.",
8113 " ",
8114
8115 "SET TERMINAL SCREEN-MODE { NORMAL, REVERSE }",
8116 "  When set to REVERSE the foreground and background colors are swapped as",
8117 "  well as the application of the foreground and background intensity bits.",
8118 "  The default is NORMAL.",
8119 " ",
8120
8121 "SET TERMINAL SCREEN-OPTIMIZE { ON, OFF }",
8122 "  When set to ON, the default, Kermit only paints the screen with characters",
8123 "  that have changed since the last screen paint.  When OFF, the screen is",
8124 "  completely repainted each time there is a change.",
8125 " ",
8126
8127 "SET TERMINAL SCREEN-UPDATE { FAST, SMOOTH } [ <milliseconds> ]",
8128 "  Chooses the mechanism used for screen updating and the update frequency.",
8129 "  Defaults are FAST scrolling with updates every 100 milliseconds.",
8130 " ",
8131
8132 "SET TERMINAL SCROLLBACK <lines>",
8133 "  Sets size of CONNECT virtual screen buffer.  <lines> includes the active",
8134 "  terminal screen.  The minimum is 256.  The maximum is 2 million.  The",
8135 "  default is 2000.",
8136 " ",
8137
8138 "SET TERMINAL SEND-DATA { ON, OFF }",
8139 "  Determines whether ASCII emulations such as WYSE 30,50,60 or TVI 910+,925,",
8140 "  950 may send their screen contents to the host upon request.  Allowing the",
8141 "  screen to be read by the host is a significant security risk.  The default",
8142 "  is OFF and should only be changed after a security evaluation of host",
8143 "  environment.",
8144 " ",
8145
8146 "SET TERMINAL SEND-END-OF-BLOCK { CRLF_ETX, US_CR }",
8147 "  Determines which set of characters should be used as end of line and end",
8148 "  of transmission indicators when sending screen data to the host",
8149 " ",
8150
8151 "SET TERMINAL SGR-COLORS { ON, OFF }",
8152 "  ON (default) means allow host control of colors; OFF means ignore host",
8153 "  escape sequences to set color.",
8154 " ",
8155
8156 "SET TERMINAL SNI-CH.CODE { ON, OFF }",
8157 "  This command controls the state of the CH.CODE key.  It is the equivalent",
8158 "  to the SNI_CH_CODE Keyboard verb.  The SNI terminal uses CH.CODE to",
8159 "  easily switch between the National Language character set and U.S. ASCII.",
8160 "  The default is ON which means to display characters as U.S. ASCII.  When",
8161 "  OFF the lanuage specified by SET TERMINAL SNI-LANUAGE is used to display",
8162 "  characters when 7-bit character sets are in use.",
8163 " ",
8164 "SET TERMINAL SNI-FIRMWARE-VERSIONS <kbd-version> <terminal-version>",
8165 "  Specifies the Firmware Version number that should be reported to the host",
8166 "  when the terminal is queried.  The default is 920031 for the keyboard",
8167 "  and 830851 for the terminal.",
8168 " ",
8169 "SET TERMINAL SNI-LANGUAGE <national-language>",
8170 "  An alias for SET TERMINAL VT-LANUAGE, this command specifies the national",
8171 "  language character-set that should be used when the NRC mode is activated",
8172 "  for VT emulations or when CH.CODE is OFF for SNI emulations.  The default",
8173 "  language for SET TERMINAL TYPE SNI-97801 is \"German\".",
8174 " ",
8175 "SET TERMINAL SNI-PAGEMODE { ON, OFF }",
8176 "  Determines whether or not page mode is active.  OFF by default.",
8177 " ",
8178 "SET TERMINAL SNI-SCROLLMODE { ON, OFF }",
8179 "  Determines whether or not scroll mode is active.  OFF by default.",
8180 " ",
8181 "SET TERMINAL STATUSLINE { ON, OFF }",
8182 "  ON (default) enables the Kermit status line in the terminal screen.",
8183 "  OFF removes it, making the line available for use by the host.",
8184 " ",
8185
8186 "SET TERMINAL TRANSMIT-TIMEOUT <seconds>",
8187 "  Specifies the maximum amount of time K-95 waits before returning to the",
8188 "  prompt if your keystrokes can't be transmitted for some reason, such as a",
8189 "  flow-control deadlock.",
8190 " ",
8191 #endif /* OS2 */
8192
8193 #ifdef CK_TRIGGER
8194 "SET TERMINAL TRIGGER <string>",
8195 "  Specifies a string that, when detected during any subsequent CONNECT",
8196 "  session, is to cause automatic return to command mode.  Give this command",
8197 "  without a string to cancel the current trigger.  See HELP CONNECT for",
8198 "  additional information.",
8199 " ",
8200 #endif /* CK_TRIGGER */
8201
8202 #ifdef OS2
8203 "SET TERMINAL URL-HIGHLIGHT { ON <attribute>, OFF }",
8204 "  Specifies whether K-95 should highlight URLs and which screen attribute",
8205 "  should be used.  The screen attributes can be one of NORMAL, BLINK, BOLD,",
8206 "  DIM, INVISIBLE, REVERSE, or UNDERLINE.  The default is ON using the",
8207 "  BOLD screen attribute.",
8208 " ",
8209 "SET TERMINAL VIDEO-CHANGE { DISABLED, ENABLED }",
8210 "  Specifies whether K-95 should change video modes automatically in response",
8211 #ifdef NT
8212 "  to escape sequences from the other computer.  ENABLED by default (except",
8213 "  on Windows 95).",
8214 #else /* NT */
8215 "  to escape sequences from the other computer.  ENABLED by default.",
8216 #endif /* NT */
8217 " ",
8218
8219 "SET TERMINAL VT-LANGUAGE <language>",
8220 "  Specifies the National Replacement Character Set (NRC) to be used when",
8221 "  NRC mode is activated.  The default is \"North American\".",
8222 " ",
8223 "SET TERMINAL VT-NRC-MODE { ON, OFF }",
8224 "  OFF (default) chooses VT multinational Character Set mode.  OFF chooses",
8225 "  VT National Replacement Character-set mode.  The NRC is selected with",
8226 "  SET TERMINAL VT-LANGUAGE",
8227 " ",
8228
8229 #ifdef NT
8230 "SET TERMINAL WIDTH <cols>",
8231 "  Tells the number of columns in the terminal screen.",
8232 " ",
8233 "  The default is 80.  You can also use 132.  Other widths can be chosen but",
8234 "  are usually not supported by host software.",
8235 " ",
8236 #else
8237 "SET TERMINAL WIDTH <cols>",
8238 "  Tells how many columns define the terminal size.",
8239 " ",
8240 "Default is 80.  In Windowed OS/2 2.x sessions, this value may not be changed",
8241 "In Windowed OS/2 WARP 3.x sessions, this value may range from 20 to 255.",
8242 "In Full screen sessions, values of 40, 80, and 132 are valid.  Not all",
8243 "combinations of height and width are supported on all adapters.",
8244 " ",
8245 #endif /* NT */
8246 "SET TERMINAL WRAP { OFF, ON }",
8247 "  Tells whether the terminal emulator should automatically wrap long lines",
8248 "  on your screen.",
8249 " ",
8250 #else
8251
8252 "SET TERMINAL WIDTH <number>",
8253 " \
8254 Tells Kermit how many columns (characters) are on your CONNECT-mode screen.",
8255 " ",
8256 #endif /* OS2 */
8257 "Type SHOW TERMINAL to see current terminal settings.",
8258 "" };
8259 #endif /* NOLOCAL */
8260
8261 #ifdef NETCONN
8262 static char *hxyhost[] = {
8263 "SET HOST [ switches ] hostname-or-address [ service ] [ protocol-switch ]",
8264 "  Establishes a connection to the specified network host on the currently",
8265 "  selected network type.  For TCP/IP connections, the default service is",
8266 "  TELNET; specify a different TCP port number or service name to choose a",
8267 "  different service.  The first set of switches can be:",
8268 " ",
8269 " /NETWORK-TYPE:name",
8270 "   Makes the connection on the given type of network.  Equivalent to SET",
8271 "   NETWORK TYPE name prior to SET HOST, except that the selected network",
8272 "   type is used only for this connection.  Type \"set host /net:?\" to see",
8273 #ifdef NETCMD
8274 "   a list.  /NETWORK-TYPE:COMMAND means to make the connection through the",
8275 "   given system command, such as \"rlogin\" or \"cu\".",
8276 #else
8277 "   a list.",
8278 #endif /* NETCMD */
8279 " ",
8280 " /CONNECT",
8281 "   \
8282 Enter CONNECT (terminal) mode automatically if the connection is successful.",
8283 " ",
8284 " /SERVER",
8285 "   Enter server mode automatically if the connection is successful.",
8286 " ",
8287 " /USERID:[<name>]",
8288 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
8289 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
8290 "   Telnet negotiations; if this switch is given but the string is omitted,",
8291 "   no user ID is sent to the host.  If this switch is not given, your",
8292 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
8293 "   host it is a request to login as the specified user.",
8294 " ",
8295 #ifdef CK_AUTHENTICATION
8296 " /PASSWORD:[<string>]",
8297 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
8298 "   it is treated as the password to be used (if required) by any Telnet",
8299 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
8300 "   Password, or X.509 certificate private key decryption.)  If no password",
8301 "   switch is specified a prompt is issued to request the password if one",
8302 "   is required for the negotiated authentication method.",
8303 " ",
8304 #endif /* CK_AUTHENTICATION */
8305 "The protocol-switches can be:",
8306 " ",
8307 " /NO-TELNET-INIT",
8308 "   Do not send initial Telnet negotiations even if this is a Telnet port.",
8309 " ",
8310 " /RAW-SOCKET",
8311 "   This is a connection to a raw TCP socket.",
8312 " ",
8313 #ifdef RLOGCODE
8314 " /RLOGIN",
8315 "   Use Rlogin protocol even if this is not an Rlogin port.",
8316 " ",
8317 #endif /* RLOGCODE */
8318 " /TELNET",
8319 "   Send initial Telnet negotiations even if this is not a Telnet port.",
8320 " ",
8321 #ifdef CK_KERBEROS
8322 #ifdef RLOGCODE
8323 #ifdef KRB4
8324 " /K4LOGIN",
8325 "   Use Kerberos IV klogin protocol even if this is not a klogin port.",
8326 " ",
8327 #ifdef CK_ENCRYPTION
8328 " /EK4LOGIN",
8329 "   Use Kerberos IV Encrypted login protocol even if this is not an eklogin",
8330 "   port.",
8331 " ",
8332 #endif /* CK_ENCRYPTION */
8333 #endif /* KRB4 */
8334 #ifdef KRB5
8335 " /K5LOGIN",
8336 "   Use Kerberos V klogin protocol even if this is not a klogin port.",
8337 " ",
8338 #ifdef CK_ENCRYPTION
8339 " /EK5LOGIN",
8340 "   Use Kerberos V Encrypted login protocol even if this is not an eklogin",
8341 "   port.",
8342 " ",
8343 #endif /* CK_ENCRYPTION */
8344 #endif /* KRB5 */
8345 #endif /* RLOGCODE */
8346 #endif /* CK_KERBEROS */
8347 #ifdef CK_SSL
8348 " /SSL",
8349 "   Perform SSL negotiations.",
8350 " ",
8351 " /SSL-TELNET",
8352 "   Perform SSL negotiations and if successful start Telnet negotiations.",
8353 " ",
8354 " /TLS",
8355 "   Perform TLS negotiations.",
8356 " ",
8357 " /TLS-TELNET",
8358 "   Perform TLS negotiations and if successful start Telnet negotiations.",
8359 " ",
8360 #endif /* CK_SSL */
8361 "Examples:",
8362 "  SET HOST kermit.columbia.edu",
8363 "  SET HOST /CONNECT kermit.columbia.edu",
8364 "  SET HOST * 1649",
8365 "  SET HOST /SERVER * 1649",
8366 "  SET HOST 128.59.39.2",
8367 "  SET HOST madlab.sprl.umich.edu 3000",
8368 "  SET HOST xyzcorp.com 2000 /RAW-SOCKET",
8369 #ifdef SSHBUILTIN
8370 "  SET HOST /NET:SSH kermit.columbia.edu /x11-forwarding:on", 
8371 #endif /* SSHBUILTIN */
8372 #ifdef NETCMD
8373 "  SET HOST /CONNECT /COMMAND rlogin xyzcorp.com",
8374 #endif /* NETCMD */
8375 " ",
8376 #ifdef SUPERLAT
8377 "Notes:",
8378 " ",
8379 " . The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
8380 "   SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
8381 " ",
8382 " . For SUPERLAT connections, the hostname-or-address may be either a service",
8383 "   name, or a node/port combination, as required by your LAT host.",
8384 #else
8385 "The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
8386 "SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
8387 #endif /* SUPERLAT */
8388 " ",
8389 "Also see SET NETWORK, TELNET, SET TELNET.",
8390 "" };
8391
8392 static char *hmxyauth[] = {
8393 "Synatx: SET AUTHENTICATION <auth_type> <parameter> <value>",
8394 "  Sets defaults for the AUTHENTICATE command:",
8395 " ",
8396 #ifdef CK_KERBEROS
8397 "SET AUTHENTICATION KERBEROS5 ADDRESSES {list of ip-addresses}",
8398 "  Specifies a list of IP addresses that should be placed in the Ticket",
8399 "  Getting Ticket in addition to the local machine addresses.",
8400 " ",
8401 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTODESTROY",
8402 "  { ON-CLOSE, ON-EXIT, NEVER }",
8403 "  When ON, Kermit will destroy all credentials in the default",
8404 "  credentials cache upon Kermit termination.  Default is NEVER.",
8405 " ",
8406 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTOGET { ON, OFF }",
8407 "  When ON, if the host offers Kerberos 4 or Kerberos 5 authentication",
8408 "  and Kermit is configured to use that authentication method and there",
8409 "  is no TGT, Kermit will automatically attempt to retrieve one by",
8410 "  prompting for the password (and principal if needed.)  Default is ON.",
8411 " ",
8412 "SET AUTHENTICATION KERBEROS5 CREDENTIALS-CACHE <filename>",
8413 "  Allows an alternative credentials cache to be specified.  This is useful",
8414 "  when you need to maintain two or more sets of credentials for different",
8415 "  realms or roles.  The default is specified by the environment variable",
8416 "  KRB5CCNAME or as reported by the Kerberos 5 library.",
8417 " ",
8418 "SET AUTHENTICATION KERBEROS5 FORWARDABLE { ON, OFF }",
8419 "  When ON, specifies that Kerberos 5 credentials should be forwardable to",
8420 "  the host.  If SET TELNET AUTHENTICATION FORWARDING is ON, forwardable",
8421 "  credentials are sent to the host.  The default is OFF.",
8422 " ",
8423 "SET AUTHENTICATION KERBEROS5 GET-K4-TGT { ON, OFF }",
8424 "  When ON, specifies that Kerberos 4 credentials should be requested each",
8425 "  time Kerberos 5 credentials are requested with AUTH KERBEROS5 INIT.",
8426 "  Default is OFF.",
8427 " ",
8428 "SET AUTHENTICATION KERBEROS4 INSTANCE <instance>",
8429 "  Allows a Kerberos 4 instance to be specified as a default (if needed).",
8430 " ",
8431 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } KEYTAB <filename>",
8432 "  Specifies the location of the keytab file used to authenticate incoming",
8433 "  connections.  The default is none, which means to use the default value",
8434 "  configured in the Kerberos installation.",
8435 " ",
8436 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } LIFETIME <minutes>",
8437 "  Specifies the lifetime of the TGTs requested from the KDC.  The default",
8438 "  is 600 minutes (10 hours).",
8439 " ",
8440 "SET AUTHENTICATION KERBEROS5 NO-ADDRESSES { ON, OFF }",
8441 "  Specifies whether or not IP addresses will be inserted into the TGT."
8442 "  Default is OFF.",
8443 " ",
8444 "SET AUTHENTICATION KERBEROS4 PREAUTH { ON, OFF }",
8445 "  Allows Kerberos 4 preauthenticated TGT requests to be turned off.  The",
8446 "  default is ON.  Only use if absolutely necessary.  We recommend that",
8447 "  preauthenticated requests be required for all tickets returned by a KDC",
8448 "  to a requestor.",
8449 " ",
8450 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL <name>",
8451 "  When Kermit starts, it attempts to set the principal name to that stored",
8452 "  in the current credentials cache.  If no credential cache exists, the",
8453 "  current SET LOGIN USERID value is used.  SET LOGIN USERID is set to the",
8454 "  operating system's current username when Kermit is started.  To force",
8455 "  Kermit to prompt the user for the principal name when requesting TGTs,",
8456 "  place:",
8457 " ",
8458 "    SET AUTH K4 PRINCIPAL {}",
8459 "    SET AUTH K5 PRINCIPAL {}",
8460 " ",
8461 "  in the Kermit initialization file or connection script.",
8462 " ",
8463 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PASSWORD <prompt>",
8464 "  Specifies a custom prompt to be used when prompting for a password.",
8465 "  The Kerberos prompt strings may contain two %s replacement fields.",
8466 "  The first %s is replaced by the principal name; the second by the realm.",
8467 " ",
8468 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PRINCIPAL <prompt>",
8469 "  Specifies a custom prompt to be used when prompting for the Kerberos",
8470 "  principal name.  No %s replacement fields may be used.  Kermit prompts",
8471 "  for a principal name when retrieving a TGT if the command:",
8472 " ",
8473 "    SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL {}",
8474 " ",
8475 "  has been issued.",
8476 " ",
8477 "SET AUTHENTICATION KERBEROS5 PROXIABLE { ON, OFF }",
8478 "  When ON, specifies that Kerberos 5 credentials should be proxiable.",
8479 "  Default is OFF.",
8480 " ",
8481 "SET AUTHENTICATION KERBEROS5 RENEWABLE <minutes>",
8482 "  When <minutes> is greater than the ticket lifetime a TGT may be renewed",
8483 "  with AUTH K5 INIT /RENEW instead of getting a new ticket as long as the",
8484 "  ticket is not expired and its within the renewable lifetime.  Default is",
8485 "  0 (zero) minutes.",
8486 " ",
8487 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } REALM <name>",
8488 "  If no default is set, the default realm configured for the Kerberos",
8489 "  libraries is used.  Abbreviations accepted.",
8490 " ",
8491 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } SERVICE-NAME <name>",
8492 "  This command specifies the service ticket name used to authenticate",
8493 "  to the host when Kermit is used as a client; or the service ticket",
8494 "  name accepted by Kermit when it is acting as the host.",
8495 "  If no default is set, the default service name for Kerberos 4 is",
8496 "  \"rcmd\" and for Kerberos 5 is \"host\".",
8497 " ",
8498 #endif /* CK_KERBEROS */
8499 #ifdef CK_SRP
8500 "SET AUTHENTICATION SRP PROMPT PASSWORD <prompt>",
8501 "  Specifies a custom prompt to be used when prompting for a password.",
8502 "  The SRP prompt string may contain one %s replacement fields which is",
8503 "  replaced by the login userid.",
8504 " ",
8505 #endif /* CK_SRP */
8506 #ifdef CK_SSL
8507 "In all of the following commands \"SSL\" and \"TLS\" are aliases.",
8508 " ",
8509 "SET AUTHENTICATION { SSL, TLS } CIPHER-LIST <list of ciphers>",
8510 "Applies to both SSL and TLS.  A colon separated list of any of the following",
8511 "(case sensitive) options depending on the options chosen when OpenSSL was ",
8512 "compiled: ",
8513 " ",
8514 "  Key Exchange Algorithms:",
8515 "    \"kRSA\"      RSA key exchange",
8516 "    \"kDHr\"      Diffie-Hellman key exchange (key from RSA cert)",
8517 "    \"kDHd\"      Diffie-Hellman key exchange (key from DSA cert)",
8518 "    \"kEDH\"      Ephemeral Diffie-Hellman key exchange (temporary key)",
8519 "    \"kKRB5\"     Kerberos 5",
8520 " ",
8521 "  Authentication Algorithm:",
8522 "    \"aNULL\"     No authentication",
8523 "    \"aRSA\"      RSA authentication",
8524 "    \"aDSS\"      DSS authentication",
8525 "    \"aDH\"       Diffie-Hellman authentication",
8526 "    \"aKRB5\"     Kerberos 5",
8527 " ",
8528 "  Cipher Encoding Algorithm:",
8529 "    \"eNULL\"     No encodiing",
8530 "    \"DES\"       DES encoding",
8531 "    \"3DES\"      Triple DES encoding",
8532 "    \"RC4\"       RC4 encoding",
8533 "    \"RC2\"       RC2 encoding",
8534 "    \"IDEA\"      IDEA encoding",
8535 " ",
8536 "  MAC Digest Algorithm:",
8537 "    \"MD5\"       MD5 hash function",
8538 "    \"SHA1\"      SHA1 hash function",
8539 "    \"SHA\"       SHA hash function (should not be used)",
8540 " ",
8541 "  Aliases:",
8542 "    \"SSLv2\"     all SSL version 2.0 ciphers (should not be used)",
8543 "    \"SSLv3\"     all SSL version 3.0 ciphers",
8544 "    \"EXP\"       all export ciphers (40-bit)",
8545 "    \"EXPORT56\"  all export ciphers (56-bit)",
8546 "    \"LOW\"       all low strength ciphers (no export)",
8547 "    \"MEDIUM\"    all ciphers with 128-bit encryption",
8548 "    \"HIGH\"      all ciphers using greater than 128-bit encryption",
8549 "    \"RSA\"       all ciphers using RSA key exchange",
8550 "    \"DH\"        all ciphers using Diffie-Hellman key exchange",
8551 "    \"EDH\"       all ciphers using Ephemeral Diffie-Hellman key exchange",
8552 "    \"ADH\"       all ciphers using Anonymous Diffie-Hellman key exchange",
8553 "    \"DSS\"       all ciphers using DSS authentication",
8554 "    \"KRB5\"      all ciphers using Kerberos 5 authentication",
8555 "    \"NULL\"      all ciphers using no encryption",
8556 " ",
8557 "Each item in the list may include a prefix modifier:",
8558 " ",
8559 "    \"+\"         move cipher(s) to the current location in the list",
8560 "    \"-\"         remove cipher(s) from the list (may be added again by",
8561 "                a subsequent list entry)",
8562 "    \"!\"         kill cipher from the list (it may not be added again",
8563 "                by a subsequent list entry)",
8564 " ",
8565 "If no modifier is specified the entry is added to the list at the current ",
8566 "position.  \"+\" may also be used to combine tags to specify entries such as "
8567 ,
8568 "\"RSA+RC4\" describes all ciphers that use both RSA and RC4.",
8569 " ",
8570 "For example, all available ciphers not including ADH key exchange:",
8571 " ",
8572 "  ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP",
8573 " ",
8574 "All algorithms including ADH and export but excluding patented algorithms: ",
8575 " ",
8576 "  HIGH:MEDIUM:LOW:EXPORT56:EXP:ADH:!kRSA:!aRSA:!RC4:!RC2:!IDEA",
8577 " ",
8578 "The OpenSSL command ",
8579 " ",
8580 "  openssl.exe ciphers -v <list of ciphers> ",
8581 " ",
8582 "may be used to list all of the ciphers and the order described by a specific",
8583 "<list of ciphers>.",
8584 " ",
8585 "SET AUTHENTICATION { SSL, TLS } CRL-DIR <directory>",
8586 "specifies a directory that contains certificate revocation files where each",
8587 "file is named by the hash of the certificate that has been revoked.",
8588 " ",
8589 "  OpenSSL expects the hash symlinks to be made like this:",
8590 " ",
8591 "    ln -s crl.pem `openssl crl -hash -noout -in crl.pem`.r0",
8592 " ",
8593 "  Since not all file systems have symlinks you can use the following command",
8594 "  in Kermit to copy the crl.pem file to the hash file name.",
8595 " ",
8596 "     copy crl.pem {\\fcommand(openssl.exe crl -hash -noout -in crl.pem).r0}",
8597 " ",
8598 "  This produces a hash based on the issuer field in the CRL such ",
8599 "  that the issuer field of a Cert may be quickly mapped to the ",
8600 "  correct CRL.",
8601 " ",
8602 "SET AUTHENTICATION { SSL, TLS } CRL-FILE <filename>",
8603 "specifies a file that contains a list of certificate revocations.",
8604 " ",
8605 "SET AUTHENTICATION { SSL, TLS } DEBUG { ON, OFF }",
8606 "specifies whether debug information should be displayed about the SSL/TLS",
8607 "connection.  When DEBUG is ON, the VERIFY command does not terminate",
8608 "connections when set to FAIL-IF-NO-PEER-CERT when a certificate is",
8609 "presented that cannot be successfully verified.  Instead each error",
8610 "is displayed but the connection automatically continues.",
8611 " ",
8612 "SET AUTHENTICATION { SSL, TLS } DH-PARAM-FILE <filename>",
8613 "  Specifies a file containing DH parameters which are used to generate",
8614 "  temporary DH keys.  If a DH parameter file is not provided Kermit uses a",
8615 "  fixed set of parameters depending on the negotiated key length.  Kermit",
8616 "  provides DH parameters for key lengths of 512, 768, 1024, 1536, and 2048",
8617 "  bits.",
8618 " ",
8619 "SET AUTHENTICATION { SSL, TLS } DSA-CERT-CHAIN-FILE <filename>",
8620 "  Specifies a file containing a DSA certificate chain to be sent along with",
8621 "  the DSA-CERT to the peer.  This file must only be specified if Kermit is",
8622 "  being used as a server and the DSA certificate was signed by an",
8623 "  intermediary certificate authority.",
8624 " ",
8625 "SET AUTHENTICATION { SSL, TLS } DSA-CERT-FILE <filename>",
8626 "  Specifies a file containing a DSA certificate to be sent to the peer to ",
8627 "  authenticate the host or end user.  The file may contain the matching DH ",
8628 "  private key instead of using the DSA-KEY-FILE command.",
8629 " ",
8630 "SET AUTHENTICATION { SSL, TLS } DSA-KEY-FILE <filename>",
8631 "Specifies a file containing the private DH key that matches the DSA ",
8632 "certificate specified with DSA-CERT-FILE.  This command is only necessary if",
8633 "the private key is not appended to the certificate in the file specified by",
8634 "DSA-CERT-FILE.",
8635 " ",
8636 "  Note: When executing a script in the background or when it is",
8637 "  running as an Internet Kermit Service Daemon, Kermit cannot support ",
8638 "  encrypted private keys.  When attempting to load a private key that is",
8639 "  encrypted, a prompt will be generated requesting the passphrase necessary",
8640 "  to decrypt the keyfile.  To automate access to the private key you must",
8641 "  decrypt the encrypted keyfile and create an unencrypted keyfile for use",
8642 "  by Kermit.  This can be accomplished by using the following command and",
8643 "  the passphrase:",
8644 " ",
8645 "  openssl dsa -in <encrypted-key-file> -out <unencrypted-key-file>",
8646 " ",
8647 "SET AUTHENTICATION { SSL, TLS } RANDOM-FILE <filename>",
8648 "  Specifies a file containing random data to be used as seed for the",
8649 "  Pseudo Random Number Generator.  The contents of the file are",
8650 "  overwritten with new random data on each use.",
8651 " ",
8652 "SET AUTHENTICATION { SSL, TLS } RSA-CERT-CHAIN-FILE <filename>",
8653 "  Specifies a file containing a RSA certificate chain to be sent along with",
8654 "  the RSA-CERT to the peer.  This file must only be specified if Kermit is",
8655 "  being used as a server and the RSA certificate was signed by an",
8656 "  intermediary certificate authority.",
8657 " ",
8658 "SET AUTHENTICATION { SSL, TLS } RSA-CERT-FILE <filename>",
8659 "  Specifies a file containing a RSA certificate to be sent to the peer to ",
8660 "  authenticate the host or end user.  The file may contain the matching RSA ",
8661 "  private key instead of using the RSA-KEY-FILE command.",
8662 " ",
8663 "SET AUTHENTICATION { SSL, TLS } RSA-KEY-FILE <filename>",
8664 "  Specifies a file containing the private RSA key that matches the RSA",
8665 "  certificate specified with RSA-CERT-FILE.  This command is only necessary",
8666 "  if the private key is not appended to the certificate in the file specified"
8667 ,
8668 "  by RSA-CERT-FILE.  ",
8669 " ",
8670 "  Note: When executing a script in the background or when it is",
8671 "  running as an Internet Kermit Service Daemon, Kermit cannot support ",
8672 "  encrypted private keys.  When attempting to load a private key that is",
8673 "  encrypted, a prompt will be generated requesting the passphrase necessary",
8674 "  to decrypt the keyfile.  To automate access to the private key you must",
8675 "  decrypt the encrypted keyfile and create an unencrypted keyfile for use",
8676 "  by Kermit.  This can be accomplished by using the following command and",
8677 "  the passphrase:",
8678 " ",
8679 "  openssl rsa -in <encrypted-key-file> -out <unencrypted-key-file>",
8680 " ",
8681 "SET AUTHENTICATION { SSL, TLS } VERBOSE { ON, OFF }",
8682 "  Specifies whether information about the authentication (ie, the",
8683 "  certificate chain) should be displayed upon making a connection.",
8684 " ",
8685 "SET AUTHENTICATION { SSL, TLS } VERIFY { NO,PEER-CERT,FAIL-IF-NO-PEER-CERT }",
8686 "  Specifies whether certificates should be requested from the peer verified;",
8687 "  whether they should be verified when they are presented; and whether they",
8688 "  should be required.  When set to NO (the default for IKSD), Kermit does",
8689 "  not request that the peer send a certificate; if one is presented it is",
8690 "  ignored.  When set to PEER-CERT (the default when not IKSD), Kermit",
8691 "  requests a certificate be sent by the peer.  If presented, the certificate",
8692 "  is verified.  Any errors during the verification process result in",
8693 "  queries to the end user.  When set to FAIL-IF-NO-PEER-CERT, Kermit",
8694 "  requests a certificate be sent by the peer.  If the certificate is not",
8695 "  presented or fails to verify, the connection is terminated without",
8696 "  querying the user.",
8697 " ",
8698 "  If an anonymous cipher (i.e., ADH) is desired, the NO setting must be",
8699 "  used.  Otherwise, the receipt of the peer certificate request is",
8700 "  interpreted as a protocol error and the negotiation fails.",
8701 " ",
8702 "  If you wish to allow the peer to authenticate using either an X509",
8703 "  certificate to userid mapping function or via use of a ~/.tlslogin file",
8704 "  you must use either PEER-CERT or FAIL-IF-NO-PEER-CERT.  Otherwise, any",
8705 "  certificates that are presented is ignored.  In other words, use NO if you",
8706 "  want to disable the ability to use certificates to authenticate a peer.",
8707 " ",
8708 "SET AUTHENTICATION { SSL, TLS } VERIFY-DIR <directory>",
8709 "  Specifies a directory that contains root CA certificate files used to",
8710 "  verify the certificate chains presented by the peer.  Each file is named",
8711 "  by a hash of the certificate.",
8712 " ",
8713 "  OpenSSL expects the hash symlinks to be made like this:",
8714 " ",
8715 "    ln -s cert.pem `openssl x509 -hash -noout -in cert.pem`.0",
8716 " ",
8717 "  Since not all file systems have symlinks you can use the following command",
8718 "  in Kermit to copy the cert.pem file to the hash file name.",
8719 " ",
8720 "    copy cert.pem {\\fcommand(openssl.exe x509 -hash -noout -in cert.pem).0}",
8721 " ",
8722 "  This produces a hash based on the subject field in the cert such that the",
8723 "  certificate may be quickly found.",
8724 " ",
8725 "SET AUTHENTICATION { SSL, TLS } VERIFY-FILE <file>",
8726 "  Specifies a file that contains root CA certificates to be used for",
8727 "  verifying certificate chains.",
8728 " ",
8729 #endif /* CK_SSL */
8730 ""
8731 };
8732
8733 static char *hxynet[] = {
8734 "Syntax: SET NETWORK { TYPE network-type, DIRECTORY [ file(s)... ] }",
8735 " ",
8736 "Select the type of network to be used with SET HOST connections:",
8737 " ",
8738 #ifdef NETCMD
8739 "  SET NETWORK TYPE COMMAND   ; Make a connection through an external command",
8740 #endif /* NETCMD */
8741 #ifdef TCPSOCKET
8742 "  SET NETWORK TYPE TCP/IP    ; Internet: Telnet, Rlogin, etc.",
8743 #endif /* TCPSOCKET */
8744 #ifdef ANYX25
8745 "  SET NETWORK TYPE X.25      ; X.25 peer-to-peer connections.",
8746 #endif /* ANYX25 */
8747 #ifdef DECNET
8748 "  SET NETWORK TYPE PATHWORKS { LAT, CTERM } ; DEC LAT or CTERM connections.",
8749 #endif /* DECNET */
8750 #ifdef NPIPE
8751 "  SET NETWORK TYPE NAMED-PIPE <pipename>  ; OS/2 Named Pipe connections.",
8752 #endif /* NPIPE */
8753 #ifdef CK_NETBIOS
8754 "  SET NETWORK TYPE NETBIOS                ; NETBIOS peer-to-peer connections",
8755 #endif /* CK_NETBIOS */
8756 #ifdef SUPERLAT
8757 "  SET NETWORK TYPE SUPERLAT ; LAT connections (Meridian Technology SuperLAT)",
8758 #endif /* SUPERLAT */
8759 " ",
8760 "If only one network type is listed above, that is the default network for",
8761 #ifdef RLOGCODE
8762 "SET HOST commands.  Also see SET HOST, TELNET, RLOGIN.",
8763 #else
8764 #ifdef TNCODE
8765 "SET HOST commands.  Also see SET HOST, TELNET.",
8766 #else
8767 "SET HOST commands.  Also see SET HOST.",
8768 #endif /* TNCODE */
8769 #endif /* RLOGCODE */
8770 " ",
8771 "SET NETWORK DIRECTORY [ file [ file [ ... ] ] ]",
8772 "  Specifies the name(s) of zero or more network directory files, similar to",
8773 "  dialing directories (HELP DIAL for details).  The general format of a",
8774 "  network directory entry is:",
8775 " ",
8776 "    name network-type address [ network-specific-info ] [ ; comment ]",
8777 " ",
8778 "  For TCP/IP, the format is:",
8779 " ",
8780 "    name tcp/ip ip-hostname-or-address [ socket ] [ ; comment ]",
8781 " ",
8782 "You can have multiple network directories and you can have multiple entries",
8783 "with the same name.  SET HOST <name> and TELNET <name> commands look up the",
8784 "given <name> in the directory and, if found, fill in the additional items",
8785 "from the entry, and then try all matching entries until one succeeds.",
8786 ""};
8787
8788 #ifndef NOTCPOPTS
8789 static char *hxytcp[] = {
8790 #ifdef SOL_SOCKET
8791 "SET TCP ADDRESS <ip-address>",
8792 "  This allows a specific IP Address on a multihomed host to be used",
8793 "  instead of allowing the TCP/IP stack to choose.  This may be necessary",
8794 "  when using authentication or listening for an incoming connection.",
8795 "  Specify no <ip-address> to remove the preference.",
8796 " ",
8797 "SET TCP KEEPALIVE { ON, OFF }",
8798 "  Setting this ON might help to detect broken connections more quickly.",
8799 "  (default is ON.)",
8800 " ",
8801 "SET TCP LINGER { ON [timeout], OFF }",
8802 "  Setting this ON ensures that a connection doesn't close before all",
8803 "  outstanding data has been transferred and acknowledged.  The timeout is",
8804 "  measured in 10ths of milliseconds.  The default is ON with a timeout of 0.",
8805 " ",
8806 "SET TCP NODELAY { ON, OFF }",
8807 "  ON means send short TCP packets immediately rather than waiting",
8808 "  to accumulate a bunch of them before transmitting (Nagle Algorithm).",
8809 "  (default is OFF.)",
8810 " ",
8811 "SET TCP RECVBUF <number>",
8812 "SET TCP SENDBUF <number>",
8813 "   TCP receive and send buffer sizes.  (default is -1, use system defaults.)",
8814 " ",
8815 "These items let you tune TCP networking performance on a per-connection",
8816 "basis by adjusting parameters you normally would not have access to.  You",
8817 "should use these commands only if you feel that the TCP/IP protocol stack",
8818 "that Kermit is using is giving you inadequate performance, and then only if",
8819 "you understand the concepts (see, for example, the Comer TCP/IP books), and",
8820 "then at your own risk.  These settings are displayed by SHOW NETWORK.  Not",
8821 "all options are necessarily available in all Kermit versions; it depends on",
8822 "the underlying TCP/IP services.",
8823 " ",
8824 "The following TCP and/or IP parameter(s) may also be changed:",
8825 " ",
8826 #endif /* SOL_SOCKET */
8827 "SET TCP REVERSE-DNS-LOOKUP { AUTO, ON, OFF }",
8828 "  Tells Kermit whether to perform reverse DNS lookup on TCP/IP connections",
8829 "  so Kermit can determine the actual hostname of the host it is connected",
8830 "  to, which is useful for connections to host pools, and is required for",
8831 "  Kerberos connections to host pools and for incoming connections.  If the",
8832 "  other host does not have a DNS entry, the reverse lookup could take a long",
8833 "  time (minutes) to fail, but the connection will still be made.  Turn this",
8834 "  option OFF for speedier connections if you do not need to know exactly",
8835 "  which host you are connected to and you are not using Kerberos.  AUTO, the",
8836 "  default, means the lookup is done on hostnames, but not on numeric IP",
8837 "  addresses unless Kerberos support is installed.",
8838 #ifdef CK_DNS_SRV
8839 " ",
8840 "SET TCP DNS-SERVICE-RECORDS {ON, OFF}",
8841 "  Tells Kermit whether to try to use DNS SRV records to determine the",
8842 "  host and port number upon which to find an advertised service.  For",
8843 "  example, if a host wants regular Telnet connections redirected to some",
8844 "  port other than 23, this feature allows Kermit to ask the host which",
8845 "  port it should use.  Since not all domain servers are set up to answer",
8846 "  such requests, this feature is OFF by default.",
8847 #endif /* CK_DNS_SRV */
8848 #ifdef NT
8849 #ifdef CK_SOCKS
8850 " ",
8851 "SET TCP SOCKS-SERVER [<hostname or ip-address>]",
8852 "  If a hostname or ip-address is specified, Kermit will use the SOCKS",
8853 "  server when attempting outgoing connections.  If no hostname or",
8854 "  ip-address is specified, any previously specified SOCKS server will",
8855 "  be removed.",
8856 #endif /* CK_SOCKS */
8857 #endif /* NT */
8858 #ifndef NOHTTP
8859 " ",
8860 "SET TCP HTTP-PROXY [<hostname or ip-address>[:<port>]]",
8861 "  If a hostname or ip-address is specified, Kermit will use the Proxy",
8862 "  server when attempting outgoing connections.  If no hostname or",
8863 "  ip-address is specified, any previously specified Proxy server will",
8864 "  be removed.  If no port number is specified, the \"http\" service",
8865 "  will be used.",
8866 #endif /* NOHTTP */
8867 ""};
8868 #endif /* NOTCPOPTS */
8869 #endif /* NETCONN */
8870
8871 #ifdef TNCODE
8872 static char *hxytopt[] = {
8873 "SET TELOPT [ { /CLIENT, /SERVER } ] <option> -",
8874 "    { ACCEPTED, REFUSED, REQUESTED, REQUIRED } -",
8875 "    [ { ACCEPTED, REFUSED, REQUESTED, REQUIRED } ]",
8876 "  SET TELOPT lets you specify policy requirements for Kermit's handling of",
8877 "  Telnet option negotiations.  Setting an option REQUIRED causes Kermit",
8878 "  to offer the option to the peer and disconnect if the option is refused.",
8879 "  REQUESTED causes Kermit to offer an option to the peer.  ACCEPTED results",
8880 "  in no offer but Kermit will attempt to negotiate the option if it is",
8881 "  requested.  REFUSED instructs Kermit to refuse the option if it is",
8882 "  requested by the peer.",
8883 " ",
8884 "  Some options are negotiated in two directions and accept separate policies",
8885 "  for each direction; the first keyword applies to Kermit itself, the second",
8886 "  applies to Kermit's Telnet partner; if the second keyword is omitted, an",
8887 "  appropriate (option-specific) default is applied.  You can also include a",
8888 "  /CLIENT or /SERVER switch to indicate whether the given policies apply",
8889 "  when Kermit is the Telnet client or the Telnet server; if no switch is",
8890 "  given, the command applies to the client.",
8891 " ",
8892 "  Note that some of Kermit's Telnet partners fail to refuse options that",
8893 "  they do not recognize and instead do not respond at all.  In this case it",
8894 "  is possible to use SET TELOPT to instruct Kermit to REFUSE the option",
8895 "  before connecting to the problem host, thus skipping the problematic",
8896 "  negotiation.",
8897 " ",
8898 "  Use SHOW TELOPT to view current Telnet Option negotiation settings.",
8899 "  SHOW TELNET displays current Telnet settings.",
8900 ""};
8901
8902 static char *hxytel[] = {
8903 "Syntax: SET TELNET parameter value",
8904 " ",
8905 "For TCP/IP TELNET connections, which are in NVT (ASCII) mode by default:",
8906 " ",
8907 #ifdef CK_AUTHENTICATION
8908 #ifdef COMMENT
8909 "SET TELNET AUTHENICATION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
8910 "  ACCEPT or REFUSE authentication bids, or actively REQUEST authentication.",
8911 "  REQUIRED refuses the connection if authentication is not successfully",
8912 "  negotiated.  ACCEPTED by default.",
8913 " ",
8914 #endif /* COMMENT */
8915 "SET TELNET AUTHENTICATION TYPE { AUTOMATIC, KERBEROS_IV, KERBEROS_V, ...",
8916 #ifdef NT
8917 "  ..., NTLM, SSL, SRP, NONE } [...]",
8918 #else /* NT */
8919 "  ..., SSL, SRP, NONE } [...]",
8920 #endif /* NT */
8921 "  AUTOMATIC is the default.  Available options can vary depending on the",
8922 "  features Kermit was built to support and the operating system",
8923 "  configuration; type SET TELNET AUTHENTICATION TYPE ? for a list.",
8924 " ",
8925 "  When Kermit is the Telnet client:",
8926 "    AUTOMATIC allows the host to choose the preferred type of authentication."
8927 ,
8928 "    NONE instructs Kermit to refuse all authentication methods when the",
8929 "    authentication option is negotiated.  A list of one or more other values",
8930 "    allow a specific subset of the supported authentication methods to be",
8931 "    used.",
8932 " ",
8933 "  When Kermit is the Telnet server:",
8934 "    AUTOMATIC results in available authentication methods being offered",
8935 "    to the telnet client in the following order:",
8936 " ",
8937 #ifdef NT
8938 "      KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
8939 #else /* NT */
8940 "      KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
8941 #endif /* NT */
8942 " ",
8943 "  NONE results in no authentication methods being offered to the Telnet",
8944 "  server when the authentication option is negotiated.  The preferred",
8945 "  method of disabling authentication is:",
8946 " ",
8947 "    SET TELOPT /SERVER AUTHENTICATION REFUSE",
8948 " ",
8949 "  A list of one or more authentication methods specifies the order those",
8950 "  methods are to be offered to the telnet client.",
8951 #ifdef NT
8952 " ",
8953 "  If you wish to allow NTLM authentication to be used with the Microsoft",
8954 "  Windows 2000 or Services for Unix Telnet client you must specify a list",
8955 "  with NTLM as the first item in the list.  By default, NTLM is the last",
8956 "  item in the list because it does not provide any form of data encryption.",
8957 #endif /* NT */
8958 " ",
8959 #ifdef CK_KERBEROS
8960 "SET TELNET AUTHENTICATION FORWARDING { ON, OFF }",
8961 "  Set this to ON to forward Kerberos V ticket-granting-tickets to the host",
8962 "  after authentication is complete.  OFF by default.",
8963 " ",
8964 #endif /* CK_KERBEROS */
8965 "SET TELNET AUTHENTICATION ENCRYPT-FLAG { ANY, NONE, TELOPT }",
8966 "  Use this command to specify which AUTH telopt encryption flags may be",
8967 "  accepted in client mode or offered in server mode.  The default is ANY.",
8968 " ",
8969 "SET TELNET AUTHENTICATION HOW-FLAG { ANY, ONE-WAY, MUTUAL }",
8970 "  Use this command to specify which AUTH telopt how flags may be",
8971 "  accepted in client mode or offered in server mode.  The default is ANY.",
8972 " ",
8973 #endif /* CK_AUTHENTICATION */
8974 #ifdef COMMENT
8975 "SET TELNET BINARY-MODE { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
8976 "  ACCEPT or REFUSE binary-mode bids, or actively REQUEST binary mode.",
8977 "  REQUIRED refuses the connection if binary mode is not successfully",
8978 "  negotiated in both directions.  ACCEPTED by default.",
8979 " ",
8980 #endif /* COMMENT */
8981 "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
8982 "  When ON (OFF by default) and BINARY negotiations are not REFUSED Kermit",
8983 "  will attempt to negotiate BINARY mode in each direction before the start",
8984 "  of each file transfer.  After the transfer is complete BINARY mode will",
8985 "  be restored to the pre-transfer state.",
8986 " ",
8987 "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
8988 "  Set this command to ON if you want to force Kermit to negotiate",
8989 "  Telnet Binary in both directions when performing file transfers.",
8990 "  Default is OFF.  Alias SET TELNET BINARY-XFER-MODE.",
8991 " ",
8992 "SET TELNET BUG AUTH-KRB5-DES { ON, OFF }",
8993 "  Default is ON.  Disable this bug to enable the use of encryption types",
8994 "  other than DES such as 3DES or CAST-128 when the Kerberos 5 session key",
8995 "  is longer than 8 bytes.",
8996 " ",
8997 "SET TELNET BUG BINARY-ME-MEANS-U-TOO { ON, OFF }",
8998 "  Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
8999 "  Kermit's TELNET partner.",
9000 " ",
9001 "SET TELNET BUG BINARY-U-MEANS-ME-TOO { ON, OFF }",
9002 "  Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
9003 "  Kermit's TELNET partner.",
9004 " ",
9005 "SET TELNET BUG INFINITE-LOOP-CHECK { ON, OFF }",
9006 "  Set this to ON to prevent Kermit from responding to a telnet negotiation",
9007 "  sequence that enters an infinite loop.  The default is OFF because this",
9008 "  should never occur.",
9009 " ",
9010 "SET TELNET BUG SB-IMPLIES-WILL-DO { ON, OFF }",
9011 "  Set this to ON to allow Kermit to respond to telnet sub-negotiations if",
9012 "  the peer forgets to respond to WILL with DO or to DO with WILL.",
9013 " ",
9014 "SET TELNET DEBUG { ON, OFF }",
9015 "  Set this to ON to display telnet negotiations as they are sent and",
9016 "  received.",
9017 " ",
9018 "SET TELNET DELAY-SB { ON, OFF }",
9019 "  When ON, telnet subnegotiation responses are delayed until after all",
9020 "  authentication and encryption options are either successfully negotiated",
9021 "  or refused. This ensures that private data is protected.  When OFF, telnet",
9022 "  subnegotiation responses are sent immediately.  The default is ON.",
9023 " ",
9024 "SET TELNET ECHO { LOCAL, REMOTE }",
9025 "  Kermit's initial echoing state for TELNET connections, LOCAL by default.",
9026 "  After the connection is made, TELNET negotiations determine the echoing.",
9027 " ",
9028 #ifdef CK_ENCRYPTION
9029 #ifdef COMMENT
9030 "SET TELNET ENCRYPTION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
9031 "  ACCEPT or REFUSE encryption bids, or actively REQUEST encryption in both.",
9032 "  directions.  REQUIRED refuses the connection if encryption is not",
9033 "  successfully negotiated in both directions.  ACCEPTED by default.",
9034 " ",
9035 #endif /* COMMENT */
9036 "SET TELNET ENCRYPTION TYPE { AUTOMATIC, CAST128_CFB64, CAST128_OFB64, ",
9037 "  CAST5_40_CFB64, CAST5_40_OFB64, DES_CFB64, DES_OFB64, NONE }",
9038 "  AUTOMATIC allows the host to choose the preferred type of encryption.",
9039 "  Other values allow a specific encryption method to be specified.",
9040 "  AUTOMATIC is the default.  The list of options will vary depending",
9041 "  on the encryption types selected at compilation time.",
9042 " ",
9043 #endif /* CK_ENCRYPTION */
9044 #ifdef CK_ENVIRONMENT
9045 #ifdef COMMENT
9046 "SET TELNET ENVIRONMENT { ON, OFF, variable-name [ value ] }",
9047 "  This feature lets Kermit send the values of certain environment variables",
9048 "  to the other computer if it asks for them.  The variable-name can be any",
9049 "  of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
9050 "  \"SYSTEMTYPE\", or \"DISPLAY\".  Some Telnet servers, if given a USER",
9051 "  value in this way, will accept it and therefore not prompt you for user",
9052 "  name when you log in.  The default values are taken from your environment;",
9053 "  use this command to change or remove them.  See RFC1572 for details.  You",
9054 "  may also specify OFF to disable this feature, and ON to re-enable it.",
9055 " ",
9056 #else
9057 "SET TELNET ENVIRONMENT { variable-name [ value ] }",
9058 "  This feature lets Kermit send the values of certain environment variables",
9059 "  to the other computer if it asks for them.  The variable-name can be any",
9060 "  of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
9061 "  \"SYSTEMTYPE\", or \"DISPLAY\".  Some Telnet servers, if given a USER",
9062 "  value in this way, will accept it and therefore not prompt you for user",
9063 "  name when you log in.  The default values are taken from your environment;",
9064 "  use this command to change or remove them.  See RFC1572 for details.",
9065 " ",
9066 #endif /* COMMENT */
9067 #endif /* CK_ENVIRONMENT */
9068 #ifdef CK_FORWARD_X
9069 "SET TELNET FORWARD-X XAUTHORITY-FILE <file>",
9070 "  If your X Server requires X authentication and the location of the",
9071 "  .Xauthority file is not defined by the XAUTHORITY environment variable,",
9072 "  use this command to specify the location of the .Xauthority file."
9073 "  ",
9074 #endif /* CK_FORWARD_X */
9075 #ifdef CK_SNDLOC
9076 "SET TELNET LOCATION [ text ]",
9077 "  Location string to send to the Telnet server if it asks.  By default this",
9078 "  is picked up from the LOCATION environment variable.  Give this command",
9079 "  with no text to disable this feature.",
9080 " ",
9081 #endif /* CK_SNDLOC */
9082 "SET TELNET NEWLINE-MODE { NVT, BINARY-MODE } { OFF, ON, RAW }",
9083
9084 "  Determines how carriage returns are handled on TELNET connections.  There",
9085 "  are separate settings for NVT (ASCII) mode and binary mode.  ON (default",
9086 "  for NVT mode) means CRLF represents CR.  OFF means CR followed by NUL",
9087 "  represents CR.  RAW (default for BINARY mode) means CR stands for itself.",
9088 " ",
9089 #ifdef TCPSOCKET
9090 "SET TELNET PROMPT-FOR-USERID <prompt>",
9091 "  Specifies a custom prompt to be used when prompting for a userid.  Kermit",
9092 "  prompts for a userid if the command:",
9093 " ",
9094 "    SET LOGIN USERID {}",
9095 " ",
9096 "  has been issued prior to a Telnet authentication negotiation for an",
9097 "  authentication type that requires the transmission of a name, such as",
9098 "  Secure Remote Password.",
9099 " ",
9100 #endif /* TCPSOCKET */
9101 "SET TELNET REMOTE-ECHO { ON, OFF }",
9102 "  Applies only to incoming connections created with:",
9103 "    SET HOST * <port> /TELNET",
9104 "  This command determines whether Kermit will actually echo characters",
9105 "  received from the remote when it has negotiated to do so.  The default",
9106 "  is ON.  Remote echoing may be turned off when it is necessary to read",
9107 "  a password with the INPUT command.",
9108 " ",
9109 "SET TELNET TERMINAL-TYPE name",
9110 "  The terminal type to send to the remote TELNET host.  If none is given,",
9111 #ifdef OS2
9112 "  your current SET TERMINAL TYPE value is sent, e.g. VT220.",
9113 " ",
9114 #else
9115 "  your local terminal type is sent.",
9116 " ",
9117 #endif /* OS2 */
9118 "SET TELNET WAIT-FOR-NEGOTIATIONS { ON, OFF }",
9119 "  Each Telnet option must be fully negotiated either On or Off before the",
9120 "  session can continue.  This is especially true with options that require",
9121 "  subnegotiations such as Authentication, Encryption, and Kermit; for",
9122 "  proper support of these options Kermit must wait for the negotiations to",
9123 "  complete.  Of course, Kermit has no way of knowing whether a reply is",
9124 "  delayed or not coming at all, and so will wait a minute or more for",
9125 "  required replies before continuing the session.  If you know that Kermit's",
9126 "  Telnet partner will not be sending the required replies, you can set this",
9127 "  option of OFF to avoid the long timeouts.  Or you can instruct Kermit to",
9128 "  REFUSE specific options with the SET TELOPT command.",
9129 "",
9130 "Type SHOW TELNET to see the current values of these parameters.",
9131 "" };
9132 #endif /* TNCODE */
9133
9134 #ifndef NOSPL
9135 static char *hxymacr[] = {
9136 "Syntax: SET MACRO parameter value",
9137 "  Controls the behavior of macros.",
9138 " ",
9139 "SET MACRO ECHO { ON, OFF }",
9140 "  Tells whether commands executed from a macro definition should be",
9141 "  displayed on the screen.  OFF by default; use ON for debugging.",
9142 " ",
9143 "SET MACRO ERROR { ON, OFF }",
9144 "  Tells whether a macro should be automatically terminated upon a command",
9145 "  error.  This setting is local to the current macro, and inherited by",
9146 "  subordinate macros.",
9147 "" };
9148 #endif /* NOSPL */
9149
9150 static char *hmxyprm[] = {
9151 "Syntax: SET PROMPT [ text ]",
9152 " ",
9153 #ifdef OS2
9154 "Prompt text for this program, normally 'K-95>'.  May contain backslash",
9155 #else
9156 #ifdef MAC
9157 "Prompt text for this program, normally 'Mac-Kermit>'.  May contain backslash",
9158 #else
9159 "Prompt text for this program, normally 'C-Kermit>'.  May contain backslash",
9160 #endif /* MAC */
9161 #endif /* OS2 */
9162 "codes for special effects.  Surround by { } to preserve leading or trailing",
9163 #ifdef OS2
9164 "spaces.  If text omitted, prompt reverts to K-95>.  Prompt can include",
9165 #else
9166 #ifdef MAC
9167 "spaces.  If text omitted, prompt reverts to Mac-Kermit>.  Prompt can include",
9168 #else
9169 "spaces.  If text omitted, prompt reverts to C-Kermit>.  Prompt can include",
9170 #endif /* OS2 */
9171 #endif /* MAC */
9172 "variables like \\v(dir) or \\v(time) to show current directory or time.",
9173 "" };
9174
9175 #ifdef UNIX
9176 static char *hxywild[] = {
9177 "Syntax: SET WILDCARD-EXPANSION { KERMIT [ switch ], SHELL, ON, OFF }",
9178 "  KERMIT (the default) means C-Kermit expands filename wildcards in SEND and",
9179 "  similar commands itself, and in incoming GET commands.  Optional switches",
9180 "  are /NO-MATCH-DOT-FILES (\"*\" and \"?\" should not match an initial",
9181 "  period in a filename; this is the default) and /MATCH-DOT-FILES if you",
9182 "  want files whose names begin with \".\" included.  SET WILDCARD SHELL",
9183 "  means that Kermit asks your preferred shell to expand wildcards (this",
9184 "  should not be necessary in C-Kermit 7.0 and later).  HELP WILDCARD for",
9185 "  further information.",
9186 " ",
9187 "  The ON and OFF choices allow you to disable and renable wildcard",
9188 "  processing independent of the KERMIT / SHELL choice.  Disabling wildcards",
9189 "  allows you to process an array or list of filenames without having to",
9190 "  consider whether the names might contain literal wildcard characters.",
9191 "  WARNING: SET WILD OFF also disables internal filename pattern-matching,",
9192 "  used (for example) in creating backup files.",
9193 "" };
9194 #else
9195 static char *hxywild[] = {
9196 "Syntax: SET WILDCARD-EXPANSION { ON, OFF }",
9197 "  ON (the default) means that filenames given to Kermit commands such as",
9198 "  SEND and DIRECTORY are automatically expanded into lists of filenames if",
9199 "  they contain special 'wildcard characters' such as '*'.  You can reference",
9200 "  files whose names contains such characters literally by preceding each",
9201 "  such character with a backslash '\\'.  When dealing programmatically with",
9202 "  a file list, however, you should SET WILDCARD-EXPANSION OFF to force",
9203 "  treat each name in the list as a literal name.  See HELP WILDCARDS for",
9204 "  details about wildcard syntax.",
9205 "" };
9206 #endif /* UNIX */
9207
9208 #ifndef NOXFER
9209 static char *hxywind[] = {
9210 "Syntax: SET WINDOW-SIZE number",
9211 "  Specifies number of slots for sliding windows, i.e. the number of packets",
9212 "  that can be transmitted before waiting for acknowledgement.  The default",
9213 #ifdef XYZ_INTERNAL
9214 "  for Kermit protocol is one, the maximum is 32; for ZMODEM, the default",
9215 "  is no windowing (0).  For ZMODEM, the window size is really the packet",
9216 "  length, and is used only when non-windowed (streaming) transfers fail; the",
9217 "  ZMODEM window size should be a largish number, like 1024, and it should be",
9218 "  a multiple of 64.",
9219 #else
9220 "  is one, the maximum is 32.  Increased window size might result in reduced",
9221 "  maximum packet length.  Use sliding windows for improved efficiency on",
9222 "  connections with long delays.  A full duplex connection is required, as",
9223 "  well as a cooperating Kermit on the other end.",
9224 #endif /* XYZ_INTERNAL */
9225 "" };
9226
9227 static char *hxyrpt[] = {
9228 "Syntax: SET REPEAT { COUNTS { ON, OFF }, PREFIX <code> }",
9229 "  SET REPEAT COUNTS turns the repeat-count compression mechanism ON and OFF.",
9230 "  The default is ON.  SET REPEAT PREFIX <code> sets the repeat-count prefix",
9231 "  character to the given code.  The default is 126 (tilde).",
9232 "" };
9233
9234 static char *hxyrcv[] = {
9235 "Syntax: SET RECEIVE parameter value",
9236 "  Specifies parameters for inbound packets:",
9237 " ",
9238 #ifndef NOCSETS
9239 "SET RECEIVE CHARACTER-SET { AUTOMATIC, MANUAL }",
9240 "  Whether to automatically switch to an appropriate file-character set based",
9241 "  on the transfer character-set announcer, if any, of an incoming text file.",
9242 "  AUTOMATIC by default.  Also see HELP ASSOCIATE.",
9243 " ",
9244 #endif /* NOCSETS */
9245 "SET RECEIVE CONTROL-PREFIX number",
9246 "  ASCII value of prefix character used for quoting control characters in",
9247 "  packets that Kermit receives, normally 35 (number sign).  Don't change",
9248 "  this unless something is wrong with the other Kermit program.",
9249 " ",
9250 "SET RECEIVE END-OF-PACKET number",
9251 "  ASCII value of control character that terminates incoming packets,",
9252 "  normally 13 (carriage return).",
9253 " ",
9254 #ifdef CKXXCHAR
9255 "SET RECEIVE IGNORE-CHARACTER number",
9256 "  ASCII value of character to be discarded when receiving packets, such as",
9257 "  line folding characters.",
9258 " ",
9259 #endif /* CKXXCHAR */
9260 "SET RECEIVE MOVE-TO [ directory ]",
9261 "  If a directory name is specified, then every file that is received",
9262 "  successfully is moved to the given directory immediately after reception",
9263 "  is complete.  Omit the directory name to remove any previously set move-to",
9264 "  directory.",
9265 " ",
9266 "SET RECEIVE PACKET-LENGTH number",
9267 "  Maximum length packet the other Kermit should send.",
9268 " ",
9269 "SET RECEIVE PADDING number",
9270 "  Number of prepacket padding characters to ask for (normally 0).",
9271 " ",
9272 "SET RECEIVE PAD-CHARACTER number",
9273 "  ASCII value of control character to use for padding (normally 0).",
9274 " ",
9275 "SET RECEIVE PATHNAMES {OFF, ABSOLUTE, RELATIVE, AUTO}",
9276 "  If a recognizable path (directory, device) specification appears in an",
9277 "  incoming filename, strip it OFF before trying to create the output file.",
9278 #ifdef CK_MKDIR
9279 "  Otherwise, then if any of the directories in the path don't exist, Kermit",
9280 "  tries to create them, relative to your current or download directory, or",
9281 "  absolutely, as specified.  RELATIVE means force all incoming names, even",
9282 "  if they are absolute, to be relative to your current or download directory."
9283 ,
9284 "  AUTO, which is the default, means RELATIVE if the file sender indicates in",
9285 "  advance that this is a recursive transfer, otherwise OFF.",
9286 #endif /* CK_MKDIR */
9287 " ",
9288 "SET RECEIVE PAUSE number",
9289 "  Milliseconds to pause between packets, normally 0.",
9290 " ",
9291
9292 #ifdef CK_PERMS
9293 "SET RECEIVE PERMISSIONS { ON, OFF }",
9294 "  Whether to copy file permissions from inbound Attribute packets.",
9295 " ",
9296 #endif /* CK_PERMS */
9297
9298 "SET RECEIVE RENAME-TO [ template ]",
9299 "  If a template is specified, then every file that is received successfully",
9300 "  \
9301 is renamed according to the given template immediately after it is received.",
9302 "  \
9303 The template should include variables like \\v(filename) or \\v(filenumber).",
9304 "  Omit the template to remove any template previously set.",
9305 " ",
9306 "SET RECEIVE START-OF-PACKET number",
9307 "  ASCII value of character that marks start of inbound packet.",
9308 " ",
9309 "SET RECEIVE TIMEOUT number",
9310 "  Number of seconds the other Kermit should wait for a packet before sending",
9311 "  a NAK or retransmitting.",
9312 #ifdef VMS
9313 " ",
9314 "SET RECEIVE VERSION-NUMBERS { ON, OFF }",
9315 "  If ON, and in incoming filename includes a VMS version number, use it when",
9316 "  creating the file.  If OFF (which is the default), strip any VMS version",
9317 "  number from incoming filenames before attempting to create the file, \
9318 causing",
9319 "  the new file to receive the next highest version number.",
9320 #endif /* VMS */
9321 "" };
9322
9323 static char *hxysnd[] = {
9324 "Syntax: SET SEND parameter value",
9325 "  Specifies parameters for outbound files or packets.",
9326 " ",
9327 "SET SEND BACKUP { ON, OFF }",
9328 "  Tells whether to include backup files when sending file groups.  Backup",
9329 "  files are those created by Kermit, EMACS, etc, when creating a new file",
9330 "  that has the same name as an existing file.  A backup file has a version",
9331 "  appended to its name, e.g. oofa.txt.~23~.  ON is the default, meaning",
9332 "  don't exclude backup files.  Use OFF to exclude backup files from group",
9333 "  transfers.",
9334 " ",
9335 #ifndef NOCSETS
9336 "SET SEND CHARACTER-SET { AUTOMATIC, MANUAL }",
9337 "  Whether to automatically switch to an appropriate file-character when a",
9338 "  SET TRANSFER CHARACTER-SET command is given, or vice versa.  AUTOMATIC by",
9339 "  default.  Also see HELP ASSOCIATE.",
9340 " ",
9341 #endif /* NOCSETS */
9342
9343 "SET SEND CONTROL-PREFIX number",
9344 "  ASCII value of prefix character used for quoting control characters in",
9345 "  packets that Kermit sends, normally 35 (number sign).",
9346 " ",
9347 #ifdef CKXXCHAR
9348 "SET SEND DOUBLE-CHARACTER number",
9349 "  ASCII value of character to be doubled when sending packets, such as an",
9350 "  X.25 PAD escape character.",
9351 " ",
9352 #endif /* CKXXCHAR */
9353 "SET SEND END-OF-PACKET number",
9354 "  ASCII value of control character to terminate an outbound packet,",
9355 "  normally 13 (carriage return).",
9356 " ",
9357 "SET SEND MOVE-TO [ directory ]",
9358 "  \
9359 If a directory name is specified, then every file that is sent successfully",
9360 "  is moved to the given directory immediately after it is sent.",
9361 "  Omit the directory name to remove any previously set move-to directory.",
9362 " ",
9363 "SET SEND PACKET-LENGTH number",
9364 "  Maximum length packet to send, even if other Kermit asks for longer ones.",
9365 "  This command can not be used to force packets to be sent that are longer",
9366 "  than the length requested by the receiver.  Use this command only to",
9367 "  force shorter ones.",
9368 " ",
9369 "SET SEND PADDING number",
9370 "  Number of prepacket padding characters to send.",
9371 " ",
9372 "SET SEND PAD-CHARACTER number",
9373 "  ASCII value of control character to use for padding.",
9374 " ",
9375 "SET SEND PATHNAMES {OFF, ABSOLUTE, RELATIVE}",
9376 "  Include the path (device, directory) portion with the file name when",
9377 "  sending it as specified; ABSOLUTE means to send the whole pathname,",
9378 "  RELATIVE means to include the pathname relative to the current directory.",
9379 "  Applies to the actual filename, not to the \"as-name\".  The default is",
9380 "  OFF.",
9381 " ",
9382 "SET SEND PAUSE number",
9383 "  Milliseconds to pause between packets, normally 0.",
9384 " ",
9385
9386 #ifdef CK_PERMS
9387 "SET SEND PERMISSIONS { ON, OFF }",
9388 "  Whether to include file permissions in outbound Attribute packets.",
9389 " ",
9390 #endif /* CK_PERMS */
9391
9392 "SET SEND RENAME-TO [ template ]",
9393 "  If a template is specified, then every file that is sent successfully",
9394 "  is renamed according to the given template immediately after it is sent.",
9395 "  \
9396 The template should include variables like \\v(filename) or \\v(filenumber).",
9397 "  Omit the template to remove any template previously set.",
9398 " ",
9399 "SET SEND START-OF-PACKET number",
9400 "  ASCII value of character to mark start of outbound packet.",
9401 " ",
9402 #ifdef CK_TIMERS
9403 "SET SEND TIMEOUT number [ { DYNAMIC [ min max ] ], FIXED } ]",
9404 #else
9405 "SET SEND TIMEOUT number",
9406 #endif /* CK_TIMERS */
9407
9408 "  Number of seconds to wait for a packet before sending NAK or",
9409 #ifdef CK_TIMERS
9410 "  retransmitting.  Include the word DYNAMIC after the number in the",
9411 "  SET SEND TIMEOUT command to have Kermit compute the timeouts dynamically",
9412 "  throughout the transfer based on the packet rate.  Include the word FIXED",
9413 "  to use the \"number\" given throughout the transfer.  DYNAMIC is the",
9414 "  default.  After DYNAMIC you may include minimum and maximum values.",
9415 "  SET SEND TIMEOUT -1 FIXED means no timeouts.",
9416 #else
9417 "  retransmitting.",
9418 #endif /* CK_TIMERS */
9419 #ifdef VMS
9420 " ",
9421 "SET SEND VERSION-NUMBERS { ON, OFF }",
9422 "  If ON, include VMS version numbers in outbound filenames.  If OFF (which",
9423 "  is the default), strip version numbers.",
9424 #endif /* VMS */
9425 "" };
9426
9427 static char *hxyxfer[] = {
9428 "Syntax: SET TRANSFER (or XFER) parameter value",
9429 " ",
9430 "Choices:",
9431 " ",
9432 "SET TRANSFER BELL { OFF, ON }",
9433 "  Whether to ring the terminal bell at the end of a file transfer.",
9434 " ",
9435 #ifdef XFRCAN
9436 "SET TRANSFER CANCELLATION { OFF, ON [ <code> [ <number> ] ] }",
9437 "  OFF disables remote-mode packet-mode cancellation from the keyboard.",
9438 "  ON enables it.  The optional <code> is the control character to use for",
9439 "  cancellation; the optional <number> is how many consecutive occurrences",
9440 "  of the given control character are required for cancellation.",
9441 " ",
9442 #endif /* XFRCAN */
9443 "SET TRANSFER INTERRUPTION { ON, OFF }",
9444 "  TRANSFER INTERRUPTION is normally ON, allowing for interruption of a file",
9445 "  transfer in progress by typing certain characters while the file-transfer",
9446 "  display is active.  SET TRANSFER INTERRUPTION OFF disables interruption",
9447 "  of file transfer from the keyboard in local mode.",
9448 " ",
9449 #ifndef NOSPL
9450 "SET TRANSFER CRC-CALCULATION { OFF, ON }",
9451 "  Tells whether Kermit should accumulate a Cyclic Redundancy Check for ",
9452 "  each file transfer.  Normally ON, in which case the CRC value is available",
9453 "  in the \\v(crc16) variable after the transfer.  Adds some overhead.  Use",
9454 "  SET TRANSFER CRC OFF to disable.",
9455 " ",
9456 #endif /* NOSPL */
9457 #ifndef NOCSETS
9458 "SET TRANSFER CHARACTER-SET name",
9459 "  Selects the character set used to represent textual data in Kermit",
9460 "  packets.  Text characters are translated to/from the FILE CHARACTER-SET.",
9461 "  Choices:",
9462 " ",
9463 "  TRANSPARENT (no translation, the default)",
9464 "  ASCII",
9465 "  LATIN1 (ISO 8859-1 Latin Alphabet 1)",
9466 #ifndef NOLATIN2
9467 "  LATIN2 (ISO 8859-2 Latin Alphabet 2)",
9468 #endif /* NOLATIN2 */
9469 "  LATIN9 (ISO 8859-15 Latin Alphabet 9)",
9470 #ifdef CYRILLIC
9471 "  CYRILLIC-ISO (ISO 8859-5 Latin/Cyrillic)",
9472 #endif /* CYRILLIC */
9473 #ifdef GREEK
9474 "  GREEK-ISO (ISO 8859-7 Latin/Greek)",
9475 #endif /* GREEK */
9476 #ifdef HEBREW
9477 "  HEBREW-ISO (ISO 8859-8 Latin/Hebrew)",
9478 #endif /* HEBREW */
9479 #ifdef KANJI
9480 "  JAPANESE-EUC (JIS X 0208 Kanji + Roman and Katakana)",
9481 #endif /* KANJI */
9482 #ifdef UNICODE
9483 "  UCS-2 (ISO 10646 / Unicode 2-byte form)",
9484 "  UTF-8 (ISO 10646 / Unicode 8-bit serialized transformation format)",
9485 #endif /* UNICODE */
9486 " ",
9487 "SET TRANSFER TRANSLATION { ON, OFF }",
9488 "  Enables and disables file-transfer character-set translation.  It's",
9489 "  enabled by default.",
9490 #endif /* NOCSETS */
9491 " ",
9492 #ifdef CK_CURSES
9493 "SET TRANSFER DISPLAY { BRIEF, CRT, FULLSCREEN, NONE, SERIAL }",
9494 #else
9495 "SET TRANSFER DISPLAY { BRIEF, CRT, NONE, SERIAL }",
9496 #endif  /* CK_CURSES */
9497 "  Choose the desired format for the progress report to be displayed on",
9498 "  your screen during file transfers when Kermit is in local mode.",
9499 #ifdef CK_CURSES
9500 "  FULLSCREEN requires your terminal type be set correctly; the others",
9501 "  are independent of terminal type.",
9502 #else
9503 "  file transfer.",
9504 #endif  /* CK_CURSES */
9505 " ",
9506 "SET TRANSFER LOCKING-SHIFT { OFF, ON, FORCED }",
9507 "  Tell whether locking-shift protocol should be used during file transfer",
9508 "  to achieve 8-bit transparency on a 7-bit connection.  ON means to request",
9509 "  its use if PARITY is not NONE and to use it if the other Kermit agrees,",
9510 "  OFF means not to use it, FORCED means to use it even if the other Kermit",
9511 "  does not agree.",
9512 " ",
9513 "SET TRANSFER MODE { AUTOMATIC, MANUAL }",
9514 "  Automatic (the default) means Kermit should automatically go into binary",
9515 "  file-transfer mode and use literal filenames if the other Kermit says it",
9516 "  has a compatible file system, e.g. UNIX-to-UNIX, but not UNIX-to-DOS.",
9517 #ifdef PATTERNS
9518 "  Also, when sending files, Kermit should switch between binary and text",
9519 "  mode automatically per file based on the SET FILE BINARY-PATTERNS and SET",
9520 "  FILE TEXT-PATTERNS.",
9521 #endif /* PATTERNS */
9522 " ",
9523 #ifdef PIPESEND
9524 "SET TRANSFER PIPES { ON, OFF }",
9525 "  Enables/Disables automatic sending from / reception to command pipes when",
9526 "  the incoming filename starts with '!'.  Also see CSEND, CRECEIVE.",
9527 " ",
9528 #endif /* PIPESEND */
9529 #ifdef CK_XYZ
9530 "SET TRANSFER PROTOCOL { KERMIT, XMODEM, ... }",
9531 "  Synonym for SET PROTOCOL (q.v.).",
9532 " ",
9533 #endif /* CK_XYZ */
9534 "SET TRANSFER REPORT { ON, OFF }",
9535 "  Enables/Disables the automatic post-transfer message telling what files",
9536 "  went where from C-Kermit when it is in remote mode.  ON by default.",
9537 " ",
9538 "SET TRANSFER SLOW-START { OFF, ON }",
9539 "  ON (the default) tells Kermit, when sending files, to gradually build up",
9540 "  the packet length to the maximum negotiated length.  OFF means start",
9541 "  sending the maximum length right away.",
9542 " ",
9543 "Synonym: SET XFER.  Use SHOW TRANSFER (XFER) to see SET TRANSFER values.",
9544 "" };
9545 #endif /* NOXFER */
9546
9547 #ifdef NT
9548 static char *hxywin95[] = {
9549 "SET WIN95 8.3-FILENAMES { ON, OFF }",
9550 "  Instructs K-95 to report all filenames using 8.3 notation instead of the",
9551 "  normal long filenames.  Default is OFF",
9552 " ",
9553 "SET WIN95 ALT-GR { ON, OFF }",
9554 "  Instructs K-95, when used on MS Windows 95, to interpret the Right Alt key",
9555 "  as the Alt-Gr key.  This is necessary to work around the failure of",
9556 "  Windows 95 to properly translate non-US keyboards.  Default is OFF.",
9557 " ",
9558 "SET WIN95 KEYBOARD-TRANSLATION <character-set>",
9559 "  Specifies the character-set that Windows 95 is using to send keystrokes",
9560 "  to Kermit-95 via the keyboard input functions.  Default is Latin1-ISO.",
9561 " ",
9562 "SET WIN95 OVERLAPPED-IO { ON <requests>, OFF }",
9563 "  Determines whether or not K-95 uses Overlapped-I/O methods for reading",
9564 "  from and writing to serial and TAPI communication devices.  <requests>",
9565 "  specifies the maximum number of simultaneous write requests that may be",
9566 "  overlapped, from 1 to 30.  Default is ON.",
9567 " ",
9568 "SET WIN95 POPUPS { ON, OFF }",
9569 "  Determines whether or not Kermit 95 uses Popups to query the user for",
9570 "  necessary information such as user IDs or passwords.  Default is ON.",
9571 " ",
9572 "SET WIN95 SELECT-BUG { ON, OFF }"
9573 "  Some TCP/IP (Winsock) implementations for Windows have a defective",
9574 "  select() function.  Use this command to avoid the use of select() if",
9575 "  K95 appears to be unable to send data over TCP/IP.  Default is OFF.",
9576 ""};
9577 #endif /* NT */
9578
9579 static char *hmxybel[] = {
9580 #ifdef OS2
9581 "Syntax: SET BELL { AUDIBLE [ { BEEP, SYSTEM-SOUNDS } ], VISIBLE, NONE }",
9582 "  Specifies how incoming Ctrl-G (bell) characters are handled in CONNECT",
9583 "  mode and how command warnings are presented in command mode.  AUDIBLE",
9584 "  means either a beep or a system-sound is generated; VISIBLE means the",
9585 "  screen is flashed momentarily.",
9586 #else
9587 "Syntax: SET BELL { OFF, ON }",
9588 "  ON (the default) enables ringing of the terminal bell (beep) except where",
9589 "  it is disabled in certain circumstances, e.g. by SET TRANSFER BELL.  OFF",
9590 "  disables ringing of the bell in all circumstances, overriding any specific",
9591 "  SET xxx BELL selections.",
9592 #endif /* OS2 */
9593 ""};
9594
9595 #ifdef OS2
9596 static char *hmxymsk[] = {
9597 "SET MSKERMIT FILE-RENAMING { ON, OFF }",
9598 "  ON enables the use of MS-DOS Kermit file renaming conventions instead of",
9599 "  C-Kermit conventions.  File renaming occurs during file transfers when",
9600 "  there is a file name collision and either BACKUP or RENAME collision",
9601 "  options are active.  C-Kermit conventions preserve the original file name",
9602 "  while appending .~num~ to the end.  MS-DOS Kermit conventions restrict",
9603 "  filenames to 8.3 notation and preserve the extension.  Unique numeric",
9604 "  values overwrite the right most portion of the file name's left hand side.",
9605 " ",
9606 "SET MSKERMIT KEYCODES { ON, OFF }",
9607 "  ON enables the use of MS-DOS Kermit compatible keycodes to provide script",
9608 "  portability.",
9609 ""};
9610 #endif /* OS2 */
9611
9612 static char *hmxycd[] = {
9613 "Syntax: SET CD { HOME <path>, PATH <path>, MESSAGE { ON, OFF, FILE <list> } }"
9614 ,
9615 " ",
9616 "SET CD HOME <path>",
9617 "  Specified which directory to change to if CD or KCD is given without a",
9618 "  pathname.  If this command is not given, your login or HOME directory is",
9619 "  used.",
9620 " ",
9621 "SET CD PATH <path>",
9622 "  Overrides normal CDPATH environment variable, which tells the CD command",
9623 "  where to look for directories to CD to if you don't specify them fully.",
9624 "  The format is:",
9625 " ",
9626 #ifdef UNIXOROSK
9627 "    set cd path :directory:directory:...",
9628 " ",
9629 "  in other words, a list of directories separated by colons, with a colon",
9630 "  at the beginning, e.g.:",
9631 " ",
9632 "    set cd path :/usr/olga:/usr/ivan/public:/tmp",
9633 #else
9634 #ifdef OS2
9635 "    set cd path disk:directory;disk:directory;...",
9636 " ",
9637 "  just like the DOS PATH; in other words, a list of disk:directory names",
9638 "  separated by semicolons, e.g.:",
9639 " ",
9640 "    SET CD PATH C:\\K95;C:\\HOME;C:\\LOCAL;C:\\",
9641 #else
9642 #ifdef VMS
9643 "    set cd path directory,directory,...",
9644 " ",
9645 "  in other words, a list of directory specifications or logical names that",
9646 "  represent them, e.g.:",
9647 " ",
9648 "    SET CD PATH SYS$LOGIN:,$DISK1:[OLGA],$DISK2[SCRATCH.IVAN].",
9649 #else
9650 "  (unknown for this platform)",
9651 #endif /* VMS */
9652 #endif /* OS2 */
9653 #endif /* UNIXOROSK */
9654 " ",
9655 "SET CD MESSAGE { ON, OFF }",
9656 "  Default is OFF.  When ON, this tells Kermit to look for a file with a",
9657 "  certain name in any directory that you CD to, and if it finds one, to",
9658 "  display it on your screen when you give the CD command.  The filename,",
9659 "  or list of names, is given in the SET CD MESSAGE FILE command.",
9660 " ",
9661 "SET CD MESSAGE FILE name",
9662 "  or:",
9663 "SET CD MESSAGE FILE {{name1}{name2}...{name8}}",
9664 "  Specify up to 8 filenames to look for when when CDing to a new directory",
9665 "  and CD MESSAGE is ON.  The first one found, if any, in the new directory",
9666 #ifndef DFCDMSG
9667 "  is displayed.",
9668 #else
9669 "  is displayed.  The default list is:",
9670 " ",
9671 #ifdef UNIXOROSK
9672 "   {{./.readme}{README.TXT}{READ.ME}}",
9673 #else
9674 "   {{README.TXT}{READ.ME}}",
9675 #endif /* UNIXOROSK */
9676 " ",
9677 #endif /* DFCDMSG */
9678 #ifndef NOSERVER
9679 "Synonym: SET SERVER CD-MESSAGE FILE.",
9680 #endif /* NOSERVER */
9681 " ",
9682 "Type SHOW CD to view current CD settings.  Also see HELP SET SERVER.",
9683 ""
9684 };
9685
9686 #ifndef NOIKSD
9687 static char * hsetiks[] = {
9688 #ifdef OS2
9689 "SET IKS ANONYMOUS ACCOUNT <username>",
9690 "  On Windows NT/2000 this is the account that will be used to allow",
9691 "  anonymous access to the system.  This account MUST have no password",
9692 "  and its privileges should be restricted to only allow those operations",
9693 "  which should be permitted to unknown users.  In practice this means",
9694 "  List Directories and Read-Execute privileges only.  If a directory",
9695 "  is configured for Write privileges then Read privileges should be",
9696 "  denied for that directory.  Otherwise, your system will become used",
9697 "  by software pirates.  If this command is not specified in the IKSD.KSC",
9698 "  file the username \"GUEST\" is used by default.  This command has no",
9699 "  effect on Windows 95/98.",
9700 " ",
9701 #endif /* OS2 */
9702 "SET IKS ANONYMOUS INITFILE filename",
9703 #ifdef OS2
9704 "  The initialization file to be executed for anonymous logins.  By default",
9705 "  it is K95.INI in the home directory associated with the ANNONYMOUS account."
9706 ,
9707 "  Any filename that you specify here must be readable by the ANONYMOUS",
9708 "  account and if a SET IKS ANONYMOUS ROOT command was given, exist within",
9709 "  the restricted directory tree.  This option is independent of the SET IKS",
9710 "  INITFILE command which applies only to real users.",
9711 #else
9712 "  The initialization file to be executed for anonymous logins.  By default",
9713 "  it is .kermrc in the anonymous root directory.  This option is independent",
9714 "  of the SET IKS INITFILE command which applies only to real users.",
9715 #endif /* OS2 */
9716 " ",
9717 "SET IKS ANONYMOUS LOGIN { ON, OFF }",
9718 #ifdef OS2
9719 "  Whether anonymous logins are allowed.  By default they are NOT allowed,",
9720 "  so this option need be included only to allow them (or for clarity, to",
9721 "  emphasize that they are not allowed).  Anonymous login occurs when the",
9722 "  username \"anonymous\" is specified with any password (as with ftpd).",
9723 "  In order for anonymous logins to succeed on Windows NT/2000, the",
9724 "  ANONYMOUS account must be enabled.",
9725 " ",
9726 "  On Windows NT and 2000, anonymous users have the same access rights as",
9727 "  the ANONYMOUS account.  In Windows 95/98, anonymous users, just like any",
9728 "  other users, have full access rights to your entire PC, since Windows 95",
9729 "  and 98 include no security features.  For this reason, if you are allowing",
9730 "  anonymous logins, be sure to also SET an IKS ANONYMOUS ROOT directory to",
9731 "  restrict anonymous users' file access.",
9732 " ",
9733 "  Anonymous user permissions may be restricted via the specification of ",
9734 "  DISABLE commands in the ANONYMOUS initfile.  Anonymous users are not ",
9735 "  permitted to execute an ENABLE command.  Anonymous users are also prevented"
9736 ,
9737 "  from SHOWing sensitive data about the operating system or the IKS",
9738 "  configuration.",
9739 #else
9740 "  Whether anonymous logins are allowed. By default they are allowed, so this",
9741 "  option need be included only to disallow them (or for clarity, to emphasize"
9742 ,
9743 "  they are allowed). Anonymous login occurs when the username \"anonymous\"",
9744 "  or \"ftp\" is given, with any password (as with ftpd).",
9745 #endif /* OS2 */
9746 " ",
9747 "SET IKS ANONYMOUS ROOT <directory>",
9748 "  Specifies a directory tree to which anonymous users are restricted after",
9749 "  login.",
9750 " ",
9751 "SET IKS BANNERFILE <filename>",
9752 "  The name of a file containing a message to be printed after the user logs",
9753 "  in, in place of the normal message (copyright notice, \"Type HELP or ? for",
9754 "  help\", etc).",
9755 " ",
9756 "SET IKS CDFILE <filelist>",
9757 "  When cdmessage is on, this is the name of the \"read me\" file to be shown."
9758 ,
9759 "  Normally you would specify a relative (not absolute) name, since the file",
9760 "  is opened using the literal name you specified, after changing to the new",
9761 "  directory.  Example:",
9762 " ",
9763 "    SET IKS CDFILE READ.ME",
9764 " ",
9765 "  You can also give a list of up to 8 filenames by (a) enclosing each",
9766 "  filename in braces, and (b) enclosing the entire list in braces.  Example:",
9767 " ",
9768 "    SET IKS CDFILE {{READ.ME}{aareadme.txt}{README}{read-this-first}}",
9769 " ",
9770 "  When a list is given, it is searched from left to right and the first",
9771 "  file found is displayed.",
9772 " ",
9773 "SET IKS CDMESSAGE {ON, OFF, 0, 1, 2}",
9774 "  For use in the Server-Side Server configuration; whenever the client",
9775 "  tells the server to change directory, the server sends the contents of a",
9776 "  \"read me\" file to the client's screen.  This feature is ON by default,",
9777 "  and operates in client/server mode only when ON or 1.  If set to 2 or",
9778 "  higher, it also operates when the CD command is given at the IKSD> prompt.",
9779 "  Synonym: SET IKS CDMSG.",
9780 " ",
9781 "SET IKS DATABASE { ON, OFF }",
9782 "  This command determines whether entries are inserted into the SET IKS",
9783 "  DBFILE (IKSD active sessions database).",
9784 " ",
9785 "SET IKS DBFILE <filename>",
9786 "  Specifies the file which should be used for storing runtime status",
9787 #ifdef OS2
9788 "  information about active connections.  The default is a file called",
9789 "  \"iksd.db\" in the WINDOWS directory.",
9790 #else
9791 #ifdef UNIX
9792 "  information about active connections.  The default is a file called",
9793 "  \"iksd.db\" in the /var/log directory.",
9794 #else
9795 "  information about active connections.",
9796 #endif /* UNIX */
9797 #endif /* OS2 */
9798 " ",
9799 #ifdef OS2
9800 "SET IKS DEFAULT-DOMAIN <domain-name>",
9801 "  A userid on Windows is of the form DOMAIN\\\\userid.  This command",
9802 "  determines which domain will be searched for the userid if a domain",
9803 "  is not specified by the user.  On Windows 95/98 when User-level",
9804 "  access is activated in the Network Control Panel, the default ",
9805 "  domain will be automatically set.  If the default domain is not",
9806 "  specified, accounts on the local machine will take precedence over",
9807 "  accounts in Domains to which the local machine belongs.",
9808 #endif /* OS2 */
9809 " ",
9810 "SET IKS HELPFILE <filename>",
9811 "  Specifies the name of a file to be displayed if the user types HELP",
9812 "  (not followed by a specific command or topic), in place of the built-in",
9813 "  top-level help text.  The file need not fit on one screen; more-prompting",
9814 "  is used if the file is more than one screen long if COMMAND MORE-PROMPTING",
9815 "  is ON, as it is by default.",
9816 " ",
9817 "SET IKS INITFILE <filename>",
9818 "  Execute <filename> rather than the normal initialization file for real",
9819 "  users; this option does not apply to anonymous users.",
9820 " ",
9821 "SET IKS NO-INITFILE { ON, OFF }",
9822 "  Do not execute an initialization file, even if a real user is logging in.",
9823 " ",
9824 "SET IKS SERVER-ONLY { ON, OFF }",
9825 "  If this option is included on the IKSD command line, the Client Side Server"
9826 ,
9827 "  configuration is disabled, and the user will not get a Username: or",
9828 "  Password: prompt, and will not be able to access the IKSD command prompt.",
9829 "  A FINISH command sent to the IKSD will log it out and close the",
9830 "  connection, rather than returning it to its prompt.",
9831 " ",
9832 "SET IKS TIMEOUT <number>",
9833 "  This sets a limit (in seconds) on the amount of time the client has to log",
9834 "  in once the connection is made.  If successful login does not occur within",
9835 "  the given number of seconds, the connection is closed.  The default timeout"
9836 ,
9837 "  is 300 seconds (5 minutes).  A value of 0 or less indicates there is to be",
9838 "  no limit.",
9839 " ",
9840 "SET IKS USERFILE <filename>",
9841 #ifdef UNIX
9842 "  This file contains a list of local usernames that are to be denied access",
9843 "  to Internet Kermit Service.  The default is /etc/ftpusers.  This can be the"
9844 ,
9845 "  same file that is used by wuftpd, and the syntax is the same: one username",
9846 "  per line; lines starting with \"#\" are ignored.  Use this option to",
9847 "  specify the name of a different forbidden-user file, or use",
9848 "  \"set iks userfile /dev/null\" to disable this feature in case there is a",
9849 "   /etc/ftpusers file but you don't want to use it.",
9850 #else
9851 "  This file contains a list of local usernames that are to be denied access",
9852 "  to Internet Kermit Service.  The syntax is: one username per line; lines",
9853 "  starting with \"#\" are ignored.",
9854 #endif /* UNIX */
9855 " ",
9856 "SET IKS XFERLOG { ON, OFF }",
9857 #ifdef UNIX
9858 "  Whether a file-transfer log should be kept.  Off by default.  If \"on\",",
9859 "  but no SET IKSD XFERFILE command is given, /var/log/iksd.log is used.",
9860 #else
9861 "  Whether a file-transfer log should be kept.  Off by default.",
9862 #endif /* UNIX */
9863 " ",
9864 "SET IKS XFERFILE <filename>",
9865 "  Use this option to specify an iksd log file name.  If you include this",
9866 "  option, it implies SET IKS XFERFILE ON.",
9867 ""
9868 };
9869 #endif /* NOIKSD */
9870
9871 /*  D O H S E T  --  Give help for SET command  */
9872
9873 int
9874 dohset(xx) int xx; {
9875     int x;
9876
9877     if (xx == -3) return(hmsga(hmhset));
9878     if (xx < 0) return(xx);
9879
9880 #ifdef NEWFTP
9881     if (xx == XYFTPX)
9882       return(dosetftphlp());
9883     if (xx == XYGPR)
9884       return(hmsga(hmxygpr));
9885 #endif /* NEWFTP */
9886
9887     if ((x = cmcfm()) < 0) return(x);
9888     switch (xx) {
9889 #ifndef NOIKSD
9890       case XYIKS:
9891         return(hmsga(hsetiks));
9892 #endif /* NOIKSD */
9893
9894 case XY_REN:
9895   return(hmsg("SET RENAME LIST { ON, OFF }\n\
9896   Tells whether the RENAME command should list its results by default.\n\n\
9897 SET RENAME COLLISION { FAIL, PROCEED, OVERWRITE }\n\
9898   Establishes the default action when renaming a file would destroy an\n\
9899   existing file.  See HELP RENAME."));
9900
9901 case XYATTR:
9902     return(hmsga(hsetat));
9903
9904 case XYBACK:
9905     return(hmsga(hsetbkg));
9906
9907 case XYBELL:
9908     return(hmsga(hmxybel));
9909
9910 #ifdef OS2
9911 case XYPRTY:
9912     return(hmsg("SET PRIORITY { REGULAR, FOREGROUND-SERVER, TIME-CRITICAL }\n\
9913   Specifies at which priority level the communication and screen update\n\
9914   threads should operate.  The default value is FOREGROUND-SERVER."));
9915
9916 case XYMSK:
9917     return(hmsga(hmxymsk));
9918 #endif /* OS2 */
9919
9920 #ifdef DYNAMIC
9921 case XYBUF:
9922     return(hmsga(hsetbuf));
9923 #endif /* DYNAMIC */
9924
9925 #ifndef NOLOCAL
9926 case XYCARR:
9927     return(hmsga(hsetcar));
9928 #endif /* NOLOCAL */
9929
9930 #ifndef NOSPL
9931 case XYCASE:
9932     return(hmsg("Syntax: SET CASE { ON, OFF }\n\
9933   Tells whether alphabetic case is significant in string comparisons\n\
9934   done by INPUT, IF, and other commands.  This setting is local to the\n\
9935   current macro or command file, and inherited by subordinates."));
9936
9937 #endif /* NOSPL */
9938
9939 case XYCMD:
9940     return(hmsga(hsetcmd));
9941
9942 case XYIFD:
9943     return(hmsg("Syntax: SET INCOMPLETE { DISCARD, KEEP }\n\
9944   Whether to discard or keep incompletely received files, default is KEEP."));
9945
9946 #ifndef NOSPL
9947 case XYINPU:
9948     return(hmsga(hxyinp));
9949 #endif /* NOSPL */
9950
9951 case XYCHKT:
9952     return(hmsga(hmxychkt));
9953
9954 #ifndef NOSPL
9955 case XYCOUN:
9956     return(hmsg("Syntax:  SET COUNT number\n\
9957  Example: SET COUNT 5\n\
9958   Set up a loop counter, for use with IF COUNT.  Local to current macro\n\
9959   or command file, inherited by subordinate macros and command files."));
9960 #endif /* NOSPL */
9961
9962 case XYDEBU:
9963     return(hmsga(hmxydeb));
9964
9965 case XYDFLT:
9966     return(hmsg("Syntax: SET DEFAULT directory\n\
9967   Change directory.  Equivalent to CD command."));
9968
9969 case XYDELA:
9970     return(hmsg("Syntax: SET DELAY number\n\
9971   Number of seconds to wait before sending first packet after SEND command."));
9972
9973 #ifndef NODIAL
9974 case XYDIAL:
9975     return(hmsga(hmxydial));
9976 #endif /* NODIAL */
9977
9978 #ifdef UNIX
9979 case XYSUSP:
9980     return(hmsg("Syntax: SET SUSPEND { OFF, ON }\n\
9981   Disables SUSPEND command, suspend signals, and <esc-char>Z during CONNECT.")
9982            );
9983 #endif
9984
9985 #ifndef NOSCRIPT
9986 case XYSCRI:
9987     return(hmsg("Syntax: SET SCRIPT ECHO { OFF, ON }\n\
9988   Disables/Enables echoing of SCRIPT command operation."));
9989 #endif /* NOSCRIPT */
9990
9991 case XYTAKE:
9992     return(hmsga(hxytak));
9993
9994 #ifndef NOLOCAL
9995 case XYTERM:
9996     return(hmsga(hxyterm));
9997
9998 case XYDUPL:
9999     return(hmsg("Syntax: SET DUPLEX { FULL, HALF }\n\
10000   During CONNECT: FULL means remote host echoes, HALF means Kermit\n\
10001   does its own echoing."));
10002
10003 case XYLCLE:
10004     return(hmsg("Syntax: SET LOCAL-ECHO { OFF, ON }\n\
10005   During CONNECT: OFF means remote host echoes, ON means Kermit\n\
10006   does its own echoing.  Synonym for SET DUPLEX { FULL, HALF }."));
10007
10008 case XYESC:
10009     return(hmsga(hxyesc));              /* SET ESCAPE */
10010 #endif /* NOLOCAL */
10011
10012 case XYPRTR:                            /* SET PRINTER */
10013     return(hmsga(hxyprtr));
10014
10015 #ifdef OS2
10016 #ifdef BPRINT
10017 case XYBDCP:                            /* SET BPRINTER */
10018     return(hmsga(hxybprtr));
10019 #endif /* BPRINT */
10020 #endif /* OS2 */
10021
10022 case XYEXIT:
10023     return(hmsga(hxyexit));
10024
10025 case XYFILE:
10026     return(hmsga(hmxyf));
10027
10028 case XYFLOW:
10029     return(hmsga(hmxyflo));
10030
10031 case XYHAND:
10032    return(hmsga(hmxyhsh));
10033
10034 #ifdef NETCONN
10035
10036 case XYHOST:
10037     return(hmsga(hxyhost));
10038
10039 case XYNET:
10040     return(hmsga(hxynet));
10041
10042 #ifndef NOTCPOPTS
10043 #ifdef SOL_SOCKET
10044 case XYTCP:
10045     return(hmsga(hxytcp));
10046 #endif /* SOL_SOCKET */
10047 #endif /* NOTCPOPTS */
10048
10049 #ifdef ANYX25
10050 case XYX25:
10051     return(hmsga(hxyx25));
10052
10053 #ifndef IBMX25
10054 case XYPAD:
10055     return(hmsg("Syntax: SET PAD name value\n\
10056 Set a PAD X.3 parameter with a desired value."));
10057 #endif /* IBMX25 */
10058 #endif /* ANYX25 */
10059 #endif /* NETCONN */
10060
10061 #ifndef NOSPL
10062 case XYOUTP:
10063     return(hmsga(hxyout));
10064 #endif /* NOSPL */
10065
10066 #ifndef NOSETKEY
10067 case XYKEY:                             /* SET KEY */
10068     return(hmsga(hmhskey));
10069 #endif /* NOSETKEY */
10070
10071 #ifndef NOCSETS
10072 case XYLANG:
10073     return(hmsg("Syntax: SET LANGUAGE name\n\
10074   Selects language-specific translation rules for text-mode file transfers.\n\
10075   Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one\n\
10076   of these is ASCII."));
10077 #endif /* NOCSETS */
10078
10079 case XYLINE:
10080     printf("\nSyntax: SET LINE (or SET PORT) [ switches ] [ devicename ]\n\
10081   Selects a serial-port device to use for making connections.\n");
10082 #ifdef OS2
10083 #ifdef NT
10084     printf("\n");
10085     printf(
10086 "  You may access communication ports by the traditional \"DOS\" port name\n");
10087     printf(
10088 "  (e.g. SET PORT COM1) or by the Microsoft Telephony modem name from the\n");
10089     printf(
10090 "  Modems folder of the Control Panel (e.g. SET PORT TAPI). If one method\n");
10091     printf("  doesn't work, try the other.\n\n");
10092 #endif /* NT */
10093 #else  /* OS2 */
10094     printf("  Typical device name for this platform: %s.\n",ttgtpn());
10095     printf("  The default device name is %s (i.e. none).\n",dftty);
10096     if (!dfloc) {
10097         printf(
10098 "  If you do not give a SET LINE command or if you give a SET LINE command\n");
10099         printf(
10100 "  with no device name, or if you specify %s as the device name,\n",dftty);
10101         printf(
10102 "  Kermit will be in \"remote mode\", suitable for use on the far end of a\n");
10103         printf(
10104 "  connection, e.g. as the file-transfer partner of your desktop communication\
10105 \n");
10106         printf(
10107 "  software.  If you SET LINE to a specific device other than %s,\n", dftty);
10108         printf(
10109 "  Kermit is in \"local mode\", suitable for making a connection to another\n"
10110               );
10111         printf(
10112 "  computer.  SET LINE alone resets Kermit to remote mode.\n");
10113     }
10114 #endif /* OS2 */
10115         printf(
10116 "  To use a modem to dial out, first SET MODEM TYPE (e.g., to USR), then\n");
10117     printf(
10118 #ifdef OS2
10119 "  SET PORT COMx (or SET PORT TAPI), SET SPEED, then give a DIAL command.\n");
10120 #else
10121 "  SET LINE xxx, then SET SPEED, then give a DIAL command.\n");
10122 #endif /* OS2 */
10123     printf(
10124 #ifdef OS2
10125 "  For direct null-modem connections use SET MODEM TYPE NONE, SET PORT COMx,\n"
10126 #else
10127 "  For direct null-modem connections, use SET MODEM TYPE NONE, SET LINE xxx,\n"
10128 #endif /* OS2 */
10129     );
10130     printf(
10131 "  then SET FLOW, SET SPEED, and CONNECT.\n");
10132     printf(
10133 "\nOptional switches:\n\
10134   /CONNECT - Enter CONNECT mode automatically if SET LINE succeeds.\n");
10135     printf(
10136 "  /SERVER  - Enter server mode automatically if SET LINE succeeds.\n");
10137 #ifdef VMS
10138     printf(
10139 "  /SHARE   - Open the device in shared mode.\n");
10140     printf(
10141 "  /NOSHARE - Open the device in exclusive mode.\n");
10142 #endif /* VMS */
10143     printf("\n");
10144     printf(
10145 "Also see HELP SET MODEM, HELP SET DIAL, HELP SET SPEED, HELP SET FLOW.\n");
10146     return(0);
10147
10148 #ifndef NOSPL
10149 case XYMACR:
10150     return(hmsga(hxymacr));
10151 #endif /* NOSPL */
10152
10153 #ifndef NODIAL
10154 case XYMODM:
10155     return(hmsga(hxymodm));
10156 #endif /* NODIAL */
10157
10158 case XYPARI:
10159     return(hmsga(hxypari));
10160
10161 case XYPROM:
10162     return(hmsga(hmxyprm));
10163
10164 case XYQUIE:
10165     return(hmsg("Syntax: SET QUIET {ON, OFF}\n\
10166   Normally OFF.  ON disables most information messages during interactive\n\
10167   operation."));
10168
10169 #ifdef CK_SPEED
10170 case XYQCTL:
10171     return(hmsga(hmxyqctl));
10172 #endif /* CK_SPEED */
10173
10174 case XYRETR:
10175     return(hmsg("Syntax: SET RETRY number\n\
10176   In Kermit protocol file transfers: How many times to retransmit a\n\
10177   particular packet before giving up; 0 = no limit."));
10178
10179 #ifndef NOLOCAL
10180 case XYSESS:
10181 #ifdef UNIX
10182     return(hmsg(
10183 "Syntax:\n\
10184  SET SESSION-LOG { BINARY, DEBUG, NULL-PADDED, TEXT, TIMESTAMPED-TEXT }\n\
10185   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10186   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10187   also includes Telnet negotiations on TCP/IP connections."));
10188 #else
10189 #ifdef datageneral
10190     return(hmsg(
10191 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10192   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10193   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10194   also includes Telnet negotiations on TCP/IP connections."));
10195 #else
10196 #ifdef STRATUS
10197     return(hmsg(
10198 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10199   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10200   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10201   also includes Telnet negotiations on TCP/IP connections."));
10202 #else
10203 #ifdef AMIGA
10204     return(hmsg(
10205 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10206   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10207   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10208   also includes Telnet negotiations on TCP/IP connections."));
10209 #else
10210 #ifdef GEMDOS
10211     return(hmsg(
10212 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10213   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10214   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10215   also includes Telnet negotiations on TCP/IP connections."));
10216 #else
10217 #ifdef OS2
10218     return(hmsg(
10219 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10220   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10221   out NUL and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10222   also includes Telnet negotiations on TCP/IP connections."));
10223 #else
10224 #ifdef VMS
10225     return(hmsg(
10226 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10227   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10228   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10229   also includes Telnet negotiations on TCP/IP connections."));
10230 #else
10231 #ifdef OSK
10232     return(hmsg(
10233 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10234   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10235   out LF, NUL and XON/XOFF characters."));
10236 #else
10237 #ifdef MAC
10238     return(hmsg(
10239 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10240   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10241   out LF, NUL and XON/XOFF characters."));
10242 #endif /* MAC */
10243 #endif /* OSK */
10244 #endif /* OS2 */
10245 #endif /* VMS */
10246 #endif /* GEMDOS */
10247 #endif /* AMIGA */
10248 #endif /* STRATUS */
10249 #endif /* datageneral */
10250 #endif /* OS2ORUNIX */
10251
10252 case XYSPEE:
10253 #ifdef OS2
10254
10255     return(hmsg("Syntax: SET SPEED number\n\
10256   Speed for serial-port communication device specified in most recent\n\
10257   SET PORT command, in bits per second.  Type SET SPEED ? for a list of\n\
10258   possible speeds."));
10259 #else
10260     return(hmsg("Syntax: SET SPEED number\n\
10261   Speed for serial-port communication device specified in most recent\n\
10262   SET LINE command, in bits per second.  Type SET SPEED ? for a list of\n\
10263   possible speeds.  Has no effect on job's controlling terminal."));
10264 #endif /* OS2 */
10265 #endif /* NOLOCAL */
10266
10267 #ifndef NOXFER
10268 case XYRECV:
10269     return(hmsga(hxyrcv));
10270 case XYSEND:
10271     return(hmsga(hxysnd));
10272 case XYREPT:
10273     return(hmsga(hxyrpt));
10274 #endif /* NOXFER */
10275
10276 #ifndef NOSERVER
10277 case XYSERV:
10278     return(hmsga(hsetsrv));
10279 #endif /* NOSERVER */
10280
10281 #ifdef TNCODE
10282 case XYTEL:
10283     return(hmsga(hxytel));
10284
10285 case XYTELOP:
10286     return(hmsga(hxytopt));
10287 #endif /* TNCODE */
10288
10289 #ifndef NOXMIT
10290 case XYXMIT:
10291     return(hmsga(hsetxmit));
10292 #endif /* NOXMIT */
10293
10294 #ifndef NOCSETS
10295 case XYUNCS:
10296     return(hmsg("Syntax: SET UNKNOWN-CHAR-SET action\n\
10297   DISCARD (default) means reject any arriving files encoded in unknown\n\
10298   character sets.  KEEP means to accept them anyway."));
10299 #endif /* NOCSETS */
10300
10301 #ifdef UNIX
10302 case XYWILD:
10303     return(hmsga(hxywild));
10304 #endif /* UNIX */
10305
10306 #ifndef NOXFER
10307 case XYWIND:
10308     return(hmsga(hxywind));
10309 case XYXFER:
10310     return(hmsga(hxyxfer));
10311 #endif /* NOXFER */
10312
10313 #ifndef NOLOCAL
10314 #ifdef OS2MOUSE
10315 case XYMOUSE:
10316     return(hmsga(hxymouse));
10317 #endif /* OS2MOUSE */
10318 #endif /* NOLOCAL */
10319
10320 case XYALRM:
10321     return(hmsg("Syntax: SET ALARM [ { seconds, hh:mm:ss } ]\n\
10322   Number of seconds from now, or time of day, after which IF ALARM\n\
10323   will succeed.  0, or no time at all, means no alarm."));
10324
10325 case XYPROTO:
10326     return(hmsga(hxyxyz));
10327
10328 #ifdef CK_SPEED
10329 case XYPREFIX:
10330     return(hmsg("Syntax: SET PREFIXING { ALL, CAUTIOUS, MINIMAL }\n\
10331   \
10332 Selects the degree of control-character prefixing.  Also see HELP SET CONTROL."
10333 ));
10334 #endif /* CK_SPEED */
10335
10336 #ifdef OS2
10337 case XYLOGIN:
10338     return(hmsg("Syntax: SET LOGIN { USERID, PASSWORD, PROMPT } <text>\n\
10339   Provides access information for use by login scripts."));
10340 #endif /* OS2 */
10341
10342 #ifndef NOSPL
10343 case XYTMPDIR:
10344     return(hmsg("Syntax: SET TEMP-DIRECTORY [ <directory-name> ]\n\
10345   Overrides automatic assignment of \\v(tmpdir) variable."));
10346 #endif /* NOSPL */
10347
10348 #ifdef OS2
10349 case XYTITLE:
10350     return(hmsg("Syntax: SET TITLE <text>\n\
10351   Sets window title to text instead of using current host/port name."));
10352 #endif /* OS2 */
10353
10354 #ifndef NOPUSH
10355 #ifndef NOFRILLS
10356 case XYEDIT:
10357     return(hmsg("Syntax: SET EDITOR pathname [ options ]\n\
10358   Specifies the name of your preferred editor, plus any command-line\n\
10359   options.  SHOW EDITOR displays it."));
10360 #endif /* NOFRILLS */
10361 #endif /* NOPUSH */
10362
10363 #ifdef BROWSER
10364 case XYBROWSE:
10365 #ifdef NT
10366     return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
10367   Specifies the name of your preferred browser plus any command-line\n\
10368   options.  SHOW BROWSER displays it.  Omit pathname and options to use\n\
10369   ShellExecute."));
10370 #else
10371     return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
10372   Specifies the name of your preferred browser plus any command-line\n\
10373   options.  SHOW BROWSER displays it."));
10374 #endif /* NT */
10375 #endif /* BROWSER */
10376
10377 #ifdef CK_TAPI
10378 case XYTAPI:
10379     return(hmsga(hxytapi));
10380 #endif /* CK_TAPI */
10381
10382 #ifdef NT
10383 case XYWIN95:
10384     return(hmsga(hxywin95));
10385 #endif /* NT */
10386
10387 #ifndef NOSPL
10388 case XYFUNC:
10389     return(hmsga(hxyfunc));
10390 #endif /* NOSPL */
10391
10392 #ifdef CK_AUTHENTICATION
10393 case XYAUTH:
10394     return(hmsga(hmxyauth));
10395 #else /* CK_AUTHENTICATION */
10396 #ifdef CK_SSL
10397 case XYAUTH:
10398     return(hmsga(hmxyauth));
10399 #endif /* CK_SSL */
10400 #endif /* CK_AUTHENTICATION */
10401
10402 #ifdef BROWSER
10403 case XYFTP:
10404     return(hmsg("Syntax: SET FTP [ pathname [ options ] ]\n\
10405   Specifies the name of your ftp client, plus any command-line options.\n\
10406   SHOW FTP displays it."));
10407 #endif /* BROWSER */
10408
10409 case XYSLEEP:
10410     return(hmsg("Syntax: SET SLEEP CANCELLATION { ON, OFF }\n\
10411   Tells whether SLEEP (PAUSE) or WAIT commands can be interrupted from the\n\
10412   keyboard; ON by default."));
10413
10414 case XYCD:
10415     return(hmsga(hmxycd));
10416
10417 case XYSERIAL:
10418     return(hmsg("Syntax: SET SERIAL dps\n\
10419   d is data length in bits, 7 or 8; p is first letter of parity; s is stop\n\
10420   bits, 1 or 2.  Examples: \"set serial 7e1\", \"set serial 8n1\"."));
10421
10422 #ifdef HWPARITY
10423 case XYSTOP:
10424     return(hmsg("Syntax: SET STOP-BITS { 1, 2 }\n\
10425   Number of stop bits to use on SET LINE connections, normally 1."));
10426 #endif /* HWPARITY */
10427
10428 #ifndef NOLOCAL
10429 case XYDISC:
10430     return(hmsg("Syntax: SET DISCONNECT { ON, OFF }\n\
10431   Whether to close and release a SET LINE device automatically upon\n\
10432   disconnection; OFF = keep device open (default); ON = close and release."));
10433 #endif /* NOLOCAL */
10434
10435 #ifdef STREAMING
10436 case XYSTREAM:
10437     return(hmsg("Syntax: SET STREAMING { ON, OFF, AUTO }\n\
10438   Tells Kermit whether streaming protocol can be used during Kermit file\n\
10439   transfers.  Default is AUTO, meaning use it if connection is reliable."));
10440 #endif /* STREAMING */
10441
10442 case XYRELY:
10443     return(hmsg("Syntax: SET RELIABLE { ON, OFF, AUTO }\n\
10444   Tells Kermit whether its connection is reliable.  Default is AUTO,\n\
10445   meaning Kermit should figure it out for itself."));
10446
10447 case XYCLEAR:
10448     return(hmsg("Syntax: SET CLEAR-CHANNEL { ON, OFF, AUTO }\n\
10449   Tells Kermit whether its connection is transparent to all 8-bit bytes.\n\
10450   Default is AUTO, meaning Kermit figures it out from the connection type.\n\
10451   When both sender and receiver agree channel is clear, SET PREFIXING NONE\n\
10452   is used automatically."));
10453
10454 #ifdef TLOG
10455 case XYTLOG:
10456     return(hmsg("Syntax: SET TRANSACTION-LOG { BRIEF, FTP, VERBOSE }\n\
10457   Selects the transaction-log format; BRIEF and FTP have one line per file;\n\
10458   FTP is compatible with FTP log.  VERBOSE (the default) has more info."));
10459 #endif /* TLOG */
10460
10461 case XYOPTS:
10462     return(hmsg("Syntax: SET OPTIONS command [ switches... ]\n\
10463   For use with commands that have switches; sets the default switches for\n\
10464   the given command.  Type SET OPTIONS ? for a list of amenable commands."));
10465
10466 #ifndef NOSPL
10467 case XYTIMER:
10468     return(hmsga(hmxytimer));
10469 #endif /* NOSPL */
10470
10471 #ifdef CKROOT
10472   case XYROOT:
10473     return(hmsga(hmxxchroot));
10474 #endif /* XYROOT */
10475
10476 #ifdef ANYSSH
10477   case XYSSH:
10478     return(hmsga(hmxyssh));
10479 #endif /* ANYCMD */
10480
10481 #ifdef LOCUS
10482   case XYLOCUS:
10483     return(hmsga(hmxylocus));
10484 #endif /* LOCUS */
10485
10486 #ifdef OS2
10487 #ifdef KUI
10488   case XYGUI:
10489     return(hmsga(hmxygui));
10490 #endif /* KUI */
10491 #endif /* OS2 */
10492
10493   case XYMATCH:
10494     return(hmsga(hmxymatch));
10495
10496 #ifndef NOSEXP
10497   case XYSEXP:
10498     return(hmsga(hmxysexp));
10499 #endif  /* NOSEXP */
10500
10501 #ifndef NOSPL
10502   case XYVAREV:
10503     return(hmsg("Syntax: SET VARIABLE-EVALUATION { RECURSIVE, SIMPLE }\n\
10504   Tells Kermit weather to evaluate \\%x and \\&x[] variables recursively\n\
10505   (which is the default for historical reasons) or by simple string\n\
10506   replacement, which lets you use these variables safely to store strings\n\
10507   (such as Windows pathnames) that might contain backslashes."));
10508 #endif  /* NOSPL */
10509
10510 default:
10511     printf("Not available - \"%s\"\n",cmdbuf);
10512     return(0);
10513     }
10514 }
10515
10516 #ifndef NOSPL
10517 static char * hfsplit[] = {
10518 "Function \\fsplit(s1,&a,s2,s3,n2,n3) - Assigns string words to an array.",
10519 "  s1 = source string.",
10520 "  &a = array designator.",
10521 "  s2 = optional break set.",
10522 "  s3 = optional include set (or ALL, CSV, or TSV).",
10523 "  n2 = optional grouping mask.",
10524 "  n3 = optional separator flag:",
10525 "   0 = collapse adjacent separators;",
10526 "   1 = don't collapse adjacent separators.",
10527 " ",
10528 "  \\fsplit() breaks the string s1 into \"words\" as indicated by the other",
10529 "  parameters, assigning them to given array, if any.  If the specified",
10530 "  already exists, it is recycled; if no array is specified, the count is",
10531 "  returned but no array is created.  All arguments are optional",
10532 "  (\\fsplit() with no arguments returns 0).",
10533 " ",
10534 "  The BREAK SET is the set of all characters that separate words. The",
10535 "  default break set is all characters except ASCII letters and digits.",
10536 "  ASCII (C0) control characters are treated as break characters by default,",
10537 "  as are spacing and punctuation characters, brackets, and so on, and",
10538 "  all 8-bit characters.",
10539 " ",
10540 "  The INCLUDE SET is the set of characters that are to be treated as ",
10541 "  parts of words even though they normally would be separators.  The",
10542 "  default include set is empty.  Three special symbolic include sets are",
10543 "  also allowed:",
10544 " ",
10545 "    ALL (meaning include all bytes that are not in the break set)",
10546 "    CSV (special treatment for Comma-Separated-Value records)",
10547 "    TSV (special treatment for Tab-Separated-Value records)",
10548 " ",
10549 "  For operating on 8-bit character sets, the include set should be ALL.",
10550 " ",
10551 "  If the grouping mask is given and is nonzero, words can be grouped by",
10552 "  quotes or brackets selected by the sum of the following:",
10553 " ",
10554 "     1 = doublequotes:    \"a b c\"",
10555 "     2 = braces:          {a b c}",
10556 "     4 = apostrophes:     'a b c'",
10557 "     8 = parentheses:     (a b c)",
10558 "    16 = square brackets: [a b c]",
10559 "    32 = angle brackets:  <a b c>",
10560 " ",
10561 "  Nesting is possible with {}()[]<> but not with quotes or apostrophes.",
10562 " ",
10563 "Returns integer:",
10564 "  Number of words in source string.",
10565 " ",
10566 "Also see:",
10567 "  HELP FUNCTION WORD",
10568 ""
10569 };
10570
10571 /*  D O H F U N C  --  Give help for a function  */
10572
10573 int
10574 dohfunc(xx) int xx; {
10575     /* int x; */
10576     if (xx == -3) {
10577         printf("\n Type SHOW FUNCTIONS to see a list of available functions.\n"
10578                );
10579         printf(
10580         " Type HELP FUNCTION <name> for help on a particular function.\n");
10581         printf(
10582         " For function settings use HELP SET FUNCTION and SHOW SCRIPTS.\n\n");
10583         return(0);
10584     }
10585     if (xx == FN_WORD)                  /* Long help message */
10586         return(hmsga(hmfword));
10587
10588     printf("\n");
10589     switch (xx) {
10590       case FN_IND:                      /* Index (of string 1 in string 2) */
10591       case FN_RIX:                      /* Rindex (index from right) */
10592         printf("\\f%sindex(s1,s2,n1,n2)\n\
10593   s1 = string to look for.\n\
10594   s2 = string to look in.\n\
10595   n1 = optional 1-based starting position, default = 1.\n\
10596   n2 = optional desired occurrence number, default = 1.\n",
10597                xx == FN_RIX ? "r" : ""
10598                );
10599         printf("Returns integer:\n\
10600   1-based position of %smost occurrence of s1 in s2, ignoring the %smost\n\
10601   (n1-1) characters in s2; returns 0 if s1 not found in s2.\n",
10602                xx == FN_IND ? "left" : "right",
10603                xx == FN_IND ? "left" : "right"
10604         );
10605         break;
10606       case FN_COUNT:                    /* Count occurrences of s1 in s2 */
10607         printf("\\fcount(s1,s2,n1)\n\
10608   s1 = string or character to look for.\n\
10609   s2 = string to look in.\n\
10610   n1 = optional 1-based starting position, default = 1.\n");
10611         printf("Returns integer:\n\
10612   Number of occurrences of s1 in s2, 0 or more.\n");
10613         break;
10614
10615       case FN_SEARCH:                   /* Search for pattern */
10616       case FN_RSEARCH:                  /* Search for pattern from right */
10617         printf("\\f%ssearch(s1,s2,n1,n2)\n\
10618   s1 = pattern to look for.\n\
10619   s2 = string to look in.\n\
10620   n1 = optional 1-based offset, default = 1.\n\
10621   n2 = optional desired occurrence of match, default = 1.\n",
10622                xx == FN_RSEARCH ? "r" : ""
10623                );
10624         printf("Returns integer:\n\
10625   1-based position of %smost match for s1 in s2, ignoring the %smost\n\
10626   (n1-1) characters in s2; returns 0 if no match.\n",
10627                xx == FN_SEARCH ? "left" : "right",
10628                xx == FN_SEARCH ? "left" : "right"
10629         );
10630         printf("  See HELP WILDCARDS for info about patterns.\n");
10631         break;
10632       case FN_LEN:                      /* Length (of string) */
10633         printf("\\flength(s1)\n\
10634   s1 = string.\n");
10635         printf("Returns integer:\n\
10636   Length of string s1.\n");
10637         break;
10638       case FN_LIT:                      /* Literal (don't expand the string) */
10639         printf("\\fliteral(s1)\n\
10640   s1 = string.\n");
10641         printf("Returns string:\n\
10642   s1 literally without evaluation.\n");
10643         break;
10644       case FN_LOW:                      /* Lower (convert to lowercase) */
10645         printf("\\flower(s1)\n\
10646   s1 = string.\n");
10647         printf("Returns string:\n\
10648   s1 with uppercase letters converted to lowercase.\n");
10649         break;
10650       case FN_MAX:                      /* Max (maximum) */
10651         printf("\\fmaximum(n1,n2)\n\
10652   n1 = integer.\n\
10653   n2 = integer.\n");
10654         printf("Returns integer:\n\
10655   The greater of n1 and n2.\n");
10656         break;
10657       case FN_MIN:                      /* Min (minimum) */
10658         printf("\\fminimum(n1,n2)\n\
10659   n1 = integer.\n\
10660   n2 = integer.\n");
10661         printf("Returns integer:\n\
10662   The lesser of n1 and n2.\n");
10663         break;
10664       case FN_MOD:                      /* Mod (modulus) */
10665         printf("\\fmodulus(n1,n2)\n\
10666   n1 = integer.\n\
10667   n2 = integer.\n");
10668         printf("Returns integer:\n\
10669   The remainder after dividing n1 by n2.\n");
10670         break;
10671       case FN_EVA:                      /* Eval (evaluate arith expression) */
10672         printf("\\fevaluate(e)\n\
10673   e = arithmetic expression.\n");
10674         printf("Returns integer:\n\
10675   The result of evaluating the expression.\n");
10676         break;
10677       case FN_SUB:                      /* Substr (substring) */
10678         printf("\\fsubstring(s1,n1,n2)\n\
10679   s1 = string.\n\
10680   n1 = integer, 1-based starting position, default = 1.\n\
10681   n2 = integer, length, default = length(s1) - n1 + 1.\n");
10682         printf("Returns string:\n\
10683   Substring of s1 starting at n1, length n2.\n");
10684         break;
10685       case FN_UPP:                      /* Upper (convert to uppercase) */
10686         printf("\\fupper(s1)\n\
10687   s1 = string.\n");
10688         printf("Returns string:\n\
10689   s1 with lowercase letters converted to uppercase.\n");
10690         break;
10691       case FN_REV:                      /* Reverse (a string) */
10692         printf("\\freverse(s1)\n\
10693   s1 = string.\n");
10694         printf("Returns string:\n\
10695   s1 with its characters in reverse order.\n");
10696         break;
10697       case FN_REP:                      /* Repeat (a string) */
10698         printf("\\frepeat(s1,n1)\n\
10699   s1 = string.\n\
10700   n1 = integer.\n");
10701         printf("Returns string:\n\
10702   s1 repeated n1 times.\n");
10703         break;
10704       case FN_EXE:                      /* Execute (a macro) */
10705         printf("\\fexecute(m1,a1,a2,a3,...)\n\
10706   m1 = macro name.\n\
10707   a1 = argument 1.\n\
10708   a2 = argument 2, etc\n");
10709         printf("Returns string:\n\
10710   The return value of the macro (HELP RETURN for further info).\n");
10711         break;
10712       case FN_LPA:                      /* LPAD (left pad) */
10713       case FN_RPA:                      /* RPAD (right pad) */
10714         printf("\\f%cpad(s1,n1,c1)\n\
10715   s1 = string.\n\
10716   n1 = integer.\n\
10717   c1 = character, default = space.\n",
10718                 xx == FN_LPA ? 'l' : 'r');
10719         printf("Returns string:\n\
10720   s1 %s-padded with character c1 to length n1.\n",
10721                xx == FN_LPA ? "left" : "right");
10722         break;
10723       case FN_DEF:                      /* Definition of a macro, unexpanded */
10724         printf("\\fdefinition(m1)\n\
10725   m1 = macro name.\n");
10726         printf("Returns string:\n\
10727   Literal definition of macro m1.\n");
10728         break;
10729       case FN_CON:                      /* Contents of a variable, ditto */
10730         printf("\\fcontents(v1)\n\
10731   v1 = variable name such as \\%%a.\n");
10732         printf("Returns string:\n\
10733   Literal definition of variable v1, evaluated one level only.\n");
10734         break;
10735       case FN_FIL:                      /* Next file */
10736         printf("\\fnextfile()\n");
10737         printf("Returns string:\n\
10738   Name of next file from list created by most recent \\f[r]files() or\n\
10739   \\f[r]dir()invocation, or an empty string if there are no more files in\n\
10740   the list.\n");
10741         break;
10742       case FN_FC:                       /* File count */
10743         printf("\\ffiles(f1[,&a]) - File list.\n\
10744   f1 = file specification, possibly containing wildcards.\n\
10745   &a = optional name of array to assign file list to.\n");
10746         printf("Returns integer:\n\
10747   The number of regular files that match f1.  Use with \\fnextfile().\n");
10748         break;
10749       case FN_CHR:                      /* Character (like BASIC CHR$()) */
10750         printf("\\fcharacter(n1)\n\
10751   n1 = integer.\n");
10752         printf("Returns character:\n\
10753   The character whose numeric code is n1.\n");
10754         break;
10755       case FN_RIG:                      /* Right (like BASIC RIGHT$()) */
10756         printf("\\fright(s1,n1)\n\
10757   s1 = string.\n\
10758   n1 = integer, default = length(s1).\n");
10759         printf("Returns string:\n\
10760   The rightmost n1 characters of string s1.\n");
10761         break;
10762       case FN_LEF:                      /* Left (like BASIC LEFT$()) */
10763         printf("\\fleft(s1,n1)\n\
10764   s1 = string.\n\
10765   n1 = integer, default = length(s1).\n");
10766         printf("Returns string:\n\
10767   The leftmost n1 characters of string s1.\n");
10768         break;
10769       case FN_COD:                      /* Code value of character */
10770         printf("\\fcode(s1)\n\
10771   c1 = character.\n");
10772         printf("Returns integer:\n\
10773   The numeric code of the first character in string s1, or 0 if s1 empty.\n");
10774         break;
10775       case FN_RPL:                      /* Replace */
10776         printf("\\freplace(s1,s2,s3[,n1])\n\
10777   s1 = original string.\n\
10778   s2 = match string.\n\
10779   s3 = replacement string.\n\
10780   n1 = occurrence.\n");
10781         printf("Returns string:\n\
10782   s1 with occurrence number n1 of s2 replaced by s3.\n\
10783   If n1 = 0 or omitted, all occurrences are replaced.\n\
10784   If n1 < 0, occurrences are counted from the right.\n");
10785         break;
10786
10787       case FN_FD:                       /* File date */
10788         printf("\\fdate(f1)\n\
10789   f1 = filename.\n");
10790 #ifdef VMS
10791         printf("Returns string:\n\
10792   Creation date of file f1, format: yyyymmdd hh:mm:ss.\n");
10793 #else
10794         printf("Returns string:\n\
10795   Modification date of file f1, format: yyyymmdd hh:mm:ss.\n");
10796 #endif /* VMS */
10797         break;
10798       case FN_FS:                       /* File size */
10799         printf("\\fsize(f1)\n\
10800   f1 = filename.\n");
10801         printf("Returns integer:\n\
10802   Size of file f1.\n");
10803         break;
10804       case FN_VER:                      /* Verify */
10805         printf("\\fverify(s1,s2,n1)\n\
10806   s1 = string of characters to look for.\n\
10807   s2 = string to look in.\n\
10808   n1 = starting position in s2.\n");
10809         printf("Returns integer:\n\
10810   1-based position of first character in s2 that is not also in s1,\n\
10811   or -1 if s1 is empty, or 0 if all characters in s2 are also in s1.\n");
10812         break;
10813       case FN_IPA:                      /* Find and return IP address */
10814         printf("\\fipaddress(s1,n1)\n\
10815   s1 = string.\n\
10816   n1 = 1-based integer starting position, default = 1.\n");
10817         printf("Returns string:\n\
10818   First IP address in s1, scanning from left starting at position n1.\n");
10819         break;
10820       case FN_HEX:                      /* Hexify */
10821         printf("\\fhexify(s1)\n\
10822   s1 = string.\n");
10823         printf("Returns string:\n\
10824   The hexadecimal representation of s1.  Also see \\fn2hex().\n");
10825         break;
10826       case FN_UNH:                      /* Unhexify */
10827         printf("\\funhexify(h1)\n\
10828   h1 = Hexadecimal string.\n");
10829         printf("Returns string:\n\
10830   The result of unhexifying s1, or nothing if s1 is not a hex string.\n");
10831         break;
10832       case FN_UNTAB:                    /* Untabify */
10833         printf("\\funtabify(s1)\n\
10834   s1 = string.\n");
10835         printf("Returns string:\n\
10836   The result of converting tabs in s1 to spaces assuming tab stops every\n\
10837   8 spaces.\n");
10838         break;
10839       case FN_BRK:                      /* Break */
10840       case FN_SPN:                      /* Span */
10841         printf("\\f%s(s1,s2,n1)\n\
10842   s1 = string to look in.\n\
10843   s2 = string of characters to look for.\n\
10844   n1 = 1-based integer starting position, default = 1.\n",
10845               xx == FN_BRK ? "break" : "span"
10846               );
10847         printf("Returns string:\n\
10848   s1 up to the first occurrence of any character%salso in s2,\n\
10849   scanning from the left starting at position n1.\n",
10850                xx == FN_SPN ? " not " : " ");
10851         break;
10852       case FN_TRM:                      /* Trim */
10853       case FN_LTR:                      /* Left-Trim */
10854         printf("\\f%s(s1,s2)\n\
10855   s1 = string to look in.\n\
10856   s2 = string of characters to look for, default = blanks and tabs.\n",
10857                xx == FN_TRM ? "trim" : "ltrim");
10858         printf("Returns string:\n\
10859   s1 with all characters that are also in s2 trimmed from the %s.\n.",
10860                xx == FN_TRM ? "right" : "left");
10861         break;
10862       case FN_CAP:                      /* Capitalize */
10863         printf("\\fcapitalize(s1)\n\
10864   s1 = string.\n");
10865         printf("Returns string:\n\
10866   s1 with its first letter converted to uppercase and the remaining\n\
10867   letters to lowercase.\n");
10868         printf("Synonym: \\fcaps(s1)\n");
10869         break;
10870       case FN_TOD:                      /* Time-of-day-to-secs-since-midnite */
10871         printf("\\ftod2secs(s1)\n\
10872   s1 = time-of-day string, hh:mm:ss, 24-hour format.\n");
10873         printf("Returns number:\n\
10874   Seconds since midnight.\n");
10875         break;
10876       case FN_FFN:                      /* Full file name */
10877         printf("\\fpathname(f1)\n\
10878   f1 = filename, possibly wild.\n");
10879         printf("Returns string:\n\
10880   Full pathname of f1.\n");
10881         break;
10882       case FN_CHK:                      /* Checksum of text */
10883         printf("\\fchecksum(s1)\n\
10884   s1 = string.\n");
10885         printf("Returns integer:\n\
10886   16-bit checksum of string s1.\n");
10887         break;
10888       case FN_CRC:                      /* CRC-16 of text */
10889         printf("\\fcrc16(s1)\n\
10890   s1 = string.\n");
10891         printf("Returns integer:\n\
10892   16-bit cyclic redundancy check of string s1.\n");
10893         break;
10894       case FN_BSN:                      /* Basename of file */
10895         printf("\\fbasename(f1)\n\
10896   f1 = filename, possibly wild.\n");
10897         printf("Returns string:\n\
10898   Filename f1 stripped of all device and directory information.\n");
10899         break;
10900       case FN_CMD:                      /* Output of a command (cooked) */
10901         printf("\\fcommand(s1)\n\
10902   s1 = string\n");
10903         printf("Returns string:\n\
10904   Output of system command s1, if any, with final line terminator stripped.\n"
10905                );
10906         break;
10907       case FN_RAW:                      /* Output of a command (raw) */
10908         printf("\\frawcommand(s1)\n\
10909   s1 = string\n");
10910         printf("Returns string:\n\
10911   Output of system command s1, if any.\n");
10912         break;
10913       case FN_STX:                      /* Strip from right */
10914         printf("\\fstripx(s1,c1)\n\
10915   s1 = string to look in.\n\
10916   c1 = character to look for, default = \".\".\n");
10917         printf("Returns string:\n\
10918   s1 up to the rightmost occurrence of character c1.\n"
10919         );
10920         break;
10921
10922       case FN_STL:                      /* Strip from left */
10923         printf("\\flop(s1[,c1[,n1]])\n\
10924   s1 = string to look in.\n\
10925   c1 = character to look for, default = \".\".\n\
10926   n1 = occurrence of c1, default = 1.\n");
10927         printf("Returns string:\n\
10928   The part of s1 after the n1th leftmost occurrence of character c1.\n"
10929         );
10930         break;
10931
10932       case FN_LOPX:                      /* Strip from right */
10933         printf("\\flopx(s1,c1)\n\
10934   s1 = string to look in.\n\
10935   c1 = character to look for, default = \".\".\n\
10936   n1 = occurrence of c1, default = 1.\n");
10937         printf("Returns string:\n\
10938   The part of s1 after the n1th rightmost occurrence of character c1.\n"
10939         );
10940         break;
10941
10942       case FN_STN:                      /* Strip n chars */
10943         printf("\\fstripn(s1,n1)\n\
10944   s1 = string to look in.\n\
10945   n1 = integer, default = 0.\n");
10946         printf("Returns string:\n\
10947   s1 with n1 characters removed from the right.\n"
10948         );
10949         break;
10950
10951       case FN_STB:                      /* Strip enclosing brackets */
10952         printf("\\fstripb(s1[,c1[,c2]])\n\
10953   s1 = original string.\n\
10954   c1 = optional first character\n");
10955         printf("\
10956   c2 = optional final character.\n");
10957         printf("Returns string:\n\
10958   s1 with the indicated enclosing characters removed.  If c1 and c2 not\n\
10959      specified, any matching brackets, braces, parentheses, or quotes are\n");
10960         printf("\
10961      assumed.  If c1 is given but not c2, the appropriate c2 is assumed.\n\
10962      if both c1 and c2 are given, they are used as-is.\n"
10963                );
10964         printf(
10965 "Alternative format:\n\
10966   Include a grouping mask number in place of c1 and omit c2 to specify more\n\
10967   than one possibility at once; see \\fword() for details.\n"
10968                );
10969         break;
10970
10971 #ifdef OS2
10972       case FN_SCRN_CX:                  /* Screen Cursor X Pos */
10973         printf("\\fscrncurx()\n");
10974         printf("Returns integer:\n\
10975   The 0-based X coordinate (column) of the Terminal screen cursor.\n");
10976         break;
10977       case FN_SCRN_CY:                  /* Screen Cursor Y Pos */
10978         printf("\\fscrncury()\n");
10979         printf("Returns integer:\n\
10980   The 0-based Y coordinate (row) of the Terminal screen cursor.\n");
10981         break;
10982       case FN_SCRN_STR:                 /* Screen String */
10983         printf("\\fscrnstr(ny,nx,n1)\n\
10984   ny = integer.\n\
10985   nx = integer.\n\
10986   n1 = integer.\n");
10987         printf("Returns string:\n\
10988   The string at Terminal-screen coordinates (nx,ny), length n1,\n\
10989   blanks included.  Coordinates start at 0.  Default values are\n\
10990   0 for ny and nx, and line width for n1.\n");
10991         break;
10992 #endif /* OS2 */
10993
10994       case FN_2HEX:                     /* Num to hex */
10995         printf("\\fn2hex(n1) - Number to hex\n  n1 = integer.\n");
10996         printf("Returns string:\n  The hexadecimal representation of n1.\n");
10997         break;
10998
10999       case FN_2OCT:                     /* Num to hex */
11000         printf("\\fn2octal(n1) - Number to octal\n  n1 = integer.\n");
11001         printf("Returns string:\n  The octal representation of n1.\n");
11002         break;
11003
11004 #ifdef RECURSIVE
11005       case FN_DIR:                      /* Recursive directory count */
11006         printf("\\fdirectories(f1) - Directory list.\n\
11007   f1 = directory specification, possibly containing wildcards.\n\
11008   &a = optional name of array to assign directory list to.\n");
11009         printf("Returns integer:\n\
11010   The number of directories that match f1; use with \\fnextfile().\n");
11011         break;
11012
11013       case FN_RFIL:                     /* Recursive file count */
11014         printf("\\frfiles(f1[,&a]) - Recursive file list.\n\
11015   f1 = file specification, possibly containing wildcards.\n\
11016   &a = optional name of array to assign file list to.\n");
11017         printf("Returns integer:\n\
11018   The number of files whose names match f1 in the current or given\n\
11019   directory tree; use with \\fnextfile().\n");
11020         break;
11021
11022       case FN_RDIR:                     /* Recursive directory count */
11023         printf("\\frdirectories(f1) - Recursive directory list.\n\
11024   f1 = directory specification, possibly containing wildcards.\n\
11025   &a = optional name of array to assign directory list to.\n");
11026         printf("Returns integer:\n\
11027   The number of directories that match f1 in the current or given directory\n\
11028   tree.  Use with \\fnextfile().\n");
11029         break;
11030 #endif /* RECURSIVE */
11031
11032       case FN_DNAM:                     /* Directory part of a filename */
11033         printf("\\fdirname(f) - Directory part of a filename.\n\
11034   f = a file specification.\n");
11035         printf("Returns directory name:\n\
11036   The full name of the directory that the file is in, or if the file is a\n\
11037   directory, its full name.\n");
11038         break;
11039
11040 #ifndef NORANDOM
11041       case FN_RAND:                     /* Random number */
11042         printf("\\frandom(n) - Random number.\n\
11043   n = a positive integer.\n");
11044         printf("Returns integer:\n\
11045   A random number between 0 and n-1.\n");
11046         break;
11047 #endif /* NORANDOM */
11048
11049       case FN_SPLIT:                    /* Split */
11050 #ifdef COMMENT
11051         printf("\\fsplit(s1,&a,s2,s3,n2,n3) - \
11052 Assign string words to an array.\n\
11053   s1 = source string\n  &a = array designator\n  s2 = optional break set.\n");
11054         printf("  s3 = optional include set.\n");
11055         printf("  n2 = optional grouping mask.\n");
11056         printf("  n3 = optional separator flag.\n");
11057         printf("  s2, s3, n2, n3 are as in \\fword().\n");
11058         printf(
11059 "  All arguments are optional; if \\&a[] already exists, it is recycled;\n\
11060   if array not specified, the count is returned but no array is created.\n");
11061         printf("Returns integer:\n\
11062   Number of words in source string.\n");
11063 #else
11064         hmsga(hfsplit);
11065 #endif  /* COMMENT */
11066         break;
11067
11068       case FN_DTIM:                     /* CVTDATE */
11069         printf("\\fcvtdate([date-time][,n1]) - Date/time conversion.\n");
11070         printf("  Converts date and/or time to standard format.\n");
11071         printf("  If no date/time given, returns current date/time.\n");
11072         printf("  [date-time], if given, is free-format date and/or time.\n");
11073         printf("  HELP DATE for info about date-time formats.\n");
11074         printf("Returns string:\n\
11075   Standard-format date and time: yyyymmdd hh:mm:ss (numeric)\n");
11076         printf("  If n1 is given:\n\
11077   n1 = 1: yyyy-mmm-dd hh:mm:ss (mmm = English 3-letter month abbreviation)\n\
11078   n1 = 2: dd-mmm-yyyy hh:mm:ss (ditto)\n\
11079   n1 = 3: yyyymmddhhmmss (all numeric)\n\
11080   n1 = 4: Day Mon dd hh:mm:ss yyyy (asctime)\n\
11081   Other:  yyyymmdd hh:mm:dd");
11082         break;
11083
11084       case FN_JDATE:                    /* DOY */
11085         printf("\\fdoy([date-time]) - Day of Year.\n");
11086         printf("  Converts date and/or time to day-of-year (DOY) format.\n");
11087         printf("  If no date/time given, returns current date.\n");
11088         printf("  [date-time], if given, is free-format date and/or time.\n");
11089         printf("  HELP DATE for info about date-time formats.\n");
11090         printf("Returns numeric string:\n\
11091   DOY: yyyyddd, where ddd is 1-based day number in year.\n");
11092         break;
11093
11094       case FN_PNCVT:
11095         printf("\\fdialconvert(phone-number) - Convert phone number.\n");
11096         printf("  Converts the given phone number for dialing according\n");
11097         printf(
11098 "  to the prevailing dialing rules -- country code, area code, etc.\n");
11099         printf("Returns string:\n\
11100   The dial string that would be used if the same phone number had been\n\
11101   given to the DIAL command.\n"
11102               );
11103         break;
11104
11105       case FN_DATEJ:                    /* DOY2DATE */
11106         printf("\\fdoy2date([doy[ time]]) - Day of Year to Date.\n");
11107         printf("  Converts yyyymmm to yyyymmdd\n");
11108         printf("  If time included, it is converted to 24-hour format.");
11109         printf(
11110             "Returns standard date or date-time string yyyymmdd hh:mm:ss\n");
11111         break;
11112
11113       case FN_MJD:
11114         printf("\\fmjd([[date][ time]]) - Modified Julian Date (MJD).\n");
11115         printf(
11116 "  Converts date and/or time to MJD, the number of days since 17 Nov 1858.\n");
11117         printf("  HELP DATE for info about date-time formats.\n");
11118         printf("Returns: integer.\n");
11119         break;
11120
11121       case FN_MJD2:
11122         printf("\\fmjd2date(mjd) - Modified Julian Date (MJD) to Date.\n");
11123         printf("  Converts MJD to standard-format date.\n");
11124         printf("Returns: yyyymmdd.\n");
11125         break;
11126
11127       case FN_DAY:
11128         printf("\\fday([[date][ time]]) - Day of Week.\n");
11129         printf("Returns day of week of given date as Mon, Tue, etc.\n");
11130         printf("HELP DATE for info about date-time formats.\n");
11131         break;
11132
11133       case FN_NDAY:
11134         printf("\\fnday([[date][ time]]) - Numeric Day of Week.\n");
11135         printf(
11136     "Returns numeric day of week of given date, 0=Sun, 1=Mon, ..., 6=Sat.\n");
11137         printf("HELP DATE for info about date-time formats.\n");
11138         break;
11139
11140       case FN_TIME:
11141         printf("\\ftime([[date][ time]]) - Time.\n");
11142         printf(
11143 "Returns time portion of given date and/or time in hh:mm:ss format.\n");
11144         printf("If no argument given, returns current time.\n");
11145         printf("HELP DATE for info about date-time formats.\n");
11146         break;
11147
11148       case FN_NTIM:
11149         printf("\\fntime([[date][ time]]) - Numeric Time.\n");
11150         printf(
11151 "Returns time portion of given date and/or time as seconds since midnight.\n");
11152         printf("If no argument given, returns current time.\n");
11153         printf("HELP DATE for info about date-time formats.\n");
11154         break;
11155
11156       case FN_N2TIM:
11157         printf("\\fn2time(seconds) - Numeric Time to Time.\n");
11158         printf(
11159 "Returns the given number of seconds in hh:mm:ss format.\n");
11160         break;
11161
11162       case FN_PERM:
11163         printf("\\fpermissions(file) - Permissions of File.\n");
11164         printf(
11165 #ifdef UNIX
11166 "Returns permissions of given file as they would be shown by \"ls -l\".\n"
11167 #else
11168 #ifdef VMS
11169 "Returns permissions of given file as they would be shown by \"dir /prot\".\n"
11170 #else
11171 "Returns the permissions of the given file.\n"
11172 #endif /* VMS */
11173 #endif /* UNIX */
11174                );
11175         break;
11176
11177       case FN_ALOOK:
11178         printf("\\farraylook(pattern,&a) - Lookup pattern in array.\n\
11179   pattern = String or pattern\n");
11180         printf("  &a = array designator, can include range specifier.\n");
11181         printf(
11182 "Returns number:\n\
11183   The index of the first matching array element or -1 if none.\n");
11184         printf("More info:\n\
11185   HELP PATTERN for pattern syntax.\n  HELP ARRAY for arrays.\n");
11186         break;
11187
11188       case FN_TLOOK:
11189         printf(
11190 "\\ftablelook(keyword,&a,[c]) - Lookup keyword in keyword table.\n\
11191   pattern = String\n");
11192         printf("  keyword = keyword to look up (can be abbreviated).\n");
11193         printf("  &a      = array designator, can include range specifier.\n");
11194         printf("            This array must be in alphabetical order.\n");
11195         printf("  c       = Optional field delimiter, colon(:) by default.\n");
11196         printf(
11197 "Returns number:\n\
11198   1 or greater, index of array element that uniquely matches given keyword;\n"
11199                );
11200         printf(
11201 "or -2 if keyword was ambiguous, or -1 if keyword empty or not found.\n"
11202                );
11203         printf("Also see:\n\
11204   HELP FUNC ARRAYLOOK for a similar function.\n  HELP ARRAY for arrays.\n");
11205         break;
11206
11207       case FN_ABS:                      /* Absolute */
11208         printf("\\fabsolute(n1)\n\
11209   n1 = integer.\n");
11210         printf("Returns integer:\n\
11211   The absolute (unsigned) value of n1.\n");
11212         break;
11213
11214 #ifdef FNFLOAT
11215       case FN_FPABS:
11216         printf("\\ffpabsolute(f1,d)\n\
11217   f1 = floating-point number or integer.\n\
11218    d = integer.\n");
11219         printf("Returns floating-point number:\n\
11220   The absolute (unsigned) value of f1 to d decimal places.\n");
11221         break;
11222
11223       case FN_FPADD:
11224         printf("\\ffpadd(f1,f2,d)\n\
11225   f1,f2 = floating-point numbers or integers.\n\
11226       d = integer.\n");
11227         printf("Returns floating-point number:\n\
11228   The sum of f1 and f2 to d decimal places.\n");
11229         break;
11230
11231       case FN_FPSUB:
11232         printf("\\ffpsubtract(f1,f2,d)\n\
11233   f1,f2 = floating-point numbers or integers.\n\
11234       d = integer.\n");
11235         printf("Returns floating-point number:\n\
11236   f1 minus f2 to d decimal places.\n");
11237         break;
11238
11239       case FN_FPMUL:
11240         printf("\\ffpmultiply(f1,f2,d)\n\
11241   f1,f2 = floating-point numbers or integers.\n\
11242       d = integer.\n");
11243         printf("Returns floating-point number:\n\
11244   The product of f1 and f2 to d decimal places.\n");
11245         break;
11246
11247       case FN_FPDIV:
11248         printf("\\ffpdivide(f1,f2,d)\n\
11249   f1,f2 = floating-point numbers or integers.\n\
11250       d = integer.\n");
11251         printf("Returns floating-point number:\n\
11252   f1 divided by f2 to d decimal places.\n");
11253         break;
11254
11255       case FN_FPMAX:
11256         printf("\\ffpmaximum(f1,f2,d)\n\
11257   f1,f2 = floating-point numbers or integers.\n\
11258       d = integer.\n");
11259         printf("Returns floating-point number:\n\
11260   The maximum of f1 and f2 to d decimal places.\n");
11261         break;
11262
11263       case FN_FPMIN:
11264         printf("\\ffpminimum(f1,f2,d)\n\
11265   f1,f2 = floating-point numbers or integers.\n\
11266       d = integer.\n");
11267         printf("Returns floating-point number:\n\
11268   The minimum of f1 and f2 to d decimal places.\n");
11269         break;
11270
11271       case FN_FPMOD:
11272         printf("\\ffpmodulus(f1,f2,d)\n\
11273   f1,f2 = floating-point numbers or integers.\n\
11274       d = integer.\n");
11275         printf("Returns floating-point number:\n\
11276   The modulus of f1 and f2 to d decimal places.\n");
11277         break;
11278
11279       case FN_FPPOW:
11280         printf("\\ffpraise(f1,f2,d)\n\
11281   f1,f2 = floating-point numbers or integers.\n\
11282       d = integer.\n");
11283         printf("Returns floating-point number:\n\
11284   f1 raised to the power f2, to d decimal places.\n");
11285         break;
11286
11287       case FN_FPCOS:
11288         printf("\\ffpcosine(f1,d)\n\
11289   f1 = floating-point number or integer.\n\
11290    d = integer.\n");
11291         printf("Returns floating-point number:\n\
11292   The cosine of angle f1 (in radians) to d decimal places.\n");
11293         break;
11294
11295       case FN_FPSIN:
11296         printf("\\ffpsine(f1,d)\n\
11297   f1 = floating-point number or integer.\n\
11298    d = integer.\n");
11299         printf("Returns floating-point number:\n\
11300   The sine of angle f1 (in radians) to d decimal places.\n");
11301         break;
11302
11303       case FN_FPTAN:
11304         printf("\\ffptangent(f1,d)\n\
11305   f1 = floating-point number or integer.\n\
11306    d = integer.\n");
11307         printf("Returns floating-point number:\n\
11308   The tangent of angle f1 (in radians) to d decimal places.\n");
11309         break;
11310
11311       case FN_FPEXP:
11312         printf("\\ffpexp(f1,d)\n\
11313   f1 = floating-point number or integer.\n\
11314    d = integer.\n");
11315         printf("Returns floating-point number:\n\
11316   e (the base of natural logarithms) raised to the f1 power,\n\
11317   to d decimal places.\n");
11318         break;
11319
11320       case FN_FPINT:
11321         printf("\\ffpint(f1)\n\
11322   f1 = floating-point number or integer.\n");
11323         printf("Returns integer:\n\
11324   The integer part of f1.\n");
11325         break;
11326
11327       case FN_FPLOG:
11328         printf("\\ffplog10(f1,d)\n\
11329   f1 = floating-point number or integer.\n\
11330    d = integer.\n");
11331         printf("Returns floating-point number:\n\
11332   The logarithm, base 10, of f1 to d decimal places.\n");
11333         break;
11334
11335       case FN_FPLN:
11336         printf("\\ffplogn(f1,d)\n\
11337   f1 = floating-point number or integer.\n\
11338    d = integer.\n");
11339         printf("Returns floating-point number:\n\
11340   The natural logarithm of f1 to d decimal places.\n");
11341         break;
11342
11343       case FN_FPROU:
11344         printf("\\ffpround(f1,d)\n\
11345   f1 = floating-point number or integer.\n\
11346    d = integer.\n");
11347         printf("Returns floating-point number:\n\
11348   f1 rounded to d decimal places.\n");
11349         break;
11350
11351       case FN_FPSQR:
11352         printf("\\ffpsqrt(f1,d)\n\
11353   f1 = floating-point number or integer.\n\
11354    d = integer.\n");
11355         printf("Returns floating-point number:\n\
11356   The square root of f1 to d decimal places.\n");
11357         break;
11358 #endif /* FNFLOAT */
11359
11360 #ifdef CKCHANNELIO
11361       case FN_FEOF:
11362         printf("\\f_eof(n1)\n\
11363   n1 = channel number.\n");
11364         printf("Returns number:\n\
11365   1 if channel n1 at end of file, 0 otherwise.\n");
11366         break;
11367       case FN_FPOS:
11368         printf("\\f_pos(n1)\n\
11369   n1 = channel number.\n");
11370         printf("Returns number:\n\
11371   Read/write pointer of channel n1 as byte number.\n");
11372         break;
11373       case FN_NLINE:
11374         printf("\\f_line(n1)\n\
11375   n1 = channel number.\n");
11376         printf("Returns number:\n\
11377   Read/write pointer of channel n1 as line number.\n");
11378         break;
11379       case FN_FILNO:
11380         printf("\\f_handle(n1)\n\
11381   n1 = channel number.\n");
11382         printf("Returns number:\n\
11383   File %s of open file on channel n1.\n",
11384 #ifdef OS2
11385                "handle"
11386 #else
11387                "descriptor"
11388 #endif /* OS2 */
11389                );
11390         break;
11391       case FN_FSTAT:
11392         printf("\\f_status(n1)\n\
11393   n1 = channel number.\n");
11394         printf("Returns number:\n\
11395   Sum of open modes of channel n1: 1 = read; 2 = write; 4 = append, or:\n\
11396   0 if not open.\n");
11397         break;
11398       case FN_FGCHAR:
11399         printf("\\f_getchar(n1)\n\
11400   n1 = channel number.\n");
11401         printf("  Reads a character from channel n1 and returns it.\n");
11402         break;
11403       case FN_FGLINE:
11404         printf("\\f_getline(n1)\n\
11405   n1 = channel number.\n");
11406         printf("  Reads a line from channel n1 and returns it.\n");
11407         break;
11408       case FN_FGBLK:
11409         printf("\\f_getblock(n1,n2)\n\
11410   n1 = channel number, n2 = size\n");
11411         printf(
11412 "  Reads a block of n2 characters from channel n1 and returns it.\n");
11413         break;
11414       case FN_FPCHAR:
11415         printf("\\f_putchar(n1,c)\n\
11416   n1 = channel number, c = character\n");
11417         printf("  Writes a character to channel n1.\n\
11418 Returns number:\n\
11419   1 if successful, otherwise a negative error code.\n");
11420         break;
11421       case FN_FPLINE:
11422         printf("\\f_putline(n1,s1)\n\
11423   n1 = channel number, s1 = string\n");
11424         printf(
11425 "  Writes the string s1 to channel n1 and adds a line terminator.\n\
11426 Returns number:\n");
11427         printf("  How many characters written if successful;\n\
11428   Otherwise a negative error code.\n"
11429                );
11430         break;
11431       case FN_FPBLK:
11432         printf("\\f_putblock(n1,s1)\n\
11433   n1 = channel number, s1 = string\n");
11434         printf(
11435 "  Writes the string s1 to channel n1.\n\
11436   Returns number:\n");
11437         printf("  How many characters written if successful;\n\
11438   Otherwise a negative error code.\n"
11439                );
11440         break;
11441       case FN_FERMSG:
11442         printf("\\f_errmsg([n1])\n\
11443   n1 = numeric error code, \\v(f_error) by default.\n");
11444         printf("  Returns the associated error message string.\n");
11445         break;
11446 #endif /* CKCHANNELIO */
11447
11448       case FN_AADUMP:
11449         printf("\\faaconvert(name,&a[,&b])\n\
11450   name = name of associative array, &a and &b = names of regular arrays.\n");
11451         printf(
11452 "  Converts the given associative array into two regular arrays, &a and &b,\n\
11453   containing the indices and values, respectively:\n");
11454         printf("Returns number:\n\
11455   How many elements were converted.\n");
11456         break;
11457
11458 #ifdef CK_KERBEROS
11459       case FN_KRB_TK:
11460         printf("\\fkrbtickets(n)\n\
11461   n = Kerberos version number (4 or 5).\n\
11462   Returns string:\n\
11463   The number of active Kerberos 4 or 5 tickets.\n\
11464   Resets the ticket list used by \\fkrbnextticket(n).\n");
11465         break;
11466
11467       case FN_KRB_NX:
11468         printf("\\fkrbnextticket(n)\n\
11469   n = Kerberos version number (4 or 5).\n\
11470   Returns string:\n\
11471     The next ticket in the Kerberos 4 or 5 ticket list that was set up by\n\
11472     the most recent invocation of \\fkrbtickets(n).\n");
11473         break;
11474
11475       case FN_KRB_IV:
11476         printf("\\fkrbisvalid(n,name)\n\
11477   n    = Kerberos version number (4 or 5).\n\
11478   name = a ticket name as returned by \\fkrbnextticket(n).\n\
11479   Returns number:\n\
11480     1 if the ticket is valid, 0 if not valid.\n\
11481     A ticket is valid if all the following conditions are true:\n\n");
11482         printf("\n\
11483     (i)   it exists in the current cache file;\n\
11484     (ii)  it is not expired;\n\
11485     (iii) it is not marked invalid (K5 only);\n\
11486     (iv)  it was issued from the current IP address\n");
11487         printf("\n  This value can be used in an IF statement, e.g.:\n\n");
11488         printf("    if \\fkrbisvalid(4,krbtgt.FOO.BAR.EDU@FOO.BAR.EDU) ...\n");
11489         break;
11490
11491       case FN_KRB_TT:
11492         printf("\\fkrbtimeleft(n,name)\n\
11493   n    = Kerberos version number (4 or 5).\n\
11494   name = a ticket name as returned by \\fkrbnextticket(n).\n\
11495   Returns string:\n\
11496     The number of seconds remaining in the ticket's lifetime.\n");
11497         break;
11498
11499       case FN_KRB_FG:
11500         printf("\\fkrbflags(n,name)\n\
11501   n    = Kerberos version number (4 or 5).\n\
11502   name = a ticket name as returned by \\fkrbnextticket(n).\n\
11503   Returns string:\n");
11504         printf(
11505 "    The flags string as reported with AUTH K5 LIST /FLAGS.  This string can\n\
11506     be searched for a particular flag using the \\findex() function when\n\
11507     SET CASE is ON (for case sensitive searches).  Flag strings are only\n\
11508     available for K5 tickets.\n");
11509         break;
11510 #endif /* CK_KERBEROS */
11511
11512       case FN_PATTERN:
11513         printf("\\fpattern(s)\n\
11514   s = string\n\
11515   Returns string: s with any variables, etc, evaluated in the normal manner.\n"
11516                );
11517         printf("\
11518   For use with INPUT, MINPUT, and REINPUT to declare that a search target is\n\
11519   a pattern rather than a literal string.\n");
11520         break;
11521
11522       case FN_HEX2N:
11523         printf("\\fhex2n(s)\n\
11524   s = hexadecimal number\n\
11525   Returns decimal equivalent.\n");
11526         break;
11527
11528       case FN_HEX2IP:
11529         printf("\\fhex2ip(s)\n\
11530   s = 8-digit hexadecimal number\n\
11531   Returns the equivalent decimal dotted IP address.\n");
11532         break;
11533
11534       case FN_IP2HEX:
11535         printf("\\fip2hex(s)\n\
11536   s = decimal dotted IP address\n\
11537   Returns the equivalent 8-digit hexadecimal number.\n");
11538         break;
11539
11540       case FN_OCT2N:
11541         printf("\\foct2n(s)\n\
11542   s = octal number\n\
11543   Returns decimal equivalent.\n");
11544         break;
11545
11546       case FN_TOB64:
11547         printf("\\b64encode(s)\n\
11548   s = string containing no NUL bytes\n\
11549   Returns Base-64 encoding of string.\n");
11550         break;
11551
11552       case FN_FMB64:
11553         printf("\\b64decode(s)\n\
11554   s = string in Base-64 notation\n\
11555   Returns the decoded string or an error code if s not valid.\n");
11556         break;
11557
11558       case FN_RADIX:
11559         printf("\\fradix(s,n1,n2)\n\
11560   s = number in radix n1\n\
11561   Returns the number's representation in radix n2.\n");
11562         break;
11563
11564       case FN_JOIN:
11565         printf("\\fjoin(&a[,s[,n1[,n2]]])\n\
11566   &a = array designator, can include range specifier.\n\
11567   s  = optional separator.\n");
11568         printf("\
11569   n1 = nonzero to put grouping around elements that contain spaces;\n\
11570        see \\fword() grouping mask for values of n.\n");
11571         printf("\
11572   n2 = 0 or omitted to put spaces between elements; nonzero to omit them.\n");
11573         printf("\
11574   Returns the (selected) elements of the array joined to together,\n\
11575   separated by the separator.\n");
11576         printf("\n\
11577   If s is CSV (literally), that means the array is to be transformed into a\n\
11578   comma-separated list.  No other arguments are needed.  If s is TSV, then\n\
11579   a tab-separated list is created.\n");
11580         break;
11581
11582       case FN_SUBST:
11583         printf("\\fsubstitute(s1,s2,s3)\n\
11584   s1 = Source string.\n\
11585   s2 = List of characters to be translated.\n\
11586   s3 = List of characters to translate them to.\n");
11587         printf(
11588 "  Returns: s1, with each character that is in s2 replaced by the\n\
11589   corresponding character in s3.  s2 and s3 can contain ASCII ranges,\n\
11590   like [a-z].  Any characters in s2 that don't have corresponding\n\
11591   characters in s3 (after range expansion) are removed from the result.\n\
11592   This function works only with single-byte character-sets\n");
11593         break;
11594
11595 #ifndef NOSEXP
11596       case FN_SEXP:
11597         printf("\\fsexpression(s1)\n\
11598   s1 = S-Expression.\n");
11599         printf("  Returns: The result of evaluating s1.\n");
11600         break;
11601
11602 #endif /* NOSEXP */
11603
11604       case FN_CMDSTK:
11605         printf("\\fcmdstack(n1,n2)\n\
11606   n1 = Command-stack level, 0 to \\v(cmdlevel), default \\v(cmdlevel).\n\
11607   n2 = Function code, 0 or 1.\n");
11608         printf("Returns:\n");
11609         printf("  n2 = 0: name of object at stack level n1\n\
11610   n2 = 1: type of object at stack level n1:\n\
11611      0 = interactive prompt\n\
11612      1 = command file\n\
11613      2 = macro\n"
11614                );
11615           break;
11616
11617 #ifdef CKFLOAT
11618       case FN_DIFDATE:
11619         printf("\\fdiffdates(d1,d2)\n\
11620   d1 = free-format date and/or time (default = NOW).\n\
11621   d2 = ditto.\n");
11622         printf("Returns:\n");
11623         printf("  Difference expressed as delta time:\n");
11624         printf("  Negative if d2 is later than d1, otherwise positive.\n");
11625         break;
11626 #endif /* CKFLOAT */
11627
11628       case FN_CMPDATE:
11629         printf("\\fcmpdates(d1,d2)\n\
11630   d1 = free-format date and/or time (default = NOW).\n\
11631   d2 = ditto.\n");
11632         printf("Returns:\n");
11633         printf("  0 if d1 is equal to d2;\n\
11634   1 if d1 is later than d2;\n\
11635  -1 if d1 is earlier than d2.\n");
11636         break;
11637
11638       case FN_TOGMT:
11639         printf("\\futcdate(d1)\n\
11640   d1 = free-format date and/or time (default = NOW).\n");
11641         printf("Returns:\n");
11642         printf("  Date-time converted to UTC (GMT) yyyymmdd hh:mm:ss.\n");
11643         break;
11644
11645 #ifdef TCPSOCKET
11646       case FN_HSTADD:
11647         printf("\\faddr2name(s)\n\
11648   s = numeric IP address.\n");
11649         printf("Returns:\n");
11650         printf("  Corresponding IP hostname if found, otherwise null.\n");
11651         break;
11652       case FN_HSTNAM:
11653         printf("\\fname2addr(s)\n\
11654   s = IP host name.\n");
11655         printf("Returns:\n");
11656         printf("  Corresponding numeric IP address if found, else null.\n");
11657         break;
11658 #endif /* TCPSOCKET */
11659
11660       case FN_DELSEC:
11661         printf("\\fdelta2secs(dt)\n\
11662   dt = Delta time, e.g. +3d14:27:52.\n");
11663         printf("Returns:\n");
11664         printf("  The corresponding number of seconds.\n");
11665         break;
11666
11667       case FN_PC_DU:
11668         printf("\\fdos2unixpath(p)\n\
11669   p = string, DOS pathname.\n");
11670         printf("Returns:\n");
11671         printf("  The argument converted to a Unix pathname.\n");
11672         break;
11673
11674       case FN_PC_UD:
11675         printf("\\funix2dospath(p)\n\
11676   p = string, Unix pathname.\n");
11677         printf("Returns:\n");
11678         printf("  The argument converted to a DOS pathname.\n");
11679         break;
11680
11681 #ifdef FN_ERRMSG
11682       case FN_ERRMSG:
11683         printf("\\ferrstring(n)\n\
11684   n = platform-dependent numeric error code.\n");
11685         printf("Returns:\n");
11686         printf("  The corresponding error string.\n");
11687         break;
11688 #endif /* FN_ERRMSG */
11689
11690       case FN_KWVAL:
11691         printf("\\fkeywordvalue(s1[,s2])\n\
11692   s1 = string of the form \"name=value\"\n\
11693   s2 = one more separator characters (default separator is \"=\")\n");
11694         printf("    Assigns the value, if any, to the named macro and sets\n");
11695         printf("    the \\v(lastkeywordvalue) to the macro name.\n");
11696         printf("    If no value is given, the macro is undefined.\n");
11697         printf("Returns:\n");
11698         printf(" -1 on error\n");
11699         printf("  0 if no keyword or value were found\n");
11700         printf("  1 if a keyword was found but no value\n");
11701         printf("  2 if a keyword and a value were found\n");
11702         printf("Synonym: \\kwvalue(s1[,s2])\n");
11703         break;
11704
11705 #ifdef COMMENT
11706       case FN_SLEEP:
11707         printf("\\fsleep(n)\n\
11708   n = number of seconds\n");
11709         printf("    Pauses for the given number of seconds.\n");
11710         printf("Returns: the empty string.\n");
11711         break;
11712
11713       case FN_MSLEEP:
11714         printf("\\fmsleep(n)\n\
11715   n = number of milliseconds\n");
11716         printf("    Pauses for the given number of milliseconds.\n");
11717         printf("Returns: the empty string.\n");
11718         break;
11719 #endif /* COMMENT */
11720
11721 #ifdef NT
11722       case FN_SNAME:
11723         printf("\\fshortpathname(s)\n\
11724   s = file or directory name string\n");
11725         printf("    Returns the short path form of the given input.\n");
11726         break;
11727
11728       case FN_LNAME:
11729         printf("\\flongpathname(s)\n\
11730   s = file or directory name string\n");
11731         printf("    Returns the long path form of the given input.\n");
11732         break;
11733 #else
11734       case FN_SNAME:
11735         printf("\\fshortpathname(s)\n\
11736     Synonym for \fpathname()\n");
11737         break;
11738
11739       case FN_LNAME:
11740         printf("\\flongpathname(s)\n\
11741     Synonym for \fpathname()\n");
11742         break;
11743 #endif /* NT */
11744
11745       case FN_EMAIL:
11746         printf("\\femailaddress(s)\n\
11747   s = From: or Sender: header from an RFC2822-format email message\n");
11748         printf("    Extracts and returns the email address.\n");
11749         break;
11750
11751       case FN_PICTURE:
11752         printf("\\fpictureinfo(s[,&a])\n\
11753   s  = File specification of a JPG or GIF picture file.\n\
11754   &a = Optional array name.\n\n");
11755         printf("Returns integer:\n\
11756   0 if file not found or not recognized;\n\
11757   1 if orientation is landscape;\n\
11758   2 if orientation is portrait.\n\n"); 
11759         printf("  If an array name is included, element 1 is filled \
11760 in with the image width\n\
11761   in pixels, and element 2 the image height.\n");
11762         break;
11763
11764       case FN_PID:
11765         printf("\\fgetpidinfo(n1)\n\
11766  n1 = Numeric process ID\n");
11767         printf("Returns integer:\n\
11768  -1 on failure to get information;\n\
11769   1 if n1 is the ID of an active process;\n\
11770   0 if the process does not exist.\n"); 
11771         break;
11772
11773       case FN_FUNC:
11774         printf("\\ffunction(s1)\n\
11775  s1 = name of function.\n");
11776         printf("Returns integer:\n\
11777   1 if s1 is the name of an available built-in function;\n\
11778   0 otherwise.\n"); 
11779         break;
11780
11781       case FN_RECURSE:
11782         printf("\\frecurse(s1)\n\
11783  s1 = name of \\&x or \\&x[] type variable\n");
11784         printf("Returns the result of evaluating the variable recursively.\n");
11785         break;
11786
11787       case FN_SQUEEZE:
11788         printf("\\fsqueeze(s)\n\
11789   s = string\n\
11790     Returns string with leading and trailing whitespace removed, Tabs\n\
11791     converted to Spaces, and multiple spaces converted to single spaces.\n");
11792         break;
11793
11794 #ifndef NOCSETS
11795       case FN_XLATE:
11796         printf("\\fcvtcset(s,cset1,cset2)\n\
11797   s = string\n\
11798     Returns string converted from character set cset1 to cset2, where cset1\n\
11799     and cset2 are names of File Character-Sets \
11800 ('set file char ?' for a list).\n");
11801         break;
11802 #endif  /* NOCSETS */
11803
11804       case FN_UNPCT:
11805         printf("\\fdecodehex(s1[,s2])\n\
11806   s1, s2 = strings\n\
11807     Decodes a string s1 that contains prefixed hex bytes.  s2 is the prefix;\n\
11808     the default is %%%%.  You can specify any other prefix one or two bytes\n\
11809     long.  If the prefix contains letters (such as 0x), case is ingored.\n\
11810     Returns string s1 with hex escapes replaced by the bytes they \
11811 represent.\n");
11812         break;
11813
11814       case FN_STRINGT:
11815         printf("\\fstringtype(s)\n\
11816   s = string\n\
11817     Returns a string representing the type of its string argument s1:\n\
11818     7BIT, 8BIT, UTF8, TEXT, or BINARY.  TEXT means some kind of text\n\
11819     other than 7BIT, 8BIT, or UTF8 (this probably will never appear).\n");
11820         break;
11821
11822       case FN_STRCMP:
11823         printf("\\fstrcmp(s1,s2[,case[,start[,length]]])\n\
11824   s1, s2 = strings\n\
11825   case, start, length = numbers or arithmetic expressions.\n\
11826     case = 0 [default] means to do a case-independent comparison;\n\
11827     nonzero case requests a case-sensitive comparison.\n\
11828     The optional start and length arguments apply to both s1 and s2\n\
11829     and allow specification of substrings if it is not desired to compare\n\
11830     the whole strings.  Results for non-ASCII strings are implentation-\n\
11831     and locale-dependent.\n\
11832   Returns a number:\n\
11833     -1: s1 is lexically less than s2;\n\
11834      0: s1 and s2 are lexically equal;\n\
11835      2: s1 is lexically greater than s2.\n");
11836         break;
11837
11838       default:
11839         printf("Sorry, help not available for \"%s\"\n",cmdbuf);
11840     }
11841    printf("\n");
11842    return(0);
11843 }
11844 #endif /* NOSPL */
11845
11846 #ifdef OS2
11847 #ifndef NOKVERBS
11848
11849 /*  D O H K V E R B  --  Give help for a Kverb  */
11850
11851 int
11852 dohkverb(xx) int xx; {
11853     int x,i,found,button,event;
11854
11855     if (xx == -3) {
11856         printf("\n Type SHOW KVERBS to see a list of available Kverbs.\n"
11857                );
11858         printf(
11859 " Type HELP KVERB <name> to see the current definition of a given Kverb.\n\n"
11860               );
11861         return(-9);
11862     }
11863     if (xx < 0) return(xx);
11864     if ((x = cmcfm()) < 0) return(x);
11865     switch ( xx ) {
11866         /* DEC VT keyboard key definitions */
11867
11868     case  K_COMPOSE :                   /* Compose key */
11869         printf("\\Kcompose           Compose an accented character\n");
11870         break;
11871     case  K_C_UNI16 :                   /* UCS2 key */
11872         printf("\\Kucs2              Enter a Unicode character\n");
11873         break;
11874
11875 /* DEC arrow keys */
11876
11877     case  K_UPARR     :                 /* DEC Up Arrow key */
11878         printf("\\Kuparr         Transmit Terminal Up Arrow sequence\n");
11879         break;
11880     case  K_DNARR     :                 /* DEC Down Arrow key */
11881         printf("\\Kdnarr         Transmit Terminal Down Arrow sequence\n");
11882         break;
11883     case  K_RTARR     :                 /* DEC Right Arrow key */
11884         printf("\\Krtarr         Transmit Terminal Right Arrow sequence\n");
11885         break;
11886     case  K_LFARR     :                 /* DEC Left Arrow key */
11887         printf("\\Klfarr         Transmit Terminal Left Arrow sequence\n");
11888         break;
11889
11890     case  K_PF1       :                 /* DEC PF1 key */
11891         printf("\\Kpf1,\\Kgold    Transmit DEC PF1 sequence\n");
11892         break;
11893     case  K_PF2       :                 /* DEC PF2 key */
11894         printf("\\Kpf2           Transmit DEC PF2 sequence\n");
11895         break;
11896     case  K_PF3       :                 /* DEC PF3 key */
11897         printf("\\Kpf3           Transmit DEC PF3 sequence\n");
11898         break;
11899     case  K_PF4       :                 /* DEC PF4 key */
11900         printf("\\Kpf4           Transmit DEC PF4 sequence\n");
11901         break;
11902
11903     case  K_KP0       :                 /* DEC Keypad 0 */
11904         printf("\\Kkp0           Transmit DEC Keypad-0 sequence\n");
11905         break;
11906     case  K_KP1       :                 /* DEC Keypad 1 */
11907         printf("\\Kkp1           Transmit DEC Keypad-1 sequence\n");
11908         break;
11909     case  K_KP2       :                 /* etc ... through 9 */
11910         printf("\\Kkp2           Transmit DEC Keypad-2 sequence\n");
11911         break;
11912     case  K_KP3       :
11913         printf("\\Kkp3           Transmit DEC Keypad-3 sequence\n");
11914         break;
11915     case  K_KP4       :
11916         printf("\\Kkp4           Transmit DEC Keypad-4 sequence\n");
11917         break;
11918     case  K_KP5       :
11919         printf("\\Kkp5           Transmit DEC Keypad-5 sequence\n");
11920         break;
11921     case  K_KP6       :
11922         printf("\\Kkp6           Transmit DEC Keypad-6 sequence\n");
11923         break;
11924     case  K_KP7       :
11925         printf("\\Kkp7           Transmit DEC Keypad-7 sequence\n");
11926         break;
11927     case  K_KP8       :
11928         printf("\\Kkp8           Transmit DEC Keypad-8 sequence\n");
11929         break;
11930     case  K_KP9       :
11931         printf("\\Kkp9           Transmit DEC Keypad-9 sequence\n");
11932         break;
11933     case  K_KPCOMA    :                 /* DEC keypad comma */
11934         printf("\\Kkpcoma        Transmit DEC Keypad-Comma sequence\n");
11935         break;
11936     case  K_KPMINUS   :                 /* DEC keypad minus */
11937         printf("\\Kkpminus       Transmit DEC Keypad-Minus sequence\n");
11938         break;
11939     case  K_KPDOT     :                 /* DEC keypad period */
11940         printf("\\Kkpdot         Transmit DEC Keypad-Period sequence\n");
11941         break;
11942     case  K_KPENTER   :                 /* DEC keypad enter */
11943         printf("\\Kkpenter       Transmit DEC Keypad-Enter sequence\n");
11944         break;
11945
11946 /* DEC Top-Rank F keys */
11947
11948     case  K_DECF1     :                 /* DEC F1 key */
11949         printf("\\Kdecf1         Transmit DEC F1 sequence for PC keyboard\n");
11950         break;
11951     case  K_DECF2     :                 /* DEC F2 key */
11952         printf("\\Kdecf2         Transmit DEC F2 sequence for PC keyboard\n");
11953         break;
11954     case  K_DECF3     :                 /* DEC F3 key */
11955         printf("\\Kdecf3         Transmit DEC F3 sequence for PC keyboard\n");
11956         break;
11957     case  K_DECF4     :                 /* DEC F4 key */
11958         printf("\\Kdecf4         Transmit DEC F4 sequence for PC keyboard\n");
11959         break;
11960     case  K_DECF5     :                 /* DEC F5 key */
11961         printf("\\Kdecf5         Transmit DEC F5 sequence for PC keyboard\n");
11962         break;
11963     case  K_DECHOME:                    /* DEC HOME key */
11964        printf("\\Kdechome       Transmit DEC HOME sequence for PC keyboard\n");
11965        break;
11966
11967     case  K_DECF6     :                 /* DEC F6 key */
11968         printf("\\Kdecf6         Transmit DEC F6 sequence\n");
11969         break;
11970     case  K_DECF7     :                 /* etc, through F20 */
11971         printf("\\Kdecf7         Transmit DEC F7 sequence\n");
11972         break;
11973     case  K_DECF8     :
11974         printf("\\Kdecf8         Transmit DEC F8 sequence\n");
11975         break;
11976     case  K_DECF9     :
11977         printf("\\Kdecf9         Transmit DEC F9 sequence\n");
11978         break;
11979     case  K_DECF10    :
11980         printf("\\Kdecf10        Transmit DEC F10 sequence\n");
11981         break;
11982     case  K_DECF11    :
11983         printf("\\Kdecf11        Transmit DEC F11 sequence\n");
11984         break;
11985     case  K_DECF12    :
11986         printf("\\Kdecf12        Transmit DEC F12 sequence\n");
11987         break;
11988     case  K_DECF13    :
11989         printf("\\Kdecf13        Transmit DEC F13 sequence\n");
11990         break;
11991     case  K_DECF14    :
11992         printf("\\Kdecf14        Transmit DEC F14 sequence\n");
11993         break;
11994     case  K_DECHELP   :                 /* DEC Help key */
11995         printf("\\Kdecf15,\\Kdechelp  Transmit DEC HELP sequence\n");
11996         break;
11997     case  K_DECDO     :                 /* DEC Do key */
11998         printf("\\Kdecf16,\\Kdecdo    Transmit DEC DO sequence\n");
11999         break;
12000     case  K_DECF17    :
12001         printf("\\Kdecf17        Transmit DEC F17 sequence\n");
12002         break;
12003     case  K_DECF18    :
12004         printf("\\Kdecf18        Transmit DEC F18 sequence\n");
12005         break;
12006     case  K_DECF19    :
12007         printf("\\Kdecf19        Transmit DEC F19 sequence\n");
12008         break;
12009     case  K_DECF20    :
12010         printf("\\Kdecf20        Transmit DEC F20 sequence\n");
12011         break;
12012
12013 /* DEC editing keys */
12014
12015     case  K_DECFIND   :                 /* DEC Find key */
12016         printf("\\Kdecfind       Transmit DEC FIND sequence\n");
12017         break;
12018     case  K_DECINSERT :                 /* DEC Insert key */
12019         printf("\\Kdecinsert     Transmit DEC INSERT HERE sequence\n");
12020         break;
12021     case  K_DECREMOVE :                 /* DEC Remove key */
12022         printf("\\Kdecremove     Transmit DEC REMOVE sequence\n");
12023         break;
12024     case  K_DECSELECT :                 /* DEC Select key */
12025         printf("\\Kdecfselect    Transmit DEC SELECT sequence\n");
12026         break;
12027     case  K_DECPREV   :                 /* DEC Previous Screen key */
12028         printf("\\Kdecprev       Transmit DEC PREV SCREEN sequence\n");
12029         break;
12030     case  K_DECNEXT   :                 /* DEC Next Screen key */
12031         printf("\\Kdecnext       Transmit DEC NEXT SCREEN sequence\n");
12032         break;
12033
12034 /* DEC User-Defined Keys */
12035
12036     case  K_UDKF1     :                 /* F1 - F5 are XTERM extensions */
12037       printf("\\Kudkf1         Transmit XTERM F1 User Defined Key sequence\n");
12038       break;
12039     case  K_UDKF2     :
12040       printf("\\Kudkf2         Transmit XTERM F2 User Defined Key sequence\n");
12041       break;
12042     case  K_UDKF3     :
12043       printf("\\Kudkf3         Transmit XTERM F3 User Defined Key sequence\n");
12044       break;
12045     case  K_UDKF4     :
12046       printf("\\Kudkf4         Transmit XTERM F4 User Defined Key sequence\n");
12047       break;
12048     case  K_UDKF5     :
12049       printf("\\Kudkf5         Transmit XTERM F5 User Defined Key sequence\n");
12050       break;
12051     case  K_UDKF6     :                 /* DEC User Defined Key F6 */
12052       printf("\\Kudkf6         Transmit DEC F6 User Defined Key sequence\n");
12053       break;
12054     case  K_UDKF7     :                 /* DEC User Defined Key F7 */
12055       printf("\\Kudkf7         Transmit DEC F7 User Defined Key sequence\n");
12056       break;
12057     case  K_UDKF8     :                 /* etc ... through F20 */
12058       printf("\\Kudkf8         Transmit DEC F8 User Defined Key sequence\n");
12059       break;
12060     case  K_UDKF9     :
12061       printf("\\Kudkf9         Transmit DEC F9 User Defined Key sequence\n");
12062       break;
12063     case  K_UDKF10    :
12064       printf("\\Kudkf10        Transmit DEC F10 User Defined Key sequence\n");
12065       break;
12066     case  K_UDKF11    :
12067       printf("\\Kudkf11        Transmit DEC F11 User Defined Key sequence\n");
12068       break;
12069     case  K_UDKF12    :
12070       printf("\\Kudkf12        Transmit DEC F12 User Defined Key sequence\n");
12071       break;
12072     case  K_UDKF13    :
12073       printf("\\Kudkf13        Transmit DEC F13 User Defined Key sequence\n");
12074       break;
12075     case  K_UDKF14    :
12076       printf("\\Kudkf14        Transmit DEC F14 User Defined Key sequence\n");
12077       break;
12078     case  K_UDKHELP   :
12079       printf(
12080       "\\Kudkhelp,\\Kudkf15  Transmit DEC HELP User Defined Key sequence\n");
12081       break;
12082     case  K_UDKDO     :
12083       printf(
12084       "\\Kudkdo,\\Kudkf16    Transmit DEC DO User Defined Key sequence\n");
12085       break;
12086     case  K_UDKF17    :
12087       printf("\\Kudkf17        Transmit DEC F17 User Defined Key sequence\n");
12088       break;
12089     case  K_UDKF18    :
12090       printf("\\Kudkf18        Transmit DEC F18 User Defined Key sequence\n");
12091       break;
12092     case  K_UDKF19    :
12093       printf("\\Kudkf19        Transmit DEC F19 User Defined Key sequence\n");
12094       break;
12095     case  K_UDKF20    :
12096       printf("\\Kudkf20        Transmit DEC F20 User Defined Key sequence\n");
12097       break;
12098
12099 /* Emacs Keys */
12100     case  K_EMACS_OVER:
12101       printf(
12102      "\\Kemacs_overwrite  Transmit EMACS Overwrite toggle command sequence\n");
12103       break;
12104
12105 /* Kermit screen-scrolling keys */
12106
12107     case  K_DNONE     :                 /* Screen rollback: down one line */
12108       printf("\\Kdnone         Screen rollback: down one line\n");
12109       break;
12110     case  K_DNSCN     :                 /* Screen rollback: down one screen */
12111       printf("\\Kdnscn         Screen rollback: down one screen\n");
12112       break;
12113     case  K_UPONE     :                 /* Screen rollback: Up one line */
12114       printf("\\Kupone         Screen rollback: up one line\n");
12115       break;
12116     case  K_UPSCN     :                 /* Screen rollback: Up one screen */
12117       printf("\\Kupscn         Screen rollback: up one screen\n");
12118       break;
12119     case  K_ENDSCN    :                 /* Screen rollback: latest screen */
12120       printf("\\Kendscn        Screen rollback: latest screen\n");
12121       break;
12122     case  K_HOMSCN    :                 /* Screen rollback: oldest screen */
12123       printf("\\Khomscn        Screen rollback: oldest screen\n");
12124       break;
12125     case  K_GO_BOOK   :         /* Scroll to bookmark */
12126       printf("\\Kgobook        Screen rollback: go to bookmark\n");
12127       break;
12128     case  K_GOTO      :         /* Scroll to line number */
12129       printf("\\Kgoto          Screen rollback: go to line number\n");
12130       break;
12131
12132     case  K_LFONE     :                 /* Horizontal Scroll: Left one cell */
12133       printf("\\Klfone         Horizontal Scroll: Left one column\n");
12134       break;
12135     case  K_LFPAGE    :                 /* Horizontal Scroll: Left one page */
12136       printf("\\Klfpage        Horizontal Scroll: Left eight columns\n");
12137       break;
12138     case  K_LFALL     :
12139       printf("\\Klfall         Horizontal Scroll: Left to margin\n");
12140       break;
12141     case  K_RTONE     :                 /* Horizontal Scroll: Right one cell */
12142       printf("\\Krtone         Horizontal Scroll: Right one column\n");
12143       break;
12144     case  K_RTPAGE    :                 /* Horizontal Scroll: Right one page */
12145       printf("\\Krtpage        Horizontal Scroll: Right eight columns\n");
12146       break;
12147     case  K_RTALL     :
12148       printf("\\Krtall         Horizontal Scroll: Right to margin\n");
12149       break;
12150
12151 /* Keyboard language switching verbs */
12152
12153     case  K_KB_ENG    :                 /* English keyboard mode */
12154       printf("\\Kkbenglish     Switch to Normal (English) keyboard mode\n");
12155       break;
12156     case  K_KB_HEB    :                 /* Hebrew keyboard mode */
12157       printf("\\Kkbhebrew      Switch to Hebrew keyboard mode\n");
12158       break;
12159     case  K_KB_RUS    :                 /* Russian keyboard mode */
12160       printf("\\Kkbrussian     Switch to Russian keyboard mode\n");
12161       break;
12162     case  K_KB_EMA    :                 /* Emacs keyboard mode */
12163       printf("\\Kkbemacs       Switch to EMACS keyboard mode\n");
12164       break;
12165     case  K_KB_WP     :                 /* Word Perfect 5.1 mode */
12166       printf("\\Kkbwp          Switch to Word Perfect 5.1 keyboard mode\n");
12167       break;
12168
12169 /* Mark Mode actions */
12170
12171     case  K_MARK_START  :       /* Enter Mark Mode/Start marking */
12172       printf("\\Kmarkstart     Mark Mode: Enter mode or Start marking\n");
12173       break;
12174     case  K_MARK_CANCEL :       /* Exit Mark Mode - Do Nothing */
12175       printf("\\Kmarkcancel    Mark Mode: Cancel mode\n");
12176       break;
12177     case  K_MARK_COPYCLIP:      /* Exit Mark Mode - Copy data to clipboard */
12178       printf("\\Kmarkcopyclip  Mark Mode: Copy marked text to clipboard\n");
12179       break;
12180     case  K_MARK_COPYHOST:      /* Exit Mark Mode - Copy data to host   */
12181       printf("\\Kmarkcopyhost  Mark Mode: Copy marked text to host\n");
12182       break;
12183     case  K_MARK_SELECT :       /* Exit Mark Mode - Select */
12184       printf(
12185       "\\Kmarkselect    Mark Mode: Place marked text into \\v(select)\n");
12186       break;
12187     case  K_BACKSRCH    :            /* Search Backwards for text */
12188       printf("\\Kbacksearch    Search: Begin backward search for text\n");
12189       break;
12190     case  K_FWDSRCH     :            /* Search Forwards for text */
12191       printf("\\Kfwdsearch     Search: Begin forward search for text\n");
12192       break;
12193     case  K_BACKNEXT    :     /* Search Backwards for next instance of text */
12194       printf(
12195       "\\Kbacknext      Search: Find next instance of text backwards\n");
12196       break;
12197     case  K_FWDNEXT     :      /* Search Forwards for next instance of text */
12198       printf("\\Kfwdnext       Search: Find next instance of text forwards\n");
12199       break;
12200
12201 /* Miscellaneous Kermit actions */
12202
12203     case  K_EXIT        :               /* Return to command parser */
12204       printf("\\Kexit          Toggle between COMMAND and CONNECT modes\n");
12205       break;
12206     case  K_BREAK       :               /* Send a BREAK */
12207       printf("\\Kbreak         Transmit BREAK signal to host\n");
12208       break;
12209     case  K_RESET       :               /* Reset emulator */
12210       printf("\\Kreset         Reset Terminal Emulator to user defaults\n");
12211       break;
12212     case  K_DOS         :               /* Push to DOS (i.e. OS/2) */
12213       printf("\\Kdos,\\Kos2     Push to Command Shell\n");
12214       break;
12215     case  K_HANGUP      :               /* Hang up the connection */
12216       printf("\\Khangup        Hangup the active connection\n");
12217       break;
12218     case  K_DUMP        :               /* Dump/Print current screen */
12219       printf(
12220      "\\Kdump          Dump/copy current screen to SET PRINTER device/file\n");
12221       break;
12222     case  K_LBREAK      :               /* Send a Long BREAK */
12223       printf("\\Klbreak        Transmit LONG BREAK signal to host\n");
12224       break;
12225     case  K_NULL        :               /* Send a NUL */
12226       printf("\\Knull          Transmit NULL ('\0') character to host\n");
12227       break;
12228     case  K_HELP        :               /* Pop-up help */
12229       printf("\\Khelp          Raise Pop-Up help display\n");
12230       break;
12231     case  K_HOLDSCRN    :               /* Hold screen */
12232       printf("\\Kholdscrn      Pause data input during CONNECT mode\n");
12233       break;
12234     case  K_IGNORE      :               /* Ignore this key, don't even beep */
12235       printf("\\Kignore        Ignore key\n");
12236       break;
12237
12238     case  K_LOGOFF      :               /* Turn off session logging */
12239       printf("\\Klogoff        Turn off session logging (see \\Ksession)\n");
12240       break;
12241     case  K_LOGON       :               /* Turn on session logging */
12242       printf("\\Klogon         Turn on session logging (see \\Ksession)\n");
12243       break;
12244     case K_SESSION:
12245       printf(
12246          "\\Ksession       Toggle on/off session logging to 'session.log'\n");
12247       break;
12248     case K_AUTODOWN:
12249       printf("\\Kautodown      Toggle on/off terminal autodownload.\n");
12250       break;
12251     case K_BYTESIZE:
12252       printf(
12253         "\\Kbytesize      Toggle terminal bytesize between 7 and 8 bits.\n");
12254       break;
12255
12256 #ifdef COMMENT
12257     case MODELINE:
12258     case  K_NETHOLD     :               /* Put network connection on hold */
12259     case  K_NEXTSESS    :               /* Toggle to next network session */
12260 #endif /* COMMENT */
12261
12262     case K_CURSOR_URL:
12263         printf(
12264      "\\Kurl           Treat text under cursor position as a URL\n");
12265         break;
12266     case  K_STATUS      :               /* Show status */
12267       printf(
12268      "\\Kstatus        Toggle statusline (None, Indicator, Host Writeable)\n");
12269       break;
12270     case  K_TERMTYPE    :               /* Toggle term type: text/graphics */
12271       printf("\\Ktermtype      Toggle Terminal Type\n");
12272       break;
12273     case  K_PRTCTRL     :               /* Print Controller mode */
12274       printf("\\Kprtctrl       Toggle Ctrl-Print (transparent) mode\n");
12275       break;
12276     case  K_PRINTFF     :               /* Print formfeed */
12277       printf("\\Kprintff       Output Form Feed to SET PRINTER device\n");
12278       break;
12279     case  K_FLIPSCN     :               /* Flip screen */
12280       printf("\\Kflipscn       Reverse foreground and background colors\n");
12281       break;
12282     case  K_DEBUG       :               /* Toggle debugging */
12283       printf("\\Kdebug         Toggle Terminal Debug mode\n");
12284       break;
12285     case  K_TN_SAK      :               /* TELNET Secure Access Key */
12286       printf("\\Ktn_sak        TELNET: IBM Secure Access Key\n");
12287       printf("                Used to request a Trusted Shell with AIX\n");
12288       break;
12289     case  K_TN_AO       :               /* TELNET Cancel Output */
12290       printf("\\Ktn_ao         TELNET: Transmit Cancel-Output request\n");
12291       break;
12292     case  K_TN_AYT      :               /* TELNET Are You There */
12293       printf("\\Ktnayt         TELNET: Transmit Are You There? request\n");
12294       break;
12295     case  K_TN_EC       :               /* TELNET Erase Character */
12296       printf("\\Ktn_ec         TELNET: Transmit Erase Character request\n");
12297       break;
12298     case  K_TN_EL       :               /* TELNET Erase Line */
12299       printf("\\Ktn_el         TELNET: Transmit Erase Line request\n");
12300       break;
12301     case  K_TN_GA       :               /* TELNET Go Ahead */
12302       printf("\\Ktn_ga         TELNET: Transmit Go Ahead request\n");
12303       break;
12304     case  K_TN_IP       :               /* TELNET Interrupt Process */
12305       printf("\\Ktn_ip         TELNET: Transmit Interrupt Process request\n");
12306       break;
12307     case  K_TN_LOGOUT   :               /* TELNET Logout */
12308       printf("\\Ktn_logout     TELNET: Transmit Do Logout Option\n");
12309       break;
12310     case  K_TN_NAWS   :                 /* TELNET NAWS */
12311       printf(
12312         "\\Ktn_naws       TELNET: Transmit Window Size if NAWS is active\n");
12313       break;
12314     case  K_PASTE       :               /* Paste data from clipboard */
12315       printf("\\Kpaste         Paste data from clipboard to host\n");
12316       break;
12317     case  K_CLRSCRN     :               /* Clear Terminal Screen */
12318       printf("\\Kclearscreen   Clear the Terminal screen\n");
12319       break;
12320     case  K_PRTAUTO     :               /* Print Auto mode */
12321       printf("\\Kprtauto       Toggle Auto-Print mode\n");
12322       break;
12323     case  K_PRTCOPY     :               /* Print Copy mode */
12324       printf("\\Kprtcopy       Toggle Copy-Print mode\n");
12325       break;
12326     case  K_ANSWERBACK  :               /* Transmit Answerback String */
12327       printf("\\Kanswerback    Transmit answerback string to host\n");
12328       break;
12329     case  K_SET_BOOK    :               /* Set Bookmark */
12330       printf("\\Ksetbook       Set bookmark\n");
12331       break;
12332     case  K_QUIT        :               /* Quit Kermit */
12333       printf("\\Kquit          Hangup connection and quit kermit\n");
12334       break;
12335     case  K_KEYCLICK    :               /* Toggle Keyclick */
12336       printf("\\Kkeyclick      Toggle Keyclick mode\n");
12337       break;
12338     case  K_LOGDEBUG    :               /* Toggle Debug Log File */
12339       printf("\\Klogdebug      Toggle Debug Logging to File\n");
12340       break;
12341     case  K_FNKEYS      :               /* Show Function Key Labels */
12342       printf("\\Kfnkeys        Display Function Key Labels\n");
12343       break;
12344
12345 #ifdef OS2MOUSE
12346 /* Mouse only Kverbs */
12347
12348     case  K_MOUSE_CURPOS :
12349       printf("\\Kmousecurpos   Mouse: Move host cursor to position\n");
12350       break;
12351     case  K_MOUSE_MARK   :
12352       printf(
12353      "\\Kmousemark     Mouse: Mark text for selection (drag event only)\n");
12354       break;
12355     case  K_MOUSE_URL    :
12356       printf("\\Kmouseurl      Mouse: Start browser with selected URL\n");
12357       break;
12358 #endif /* OS2MOUSE */
12359
12360 /* ANSI Function Key definitions */
12361     case  K_ANSIF01          :
12362       printf("\\Kansif01       Transmit SCOANSI/AT386: F1 \n");
12363       break;
12364     case  K_ANSIF02          :
12365       printf("\\Kansif02       Transmit SCOANSI/AT386: F2 \n");
12366       break;
12367     case  K_ANSIF03          :
12368       printf("\\Kansif03       Transmit SCOANSI/AT386: F3 \n");
12369       break;
12370     case  K_ANSIF04          :
12371       printf("\\Kansif04       Transmit SCOANSI/AT386: F4 \n");
12372       break;
12373     case  K_ANSIF05          :
12374       printf("\\Kansif05       Transmit SCOANSI/AT386: F5 \n");
12375       break;
12376     case  K_ANSIF06          :
12377       printf("\\Kansif06       Transmit SCOANSI/AT386: F6 \n");
12378       break;
12379     case  K_ANSIF07          :
12380       printf("\\Kansif07       Transmit SCOANSI/AT386: F7 \n");
12381       break;
12382     case  K_ANSIF08          :
12383       printf("\\Kansif08       Transmit SCOANSI/AT386: F8 \n");
12384       break;
12385     case  K_ANSIF09          :
12386       printf("\\Kansif09       Transmit SCOANSI/AT386: F9 \n");
12387       break;
12388     case  K_ANSIF10          :
12389       printf("\\Kansif10       Transmit SCOANSI/AT386: F10\n");
12390       break;
12391     case  K_ANSIF11          :
12392       printf("\\Kansif11       Transmit SCOANSI/AT386: F11\n");
12393       break;
12394     case  K_ANSIF12          :
12395       printf("\\Kansif12       Transmit SCOANSI/AT386: F12\n");
12396       break;
12397     case  K_ANSIF13          :
12398       printf("\\Kansif13       Transmit SCOANSI/AT386: Shift-F1 \n");
12399       break;
12400     case  K_ANSIF14          :
12401       printf("\\Kansif14       Transmit SCOANSI/AT386: Shift-F2 \n");
12402       break;
12403     case  K_ANSIF15          :
12404       printf("\\Kansif15       Transmit SCOANSI/AT386: Shift-F3 \n");
12405       break;
12406     case  K_ANSIF16          :
12407       printf("\\Kansif16       Transmit SCOANSI/AT386: Shift-F4 \n");
12408       break;
12409     case  K_ANSIF17          :
12410       printf("\\Kansif17       Transmit SCOANSI/AT386: Shift-F5 \n");
12411       break;
12412     case  K_ANSIF18          :
12413       printf("\\Kansif18       Transmit SCOANSI/AT386: Shift-F6 \n");
12414       break;
12415     case  K_ANSIF19          :
12416       printf("\\Kansif19       Transmit SCOANSI/AT386: Shift-F7 \n");
12417       break;
12418     case  K_ANSIF20          :
12419       printf("\\Kansif20       Transmit SCOANSI/AT386: Shift-F8 \n");
12420       break;
12421     case  K_ANSIF21          :
12422       printf("\\Kansif21       Transmit SCOANSI/AT386: Shift-F9 \n");
12423       break;
12424     case  K_ANSIF22          :
12425       printf("\\Kansif22       Transmit SCOANSI/AT386: Shift-F10\n");
12426       break;
12427     case  K_ANSIF23          :
12428       printf("\\Kansif23       Transmit SCOANSI/AT386: Shift-F11\n");
12429       break;
12430     case  K_ANSIF24          :
12431       printf("\\Kansif24       Transmit SCOANSI/AT386: Shift-F12\n");
12432       break;
12433     case  K_ANSIF25          :
12434       printf("\\Kansif25       Transmit SCOANSI/AT386: Ctrl-F1 \n");
12435       break;
12436     case  K_ANSIF26          :
12437       printf("\\Kansif26       Transmit SCOANSI/AT386: Ctrl-F2 \n");
12438       break;
12439     case  K_ANSIF27          :
12440       printf("\\Kansif27       Transmit SCOANSI/AT386: Ctrl-F3 \n");
12441       break;
12442     case  K_ANSIF28          :
12443       printf("\\Kansif28       Transmit SCOANSI/AT386: Ctrl-F4 \n");
12444       break;
12445     case  K_ANSIF29          :
12446       printf("\\Kansif29       Transmit SCOANSI/AT386: Ctrl-F5 \n");
12447       break;
12448     case  K_ANSIF30          :
12449       printf("\\Kansif30       Transmit SCOANSI/AT386: Ctrl-F6 \n");
12450       break;
12451     case  K_ANSIF31          :
12452       printf("\\Kansif31       Transmit SCOANSI/AT386: Ctrl-F7 \n");
12453       break;
12454     case  K_ANSIF32          :
12455       printf("\\Kansif32       Transmit SCOANSI/AT386: Ctrl-F8 \n");
12456       break;
12457     case  K_ANSIF33          :
12458       printf("\\Kansif33       Transmit SCOANSI/AT386: Ctrl-F9 \n");
12459       break;
12460     case  K_ANSIF34          :
12461       printf("\\Kansif34       Transmit SCOANSI/AT386: Ctrl-F10\n");
12462       break;
12463     case  K_ANSIF35          :
12464       printf("\\Kansif35       Transmit SCOANSI/AT386: Ctrl-F11\n");
12465       break;
12466     case  K_ANSIF36          :
12467       printf("\\Kansif36       Transmit SCOANSI/AT386: Ctrl-F12\n");
12468       break;
12469     case  K_ANSIF37          :
12470       printf("\\Kansif37       Transmit SCOANSI/AT386: Ctrl-Shift-F1 \n");
12471       break;
12472     case  K_ANSIF38          :
12473       printf("\\Kansif38       Transmit SCOANSI/AT386: Ctrl-Shift-F2 \n");
12474       break;
12475     case  K_ANSIF39          :
12476       printf("\\Kansif39       Transmit SCOANSI/AT386: Ctrl-Shift-F3 \n");
12477       break;
12478     case  K_ANSIF40          :
12479       printf("\\Kansif40       Transmit SCOANSI/AT386: Ctrl-Shift-F4 \n");
12480       break;
12481     case  K_ANSIF41          :
12482       printf("\\Kansif41       Transmit SCOANSI/AT386: Ctrl-Shift-F5 \n");
12483       break;
12484     case  K_ANSIF42          :
12485       printf("\\Kansif42       Transmit SCOANSI/AT386: Ctrl-Shift-F6 \n");
12486       break;
12487     case  K_ANSIF43          :
12488       printf("\\Kansif43       Transmit SCOANSI/AT386: Ctrl-Shift-F7 \n");
12489       break;
12490     case  K_ANSIF44          :
12491       printf("\\Kansif44       Transmit SCOANSI/AT386: Ctrl-Shift-F8 \n");
12492       break;
12493     case  K_ANSIF45          :
12494       printf("\\Kansif45       Transmit SCOANSI/AT386: Ctrl-Shift-F9 \n");
12495       break;
12496     case  K_ANSIF46          :
12497       printf("\\Kansif46       Transmit SCOANSI/AT386: Ctrl-Shift-F10\n");
12498       break;
12499     case  K_ANSIF47          :
12500       printf("\\Kansif47       Transmit SCOANSI/AT386: Ctrl-Shift-F11\n");
12501       break;
12502     case  K_ANSIF48          :
12503       printf("\\Kansif48       Transmit SCOANSI/AT386: Ctrl-Shift-F12\n");
12504       break;
12505     case  K_ANSIF49          :
12506       printf("\\Kansif49       Transmit SCOANSI/AT386: Home\n");
12507       break;
12508     case  K_ANSIF50          :
12509       printf("\\Kansif50       Transmit SCOANSI/AT386: Up Arrow\n");
12510       break;
12511     case  K_ANSIF51          :
12512       printf("\\Kansif51       Transmit SCOANSI/AT386: PgUp\n");
12513       break;
12514     case  K_ANSIF52          :
12515       printf("\\Kansif52       Transmit SCOANSI/AT386: Ctrl-Shift-Subtract\n");
12516       break;
12517     case  K_ANSIF53          :
12518       printf("\\Kansif53       Transmit SCOANSI/AT386: Left Arrow\n");
12519       break;
12520     case  K_ANSIF54          :
12521       printf("\\Kansif54       Transmit SCOANSI/AT386: Clear\n");
12522       break;
12523     case  K_ANSIF55          :
12524       printf("\\Kansif55       Transmit SCOANSI/AT386: Right Arrow\n");
12525       break;
12526     case  K_ANSIF56          :
12527       printf("\\Kansif56       Transmit SCOANSI/AT386: Shift-Add\n");
12528       break;
12529     case  K_ANSIF57          :
12530       printf("\\Kansif57       Transmit SCOANSI/AT386: End\n");
12531       break;
12532     case  K_ANSIF58          :
12533       printf("\\Kansif58       Transmit SCOANSI/AT386: Down Arrow\n");
12534       break;
12535     case  K_ANSIF59          :
12536       printf("\\Kansif59       Transmit SCOANSI/AT386: PgDn\n");
12537       break;
12538     case  K_ANSIF60          :
12539       printf("\\Kansif60       Transmit SCOANSI/AT386: Insert\n");
12540       break;
12541     case  K_ANSIF61          :
12542       printf("\\Kansif61       Transmit SCOANSI/AT386: (not named)\n");
12543       break;
12544
12545 /* WYSE Function Keys (unshifted) */
12546     case  K_WYF01            :
12547       printf("\\Kwyf01         Transmit WYSE 30/50/60/160: F1\n");
12548       break;
12549     case  K_WYF02            :
12550       printf("\\Kwyf02         Transmit WYSE 30/50/60/160: F2\n");
12551       break;
12552     case  K_WYF03            :
12553       printf("\\Kwyf03         Transmit WYSE 30/50/60/160: F3\n");
12554       break;
12555     case  K_WYF04            :
12556       printf("\\Kwyf04         Transmit WYSE 30/50/60/160: F4\n");
12557       break;
12558     case  K_WYF05            :
12559       printf("\\Kwyf05         Transmit WYSE 30/50/60/160: F5\n");
12560       break;
12561     case  K_WYF06            :
12562       printf("\\Kwyf06         Transmit WYSE 30/50/60/160: F6\n");
12563       break;
12564     case  K_WYF07            :
12565       printf("\\Kwyf07         Transmit WYSE 30/50/60/160: F7\n");
12566       break;
12567     case  K_WYF08            :
12568       printf("\\Kwyf08         Transmit WYSE 30/50/60/160: F8\n");
12569       break;
12570     case  K_WYF09            :
12571       printf("\\Kwyf09         Transmit WYSE 30/50/60/160: F9\n");
12572       break;
12573     case  K_WYF10            :
12574       printf("\\Kwyf10         Transmit WYSE 30/50/60/160: F10\n");
12575       break;
12576     case  K_WYF11            :
12577       printf("\\Kwyf11         Transmit WYSE 30/50/60/160: F11\n");
12578       break;
12579     case  K_WYF12            :
12580       printf("\\Kwyf12         Transmit WYSE 30/50/60/160: F12\n");
12581       break;
12582     case  K_WYF13            :
12583       printf("\\Kwyf13         Transmit WYSE 30/50/60/160: F13\n");
12584       break;
12585     case  K_WYF14            :
12586       printf("\\Kwyf14         Transmit WYSE 30/50/60/160: F14\n");
12587       break;
12588     case  K_WYF15            :
12589       printf("\\Kwyf15         Transmit WYSE 30/50/60/160: F15\n");
12590       break;
12591     case  K_WYF16            :
12592       printf("\\Kwyf16         Transmit WYSE 30/50/60/160: F16\n");
12593       break;
12594     case  K_WYF17            :
12595       printf("\\Kwyf17         Transmit WYSE 30/50/60/160: F17\n");
12596       break;
12597     case  K_WYF18            :
12598       printf("\\Kwyf18         Transmit WYSE 30/50/60/160: F18\n");
12599       break;
12600     case  K_WYF19            :
12601       printf("\\Kwyf19         Transmit WYSE 30/50/60/160: F19\n");
12602       break;
12603     case  K_WYF20            :
12604       printf("\\Kwyf20         Transmit WYSE 30/50/60/160: F20\n");
12605       break;
12606
12607 /* WYSE Function Keys (shifted) */
12608     case  K_WYSF01           :
12609       printf("\\Kwysf01        Transmit WYSE 30/50/60/160: Shift-F1\n");
12610       break;
12611     case  K_WYSF02           :
12612       printf("\\Kwysf02        Transmit WYSE 30/50/60/160: Shift-F2\n");
12613       break;
12614     case  K_WYSF03            :
12615       printf("\\Kwysf03        Transmit WYSE 30/50/60/160: Shift-F3\n");
12616       break;
12617     case  K_WYSF04            :
12618       printf("\\Kwysf04        Transmit WYSE 30/50/60/160: Shift-F4\n");
12619       break;
12620     case  K_WYSF05            :
12621       printf("\\Kwysf05        Transmit WYSE 30/50/60/160: Shift-F5\n");
12622       break;
12623     case  K_WYSF06            :
12624       printf("\\Kwysf06        Transmit WYSE 30/50/60/160: Shift-F6\n");
12625       break;
12626     case  K_WYSF07            :
12627       printf("\\Kwysf07        Transmit WYSE 30/50/60/160: Shift-F7\n");
12628       break;
12629     case  K_WYSF08            :
12630       printf("\\Kwysf08        Transmit WYSE 30/50/60/160: Shift-F8\n");
12631       break;
12632     case  K_WYSF09            :
12633       printf("\\Kwysf09        Transmit WYSE 30/50/60/160: Shift-F9\n");
12634       break;
12635     case  K_WYSF10            :
12636       printf("\\Kwysf10        Transmit WYSE 30/50/60/160: Shift-F10\n");
12637       break;
12638     case  K_WYSF11            :
12639       printf("\\Kwysf11        Transmit WYSE 30/50/60/160: Shift-F11\n");
12640       break;
12641     case  K_WYSF12            :
12642       printf("\\Kwysf12        Transmit WYSE 30/50/60/160: Shift-F12\n");
12643       break;
12644     case  K_WYSF13            :
12645       printf("\\Kwysf13        Transmit WYSE 30/50/60/160: Shift-F13\n");
12646       break;
12647     case  K_WYSF14            :
12648       printf("\\Kwysf14        Transmit WYSE 30/50/60/160: Shift-F14\n");
12649       break;
12650     case  K_WYSF15            :
12651       printf("\\Kwysf15        Transmit WYSE 30/50/60/160: Shift-F15\n");
12652       break;
12653     case  K_WYSF16            :
12654       printf("\\Kwysf16        Transmit WYSE 30/50/60/160: Shift-F16\n");
12655       break;
12656     case  K_WYSF17           :
12657       printf("\\Kwysf17        Transmit WYSE 30/50/60/160: Shift-F17\n");
12658       break;
12659     case  K_WYSF18           :
12660       printf("\\Kwysf18        Transmit WYSE 30/50/60/160: Shift-F18\n");
12661       break;
12662     case  K_WYSF19           :
12663       printf("\\Kwysf19        Transmit WYSE 30/50/60/160: Shift-F19\n");
12664       break;
12665     case  K_WYSF20           :
12666       printf("\\Kwysf20        Transmit WYSE 30/50/60/160: Shift-F20\n");
12667       break;
12668
12669 /* WYSE Edit and Special Keys */
12670     case  K_WYBS         :
12671       printf("\\Kwybs          Transmit WYSE 30/50/60/160: Backspace\n");
12672       break;
12673     case  K_WYCLRLN          :
12674       printf("\\Kwyclrln       Transmit WYSE 30/50/60/160: Clear Line\n");
12675       break;
12676     case  K_WYSCLRLN     :
12677      printf("\\Kwysclrln      Transmit WYSE 30/50/60/160: Shift-Clear Line\n");
12678       break;
12679     case  K_WYCLRPG      :
12680       printf("\\Kwyclrpg       Transmit WYSE 30/50/60/160: Clear Page\n");
12681       break;
12682     case  K_WYSCLRPG     :
12683     printf("\\Kwysclrpg      Transmit WYSE 30/50/60/160: Shift-Clear Page\n");
12684       break;
12685     case  K_WYDELCHAR    :
12686       printf("\\Kwydelchar     Transmit WYSE 30/50/60/160: Delete Char\n");
12687       break;
12688     case  K_WYDELLN      :
12689       printf("\\Kwydelln       Transmit WYSE 30/50/60/160: Delete Line\n");
12690       break;
12691     case  K_WYENTER          :
12692       printf("\\Kwyenter       Transmit WYSE 30/50/60/160: Enter\n");
12693       break;
12694     case  K_WYESC            :
12695       printf("\\Kwyesc         Transmit WYSE 30/50/60/160: Esc\n");
12696       break;
12697     case  K_WYHOME           :
12698       printf("\\Kwyhome        Transmit WYSE 30/50/60/160: Home\n");
12699       break;
12700     case  K_WYSHOME          :
12701       printf("\\Kwyshome       Transmit WYSE 30/50/60/160: Shift-Home\n");
12702       break;
12703     case  K_WYINSERT     :
12704       printf("\\Kwyinsert      Transmit WYSE 30/50/60/160: Insert\n");
12705       break;
12706     case  K_WYINSCHAR    :
12707       printf("\\Kwyinschar     Transmit WYSE 30/50/60/160: Insert Char\n");
12708       break;
12709     case  K_WYINSLN          :
12710       printf("\\Kwyinsln       Transmit WYSE 30/50/60/160: Insert Line\n");
12711       break;
12712     case  K_WYPGNEXT     :
12713       printf("\\Kwypgnext      Transmit WYSE 30/50/60/160: Page Next\n");
12714       break;
12715     case  K_WYPGPREV     :
12716       printf("\\Kwypgprev      Transmit WYSE 30/50/60/160: Page Previous\n");
12717       break;
12718     case  K_WYREPLACE    :
12719       printf("\\Kwyreplace     Transmit WYSE 30/50/60/160: Replace      \n");
12720       break;
12721     case  K_WYRETURN     :
12722       printf("\\Kwyreturn      Transmit WYSE 30/50/60/160: Return       \n");
12723       break;
12724     case  K_WYTAB            :
12725       printf("\\Kwytab         Transmit WYSE 30/50/60/160: Tab          \n");
12726       break;
12727     case  K_WYSTAB           :
12728       printf("\\Kwystab        Transmit WYSE 30/50/60/160: Shift-Tab    \n");
12729       break;
12730     case  K_WYPRTSCN     :
12731       printf("\\Kwyprtscn      Transmit WYSE 30/50/60/160: Print Screen \n");
12732       break;
12733     case  K_WYSESC       :
12734       printf("\\Kwysesc        Transmit WYSE 30/50/60/160: Shift-Esc    \n");
12735       break;
12736     case  K_WYSBS        :
12737     printf("\\Kwysbs         Transmit WYSE 30/50/60/160: Shift-Backspace\n");
12738       break;
12739     case  K_WYSENTER     :
12740       printf("\\Kwysenter      Transmit WYSE 30/50/60/160: Shift-Enter\n");
12741       break;
12742     case  K_WYSRETURN    :
12743       printf("\\Kwysreturn     Transmit WYSE 30/50/60/160: Shift-Return\n");
12744       break;
12745     case  K_WYUPARR          :
12746       printf("\\Kwyuparr       Transmit WYSE 30/50/60/160: Up Arrow\n");
12747       break;
12748     case  K_WYDNARR          :
12749       printf("\\Kwydnarr       Transmit WYSE 30/50/60/160: Down Arrow\n");
12750       break;
12751     case  K_WYLFARR          :
12752       printf("\\Kwylfarr       Transmit WYSE 30/50/60/160: Left Arrow\n");
12753       break;
12754     case  K_WYRTARR          :
12755       printf("\\Kwyrtarr       Transmit WYSE 30/50/60/160: Right Arrow\n");
12756       break;
12757     case  K_WYSUPARR     :
12758       printf("\\Kwysuparr      Transmit WYSE 30/50/60/160: Shift-Up Arrow\n");
12759       break;
12760     case  K_WYSDNARR     :
12761     printf("\\Kwysdnarr      Transmit WYSE 30/50/60/160: Shift-Down Arrow\n");
12762       break;
12763     case  K_WYSLFARR     :
12764     printf("\\Kwyslfarr      Transmit WYSE 30/50/60/160: Shift-Left Arrow\n");
12765       break;
12766     case  K_WYSRTARR     :
12767     printf("\\Kwysrtarr      Transmit WYSE 30/50/60/160: Shift-Right Arrow\n");
12768       break;
12769     case  K_WYSEND:
12770       printf("\\Kwysend        Transmit WYSE 30/50/60/160: Send\n");
12771       break;
12772     case  K_WYSSEND:
12773       printf("\\Kwyssend       Transmit WYSE 30/50/60/160: Shift-Send\n");
12774       break;
12775
12776 /* Data General Function Keys (unshifted) */
12777     case  K_DGF01            :
12778       printf("\\Kdgf01         Transmit Data General: F1                 \n");
12779       break;
12780     case  K_DGF02            :
12781       printf("\\Kdgf01         Transmit Data General: F2                 \n");
12782       break;
12783     case  K_DGF03            :
12784       printf("\\Kdgf01         Transmit Data General: F3                 \n");
12785       break;
12786     case  K_DGF04            :
12787       printf("\\Kdgf01         Transmit Data General: F4                 \n");
12788       break;
12789     case  K_DGF05            :
12790       printf("\\Kdgf01         Transmit Data General: F5                 \n");
12791       break;
12792     case  K_DGF06            :
12793       printf("\\Kdgf01         Transmit Data General: F6                 \n");
12794       break;
12795     case  K_DGF07            :
12796       printf("\\Kdgf01         Transmit Data General: F7                 \n");
12797       break;
12798     case  K_DGF08            :
12799       printf("\\Kdgf01         Transmit Data General: F8                 \n");
12800       break;
12801     case  K_DGF09            :
12802       printf("\\Kdgf01         Transmit Data General: F9                 \n");
12803       break;
12804     case  K_DGF10            :
12805       printf("\\Kdgf01         Transmit Data General: F10                \n");
12806       break;
12807     case  K_DGF11            :
12808       printf("\\Kdgf01         Transmit Data General: F11                \n");
12809       break;
12810     case  K_DGF12            :
12811       printf("\\Kdgf01         Transmit Data General: F12                \n");
12812       break;
12813     case  K_DGF13            :
12814       printf("\\Kdgf01         Transmit Data General: F13                \n");
12815       break;
12816     case  K_DGF14            :
12817       printf("\\Kdgf01         Transmit Data General: F14                \n");
12818       break;
12819     case  K_DGF15            :
12820       printf("\\Kdgf01         Transmit Data General: F15                \n");
12821       break;
12822
12823 /* Data General Function Keys (shifted) */
12824     case  K_DGSF01           :
12825       printf(
12826       "\\Kdgsf01        Transmit Data General: Shift-F1                 \n");
12827       break;
12828     case  K_DGSF02           :
12829       printf(
12830       "\\Kdgsf02        Transmit Data General: Shift-F2                 \n");
12831       break;
12832     case  K_DGSF03           :
12833       printf(
12834       "\\Kdgsf03        Transmit Data General: Shift-F3                 \n");
12835       break;
12836     case  K_DGSF04           :
12837       printf(
12838       "\\Kdgsf04        Transmit Data General: Shift-F4                 \n");
12839       break;
12840     case  K_DGSF05           :
12841       printf(
12842       "\\Kdgsf05        Transmit Data General: Shift-F5                 \n");
12843       break;
12844     case  K_DGSF06           :
12845       printf(
12846       "\\Kdgsf06        Transmit Data General: Shift-F6                 \n");
12847       break;
12848     case  K_DGSF07           :
12849       printf(
12850       "\\Kdgsf07        Transmit Data General: Shift-F7                 \n");
12851       break;
12852     case  K_DGSF08           :
12853       printf(
12854       "\\Kdgsf08        Transmit Data General: Shift-F8                 \n");
12855       break;
12856     case  K_DGSF09           :
12857       printf(
12858       "\\Kdgsf09        Transmit Data General: Shift-F9                 \n");
12859       break;
12860     case  K_DGSF10           :
12861       printf(
12862       "\\Kdgsf10        Transmit Data General: Shift-F10                \n");
12863       break;
12864     case  K_DGSF11           :
12865       printf(
12866       "\\Kdgsf11        Transmit Data General: Shift-F11                \n");
12867       break;
12868     case  K_DGSF12           :
12869       printf(
12870       "\\Kdgsf12        Transmit Data General: Shift-F12                \n");
12871       break;
12872     case  K_DGSF13           :
12873       printf(
12874       "\\Kdgsf13        Transmit Data General: Shift-F13                \n");
12875       break;
12876     case  K_DGSF14           :
12877       printf(
12878       "\\Kdgsf14        Transmit Data General: Shift-F14                \n");
12879       break;
12880     case  K_DGSF15           :
12881       printf(
12882       "\\Kdgsf15        Transmit Data General: Shift-F15                \n");
12883       break;
12884
12885 /* Data General Function Keys (control) */
12886     case  K_DGCF01           :
12887       printf(
12888       "\\Kdgcf01        Transmit Data General: Ctrl-F1                 \n");
12889       break;
12890     case  K_DGCF02            :
12891       printf(
12892       "\\Kdgcf02        Transmit Data General: Ctrl-F2                 \n");
12893       break;
12894     case  K_DGCF03            :
12895       printf(
12896       "\\Kdgcf03        Transmit Data General: Ctrl-F3                 \n");
12897       break;
12898     case  K_DGCF04            :
12899       printf(
12900       "\\Kdgcf04        Transmit Data General: Ctrl-F4                 \n");
12901       break;
12902     case  K_DGCF05            :
12903       printf(
12904       "\\Kdgcf05        Transmit Data General: Ctrl-F5                 \n");
12905       break;
12906     case  K_DGCF06            :
12907       printf(
12908       "\\Kdgcf06        Transmit Data General: Ctrl-F6                 \n");
12909       break;
12910     case  K_DGCF07            :
12911       printf(
12912       "\\Kdgcf07        Transmit Data General: Ctrl-F7                 \n");
12913       break;
12914     case  K_DGCF08            :
12915       printf(
12916       "\\Kdgcf08        Transmit Data General: Ctrl-F8                 \n");
12917       break;
12918     case  K_DGCF09            :
12919       printf(
12920       "\\Kdgcf09        Transmit Data General: Ctrl-F9                 \n");
12921       break;
12922     case  K_DGCF10            :
12923       printf(
12924       "\\Kdgcf10        Transmit Data General: Ctrl-F10                \n");
12925       break;
12926     case  K_DGCF11            :
12927       printf(
12928       "\\Kdgcf11        Transmit Data General: Ctrl-F11                \n");
12929       break;
12930     case  K_DGCF12            :
12931       printf(
12932       "\\Kdgcf12        Transmit Data General: Ctrl-F12                \n");
12933       break;
12934     case  K_DGCF13            :
12935       printf(
12936       "\\Kdgcf13        Transmit Data General: Ctrl-F13                \n");
12937       break;
12938     case  K_DGCF14            :
12939       printf(
12940       "\\Kdgcf14        Transmit Data General: Ctrl-F14                \n");
12941       break;
12942     case  K_DGCF15            :
12943       printf(
12944       "\\Kdgcf15        Transmit Data General: Ctrl-F15                \n");
12945       break;
12946
12947 /* Data General Function Keys (control shifted) */
12948     case  K_DGCSF01          :
12949       printf(
12950     "\\Kdgcsf01       Transmit Data General: Ctrl-Shift-F1                \n");
12951       break;
12952     case  K_DGCSF02          :
12953       printf(
12954     "\\Kdgcsf02       Transmit Data General: Ctrl-Shift-F2                \n");
12955       break;
12956     case  K_DGCSF03          :
12957       printf(
12958     "\\Kdgcsf03       Transmit Data General: Ctrl-Shift-F3                \n");
12959       break;
12960     case  K_DGCSF04          :
12961       printf(
12962     "\\Kdgcsf04       Transmit Data General: Ctrl-Shift-F4                \n");
12963       break;
12964     case  K_DGCSF05          :
12965       printf(
12966     "\\Kdgcsf05       Transmit Data General: Ctrl-Shift-F5                \n");
12967       break;
12968     case  K_DGCSF06          :
12969       printf(
12970     "\\Kdgcsf06       Transmit Data General: Ctrl-Shift-F6                \n");
12971       break;
12972     case  K_DGCSF07          :
12973       printf(
12974     "\\Kdgcsf07       Transmit Data General: Ctrl-Shift-F7                \n");
12975       break;
12976     case  K_DGCSF08          :
12977       printf(
12978     "\\Kdgcsf08       Transmit Data General: Ctrl-Shift-F8                \n");
12979       break;
12980     case  K_DGCSF09          :
12981       printf(
12982     "\\Kdgcsf09       Transmit Data General: Ctrl-Shift-F9                \n");
12983       break;
12984     case  K_DGCSF10          :
12985       printf(
12986     "\\Kdgcsf10       Transmit Data General: Ctrl-Shift-F10               \n");
12987       break;
12988     case  K_DGCSF11          :
12989       printf(
12990     "\\Kdgcsf11       Transmit Data General: Ctrl-Shift-F11               \n");
12991       break;
12992     case  K_DGCSF12          :
12993       printf(
12994     "\\Kdgcsf12       Transmit Data General: Ctrl-Shift-F12               \n");
12995       break;
12996     case  K_DGCSF13          :
12997       printf(
12998     "\\Kdgcsf13       Transmit Data General: Ctrl-Shift-F13               \n");
12999       break;
13000     case  K_DGCSF14          :
13001       printf(
13002     "\\Kdgcsf14       Transmit Data General: Ctrl-Shift-F14               \n");
13003       break;
13004     case  K_DGCSF15          :
13005       printf(
13006     "\\Kdgcsf15       Transmit Data General: Ctrl-Shift-F15               \n");
13007       break;
13008
13009     case  K_DGUPARR          :
13010       printf("\\Kdguparr       Transmit Data General: Up Arrow          \n");
13011       break;
13012     case  K_DGDNARR          :
13013       printf("\\Kdgdnarr       Transmit Data General: Down Arrow        \n");
13014       break;
13015     case  K_DGLFARR          :
13016       printf("\\Kdglfarr       Transmit Data General: Left Arrow        \n");
13017       break;
13018     case  K_DGRTARR          :
13019       printf("\\Kdgrtarr       Transmit Data General: Right Arrow       \n");
13020       break;
13021     case  K_DGSUPARR     :
13022       printf("\\Kdgsuparr      Transmit Data General: Shift-Up Arrow    \n");
13023       break;
13024     case  K_DGSDNARR     :
13025       printf("\\Kdgsdnarr      Transmit Data General: Shift-Down Arrow  \n");
13026       break;
13027     case  K_DGSLFARR     :
13028       printf("\\Kdgslfarr      Transmit Data General: Shift-Left Arrow  \n");
13029       break;
13030     case  K_DGSRTARR     :
13031       printf("\\Kdgsrtarr      Transmit Data General: Shift-Right Arrow \n");
13032       break;
13033
13034     case  K_DGERASEPAGE  :
13035       printf("\\Kdgerasepage   Transmit Data General: Erase Page        \n");
13036       break;
13037     case  K_DGC1             :
13038       printf("\\Kdgc1          Transmit Data General: C1                \n");
13039       break;
13040     case  K_DGC2             :
13041       printf("\\Kdgc2          Transmit Data General: C2                \n");
13042       break;
13043     case  K_DGERASEEOL   :
13044       printf("\\Kdgeraseeol    Transmit Data General: Erase EOL         \n");
13045       break;
13046     case  K_DGC3             :
13047       printf("\\Kdgc3          Transmit Data General: C3                \n");
13048       break;
13049     case  K_DGC4             :
13050       printf("\\Kdgc4          Transmit Data General: C4                \n");
13051       break;
13052     case  K_DGCMDPRINT   :
13053       printf("\\Kdgcmdprint    Transmit Data General: Command Print     \n");
13054       break;
13055     case  K_DGHOME       :
13056       printf("\\Kdghome        Transmit Data General: Home              \n");
13057       break;
13058     case  K_DGSERASEPAGE :
13059       printf("\\Kdgserasepage  Transmit Data General: Erase Page        \n");
13060       break;
13061     case  K_DGSC1            :
13062       printf("\\Kdgsc1         Transmit Data General: Shift-C1          \n");
13063       break;
13064     case  K_DGSC2            :
13065       printf("\\Kdgsc2         Transmit Data General: Shift-C2          \n");
13066       break;
13067     case  K_DGSERASEEOL  :
13068       printf("\\Kdgseraseeol   Transmit Data General: Shift-Erase EOL  \n");
13069       break;
13070     case  K_DGSC3            :
13071       printf("\\Kdgsc3         Transmit Data General: Shift-C3          \n");
13072       break;
13073     case  K_DGSC4            :
13074       printf("\\Kdgsc4         Transmit Data General: Shift-C4          \n");
13075       break;
13076     case  K_DGSCMDPRINT  :
13077       printf("\\Kdgscmdprint   Transmit Data General: Shift-Command Print\n");
13078       break;
13079     case  K_DGBS         :
13080       printf("\\Kdgbs          Transmit Data General: Backspace         \n");
13081       break;
13082     case  K_DGSHOME      :
13083       printf("\\Kdshome        Transmit Data General: Shift-Home        \n");
13084       break;
13085
13086
13087 /* Televideo Function Keys (unshifted) */
13088     case  K_TVIF01           :
13089       printf("\\Ktvif01        Transmit Televideo: F1       \n");
13090       break;
13091     case  K_TVIF02           :
13092       printf("\\Ktvif02        Transmit Televideo: F2              \n");
13093       break;
13094     case  K_TVIF03           :
13095       printf("\\Ktvif03        Transmit Televideo: F3             \n");
13096       break;
13097     case  K_TVIF04           :
13098       printf("\\Ktvif04        Transmit Televideo: F4              \n");
13099       break;
13100     case  K_TVIF05           :
13101       printf("\\Ktvif05        Transmit Televideo: F5              \n");
13102       break;
13103     case  K_TVIF06           :
13104       printf("\\Ktvif06        Transmit Televideo: F6              \n");
13105       break;
13106     case  K_TVIF07           :
13107       printf("\\Ktvif07        Transmit Televideo: F7              \n");
13108       break;
13109     case  K_TVIF08           :
13110       printf("\\Ktvif08        Transmit Televideo: F8              \n");
13111       break;
13112     case  K_TVIF09           :
13113       printf("\\Ktvif09        Transmit Televideo: F9              \n");
13114       break;
13115     case  K_TVIF10           :
13116       printf("\\Ktvif10        Transmit Televideo: F10             \n");
13117       break;
13118     case  K_TVIF11           :
13119       printf("\\Ktvif11        Transmit Televideo: F11             \n");
13120       break;
13121     case  K_TVIF12           :
13122       printf("\\Ktvif12        Transmit Televideo: F12             \n");
13123       break;
13124     case  K_TVIF13           :
13125       printf("\\Ktvif13        Transmit Televideo: F13             \n");
13126       break;
13127     case  K_TVIF14           :
13128       printf("\\Ktvif14        Transmit Televideo: F14             \n");
13129       break;
13130     case  K_TVIF15           :
13131       printf("\\Ktvif15        Transmit Televideo: F15             \n");
13132       break;
13133     case  K_TVIF16           :
13134       printf("\\Ktvif16        Transmit Televideo: F16             \n");
13135       break;
13136
13137 /* Televideo Function Keys (shifted) */
13138     case  K_TVISF01          :
13139       printf("\\Ktvisf01       Transmit Televideo: Shift-F1 \n");
13140       break;
13141     case  K_TVISF02          :
13142       printf("\\Ktvisf02       Transmit Televideo: Shift-F2 \n");
13143       break;
13144     case  K_TVISF03            :
13145       printf("\\Ktvisf03       Transmit Televideo: Shift-F3 \n");
13146       break;
13147     case  K_TVISF04            :
13148       printf("\\Ktvisf04       Transmit Televideo: Shift-F4 \n");
13149       break;
13150     case  K_TVISF05            :
13151       printf("\\Ktvisf05       Transmit Televideo: Shift-F5 \n");
13152       break;
13153     case  K_TVISF06            :
13154       printf("\\Ktvisf06       Transmit Televideo: Shift-F6 \n");
13155       break;
13156     case  K_TVISF07            :
13157       printf("\\Ktvisf07       Transmit Televideo: Shift-F7 \n");
13158       break;
13159     case  K_TVISF08            :
13160       printf("\\Ktvisf08       Transmit Televideo: Shift-F8 \n");
13161       break;
13162     case  K_TVISF09            :
13163       printf("\\Ktvisf09       Transmit Televideo: Shift-F9 \n");
13164       break;
13165     case  K_TVISF10            :
13166       printf("\\Ktvisf10       Transmit Televideo: Shift-F10\n");
13167       break;
13168     case  K_TVISF11            :
13169       printf("\\Ktvisf11       Transmit Televideo: Shift-F11\n");
13170       break;
13171     case  K_TVISF12            :
13172       printf("\\Ktvisf12       Transmit Televideo: Shift-F12\n");
13173       break;
13174     case  K_TVISF13            :
13175       printf("\\Ktvisf13       Transmit Televideo: Shift-F13\n");
13176       break;
13177     case  K_TVISF14            :
13178       printf("\\Ktvisf14       Transmit Televideo: Shift-F14\n");
13179       break;
13180     case  K_TVISF15            :
13181       printf("\\Ktvisf15       Transmit Televideo: Shift-F15\n");
13182       break;
13183     case  K_TVISF16            :
13184       printf("\\Ktvisf16       Transmit Televideo: Shift-F16\n");
13185       break;
13186
13187 /* Televideo Edit and Special Keys */
13188     case  K_TVIBS         :
13189       printf("\\Ktvibs         Transmit Televideo: Backspace       \n");
13190       break;
13191     case  K_TVICLRLN         :
13192       printf("\\Ktviclrln      Transmit Televideo: Clear Line      \n");
13193       break;
13194     case  K_TVISCLRLN     :
13195       printf("\\Ktvisclrln     Transmit Televideo: Shift-Clear Line\n");
13196       break;
13197     case  K_TVICLRPG      :
13198       printf("\\Ktviclrpg      Transmit Televideo: Clear Page      \n");
13199       break;
13200     case  K_TVISCLRPG     :
13201       printf("\\Ktvisclrpg     Transmit Televideo: Shift-Clear Page\n");
13202       break;
13203     case  K_TVIDELCHAR    :
13204       printf("\\Ktvidelchar    Transmit Televideo: Delete Char     \n");
13205       break;
13206     case  K_TVIDELLN      :
13207       printf("\\Ktvidelln      Transmit Televideo: Delete Line     \n");
13208       break;
13209     case  K_TVIENTER         :
13210       printf("\\Ktvienter      Transmit Televideo: Enter           \n");
13211       break;
13212     case  K_TVIESC           :
13213       printf("\\Ktviesc        Transmit Televideo: Esc             \n");
13214       break;
13215     case  K_TVIHOME          :
13216       printf("\\Ktvihome       Transmit Televideo: Home            \n");
13217       break;
13218     case  K_TVISHOME         :
13219       printf("\\Ktvishome      Transmit Televideo: Shift-Home      \n");
13220       break;
13221     case  K_TVIINSERT     :
13222       printf("\\Ktviinsert     Transmit Televideo: Insert          \n");
13223       break;
13224     case  K_TVIINSCHAR    :
13225       printf("\\Ktviinschar    Transmit Televideo: Insert Char     \n");
13226       break;
13227     case  K_TVIINSLN         :
13228       printf("\\Ktviinsln      Transmit Televideo: Insert Line     \n");
13229       break;
13230     case  K_TVIPGNEXT     :
13231       printf("\\Ktvipgnext     Transmit Televideo: Page Next       \n");
13232       break;
13233     case  K_TVIPGPREV     :
13234       printf("\\Ktvipgprev     Transmit Televideo: Page Previous   \n");
13235       break;
13236     case  K_TVIREPLACE    :
13237       printf("\\Ktvireplace    Transmit Televideo: Replace         \n");
13238       break;
13239     case  K_TVIRETURN     :
13240       printf("\\Ktvireturn     Transmit Televideo: Return          \n");
13241       break;
13242     case  K_TVITAB           :
13243       printf("\\Ktvitab        Transmit Televideo: Tab             \n");
13244       break;
13245     case  K_TVISTAB          :
13246       printf("\\Ktvistab       Transmit Televideo: Shift-Tab       \n");
13247       break;
13248     case  K_TVIPRTSCN     :
13249       printf("\\Ktviprtscn     Transmit Televideo: Print Screen    \n");
13250       break;
13251     case  K_TVISESC       :
13252       printf("\\Ktvisesc       Transmit Televideo: Shift-Esc       \n");
13253       break;
13254     case  K_TVISBS        :
13255       printf("\\Ktvisbs        Transmit Televideo: Shift-Backspace \n");
13256       break;
13257     case  K_TVISENTER     :
13258       printf("\\Ktvisenter     Transmit Televideo: Shift-Enter     \n");
13259       break;
13260     case  K_TVISRETURN    :
13261       printf("\\Ktvisreturn    Transmit Televideo: Shift-Return    \n");
13262       break;
13263     case  K_TVIUPARR         :
13264       printf("\\Ktviuparr      Transmit Televideo: Up Arrow        \n");
13265       break;
13266     case  K_TVIDNARR         :
13267       printf("\\Ktvidnarr      Transmit Televideo: Down Arrow      \n");
13268       break;
13269     case  K_TVILFARR         :
13270       printf("\\Ktvilfarr      Transmit Televideo: Left Arrow      \n");
13271       break;
13272     case  K_TVIRTARR         :
13273       printf("\\Ktvirtarr      Transmit Televideo: Right Arrow     \n");
13274       break;
13275     case  K_TVISUPARR     :
13276       printf("\\Ktvisuparr     Transmit Televideo: Shift-Up Arrow  \n");
13277       break;
13278     case  K_TVISDNARR     :
13279       printf("\\Ktvisdnarr     Transmit Televideo: Shift-Down Arrow\n");
13280       break;
13281     case  K_TVISLFARR     :
13282       printf("\\Ktvislfarr     Transmit Televideo: Shift-Left Arrow\n");
13283       break;
13284     case  K_TVISRTARR     :
13285       printf("\\Ktvisrtarr     Transmit Televideo: Shift-Right Arrow\n");
13286       break;
13287     case K_TVISEND:
13288       printf("\\Ktvisend       Transmit Televideo: Send\n");
13289       break;
13290     case K_TVISSEND:
13291       printf("\\Ktvissend      Transmit Televideo: Shift-Send\n");
13292       break;
13293
13294 /* HP Function and Edit keys */
13295     case  K_HPF01            :
13296       printf("\\Khpf01         Transmit Hewlett-Packard: F1       \n");
13297       break;
13298     case  K_HPF02            :
13299       printf("\\Khpf02         Transmit Hewlett-Packard: F2              \n");
13300       break;
13301     case  K_HPF03            :
13302       printf("\\Khpf03         Transmit Hewlett-Packard: F3             \n");
13303       break;
13304     case  K_HPF04            :
13305       printf("\\Khpf04         Transmit Hewlett-Packard: F4              \n");
13306       break;
13307     case  K_HPF05            :
13308       printf("\\Khpf05         Transmit Hewlett-Packard: F5              \n");
13309       break;
13310     case  K_HPF06            :
13311       printf("\\Khpf06         Transmit Hewlett-Packard: F6              \n");
13312       break;
13313     case  K_HPF07            :
13314       printf("\\Khpf07         Transmit Hewlett-Packard: F7              \n");
13315       break;
13316     case  K_HPF08            :
13317       printf("\\Khpf08         Transmit Hewlett-Packard: F8              \n");
13318       break;
13319     case  K_HPF09            :
13320       printf("\\Khpf09         Transmit Hewlett-Packard: F9              \n");
13321       break;
13322     case  K_HPF10            :
13323       printf("\\Khpf10         Transmit Hewlett-Packard: F10             \n");
13324       break;
13325     case  K_HPF11            :
13326       printf("\\Khpf11         Transmit Hewlett-Packard: F11             \n");
13327       break;
13328     case  K_HPF12            :
13329       printf("\\Khpf12         Transmit Hewlett-Packard: F12             \n");
13330       break;
13331     case  K_HPF13            :
13332       printf("\\Khpf13         Transmit Hewlett-Packard: F13             \n");
13333       break;
13334     case  K_HPF14            :
13335       printf("\\Khpf14         Transmit Hewlett-Packard: F14             \n");
13336       break;
13337     case  K_HPF15            :
13338       printf("\\Khpf15         Transmit Hewlett-Packard: F15             \n");
13339       break;
13340     case  K_HPF16            :
13341       printf("\\Khpf16         Transmit Hewlett-Packard: F16             \n");
13342       break;
13343     case  K_HPRETURN     :
13344       printf("\\Khpreturn      Transmit Hewlett-Packard: Return\n");
13345       break;
13346     case  K_HPENTER          :
13347       printf("\\Khpenter       Transmit Hewlett-Packard: Enter (keypad)\n");
13348       break;
13349     case  K_HPBACKTAB        :
13350       printf("\\Khpbacktab     Transmit Hewlett-Packard: Back Tab\n");
13351       break;
13352         /* Siemens Nixdorf International 97801-5xx kverbs */
13353     case K_SNI_DOUBLE_0      :
13354         printf("\\Ksni_00          Transmit SNI-97801-5xx: Double-Zero\n");
13355         break;
13356     case K_SNI_C_DOUBLE_0    :
13357         printf(
13358 "\\Ksni_c_00        Transmit SNI-97801-5xx: Ctrl-Double-Zero\n");
13359         break;
13360     case K_SNI_C_CE          :
13361         printf("\\Ksni_c_ce        Transmit SNI-97801-5xx: Ctrl-CE\n");
13362         break;
13363     case K_SNI_C_COMPOSE     :
13364         printf("\\Ksni_c_compose   Transmit SNI-97801-5xx: Ctrl-Compose\n");
13365         break;
13366     case K_SNI_C_DELETE_CHAR :
13367         printf(
13368 "\\Ksni_c_del_char  Transmit SNI-97801-5xx: Ctrl-Delete Char\n");
13369         break;
13370     case K_SNI_C_DELETE_LINE :
13371         printf(
13372 "\\Ksni_c_del_line  Transmit SNI-97801-5xx: Ctrl-Delete Line\n");
13373         break;
13374     case K_SNI_C_DELETE_WORD :
13375         printf(
13376 "\\Ksni_c_del_word  Transmit SNI-97801-5xx: Ctrl-Delete Word\n");
13377         break;
13378     case K_SNI_C_CURSOR_DOWN :
13379         printf(
13380 "\\Ksni_c_dnarr     Transmit SNI-97801-5xx: Ctrl-Cursor Down\n");
13381         break;
13382     case K_SNI_C_ENDMARKE    :
13383         printf("\\Ksni_c_endmarke  Transmit SNI-97801-5xx: Ctrl-End Marke\n");
13384         break;
13385     case K_SNI_C_F01         :
13386         printf("\\Ksni_c_f01       Transmit SNI-97801-5xx: Ctrl-F1\n");
13387         break;
13388     case K_SNI_C_F02         :
13389         printf("\\Ksni_c_f02       Transmit SNI-97801-5xx: Ctrl-F2\n");
13390         break;
13391     case K_SNI_C_F03         :
13392         printf("\\Ksni_c_f03       Transmit SNI-97801-5xx: Ctrl-F3\n");
13393         break;
13394     case K_SNI_C_F04         :
13395         printf("\\Ksni_c_f04       Transmit SNI-97801-5xx: Ctrl-F4\n");
13396         break;
13397     case K_SNI_C_F05         :
13398         printf("\\Ksni_c_f05       Transmit SNI-97801-5xx: Ctrl-F5\n");
13399         break;
13400     case K_SNI_C_F06         :
13401         printf("\\Ksni_c_f06       Transmit SNI-97801-5xx: Ctrl-F6\n");
13402         break;
13403     case K_SNI_C_F07         :
13404         printf("\\Ksni_c_f07       Transmit SNI-97801-5xx: Ctrl-F7\n");
13405         break;
13406     case K_SNI_C_F08         :
13407         printf("\\Ksni_c_f08       Transmit SNI-97801-5xx: Ctrl-F8\n");
13408         break;
13409     case K_SNI_C_F09         :
13410         printf("\\Ksni_c_f09       Transmit SNI-97801-5xx: Ctrl-F9\n");
13411         break;
13412     case K_SNI_C_F10         :
13413         printf("\\Ksni_c_f10       Transmit SNI-97801-5xx: Ctrl-F10\n");
13414         break;
13415     case K_SNI_C_F11         :
13416         printf("\\Ksni_c_f11       Transmit SNI-97801-5xx: Ctrl-F11\n");
13417         break;
13418     case K_SNI_C_F12         :
13419         printf("\\Ksni_c_f12       Transmit SNI-97801-5xx: Ctrl-F12\n");
13420         break;
13421     case K_SNI_C_F13         :
13422         printf("\\Ksni_c_f13       Transmit SNI-97801-5xx: Ctrl-F13\n");
13423         break;
13424     case K_SNI_C_F14         :
13425         printf("\\Ksni_c_f14       Transmit SNI-97801-5xx: Ctrl-F14\n");
13426         break;
13427     case K_SNI_C_F15         :
13428         printf("\\Ksni_c_f15       Transmit SNI-97801-5xx: Ctrl-F15\n");
13429         break;
13430     case K_SNI_C_F16         :
13431         printf("\\Ksni_c_f16       Transmit SNI-97801-5xx: Ctrl-F16\n");
13432         break;
13433     case K_SNI_C_F17         :
13434         printf("\\Ksni_c_f17       Transmit SNI-97801-5xx: Ctrl-F17\n");
13435         break;
13436     case K_SNI_C_F18         :
13437         printf("\\Ksni_c_f18       Transmit SNI-97801-5xx: Ctrl-F18\n");
13438         break;
13439     case K_SNI_C_USER1        :
13440         printf(
13441 "\\Ksni_c_user1     Transmit SNI-97801-5xx: Ctrl-Key below F18\n");
13442         break;
13443     case K_SNI_C_F19         :
13444         printf("\\Ksni_c_f19       Transmit SNI-97801-5xx: Ctrl-F19\n");
13445         break;
13446     case K_SNI_C_USER2       :
13447         printf(
13448 "\\Ksni_c_user2     Transmit SNI-97801-5xx: Ctrl-Key below F19\n");
13449         break;
13450     case K_SNI_C_F20         :
13451         printf("\\Ksni_c_f20       Transmit SNI-97801-5xx: Ctrl-F20\n");
13452         break;
13453     case K_SNI_C_USER3       :
13454         printf(
13455 "\\Ksni_c_user3     Transmit SNI-97801-5xx: Ctrl-Key below F20\n");
13456         break;
13457     case K_SNI_C_F21         :
13458         printf("\\Ksni_c_f21       Transmit SNI-97801-5xx: Ctrl-F21\n");
13459         break;
13460     case K_SNI_C_USER4       :
13461         printf(
13462 "\\Ksni_c_user4     Transmit SNI-97801-5xx: Ctrl-Key below F21\n");
13463         break;
13464     case K_SNI_C_F22         :
13465         printf("\\Ksni_c_f22       Transmit SNI-97801-5xx: Ctrl-F22\n");
13466         break;
13467     case K_SNI_C_USER5       :
13468         printf(
13469 "\\Ksni_c_user5     Transmit SNI-97801-5xx: Ctrl-Key below F22\n");
13470         break;
13471     case K_SNI_C_HELP        :
13472         printf("\\Ksni_c_help      Transmit SNI-97801-5xx: Ctrl-Help\n");
13473         break;
13474     case K_SNI_C_HOME        :
13475         printf("\\Ksni_c_home      Transmit SNI-97801-5xx: Ctrl-Home\n");
13476         break;
13477     case K_SNI_C_INSERT_CHAR :
13478         printf(
13479 "\\Ksni_c_ins_char  Transmit SNI-97801-5xx: Ctrl-Insert Char\n");
13480         break;
13481     case K_SNI_C_INSERT_LINE :
13482         printf(
13483 "\\Ksni_c_ins_line  Transmit SNI-97801-5xx: Ctrl-Insert Line\n");
13484         break;
13485     case K_SNI_C_INSERT_WORD :
13486         printf(
13487 "\\Ksni_c_ins_word  Transmit SNI-97801-5xx: Ctrl-Insert Word\n");
13488         break;
13489     case K_SNI_C_LEFT_TAB    :
13490         printf("\\Ksni_c_left_tab  Transmit SNI-97801-5xx: Ctrl-Left Tab\n");
13491         break;
13492     case K_SNI_C_CURSOR_LEFT :
13493         printf(
13494 "\\Ksni_c_lfarr     Transmit SNI-97801-5xx: Ctrl-Cursor Left\n");
13495         break;
13496     case K_SNI_C_MODE        :
13497         printf("\\Ksni_c_mode      Transmit SNI-97801-5xx: Ctrl-Mode\n");
13498         break;
13499     case K_SNI_C_PAGE        :
13500         printf("\\Ksni_c_page      Transmit SNI-97801-5xx: Ctrl-Page\n");
13501         break;
13502     case K_SNI_C_PRINT       :
13503         printf("\\Ksni_c_print     Transmit SNI-97801-5xx: Ctrl-Print\n");
13504         break;
13505     case K_SNI_C_CURSOR_RIGHT:
13506         printf(
13507 "\\Ksni_c_rtarr     Transmit SNI-97801-5xx: Ctrl-Cursor Right\n");
13508         break;
13509     case K_SNI_C_SCROLL_DOWN :
13510         printf(
13511 "\\Ksni_c_scroll_dn Transmit SNI-97801-5xx: Ctrl-Scroll Down\n");
13512         break;
13513     case K_SNI_C_SCROLL_UP   :
13514         printf("\\Ksni_c_scroll_up Transmit SNI-97801-5xx: Ctrl-Scroll Up\n");
13515         break;
13516     case K_SNI_C_START       :
13517         printf("\\Ksni_c_start     Transmit SNI-97801-5xx: Ctrl-Start\n");
13518         break;
13519     case K_SNI_C_CURSOR_UP   :
13520         printf("\\Ksni_c_uparr     Transmit SNI-97801-5xx: Ctrl-Cursor Up\n");
13521         break;
13522     case K_SNI_C_TAB         :
13523         printf("\\Ksni_c_tab       Transmit SNI-97801-5xx: Ctrl-Tab\n");
13524         break;
13525     case K_SNI_CE            :
13526         printf("\\Ksni_ce          Transmit SNI-97801-5xx: CE\n");
13527         break;
13528     case K_SNI_CH_CODE:
13529         printf("\\Ksni_ch_code     Toggle SNI-97801-5xx: CH.CODE function.\n");
13530         break;
13531     case K_SNI_COMPOSE       :
13532         printf("\\Ksni_compose     Transmit SNI-97801-5xx: Compose\n");
13533         break;
13534     case K_SNI_DELETE_CHAR   :
13535         printf("\\Ksni_del_char    Transmit SNI-97801-5xx: Delete Char\n");
13536         break;
13537     case K_SNI_DELETE_LINE   :
13538         printf("\\Ksni_del_line    Transmit SNI-97801-5xx: Delete Line\n");
13539         break;
13540     case K_SNI_DELETE_WORD   :
13541         printf("\\Ksni_del_word    Transmit SNI-97801-5xx: Delete Word\n");
13542         break;
13543     case K_SNI_CURSOR_DOWN   :
13544         printf("\\Ksni_dnarr       Transmit SNI-97801-5xx: Cursor Down\n");
13545         break;
13546     case K_SNI_ENDMARKE      :
13547         printf("\\Ksni_endmarke    Transmit SNI-97801-5xx: End Marke\n");
13548         break;
13549     case K_SNI_F01           :
13550         printf("\\Ksni_f01         Transmit SNI-97801-5xx: F1\n");
13551         break;
13552     case K_SNI_F02           :
13553         printf("\\Ksni_f02         Transmit SNI-97801-5xx: F2\n");
13554         break;
13555     case K_SNI_F03           :
13556         printf("\\Ksni_f03         Transmit SNI-97801-5xx: F3\n");
13557         break;
13558     case K_SNI_F04           :
13559         printf("\\Ksni_f04         Transmit SNI-97801-5xx: F4\n");
13560         break;
13561     case K_SNI_F05           :
13562         printf("\\Ksni_f05         Transmit SNI-97801-5xx: F5\n");
13563         break;
13564     case K_SNI_F06           :
13565         printf("\\Ksni_f06         Transmit SNI-97801-5xx: F6\n");
13566         break;
13567     case K_SNI_F07           :
13568         printf("\\Ksni_f07         Transmit SNI-97801-5xx: F7\n");
13569         break;
13570     case K_SNI_F08           :
13571         printf("\\Ksni_f08         Transmit SNI-97801-5xx: F8\n");
13572         break;
13573     case K_SNI_F09           :
13574         printf("\\Ksni_f09         Transmit SNI-97801-5xx: F9\n");
13575         break;
13576     case K_SNI_F10           :
13577         printf("\\Ksni_f10         Transmit SNI-97801-5xx: F10\n");
13578         break;
13579     case K_SNI_F11           :
13580         printf("\\Ksni_f11         Transmit SNI-97801-5xx: F11\n");
13581         break;
13582     case K_SNI_F12           :
13583         printf("\\Ksni_f12         Transmit SNI-97801-5xx: F12\n");
13584         break;
13585     case K_SNI_F13           :
13586         printf("\\Ksni_f13         Transmit SNI-97801-5xx: F13\n");
13587         break;
13588     case K_SNI_F14           :
13589         printf("\\Ksni_f14         Transmit SNI-97801-5xx: F14\n");
13590         break;
13591     case K_SNI_F15           :
13592         printf("\\Ksni_f15         Transmit SNI-97801-5xx: F15\n");
13593         break;
13594     case K_SNI_F16           :
13595         printf("\\Ksni_f16         Transmit SNI-97801-5xx: F16\n");
13596         break;
13597     case K_SNI_F17           :
13598         printf("\\Ksni_f17         Transmit SNI-97801-5xx: F17\n");
13599         break;
13600     case K_SNI_F18           :
13601         printf("\\Ksni_f18         Transmit SNI-97801-5xx: F18\n");
13602         break;
13603     case K_SNI_USER1          :
13604         printf("\\Ksni_user1       Transmit SNI-97801-5xx: Key below F18\n");
13605         break;
13606     case K_SNI_F19           :
13607         printf("\\Ksni_f19         Transmit SNI-97801-5xx: F19\n");
13608         break;
13609     case K_SNI_USER2          :
13610         printf("\\Ksni_user2       Transmit SNI-97801-5xx: Key below F19\n");
13611         break;
13612     case K_SNI_F20           :
13613         printf("\\Ksni_f20         Transmit SNI-97801-5xx: F20\n");
13614         break;
13615     case K_SNI_USER3          :
13616         printf("\\Ksni_user3       Transmit SNI-97801-5xx: Key below F20\n");
13617         break;
13618     case K_SNI_F21           :
13619         printf("\\Ksni_f21         Transmit SNI-97801-5xx: F21\n");
13620         break;
13621     case K_SNI_USER4          :
13622         printf("\\Ksni_user4       Transmit SNI-97801-5xx: Key below F21\n");
13623         break;
13624     case K_SNI_F22           :
13625         printf("\\Ksni_f22         Transmit SNI-97801-5xx: F22\n");
13626         break;
13627     case K_SNI_USER5          :
13628         printf("\\Ksni_user5       Transmit SNI-97801-5xx: Key below F22\n");
13629         break;
13630     case K_SNI_HELP          :
13631         printf("\\Ksni_help        Transmit SNI-97801-5xx: Help\n");
13632         break;
13633     case K_SNI_HOME          :
13634         printf("\\Ksni_home        Transmit SNI-97801-5xx: Home\n");
13635         break;
13636     case K_SNI_INSERT_CHAR   :
13637         printf("\\Ksni_ins_char    Transmit SNI-97801-5xx: Insert Char\n");
13638         break;
13639     case K_SNI_INSERT_LINE   :
13640         printf("\\Ksni_ins_line    Transmit SNI-97801-5xx: Insert Line\n");
13641         break;
13642     case K_SNI_INSERT_WORD   :
13643         printf("\\Ksni_ins_word    Transmit SNI-97801-5xx: Insert Word\n");
13644         break;
13645     case K_SNI_LEFT_TAB      :
13646         printf("\\Ksni_left_tab    Transmit SNI-97801-5xx: Left Tab\n");
13647         break;
13648     case K_SNI_CURSOR_LEFT   :
13649         printf("\\Ksni_lfarr       Transmit SNI-97801-5xx: Cursor Left\n");
13650         break;
13651     case K_SNI_MODE          :
13652         printf("\\Ksni_mode        Transmit SNI-97801-5xx: Mode\n");
13653         break;
13654     case K_SNI_PAGE          :
13655         printf("\\Ksni_page        Transmit SNI-97801-5xx: Page\n");
13656         break;
13657     case K_SNI_PRINT         :
13658         printf("\\Ksni_print       Transmit SNI-97801-5xx: Print\n");
13659         break;
13660     case K_SNI_CURSOR_RIGHT  :
13661         printf("\\Ksni_rtarr       Transmit SNI-97801-5xx: Cursor Right\n");
13662         break;
13663     case K_SNI_S_DOUBLE_0    :
13664         printf(
13665 "\\Ksni_s_00        Transmit SNI-97801-5xx: Shift-Double-Zero\n");
13666         break;
13667     case K_SNI_S_CE          :
13668         printf("\\Ksni_s_ce        Transmit SNI-97801-5xx: Shift-CE\n");
13669         break;
13670     case K_SNI_S_COMPOSE     :
13671         printf("\\Ksni_s_compose   Transmit SNI-97801-5xx: Shift-Compose\n");
13672         break;
13673     case K_SNI_S_DELETE_CHAR :
13674         printf(
13675 "\\Ksni_s_del_char  Transmit SNI-97801-5xx: Shift-Delete Char\n");
13676         break;
13677     case K_SNI_S_DELETE_LINE :
13678         printf(
13679 "\\Ksni_s_del_line  Transmit SNI-97801-5xx: Shift-Delete Line\n");
13680         break;
13681     case K_SNI_S_DELETE_WORD :
13682         printf(
13683 "\\Ksni_s_del_word  Transmit SNI-97801-5xx: Shift-Delete Word\n");
13684         break;
13685     case K_SNI_S_CURSOR_DOWN :
13686         printf(
13687 "\\Ksni_s_dnarr     Transmit SNI-97801-5xx: Shift-Cursor Down\n");
13688         break;
13689     case K_SNI_S_ENDMARKE    :
13690         printf("\\Ksni_s_endmarke  Transmit SNI-97801-5xx: Shift-End Marke\n");
13691         break;
13692     case K_SNI_S_F01         :
13693         printf("\\Ksni_s_f01       Transmit SNI-97801-5xx: Shift-F1\n");
13694         break;
13695     case K_SNI_S_F02         :
13696         printf("\\Ksni_s_f02       Transmit SNI-97801-5xx: Shift-F2\n");
13697         break;
13698     case K_SNI_S_F03         :
13699         printf("\\Ksni_s_f03       Transmit SNI-97801-5xx: Shift-F3\n");
13700         break;
13701     case K_SNI_S_F04         :
13702         printf("\\Ksni_s_f04       Transmit SNI-97801-5xx: Shift-F4\n");
13703         break;
13704     case K_SNI_S_F05         :
13705         printf("\\Ksni_s_f05       Transmit SNI-97801-5xx: Shift-F5\n");
13706         break;
13707     case K_SNI_S_F06         :
13708         printf("\\Ksni_s_f06       Transmit SNI-97801-5xx: Shift-F6\n");
13709         break;
13710     case K_SNI_S_F07         :
13711         printf("\\Ksni_s_f07       Transmit SNI-97801-5xx: Shift-F7\n");
13712         break;
13713     case K_SNI_S_F08         :
13714         printf("\\Ksni_s_f08       Transmit SNI-97801-5xx: Shift-F8\n");
13715         break;
13716     case K_SNI_S_F09         :
13717         printf("\\Ksni_s_f09       Transmit SNI-97801-5xx: Shift-F9\n");
13718         break;
13719     case K_SNI_S_F10         :
13720         printf("\\Ksni_s_f10       Transmit SNI-97801-5xx: Shift-F10\n");
13721         break;
13722     case K_SNI_S_F11         :
13723         printf("\\Ksni_s_f11       Transmit SNI-97801-5xx: Shift-F11\n");
13724         break;
13725     case K_SNI_S_F12         :
13726         printf("\\Ksni_s_f12       Transmit SNI-97801-5xx: Shift-F12\n");
13727         break;
13728     case K_SNI_S_F13         :
13729         printf("\\Ksni_s_f13       Transmit SNI-97801-5xx: Shift-F13\n");
13730         break;
13731     case K_SNI_S_F14         :
13732         printf("\\Ksni_s_f14       Transmit SNI-97801-5xx: Shift-F14\n");
13733         break;
13734     case K_SNI_S_F15         :
13735         printf("\\Ksni_s_f15       Transmit SNI-97801-5xx: Shift-F15\n");
13736         break;
13737     case K_SNI_S_F16         :
13738         printf("\\Ksni_s_f16       Transmit SNI-97801-5xx: Shift-F16\n");
13739         break;
13740     case K_SNI_S_F17         :
13741         printf("\\Ksni_s_f17       Transmit SNI-97801-5xx: Shift-F17\n");
13742         break;
13743     case K_SNI_S_F18         :
13744         printf("\\Ksni_s_f18       Transmit SNI-97801-5xx: Shift-F18\n");
13745         break;
13746     case K_SNI_S_USER1        :
13747         printf(
13748 "\\Ksni_s_user1     Transmit SNI-97801-5xx: Shift-Key below F18\n");
13749         break;
13750     case K_SNI_S_F19         :
13751         printf("\\Ksni_s_f19       Transmit SNI-97801-5xx: Shift-F19\n");
13752         break;
13753     case K_SNI_S_USER2       :
13754         printf(
13755 "\\Ksni_s_user2     Transmit SNI-97801-5xx: Shift-Key below F19\n");
13756         break;
13757     case K_SNI_S_F20         :
13758         printf("\\Ksni_s_f20       Transmit SNI-97801-5xx: Shift-F20\n");
13759         break;
13760     case K_SNI_S_USER3       :
13761         printf(
13762 "\\Ksni_s_user3     Transmit SNI-97801-5xx: Shift-Key below F20\n");
13763         break;
13764     case K_SNI_S_F21         :
13765         printf("\\Ksni_s_f21       Transmit SNI-97801-5xx: Shift-F21\n");
13766         break;
13767     case K_SNI_S_USER4       :
13768         printf(
13769 "\\Ksni_s_user4     Transmit SNI-97801-5xx: Shift-Key below F21\n");
13770         break;
13771     case K_SNI_S_F22         :
13772         printf("\\Ksni_s_f22       Transmit SNI-97801-5xx: Shift-F22\n");
13773         break;
13774     case K_SNI_S_USER5       :
13775         printf(
13776 "\\Ksni_s_user5     Transmit SNI-97801-5xx: Shift-Key below F22\n");
13777         break;
13778     case K_SNI_S_HELP        :
13779         printf("\\Ksni_s_help      Transmit SNI-97801-5xx: Shift-Help\n");
13780         break;
13781     case K_SNI_S_HOME        :
13782         printf("\\Ksni_s_home      Transmit SNI-97801-5xx: Shift-Home\n");
13783         break;
13784     case K_SNI_S_INSERT_CHAR :
13785         printf(
13786 "\\Ksni_s_ins_char  Transmit SNI-97801-5xx: Shift-Insert Char\n");
13787         break;
13788     case K_SNI_S_INSERT_LINE :
13789         printf(
13790 "\\Ksni_s_ins_line  Transmit SNI-97801-5xx: Shift-Insert Line\n");
13791         break;
13792     case K_SNI_S_INSERT_WORD :
13793         printf(
13794 "\\Ksni_s_ins_word  Transmit SNI-97801-5xx: Shift-Insert Word\n");
13795         break;
13796     case K_SNI_S_LEFT_TAB    :
13797         printf("\\Ksni_s_left_tab  Transmit SNI-97801-5xx: Shift-Left Tab\n");
13798         break;
13799     case K_SNI_S_CURSOR_LEFT :
13800         printf(
13801 "\\Ksni_s_lfarr     Transmit SNI-97801-5xx: Shift-Cursor Left\n");
13802         break;
13803     case K_SNI_S_MODE        :
13804         printf("\\Ksni_s_mode      Transmit SNI-97801-5xx: Shift-Mode\n");
13805         break;
13806     case K_SNI_S_PAGE        :
13807         printf("\\Ksni_s_page      Transmit SNI-97801-5xx: Shift-Page\n");
13808         break;
13809     case K_SNI_S_PRINT       :
13810         printf("\\Ksni_s_print     Transmit SNI-97801-5xx: Shift-Print\n");
13811         break;
13812     case K_SNI_S_CURSOR_RIGHT:
13813         printf(
13814 "\\Ksni_s_rtarr     Transmit SNI-97801-5xx: Shift-Cursor Right\n");
13815         break;
13816     case K_SNI_S_SCROLL_DOWN :
13817         printf(
13818 "\\Ksni_s_scroll_dn Transmit SNI-97801-5xx: Shift-Scroll Down\n");
13819         break;
13820     case K_SNI_S_SCROLL_UP   :
13821         printf("\\Ksni_s_scroll_up Transmit SNI-97801-5xx: Shift-Scroll Up\n");
13822         break;
13823     case K_SNI_S_START       :
13824         printf("\\Ksni_s_start     Transmit SNI-97801-5xx: Shift-Start\n");
13825         break;
13826     case K_SNI_S_CURSOR_UP   :
13827         printf("\\Ksni_s_uparr     Transmit SNI-97801-5xx: Shift-Cursor Up\n");
13828         break;
13829     case K_SNI_S_TAB         :
13830         printf("\\Ksni_s_tab       Transmit SNI-97801-5xx: Shift-Tab\n");
13831         break;
13832     case K_SNI_SCROLL_DOWN   :
13833         printf("\\Ksni_scroll_dn   Transmit SNI-97801-5xx: Scroll Down\n");
13834         break;
13835     case K_SNI_SCROLL_UP     :
13836         printf("\\Ksni_scroll_up   Transmit SNI-97801-5xx: Scroll Up\n");
13837         break;
13838     case K_SNI_START         :
13839         printf("\\Ksni_start       Transmit SNI-97801-5xx: Start\n");
13840         break;
13841     case K_SNI_TAB           :
13842         printf("\\Ksni_tab         Transmit SNI-97801-5xx: Tab\n");
13843         break;
13844     case K_SNI_CURSOR_UP     :
13845         printf("\\Ksni_uparr       Transmit SNI-97801-5xx: Cursor Up\n");
13846         break;
13847
13848     case K_BA80_ATTR:
13849         printf("\\Kba80_attr       Transmit BA80: Attr\n");
13850         break;
13851     case K_BA80_C_KEY:
13852         printf("\\Kba80_c_key      Transmit BA80: C\n");
13853         break;
13854     case K_BA80_CLEAR:
13855         printf("\\Kba80_clear      Transmit BA80: Clear\n");
13856         break;
13857     case K_BA80_CMD:
13858         printf("\\Kba80_cmd        Transmit BA80: Cmd\n");
13859         break;
13860     case K_BA80_COPY:
13861         printf("\\Kba80_copy       Transmit BA80: Copy\n");
13862         break;
13863     case K_BA80_DEL:
13864         printf("\\Kba80_del        Transmit BA80: Delete\n");
13865         break;
13866     case K_BA80_DEL_B:
13867         printf("\\Kba80_del_b      Transmit BA80: Delete B\n");
13868         break;
13869     case K_BA80_DO:
13870         printf("\\Kba80_do         Transmit BA80: Do\n");
13871         break;
13872     case K_BA80_END:
13873         printf("\\Kba80_end        Transmit BA80: End\n");
13874         break;
13875     case K_BA80_ENV:
13876         printf("\\Kba80_env        Transmit BA80: Env\n");
13877         break;
13878     case K_BA80_EOP:
13879         printf("\\Kba80_eop        Transmit BA80: EOP\n");
13880         break;
13881     case K_BA80_ERASE:
13882         printf("\\Kba80_erase      Transmit BA80: Erase\n");
13883         break;
13884     case K_BA80_FMT:
13885         printf("\\Kba80_fmt        Transmit BA80: Format\n");
13886         break;
13887     case K_BA80_HELP:
13888         printf("\\Kba80_help       Transmit BA80: Help\n");
13889         break;
13890     case K_BA80_HOME:
13891         printf("\\Kba80_home       Transmit BA80: Home\n");
13892         break;
13893     case K_BA80_INS:
13894         printf("\\Kba80_ins        Transmit BA80: Insert\n");
13895         break;
13896     case K_BA80_INS_B:
13897         printf("\\Kba80_ins_b      Transmit BA80: Insert B\n");
13898         break;
13899     case K_BA80_MARK:
13900         printf("\\Kba80_mark       Transmit BA80: Mark\n");
13901         break;
13902     case K_BA80_MOVE:
13903         printf("\\Kba80_move       Transmit BA80: Move\n");
13904         break;
13905     case K_BA80_PA01:
13906         printf("\\Kba80_pa01       Transmit BA80: PA1\n");
13907         break;
13908     case K_BA80_PA02:
13909         printf("\\Kba80_pa02       Transmit BA80: PA2\n");
13910         break;
13911     case K_BA80_PA03:
13912         printf("\\Kba80_pa03       Transmit BA80: PA3\n");
13913         break;
13914     case K_BA80_PA04:
13915         printf("\\Kba80_pa04       Transmit BA80: PA4\n");
13916         break;
13917     case K_BA80_PA05:
13918         printf("\\Kba80_pa05       Transmit BA80: PA5\n");
13919         break;
13920     case K_BA80_PA06:
13921         printf("\\Kba80_pa06       Transmit BA80: PA6\n");
13922         break;
13923     case K_BA80_PA07:
13924         printf("\\Kba80_pa07       Transmit BA80: PA7\n");
13925         break;
13926     case K_BA80_PA08:
13927         printf("\\Kba80_pa08       Transmit BA80: PA8\n");
13928         break;
13929     case K_BA80_PA09:
13930         printf("\\Kba80_pa09       Transmit BA80: PA9\n");
13931         break;
13932     case K_BA80_PA10:
13933         printf("\\Kba80_pa10       Transmit BA80: PA10\n");
13934         break;
13935     case K_BA80_PA11:
13936         printf("\\Kba80_pa11       Transmit BA80: PA11\n");
13937         break;
13938     case K_BA80_PA12:
13939         printf("\\Kba80_pa12       Transmit BA80: PA12\n");
13940         break;
13941     case K_BA80_PA13:
13942         printf("\\Kba80_pa13       Transmit BA80: PA13\n");
13943         break;
13944     case K_BA80_PA14:
13945         printf("\\Kba80_pa14       Transmit BA80: PA14\n");
13946         break;
13947     case K_BA80_PA15:
13948         printf("\\Kba80_pa15       Transmit BA80: PA15\n");
13949         break;
13950     case K_BA80_PA16:
13951         printf("\\Kba80_pa16       Transmit BA80: PA16\n");
13952         break;
13953     case K_BA80_PA17:
13954         printf("\\Kba80_pa17       Transmit BA80: PA17\n");
13955         break;
13956     case K_BA80_PA18:
13957         printf("\\Kba80_pa18       Transmit BA80: PA18\n");
13958         break;
13959     case K_BA80_PA19:
13960         printf("\\Kba80_pa19       Transmit BA80: PA19\n");
13961         break;
13962     case K_BA80_PA20:
13963         printf("\\Kba80_pa20       Transmit BA80: PA20\n");
13964         break;
13965     case K_BA80_PA21:
13966         printf("\\Kba80_pa21       Transmit BA80: PA21\n");
13967         break;
13968     case K_BA80_PA22:
13969         printf("\\Kba80_pa22       Transmit BA80: PA22\n");
13970         break;
13971     case K_BA80_PA23:
13972         printf("\\Kba80_pa23       Transmit BA80: PA23\n");
13973         break;
13974     case K_BA80_PA24:
13975         printf("\\Kba80_pa24       Transmit BA80: PA24\n");
13976         break;
13977     case K_BA80_PGDN:
13978         printf("\\Kba80_pgdn       Transmit BA80: Page Down\n");
13979         break;
13980     case K_BA80_PGUP:
13981         printf("\\Kba80_pgup       Transmit BA80: Page Up\n");
13982         break;
13983     case K_BA80_PICK:
13984         printf("\\Kba80_pick       Transmit BA80: Pick\n");
13985         break;
13986     case K_BA80_PRINT:
13987         printf("\\Kba80_print      Transmit BA80: Print\n");
13988         break;
13989     case K_BA80_PUT:
13990         printf("\\Kba80_put        Transmit BA80: Put\n");
13991         break;
13992     case K_BA80_REFRESH:
13993         printf("\\Kba80_refresh    Transmit BA80: Refresh \n");
13994         break;
13995     case K_BA80_RESET:
13996         printf("\\Kba80_reset      Transmit BA80: Reset\n");
13997         break;
13998     case K_BA80_RUBOUT:
13999         printf("\\Kba80_rubout     Transmit BA80: Rubout\n");
14000         break;
14001     case K_BA80_SAVE:
14002         printf("\\Kba80_save       Transmit BA80: Save\n");
14003         break;
14004     case K_BA80_SOFTKEY1:
14005         printf("\\Kba80_softkey1   Transmit BA80: Softkey 1\n");
14006         break;
14007     case K_BA80_SOFTKEY2:
14008         printf("\\Kba80_softkey2   Transmit BA80: Softkey 2\n");
14009         break;
14010     case K_BA80_SOFTKEY3:
14011         printf("\\Kba80_softkey3   Transmit BA80: Softkey 3\n");
14012         break;
14013     case K_BA80_SOFTKEY4:
14014         printf("\\Kba80_softkey4   Transmit BA80: Softkey 4\n");
14015         break;
14016     case K_BA80_SOFTKEY5:
14017         printf("\\Kba80_softkey5   Transmit BA80: Softkey 5\n");
14018         break;
14019     case K_BA80_SOFTKEY6:
14020         printf("\\Kba80_softkey6   Transmit BA80: Softkey 6\n");
14021         break;
14022     case K_BA80_SOFTKEY7:
14023         printf("\\Kba80_softkey7   Transmit BA80: Softkey 7\n");
14024         break;
14025     case K_BA80_SOFTKEY8:
14026         printf("\\Kba80_softkey8   Transmit BA80: Softkey 8\n");
14027         break;
14028     case K_BA80_SOFTKEY9:
14029         printf("\\Kba80_softkey9   Transmit BA80: Softkey 9\n");
14030         break;
14031     case K_BA80_UNDO:
14032         printf("\\Kba80_undo       Transmit BA80: Undo\n");
14033         break;
14034
14035         case  K_I31_F01:
14036         printf("\\Ki31_f01         Transmit IBM 31xx: F1\n");
14037         break;
14038        case  K_I31_F02:         
14039         printf("\\Ki31_f02         Transmit IBM 31xx: F2\n");
14040         break;
14041        case  K_I31_F03:         
14042         printf("\\Ki31_f03         Transmit IBM 31xx: F3\n");
14043         break;
14044        case  K_I31_F04:         
14045         printf("\\Ki31_f04         Transmit IBM 31xx: F4\n");
14046         break;
14047        case  K_I31_F05:         
14048         printf("\\Ki31_f05         Transmit IBM 31xx: F5\n");
14049         break;
14050        case  K_I31_F06:         
14051         printf("\\Ki31_f06         Transmit IBM 31xx: F6\n");
14052         break;
14053        case  K_I31_F07:         
14054         printf("\\Ki31_f07         Transmit IBM 31xx: F7\n");
14055         break;
14056        case  K_I31_F08:         
14057         printf("\\Ki31_f08         Transmit IBM 31xx: F8\n");
14058         break;
14059        case  K_I31_F09:         
14060         printf("\\Ki31_f09         Transmit IBM 31xx: F9\n");
14061         break;
14062        case  K_I31_F10:         
14063         printf("\\Ki31_f10         Transmit IBM 31xx: F10\n");
14064         break;
14065        case  K_I31_F11:         
14066         printf("\\Ki31_f11         Transmit IBM 31xx: F11\n");
14067         break;
14068        case  K_I31_F12:         
14069         printf("\\Ki31_f12         Transmit IBM 31xx: F12\n");
14070         break;
14071        case  K_I31_F13:         
14072         printf("\\Ki31_f13         Transmit IBM 31xx: F13\n");
14073         break;
14074        case  K_I31_F14:         
14075         printf("\\Ki31_f14         Transmit IBM 31xx: F14\n");
14076         break;
14077        case  K_I31_F15:         
14078         printf("\\Ki31_f15         Transmit IBM 31xx: F15\n");
14079         break;
14080        case  K_I31_F16:         
14081         printf("\\Ki31_f16         Transmit IBM 31xx: F16\n");
14082         break;
14083        case  K_I31_F17:         
14084         printf("\\Ki31_f17         Transmit IBM 31xx: F17\n");
14085         break;
14086        case  K_I31_F18:         
14087         printf("\\Ki31_f18         Transmit IBM 31xx: F18\n");
14088         break;
14089        case  K_I31_F19:         
14090         printf("\\Ki31_f19         Transmit IBM 31xx: F19\n");
14091         break;
14092        case  K_I31_F20:         
14093         printf("\\Ki31_f20         Transmit IBM 31xx: F20\n");
14094         break;
14095        case  K_I31_F21:         
14096         printf("\\Ki31_f21         Transmit IBM 31xx: F21\n");
14097         break;
14098        case  K_I31_F22:         
14099         printf("\\Ki31_f22         Transmit IBM 31xx: F22\n");
14100         break;
14101        case  K_I31_F23:         
14102         printf("\\Ki31_f23         Transmit IBM 31xx: F23\n");
14103         break;
14104        case  K_I31_F24:         
14105         printf("\\Ki31_f24         Transmit IBM 31xx: F24\n");
14106         break;
14107        case  K_I31_F25:         
14108         printf("\\Ki31_f25         Transmit IBM 31xx: F25\n");
14109         break;
14110        case  K_I31_F26:         
14111         printf("\\Ki31_f26         Transmit IBM 31xx: F26\n");
14112         break;
14113        case  K_I31_F27:         
14114         printf("\\Ki31_f27         Transmit IBM 31xx: F27\n");
14115         break;
14116        case  K_I31_F28:         
14117         printf("\\Ki31_f28         Transmit IBM 31xx: F28\n");
14118         break;
14119        case  K_I31_F29:         
14120         printf("\\Ki31_f29         Transmit IBM 31xx: F29\n");
14121         break;
14122        case  K_I31_F30:         
14123         printf("\\Ki31_f30         Transmit IBM 31xx: F30\n");
14124         break;
14125        case  K_I31_F31:         
14126         printf("\\Ki31_f31         Transmit IBM 31xx: F31\n");
14127         break;
14128        case  K_I31_F32:         
14129         printf("\\Ki31_f32         Transmit IBM 31xx: F32\n");
14130         break;
14131        case  K_I31_F33:         
14132         printf("\\Ki31_f33         Transmit IBM 31xx: F33\n");
14133         break;
14134        case  K_I31_F34:         
14135         printf("\\Ki31_f34         Transmit IBM 31xx: F34\n");
14136         break;
14137        case  K_I31_F35:         
14138         printf("\\Ki31_f35         Transmit IBM 31xx: F35\n");
14139         break;
14140        case  K_I31_F36:         
14141         printf("\\Ki31_f36         Transmit IBM 31xx: F36\n");
14142         break;
14143        case  K_I31_PA1:         
14144         printf("\\Ki31_pa1         Transmit IBM 31xx: PA1\n");
14145         break;
14146        case  K_I31_PA2:         
14147         printf("\\Ki31_pa2         Transmit IBM 31xx: PA2\n");
14148         break;
14149        case  K_I31_PA3:         
14150         printf("\\Ki31_pa3         Transmit IBM 31xx: PA3\n");
14151         break;
14152        case  K_I31_RESET:
14153         printf("\\Ki31_reset       Transmit IBM 31xx: Reset\n");
14154         break;            
14155        case  K_I31_JUMP:        
14156         printf("\\Ki31_jump        Transmit IBM 31xx: Jump\n");
14157         break;
14158        case  K_I31_CLEAR:       
14159         printf("\\Ki31_clear       Transmit IBM 31xx: Clear\n");
14160         break;
14161        case  K_I31_ERASE_EOF:   
14162         printf("\\Ki31_erase_eof   Transmit IBM 31xx: Erase to End of Field\n");
14163         break;
14164        case  K_I31_ERASE_EOP:   
14165         printf("\\Ki31_eop         Transmit IBM 31xx: Erase to End of Page\n");
14166         break;
14167        case  K_I31_ERASE_INP:   
14168         printf("\\Ki31_inp         Transmit IBM 31xx: Erase Input Operation\n");
14169         break;
14170        case  K_I31_INSERT_CHAR: 
14171         printf("\\Ki31_ins_char    Transmit IBM 31xx: Insert Character\n");
14172         break;
14173        case  K_I31_INSERT_SPACE:
14174         printf("\\Ki31_ins_space   Transmit IBM 31xx: Insert Space\n");
14175         break;
14176        case  K_I31_DELETE:      
14177         printf("\\Ki31_delete      Transmit IBM 31xx: Delete Character\n");
14178         break;
14179        case  K_I31_INS_LN:      
14180         printf("\\Ki31_ins_line    Transmit IBM 31xx: Insert Line\n");
14181         break;
14182        case  K_I31_DEL_LN:      
14183         printf("\\Ki31_del_ln      Transmit IBM 31xx: Delete Line\n");
14184         break;
14185        case  K_I31_PRINT_LINE:  
14186         printf("\\Ki31_prt_line    Transmit IBM 31xx: Print Line\n");
14187         break;
14188        case  K_I31_PRINT_MSG:   
14189         printf("\\Ki31_prt_msg     Transmit IBM 31xx: Print Message\n");
14190         break;
14191        case  K_I31_PRINT_SHIFT: 
14192         printf("\\Ki31_prt_shift   Transmit IBM 31xx: Print Shift\n");
14193         break;
14194        case  K_I31_CANCEL:      
14195         printf("\\Ki31_cancel      Transmit IBM 31xx: Cancel\n");
14196         break;
14197        case  K_I31_SEND_LINE:   
14198         printf("\\Ki31_send_line   Transmit IBM 31xx: Send Line\n");
14199         break;
14200        case  K_I31_SEND_MSG:    
14201         printf("\\Ki31_send_msg    Transmit IBM 31xx: Send Message\n");
14202         break;
14203        case  K_I31_SEND_PAGE:   
14204         printf("\\Ki31_send_page   Transmit IBM 31xx: Send Page\n");
14205         break;
14206        case  K_I31_HOME:        
14207         printf("\\Ki31_home        Transmit IBM 31xx: Home\n");
14208         break;
14209        case  K_I31_BACK_TAB:    
14210         printf("\\Ki31_back_tab    Transmit IBM 31xx: Back Tab\n");
14211         break;
14212        case  K_SUN_STOP: 
14213         printf("\\Ksunstop         Transmit SUN Console: Stop\n");
14214         break;
14215        case  K_SUN_AGAIN:
14216         printf("\\Ksunagain        Transmit SUN Console: Again\n");
14217         break;
14218        case  K_SUN_PROPS:
14219         printf("\\Ksunprops        Transmit SUN Console: Props\n");
14220         break;
14221        case  K_SUN_UNDO: 
14222         printf("\\Ksunundo         Transmit SUN Console: Undo\n");
14223         break;
14224        case  K_SUN_FRONT:
14225         printf("\\Ksunfront        Transmit SUN Console: Front\n");
14226         break;
14227        case  K_SUN_COPY: 
14228         printf("\\Ksuncopy         Transmit SUN Console: Copy\n");
14229         break;
14230        case  K_SUN_OPEN: 
14231         printf("\\Ksunopen         Transmit SUN Console: Open\n");
14232         break;
14233        case  K_SUN_PASTE:
14234         printf("\\Ksunpaste        Transmit SUN Console: Paste\n");
14235         break;
14236        case  K_SUN_FIND: 
14237         printf("\\Ksunfind         Transmit SUN Console: Find\n");
14238         break;
14239        case  K_SUN_CUT:  
14240         printf("\\Ksuncut          Transmit SUN Console: Cut\n");
14241         break;
14242        case  K_SUN_HELP: 
14243         printf("\\Ksunhelp         Transmit SUN Console: Help\n");
14244         break;
14245
14246        default:
14247         printf("No additional help available for this kverb\n");
14248   }
14249     printf("\n");
14250
14251     /* This is not the proper way to do it since it doesn't show  */
14252     /* all emulations, nor does it show the special modes, but it */
14253     /* is better than nothing.                                    */
14254
14255     printf("Current bindings:\n");
14256     found = 0;
14257     for (i = 256; i < KMSIZE ; i++) {
14258         con_event evt = mapkey(i);
14259         if (evt.type != kverb)
14260           continue;
14261         if ((evt.kverb.id & ~F_KVERB) == xx) {
14262             found = 1;
14263             printf("  \\%-4d - %s\n",i,keyname(i));
14264         }
14265     }
14266 #ifdef OS2MOUSE
14267     for ( button = 0 ; button < MMBUTTONMAX ; button++ )
14268       for ( event = 0 ; event < MMEVENTSIZE ; event++ )
14269         if ( mousemap[button][event].type == kverb ) {
14270             if ( (mousemap[button][event].kverb.id & ~F_KVERB) == xx ) {
14271                 found = 1;
14272                 printf("  Mouse - %s\n",mousename(button,event));
14273             }
14274         }
14275 #endif /* OS2MOUSE */
14276
14277     if ( !found ) {
14278         printf("  (none)\n");
14279     }
14280     return(0);
14281 }
14282 #endif /* NOKVERBS */
14283 #endif /* OS2 */
14284
14285 #ifndef NOXFER
14286 /*  D O H R M T  --  Give help about REMOTE command  */
14287
14288 static char *hrset[] = {
14289 "Syntax:  REMOTE SET parameter value",
14290 "Example: REMOTE SET FILE TYPE BINARY",
14291 "  Asks the Kermit server to set the named parameter to the given value.",
14292 "  Equivalent to typing the corresponding SET command directly to the other",
14293 "  Kermit if it were in interactive mode.", "" };
14294
14295 int
14296 dohrmt(xx) int xx; {
14297     int x;
14298     if (xx == -3) return(hmsga(hmhrmt));
14299     if (xx < 0) return(xx);
14300     if ((x = cmcfm()) < 0) return(x);
14301     switch (xx) {
14302
14303 case XZCPY:
14304     return(hmsg("Syntax: REMOTE COPY source destination\n\
14305   Asks the Kermit server to copy the source file to destination.\n\
14306   Synonym: RCOPY."));
14307
14308 case XZCWD:
14309 #ifdef NEWFTP
14310     return(hmsg("Syntax: REMOTE CD [ name ]\n\
14311   Asks the Kermit or FTP server to change its working directory or device.\n\
14312   If the device or directory name is omitted, restore the default.\n\
14313   Synonym: RCD."));
14314 #else
14315     return(hmsg("Syntax: REMOTE CD [ name ]\n\
14316   Asks the Kermit server to change its working directory or device.\n\
14317   If the device or directory name is omitted, restore the default.\n\
14318   Synonym: RCD."));
14319 #endif /* NEWFTP */
14320
14321 case XZDEL:
14322 #ifdef NEWFTP
14323     return(hmsg("Syntax: REMOTE DELETE filespec\n\
14324   Asks the Kermit or FTP server to delete the named file(s).\n\
14325   Synonym: RDEL."));
14326 #else
14327     return(hmsg("Syntax: REMOTE DELETE filespec\n\
14328   Asks the Kermit server to delete the named file(s).\n\
14329   Synonym: RDEL."));
14330 #endif /* NEWFTP */
14331
14332 case XZMKD:
14333 #ifdef NEWFTP
14334     return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
14335   Asks the Kermit or FTP server to create the named directory.\n\
14336   Synonym: RMKDIR."));
14337 #else
14338     return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
14339   Asks the Kermit server to create the named directory.\n\
14340   Synonym: RMKDIR."));
14341 #endif /* NEWFTP */
14342
14343 case XZRMD:
14344 #ifdef NEWFTP
14345     return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
14346   Asks the Kermit or FTP server to remove the named directory.\n\
14347   Synonym: RRMDIR."));
14348 #else
14349     return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
14350   Asks the Kermit server to remove the named directory.\n\
14351   Synonym: RRMDIR."));
14352 #endif /* NEWFTP */
14353
14354 case XZDIR:
14355 #ifdef NEWFTP
14356     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
14357   Asks the Kermit or FTP server to provide a directory listing of the named\n\
14358   file(s) or if no file specification is given, of all files in its current\n\
14359   directory.  Synonym: RDIR."));
14360 #else
14361     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
14362   Asks the Kermit server to provide a directory listing of the named\n\
14363   file(s) or if no file specification is given, of all files in its current\n\
14364   directory.  Synonym: RDIR."));
14365 #endif /* NEWFTP */
14366
14367 case XZHLP:
14368 #ifdef NEWFTP
14369     return(hmsg("Syntax: REMOTE HELP\n\
14370   Asks the Kermit or FTP server to list the services it provides.\n\
14371   Synonym: RHELP."));
14372 #else
14373     return(hmsg("Syntax: REMOTE HELP\n\
14374   Asks the Kermit server to list the services it provides.\n\
14375   Synonym: RHELP."));
14376 #endif /* NEWFTP */
14377
14378 case XZHOS:
14379     return(hmsg("Syntax: REMOTE HOST command\n\
14380   Sends a command to the other computer in its own command language\n\
14381   through the Kermit server that is running on that host.  Synonym: RHOST."));
14382
14383 #ifndef NOFRILLS
14384 case XZKER:
14385     return(hmsg("Syntax: REMOTE KERMIT command\n\
14386   Sends a command to the remote Kermit server in its own command language.\n\
14387   Synonym: RKERMIT."));
14388
14389 case XZLGI:
14390     return(hmsg("Syntax: REMOTE LOGIN user password [ account ]\n\
14391   Logs in to a remote Kermit server that requires you login.  Note: RLOGIN\n\
14392   is NOT a synonym for REMOTE LOGIN."));
14393
14394 case XZLGO:
14395     return(hmsg("Syntax: REMOTE LOGOUT\n\
14396   Logs out from a remote Kermit server to which you have previously logged in."
14397 ));
14398
14399 case XZMSG:
14400     return(hmsg("Syntax: REMOTE MESSAGE text\n\
14401   Sends a short text message to the remote Kermit server."));
14402
14403 case XZPRI:
14404     return(hmsg("Syntax: REMOTE PRINT filespec [ options ]\n\
14405   Sends the specified file(s) to the remote Kermit and ask it to have the\n\
14406   file printed on the remote system's printer, using any specified options.\n\
14407   Synonym: RPRINT."));
14408 #endif /* NOFRILLS */
14409
14410 case XZREN:
14411 #ifdef NEWFTP
14412     return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
14413   Asks the Kermit or FTP server to rename the file.  Synonym: RRENAME."));
14414 #else
14415     return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
14416   Asks the Kermit server to rename the file.  Synonym: RRENAME."));
14417 #endif /* NEWFTP */
14418
14419 case XZSET:
14420     return(hmsga(hrset));
14421
14422 case XZSPA:
14423     return(hmsg("Syntax: REMOTE SPACE [ name ]\n\
14424   Asks the Kermit server to tell you about its disk space on the current\n\
14425   disk or directory, or in the one that you name.  Synonym: RSPACE."));
14426
14427 #ifndef NOFRILLS
14428 case XZTYP:
14429 #ifdef NEWFTP
14430     return(hmsg("Syntax: REMOTE TYPE file\n\
14431   Asks the Kermit or FTP server to send the named file to your screen.\n\
14432   Synonym: RTYPE."));
14433 #else
14434     return(hmsg("Syntax: REMOTE TYPE file\n\
14435   Asks the Kermit server to send the named file(s) to your screen.\n\
14436   Synonym: RTYPE."));
14437 #endif /* NEWFTP */
14438
14439
14440 case XZWHO:
14441     return(hmsg("Syntax: REMOTE WHO [ name ]\n\
14442   Asks the Kermit server to list who's logged in, or to give information\n\
14443   about the named user.  Synonym: RWHO."));
14444 #endif /* NOFRILLS */
14445
14446 #ifndef NOSPL
14447 case XZQUE:
14448     return(hmsg(
14449 "Syntax: [ REMOTE ] QUERY { KERMIT, SYSTEM, USER } variable-name\n\
14450   Asks the Kermit server to send the value of the named variable of the\n\
14451   given type, and make it available in the \\v(query) variable.  When the\n\
14452   type is KERMIT functions may also be specified as if they were variables."));
14453
14454 case XZASG:
14455     return(hmsg(
14456 "Syntax: REMOTE ASSIGN variable-name [ value ]\n\
14457   Assigns the given value to the named global variable on the server.\n\
14458   Synonyms: RASG, RASSIGN."));
14459 #endif /* NOSPL */
14460
14461 case XZPWD:
14462     return(hmsg(
14463 #ifdef NEWFTP
14464 "Syntax: REMOTE PWD\n\
14465   Asks the Kermit server to display its current working directory.\n\
14466   Synonym: RPWD."));
14467 #else
14468 "Syntax: REMOTE PWD\n\
14469   Asks the Kermit or FTP server to display its current working directory.\n\
14470   Synonym: RPWD."));
14471 #endif /* NEWFTP */
14472
14473 case XZXIT:
14474 #ifdef NEWFTP
14475     return(hmsg("Syntax: REMOTE EXIT\n\
14476    Asks the Kermit server to exit (without disconnecting), or closes an FTP\n\
14477    connection.  Synonym: REXIT, and (for FTP only) BYE, FTP BYE."));
14478 #else
14479     return(hmsg("Syntax: REMOTE EXIT\n\
14480   Asks the Kermit server to exit.  Synonym: REXIT."));
14481 #endif /* NEWFTP */
14482
14483 default:
14484     if ((x = cmcfm()) < 0) return(x);
14485     printf("?Sorry, no help available - \"%s\"\n",cmdbuf);
14486     return(-9);
14487     }
14488 }
14489 #endif /* NOXFER */
14490 #endif /* NOHELP */
14491 #endif /* NOICP */