apply 010_makefile-destdir-support
[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, 2004,
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().
24 */
25 #include "ckcsym.h"
26 #include "ckcdeb.h"
27 #include "ckcnet.h"
28 #include "ckcasc.h"
29 #include "ckcker.h"
30 #include "ckuusr.h"
31 #include "ckcxla.h"
32 #ifdef OS2
33 #ifdef NT
34 #include <windows.h>
35 #else /* not NT */
36 #define INCL_KBD
37 #ifdef OS2MOUSE
38 #define INCL_MOU
39 #endif /* OS2MOUSE */
40 #define INCL_DOSMISC
41 #define INCL_DOSDEVICES
42 #include <os2.h>                /* This pulls in a whole load of stuff */
43 #undef COMMENT
44 #endif /* NT */
45 #include "ckocon.h"
46 #include "ckokvb.h"
47 #include "ckokey.h"
48 #endif /* OS2 */
49
50 extern xx_strp xxstring;
51 extern char * ccntab[];
52 /*
53   hlptok contains the string for which the user requested help.  This is
54   useful for distinguishing synonyms, in case different help text is needed
55   depending on which synonym was given.
56 */
57 extern char * hlptok;
58
59 #ifndef NOIKSD
60     extern int inserver;
61 #endif /* IKSD */
62
63 #ifndef NOICP
64 extern int cmflgs;
65
66 #ifdef DCMDBUF
67 extern char *cmdbuf, *atmbuf;
68 #else
69 extern char cmdbuf[], atmbuf[];
70 #endif /* DCMDBUF */
71 #endif /* NOICP */
72
73 extern char *xarg0;
74 extern int nrmt, nprm, dfloc, local, parity, escape;
75 extern int turn, flow;
76 extern int binary, quiet, keep;
77 extern int success, xaskmore;
78 #ifdef OS2
79 extern int tt_rows[], tt_cols[];
80 #else /* OS2 */
81 extern int tt_rows, tt_cols;
82 #endif /* OS2 */
83 extern int cmd_rows, cmd_cols;
84
85 extern long speed;
86 extern char *dftty, *versio, *ckxsys;
87 #ifndef NOHELP
88 extern char *helpfile;
89 #endif /* NOHELP */
90 extern struct keytab prmtab[];
91 #ifndef NOXFER
92 extern struct keytab remcmd[];
93 #endif /* NOXFER */
94
95 #ifndef NOICP
96
97 /*  Interactive help strings  */
98
99 /* Top-level HELP text.  IMPORTANT: Also see tophlpi[] for IKSD. */
100
101 static char *tophlp[] = {
102 "Trustees of Columbia University in the City of New York.\n",
103
104 #ifndef NOHELP
105 "  Type EXIT    to exit.",
106 #ifdef OS2
107 "  Type INTRO   for a brief introduction to the Kermit Command screen.",
108 "  Type LICENSE to see the Kermit 95 license.",
109 #else
110 "  Type INTRO   for a brief introduction to C-Kermit.",
111 "  Type LICENSE to see the C-Kermit license.",
112 #endif /* OS2 */
113 "  Type HELP    followed by a command name for help about a specific command.",
114 #ifndef NOPUSH
115 #ifdef UNIX
116 "  Type MANUAL  to access the C-Kermit manual page.",
117 #else
118 #ifdef VMS
119 "  Type MANUAL  to access the C-Kermit help topic.",
120 #else
121 #ifdef OS2
122 "  Type MANUAL  to access the K95 manual.",
123 #else
124 "  Type MANUAL  to access the C-Kermit manual.",
125 #endif /* OS2 */
126 #endif /* VMS */
127 #endif /* UNIX */
128 #endif /* NOPUSH */
129 "  Type NEWS    for news about new features.",
130 "  Type SUPPORT to learn how to get technical support.",
131 "  Press ?      (question mark) at the prompt, or anywhere within a command,",
132 "               for a menu (context-sensitive help, menu on demand).",
133 #else
134 "Press ? for a list of commands; see documentation for detailed descriptions.",
135 #endif /* NOHELP */
136
137 #ifndef NOCMDL
138 #ifndef NOHELP
139 " ",
140 "  Type HELP OPTIONS for help with command-line options.",
141 #endif /* NOHELP */
142 #endif /* NOCMDL */
143 " ",
144 #ifndef OS2
145 #ifdef MAC
146 "Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and",
147 "Christine M. Gianone, Digital Press, 1997, ISBN: 1-55558-164-1.  To order,",
148 "call +1 212 854-3703 or +1 800 366-2665.",
149 #else
150 "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
151 "2nd Edition, Digital Press / Butterworth-Heinemann 1997, ISBN 1-55558-164-1,",
152 "plus supplements at http://www.columbia.edu/kermit/ckermit.html.",
153 #endif /* MAC */
154 #endif /* OS2 */
155 #ifdef MAC
156 " ",
157 "Also see the Mac Kermit Doc and Bwr files on the Mac Kermit diskette.\n",
158 #else
159 #ifdef HPUX10
160 " ",
161 "See the files in /usr/share/lib/kermit/ for additional information.",
162 #endif /* HPUX10 */
163 #endif /* MAC */
164 ""
165 };
166
167 #ifndef NOIKSD
168 static char *tophlpi[] = {              /* Top-level help for IKSD */
169
170 "Trustees of Columbia University in the City of New York.\n",
171
172 #ifndef NOHELP
173 "  Type INTRO   for a brief introduction to Kermit commands.",
174 "  Type VERSION for version and copyright information.",
175 "  Type HELP    followed by a command name for help about a specific command.",
176 "  Type SUPPORT to learn how to get technical support.",
177 "  Type LOGOUT  (or EXIT) to log out.",
178 "  Press ?      (question mark) at the prompt, or anywhere within a command,",
179 "               for a menu (context-sensitive help, menu on demand).",
180 #else
181 "Press ? for a list of commands; see documentation for detailed descriptions.",
182 #endif /* NOHELP */
183 " ",
184 "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
185 "2nd Edition, Digital Press / Butterworth-Heinemann 1997, ISBN 1-55558-164-1.",
186 "To order: +1 212 854-3703 or +1 800 366-2665.  More info at the Kermit",
187
188 "Project website, http://www.columbia.edu/kermit/.",
189 ""
190 };
191 #endif /* NOIKSD */
192
193 #ifndef NOHELP
194 char *newstxt[] = {
195 #ifdef OS2
196 "Welcome to Kermit 95 2.1.3.  Major new features include:",
197 #else
198 "Welcome to C-Kermit 8.0.206.  Major new features include:",
199 #endif /* OS2 */
200 #ifdef NT
201 #ifdef KUI
202 " . Runs in GUI window",
203 #else
204 " . GUI version available",
205 #endif /* KUI */
206 #endif /* NT */
207 #ifdef SSHBUILTIN
208 " . New built-in SSH v1 and v2 clients",
209 #endif /* SSHBUILTIN */
210 #ifdef NEWFTP
211 " . A new built-in FTP client",
212 #endif /* NEWFTP */
213 #ifndef NOHTTP
214 " . A new HTTP 1.1 client",
215 #endif /* NOHTTP */
216 #ifdef TN_COMPORT
217 " . Telnet Com Port Option for dialing from Telnet modem servers",
218 #endif /* TN_COMPORT */
219 " . File scanning for automatic text/binary determination",
220 #ifdef CKLEARN
221 #ifndef OS2
222 " . Learned scripts",
223 #endif /* OS2 */
224 #endif /* CKLEARN */
225 #ifndef NOSPL
226 #ifndef NOSEXP
227 " . LISP-like S-Expressions and natural floating-point arithmetic",
228 #endif /* NOSEXP */
229 " . Lots of script programming improvements",
230 #endif /* NOSPL */
231 " . Performance improvements and bug fixes",
232 " ",
233 "Documentation:",
234 " 1. \"Using C-Kermit\", second edition (1997), current with C-Kermit 6.0.",
235 " 2. http://www.columbia.edu/kermit/ckermit70.html",
236 "    which documents the new features of C-Kermit 7.0.",
237 " 3. http://www.columbia.edu/kermit/ckermit80.html",
238 "    which documents the new features of C-Kermit 8.0.",
239 " ",
240 "If the release date shown by the VERSION command is long past, be sure to",
241 "check with the Kermit Project to see if there have been updates.",
242 ""
243 };
244 #endif /* NOHELP */
245
246 #ifndef NOHELP
247 char *introtxt[] = {
248 #ifdef OS2
249 "Welcome to K-95, Kermit communications software for:",
250 #else
251 #ifdef UNIX
252 #ifdef HPUX
253 "Welcome to HP-UX C-Kermit communications software for:",
254 #else
255 "Welcome to UNIX C-Kermit communications software for:",
256 #endif /* HPUX */
257 #else
258 #ifdef VMS
259 "Welcome to VMS C-Kermit communications software for:",
260 #else
261 #ifdef VOS
262 "Welcome to VOS C-Kermit communications software for:",
263 #else
264 #ifdef MAC
265 "Welcome to Mac Kermit communications software for:",
266 #else
267 "Welcome to C-Kermit communications software for:",
268 #endif /* MAC */
269 #endif /* VOS */
270 #endif /* VMS */
271 #endif /* UNIX */
272 #endif /* OS2 */
273 #ifndef NOXFER
274 " . Error-free and efficient file transfer",
275 #endif /* NOXFER */
276 #ifndef NOLOCAL
277 #ifdef OS2
278 " . VT320/220/102/100/52, ANSI, Wyse, Linux, Televideo, and other emulations",
279 #else
280 #ifdef MAC
281 " . VT220 terminal emulation",
282 #else
283 " . Terminal connection",
284 #endif /* MAC */
285 #endif /* OS2 */
286 #endif /* NOLOCAL */
287 #ifndef NOSPL
288 " . Script programming",
289 #endif /* NOSPL */
290 #ifndef NOICS
291 " . International character set conversion",
292 #endif /* NOICS */
293 #ifndef NODIAL
294 #ifndef NOSPL
295 " . Numeric and alphanumeric paging",
296 #endif /* NOSPL */
297 #endif /* NODIAL */
298
299 #ifndef NOLOCAL
300 " ",
301 "Supporting:",
302 " . Serial connections, direct or dialed.",
303 #ifndef NODIAL
304 " . Automatic modem dialing",
305 #endif /* NODIAL */
306 #ifdef TCPSOCKET
307 " . TCP/IP network connections:",
308 #ifdef TNCODE
309 "   - Telnet sessions",
310 #endif /* TNCODE */
311 #ifdef SSHBUILTIN
312 "   - SSH v1 and v2 connections",
313 #else
314 #ifdef ANYSSH
315 "   - SSH connections via external agent",
316 #endif /* ANYSSH */
317 #endif /* SSHBUILTIN */
318 #ifdef RLOGCODE
319 "   - Rlogin sessions",
320 #endif /* RLOGCODE */
321 #ifdef NEWFTP
322 "   - FTP sessions",
323 #endif /* NEWFTP */
324 #ifdef CKHTTP
325 "   - HTTP 1.1 sessions",
326 #endif /* CKHTTP */
327 #ifdef IKSD
328 "   - Internet Kermit Service",
329 #endif /* IKSD */
330 #endif /* TCPSOCKET */
331 #ifdef ANYX25
332 " . X.25 network connections",
333 #endif /* ANYX25 */
334 #ifdef OS2
335 #ifdef DECNET
336 " . DECnet/PATHWORKS LAT Ethernet connections",
337 #endif /* DECNET */
338 #ifdef SUPERLAT
339 " . Meridian Technologies' SuperLAT connections",
340 #endif /* SUPERLAT */
341 #ifdef NPIPE
342 " . Named-pipe connections",
343 #endif /* NPIPE */
344 #ifdef CK_NETBIOS
345 " . NETBIOS connections",
346 #endif /* CK_NETBIOS */
347 #endif /* OS2 */
348 #endif /* NOLOCAL */
349
350 " ",
351 "While typing commands, you may use the following special characters:",
352 " . DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
353 " . CTRL-W:      Delete the most recent word typed.",
354 " . CTRL-U:      Delete the current line.",
355 " . CTRL-R:      Redisplay the current line.",
356
357 #ifdef CK_RECALL
358 #ifdef OS2
359 " . Uparrow:     Command recall - go backwards in command recall buffer.",
360 " . Downarrow:   Command recall - go forward in command recall buffer.",
361 #ifndef NOIKSD
362 "   (Note: Arrow keys can be used only on the PC's physical keyboard.)",
363 #endif /* NOIKSD */
364 #endif /* OS2 */
365 " . CTRL-P:      Command recall - go backwards in command recall buffer.",
366 " . CTRL-B:      Command recall - same as Ctrl-P.",
367 " . CTRL-N:      Command recall - go forward in command recall buffer.",
368 #endif /* CK_RECALL */
369
370 " . ?            (question mark) Display a menu for the current command field."
371 ,
372 " . ESC          (or TAB) Attempt to complete the current field.",
373 " . \\            (backslash) include the following character literally",
374 #ifndef NOSPL
375 "                or introduce a backslash code, variable, or function.",
376 #else
377 "                or introduce a numeric backslash code.",
378 #endif /* NOSPL */
379 " ",
380
381 "IMPORTANT: Since backslash (\\) is Kermit's command-line escape character,",
382 "you must enter DOS, Windows, or OS/2 pathnames using either forward slash (/)"
383 ,
384 "or double backslash (\\\\) as the directory separator in most contexts.",
385 "Examples: C:/TMP/README.TXT, C:\\\\TMP\\\\README.TXT.",
386 " ",
387
388 "Command words other than filenames can be abbreviated in most contexts.",
389 " ",
390
391 "Basic commands:",
392 "  EXIT          Exit from Kermit",
393 "  HELP          Request general help",
394 "  HELP command  Request help about the given command",
395 "  TAKE          Execute commands from a file",
396 "  TYPE          Display a file on your screen",
397 "  ORIENTATION   Explains directory structure",
398 " ",
399
400 #ifndef NOXFER
401 "Commands for file transfer:",
402 "  SEND          Send files",
403 "  RECEIVE       Receive files",
404 "  GET           Get files from a Kermit server",
405 #ifdef CK_RESEND
406 "  RESEND        Recover an interrupted send",
407 "  REGET         Recover an interrupted get from a server",
408 #endif /* CK_RESEND */
409 #ifndef NOSERVER
410 "  SERVER        Be a Kermit server",
411 #endif /* NOSERVER */
412 " ",
413 "File-transfer speed selection:",
414 "  FAST          Use fast settings -- THIS IS THE DEFAULT",
415 "  CAUTIOUS      Use slower, more cautious settings",
416 "  ROBUST        Use extremely slow and cautious settings",
417 " ",
418 "File-transfer performance fine tuning:",
419 "  SET RECEIVE PACKET-LENGTH  Kermit packet size",
420 "  SET WINDOW                 Number of sliding window slots",
421 "  SET PREFIXING              Amount of control-character prefixing",
422 #endif /* NOXFER */
423
424 #ifndef NOLOCAL
425 " ",
426 "To make a direct serial connection:",
427 #ifdef OS2
428 #ifdef NT
429 #ifdef CK_TAPI
430 "  SET PORT TAPI Select TAPI communication device",
431 #endif /* CK_TAPI */
432 "  SET PORT      Select serial communication device",
433 #else
434 "  SET PORT      Select serial communication port or server",
435 #endif /* NT */
436 #else
437 "  SET LINE      Select serial communication device",
438 #endif /* OS2 */
439 "  SET SPEED     Select communication speed",
440 "  SET PARITY    Communications parity (if necessary)",
441 #ifdef CK_RTSCTS
442 "  SET FLOW      Communications flow control, such as RTS/CTS",
443 #else
444 "  SET FLOW      Communications flow control, such as XON/XOFF",
445 #endif /* CK_RTSCTS */
446 "  CONNECT       Begin terminal connection",
447
448 #ifndef NODIAL
449 " ",
450 "To dial out with a modem:",
451 "  SET DIAL DIRECTORY     Specify dialing directory file (optional)",
452 "  SET DIAL COUNTRY-CODE  Country you are dialing from (*)",
453 "  SET DIAL AREA-CODE     Area-code you are dialing from (*)",
454 "  LOOKUP                 Lookup entries in your dialing directory (*)",
455 "  SET MODEM TYPE         Select modem type",
456 #ifdef OS2
457 #ifdef NT
458 #ifdef CK_TAPI
459 "  SET PORT TAPI          Select TAPI communication device",
460 #endif /* CK_TAPI */
461 "  SET PORT               Select serial communication device",
462 #else
463 "  SET PORT               Select serial communication port or server",
464 #endif /* NT */
465 #else
466 "  SET LINE               Select serial communication device",
467 #endif /* OS2 */
468 "  SET SPEED              Select communication speed",
469 "  SET PARITY             Communications parity (if necessary)",
470 "  DIAL                   Dial the phone number",
471 "  CONNECT                Begin terminal connection",
472 " ",
473 #ifdef OS2
474 "Further info:   HELP DIAL, HELP SET MODEM, HELP SET PORT, HELP SET DIAL",
475 #else
476 "Further info:   HELP DIAL, HELP SET MODEM, HELP SET LINE, HELP SET DIAL",
477 #endif /* OS2 */
478 "(*) (For use with optional dialing directory)",
479 #endif /* NODIAL */
480
481 #ifdef NETCONN
482 " ",
483 "To make a network connection:",
484 #ifndef NODIAL
485 "  SET NETWORK DIRECTORY  Specify a network services directory (optional)",
486 "  LOOKUP                 Lookup entries in your network directory",
487 #endif /* NODIAL */
488 "  SET NETWORK TYPE       Select network type (if more than one available)",
489 "  SET HOST               Make a network connection but stay in command mode",
490 "  CONNECT                Begin terminal connection",
491 #ifdef TNCODE
492 "  TELNET                 Select a Telnet host and CONNECT to it",
493 #endif /* TNCODE */
494 #ifdef RLOGCODE
495 "  RLOGIN                 Select an Rlogin host and CONNECT to it",
496 #endif /* RLOGCODE */
497 #ifdef ANYSSH
498 "  SSH [ OPEN ]           Select an SSH host and CONNECT to it",
499 #endif /* ANYSSH */
500 #ifdef NEWFTP
501 "  FTP [ OPEN ]           Make an FTP connection",
502 #endif /* NEWFTP */
503 #ifdef CKHTTP
504 "  HTTP OPEN              Make an HTTP connection",
505 #endif /* CKHTTP */
506 #endif /* NETCONN */
507
508 #ifdef NT
509 " ",
510 "To return from the terminal window to the K-95> prompt:",
511 #else
512 #ifdef OS2
513 " ",
514 "To return from the terminal window to the K/2> prompt:",
515 #else
516 " ",
517 "To return from a terminal connection to the C-Kermit prompt:",
518 #endif /* OS2 */
519 #endif /* NT */
520 #ifdef OS2
521 "  \
522 Press the key or key-combination shown after \"Command:\" in the status line",
523 "  (such as Alt-x) or type your escape character followed by the letter C.",
524 #else
525 "  Type your escape character followed by the letter C.",
526 #endif /* OS2 */
527 " ",
528 "To display your escape character:",
529 "  SHOW ESCAPE",
530 " ",
531 "To display other settings:",
532 "  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
533 #else  /* !NOLOCAL */
534 " ",
535 "To display settings:",
536 "  SHOW COMMUNICATIONS, SHOW FILE, SHOW PROTOCOL, etc.",
537 #endif /* NOLOCAL */
538 " ",
539 #ifdef OS2
540 "For a Kermit 95 tutorial, visit:",
541 "  http://www.columbia.edu/kermit/k95tutor.html",
542 " ",
543 #endif /* OS2 */
544 "For a C-Kermit tutorial, visit:",
545 "  http://www.columbia.edu/kermit/ckututor.html",
546 " ",
547 "To learn about script programming and automation:",
548 "  Read the manual, \"Using C-Kermit\".  For a brief tutorial, visit:",
549 "  http://www.columbia.edu/kermit/ckscripts.html",
550 " ",
551 "For further information about a particular command, type HELP xxx,",
552 "where xxx is the name of the command.  For documentation, news of new",
553 "releases, and information about other Kermit software, contact:",
554 " ",
555 "  The Kermit Project         E-mail: kermit@columbia.edu",
556 "  Columbia University        Web:    http://www.columbia.edu/kermit/",
557 "  612 West 115th Street      Voice:  +1 (212) 854-3703",
558 "  New York NY  10025-7799    Fax:    +1 (212) 662-6442",
559 "  USA",
560 ""
561 };
562
563 static char * hmxymatch[] = {
564 "SET MATCH { DOTFILE, FIFO } { ON, OFF }",
565 "  Tells whether wildcards should match dotfiles (files whose names begin",
566 "  with period) or UNIX FIFO special files.  MATCH FIFO default is OFF.",
567 "  MATCH DOTFILE default is OFF in UNIX, ON elsewhere.",
568 ""
569 };
570
571 #ifdef OS2
572 #ifdef KUI
573 static char * hmxygui[] = {
574 "SET GUI DIALOGS { ON, OFF }",
575 "  ON means that popups, alerts, use GUI dialogs; OFF means to use",
576 "  text-mode popups or prompts.  ON by default.",
577 " ",
578 "SET GUI FONT name size",
579 "  Chooses the font and size.  Type \"set gui font ?\" to see the list of",
580 "  choices.  The size can be a whole number or can contain a decimal point",
581 "  and a fraction (which is rounded to the nearest half point).",
582 " ",
583 "SET GUI RGBCOLOR colorname redvalue greenvalue bluevalue",
584 "  Specifies the red-green-blue mixture to be used to render the given",
585 "  color name.  Type \"set gui rgbcolor\" to see a list of colornames.",
586 "  the RGB values are whole numbers from 0 to 255.",
587 " ",
588 "SET GUI WINDOW POSITION x y",
589 "  Moves the K95 window to the given X,Y coordinates, pixels from top left.",
590 "  (Not yet implemented -- use command-line options to do this.)",
591 " ",
592 "SET GUI WINDOW RESIZE-MODE { CHANGE-DIMENSIONS, SCALE-FONT }",
593 "  Default is CHANGE-DIMENSIONS.",
594 "",
595 "SET GUI WINDOW RUN-MODE { MAXIMIZE, MINIMIZE, RESTORE }",
596 "  Changes the run mode state of the GUI window.",
597 ""
598 };
599 #endif /* KUI */
600 #endif /* OS2 */
601
602 #ifdef ANYSSH
603 static char * hmxxssh[] = {
604 #ifdef SSHBUILTIN
605 "Syntax: SSH { ADD, AGENT, CLEAR, KEY, [ OPEN ], V2 } operands...",
606 "  Performs an SSH-related action, depending on the keyword that follows:",
607 " ",
608 "SSH ADD LOCAL-PORT-FORWARD local-port host port",
609 "  Adds a port forwarding triplet to the local port forwarding list.",
610 "  The triplet specifies a local port to be forwarded and the hostname /",
611 "  ip-address and port number to which the port should be forwarded from",
612 "  the remote host.  Port forwarding is activated at connection",
613 "  establishment and continues until the connection is terminated.",
614 " ",
615 "SSH ADD REMOTE-PORT-FORWARD remote-port host port",
616 "  Adds a port forwarding triplet to the remote port forwarding list.",
617 "  The triplet specifies a remote port to be forwarded and the",
618 "  hostname/ip-address and port number to which the port should be",
619 "  forwarded from the local machine.  Port forwarding is activated at",
620 "  connection establishment and continues until the connection is",
621 "  terminated.",
622 " ",
623 "SSH AGENT ADD [ identity-file ]",
624 "  Adds the contents of the identity-file (if any) to the SSH AGENT",
625 "  private key cache.  If no identity-file is specified, all files",
626 "  specified with SET SSH IDENTITY-FILE are added to the cache.",
627 " ",
628 "SSH AGENT DELETE [ identity-file ]",
629 "  Deletes the contents of the identity-file (if any) from the SSH AGENT",
630 "  private key cache.  If no identity-file is specified, all files",
631 "  specified with SET SSH IDENTITY-FILE are deleted from the cache.",
632 " ",
633 "SSH AGENT LIST [ /FINGERPRINT ]",
634 "  Lists the contents of the SSH AGENT private key cache.  If /FINGERPRINT",
635 "  is specified, the fingerprint of the private keys are displayed instead",
636 "  of the keys.",
637 " ",
638 "SSH CLEAR LOCAL-PORT-FORWARD",
639 "  Clears the local port forwarding list.",
640 " ",
641 "SSH CLEAR REMOTE-PORT-FORWARD",
642 "  Clears the remote port forwarding list.",
643 " ",
644 "SSH KEY commands:",
645 "  The SSH KEY commands create and manage public and private key pairs",
646 "  (identities).  There are three forms of SSH keys.  Each key pair is",
647 "  stored in its own set of files:",
648 " ",
649 "   Key Type      Private Key File           Public Key File",
650 "    v1 RSA keys   \\v(appdata)ssh/identity   \\v(appdata)ssh/identity.pub",
651 "    v2 RSA keys   \\v(appdata)ssh/id_rsa     \\v(appdata)ssh/id_rsa.pub",
652 "    v2 DSA keys   \\v(appdata)ssh/id_dsa     \\v(appdata)ssh/id_dsa.pub",
653 " ",
654 "  Keys are stored using the OpenSSH keyfile format.  The private key",
655 "  files can be (optionally) protected by specifying a passphrase.  A",
656 "  passphrase is a longer version of a password.  English text provides",
657 "  no more than 2 bits of key data per character.  56-bit keys can be",
658 "  broken by a brute force attack in approximately 24 hours.  When used,",
659 "  private key files should therefore be protected by a passphrase of at",
660 "  least 40 characters (about 80 bits).",
661 " ",
662 "  To install a public key file on the host, you must transfer the file",
663 "  to the host and append it to your \"authorized_keys\" file.  The file",
664 "  permissions must be 600 (or equivalent).",
665 " ",
666 "SSH KEY CHANGE-PASSPHRASE [ /NEW-PASSPHRASE:passphrase",
667 "      /OLD-PASSPHRASE:passphrase ] filename",
668 "  This re-encrypts the specified private key file with a new passphrase.",
669 "  The old passphrase is required.  If the passphrases (and filename) are",
670 "  not provided Kermit prompts your for them.",
671 " ",
672 "SSH KEY CREATE [ /BITS:bits /PASSPHRASE:passphrase",
673 "    /TYPE:{ V1-RSA, V2-DSA, V2-RSA } /V1-RSA-COMMENT:comment ] filename",
674 "  This command creates a new private/public key pair.  The defaults are:",
675 "  BITS:1024 and TYPE:V2-RSA.  The filename is the name of the private",
676 "  key file.  The public key is created with the same name with .pub",
677 "  appended to it.  If a filename is not specified Kermit prompts you for",
678 "  it.  V1 RSA key files may have an optional comment, which is ignored",
679 "  for other key types.",
680 " ",
681 "SSH KEY DISPLAY [ /FORMAT:{FINGERPRINT,IETF,OPENSSH,SSH.COM} ] filename",
682 "  This command displays the contents of a public or private key file.",
683 "  The default format is OPENSSH.",
684 " ",
685 "SSH KEY V1 SET-COMMENT filename comment",
686 "  This command replaces the comment associated with a V1 RSA key file.",
687 " ",
688 "SSH [ OPEN ] host [ port ] [ /COMMAND:command /USER:username",
689 "      /PASSWORD:pwd /VERSION:{ 1, 2 } /X11-FORWARDING:{ ON, OFF } ]",
690 "  This command establishes a new connection using SSH version 1 or",
691 "  version 2 protocol.  The connection is made to the specified host on",
692 "  the SSH port (you can override the port by including a port name or",
693 "  number after the host name).  Once the connection is established the",
694 "  authentication negotiations begin.  If the authentication is accepted,",
695 "  the local and remote port forwarding lists are used to establish the",
696 "  desired connections.  If X11 Forwarding is active, this results in a",
697 "  remote port forwarding between the X11 clients on the remote host and",
698 "  X11 Server on the local machine.  If a /COMMAND is provided, the",
699 "  command is executed on the remote host in place of your default shell.",
700 " ",
701 "  An example of a /COMMAND to execute C-Kermit in SERVER mode is:",
702 "     SSH OPEN hostname /COMMAND:{kermit -x -l 0}",
703 " ",
704 "SSH V2 REKEY",
705 "  Requests that an existing SSH V2 connection generate new session keys.",
706 #else  /* SSHBUILTIN */
707 "Syntax: SSH [ options ] <hostname> [ command ]",
708 "  Makes an SSH connection using the external ssh program via the SET SSH",
709 "  COMMAND string, which is \"ssh -e none\" by default.  Options for the",
710 "  external ssh program may be included.  If the hostname is followed by a",
711 "  command, the command is executed on the host instead of an interactive",
712 "  shell.",
713 #endif /* SSHBUILTIN */
714 ""
715 };
716
717 static char *hmxyssh[] = {
718 #ifdef SSHBUILTIN
719 "SET SSH AGENT-FORWARDING { ON, OFF }",
720 "  If an authentication agent is in use, setting this value to ON",
721 "  results in the connection to the agent being forwarded to the remote",
722 "  computer.  The default is OFF.",
723 " ",
724 "SET SSH CHECK-HOST-IP { ON, OFF }",
725 "  Specifies whether the remote host's ip-address should be checked",
726 "  against the matching host key in the known_hosts file.  This can be",
727 "  used to determine if the host key changed as a result of DNS spoofing.",
728 "  The default is ON.",
729 " ",
730 "SET SSH COMPRESSION { ON, OFF }",
731 "  Specifies whether compression will be used.  The default is ON.",
732 " ",
733 "SET SSH DYNAMIC-FORWARDING { ON, OFF }",
734 "  Specifies whether Kermit is to act as a SOCKS4 service on port 1080",
735 "  when connected to a remote host via SSH.  When Kermit acts as a SOCKS4",
736 "  service, it accepts connection requests and forwards the connections",
737 "  through the remote host.  The default is OFF.",
738 " ",
739 "SET SSH GATEWAY-PORTS { ON, OFF }",
740 "  Specifies whether Kermit should act as a gateway for forwarded",
741 "  connections received from the remote host.  The default is OFF.",
742 " ",
743 "SET SSH GSSAPI DELEGATE-CREDENTIALS { ON, OFF }",
744 "  Specifies whether Kermit should delegate GSSAPI credentials to ",
745 "  the remote host after authentication.  Delegating credentials allows",
746 "  the credentials to be used from the remote host.  The default is OFF.",
747 " ",
748 "SET SSH HEARTBEAT-INTERVAL <seconds>",
749 "  Specifies a number of seconds of idle time after which an IGNORE",
750 "  message will be sent to the server.  This pulse is useful for",
751 "  maintaining connections through HTTP Proxy servers and Network",
752 "  Address Translators.  The default is OFF (0 seconds).",
753 " ",
754 "SET SSH IDENTITY-FILE filename [ filename [ ... ] ]",
755 "  Specifies one or more files from which the user's authorization",
756 "  identities (private keys) are to be read when using public key",
757 "  authorization.  These are files used in addition to the default files:",
758 " ",
759 "    \\v(appdata)ssh/identity      V1 RSA",
760 "    \\v(appdata)ssh/id_rsa        V2 RSA",
761 "    \\v(appdata)ssh/id_dsa        V2 DSA",
762 " ",
763 "SET SSH KERBEROS4 TGT-PASSING { ON, OFF }",
764 "  Specifies whether Kermit should forward Kerberos 4 TGTs to the host.",
765 "  The default is OFF.",
766 " ",
767 "SET SSH KERBEROS5 TGT-PASSING { ON, OFF }",
768 "  Specifies whether Kermit should forward Kerberos 5 TGTs to to the",
769 "  host.  The default is OFF.",
770 " ",
771 "SET SSH PRIVILEGED-PORT { ON, OFF }",
772 "  Specifies whether a privileged port (less than 1024) should be used",
773 "  when connecting to the host.  Privileged ports are not required except",
774 "  when using SSH V1 with Rhosts or RhostsRSA authorization.  The default",
775 "  is OFF.",
776 " ",
777 "SET SSH QUIET { ON, OFF }",
778 "  Specifies whether all messages generated in conjunction with SSH",
779 "  protocols should be suppressed.  The default is OFF.",
780 " ",
781 "SET SSH STRICT-HOST-KEY-CHECK { ASK, ON, OFF }",
782 "  Specifies how Kermit should behave if the the host key check fails.",
783 "  When strict host key checking is OFF, the new host key is added to the",
784 "  protocol-version-specific user-known-hosts-file.  When strict host key",
785 "  checking is ON, the new host key is refused and the connection is",
786 "  dropped.  When set to ASK, Kermit prompt you to say whether the new",
787 "  host key should be accepted.  The default is ASK.",
788 " ",
789 "  Strict host key checking protects you against Trojan horse attacks.",
790 "  It depends on you to maintain the contents of the known-hosts-file",
791 "  with current and trusted host keys.",
792 " ",
793 "SET SSH USE-OPENSSH-CONFIG { ON, OFF }",
794 "  Specifies whether Kermit should parse an OpenSSH configuration file",
795 "  after applying Kermit's SET SSH commands.  The configuration file",
796 "  would be located at \\v(home)ssh/ssh_config.  The default is OFF.",
797 " ",
798 "SET SSH V1 CIPHER { 3DES, BLOWFISH, DES }",
799 "  Specifies which cipher should be used to protect SSH version 1",
800 "  connections.  The default is 3DES.",
801 " ",
802 "SET SSH V1 GLOBAL-KNOWN-HOSTS-FILE filename",
803 "  Specifies the location of the system-wide known-hosts file.  The",
804 "  default is:",
805 " ",
806 "    \v(common)ssh_known_hosts",
807 " ",
808 "SET SSH V1 USER-KNOWN-HOSTS-FILE filename",
809 "  Specifies the location of the user-known-hosts-file.  The default",
810 "  location is:",
811 " ",
812 "    \\v(appdata)ssh/known_hosts",
813 " ",
814 "SET SSH V2 AUTHENTICATION { EXTERNAL-KEYX, GSSAPI, HOSTBASED, ",
815 "    KEYBOARD-INTERACTIVE, PASSWORD, PUBKEY, SRP-GEX-SHA1 } [ ... ]",
816 "  Specifies an ordered list of SSH version 2 authentication methods to",
817 "  be used when connecting to the remote host.  The default list is:",
818 " ",
819 "    external-keyx gssapi hostbased publickey srp-gex-sha1 publickey",
820 "    keyboard-interactive password none",
821 " ",
822 "SET SSH V2 AUTO-REKEY { ON, OFF }",
823 "  Specifies whether Kermit automatically issues rekeying requests",
824 "  once an hour when SSH version 2 in in use.  The default is ON.",
825 " ",
826 "SET SSH V2 CIPHERS { 3DES-CBC, AES128-CBC AES192-CBC AES256-CBC",
827 "     ARCFOUR BLOWFISH-CBC CAST128-CBC RIJNDAEL128-CBC RIJNDAEL192-CBC",
828 "     RIJNDAEL256-CBC }",
829 "  Specifies an ordered list of SSH version ciphers to be used to encrypt",
830 "  the established connection.  The default list is:",
831 " ",
832 "    aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour aes192-cbc",
833 "    aes256-cbc",
834 " ",
835 "  \"rijndael\" is an alias for \"aes\".",
836 " ",
837 "SET SSH V2 GLOBAL-KNOWN-HOSTS-FILE filename",
838 "  Specifies the location of the system-wide known-hosts file.  The default",
839 "  location is:",
840 " ",
841 "    \\v(common)ssh/known_hosts2",
842 " ",
843 "SET SSH V2 HOSTKEY-ALGORITHMS { SSH-DSS, SSH-RSA }",
844 "  Specifies an ordered list of hostkey algorithms to be used to verify",
845 "  the identity of the host.  The default list is",
846 " ",
847 "    ssh-rsa ssh-dss",
848 " ",
849 "SET SSH V2 MACS { HMAC-MD5 HMAC-MD5-96 HMAC-RIPEMD160 HMAC-SHA1",
850 "     HMAC-SHA1-96 }",
851 "  Specifies an ordered list of Message Authentication Code algorithms to",
852 "  be used for integrity  protection of the established connection.  The",
853 "  default list is:",
854 " ",
855 "    hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 hmac-md5-96",
856 " ",
857 "SET SSH V2 USER-KNOWN-HOSTS-FILE filename",
858 "  Specifies the location of the user-known-hosts file.  The default",
859 "  location is:",
860 " ",
861 "    \\v(appdata)ssh/known_hosts2",
862 " ",
863 "SET SSH VERBOSE level",
864 "  Specifies how many messages should be generated by the OpenSSH engine.",
865 "  The level can range from 0 to 7.  The default value is 2.",
866 " ",
867 "SET SSH VERSION { 1, 2, AUTOMATIC }",
868 "  Specifies which SSH version should be negotiated.  The default is",
869 "  AUTOMATIC which means use version 2 if supported; otherwise to fall",
870 "  back to version 1.",
871 " ",
872 "SET SSH X11-FORWARDING { ON, OFF }",
873 "  Specifies whether X Windows System Data is to be forwarded across the",
874 "  established SSH connection.  The default is OFF.  When ON, the DISPLAY",
875 "  value is either set using the SET TELNET ENV DISPLAY command or read",
876 "  from the DISPLAY environment variable.",
877 " ",
878 "SET SSH XAUTH-LOCATION filename",
879 "  Specifies the location of the xauth executable (if provided with the",
880 "  X11 Server software.)",
881 #else  /* SSHBUILTIN */
882 "Syntax: SET SSH COMMAND command",
883 "  Specifies the external command to be used to make an SSH connection.",
884 "  By default it is \"ssh -e none\" (ssh with no escape character).",
885 #endif /* SSHBUILTIN */
886 ""
887 };
888 #endif /* ANYSSH */
889
890 #ifdef NEWFTP
891 static char *hmxygpr[] = {
892 "Syntax: SET GET-PUT-REMOTE { AUTO, FTP, KERMIT}",
893 "  Tells Kermit whether GET, PUT, and REMOTE commands should be directed",
894 "  at a Kermit server or an FTP server.  The default is AUTO, meaning that",
895 "  if you have only one active connection, the appropriate action is taken",
896 "  when you give a GET, PUT, or REMOTE command.  SET GET-PUT-REMOTE FTP forces"
897 ,
898 "  Kermit to treat GET, PUT, and REMOTE as FTP client commands; setting this",
899 "  to KERMIT forces these commands to be treated as Kermit client commands.",
900 "  NOTE: PUT includes SEND, MPUT, MSEND, and all other similar commands.",
901 "  Also see HELP REMOTE, HELP SET LOCUS, HELP FTP.",
902 ""
903 };
904 #endif /* NEWFTP */
905
906 #ifdef LOCUS
907 static char *hmxylocus[] = {
908 #ifdef KUI
909 "Syntax: SET LOCUS { ASK, AUTO, LOCAL, REMOTE }",
910 #else
911 "Syntax: SET LOCUS { AUTO, LOCAL, REMOTE }",
912 #endif /* KUI */
913 "  Specifies whether unprefixed file management commands should operate",
914 "  locally or (when there is a connection to a remote FTP or Kermit",
915 "  server) sent to the server.  The affected commands are: CD (CWD), PWD,",
916 "  CDUP, DIRECTORY, DELETE, RENAME, MKDIR, and RMDIR.  To force any of",
917 "  these commands to be executed locally, give it an L-prefix: LCD, LDIR,",
918 "  etc.  To force remote execution, use the R-prefix: RCD, RDIR, and so",
919 "  on.  SHOW COMMAND shows the current Locus.",
920 " ",
921 "  By default, the Locus for file management commands is switched",
922 "  automatically whenever you make or close a connection: if you make an",
923 "  FTP connection, the Locus becomes REMOTE; if you close an FTP connection",
924 "  or make any other kind of connection, the Locus becomes LOCAL.",
925 #ifdef KUI
926 " ",
927 "  There are two kinds of automatic switching: ASK (the default) which",
928 "  asks you if it's OK to switch, and AUTO, which switches without asking.",
929 #endif /* KUI */
930 " ",
931 "  If you give a SET LOCUS LOCAL or SET LOCUS REMOTE command, this sets",
932 "  the locus as indicated and disables automatic switching.",
933 #ifdef KUI
934 "  SET LOCUS AUTO or SET LOCUS ASK restores automatic switching.",
935 "  You can also change Locus switching and behavior in the Actions menu.",
936 #else
937 "  SET LOCUS AUTO restores automatic switching.",
938 #endif /* KUI */
939 "",
940 };
941 #endif /* LOCUS */
942
943 static char *hmxxtak[] = {
944 "Syntax: TAKE filename [ arguments ]",
945 "  Tells Kermit to execute commands from the named file.  Optional argument",
946 "  words, are automatically assigned to the macro argument variables \\%1",
947 "  through \\%9.  Kermit command files may themselves contain TAKE commands,",
948 "  up to any reasonable depth of nesting.",
949 ""
950 };
951
952 #ifdef TCPSOCKET
953 static char *hmxxfirew[] = {
954 #ifdef OS2
955 "Firewall Traversal in Kermit 95",
956 #else
957 "Firewall Traversal in C-Kermit",
958 #endif
959 " ",
960 #ifndef NEWFTP
961 #ifndef CKHTTP
962 #ifndef CK_SOCKS
963 #define NOFIREWALL
964 #endif
965 #endif
966 #endif
967 #ifdef NOFIREWALL
968 "This version of Kermit was built with no support for firewall traversal",
969 "protocols.  Kermit can be built with support for HTTP Proxy Servers,",
970 "SOCKS authorized firewall traversal, and FTP Passive connection modes.",
971 " ",
972 #else /* NOFIREWALL */
973 #ifdef CKHTTP
974 "The simplist form of firewall traversal is the HTTP CONNECT command. The",
975 "CONNECT command was implemented to allow a public web server which usually",
976 "resides on the boundary between the public and private networks to forward",
977 "HTTP requests from clients on the private network to public web sites.  To",
978 "allow secure web connections, the HTTP CONNECT command authenticates the",
979 "client with a username/password and then establishes a tunnel to the",
980 "desired host.",
981
982 " ",
983
984 "Web servers that support the CONNECT command can be configured to allow",
985 "outbound connections for authenticated users to any TCP/IP hostname-port",
986 "combination accessible to the Web server.  HTTP CONNECT can be used only",
987 "with TCP-based protocols.  Protocols such as Kerberos authentication that",
988 "use UDP/IP cannot be tunneled using HTTP CONNECT.",
989
990 " ",
991
992 "SET TCP HTTP-PROXY [switches] [<hostname or ip-address>[:<port>]]",
993 "  If a hostname or ip-address is specified, Kermit uses the given",
994 "  proxy server when attempting outgoing TCP connections.  If no hostnamer",
995 "  or ip-address is specified, any previously specified Proxy server is",
996 "  removed.  If no port number is specified, the \"http\" service is used.",
997 "  [switches] can be one or more of:",
998 "     /AGENT:<agent> /USER:<user> /PASSWORD:<password>",
999 "  Switch parameters are used when connecting to the proxy server and",
1000 "  override any other values associated with the connection.",
1001 " ",
1002
1003 #endif /* CKHTTP */
1004 #ifdef CK_SOCKS
1005
1006 "In the early 1990s as firewalls were becoming prevalent, David Koblas",
1007 "developed the SOCKS protocol for TCP/IP firewall traversal.  Two versions",
1008 "of SOCKS are currently in use: Version 4.2 lets TCP/IP client applications",
1009 "traverse firewalls, similar to HTTP CONNECT, except that the SOCKS client",
1010 "is aware of the public source IP address and port, which can be used within",
1011 "the application protocol to assist in securing the connection (e.g. FTP",
1012 "sessions secured with GSSAPI Kerberos 5).",
1013
1014 " ",
1015
1016 "In 1995 the IETF issued SOCKS Protocol Version 5 (RFC 1928), which is",
1017 "significantly more general than version 4.  Besides supporting client-",
1018 "to-server TCP/IP connections, it also includes:",
1019
1020 " ",
1021 " . Authenticated firewall traversal of UDP/IP packets.",
1022 " . Authenticated binding of incoming public ports on the firewall.",
1023 " ",
1024
1025 "This lets a service on the private network offer public services.  It also",
1026 "lets client applications like FTP establish a temporary public presence",
1027 "that can be used by the FTP server to create a data channel.  By allowing",
1028 "the client to bind to a public port on the firewall and be aware of the",
1029 "public address, SOCKS 5 lets the application protocol communicate this",
1030 "information to the server.",
1031
1032 " ",
1033
1034 #ifdef OS2
1035 #ifdef NT
1036 "Kermit 95 supports SOCKS 4.2.  The SOCKS Server is specified with:",
1037 " ",
1038 "  SET TCP SOCKS-SERVER hostname/ip-address",
1039 " ",
1040 "The SOCKS.CONF file is found by examining the ETC environment variable;",
1041 "searching in \\WINDOWS on Windows 95/98/ME; or the",
1042 "\\WINDOWS\\SYSTEM\\DRIVERS\\ETC directory on NT\\2000\\XP systems.",
1043
1044 #else /* NT */
1045
1046 "Kermit/2 provides support for SOCKS 4.2 servers when using IBM TCP/IP 2.0,",
1047 "IBM OS/2 WARP, or a compatible protocol stack. SOCKS is one popular means",
1048 "of implementing a firewall between a private network and the Internet.",
1049 " ",
1050 "Kermit/2 shares the same SOCKS environment variables as IBM Gopher. It also",
1051 "supports the use of local SOCKS configuration files.",
1052 " ",
1053 "To specify the default SOCKS Server, add SET SOCKS_SERVER= to your",
1054 "CONFIG.SYS file.",
1055 " ",
1056 "If you must use a SOCKS Distributed Name Server, add SET SOCKS_NS= to your",
1057 "CONFIG.SYS file.",
1058 " ",
1059
1060 "If you must use a specific with your SOCKS server, be sure to add SET USER=",
1061 "to your CONFIG.SYS file. Otherwise, \"os2user\" is used by default.",
1062
1063 " ",
1064
1065 "The SOCKS configuration file must be placed in the directory pointed to by",
1066 "the ETC environment variable as declared in your CONFIG.SYS file. The name",
1067 "should be SOCKS.CONF. On a FAT file system, use SOCKS.CNF.",
1068
1069 " ",
1070 "The format of the lines in the SOCKS configuration file are as follows:",
1071 " ",
1072 " . # comments",
1073 " . deny [*=userlist] dst_addr dst_mask [op port]",
1074 " . direct [*=userlist] dst_addr dst_mask [op port]",
1075 " . sockd [@=serverlist] [*=userlist] dst_addr dst_mask [op port]",
1076 " ",
1077
1078 "op must be one of 'eq', 'neq', 'lt', 'gt', 'le', or 'ge'. dst_addr,",
1079 "dst_mask, and port may be either numeric or name equivalents.",
1080
1081 " ",
1082
1083 "Kermit/2 ignores the [*=userlist] and [@=serverlist] fields. Matches are",
1084 "determined on a first match not a best match basis. Addresses for which no",
1085 "match is found default to \"sockd\".",
1086
1087 " ",
1088
1089 "For completeness: Fields in square brackets are optional. The optional",
1090 "@=serverlist field with a 'sockd' line specifies the list of SOCKS servers",
1091 "the client should try (in the given order) instead of the default SOCKS",
1092 "server. If the @=serverlist part is omitted, then the default SOCKS server",
1093 "is used.  Commas are used in the userlist and serverlist as separators, no",
1094 "white spaces are allowed.",
1095
1096 #endif /* NT */
1097
1098 " ",
1099
1100 #else /* OS2 */
1101 #ifdef CK_SOCKS5
1102 "This version of C-Kermit supports SOCKS version 5.",
1103 #else /* CK_SOCKS5 */
1104 "This version of C-Kermit supports SOCKS version 4.",
1105 #endif /* CK_SOCKS5 */
1106
1107 "See the man page (or other system documentation) for information on",
1108 "configuring the SOCKS library via the /etc/socks.conf file.",
1109
1110 #endif /* OS2 */
1111 " ",
1112 #endif /* CK_SOCKS */
1113
1114 #ifdef NEWFTP
1115
1116 "FTP is one of the few well-known Internet services that requires",
1117 "multiple connections.  As described above, FTP originally required the",
1118 "server to establish the data connection to the client using a destination",
1119 "address and port provided by the client.  This doesn't work with port",
1120 "filtering firewalls.",
1121
1122 " ",
1123
1124 "Later, FTP protocol added a \"passive\" mode, in which connections for",
1125 "the data channels are created in the reverse direction.  Instead of the",
1126 "server establishing a connection to the client, the client makes a second",
1127 "connection with the server as the destination.  This works just fine as",
1128 "long as the client is behind the firewall and the server is in public",
1129 "address space.  If the server is behind a firewall then the traditional",
1130 "active mode must be used.  If both the client and server are behind their",
1131 "own port filtering firewalls then data channels cannot be established.",
1132
1133 " ",
1134
1135 "In Kermit's FTP client, passive mode is controlled with the command:",
1136
1137 " ",
1138 "  SET FTP PASSIVE-MODE { ON, OFF }",
1139 " ",
1140
1141 "The default is ON, meaning to use passive mode.",
1142
1143 #endif /* NEWFTP */
1144 #endif /* NOFIREWALL */
1145
1146 ""
1147 };
1148 #endif /* TCPSOCKET */
1149
1150 static char *hmxxsave[] = {
1151 "Syntax: SAVE item filename { NEW, APPEND }",
1152 "  Saves the requested material in the given file.  A new file is created",
1153 "  by default; include APPEND at the end of the command to append to an",
1154 "  existing file.  Items:",
1155 #ifndef NOSETKEY
1156 "    KEYMAP               Saves the current key settings.",
1157 #endif /* NOSETKEY */
1158 #ifdef CK_RECALL
1159 "    COMMAND HISTORY      Saves the current command recall (history) buffer",
1160 #endif /* CK_RECALL */
1161 #ifdef OS2
1162 "    COMMAND SCROLLBACK   Saves the current command-screen scrollback buffer",
1163 "    TERMINAL SCROLLBACK  Saves the current terminal-screen scrollback buffer",
1164 #endif /* OS2 */
1165 ""
1166 };
1167
1168 #ifdef CKROOT
1169 static char *hmxxchroot[] = {
1170 "Syntax: SET ROOT directoryname",
1171 "  Sets the root for file access to the given directory and disables access",
1172 "  to system and shell commands and external programs.  Once this command",
1173 "  is given, no files or directories outside the tree rooted by the given",
1174 "  directory can be opened, read, listed, deleted, renamed, or accessed in",
1175 "  any other way.  This command can not be undone by a subsequent SET ROOT",
1176 "  command.  Primarily for use with server mode, to restrict access of",
1177 "  clients to a particular directory tree.  Synonym: CHROOT.",
1178 ""
1179 };
1180 #endif /* CKROOT */
1181
1182 static char *hmxxscrn[] = {
1183 "Syntax: SCREEN { CLEAR, CLEOL, MOVE row column }",
1184 #ifdef OS2
1185 "  Performs screen-formatting actions.",
1186 #else
1187 "  Performs screen-formatting actions.  Correct operation of these commands",
1188 "  depends on proper terminal setup on both ends of the connection -- mainly",
1189 "  that the host terminal type is set to agree with the kind of terminal or",
1190 "  the emulation you are viewing C-Kermit through.",
1191 #endif /* OS2 */
1192 " ",
1193 "SCREEN CLEAR",
1194 "  Moves the cursor to home position and clears the entire screen.",
1195 #ifdef OS2
1196 "  Synonyms: CLS, CLEAR SCREEN, CLEAR COMMAND-SCREEN ALL",
1197 #else
1198 "  Synonyms: CLS, CLEAR SCREEN.",
1199 #endif /* OS2 */
1200 " ",
1201 "SCREEN CLEOL",
1202 "  Clears from the current cursor position to the end of the line.",
1203 #ifdef OS2
1204 "  Synonym: CLEAR COMMAND-SCREEN EOL",
1205 #endif /* OS2 */
1206 " ",
1207 "SCREEN MOVE row column",
1208 "  Moves the cursor to the indicated row and column.  The row and column",
1209 "  numbers are 1-based so on a 24x80 screen, the home position is 1 1 and",
1210 "  the lower right corner is 24 80.  If a row or column number is given that",
1211 "  too large for what Kermit or the operating system thinks is your screen",
1212 "  size, the appropriate number is substituted.",
1213 " ",
1214 "Also see:",
1215 #ifdef OS2
1216 "  HELP FUNCTION SCRNCURX, HELP FUNCTION SCRNCURY, HELP FUNCTION SCRSTR,",
1217 #endif /* OS2 */
1218 "  SHOW VARIABLE TERMINAL, SHOW VARIABLE COLS, SHOW VAR ROWS, SHOW COMMAND.",
1219 ""
1220 };
1221
1222 #ifndef NOSPL
1223 static char *hmfword[] = {
1224 "\\fword(s1,n1,s2,s3,n2,n3) - Extract word from string.",
1225 "    s1 = source string",
1226 "    n1 = word number (1-based)",
1227 "    s2 = optional break set.",
1228 "    s3 = optional include set.",
1229 "    n2 = optional grouping mask.",
1230 "    n3 = optional separator flag:",
1231 "       0 = collapse adjacent separators",
1232 "       1 = don't collapse adjacent separators.",
1233 " ",
1234 "  Default break set is all characters except ASCII letters and digits.",
1235 "  ASCII (C0) control characters are always treated as break characters.",
1236 "  Default include set is null.",
1237 " ",
1238 "  If grouping mask given and nonzero, words can be grouped by quotes or",
1239 "  brackets selected by the sum of the following:",
1240 " ",
1241 "     1 = doublequotes:    \"a b c\"",
1242 "     2 = braces:          {a b c}",
1243 "     4 = apostrophes:     'a b c'",
1244 "     8 = parentheses:     (a b c)",
1245 "    16 = square brackets: [a b c]",
1246 "    32 = angle brackets:  <a b c>",
1247 " ",
1248 "  Nesting is possible with {}()[]<> but not with quotes or apostrophes.",
1249 " ",
1250 "Returns string:",
1251 "  Word number n, if there is one, otherwise an empty string.",
1252 ""
1253 };
1254
1255 static char *hmxxprompt[] = {
1256 "Syntax: PROMPT [ text ]",
1257 "  Enters interactive command level from within a script in such a way that",
1258 "  the script can be continued with an END or RETURN command.  STOP, EXIT,",
1259 "  SHOW STACK, TRACE, and Ctrl-C all have their normal effects.  The PROMPT",
1260 "  command allows variables to be examined or changed, or any other commands",
1261 "  to be given, in any number, prior to returning to the script, allowing",
1262 "  Kermit to serve as its own debugger; adding the PROMPT command to a script",
1263 "  is like setting a breakpoint.  If the optional text is included, it is",
1264 "  used as the new prompt for this level, e.g. \"prompt Breakpoint_1>\".",
1265 ""
1266 };
1267
1268 static char *hxxinp[] = {
1269 "Syntax:  INPUT [ /NOMATCH ] { number-of-seconds, time-of-day } [ text ]",
1270 "Example: INPUT 5 Login:  or  INPUT 23:59:59 RING",
1271 "  Waits up to the given number of seconds, or until the given time of day,",
1272 "  for the given text to arrive on the connection.  If no text is given,",
1273 "  INPUT waits for any character.  If the /NOMATCH switch is included, INPUT",
1274 "  does not attempt to match any characters, but continues reading from the",
1275 "  communication connection until the timeout interval expires.  If the",
1276 "  timeout interval is 0, the INPUT command does not wait; i.e. the given",
1277 "  text must already be available for reading for the INPUT command to",
1278 "  succeed.  If the interval is negative, the INPUT command waits forever.",
1279 "  For use in script programs with IF FAILURE and IF SUCCESS.  Also see",
1280 "  MINPUT, REINPUT, SET INPUT.  See HELP PAUSE for details on time-of-day",
1281 "  format.  The text, if given, can be a \\pattern() invocation, in which",
1282 "  case it is treated as a pattern rather than a literal string (HELP",
1283 "  PATTERNS for details).",
1284 ""};
1285
1286 static char *hxxout[] = {
1287 "Syntax: OUTPUT text",
1288 "  Sends the text out the communications connection, as if you had typed it",
1289 "  during CONNECT mode.  The text may contain backslash codes, variables,",
1290 "  etc, plus the following special codes:",
1291 " ",
1292 "    \\N - Send a NUL (ASCII 0) character (you can't use \\0 for this).",
1293 "    \\B - Send a BREAK signal.",
1294 "    \\L - Send a Long BREAK signal.",
1295 " ",
1296 "Also see SET OUTPUT.",
1297 "" };
1298 #endif /* NOSPL */
1299
1300 static char *hxypari[] = {
1301 "SET PARITY NONE",
1302 "  Chooses 8 data bits and no parity.",
1303 " ",
1304 "SET PARITY { EVEN, ODD, MARK, SPACE }",
1305 "  Chooses 7 data bits plus the indicated kind of parity.",
1306 "  Forces 8th-bit prefixing during file transfer.",
1307 " ",
1308 #ifdef HWPARITY
1309 "SET PARITY HARDWARE { EVEN, ODD }",
1310 "  Chooses 8 data bits plus the indicated kind of parity.",
1311 " ",
1312 "Also see SET TERMINAL BYTESIZE, SET SERIAL, and SET STOP-BITS.",
1313 #else
1314 "Also see SET TERMINAL BYTESIZE and SET SERIAL.",
1315 #endif /* HWPARITY */
1316 ""};
1317
1318 #ifndef NOLOCAL
1319 static char *hxyesc[] = {
1320 #ifdef OS2
1321 "Syntax: SET ESCAPE number",
1322 "  Decimal ASCII value for escape character during CONNECT, normally 29",
1323 "  (Control-]).  Type the escape character followed by C to get back to the",
1324 "  C-Kermit prompt or followed by ? to see other options, or use the \\Kexit",
1325 "  keyboard verb, normally assigned to Alt-x.",
1326 #else
1327 #ifdef NEXT
1328 "Syntax: SET ESCAPE number",
1329 "  Decimal ASCII value for escape character during CONNECT, normally 29",
1330 "  (Control-]).  Type the escape character followed by C to get back to the",
1331 "  C-Kermit prompt or followed by ? to see other options.",
1332 #else
1333 "Syntax: SET ESCAPE number",
1334 "  Decimal ASCII value for escape character during CONNECT, normally 28",
1335 "  (Control-\\).  Type the escape character followed by C to get back to the",
1336 "  C-Kermit prompt or followed by ? to see other options.",
1337 #endif /* NEXT */
1338 #endif /* OS2 */
1339 " ",
1340 "You may also enter the escape character as ^X (circumflex followed by a",
1341 "letter or one of: @, ^, _, [, \\, or ], to indicate a control character;",
1342 "for example, SET ESC ^_ sets your escape character to Ctrl-Underscore.",
1343 " ",
1344 "You can also specify an 8-bit character (128-255) as your escape character,",
1345 "either by typing it literally or by entering its numeric code.",
1346 "" };
1347 #endif /* NOLOCAL */
1348
1349 #ifndef NOSPL
1350 static char *hxyout[] = {
1351 "SET OUTPUT PACING <number>",
1352 "  How many milliseconds to pause after sending each OUTPUT character,",
1353 "  normally 0.",
1354 " ",
1355 "SET OUTPUT SPECIAL-ESCAPES { ON, OFF }",
1356 "  Whether to process the special OUTPUT-only escapes \\B, \\L, and \\N.",
1357 "  Normally ON (they are processed).",
1358 "" };
1359
1360 static char *hxyinp[] = {
1361 "Syntax: SET INPUT parameter value",
1362 " ",
1363 #ifdef CK_AUTODL
1364 "SET INPUT AUTODOWNLOAD { ON, OFF }",
1365 "  Controls whether autodownloads are allowed during INPUT command execution.",
1366 " ",
1367 #endif /* CK_AUTODL */
1368 "SET INPUT BUFFER-LENGTH number-of-bytes",
1369 "  Removes the old INPUT buffer and creates a new one with the given length.",
1370 " ",
1371 "SET INPUT CANCELLATION { ON, OFF }",
1372 "  Whether an INPUT in progress can be can interrupted from the keyboard.",
1373 " ",
1374 "SET INPUT CASE { IGNORE, OBSERVE }",
1375 "  Tells whether alphabetic case is to be significant in string comparisons.",
1376 "  This setting is local to the current macro or command file, and is",
1377 "  inherited by subordinate macros and take files.",
1378 " ",
1379 "SET INPUT ECHO { ON, OFF }",
1380 "  Tells whether to display arriving characters read by INPUT on the screen.",
1381 " ",
1382 #ifdef CKFLOAT
1383 "SET INPUT SCALE-FACTOR <number>",
1384 "  A number to multiply all INPUT timeouts by, which may include a fractional",
1385 "  part, e.g. 2.5.  All INPUT commands that specify a timeout in seconds",
1386 "  (as opposed to a specific time of day) have their time limit adjusted",
1387 "  automatically by this factor, which is also available in the built-in",
1388 "  read-only variable \\v(inscale).  The default value is 1.0.",
1389 " ",
1390
1391 #endif  /* CKFLOAT */
1392
1393 "SET INPUT SILENCE <number>",
1394 "  The maximum number to seconds of silence (no input at all) before the",
1395 "  INPUT command times out, 0 for no maximum.",
1396 " ",
1397 #ifdef OS2
1398 "SET INPUT TERMINAL { ON, OFF }",
1399 "  Determines whether the data received during an INPUT command is displayed",
1400 "  in the terminal window.  Default is ON.",
1401 " ",
1402 #endif /* OS2 */
1403 "SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }",
1404 "  Tells whether to proceed or quit from a script program if an INPUT command",
1405 "  fails.  PROCEED (default) allows use of IF SUCCESS / IF FAILURE commands.",
1406 "  This setting is local to the current macro or command file, and is",
1407 "  inherited by subordinate macros and take files.",
1408 "" };
1409
1410 static char *hxyfunc[] = {
1411 "SET FUNCTION DIAGNOSTICS { ON, OFF }",
1412 "  Whether to issue diagnostic messages for illegal function calls and",
1413 "  references to nonexistent built-in variables.  ON by default.",
1414 " ",
1415 "SET FUNCTION ERROR { ON, OFF }",
1416 "  Whether an illegal function call or reference to a nonexistent built-in",
1417 "  variable should cause a command to fail.  OFF by default.",
1418 "" };
1419 #endif /* NOSPL */
1420
1421 static char *hxyxyz[] = {
1422 #ifdef CK_XYZ
1423 #ifdef XYZ_INTERNAL
1424
1425 /* This is for built-in protocols */
1426
1427 "Syntax: SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 [ s3 ] ]",
1428 "  Selects protocol to use for transferring files.  String s1 is a command to",
1429 "  send to the remote host prior to SENDing files with this protocol in",
1430 "  binary mode; string s2 is the same thing but for text mode.  Use \"%\" in",
1431 "  any of these strings to represent the filename(s).  If the protocol is",
1432 "  KERMIT, you may also specify a string s3, the command to start a Kermit",
1433 "  server on the remote host when you give a GET, REGET, REMOTE, or other",
1434 "  client command.  Use { braces } if any command contains spaces.  Examples:",
1435 " ",
1436 "    set proto xmodem {rx %s} {rx -a %s}",
1437 "    set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
1438
1439 #else /* This is for when non-Kermit protocols are external */
1440
1441 "Syntax: \
1442 SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 s3 s4 s5 s6 ]",
1443 "  Selects protocol to use for transferring files.  s1 and s2 are commands to",
1444 "  output prior to SENDing with this protocol, to automatically start the",
1445 "  RECEIVE process on the other end in binary or text mode, respectively.",
1446 "  If the protocol is KERMIT, s3 is the command to start a Kermit server on",
1447 "  the remote computer, and there are no s4-s6 commands.  Otherwise, s3 and",
1448 "  s4 are commands used on this computer for sending files with this protocol",
1449 "  in binary or text mode, respectively; s5 and s6 are the commands for",
1450 "  receiving files with this protocol.  Use \"%s\" in any of these strings",
1451 "  to represent the filename(s).  Use { braces } if any command contains",
1452 "  spaces.  Examples:",
1453 " ",
1454 "    set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
1455 "    set proto ymodem rb {rb -a} {sb %s} {sb -a %s} rb rb",
1456 " ",
1457 "External protocols require REDIRECT and external file transfer programs that",
1458 "use redirectable standard input/output.",
1459 #endif /* XYZ_INTERNAL */
1460 #else
1461 "Syntax: \
1462 SET PROTOCOL KERMIT [ s1 [ s2 [ s3 ] ] ]",
1463 "  Lets you specify the autoupload binary, autoupload text, and autoserver",
1464 "  command strings to be sent to the remote system in advance of any SEND",
1465 "  or GET commands.  By default these are \"kermit -ir\", \"kermit -r\", and",
1466 "  \"kermit -x\".  Use { braces } around any command that contains spaces.",
1467 "  Example:",
1468 " ",
1469 "    set proto kermit {kermit -Yir} {kermit -YTr} {kermit -Yx}",
1470 #endif /* CK_XYZ */
1471 " ",
1472 "  SHOW PROTOCOL displays the current settings.",
1473 ""};
1474
1475 static char *hmxxbye = "Syntax: BYE\n\
1476   Shut down and log out a remote Kermit server";
1477
1478 #ifdef CK_PERMS
1479 #ifdef UNIX
1480 static char *hmxxchmod[] = {
1481 "Syntax: CHMOD [ switches ] code filespec",
1482 "  UNIX only.  Changes permissions of the given file(s) to the given code,",
1483 "  which must be an octal number such as 664 or 775.  Optional switches:",
1484 " ",
1485 "   /FILES        Only change permissions of regular files.",
1486 "   /DIRECTORIES  Only change permissions of directory files.",
1487 "   /TYPE:BINARY  Only change permissions of binary files.",
1488 "   /TYPE:TEXT    Only change permissions of text files.",
1489 "   /DOTFILES     Include files whose names begin with dot (.).",
1490 "   /RECURSIVE    Change permissions in subdirectories too.",
1491 "   /LIST         List each file (synonym: /VERBOSE).",
1492 "   /NOLIST       Operate silently (synonym: /QUIET).",
1493 "   /PAGE         When listing, pause at end of each screen (implies /LIST).",
1494 "   /NOPAGE       When listing, don't pause at end of each screen.",
1495 "   /SIMULATE     Show what would be done but don't actually do it.",
1496 ""
1497 };
1498 #endif /* UNIX */
1499 #endif /* CK_PERMS */
1500
1501 #ifndef NOSPL
1502 #ifndef NOSEXP
1503 static char *hmxxsexp[] = {
1504 "Syntax: (operation operand [ operand [ ... ] ])",
1505 " ",
1506 "  C-Kermit includes a simple LISP-like S-Expression parser operating on",
1507 "  numbers only.  An S-Expression is always enclosed in parentheses.  The",
1508 "  parentheses can contain (a) a number, (b) a variable, (c) a function that",
1509 "  returns a number, or (d) an operator followed by one or more operands.",
1510 "  Operands can be any of (a) through (c) or an S-Expression.  Numbers can be",
1511 "  integers or floating-point.  Any operand that is not a number and does not",
1512 "  start with backslash (\\) is treated as a Kermit macro name.  Operators:",
1513 " ",
1514 " Operator  Action                                 Example           Value",
1515 "  EVAL (.)  Returns the contained value            (6)               6",
1516 "  QUOTE (') Inhibits evaluation of following value (quote a)         a",
1517 "  SETQ      Assigns a value to a global variable   (setq a 2)        2",
1518 "  LET       Assigns a value to a local variable    (let b -1.3)     -1.3",
1519 "  +         Adds all operands (1 or more)          (+ a b)           0.7",
1520 "  -         Subtracts all operands (1 or more)     (- 9 5 2 1)       1",
1521 "  *         Multiplies all operands (1 or more)    (* a (+ b 1) 3)  -1.8",
1522 "  /         Divides all operands (1 or more)       (/ b a 2)        -0.325",
1523 "  ^         Raise given number to given power      (^ 3 2)           9",
1524 "  ++        Increments a variable                  (++ a 1.2)        3.2",
1525 "  --        Decrements a variable                  (-- a)            1",
1526 "  ABS       Absolute value of 1 operand            (abs (* a b 3))   7.8",
1527 "  MAX       Maximum of all operands (1 or more)    (max 1 2 3 4)     4",
1528 "  MIN       Minimum of all operands (1 or more)    (min 1 2 3 4)     1",
1529 "  MOD       Modulus of all operands (1 or more)    (mod 7 4 2)       1",
1530 "  TRUNCATE  Integer part of floating-point operand (truncate 1.333)  1",
1531 "  CEILING   Ceiling of floating-point operand      (ceiling 1.25)    2",
1532 "  FLOOR     Floor of floating-point operand        (floor 1.25)      1",
1533 "  ROUND     Operand rounded to nearest integer     (round 1.75)      2",
1534 "  SQRT      Square root of 1 operand               (sqrt 2)          1.414..",
1535 "  EXP       e (2.71828..) to the given power       (exp -1)          0.367..",
1536 "  SIN       Sine of angle expressed in radians     (sin (/ pi 2))    1.0",
1537 "  COS       Cosine of given number                 (cos pi)         -1.0",
1538 "  TAN       Tangent of given number                (tan pi)          0.0",
1539 "  LOG       Natural log (base e) of given number   (log 2.7183)      1.000..",
1540 "  LOG10     Log base 10 of given number            (log10 1000)      3.0",
1541 " ",
1542 "Predicate operators return 0 if false, 1 if true, and if it is the outermost",
1543 "operator, sets SUCCESS or FAILURE accordingly:",
1544 " ",
1545 "  <         Operands in strictly descending order  (< 6 5 4 3 2 1)   1",
1546 "  <=        Operands in descending order           (<= 6 6 5 4 3 2)  1",
1547 "  !=        Operands are not equal                 (!= 1 1 1.0)      0",
1548 "  =   (==)  All operands are equal                 (= 3 3 3 3)       1",
1549 "  >         Operands in strictly ascending order   (> 1 2 3 4 5 6)   1",
1550 "  >=        Operands in ascending order            (> 1 1 2 3 4 5)   1",
1551 "  AND (&&)  Operands are all true                  (and 1 1 1 1 0)   0",
1552 "  OR  (||)  At least one operand is true           (or 1 1 1 1 0)    1",
1553 "  XOR       Logical Exclusive OR                   (xor 3 1)         0",
1554 "  NOT (!)   Reverses truth value of operand        (not 3)           0",
1555 " ",
1556 "Bit-oriented operators:",
1557 " ",
1558 "  &         Bitwise AND                            (& 7 2)           2",
1559 "  |         Bitwise OR                             (| 1 2 3 4)       7",
1560 "  #         Bitwise Exclusive OR                   (# 3 1)           2",
1561 "  ~         Reverses all bits                      (~ 3)            -4",
1562 " ",
1563 "Operators that work on truth values:",
1564 " ",
1565 "  IF        Conditional evaluation                 (if (1) 2 3)      2",
1566 " ",
1567 "Operators can also be names of Kermit macros that return either numeric",
1568 "values or no value at all.",
1569 " ",
1570 "Built-in constants are:",
1571 " ",
1572 "  t         True (1)",
1573 "  nil       False (empty)",
1574 "  pi        The value of Pi (3.1415926...)",
1575 " ",
1576 "If SET SEXPRESSION ECHO-RESULT is AUTO (the default), the value of the",
1577 "S-Expression is printed if the S-Expression is given at top level; if ON,",
1578 "it is printed at any level; if OFF it is not printed.  At all levels, the",
1579 "variable \\v(sexpression) is set to the most recent S-Expression, and",
1580 "\\v(svalue) is set to its value.  You can use the \\fsexpresssion() function",
1581 "to evaluate an S-Expression anywhere in a Kermit command.",
1582 ""
1583 };
1584 #endif /* NOSEXP */
1585 #endif /* NOSPL */
1586
1587 static char *hmxxgrep[] = {
1588 #ifdef UNIXOROSK
1589 "Syntax: GREP [ options ] pattern filespec",
1590 #else
1591 "Syntax: FIND [ options ] pattern filespec",
1592 #endif /* UNIXOROSK */
1593 "  Searches through the given file or files for the given character string",
1594 "  or pattern.  In the normal case, all lines containing any text that matches"
1595 ,
1596 "  the pattern are printed.  Pattern syntax is as described in HELP PATTERNS",
1597 "  except that '*' is implied at the beginning unless the pattern starts with",
1598 "  '^' and also at the end unless the pattern ends with '$'.  Therefore,",
1599 "  \"grep something *.txt\" lists all lines in all *.txt files that contain",
1600 "  the word \"something\", but \"grep ^something *.txt\" lists only the lines",
1601 "  that START with \"something\".  The command succeeds if any of the given",
1602 "  files contained any lines that match the pattern, otherwise it fails.",
1603 #ifdef UNIXOROSK
1604 "  Synonym: FIND.",
1605 #else
1606 "  Synonym: GREP.",
1607 #endif /* UNIXOROSK */
1608 " ",
1609 "File selection options:",
1610 "  /NOBACKUPFILES",
1611 "    Excludes backup files (like oofa.txt.~3~) from the search.",
1612 "  /DOTFILES",
1613 "    Includes files whose names start with dot (.) in the search.",
1614 "  /NODOTFILES",
1615 "    Excludes files whose names start with dot (.) from the search.",
1616 #ifdef RECURSIVE
1617 "  /RECURSIVE",
1618 "    Searches through files in subdirectories too.",
1619 #endif /* RECURSIVE */
1620 "  /TYPE:TEXT",
1621 "    Search only text files (requires FILE SCAN ON).",
1622 "  /TYPE:BINARY",
1623 "    Search only binary files (requires FILE SCAN ON).",
1624 " ",
1625 "Pattern-matching options:",
1626 "  /NOCASE",
1627 "    Ignores case of letters (ASCII only) when comparing.",
1628 "  /NOMATCH",
1629 "    Searches for lines that do NOT match the pattern.",
1630 " ",
1631 "Display options:",
1632 "  /COUNT:variable-name",
1633 "    For each file, prints only the filename and a count of matching lines",
1634 "    and assigns the total match count to the variable, if one is given.",
1635 "  /NAMEONLY",
1636 "    Prints the name of each file that contains at least one matching line,",
1637 "    one name per line, rather than showing each matching line.",
1638 "  /NOLIST",
1639 "    Doesn't print anything (but sets SUCCESS or FAILURE appropriately).",
1640 "  /LINENUMBERS",
1641 "    Precedes each file line by its line number within the file.",
1642 "  /PAGE",
1643 "    Pauses after each screenful.",
1644 "  /NOPAGE",
1645 "    Doesn't pause after each screenful.",
1646 "  /OUTPUT:name",
1647 "    Sends results to the given file.  If this switch is omitted, the",
1648 "    results appear on your screen.  This switch overrides any express or",
1649 "    implied /PAGE switch.",
1650 ""};
1651
1652 static char *hmxxdir[] = {
1653 #ifdef DOMYDIR
1654 "Syntax: DIRECTORY [ switches ] [ filespec [ filespec [ ... ] ] ]",
1655 #ifdef LOCUS
1656 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
1657 "  this command is equivalent to REMOTE DIRECTORY (RDIR).  Otherwise:",
1658 " ",
1659 #endif /* LOCUS */
1660 "  Lists local files.  The filespec may be a filename, possibly containing",
1661 "  wildcard characters, or a directory name.  If no filespec is given, all",
1662 "  files in the current directory are listed.  If a directory name is given,",
1663 "  all the  files in it are listed.  Multiple filespecs can be given.",
1664 "  Optional switches:",
1665 " ",
1666 "   /BRIEF           List filenames only.",
1667 #ifdef CK_PERMS
1668 "   /VERBOSE       + Also list permissions, size, and date.",
1669 #else
1670 "   /VERBOSE       + Also list date and size.",
1671 #endif /* CK_PERMS */
1672 "   /FILES           Show files but not directories.",
1673 "   /DIRECTORIES     Show directories but not files.",
1674 "   /ALL           + Show both files and directories.",
1675 "   /ARRAY:&a        Store file list in specified array (e.g. \\%a[]).",
1676 "   /PAGE            Pause after each screenful.",
1677 "   /NOPAGE          Don't pause after each screenful.",
1678 #ifdef UNIXOROSK
1679 "   /DOTFILES        Include files whose names start with dot (period).",
1680 "   /NODOTFILES    + Don't include files whose names start with dot.",
1681 "   /FOLLOWLINKS     Follow symbolic links.",
1682 "   /NOFOLLOWLINKS + Don't follow symbolic links.",
1683 "   /BACKUP        + Include backup files (names end with .~n~).",
1684 "   /NOBACKUPFILES   Don't include backup files.",
1685 #endif /* UNIXOROSK */
1686 "   /OUTPUT:file     Store directory listing in the given file.",
1687 "   /HEADING         Include heading and summary.",
1688 "   /NOHEADING     + Don't include heading or summary.",
1689 "   /SUMMARY         Print only count and total size of matching files.",
1690 "   /XFERMODE        Show pattern-based transfer mode (T=Text, B=Binary).",
1691 "   /TYPE:           Show only files of the specified type (text or binary).",
1692 "   /MESSAGE:text    Add brief message to each listing line.",
1693 "   /NOMESSAGE     + Don't add message to each listing line.",
1694 "   /NOXFERMODE    + Don't show pattern-based transfer mode",
1695 "   /ISODATE       + In verbose listings, show date in ISO 8061 format.",
1696 "   /ENGLISHDATE     In verbose listings, show date in \"English\" format.",
1697 #ifdef RECURSIVE
1698 "   /RECURSIVE       Descend through subdirectories.",
1699 "   /NORECURSIVE   + Don't descend through subdirectories.",
1700 #endif /* RECURSIVE */
1701 "   /SORT:key        Sort by key, NAME, DATE, or SIZE; default key is NAME.",
1702 "   /NOSORT        + Don't sort.",
1703 "   /ASCENDING     + If sorting, sort in ascending order.",
1704 "   /REVERSE         If sorting, sort in reverse order.",
1705 " ",
1706 "Factory defaults are marked with +.  Default for paging depends on SET",
1707 "COMMAND MORE-PROMPTING.  Use SET OPTIONS DIRECTORY [ switches ] to change",
1708 "defaults; use SHOW OPTIONS to display customized defaults.",
1709 #else
1710 "Syntax: DIRECTORY [ filespec ]",
1711 "  Lists the specified file or files.  If no filespec is given, all files",
1712 "  in the current directory are listed.",
1713 #endif /* DOMYDIR */
1714 ""};
1715
1716
1717 #ifndef NOSPL
1718 static char *hmxxkcd[] = {
1719 "Syntax: KCD symbolic-directory-name",
1720 "  Kermit Change Directory: Like CD (q.v.) but (a) always acts locally, and",
1721 "  (b) takes a symbolic directory name rather than an actual directory name.",
1722 "  The symbolic names correspond to Kermit's directory-valued built-in",
1723 "  variables, such as \\v(download), \\v(exedir), and so on.  Here's the list:"
1724 ,
1725 " ",
1726 #ifdef NT
1727 "    appdata       Your personal Kermit 95 application data directory",
1728 "    common        Kermit 95's application data directory for all users",
1729 "    desktop       Your Windows desktop",
1730 #endif /* NT */
1731 "    download      Your download directory (if any)",
1732 #ifdef OS2ORUNIX
1733 "    exedir        The directory where the Kermit executable resides",
1734 #endif /* OS2ORUNIX */
1735 "    home          Your home, login, or default directory",
1736 "    inidir        The directory where Kermit's initialization was found",
1737 #ifdef UNIX
1738 "    lockdir       The UNIX UUCP lockfile directory on this computer",
1739 #endif /* UNIX */
1740 #ifdef NT
1741 "    personal      Your \"My Documents\" directory",
1742 #endif /* NT */
1743 "    startup       Your current directory at the time Kermit started",
1744 "    textdir       The directory where Kermit text files reside, if any",
1745 "    tmpdir        Your temporary directory",
1746 " ",
1747 "  Also see CD, SET FILE DOWNLOAD, SET TEMP-DIRECTORY.",
1748 ""
1749 };
1750 #endif /* NOSPL */
1751
1752 static char *hmxxcwd[] = {
1753 #ifdef LOCUS
1754 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
1755 "  this command is equivalent to REMOTE CD (RCD).  Otherwise:",
1756 " ",
1757 #endif /* LOCUS */
1758 #ifdef vms
1759 "Syntax: CD [ directory or device:directory ]",
1760 "  Change Working Directory.  Equivalent to VMS SET DEFAULT command.",
1761 #else
1762 #ifdef datageneral
1763 "Change Working Directory, equivalent to AOS/VS 'dir' command.",
1764 #else
1765 #ifdef OS2
1766 "Syntax: CD [ disk or directory name ]",
1767 "  Change Disk or Directory.  If a disk or directory name is not specified,",
1768 "  your current directory becomes the one specified by HOME environment",
1769 "  variable, if any.  A disk letter must be followed by a colon.",
1770 #else
1771 "Syntax: CD [ directory name ]",
1772 "  Change Directory.  Changes your current, working, default directory to the",
1773 "  one given, so that future non-absolute filename references are relative to",
1774 "  this directory.  If the directory name is omitted, your home (login)",
1775 "  directory is supplied.",
1776 #endif /* OS2 */
1777 #endif /* datageneral */
1778 #endif /* vms */
1779 "  C-Kermit's default prompt shows your current directory.",
1780 "  Synonyms: LCD, CWD.",
1781 #ifdef LOCUS
1782 "  Also see: SET LOCUS, PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
1783 #else
1784 "  Also see: PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
1785 #endif /* LOCUS */
1786 #ifndef NOSPL
1787 "  And see: HELP KCD.",
1788 #endif /* NOSPL */
1789 "  Relevant environment variables: CDPATH, HOME.",
1790 ""};
1791
1792 static char *hmxxdel[] = {
1793 "Syntax: DELETE [ switches... ] filespec",
1794 #ifdef LOCUS
1795 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
1796 "  this command is equivalent to REMOTE DELETE (RDELETE).  Otherwise:",
1797 " ",
1798 #endif /* LOCUS */
1799 "  Deletes a file or files on the computer where C-Kermit is running.",
1800 "  The filespec may denote a single file or can include wildcard characters",
1801 "  to match multiple files.  RM is a synonym for DELETE.  Switches include:",
1802 " ",
1803 "/AFTER:date-time",
1804 #ifdef VMS
1805 "  Specifies that only those files created after the given date-time are",
1806 #else
1807 "  Specifies that only those files modified after the given date-time are",
1808 #endif /* VMS */
1809 "  to be deleted.  HELP DATE for info about date-time formats.",
1810 " ",
1811 "/BEFORE:date-time",
1812 #ifdef VMS
1813 "  Specifies that only those files modified before the given date-time",
1814 #else
1815 "  Specifies that only those files modified before the given date-time",
1816 #endif /* VMS */
1817 "  are to be deleted.",
1818 " ",
1819 "/NOT-AFTER:date-time",
1820 #ifdef VMS
1821 "  Specifies that only those files modified at or before the given date-time",
1822 #else
1823 "  Specifies that only those files modified at or before the given date-time",
1824 #endif /* VMS */
1825 "  are to be deleted.",
1826 " ",
1827 "/NOT-BEFORE:date-time",
1828 #ifdef VMS
1829 "  Specifies that only those files modified at or after the given date-time",
1830 #else
1831 "  Specifies that only those files modified at or after the given date-time",
1832 #endif /* VMS */
1833 "  are to be deleted.",
1834 " ",
1835 "/LARGER-THAN:number",
1836 "  Specifies that only those files longer than the given number of bytes are",
1837 "  to be deleted.",
1838 " ",
1839 "/SMALLER-THAN:number",
1840 "  Specifies that only those files smaller than the given number of bytes are",
1841 "  to be sent.",
1842 " ",
1843 "/EXCEPT:pattern",
1844 "  Specifies that any files whose names match the pattern, which can be a",
1845 "  regular filename or may contain wildcards, are not to be deleted.  To",
1846 "  specify multiple patterns (up to 8), use outer braces around the group",
1847 "  and inner braces around each pattern:",
1848 " ",
1849 "    /EXCEPT:{{pattern1}{pattern2}...}",
1850 " ",
1851 #ifdef UNIXOROSK
1852 "/DOTFILES",
1853 "  Include (delete) files whose names begin with \".\".",
1854 " ",
1855 "/NODOTFILES",
1856 "  Skip (don't delete) files whose names begin with \".\".",
1857 " ",
1858 #endif /* UNIXOROSK */
1859 "/TYPE:TEXT",
1860 "  Delete only regular text files (requires FILE SCAN ON)",
1861 " ",
1862 "/TYPE:BINARY",
1863 "  Delete only regular binary files (requires FILE SCAN ON)",
1864 " ",
1865 "/DIRECTORIES",
1866 "  Include directories.  If this switch is not given, only regular files",
1867 "  are deleted.  If it is given, Kermit attempts to delete any directories",
1868 "  that match the given file specification, which succeeds only if the",
1869 "  directory is empty.",
1870 " ",
1871 #ifdef RECURSIVE
1872 "/RECURSIVE",
1873 "  The DELETE command applies to the entire directory tree rooted in the",
1874 "  current or specified directory.  When the /DIRECTORIES switch is also",
1875 "  given, Kermit deletes all the (matching) files in each directory before",
1876 "  attempting to delete the directory itself.",
1877 " ",
1878 #endif /* RECURSIVE */
1879 #ifdef UNIX
1880 #ifdef RECURSIVE
1881 "/ALL",
1882 "  This is a shortcut for /RECURSIVE /DIRECTORIES /DOTFILES.",
1883 #else
1884 "/ALL",
1885 "  This is a shortcut for /DIRECTORIES /DOTFILES.",
1886 #endif /* RECURSIVE */
1887 #else  /* !UNIX */
1888 #ifdef RECURSIVE
1889 "/ALL",
1890 "  This is a shortcut for /RECURSIVE /DIRECTORIES.",
1891 #else
1892 "/ALL",
1893 "  This is a synonym for /DIRECTORIES.",
1894 #endif /* RECURSIVE */
1895 #endif /* UNIX */
1896 " ",
1897 "/LIST",
1898 "  List each file and tell whether it was deleted.  Synonyms: /LOG, /VERBOSE.",
1899 " ",
1900 "/NOLIST",
1901 "  Don't list files while deleting.  Synonyms: /NOLOG, /QUIET.",
1902 " ",
1903 "/HEADING",
1904 "  Print heading and summary information.",
1905 " ",
1906 "/NOHEADING",
1907 "  Don't print heading and summary information.",
1908 " ",
1909 "/SUMMARY",
1910 "  Like /HEADING /NOLIST, but only prints the summary line.",
1911 " ",
1912 "/PAGE",
1913 "  If listing, pause after each screenful.",
1914 " ",
1915 "/NOPAGE",
1916 "  Don't pause after each screenful.",
1917 " ",
1918 "/ASK",
1919 "  Interactively ask permission to delete each file.  Reply Yes or OK to",
1920 "  delete it, No not to delete it, Quit to cancel the DELETE command, and",
1921 "  Go to go ahead and delete all the rest of the files without asking.",
1922 " ",
1923 "/NOASK",
1924 "  Delete files without asking permission.",
1925 " ",
1926 "/SIMULATE",
1927 "  Preview files selected for deletion without actually deleting them.",
1928 "  Implies /LIST.",
1929 " ",
1930 "Use SET OPTIONS DELETE to make selected switches effective for every DELETE",
1931 "command \
1932 unless you override them; use SHOW OPTIONS to see selections currently",
1933 #ifdef LOCUS
1934 "in effect.  Also see HELP SET LOCUS, HELP PURGE, HELP WILDCARD.",
1935 #else
1936 "in effect.  Also see HELP PURGE, HELP WILDCARD.",
1937 #endif /* LOCUS */
1938 ""};
1939
1940 #ifndef NOHTTP
1941 static char *hmxxhttp[] = {
1942 "Syntax:",
1943 #ifdef CK_SSL
1944 "HTTP [ <switches> ] OPEN [{ /SSL, /TLS }] <hostname> <service/port>",
1945 #else
1946 "HTTP [ <switches> ] OPEN <hostname> <service/port>",
1947 #endif /*CK_SSL */
1948 "  Instructs Kermit to open a new connection for HTTP communication with",
1949 "  the specified host on the specified port.  The default port is \"http\".",
1950 #ifdef CK_SSL
1951 "  If /SSL or /TLS are specified or if the service is \"https\" or port 443,",
1952 "  a secure connection will be established using the current authentication",
1953 "  settings.  See HELP SET AUTH for details.",
1954 #endif /* CK_SSL */
1955 "  If <switches> are specified, they are applied to all subsequent HTTP",
1956 "  actions (GET, PUT, ...) until an HTTP CLOSE command is executed.",
1957 "  A URL can be included in place of the hostname and service or port.",
1958 " ",
1959 "HTTP CLOSE",
1960 "  Instructs Kermit to close any open HTTP connection and clear any saved",
1961 "  switch values.",
1962 " ",
1963 "HTTP [ <switches> ] CONNECT <host>[:<port>]",
1964 "  Instructs the server to establish a connection with the specified host",
1965 "  and to redirect all data transmitted between Kermit and the host for the",
1966 "  life of the connection.",
1967 " ",
1968 "HTTP [ <switches> ] GET <remote-filename> [ <local-filename> ]",
1969 "  Retrieves the named file on the currently open HTTP connection.  The",
1970 "  default local filename is the same as the remote filename, but with any",
1971 "  path stripped.  If you want the file to be displayed on the screen instead",
1972 "  of stored on disk, include the /TOSCREEN switch and omit the local",
1973 "  filename.  If you give a URL instead of a remote filename, this commands",
1974 "  opens the connection, GETs the file, and closes the connection; the same",
1975 "  is true for the remaining HTTP commands for which you can specify a",
1976 "  remote filename, directory name, or path.",
1977 " ",
1978 "HTTP [ <switches> ] HEAD <remote-filename> [ <local-filename> ]",
1979 "  Like GET except without actually getting the file; instead it gets only",
1980 "  the headers, storing them into the given file (if a local filename is",
1981 "  specified), one line per header item as shown in the /ARRAY: switch",
1982 "  description.",
1983 " ",
1984 "HTTP [ <switches> ] INDEX <remote-directory> [ <local-filename> ]",
1985 "  Retrieves the file listing for the given server directory.",
1986 "  NOTE: This command is not supported by most Web servers, and even when",
1987 "  the server understand it, there is no stardard response format.",
1988 " ",
1989 "HTTP [ <switches> ] POST [ /MIME-TYPE:<type> ] <local-file> <remote-path>",
1990 "     [ <dest-file> ]",
1991 "  Used to send a response as if it were sent from a form.  The data to be",
1992 "  posted must be read from a file.",
1993 " ",
1994 "HTTP [ <switches> ] PUT [ /MIME-TYPE:<type> ] <local-file> <remote-file>",
1995 "     [ <dest-file> ]",
1996 "  Uploads the given local file to server file.  If the remote filename is",
1997 "  omitted, the local name is used, but with any path stripped.",
1998 " ",
1999 "HTTP [ <switches> ] DELETE <remote-filename>",
2000 "  Instructs the server to delete the specified filename.",
2001 " ",
2002 "where <switches> are:",
2003 "/AGENT:<user-agent>",
2004 "  Identifies the client to the server; \"C-Kermit\" or \"Kermit-95\"",
2005 "  by default.",
2006 " ",
2007 "/HEADER:<header-line>",
2008 "  Used for specifying any optional headers.  A list of headers is provided",
2009 "  using braces for grouping:",
2010 " ",
2011 "    /HEADER:{{<tag>:<value>}{<tag>:<value>}...}",
2012 " ",
2013 "  For a listing of valid <tag> value and <value> formats see RFC 1945:",
2014 "  \"Hypertext Transfer Protocol -- HTTP/1.0\".  A maximum of eight headers",
2015 "  may be specified.",
2016 " ",
2017 "/TOSCREEN",
2018 "  Display server responses on the screen.",
2019 " ",
2020 "/USER:<name>",
2021 "  In case a page requires a username for access.",
2022 " ",
2023 "/PASSWORD:<password>",
2024 "  In case a page requires a password for access.",
2025 " ",
2026 "/ARRAY:<arrayname>",
2027 "  Tells Kermit to store the response headers in the given array, one line",
2028 "  per element.  The array need not be declared in advance.  Example:",
2029 " ",
2030 "    http /array:c get kermit/index.html",
2031 "    show array c",
2032 "    Dimension = 9",
2033 "    1. Date: Fri, 26 Nov 1999 23:12:22 GMT",
2034 "    2. Server: Apache/1.3.4 (Unix)",
2035 "    3. Last-Modified: Mon, 06 Sep 1999 22:35:58 GMT",
2036 "    4. ETag: \"bc049-f72-37d441ce\"",
2037 "    5. Accept-Ranges: bytes",
2038 "    6. Content-Length: 3954",
2039 "    7. Connection: close     ",
2040 "    8. Content-Type: text/html",
2041 " ",
2042 "As you can see, the header lines are like MIME e-mail header lines:",
2043 "identifier, colon, value.  The /ARRAY switch is the only method available",
2044 "to a script to process the server responses for a POST or PUT command.",
2045 " ",
2046 ""
2047 };
2048 #endif /* NOHTTP */
2049
2050 #ifdef CK_KERBEROS
2051 static char *hmxxauth[] = {
2052 "Syntax:",
2053 "AUTHENTICATE { KERBEROS4, KERBEROS5 [ switches ] } <action> [ switches ]",
2054 "  Obtains or destroys Kerberos tickets and lists information about them.",
2055 "  Actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS.  KERBEROS4 can be",
2056 "  abbreviated K4 or KRB4; KERBEROS5 can be abbreviated K5 or KRB5.  Use ? to",
2057 "  see which keywords, switches, or other quantities are valid at each point",
2058 "  in the command.",
2059 " ",
2060 "  The actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS:",
2061 " ",
2062 "    AUTH { K4, K5 } { INITIALIZE [switches], DESTROY,",
2063 "      LIST-CREDENTIALS [switches] }",
2064 " ",
2065 "  The INITIALIZE action is the most complex, and its format is different",
2066 "  for Kerberos 4 and Kerberos 5.  The format for Kerberos 4 is:",
2067 " ",
2068 "  AUTH K4 INITIALIZE [ /INSTANCE:<name> /LIFETIME:<minutes> -",
2069 "    /PASSWORD:<password> /PREAUTH /REALM:<name> <principal> ]",
2070 " ",
2071 "  All switches are optional.  Kerberos 4 INITIALIZE switches are:",
2072 " ",
2073 "  /INSTANCE:<name>",
2074 "    Allows an Instance (such as a hostname) to be specified.",
2075 " ",
2076 "  /LIFETIME:<number>",
2077 "    Specifies the requested lifetime in minutes for the ticket.  If no",
2078 "    lifetime is specified, 600 minutes is used.  If the lifetime is greater",
2079 "    than the maximum supported by the ticket granting service, the resulting",
2080 "    lifetime is shortened accordingly.",
2081 " ",
2082 "  /NOT-PREAUTH",
2083 "    Instructs Kermit to send a ticket getting ticket (TGT) request to the",
2084 "    KDC without any preauthentication data.",
2085 " ",
2086 "  /PASSWORD:<string>",
2087 "    Allows a password to be included on the command line or in a script",
2088 "    file.  If no /PASSWORD switch is included, you are prompted on a separate"
2089 ,
2090 "    line.  The password switch is provided on a use-at-your-own-risk basis",
2091 "    for use in automated scripts.  WARNING: Passwords should not be stored in"
2092 ,
2093 "    files.",
2094 " ",
2095 "  /PREAUTH",
2096 "    Instructs Kermit to send a preauthenticated Ticket-Getting Ticket (TGT)",
2097 "    request to the KDC instead of a plaintext request.  The default when",
2098 "    supported by the Kerberos libraries.",
2099 " ",
2100 "  /REALM:<name>",
2101 "    Allows a realm to be specified (overriding the default realm).",
2102 " ",
2103 "  <principal>",
2104 "    Your identity in the given or default Kerberos realm, of the form:",
2105 "    userid[.instance[.instance]]@[realm]  ",
2106 "    Can be omitted if it is the same as your username or SET LOGIN USERID",
2107 "    value on the client system.",
2108 " ",
2109 "  The format for Kerberos 5 is as follows:",
2110 " ",
2111 "  AUTH K5 [ /CACHE:<filename> ] { INITIALIZE [ switches ], DESTROY,",
2112 "    LIST-CREDENTIALS ...}",
2113 " ",
2114 "The INITIALIZE command for Kerberos 5 can include a number of switches;",
2115 "all are optional:",
2116 " ",
2117 "AUTH K5 [ /CACHE:<filename> ] INITITIALIZE [ /ADDRESSES:<addr-list>",
2118 "  /FORWARDABLE /KERBEROS4 /LIFETIME:<minutes> /PASSWORD:<password>",
2119 "  /POSTDATE:<date-time> /PROXIABLE /REALM:<name> /RENEW /RENEWABLE:<minutes>",
2120 "  /SERVICE:<name> /VALIDATE <principal> ]",
2121 " ",
2122 "  All Kerberos 5 INITIALIZE switches are optional:",
2123 " ",
2124 "  /ADDRESSES:{list of ip-addresses}",
2125 "    Specifies a list of IP addresses that should be placed in the Ticket",
2126 "    Getting Ticket in addition to the local machine addresses.",
2127 " ",
2128 "  /FORWARDABLE",
2129 "    Requests forwardable tickets.",
2130 " ",
2131 "  /INSTANCE:<name>",
2132 "    Allows an Instance (such as a hostname) to be specified.",
2133 " ",
2134 "  /KERBEROS4",
2135 "    Instructs Kermit to get Kerberos 4 tickets in addition to Kerberos 5",
2136 "    tickets.  If Kerberos 5 tickets are not supported by the server, a",
2137 "    mild warning is printed and Kerberos 4 tickets are requested.",
2138 " ",
2139 "  /LIFETIME:<number>",
2140 "    Specifies the requested lifetime in minutes for the ticket.  If no",
2141 "    lifetime is specified, 600 minutes is used.  If the lifetime is greater",
2142 "    than the maximum supported by the ticket granting service, the resulting",
2143 "    lifetime is shortened.",
2144 " ",
2145 "  /NO-KERBEROS4",
2146 "    Instructs Kermit to not attempt to retrieve Kerberos 4 credentials.",
2147 " ",
2148 "  /NOT-FORWARDABLE",
2149 "    Requests non-forwardable tickets.",
2150 " ",
2151 "  /NOT-PROXIABLE",
2152 "    Requests non-proxiable tickets.",
2153 " ",
2154 "  /PASSWORD:<string>",
2155 "    Allows a password to be included on the command line or in a script",
2156 "    file.  If no /PASSWORD switch is included, you are prompted on a separate"
2157 ,
2158 "    line.  The password switch is provided on a use-at-your-own-risk basis",
2159 "    for use in automated scripts.  WARNING: Passwords should not be stored in"
2160 ,
2161 "    files.",
2162 " ",
2163 "  /POSTDATE:<date-time>",
2164 "    Requests a postdated ticket, valid starting at <date-time>.  Postdated",
2165 "    tickets are issued with the invalid flag set, and need to be fed back to",
2166 "    the KDC before use with the /VALIDATE switch.  Type HELP DATE for info",
2167 "    on date-time formats.",
2168 " ",
2169 "  /PROXIABLE",
2170 "    Requests proxiable tickets.",
2171 " ",
2172 "  /REALM:<string>",
2173 "    Allows an alternative realm to be specified.",
2174 " ",
2175 "  /RENEW",
2176 "    Requests renewal of a renewable Ticket-Granting Ticket.  Note that ",
2177 "    an expired ticket cannot be renewed even if it is within its renewable ",
2178 "    lifetime.",
2179 " ",
2180 "  /RENEWABLE:<number>",
2181 "    Requests renewable tickets, with a total lifetime of <number> minutes.",
2182 " ",
2183 "  /SERVICE:<string>",
2184 "    Allows a service other than the ticket granting service to be specified.",
2185 " ",
2186 "  /VALIDATE",
2187 "    Requests that the Ticket Granting Ticket in the cache (with the invalid",
2188 "    flag set) be passed to the KDC for validation.  If the ticket is within",
2189 "    its requested time range, the cache is replaced with the validated",
2190 "    ticket.",
2191 " ",
2192 "  <principal>",
2193 "    Your identity in the given or default Kerberos realm, of the form:",
2194 "    userid[/instance][@realm]  ",
2195 "    Can be omitted if it is the same as your username or SET LOGIN USERID",
2196 "    value on the client system.",
2197 " ",
2198 "  Note: Kerberos 5 always attempts to retrieve a Ticket-Getting Ticket (TGT)",
2199 "  using the preauthenticated TGT request.",
2200 " ",
2201 "  AUTHORIZE K5 LIST-CREDENTIALS [ /ADDRESSES /FLAGS /ENCRYPTION ]",
2202 " ",
2203 "  Shows start time, expiration time, service or principal name, plus",
2204 "  the following additional information depending the switches:",
2205 " ",
2206 "  /ADDRESSES displays the hostnames and/or IP addresses embedded within",
2207 "    the tickets.",
2208 " ",
2209 "  /FLAGS provides the following information (if applicable) for each ticket:",
2210 "    F - Ticket is Forwardable",
2211 "    f - Ticket was Forwarded",
2212 "    P - Ticket is Proxiable",
2213 "    p - Ticket is a Proxy",
2214 "    D - Ticket may be Postdated",
2215 "    d - Ticket has been Postdated",
2216 "    i - Ticket is Invalid",
2217 "    R - Ticket is Renewable",
2218 "    I - Ticket is the Initial Ticket",
2219 "    H - Ticket has been authenticated by Hardware",
2220 "    A - Ticket has been Pre-authenticated",
2221 " ",
2222 "  /ENCRYPTION displays the encryption used by each ticket (if applicable):",
2223 "    DES-CBC-CRC",
2224 "    DES-CBC-MD4",
2225 "    DES-CBC-MD5",
2226 "    DES3-CBC-SHA",
2227 ""
2228 };
2229 #endif /* CK_KERBEROS */
2230
2231 #ifndef NOCSETS
2232 static char *hmxxassoc[] = {
2233 "ASSOCIATE FILE-CHARACTER-SET <file-character-set> <transfer-character-set>",
2234 "  Tells C-Kermit that whenever the given file-character set is selected, and",
2235 "  SEND CHARACTER-SET (q.v.) is AUTOMATIC, the given transfer character-set",
2236 "  is selected automatically.",
2237 " ",
2238 "ASSOCIATE XFER-CHARACTER-SET <xfer-character-set> <file-character-set>",
2239 "  Tells C-Kermit that whenever the given transfer-character set is selected,",
2240 "  either by command or by an announcer attached to an incoming text file,",
2241 "  and SEND CHARACTER-SET is AUTOMATIC, the specified file character-set is",
2242 "  to be selected automatically.  Synonym: ASSOCIATE TRANSFER-CHARACTER-SET.",
2243 " ",
2244 "Use SHOW ASSOCIATIONS to list the current character-set associations, and",
2245 "SHOW CHARACTER-SETS to list the current settings.",
2246 ""
2247 };
2248 #endif /* NOCSETS */
2249
2250 static char *hmxxpat[] = {
2251 "A \"pattern\" is notation used in a search string when searching through",
2252 "text.  C-Kermit uses three kinds of patterns: floating patterns, anchored",
2253 "patterns, and wildcards.  Wildcards are anchored patterns that are used to",
2254 "match file names; type HELP WILDCARD to learn about them.",
2255 " ",
2256 "In a pattern, certain characters are special:",
2257 " ",
2258 "* Matches any sequence of zero or more characters.  For example, \"k*t\"",
2259 "  matches all strings that start with \"k\" and end with \"t\" including",
2260 "  \"kt\", \"kit\", \"knight\", or \"kermit\".",
2261 " ",
2262 #ifdef VMS
2263 "% Matches any single character.  For example, \"k%%%%t\" matches all strings",
2264 #else
2265 "? Matches any single character.  For example, \"k????t\" matches all strings",
2266 #endif /* VMS */
2267 "  that are exactly 6 characters long and start with \"k\" and end with",
2268 #ifdef VMS
2269 "  with \"t\".",
2270 #else
2271 "  with \"t\".  When typing commands at the prompt, you must precede any",
2272 "  question mark to be used for matching by a backslash (\\) to override the",
2273 "  normal function of question mark, which is providing menus and file lists.",
2274 #endif /* VMS */
2275 " ",
2276 #ifdef OS2ORUNIX
2277 #ifdef CKREGEX
2278 "[abc]",
2279 "  Square brackets enclosing a list of characters matches any character in",
2280 "  the list.  Example: h[aou]t matches hat, hot, and hut.",
2281 " ",
2282 "[a-z]",
2283 "  Square brackets enclosing a range of characters matches any character in",
2284 "  the range; a hyphen (-) separates the low and high elements of the range.",
2285 "  For example, [a-z] matches any character from a to z.",
2286 " ",
2287 "[acdm-z]",
2288 "  Lists and ranges may be combined.  This example matches a, c, d, or any",
2289 "  letter from m through z.",
2290 " ",
2291 "{string1,string2,...}",
2292 "  Braces enclose a list of strings to be matched.  For example:",
2293 "  ker{mit,nel,beros} matches kermit, kernel, and kerberos.  The strings",
2294 "  may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
2295 #endif /* CKREGEX */
2296 #endif /* OS2ORUNIX */
2297 #ifndef NOSPL
2298 " ",
2299 "To force a special pattern character to be taken literally, precede it with",
2300 "a backslash, e.g. [a\\-z] matches a, hyphen, and z rather than a through z.",
2301 " ",
2302 "A floating  pattern can also include the following special characters:",
2303 " ",
2304 "^ (First character of pattern) Anchors the pattern at the beginning.",
2305 "$ (Last character of pattern) Anchors the pattern at the end.",
2306 " ",
2307 "If a floating pattern does not start with \"^\", the pattern can match",
2308 "anywhere in the string instead of only at the beginning; in other words, a",
2309 "leading \"*\" is assumed.  Similarly, if the pattern doesn't end with \"$\",",
2310 "a trailing \"*\" is assumed.",
2311 " ",
2312 "The following commands and functions use floating patterns:",
2313 "  GREP [ <switches> ] <pattern> <filespec>",
2314 "  TYPE /MATCH:<pattern> <file>",
2315 "  \\farraylook(<pattern>,<arrayname>)",
2316 "  \\fsearch(<pattern>,<string>[,<offset>])",
2317 "  \\frsearch(<pattern>,<string>[,<offset>])",
2318 "  The /EXCEPT: clause in SEND, GET, DELETE, etc.",
2319 " ",
2320 "Example:",
2321 "  \\fsearch(abc,xxabcxxx) succeeds because xxabcxx contains abc.",
2322 "  \\fsearch(^abc,xxabcxx) fails because xxabcxx does not start with abc.",
2323 " ",
2324 "All other commands and functions that use patterns use anchored patterns,",
2325 "meaning that ^ and $ are not treated specially, and * is not assumed at the",
2326 "beginning or end of the pattern.  This is true mainly of filename patterns",
2327 "(wildcards), since you would not want a command like \"delete x\" to delete",
2328 "all files whose names contained \"x\"!",
2329 " ",
2330 "You can use anchored patterns not only in filenames, but also in SWITCH",
2331 "case labels, in the INPUT and MINPUT commands, and in file binary- and",
2332 "text-patterns for filenames.  The IF MATCH pattern is also anchored.",
2333 #endif /* NOSPL */
2334 "" };
2335
2336 static char *hmxxwild[] = {
2337
2338 "A \"wildcard\" is a notation used in a filename to match multiple files.",
2339 "For example, in \"send *.txt\" the asterisk is a wildcard.  Kermit commands",
2340 "that accept filenames also accepts wildcards, except commands that are",
2341 "allowed to operate on only one file, such as TRANSMIT.",
2342 "This version of Kermit accepts the following wildcards:",
2343 " ",
2344 "* Matches any sequence of zero or more characters.  For example, \"ck*.c\"",
2345 "  matches all files whose names start with \"ck\" and end with \".c\"",
2346 "  including \"ck.c\".",
2347 " ",
2348 #ifdef VMS
2349 "% Matches any single character.  For example, \"ck%.c\" matches all files",
2350 #else
2351 "? Matches any single character.  For example, \"ck?.c\" matches all files",
2352 #endif /* VMS */
2353 "  whose names are exactly 5 characters long and start with \"ck\" and end",
2354 #ifdef VMS
2355 "  with \".c\".",
2356 #else
2357 "  with \".c\".  When typing commands at the prompt, you must precede any",
2358 "  question mark to be used for matching by a backslash (\\) to override the",
2359 "  normal function of question mark, which is providing menus and file lists.",
2360 #endif /* VMS */
2361 " ",
2362 #ifdef OS2ORUNIX
2363 #ifdef CKREGEX
2364 "[abc]",
2365 "  Square brackets enclosing a list of characters matches any character in",
2366 "  the list.  Example: ckuusr.[ch] matches ckuusr.c and ckuusr.h.",
2367 " ",
2368 "[a-z]",
2369 "  Square brackets enclosing a range of characters matches any character in",
2370 "  the range; a hyphen (-) separates the low and high elements of the range.",
2371 "  For example, [a-z] matches any character from a to z.",
2372 " ",
2373 "[acdm-z]",
2374 "  Lists and ranges may be combined.  This example matches a, c, d, or any",
2375 "  letter from m through z.",
2376 " ",
2377 "{string1,string2,...}",
2378 "  Braces enclose a list of strings to be matched.  For example:",
2379 "  ck{ufio,vcon,cmai}.c matches ckufio.c, ckvcon.c, or ckcmai.c.  The strings",
2380 "  may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
2381 #endif /* CKREGEX */
2382 #endif /* OS2ORUNIX */
2383 " ",
2384 "To force a special pattern character to be taken literally, precede it with",
2385 "a backslash, e.g. [a\\-z] matches a, hyphen, and z rather than a through z.",
2386 " ",
2387 #ifndef NOSPL
2388 "Similar notation can be used in general-purpose string matching.  Type HELP",
2389 "PATTERNS for details.  Also see HELP SET MATCH.",
2390 #endif /* NOSPL */
2391 "" };
2392
2393 #ifndef NOXFER
2394 static char *hmxxfast[] = {
2395 "FAST, CAUTIOUS, and ROBUST are predefined macros that set several",
2396 "file-transfer parameters at once to achieve the desired file-transfer goal.",
2397 "FAST chooses a large packet size, a large window size, and a fair amount of",
2398 "control-character unprefixing at the risk of possible failure on some",
2399 "connections.  FAST is the default tuning in C-Kermit 7.0 and later.  In case",
2400 "FAST file transfers fail for you on a particular connection, try CAUTIOUS.",
2401 "If that fails too, try ROBUST.  You can also change the definitions of each",
2402 "macro with the DEFINE command.  To see the current definitions, type",
2403 "\"show macro fast\", \"show macro cautious\", or \"show macro robust\".",
2404 ""
2405 };
2406 #endif /* NOXFER */
2407
2408 #ifdef VMS
2409 static char * hmxxpurge[] = {
2410 "Syntax: PURGE [ switches ] [ filespec ]",
2411 "  Runs the DCL PURGE command.  Switches and filespec are not parsed or",
2412 "  verified by Kermit, but passed directly to DCL.",
2413 ""
2414 };
2415 #else
2416 #ifdef CKPURGE
2417 static char * hmxxpurge[] = {
2418 "Syntax: PURGE [ switches ] [ filespec ]",
2419 "  Deletes backup files; that is, files whose names end in \".~n~\", where",
2420 "  n is a number.  PURGE by itself deletes all backup files in the current",
2421 "  directory.  Switches:",
2422
2423 " ",
2424 "/AFTER:date-time",
2425 #ifdef VMS
2426 "  Specifies that only those files created after the given date-time are",
2427 #else
2428 "  Specifies that only those files modified after the given date-time are",
2429 #endif /* VMS */
2430 "  to be purged.  HELP DATE for info about date-time formats.",
2431 " ",
2432 "/BEFORE:date-time",
2433 #ifdef VMS
2434 "  Specifies that only those files modified before the given date-time",
2435 #else
2436 "  Specifies that only those files modified before the given date-time",
2437 #endif /* VMS */
2438 "  are to be purged.",
2439 " ",
2440 "/NOT-AFTER:date-time",
2441 #ifdef VMS
2442 "  Specifies that only those files modified at or before the given date-time",
2443 #else
2444 "  Specifies that only those files modified at or before the given date-time",
2445 #endif /* VMS */
2446 "  are to be purged.",
2447 " ",
2448 "/NOT-BEFORE:date-time",
2449 #ifdef VMS
2450 "  Specifies that only those files modified at or after the given date-time",
2451 #else
2452 "  Specifies that only those files modified at or after the given date-time",
2453 #endif /* VMS */
2454 "  are to be purged.",
2455 " ",
2456 "/LARGER-THAN:number",
2457 "  Specifies that only those files longer than the given number of bytes are",
2458 "  to be purged.",
2459 " ",
2460 "/SMALLER-THAN:number",
2461 "  Specifies that only those files smaller than the given number of bytes are",
2462 "  to be purged.",
2463 " ",
2464 "/EXCEPT:pattern",
2465 "  Specifies that any files whose names match the pattern, which can be a",
2466 "  regular filename or may contain wildcards, are not to be purged.  To",
2467 "  specify multiple patterns (up to 8), use outer braces around the group",
2468 "  and inner braces around each pattern:",
2469 " ",
2470 "    /EXCEPT:{{pattern1}{pattern2}...}",
2471 " ",
2472 #ifdef UNIXOROSK
2473 "/DOTFILES",
2474 "  Include (purge) files whose names begin with \".\".",
2475 " ",
2476 "/NODOTFILES",
2477 "  Skip (don't purge) files whose names begin with \".\".",
2478 " ",
2479 #endif /* UNIXOROSK */
2480 #ifdef RECURSIVE
2481 "/RECURSIVE",
2482 "  Descends through the current or specified directory tree.",
2483 " ",
2484 #endif /* RECURSIVE */
2485 "/KEEP:n",
2486 "  Retain the 'n' most recent (highest-numbered) backup files for each file.",
2487 "  By default, none are kept.  If /KEEP is given without a number, 1 is used.",
2488 " ",
2489 "/LIST",
2490 "  Display each file as it is processed and say whether it is purged or kept.",
2491 "  Synonyms: /LOG, /VERBOSE.",
2492 " ",
2493 "/NOLIST",
2494 "  The PURGE command should operate silently (default).",
2495 "  Synonyms: /NOLOG, /QUIET.",
2496 " ",
2497 "/HEADING",
2498 "  Print heading and summary information.",
2499 " ",
2500 "/NOHEADING",
2501 "  Don't print heading and summary information.",
2502 " ",
2503 "/PAGE",
2504 "  When /LIST is in effect, pause at the end of each screenful, even if",
2505 "  COMMAND MORE-PROMPTING is OFF.",
2506 " ",
2507 "/NOPAGE",
2508 "  Don't pause, even if COMMAND MORE-PROMPTING is ON.",
2509 " ",
2510 "/ASK",
2511 "  Interactively ask permission to delete each backup file.",
2512 " ",
2513 "/NOASK",
2514 "  Purge backup files without asking permission.",
2515 " ",
2516 "/SIMULATE",
2517 "  Inhibits the actual deletion of files; use to preview which files would",
2518 "  actually be deleted.  Implies /LIST.",
2519 " ",
2520 "Use SET OPTIONS PURGE [ switches ] to change defaults; use SHOW OPTIONS to",
2521 "display customized defaults.  Also see HELP DELETE, HELP WILDCARD.",
2522 ""
2523 };
2524 #endif /* CKPURGE */
2525 #endif /* VMS */
2526
2527 static char *hmxxclo[] = {
2528 "Syntax:  CLOSE [ item ]",
2529 "  Close the indicated item.  The default item is CONNECTION, which is the",
2530 "  current SET LINE or SET HOST connection.  The other items are:",
2531 " ",
2532 #ifdef CKLOGDIAL
2533 "    CX-LOG          (connection log, opened with LOG CX)",
2534 #endif /* CKLOGDIAL */
2535 #ifndef NOLOCAL
2536 "    SESSION-LOG     (opened with LOG SESSION)",
2537 #endif /* NOLOCAL */
2538 #ifdef TLOG
2539 "    TRANSACTION-LOG (opened with LOG TRANSACTIONS)",
2540 #endif /* TLOG */
2541 "    PACKET-LOG      (opened with LOG PACKETS)",
2542 #ifdef DEBUG
2543 "    DEBUG-LOG       (opened with LOG DEBUG)",
2544 #endif /* DEBUG */
2545 #ifndef NOSPL
2546 "    READ-FILE       (opened with OPEN READ)",
2547 "    WRITE-FILE      (opened with OPEN WRITE or OPEN APPEND)",
2548 #endif /* NOSPL */
2549 " ",
2550 "Type HELP LOG and HELP OPEN for further info.",
2551 ""
2552 };
2553
2554 #ifdef CKLEARN
2555 static char * hmxxlearn[] = {
2556 "Syntax: LEARN [ /ON /OFF /CLOSE ] [ filename ]",
2557 "  Records a login script.  If you give a filename, the file is opened for",
2558 "  subsequent recording.  If you don't give any switches, /ON is assumed.",
2559 "  /ON enables recording to the current file (if any); /OFF disables",
2560 "  recording.  /CLOSE closes the current file (if any).  After LEARN /CLOSE",
2561 "  or exit from Kermit, your script is available for execution by the TAKE",
2562 "  command.",
2563 ""
2564 };
2565 #endif /* CKLEARN */
2566
2567 #ifdef CK_MINPUT
2568 static char *hmxxminp[] = {
2569 "Syntax:  MINPUT n [ string1 [ string2 [ ... ] ] ]",
2570 "Example: MINPUT 5 Login: {Username: } {NO CARRIER} BUSY RING",
2571 "  For use in script programs.  Waits up to n seconds for any one of the",
2572 "  strings to arrive on the communication device.  If no strings are given,",
2573 "  the command waits for any character at all to arrive.  Strings are",
2574 "  separated by spaces; use { braces } for grouping.  If any of the strings",
2575 "  is encountered within the timeout interval, the command succeeds and the",
2576 "  \\v(minput) variable is set to the number of the string that was matched:",
2577 "  1, 2, 3, etc.  If none of the strings arrives, the command times out,",
2578 "  fails, and \\v(minput) is set to 0.  If the timeout interval is 0 the",
2579 "  MINPUT command does not wait; i.e. the given text must already be",
2580 "  available for reading for the MINPUT command to succeed.  If the interval",
2581 "  is negative, the MINPUT command waits forever.",
2582 " ",
2583 "Also see: INPUT, REINPUT, SET INPUT.",
2584 "" };
2585 #endif /* CK_MINPUT */
2586
2587 #ifndef NOLOCAL
2588 static char *hmxxcon[] = {
2589 "Syntax: CONNECT (or C, or CQ) [ switches ]",
2590 "  Connect to a remote computer via the serial communications device given in",
2591 #ifdef OS2
2592 "  the most recent SET PORT command, or to the network host named in the most",
2593 #else
2594 "  the most recent SET LINE command, or to the network host named in the most",
2595 #endif /* OS2 */
2596 "  recent SET HOST command.  Type the escape character followed by C to get",
2597 "  back to the C-Kermit prompt, or followed by ? for a list of CONNECT-mode",
2598 #ifdef OS2
2599 "  escape commands.  You can also assign the \\Kexit verb to the key or",
2600 "  key-combination of your choice; by default it is assigned to Alt-x.",
2601 #else
2602 "  escape commands.",
2603 " ",
2604 "Include the /QUIETLY switch to suppress the informational message that",
2605 "tells you how to escape back, etc.  CQ is a synonym for CONNECT /QUIETLY.",
2606 #endif /* OS2 */
2607 " ",
2608 "Other switches include:",
2609 #ifdef CK_TRIGGER
2610 " ",
2611 "/TRIGGER:string",
2612 "  One or more strings to look for that will cause automatic return to",
2613 "  command mode.  To specify one string, just put it right after the",
2614 "  colon, e.g. \"/TRIGGER:Goodbye\".  If the string contains any spaces, you",
2615 "  must enclose it in braces, e.g. \"/TRIGGER:{READY TO SEND...}\".  To",
2616 "  specify more than one trigger, use the following format:",
2617 " ",
2618 "    /TRIGGER:{{string1}{string2}...{stringn}}",
2619 " ",
2620 "  Upon return from CONNECT mode, the variable \\v(trigger) is set to the",
2621 "  trigger string, if any, that was actually encountered.  This value, like",
2622 "  all other CONNECT switches applies only to the CONNECT command with which",
2623 "  it is given, and overrides (temporarily) any global SET TERMINAL TRIGGER",
2624 "  string that might be in effect.",
2625 #endif /* CK_TRIGGER */
2626 #ifdef OS2
2627 " ",
2628 "/IDLE-LIMIT:number",
2629 "  The number of seconds of idle time, after which Kermit returns",
2630 "  automatically to command mode; default 0 (no limit).",
2631 " ",
2632 "/IDLE-INTERVAL:number",
2633 "  The number of seconds of idle time, after which Kermit automatically",
2634 "  transmits the idle string.",
2635 " ",
2636 "/IDLE-STRING:string",
2637 "  The string to transmit whenever the idle interval has passed.",
2638 " ",
2639 "/TIME-LIMIT:number",
2640 "  The maximum number of seconds for which the CONNECT session may last.",
2641 "  The default is 0 (no limit).  If a nonzero number is given, Kermit returns",
2642 "  automatically to command mode after this many seconds.",
2643 #endif /* OS2 */
2644 "" };
2645 #endif /* NOLOCAL */
2646
2647 static char *hmxxmget[] = {
2648 "Syntax: MGET [ switches... ] remote-filespec [ remote-filespec ... ]",
2649 " ",
2650 "Just like GET (q.v.) except allows a list of remote file specifications,",
2651 "separated by spaces.",
2652 ""
2653 };
2654
2655 static char *hmxxget[] = {
2656 "Syntax: GET [ switches... ] remote-filespec [ as-name ]",
2657 "  Tells the other Kermit, which must be in (or support autoswitching into)",
2658 "  server mode, to send the named file or files.  If the remote-filespec or",
2659 "  the as-name contain spaces, they must be enclosed in braces.  If as-name",
2660 "  is the name of an existing local directory, incoming files are placed in",
2661 "  that directory; if it is the name of directory that does not exist, Kermit",
2662 "  tries to create it.  Optional switches include:",
2663 " ",
2664 "/AS-NAME:text",
2665 "  Specifies \"text\" as the name to store the incoming file under, or",
2666 "  directory to store it in.  You can also specify the as-name as the second",
2667 "  filename on the GET command line.",
2668 " ",
2669 "/BINARY",
2670 "  Performs this transfer in binary mode without affecting the global",
2671 "  transfer mode.",
2672 " ",
2673 "/COMMAND",
2674 "  Receives the file into the standard input of a command, rather than saving",
2675 "  it on  disk.  The /AS-NAME or the second \"filename\" on the GET command",
2676 "  line is interpreted as the name of a command.",
2677 " ",
2678 "/DELETE",
2679 "  Asks the other Kermit to delete the file (or each file in the group)",
2680 "  after it has been transferred successfully.",
2681 " ",
2682 "/EXCEPT:pattern",
2683 "  Specifies that any files whose names match the pattern, which can be a",
2684 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
2685 "  are to be refused.  To specify multiple patterns (up to 8), use outer",
2686 "  braces around the group, and inner braces around each pattern:",
2687 " ",
2688 "    /EXCEPT:{{pattern1}{pattern2}...}",
2689 " ",
2690 "/FILENAMES:{CONVERTED,LITERAL}",
2691 "  Overrides the global SET FILE NAMES setting for this transfer only.",
2692 " ",
2693 "/FILTER:command",
2694 "  Causes the incoming file to passed through the given command (standard",
2695 "  input/output filter) before being written to disk.",
2696 " ",
2697 #ifdef VMS
2698 "/IMAGE",
2699 "  Transfer in image mode.",
2700 " ",
2701 #endif /* VMS */
2702 #ifdef CK_LABELED
2703 "/LABELED",
2704 "  VMS and OS/2 only: Specifies labeled transfer mode.",
2705 " ",
2706 #endif /* CK_LABELED */
2707
2708 "/MOVE-TO:directory-name",
2709 "  Specifies that each file that arrives should be moved to the specified",
2710 "  directory after, and only if, it has been received successfully.",
2711 " ",
2712 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
2713 "  Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
2714 " ",
2715 "/PIPES:{ON,OFF}",
2716 "  Overrides the TRANSFER PIPES setting for this command only.  ON allows",
2717 "  reception of files with names like \"!tar xf -\" to be automatically",
2718 "  directed to a pipeline.",
2719 " ",
2720 "/QUIET",
2721 "  When sending in local mode, this suppresses the file-transfer display.",
2722 " ",
2723 "/RECOVER",
2724 "  Used to recover from a previously interrupted transfer; GET /RECOVER",
2725 "  is equivalent REGET.  Works only in binary mode.",
2726 " ",
2727 "/RECURSIVE",
2728 "  Tells the server to descend through the directory tree when locating",
2729 "  the files to be sent.",
2730 " ",
2731 "/RENAME-TO:string",
2732 "  Specifies that each file that arrives should be renamed as specified",
2733 "  after, and only if, it has been received successfully.  The string should",
2734 "  normally contain variables like \\v(filename) or \\v(filenum).",
2735 " ",
2736 "/TEXT",
2737 "  Performs this transfer in text mode without affecting the global",
2738 "  transfer mode.",
2739 " ",
2740 "/TRANSPARENT",
2741 "  Inhibits character-set translation of incoming text files for the duration",
2742 "  of the GET command without affecting subsequent commands.",
2743 " ",
2744 "Also see HELP MGET, HELP SEND, HELP RECEIVE, HELP SERVER, HELP REMOTE.",
2745 ""};
2746
2747 static char *hmxxlg[] = {
2748 "Syntax: LOG (or L) log-type [ filename [ { NEW, APPEND } ] ]",
2749 " ",
2750 "Record information in a log file:",
2751 " ",
2752 #ifdef CKLOGDIAL
2753 "CX",
2754 "  Connections made with SET LINE, SET PORT, SET HOST, DIAL, TELNET, etc.",
2755 "  The default filename is CX.LOG in your home directory and APPEND is the",
2756 "  default mode for opening.",
2757 " ",
2758 #endif /* CKLOGDIAL */
2759 #ifdef DEBUG
2760 "DEBUG",
2761 "  Debugging information, to help track down bugs in the C-Kermit program.",
2762 "  The default log name is debug.log in current directory.",
2763 " ",
2764 #endif /* DEBUG */
2765 "PACKETS",
2766 "  Kermit packets, to help with protocol problems.  The default filename is",
2767 "  packet.log in current directory.",
2768 " ",
2769 #ifndef NOLOCAL
2770 "SESSION",
2771 "  Records your CONNECT session (default: session.log in current directory).",
2772 " ",
2773 #endif /* NOLOCAL */
2774 #ifdef TLOG
2775 "TRANSACTIONS",
2776 "  Names and statistics about files transferred (default: transact.log in",
2777 "  current directory; see HELP SET TRANSACTION-LOG for transaction-log format",
2778 "  options.)",
2779 " ",
2780 #endif /* TLOG */
2781 "If you include the APPEND keyword after the filename, the existing log file,",
2782 "if any, is appended to; otherwise a new file is created (except APPEND is",
2783 "the default for the connection log).  Use CLOSE <keyword> to stop logging.",
2784 #ifdef OS2ORUNIX
2785 " ",
2786 "Note: The filename can also be a pipe, e.g.:",
2787 " ",
2788 "  log transactions |lpr",
2789 "  log debug {| grep \"^TELNET\" > debug.log}",
2790 " ",
2791 "Braces are required if the pipeline or filename contains spaces.",
2792 #endif /* OS2ORUNIX */
2793 "" };
2794
2795 #ifndef NOSCRIPT
2796 static char *hmxxlogi[] = { "\
2797 Syntax: SCRIPT text",
2798 "  A limited and cryptic \"login assistant\", carried over from old C-Kermit",
2799 "  releases for comptability, but not recommended for use.  Instead, please",
2800 "  use the full script programming language described in chapters 17-19 of",
2801 "  \"Using C-Kermit\".",
2802 " ",
2803 "  Login to a remote system using the text provided.  The login script",
2804 "  is intended to operate similarly to UNIX uucp \"L.sys\" entries.",
2805 "  A login script is a sequence of the form:",
2806 " ",
2807 "    expect send [expect send] . . .",
2808 " ",
2809 "  where 'expect' is a prompt or message to be issued by the remote site, and",
2810 "  'send' is the names, numbers, etc, to return.  The send may also be the",
2811 "  keyword EOT to send Control-D, or BREAK (or \\\\b) to send a break signal.",
2812 "  Letters in send may be prefixed by ~ to send special characters:",
2813 " ",
2814 "  ~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t",
2815 "  append a return, and ~o[o[o]] for octal of a character.  As with some",
2816 "  UUCP systems, sent strings are followed by ~r unless they end with ~c.",
2817 " ",
2818 "  Only the last 7 characters in each expect are matched.  A null expect,",
2819 "  e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect",
2820 "  that a sequence might not arrive, as with uucp, conditional sequences",
2821 "  may be expressed in the form:",
2822 " ",
2823 "    -send-expect[-send-expect[...]]",
2824 " ",
2825 "  where dashed sequences are followed as long as previous expects fail.",
2826 "" };
2827 #endif /* NOSCRIPT */
2828
2829 #ifndef NOFRILLS
2830 static char * hmxxtyp[] = {
2831 "Syntax: TYPE [ switches... ] file",
2832 "  Displays a file on the screen.  Pauses automatically at end of each",
2833 "  screenful if COMMAND MORE-PROMPTING is ON.  Optional switches:",
2834 " ",
2835 "  /PAGE",
2836 "     Pause at the end of each screenful even if COMMAND MORE-PROMPTING OFF.",
2837 "     Synonym: /MORE",
2838 "  /NOPAGE",
2839 "     Don't pause at the end of each screen even if COMMAND MORE-PROMPTING ON."
2840 ,
2841 "  /HEAD:n",
2842 "     Only type the first 'n' lines of the file.",
2843 "  /TAIL:n",
2844 "     Only type the last 'n' lines of the file.",
2845 "  /MATCH:pattern",
2846 "     Only type lines that match the given pattern.  HELP WILDCARDS for info",
2847 "     info about patterns.  /HEAD and /TAIL apply after /MATCH.",
2848 "  /PREFIX:string",
2849 "     Print the given string at the beginning of each line.",
2850 "  /NUMBER",
2851 "     Add line numbers (conflicts with /PREFIX)",
2852 "  /WIDTH:number",
2853 "     Truncate each line at the given column number before printing.",
2854 #ifdef KUI
2855 "     Or when combined with /GUI specifies the width of the dialog box.",
2856 "  /HEIGHT:number",
2857 "     When combined with /GUI specifies the height of the dialog box.",
2858 "  /GUI:string",
2859 "     Specifies the title to use for the dialog box.",
2860 #endif /* KUI */
2861 "  /COUNT",
2862 "     Count lines (and matches) and print the count(s) but not the lines.",
2863 #ifdef UNICODE
2864 "  /CHARACTER-SET:name",
2865 "     Translates from the named character set.",
2866 #ifndef OS2
2867 "  /TRANSLATE-TO:name",
2868 "     Translates to the named character set (default = current file charset).",
2869 #endif /* OS2 */
2870 "  /TRANSPARENT",
2871 "     Inhibits character-set translation.",
2872 #endif /* UNICODE */
2873 "  /OUTPUT:name",
2874 "     Sends results to the given file.  If this switch is omitted, the",
2875 "     results appear on your screen.  This switch overrides any express or",
2876 "     implied /PAGE switch.",
2877 " ",
2878 "You can use SET OPTIONS TYPE to set the defaults for /PAGE or /NOPAGE and",
2879 "/WIDTH.  Use SHOW OPTIONS to see current TYPE options.",
2880 ""
2881 };
2882
2883 static char * hmxxcle[] = {
2884 "Syntax: CLEAR [ item-name ]",
2885 " ",
2886 "Clears the named item.  If no item is named, DEVICE-AND-INPUT is assumed.",
2887 " ",
2888 "  ALARM            Clears any pending alarm (see SET ALARM).",
2889 #ifdef CK_APC
2890 "  APC-STATUS       Clears Application Program Command status.",
2891 #endif /* CK_APC */
2892 #ifdef PATTERNS
2893 "  BINARY-PATTERNS  Clears the file binary-patterns list.",
2894 #endif /* PATTERNS */
2895 #ifdef OS2
2896 "  COMMAND-SCREEN   Clears the current command screen.",
2897 #endif /* OS2 */
2898 "  DEVICE           Clears the current port or network input buffer.",
2899 "  DEVICE-AND-INPUT Clears both the device and the INPUT buffer.",
2900 "  DIAL-STATUS      Clears the \\v(dialstatus) variable.",
2901 "  \
2902 INPUT            Clears the INPUT-command buffer and the \\v(input) variable.",
2903 "  KEYBOARD-BUFFER  Clears the command terminal keyboard input buffer.",
2904 #ifdef OS2
2905 "  \
2906 SCROLLBACK       empties the scrollback buffer including the current screen.",
2907 #endif /* OS2 */
2908 "  SEND-LIST        Clears the current SEND list (see ADD).",
2909 #ifdef OS2
2910 "  \
2911 TERMINAL-SCREEN  Clears the current screen a places it into the scrollback.",
2912 "    buffer.",
2913 #endif /* OS2 */
2914 #ifdef PATTERNS
2915 "  TEXT-PATTERNS    Clears the file text-patterns list.",
2916 #endif /* PATTERNS */
2917 ""};
2918 #endif /* NOFRILLS */
2919
2920 static char * hmxxdate[] = {
2921 "Syntax: DATE [ date-time [ timezone ] ] [ delta-time ]",
2922 "  Prints a date-time in standard format: yyyymmdd_hh:mm:ss.",
2923 "  Various date-time formats are accepted:",
2924 " ",
2925 "  . The date, if given, must precede the time.",
2926 "  . The year must be four digits or else a 2-digit format dd mmm yy,",
2927 "    in which case if (yy < 50) yyyy = yy + 2000; else yyyy = yy + 1900.",
2928 "  . If the year comes first, the second field is the month.",
2929 "  . The day, month, and year may be separated by spaces, /, -, or underscore."
2930 ,"  . The date and time may be separated by spaces or underscore.",
2931 "  . The month may be numeric (1 = January) or spelled out or abbreviated in",
2932 "    English.",
2933 "  . The time may be in 24-hour format or 12-hour format.",
2934 "  . If the hour is 12 or less, AM is assumed unless AM or PM is included.",
2935 "  . If the date is omitted but a time is given, the current date is supplied."
2936 ,
2937 "  . If the time is given but date omitted, 00:00:00 is supplied.",
2938 "  . If both the date and time are omitted, the current date and time are",
2939 "    supplied.",
2940 " ",
2941 "  The following shortcuts can also be used in place of dates:",
2942 " ",
2943 "  TODAY",
2944 "    Today's date, optionally followed by a time; 00:00:00 if no time given.",
2945 " ",
2946 "  YESTERDAY",
2947 "    Yesterday's date, optionally followed by a time (default 00:00:00).",
2948 " ",
2949 "  TOMORROW",
2950 "    Tomorrows's date, optionally followed by a time (default 00:00:00).",
2951 " ",
2952 "  Timezone specifications are similar to those used in e-mail and HTTP",
2953 "    headers, either a USA timezone name, e.g. EST or a signed four-digit",
2954 "    timezone offset, {+,-}hhmm, e.g., -0500; it is used to convert date-time,"
2955 ,
2956 "    a local time in that timezone, to GMT which is then converted to the",
2957 "    local time at the host.  If no timezone is given, the date-time is local."
2958 ,
2959 " ",
2960 "  Delta times are given as {+,-}[number date-units][hh[:mm[:ss]]]",
2961 "    A date in the future/past relative to the date-time; date-units may be",
2962 "    DAYS, WEEKS, MONTHS, YEARS: +3days, -7weeks, +3:00, +1month 8:00.",
2963 " ",
2964 "All the formats shown above are acceptable as arguments to date-time switches"
2965 ,
2966 "such as /AFTER: or /BEFORE:, and to functions such as \\fcvtdate(),",
2967 "\\fdiffdate(), and \\futcdate(), that take date-time strings as arguments.",
2968 ""
2969 };
2970
2971
2972 #ifndef NOXFER
2973 static char * hmxxsen[] = {
2974 "Syntax: SEND (or S) [ switches...] [ filespec [ as-name ] ]",
2975 "  Sends the file or files specified by filespec.  If the filespec is omitted",
2976 "  the SEND-LIST is used (HELP ADD for more info).  The filespec may contain",
2977 "  wildcard characters.  An 'as-name' may be given to specify the name(s)",
2978 "  the files(s) are sent under; if the as-name is omitted, each file is",
2979 "  sent under its own name.  Also see HELP MSEND, HELP WILDCARD.",
2980 "  Optional switches include:",
2981 " ",
2982 #ifndef NOSPL
2983 "/ARRAY:<arrayname>",
2984 "  Specifies that the data to be sent comes from the given array, such as",
2985 "  \\&a[].  A range may be specified, e.g. SEND /ARRAY:&a[100:199].  Leave",
2986 "  the brackets empty or omit them altogether to send the whole 1-based array."
2987 ,
2988 "  Include /TEXT to have Kermit supply a line terminator at the end of each",
2989 "  array element (and translate character sets if character-set translations",
2990 "  are set up), or /BINARY to treat the array as one long string of characters"
2991 ,
2992 "  to be sent as-is.  If an as-name is not specified, the array is sent with",
2993 "  the name _ARRAY_X_, where \"X\" is replaced by actual array letter.",
2994 " ",
2995 #endif /* NOSPL */
2996
2997 "/AS-NAME:<text>",
2998 "  Specifies <text> as the name to send the file under instead of its real",
2999 "  name.  This is equivalent to giving an as-name after the filespec.",
3000 " ",
3001 "/BINARY",
3002 "  Performs this transfer in binary mode without affecting the global",
3003 "  transfer mode.",
3004 " ",
3005 "/TEXT",
3006 "  Performs this transfer in text mode without affecting the global",
3007 "  transfer mode.",
3008 " ",
3009 "/TRANSPARENT",
3010 "  Inhibits character-set translation for text files for the duration of",
3011 "  the SEND command without affecting subsequent commands.",
3012 " ",
3013 "/NOBACKUPFILES",
3014 "  Skip (don't send) Kermit or EMACS backup files (files with names that",
3015 "  end with .~n~, where n is a number).",
3016 " ",
3017 #ifdef UNIXOROSK
3018 "/DOTFILES",
3019 "  Include (send) files whose names begin with \".\".",
3020 " ",
3021 "/NODOTFILES",
3022 "  Don't send files whose names begin with \".\".",
3023 " ",
3024 "/FOLLOWLINKS",
3025 "  Send files that are pointed to by symbolic links.",
3026 " ",
3027 "/NOFOLLOWLINKS",
3028 "  Skip over symbolic links (default).",
3029 " ",
3030 #endif /* UNIXOROSK */
3031
3032 #ifdef VMS
3033 "/IMAGE",
3034 "  Performs this transfer in image mode without affecting the global",
3035 "  transfer mode.",
3036 " ",
3037 #endif /* VMS */
3038 #ifdef CK_LABELED
3039 "/LABELED",
3040 "  Performs this transfer in labeled mode without affecting the global",
3041 "  transfer mode.",
3042 " ",
3043 #endif /* CK_LABELED */
3044 "/COMMAND",
3045 "  Sends the output from a command, rather than the contents of a file.",
3046 "  The first \"filename\" on the SEND command line is interpreted as the name",
3047 "  of a command; the second (if any) is the as-name.",
3048 " ",
3049 "/FILENAMES:{CONVERTED,LITERAL}",
3050 "  Overrides the global SET FILE NAMES setting for this transfer only.",
3051 " ",
3052 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE}",
3053 "  Overrides the global SET SEND PATHNAMES setting for this transfer.",
3054 " ",
3055 "/FILTER:command",
3056 "  Specifies a command \
3057 (standard input/output filter) to pass the file through",
3058 "  before sending it.",
3059 " ",
3060 "/DELETE",
3061 "  Deletes the file (or each file in the group) after it has been sent",
3062 "  successfully (applies only to real files).",
3063 " ",
3064 "/QUIET",
3065 "  When sending in local mode, this suppresses the file-transfer display.",
3066 " ",
3067 "/RECOVER",
3068 "  Used to recover from a previously interrupted transfer; SEND /RECOVER",
3069 "  is equivalent RESEND (use in binary mode only).",
3070 " ",
3071 "/RECURSIVE",
3072 "  Tells C-Kermit to look not only in the given or current directory for",
3073 "  files that match the filespec, but also in all its subdirectories, and",
3074 "  all their subdirectories, etc.",
3075 " ",
3076 "/RENAME-TO:name",
3077 "  Tells C-Kermit to rename each source file that is sent successfully to",
3078 "  the given name (usually you should include \\v(filename) in the new name,",
3079 "  which is replaced by the original filename.",
3080 " ",
3081 "/MOVE-TO:directory",
3082 "  Tells C-Kermit to move each source file that is sent successfully to",
3083 "  the given directory.",
3084 " ",
3085 "/STARTING:number",
3086 "  Starts sending the file from the given byte position.",
3087 "  SEND /STARTING:n filename is equivalent to PSEND filename n.",
3088 " ",
3089 "/SUBJECT:text",
3090 "  Specifies the subject of an email message, to be used with /MAIL.  If the",
3091 "  text contains spaces, it must be enclosed in braces.",
3092 " ",
3093 "/MAIL:address",
3094 "  Sends the file as e-mail to the given address; use with /SUBJECT:.",
3095 " ",
3096 "/PRINT:options",
3097 "  Sends the file to be printed, with optional options for the printer.",
3098 " ",
3099 #ifdef CK_XYZ
3100 "/PROTOCOL:name",
3101 "  Uses the given protocol to send the file (Kermit, Zmodem, etc) for this",
3102 "  transfer without changing global protocol.",
3103 " ",
3104 #endif /* CK_XYZ */
3105 "/AFTER:date-time",
3106 #ifdef VMS
3107 "  Specifies that only those files created after the given date-time are",
3108 #else
3109 "  Specifies that only those files modified after the given date-time are",
3110 #endif /* VMS */
3111 "  to be sent.  HELP DATE for info about date-time formats.",
3112 " ",
3113 "/BEFORE:date-time",
3114 #ifdef VMS
3115 "  Specifies that only those files modified before the given date-time",
3116 #else
3117 "  Specifies that only those files modified before the given date-time",
3118 #endif /* VMS */
3119 "  are to be sent.",
3120 " ",
3121 "/NOT-AFTER:date-time",
3122 #ifdef VMS
3123 "  Specifies that only those files modified at or before the given date-time",
3124 #else
3125 "  Specifies that only those files modified at or before the given date-time",
3126 #endif /* VMS */
3127 "  are to be sent.",
3128 " ",
3129 "/NOT-BEFORE:date-time",
3130 #ifdef VMS
3131 "  Specifies that only those files modified at or after the given date-time",
3132 #else
3133 "  Specifies that only those files modified at or after the given date-time",
3134 #endif /* VMS */
3135 "  are to be sent.",
3136 " ",
3137 "/LARGER-THAN:number",
3138 "  Specifies that only those files longer than the given number of bytes are",
3139 "  to be sent.",
3140 " ",
3141 "/SMALLER-THAN:number",
3142 "  Specifies that only those files smaller than the given number of bytes are",
3143 "  to be sent.",
3144 " ",
3145 "/EXCEPT:pattern",
3146 "  Specifies that any files whose names match the pattern, which can be a",
3147 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
3148 "  are not to be sent.  To specify multiple patterns (up to 8), use outer",
3149 "  braces around the group, and inner braces around each pattern:",
3150 " ",
3151 "    /EXCEPT:{{pattern1}{pattern2}...}",
3152 " ",
3153 "/TYPE:{ALL,TEXT,BINARY}",
3154 "  Send only files of the given type (see SET FILE SCAN).",
3155 " ",
3156 "/LISTFILE:filename",
3157 "  Specifies the name of a file that contains the list of names of files",
3158 "  that are to be sent.  The filenames should be listed one name per line",
3159 "  in this file (but a name can contain wildcards).",
3160 " ",
3161 "Also see HELP RECEIVE, HELP GET, HELP SERVER, HELP REMOTE.",
3162 ""};
3163
3164 static char *hmxxrc[] = {
3165 "Syntax: RECEIVE (or R) [ switches... ] [ as-name ]",
3166 "  Wait for a file to arrive from the other Kermit, which must be given a",
3167 "  SEND command.  If the optional as-name is given, the incoming file or",
3168 "  files are stored under that name, otherwise it will be stored under",
3169 #ifndef CK_TMPDIR
3170 "  the name it arrives with.",
3171 #else
3172 #ifdef OS2
3173 "  the name it arrives with.  If the filespec denotes a disk and/or",
3174 "  directory, the incoming file or files will be stored there.",
3175 #else
3176 "  the name it arrives with.  If the filespec denotes a directory, the",
3177 "  incoming file or files will be placed in that directory.",
3178 #endif /* OS2 */
3179 #endif /* CK_TMPDIR */
3180 " ",
3181 "Optional switches include:",
3182 " ",
3183 "/AS-NAME:text",
3184 "  Specifies \"text\" as the name to store the incoming file under.",
3185 "  You can also specify the as-name as a filename on the command line.",
3186 " ",
3187 "/BINARY",
3188 "  Skips text-mode conversions unless the incoming file arrives with binary",
3189 "  attribute",
3190 " ",
3191 "/COMMAND",
3192 "  Receives the file into the standard input of a command, rather than saving",
3193 "  it on disk.  The /AS-NAME or the \"filename\" on the RECEIVE command line",
3194 "  is interpreted as the name of a command.",
3195 " ",
3196 "/EXCEPT:pattern",
3197 "  Specifies that any files whose names match the pattern, which can be a",
3198 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
3199 "  are to be refused.  To specify multiple patterns (up to 8), use outer",
3200 "  braces around the group, and inner braces around each pattern:",
3201 " ",
3202 "    /EXCEPT:{{pattern1}{pattern2}...}",
3203 " ",
3204 "/FILENAMES:{CONVERTED,LITERAL}",
3205 "  Overrides the global SET FILE NAMES setting for this transfer only.",
3206 " ",
3207 "/FILTER:command",
3208 "  Causes the incoming file to passed through the given command (standard",
3209 "  input/output filter) before being written to disk.",
3210 " ",
3211 #ifdef VMS
3212 "/IMAGE",
3213 "  Receives the file in image mode.",
3214 " ",
3215 #endif /* VMS */
3216 #ifdef CK_LABELED
3217 "/LABELED",
3218 "  Specifies labeled transfer mode.",
3219 " ",
3220 #endif /* CK_LABELED */
3221
3222 "/MOVE-TO:directory-name",
3223 "  Specifies that each file that arrives should be moved to the specified",
3224 "  directory after, and only if, it has been received successfully.",
3225 " ",
3226 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
3227 "  Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
3228 " ",
3229 "/PIPES:{ON,OFF}",
3230 "  Overrides the TRANSFER PIPES setting for this command only.  ON allows",
3231 "  reception of files with names like \"!tar xf -\" to be automatically",
3232 "  directed to a pipeline.",
3233 " ",
3234 "/PROTOCOL:name",
3235 "  Use the given protocol to receive the incoming file(s).",
3236 " ",
3237 "/QUIET",
3238 "  When sending in local mode, this suppresses the file-transfer display.",
3239 " ",
3240 "/RECURSIVE",
3241 "  Equivalent to /PATHNAMES:RELATIVE.",
3242 " ",
3243 "/RENAME-TO:string",
3244 "  Specifies that each file that arrives should be renamed as specified",
3245 "  after, and only if, it has been received successfully.  The string should",
3246 "  normally contain variables like \\v(filename) or \\v(filenum).",
3247 " ",
3248 "/TEXT",
3249 "  Forces text-mode conversions unless the incoming file has the binary",
3250 "  attribute",
3251 " ",
3252 "/TRANSPARENT",
3253 "  Inhibits character-set translation of incoming text files for the duration",
3254 "  of the RECEIVE command without affecting subsequent commands.",
3255 " ",
3256 "Also see HELP SEND, HELP GET, HELP SERVER, HELP REMOTE.",
3257 "" };
3258
3259 #ifndef NORESEND
3260 static char *hmxxrsen = "\
3261 Syntax: RESEND filespec [name]\n\n\
3262   Resend the file or files, whose previous transfer was interrupted.\n\
3263   Picks up from where previous transfer left off, IF the receiver was told\n\
3264   to SET FILE INCOMPLETE KEEP.  Only works for binary-mode transfers.\n\
3265   Requires the other Kermit to have RESEND capability.";
3266
3267 static char *hmxxrget = "\
3268 Syntax: REGET filespec\n\n\
3269   Ask a server to RESEND a file to C-Kermit.";
3270
3271 static char *hmxxpsen = "\
3272 Syntax: PSEND filespec position [name]\n\n\
3273   Just like SEND, except sends the file starting at the given byte position.";
3274 #endif /* NORESEND */
3275
3276 #ifndef NOMSEND
3277 static char *hmxxmse[] = {
3278 "Syntax: MSEND [ switches... ] filespec [ filespec [ ... ] ]",
3279 "  Sends the files specified by the filespecs.  One or more filespecs may be",
3280 "  listed, separated by spaces.  Any or all filespecs may contain wildcards",
3281 "  and they may be in different directories.  Alternative names cannot be",
3282 "  given.  Switches include /BINARY /DELETE /MAIL /PROTOCOL /QUIET /RECOVER",
3283 "  /TEXT /TYPE; see HELP SEND for descriptions.",
3284 ""
3285 };
3286 #endif /* NOMSEND */
3287
3288 static char *hmxxadd[] = {
3289 #ifndef NOMSEND
3290 "ADD SEND-LIST filespec [ <mode> [ <as-name> ] ]",
3291 "  Adds the specified file or files to the current SEND list.  Use SHOW",
3292 "  SEND-LIST and CLEAR SEND-LIST to display and clear the list; use SEND",
3293 "  by itself to send the files from it.",
3294 " ",
3295 #endif /* NOMSEND */
3296 #ifdef PATTERNS
3297 "ADD BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3298 "  Adds the pattern(s), if any, to the SET FILE BINARY-PATTERNS list.",
3299 " ",
3300 "ADD TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3301 "  Adds the pattern(s), if any, to the SET FILE TEXT-PATTERNS list.",
3302 "  Use SHOW PATTERNS to see the lists.  See HELP SET FILE for further info.",
3303 #endif /* PATTERNS */
3304 ""};
3305
3306 static char *hmxxremv[] = {
3307 #ifdef PATTERNS
3308 "REMOVE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3309 "  Removes the pattern(s), if any, from the SET FILE BINARY-PATTERNS list",
3310 " ",
3311 "REMOVE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3312 "  Removes the given patterns from the SET FILE TEXT-PATTERNS list.",
3313 "  Use SHOW PATTERNS to see the lists.  See HELP SET FILE for further info.",
3314 #endif /* PATTERNS */
3315 ""};
3316 #endif /* NOXFER */
3317
3318 #ifndef NOSERVER
3319 static char *hmxxser = "Syntax: SERVER\n\
3320   Enter server mode on the current connection.  All further commands\n\
3321   are taken in packet form from the other Kermit program.  Use FINISH,\n\
3322   BYE, or REMOTE EXIT to get C-Kermit out of server mode.";
3323 #endif /* NOSERVER */
3324
3325 static char *hmhset[] = {
3326 "  The SET command establishes communication, file, scripting, or other",
3327 "  parameters.  The SHOW command can be used to display the values of",
3328 "  SET parameters.  Help is available for each individual parameter;",
3329 "  type HELP SET ? to see what's available.",
3330 "" };
3331
3332 #ifndef NOSETKEY
3333 static char *hmhskey[] = {
3334 "Syntax: SET KEY k text",
3335 "Or:     SET KEY CLEAR",
3336 "  Configure the key whose \"scan code\" is k to send the given text when",
3337 "  pressed during CONNECT mode.  SET KEY CLEAR restores all the default",
3338 "  key mappings.  If there is no text, the default key binding is restored",
3339 #ifndef NOCSETS
3340 "  for the key k.  SET KEY mappings take place before terminal character-set",
3341 "  translation.",
3342 #else
3343 "  the key k.",
3344 #endif /* NOCSETS */
3345 #ifdef OS2
3346 " ",
3347 "  The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
3348 "  keypad, function, or editing keys, etc.  For a list of available keyboard",
3349 "  verbs, type SHOW KVERBS.",
3350 #endif /* OS2 */
3351 " ",
3352 "  To find out the scan code and mapping for a particular key, use the",
3353 "  SHOW KEY command.",
3354 ""};
3355 #endif /* NOSETKEY */
3356
3357 static char *hmxychkt[] = { "Syntax: SET BLOCK-CHECK type",
3358 " ",
3359 "  Type of packet block check to be used for error detection, 1, 2, 3, or",
3360 "  BLANK-FREE-2.  Type 1 is standard, and catches most errors.  Types 2 and 3",
3361 "  specify more rigorous checking at the cost of higher overhead.  The",
3362 "  BLANK-FREE-2 type is the same as Type 2, but is guaranteed to contain no",
3363 "  blanks.",
3364 "" };
3365
3366 static char * hmxydeb[] = {
3367 "Syntax: SET DEBUG { SESSION, ON, OFF, TIMESTAMP }",
3368 " ",
3369 "SET DEBUG ON",
3370 #ifdef DEBUG
3371 "  Opens a debug log file named debug.log in the current directory.",
3372 "  Use LOG DEBUG if you want specify a different log file name or path.",
3373 #else
3374 "  (Has no effect in this version of Kermit.)",
3375 #endif /* DEBUG */
3376 " ",
3377 "SET DEBUG OFF",
3378 "  Stops debug logging and session debugging.",
3379 " ",
3380 "SET DEBUG SESSION",
3381 #ifndef NOLOCAL
3382 "  Displays control and 8-bit characters symbolically during CONNECT mode.",
3383 "  Equivalent to SET TERMINAL DEBUG ON.",
3384 #else
3385 "  (Has no effect in this version of Kermit.)",
3386 #endif /* NOLOCAL */
3387 " ",
3388 "SET DEBUG TIMESTAMP { ON, OFF }",
3389 "  Enables/Disables timestamps on debug log entries.",
3390 "" };
3391
3392 #ifdef CK_SPEED
3393 static char *hmxyqctl[] = {
3394 "Syntax: SET CONTROL-CHARACTER { PREFIXED, UNPREFIXED } { <code>..., ALL }",
3395 " ",
3396 "  <code> is the numeric ASCII code for a control character 1-31,127-159,255."
3397 ,
3398 "  The word \"ALL\" means all characters in this range.",
3399 " ",
3400 "  PREFIXED <code> means the given control character must be converted to a",
3401 "  printable character and prefixed, the default for all control characters.",
3402 " ",
3403 "  UNPREFIXED <code> means you think it is safe to send the given control",
3404 "  character as-is, without a prefix.  USE THIS OPTION AT YOUR OWN RISK!",
3405 " ",
3406 "  SHOW CONTROL to see current settings.  SET CONTROL PREFIXED ALL is",
3407 "  recommended for safety.  You can include multiple <code> values in one",
3408 "  command, separated by spaces.",
3409 "" };
3410 #endif /* CK_SPEED */
3411
3412 #ifndef NODIAL
3413 static char *hxymodm[] = {
3414 "Syntax: SET MODEM <parameter> <value> ...",
3415 " ",
3416 "Note: Many of the SET MODEM parameters are configured automatically when",
3417 "you SET MODEM TYPE, according to the modem's capabilities.  SHOW MODEM to",
3418 "see them.  Also see HELP DIAL and HELP SET DIAL.",
3419 " ",
3420 "SET MODEM TYPE <name>",
3421
3422 " Tells Kermit which kind of modem you have, so it can issue the",
3423 " appropriate modem-specific commands for configuration, dialing, and",
3424 " hanging up.  For a list of the modem types known to Kermit, type \"set",
3425 " modem type ?\".  The default modem type is GENERIC, which should work",
3426 " with any AT command-set modem that is configured for error correction,",
3427 " data compression, and hardware flow control.  Use SET MODEM TYPE NONE",
3428 " for direct serial, connections.  Use SET MODEM TYPE USER-DEFINED to use",
3429 " a type of modem that is not built in to Kermit, and then use SET MODEM",
3430 " CAPABILITIES, SET MODEM, DIAL-COMMAND, and SET MODEM COMMAND to tell",
3431 " Kermit how to configure and control it.",
3432
3433 " ",
3434
3435 "SET MODEM CAPABILITIES <list>",
3436 "  Use this command for changing Kermit's idea of your modem's capabilities,",
3437 "  for example, if your modem is supposed to have built-in error correction",
3438 "  but in fact does not.  Also use this command to define the capabilities",
3439 "  of a USER-DEFINED modem.  Capabilities are:",
3440 " ",
3441 "    AT      AT-commands",
3442 "    DC      data-compression",
3443 "    EC      error-correction",
3444 "    HWFC    hardware-flow",
3445 "    ITU     v25bis-commands",
3446 "    SWFC    software-flow",
3447 "    KS      kermit-spoof",
3448 "    SB      speed-buffering",
3449 "    TB      Telebit",
3450 " ",
3451 "SET MODEM CARRIER-WATCH { AUTO, ON, OFF }",
3452 "  Synonym for SET CARRIER-WATCH (q.v.)",
3453 " ",
3454 "SET MODEM COMPRESSION { ON, OFF }",
3455 "  Enables/disables the modem's data compression feature, if any.",
3456 " ",
3457 "SET MODEM DIAL-COMMAND <text>",
3458 "  The text replaces Kermit's built-in modem dialing command.  It must",
3459 "  include '%s' (percent s) as a place-holder for the telephone numbers",
3460 "  given in your DIAL commands.",
3461 " ",
3462 "SET MODEM ERROR-CORRECTION { ON, OFF }",
3463 "  Enables/disables the modem's error-correction feature, if any.",
3464 " ",
3465 "SET MODEM ESCAPE-CHARACTER number",
3466 "  Numeric ASCII value of modem's escape character, e.g. 43 for '+'.",
3467 "  For Hayes-compatible modems, Kermit uses three copies, e.g. \"+++\".",
3468 " ",
3469 "SET MODEM FLOW-CONTROL {AUTO, NONE, RTS/CTS, XON/XOFF}",
3470 "  Selects the type of local flow control to be used by the modem.",
3471 " ",
3472 "SET MODEM HANGUP-METHOD { MODEM-COMMAND, RS232-SIGNAL, DTR }",
3473 "  How hangup operations should be done.  MODEM-COMMAND means try to",
3474 "  escape back to the modem's command processor and give a modem-specific",
3475 "  hangup command.  RS232-SIGNAL means turn off the DTR signal.  DTR is a",
3476 "  synonym for RS232-SIGNAL.",
3477 " ",
3478 "SET MODEM KERMIT-SPOOF {ON, OFF}",
3479 "  If the selected modem type supports the Kermit protocol directly,",
3480 "  use this command to turn its Kermit protocol function on or off.",
3481 " ",
3482 "SET MODEM MAXIMUM-SPEED <number>",
3483 "  Specify the maximum interface speed for the modem.",
3484 " ",
3485 "SET MODEM NAME <text>",
3486 "  Descriptive name for a USER-DEFINED modem.",
3487 " ",
3488 "SET MODEM SPEAKER {ON, OFF}",
3489 "  Turns the modem's speaker on or off during dialing.",
3490 " ",
3491 "SET MODEM SPEED-MATCHING {ON, OFF}",
3492 "  ON means that C-Kermit changes its serial interface speed to agree with",
3493 "  the speed reported by the modem's CONNECT message, if any.  OFF means",
3494 "  Kermit should not change its interface speed.",
3495 " ",
3496 "SET MODEM VOLUME {LOW, MEDIUM, HIGH}",
3497 "  Selects the desired modem speaker volume for when the speaker is ON.",
3498 " ",
3499 "SET MODEM COMMAND commands are used to override built-in modem commands for",
3500 "each modem type, or to fill in commands for the USER-DEFINED modem type.",
3501 "Omitting the optional [ text ] restores the built-in modem-specific command,",
3502 "if any:",
3503 " ",
3504 "SET MODEM COMMAND AUTOANSWER {ON, OFF} [ text ]",
3505 "  Modem commands to turn autoanswer on and off.",
3506 " ",
3507 "SET MODEM COMMAND COMPRESSION {ON, OFF} [ text ]",
3508 "  Modem commands to turn data compression on and off.",
3509 " ",
3510 "SET MODEM COMMAND ERROR-CORRECTION {ON, OFF} [ text ]",
3511 "  Modem commands to turn error correction on and off.",
3512 " ",
3513 "SET MODEM COMMAND HANGUP [ text ]",
3514 "  Command that tells the modem to hang up the connection.",
3515 " ",
3516 "SET MODEM COMMAND IGNORE-DIALTONE [ text ]",
3517 "  Command that tells the modem not to wait for dialtone before dialing.",
3518 " ",
3519 "SET MODEM COMMAND INIT-STRING [ text ]",
3520 "  The 'text' is a replacement for C-Kermit's built-in initialization command",
3521 "  for the modem.",
3522 " ",
3523 "SET MODEM COMMAND PREDIAL-INIT [ text ]",
3524 "  A second INIT-STRING that is to be sent to the modem just prior to \
3525 dialing.",
3526 " ",
3527 "SET MODEM COMMAND HARDWARE-FLOW [ text ]",
3528 "  Modem command to enable hardware flow control (RTS/CTS) in the modem.",
3529 " ",
3530 "SET MODEM COMMAND SOFTWARE-FLOW [ text ]",
3531 "  Modem command to enable local software flow control (Xon/Xoff) in modem.",
3532 " ",
3533 "SET MODEM COMMAND SPEAKER { ON, OFF } [ text ]",
3534 "  Modem command to turn the modem's speaker on or off.",
3535 " ",
3536 "SET MODEM COMMAND NO-FLOW-CONTROL [ text ]",
3537 "  Modem command to disable local flow control in the modem.",
3538 " ",
3539 "SET MODEM COMMAND PULSE [ text ]",
3540 "  Modem command to select pulse dialing.",
3541 " ",
3542 "SET MODEM COMMAND TONE [ text ]",
3543 "  Modem command to select tone dialing.",
3544 " ",
3545 "SET MODEM COMMAND VOLUME { LOW, MEDIUM, HIGH } [ text ]",
3546 "  Modem command to set the modem's speaker volume.",
3547 ""};
3548
3549 static char *hmxydial[] = {
3550 "The SET DIAL command establishes or changes all parameters related to",
3551 "dialing the telephone.  Also see HELP DIAL and HELP SET MODEM.  Use SHOW",
3552 "DIAL to display all of the SET DIAL values.",
3553 " ",
3554 "SET DIAL COUNTRY-CODE <number>",
3555 "  Tells Kermit the telephonic country-code of the country you are dialing",
3556 "  from, so it can tell whether a portable-format phone number from your",
3557 "  dialing directory will result in a national or an international call.",
3558 "  Examples: 1 for USA, Canada, Puerto Rico, etc; 7 for Russia, 39 for Italy,",
3559 "  351 for Portugal, 47 for Norway, 44 for the UK, 972 for Israel, 81 for",
3560 "  Japan, ...",
3561 " ",
3562 "  If you have not already set your DIAL INTL-PREFIX and LD-PREFIX, then this",
3563 "  command sets default values for them: 011 and 1, respectively, for country",
3564 "  code 1; 00 and 0, respectively, for all other country codes.  If these are",
3565 "  not your true international and long-distance dialing prefixes, then you",
3566 "  should follow this command by DIAL INTL-PREFIX and LD-PREFIX to let Kermit",
3567 "  know what they really are.",
3568 " ",
3569 "SET DIAL AREA-CODE [ <number> ]",
3570 "  Tells Kermit the area or city code that you are dialing from, so it can",
3571 "  tell whether a portable-format phone number from the dialing directory is",
3572 "  local or long distance.  Be careful not to include your long-distance",
3573 "  dialing prefix as part of your area code; for example, the area code for",
3574 "  central London is 171, not 0171.",
3575 " ",
3576 "SET DIAL CONFIRMATION {ON, OFF}",
3577 "  Kermit does various transformations on a telephone number retrieved from",
3578 "  the dialing directory prior to dialing (use LOOKUP <name> to see them).",
3579 "  In case the result might be wrong, you can use SET DIAL CONFIRM ON to have",
3580 "  Kermit ask you if it is OK to dial the number, and if not, to let you type",
3581 "  in a replacement.",
3582 " ",
3583 "SET DIAL CONNECT { AUTO, ON, OFF }",
3584 "  Whether to CONNECT (enter terminal mode) automatically after successfully",
3585 "  dialing.  ON means to do this; OFF means not to.  AUTO (the default) means",
3586 "  do it if the DIAL command was given interactively, but don't do it if the",
3587 "  DIAL command was issued from a macro or command file.  If you specify ON",
3588 "  or AUTO, you may follow this by one of the keywords VERBOSE or QUIET, to",
3589 "  indicate whether the verbose 4-line 'Connecting...' message is to be",
3590 "  displayed if DIAL succeeds and Kermit goes into CONNECT mode.",
3591 " ",
3592 "SET DIAL CONVERT-DIRECTORY {ASK, ON, OFF}",
3593 "  The format of Kermit's dialing directory changed in version 5A(192).  This",
3594 "  command tells Kermit what to do when it encounters an old-style directory:",
3595 "  ASK you whether to convert it, or convert it automatically (ON), or leave",
3596 "  it alone (OFF).  Old-style directories can still be used without",
3597 "  conversion, but the parity and speed fields are ignored.",
3598 " ",
3599 "SET DIAL DIRECTORY [ filename [ filename [ filename [ ... ] ] ] ]",
3600 "  The name(s) of your dialing directory file(s).  If you do not supply any",
3601 "  filenames, the  dialing directory feature is disabled and all numbers are",
3602 "  dialed literally as given in the DIAL command.  If you supply more than",
3603 "  one directory, all of them are searched.",
3604 " ",
3605 "SET DIAL SORT {ON, OFF}",
3606 "  When multiple entries are obtained from your dialing directory, they are",
3607 "  sorted in \"cheapest-first\" order.  If this does not produce the desired",
3608 "  effect, SET DIAL SORT OFF to disable sorting, and the numbers will be",
3609 "  dialed in the order in which they were found.",
3610 " ",
3611 "SET DIAL DISPLAY {ON, OFF}",
3612 "  Whether to display dialing progress on the screen; default is OFF.",
3613 " ",
3614 "SET DIAL HANGUP {ON, OFF}",
3615 "  Whether to hang up the phone prior to dialing; default is ON.",
3616 " ",
3617 "SET DIAL IGNORE-DIALTONE {ON, OFF}",
3618 "  Whether to ignore dialtone when dialing; default is OFF.",
3619 " ",
3620 #ifndef NOSPL
3621 "SET DIAL MACRO [ name ]",
3622 "  Specify the name of a macro to execute on every phone number dialed, just",
3623 "  prior to dialing it, in order to perform any last-minute alterations.",
3624 " ",
3625 #endif /* NOSPL */
3626 "SET DIAL METHOD {AUTO, DEFAULT, TONE, PULSE}",
3627 "  Whether to use the modem's DEFAULT dialing method, or to force TONE or",
3628 "  PULSE dialing.  AUTO (the default) means to choose tone or pulse dialing",
3629 "  based on the country code.  (Also see SET DIAL TONE-COUNTRIES and SET DIAL",
3630 "  PULSE-COUNTRIES.)",
3631 " ",
3632 "SET DIAL PACING number",
3633 "  How many milliseconds to pause between sending each character to the modem",
3634 "  dialer.  The default is -1, meaning to use the number from the built-in",
3635 " modem database.",
3636 "  ",
3637 "SET DIAL PULSE-COUNTRIES [ cc [ cc [ ... ] ] ]",
3638 "  Sets the list of countries in which pulse dialing is required.  Each cc",
3639 "  is a country code.",
3640 " ",
3641 "SET DIAL TEST { ON, OFF }",
3642 "  OFF for normal dialing.  Set to ON to test dialing procedures without",
3643 "  actually dialing.",
3644 " ",
3645 "SET DIAL TONE-COUNTRIES [ cc [ cc [ ... ] ] ]",
3646 "  Sets the list of countries in which tone dialing is available.  Each cc",
3647 "  is a country code.",
3648 " ",
3649 "SET DIAL TIMEOUT number",
3650 "  How many seconds to wait for a dialed call to complete.  Use this command",
3651 "  to override the DIAL command's automatic timeout calculation.  A value",
3652 "  of 0 turns off this feature and returns to Kermit's automatic dial",
3653 "  timeout calculation.",
3654 " ",
3655 "SET DIAL RESTRICT { INTERNATIONAL, LOCAL, LONG-DISTANCE, NONE }",
3656 "  Prevents placing calls of the type indicated, or greater.  For example",
3657 "  SET DIAL RESTRICT LONG prevents placing of long-distance and international",
3658 "  calls.  If this command is not given, there are no restrictions.  Useful",
3659 "  when dialing a list of numbers fetched from a dialing directory.",
3660 " ",
3661 "SET DIAL RETRIES <number>",
3662 "  How many times to redial each number if the dialing result is busy or no",
3663 "  no answer, until the call is succesfully answered.  The default is 0",
3664 "  because automatic redialing is illegal in some countries.",
3665 " ",
3666 "SET DIAL INTERVAL <number>",
3667 "  How many seconds to pause between automatic redial attempts; default 10.",
3668 " ",
3669 "The following commands apply to all phone numbers, whether given literally",
3670 "or found in the dialing directory:",
3671 " ",
3672 "SET DIAL PREFIX [ text ]",
3673 "  Establish a prefix to be applied to all phone numbers that are dialed,",
3674 "  for example to disable call waiting.",
3675 " ",
3676 "SET DIAL SUFFIX [ text ]",
3677 "  Establish a suffix to be added after all phone numbers that are dialed.",
3678 " ",
3679 "The following commands apply only to portable-format numbers obtained from",
3680 "the dialing directory; i.e. numbers that start with a \"+\" sign and",
3681 "country code, followed by area code in parentheses, followed by the phone",
3682 "number.",
3683 " ",
3684 "SET DIAL LC-AREA-CODES [ <list> ]",
3685 "  Species a list of area codes to which dialing is local, i.e. does not",
3686 "  require the LD-PREFIX.  Up to 32 area codes may be listed, separated by",
3687 "  spaces.  Any area codes in this list will be included in the final dial",
3688 "  string so do not include your own area code if it should not be dialed.",
3689 " ",
3690 "SET DIAL LC-PREFIX [ <text> ]",
3691 "  Specifies a prefix to be applied to local calls made from portable dialing",
3692 "  directory entries.  Normally no prefix is used for local calls.",
3693 " ",
3694 "SET DIAL LC-SUFFIX [ <text> ]",
3695 "  Specifies a suffix to be applied to local calls made from portable dialing",
3696 "  directory entries.  Normally no suffix is used for local calls.",
3697 " ",
3698 "SET DIAL LD-PREFIX [ <text> ]",
3699 "  Your long-distance dialing prefix, to be used with portable dialing",
3700 "  directory entries that result in long-distance calls.",
3701 " ",
3702 "SET DIAL LD-SUFFIX [ <text> ]",
3703 "  Long-distance dialing suffix, if any, to be used with portable dialing",
3704 "  directory entries that result in long-distance calls.  This would normally",
3705 "  be used for appending a calling-card number to the phone number.",
3706 " ",
3707 "SET DIAL FORCE-LONG-DISTANCE { ON, OFF }",
3708 "  Whether to force long-distance dialing for calls that normally would be",
3709 "  local.  For use (e.g.) in France.",
3710 " ",
3711 "SET DIAL TOLL-FREE-AREA-CODE [ <number> [ <number> [ ... ] ] ]",
3712 "  Tells Kermit the toll-free area code(s) in your country.",
3713 " ",
3714 "SET DIAL TOLL-FREE-PREFIX [ <text> ]",
3715 "  You toll-free dialing prefix, in case it is different from your long-",
3716 "  distance dialing prefix.",
3717 " ",
3718 "SET DIAL INTL-PREFIX <text>",
3719 "  Your international dialing prefix, to be used with portable dialing",
3720 "  directory entries that result in international calls.",
3721 " ",
3722 "SET DIAL INTL-SUFFIX <text>",
3723 "  International dialing suffix, if any, to be used with portable dialing",
3724 "  directory entries that result in international calls.",
3725 " ",
3726 "SET DIAL PBX-OUTSIDE-PREFIX <text>",
3727 "  Use this to tell Kermit how to get an outside line when dialing from a",
3728 "  Private Branch Exchange (PBX).",
3729 " ",
3730 "SET DIAL PBX-EXCHANGE <text> [ <text> [ ... ] ]",
3731 "  If PBX-OUTSIDE-PREFIX is set, then you can use this command to tell Kermit",
3732 "  the leading digits of one or more local phone numbers that identify it as",
3733 "  being on your PBX, so it can make an internal call by deleting those digits"
3734 ,
3735 "  from the phone number.",
3736 " ",
3737 "SET DIAL PBX-INTERNAL-PREFIX <text>",
3738 "  If PBX-EXCHANGE is set, and Kermit determines from it that a call is",
3739 "  internal, then this prefix, if any, is added to the number prior to",
3740 "  \
3741 dialing.  Use this if internal calls from your PBX require a special prefix.",
3742 "" };
3743 #endif /* NODIAL */
3744
3745 static char *hmxyflo[] = { "Syntax: SET FLOW [ switch ] value",
3746 " ",
3747 #ifndef NOLOCAL
3748 "  Selects the type of flow control to use during file transfer, terminal",
3749 "  connection, and script execution.",
3750 #else
3751 "  Selects the type of flow control to use during file transfer.",
3752 #endif /* NOLOCAL */
3753 " ",
3754 "  Switches let you associate a particular kind of flow control with each",
3755 "  kind of connection: /REMOTE, /MODEM, /DIRECT-SERIAL, /TCPIP, etc; type",
3756 "  \"set flow ?\" for a list of available switches.  Then whenever you make",
3757 "  a connection, the associated flow-control is chosen automatically.",
3758 "  The flow-control values are NONE, KEEP, XON/XOFF, and possibly RTS/CTS",
3759 "  and some others; again, type \"set flow ?\" for a list.  KEEP tells Kermit",
3760 "  not to try to change the current flow-control method for the connection.",
3761 " ",
3762 "  If you omit the switch and simply supply a value, this value becomes the",
3763 "  current flow control type, overriding any default value that might have",
3764 "  been chosen in your most recent SET LINE, SET PORT, or SET HOST, or other",
3765 "  connection-establishment command.",
3766 " ",
3767 "  Type SHOW FLOW-CONTROL to see the current defaults for each connection type"
3768 ,
3769 "  as well as the current connection type and flow-control setting.  SHOW",
3770 "  COMMUNICATIONS also shows the current flow-control setting.",
3771 ""};
3772
3773 static char *hmxyf[] = {
3774 "Syntax: SET FILE parameter value",
3775 " ",
3776 "Sets file-related parameters.  Use SHOW FILE to view them.  Also see SET",
3777 "(and SHOW) TRANSFER and PROTOCOL.",
3778 " ",
3779 #ifdef VMS
3780 "SET FILE TYPE { TEXT, BINARY, IMAGE, LABELED }",
3781 #else
3782 #ifdef STRATUS
3783 "SET FILE TYPE { TEXT, BINARY, LABELED }",
3784 #else
3785 #ifdef MAC
3786 "SET FILE TYPE { TEXT, BINARY, MACBINARY }",
3787 #else
3788 "SET FILE TYPE { TEXT, BINARY }",
3789 #endif /* STRATUS */
3790 #endif /* MAC */
3791 #endif /* VMS */
3792 "  How file contents are to be treated during file transfer in the absence",
3793 "  of any other indication.  TYPE can be TEXT for conversion of record format",
3794 "  and character set, which is usually needed when transferring text files",
3795 "  between unlike platforms (such as UNIX and Windows), or BINARY for no",
3796 "  conversion if TRANSFER MODE is MANUAL, which is not the default.  Use",
3797 "  BINARY with TRANSFER MODE MANUAL for executable programs or binary data or",
3798 "  whenever you wish to duplicate the original contents of the file, byte for"
3799 ,
3800 "  byte.  In most modern Kermit programs, the file sender informs the receiver"
3801 ,
3802 "  of the file type automatically.  However, when sending files from C-Kermit",
3803 "  to an ancient or non-Columbia Kermit implementation, you might need to set",
3804 "  the corresponding file type at the receiver as well.",
3805 " ",
3806 #ifdef VMS
3807 "  FILE TYPE settings of TEXT and BINARY have no effect when sending files,",
3808 "  since VMS C-Kermit determines each file's type automatically from its",
3809 "  record format: binary for fixed, text for others.  For incoming files,",
3810 "  these settings are effective only in the absence of a file-type indication",
3811 "  from the sender.",
3812 " ",
3813 "  You may include an optional record-format after the word BINARY.  This may",
3814 "  be FIXED (the default) or UNDEFINED.  UNDEFINED is used when you need to",
3815 "  receive binary files in binary mode and have them stored with UNDEFINED",
3816 "  record format, which is required by certain VMS applications.",
3817 " ",
3818 "  Two additional VMS file types are also supported: IMAGE and LABELED.",
3819 "  IMAGE means raw block i/o, no interference from RMS, applies to file",
3820 "  transmission only, and overrides the normal automatica file type",
3821 "  determination.   LABELED means to send or interpret RMS attributes",
3822 "  with the file.",
3823 " ",
3824 #else
3825 "  When TRANSFER MODE is AUTOMATIC (as it is by default), various automatic",
3826 "  methods (depending on the platform) are used to determine whether a file",
3827 "  is transferred in text or binary mode; these methods (which might include",
3828 "  content scan (see SET FILE SCAN below), filename pattern matching (SET FILE"
3829 ,
3830 "  PATTERNS), client/server \"kindred-spirit\" recognition, or source file",
3831 "  record format) supersede the FILE TYPE setting but can, themselves, be",
3832 "  superseded by including a /BINARY or /TEXT switch in the SEND, GET, or",
3833 "  RECEIVE command.",
3834 " ",
3835 "  When TRANSFER MODE is MANUAL, the automatic methods are skipped for sending"
3836 ,
3837 "  files; the FILE TYPE setting is used instead, which can be superseded on",
3838 "  a per-command basis with a /TEXT or /BINARY switch.",
3839 #endif /* VMS */
3840 " ",
3841
3842 #ifndef NOXFER
3843
3844 "SET FILE BYTESIZE { 7, 8 }",
3845 "  Normally 8.  If 7, Kermit truncates the 8th bit of all file bytes.",
3846 " ",
3847 #ifndef NOCSETS
3848 "SET FILE CHARACTER-SET name",
3849 "  Tells the encoding of the local file, ASCII by default.",
3850 "  The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646",
3851 "  national character sets.  LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1",
3852 "  for Western European languages.",
3853 "  NEXT is the 8-bit character set of the NeXT workstation.",
3854 "  The CPnnn sets are for PCs.  MACINTOSH-LATIN is for the Macintosh.",
3855 #ifndef NOLATIN2
3856 "  LATIN2 is ISO 8859-2 for Eastern European languages that are written with",
3857 "  Roman letters.  Mazovia is a PC code page used in Poland.",
3858 #endif /* NOLATIN2 */
3859 #ifdef CYRILLIC
3860 "  KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.",
3861 "  SHORT-KOI is a 7-bit ASCII coding for Cyrillic.  BULGARIA-PC is a PC code",
3862 "  page used in Bulgaria",
3863 #endif /* CYRILLIC */
3864 #ifdef HEBREW
3865 "  HEBREW-ISO is ISO 8859-8 Latin/Hebrew.  CP862 is the Hebrew PC code page.",
3866 "  HEBREW-7 is like ASCII with the lowercase letters replaced by Hebrew.",
3867 #endif /* HEBREW */
3868 #ifdef GREEK
3869 "  GREEK-ISO is ISO 8859-7 Latin/Greek.  CP869 is the Greek PC code page.",
3870 "  ELOT-927 is like ASCII with the lowercase letters replaced by Greek.",
3871 #endif /* GREEK */
3872 #ifdef KANJI
3873 "  JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI are Japanese",
3874 "  Kanji character sets.",
3875 #endif /* KANJI */
3876 #ifdef UNICODE
3877 "  UCS-2 is the 2-byte form of the Universal Character Set.",
3878 "  UTF-8 is the serialized form of the Universal Character Set.",
3879 #endif /* UNICODE */
3880 "  Type SET FILE CHAR ? for a complete list of file character sets.",
3881 " ",
3882 "SET FILE DEFAULT 7BIT-CHARACTER-SET",
3883 "  When automatically switching among different kinds of files while sending",
3884 "  this tells the character set to be used for 7-bit text files.",
3885 " ",
3886 "SET FILE DEFAULT 8BIT-CHARACTER-SET",
3887 "  This tells the character set to be used for 8-bit text files when",
3888 "  switching automatically among different kinds of files.",
3889 " ",
3890 #endif /* NOCSETS */
3891
3892 "SET FILE COLLISION option",
3893 "  Tells what to do when a file arrives that has the same name as",
3894 "  an existing file.  The options are:",
3895 "   BACKUP (default) - Rename the old file to a new, unique name and store",
3896 "     the incoming file under the name it was sent with.",
3897 "   OVERWRITE - Overwrite (replace) the existing file.",
3898 "   APPEND - Append the incoming file to the end of the existing file.",
3899 "   DISCARD - Refuse and/or discard the incoming file.",
3900 "   RENAME - Give the incoming file a unique name.",
3901 "   UPDATE - Accept the incoming file only if newer than the existing file.",
3902 " ",
3903
3904 "SET FILE DESTINATION { DISK, PRINTER, SCREEN, NOWHERE }",
3905 "  DISK (default): Store incoming files on disk.",
3906 "  PRINTER:        Send incoming files to SET PRINTER device.",
3907 "  SCREEN:         Display incoming files on screen (local mode only).",
3908 "  NOWHERE:        Do not put incoming files anywhere (use for calibration).",
3909 " ",
3910 "SET FILE DISPLAY option",
3911 "  Selects the format of the file transfer display for local-mode file",
3912 "  transfer.  The choices are:",
3913 " ",
3914 "  BRIEF      A line per file, showing size, mode, status, and throughput.",
3915 "  SERIAL     One dot is printed for every K bytes transferred.",
3916 "  CRT        Numbers are continuously updated on a single screen line.",
3917 "             This format can be used on any video display terminal.",
3918 #ifdef CK_CURSES
3919 "  FULLSCREEN A fully formatted 24x80 screen showing lots of information.",
3920 "             This requires a terminal or terminal emulator.",
3921 #endif /* CK_CURSES */
3922 "  NONE       No file transfer display at all.",
3923 " ",
3924
3925 "SET FILE DOWNLOAD-DIRECTORY [ <directory-name> ]",
3926 "  The directory into which all received files should be placed.  By default,",
3927 "  received files go into your current directory.",
3928 " ",
3929 #endif /* NOXFER */
3930
3931 #ifdef CK_CTRLZ
3932 "SET FILE EOF { CTRL-Z, LENGTH }",
3933 "  End-Of-File detection method, normally LENGTH.  Applies only to text-mode",
3934 "  transfers.  When set to CTRL-Z, this makes the file sender treat the first",
3935 "  Ctrl-Z in the input file as the end of file (EOF), and it makes the file",
3936 "  receiver tack a Ctrl-Z onto the end of the output file if it does not",
3937 "  already end with Ctrl-Z.",
3938 " ",
3939 #endif /* CK_CTRLZ */
3940
3941 "SET FILE END-OF-LINE { CR, CRLF, LF }",
3942 "  Use this command to specify nonstandard line terminators for text files.",
3943 " ",
3944
3945 #ifndef NOXFER
3946 "SET FILE INCOMPLETE { AUTO, KEEP, DISCARD }",
3947 "  What to do with an incompletely received file: KEEP, DISCARD, or AUTO.",
3948 "  AUTO (the default) means DISCARD if transfer is in text mode, KEEP if it",
3949 "  is in binary mode.",
3950 " ",
3951 #ifdef VMS
3952 "SET FILE LABEL { ACL, BACKUP-DATE, NAME, OWNER, PATH } { ON, OFF }",
3953 "  Tells which items to include (ON) or exclude (OFF) in labeled file",
3954 "  transfers",
3955 " ",
3956 #else
3957 #ifdef OS2
3958 "SET FILE LABEL { ARCHIVE, READ-ONLY, HIDDEN, SYSTEM, EXTENDED } { ON, OFF }",
3959 "  Tells which items to include (ON) or exclude (OFF) in labeled file",
3960 "  transfers.",
3961 " ",
3962 #endif /* OS2 */
3963 #endif /* VMS */
3964
3965 #ifdef UNIX
3966 #ifdef DYNAMIC
3967 "SET FILE LISTSIZE number",
3968 "  Changes the size of the internal wildcard expansion list.  Use SHOW FILE",
3969 "  to see the current size.  Use this command to increase the size if you get",
3970 "  a \"?Too many files\" error.  Also see SET FILE STRINGSPACE.",
3971 " ",
3972 #endif /* DYNAMIC */
3973 #endif /* UNIX */
3974
3975 "SET FILE NAMES { CONVERTED, LITERAL }",
3976 "  File names are normally CONVERTED to \"common form\" during transmission",
3977 "  (e.g. lowercase to uppercase, extra periods changed to underscore, etc).",
3978 "  LITERAL means use filenames literally (useful between like systems).  Also",
3979 "  see SET SEND PATHNAMES and SET RECEIVE PATHNAMES.",
3980 " ",
3981
3982 #ifdef UNIX
3983 "SET FILE OUTPUT { { BUFFERED, UNBUFFERED } [ size ], BLOCKING, NONBLOCKING }",
3984 "  Lets you control the disk output buffer for incoming files.  Buffered",
3985 "  blocking writes are normal.  Nonblocking writes might be faster on some",
3986 "  systems but might also be risky, depending on the underlying file service.",
3987 "  Unbuffered writes might be useful in critical applications to ensure that",
3988 "  cached disk writes are not lost in a crash, but will probably also be",
3989 "  slower.  The optional size parameter after BUFFERED or UNBUFFERED lets you",
3990 "  change the disk output buffer size; this might make a difference in",
3991 "  performance.",
3992 " ",
3993 #endif /* UNIX */
3994
3995 #ifdef PATTERNS
3996 "SET FILE PATTERNS { ON, OFF, AUTO }",
3997 "  ON means to use filename pattern lists to determine whether to send a file",
3998 "  in text or binary mode.  OFF means to send all files in the prevailing",
3999 "  mode.  AUTO (the default) is like ON if the other Kermit accepts Attribute",
4000 "  packets and like OFF otherwise.  FILE PATTERNS are used only if FILE SCAN",
4001 "  is OFF (see SET FILE SCAN).",
4002 " ",
4003 "SET FILE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
4004 "  Zero or more filename patterns which, if matched, cause a file to be sent",
4005 "  in binary mode when FILE PATTERNS are ON.  HELP WILDCARDS for a description"
4006 ,
4007 "  of pattern syntax.  SHOW PATTERNS to see the current file pattern lists.",
4008 " ",
4009 "SET FILE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
4010 "  Zero or more filename patterns which, if matched, cause a file to be sent",
4011 "  in text mode when FILE PATTERNS is ON; if a file does not match a text or",
4012 "  binary pattern, the prevailing SET FILE TYPE is used.",
4013 " ",
4014 #endif /* PATTERNS */
4015
4016 #ifdef VMS
4017 "SET FILE RECORD-LENGTH number",
4018 "  Sets the record length for received files of type BINARY.  Use this to",
4019 "  receive VMS BACKUP savesets or other fixed-format files that do not use",
4020 "  the default record length of 512.",
4021 " ",
4022 #endif /* VMS */
4023
4024 "SET FILE SCAN { ON [ size ], OFF }",
4025 "  If TRANSFER MODE is AUTOMATIC and FILE SCAN is ON (as it is by default)",
4026 "  Kermit peeks at the file's contents to see if it's text or binary.  Use",
4027 "  SET FILE SCAN OFF to disable file peeking, while still keeping TRANSFER",
4028 "  MODE automatic to allow name patterns and other methods.  The optional",
4029 "  size is the number of file bytes to scan, 49152 by default.  -1 means to",
4030 "  scan the whole file.  Also see SET FILE PATTERNS.",
4031 " ",
4032
4033 #ifdef UNIX
4034 #ifdef DYNAMIC
4035 "SET FILE STRINGSPACE number",
4036 "  Changes the size (in bytes) of the internal buffer that holds lists of",
4037 "  filenames such as wildcard expansion lists.  Use SHOW FILE to see the",
4038 "  current size.  Use this command to increase the size if you get a",
4039 "  \"?String space exhausted\" error.  Also see SET FILE LISTSIZE.",
4040 " ",
4041 #endif /* DYNAMIC */
4042 #endif /* UNIX */
4043
4044 #ifdef UNICODE
4045 "SET FILE UCS BOM { ON, OFF }",
4046 "  Whether to write a Byte Order Mark when creating a UCS-2 file.",
4047 " ",
4048 "SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }",
4049 "  Byte order to use when creating UCS-2 files, and to use when reading UCS-2",
4050 "  files that do not start with a Byte Order Mark.",
4051 " ",
4052 #endif /* UNICODE */
4053
4054 "SET FILE WARNING { ON, OFF }",
4055 "  SET FILE WARNING is superseded by the newer command, SET FILE",
4056 "  COLLISION.  SET FILE WARNING ON is equivalent to SET FILE COLLISION RENAME",
4057 "  and SET FILE WARNING OFF is equivalent to SET FILE COLLISION OVERWRITE.",
4058 #endif /* NOXFER */
4059 "" };
4060
4061 static char *hmxyhsh[] = {
4062 "Syntax: SET HANDSHAKE { NONE, XON, LF, BELL, ESC, CODE number }",
4063 "  Character to use for half duplex line turnaround handshake during file",
4064 "  transfer.  C-Kermit waits for this character from the other computer",
4065 "  before sending its next packet.  Default is NONE; you can give one of the",
4066 "  other names like BELL or ESC, or use SET HANDSHAKE CODE to specify the",
4067 "  numeric code value of the handshake character.  Type SET HANDSH ? for a",
4068 "  complete list of possibilities.",
4069 "" };
4070
4071 #ifndef NOSERVER
4072 static char *hsetsrv[] = {
4073 "SET SERVER CD-MESSAGE {ON,OFF}",
4074 "  Tells whether the server, after successfully executing a REMOTE CD",
4075 "  command, should send the contents of the new directory's READ.ME",
4076 "  (or similar) file to your screen.",
4077 " ",
4078 "SET SERVER CD-MESSAGE FILE name",
4079 "  Tells the name of the file to be displayed as a CD-MESSAGE, such as",
4080 "  READ.ME (SHOW SERVER tells the current CD-MESSAGE FILE name).",
4081 "  To specify more than one filename to look for, use {{name1}{name2}..}.",
4082 "  Synonym: SET CD MESSAGE FILE <list>.",
4083 " ",
4084 "SET SERVER DISPLAY {ON,OFF}",
4085 "  Tells whether local-mode C-Kermit during server operation should put a",
4086 "  file transfer display on the screen.  Default is OFF.",
4087 " ",
4088 "SET SERVER GET-PATH [ directory [ directory [ ... ] ] ]",
4089 "  Tells the C-Kermit server where to look for files whose names it receives",
4090 "  from client GET commands when the names are not fully specified pathnames.",
4091 "  Default is no GET-PATH, so C-Kermit looks only in its current directory.",
4092 " ",
4093 "SET SERVER IDLE-TIMEOUT seconds",
4094 "  Idle time limit while in server mode, 0 for no limit.",
4095 #ifndef OS2
4096 "  NOTE: SERVER IDLE-TIMEOUT and SERVER TIMEOUT are mutually exclusive.",
4097 #endif /* OS2 */
4098 " ",
4099 "SET SERVER KEEPALIVE {ON,OFF}",
4100 "  Tells whether C-Kermit should send \"keepalive\" packets while executing",
4101 "  REMOTE HOST commands, which is useful in case the command takes a long",
4102 "  time to produce any output and therefore might cause the operation to time",
4103 "  out.  ON by default; turn it OFF if it causes trouble with the client or",
4104 "  slows down the server too much.",
4105 " ",
4106 "SET SERVER LOGIN [ username [ password [ account ] ] ]",
4107 "  Sets up a username and optional password which must be supplied before",
4108 "  the server will respond to any commands other than REMOTE LOGIN.  The",
4109 "  account is ignored.  If you enter SET SERVER LOGIN by itself, then login",
4110 "  is no longer required.  Only one SET SERVER LOGIN command can be in effect",
4111 "  at a time; C-Kermit does not support multiple user/password pairs.",
4112 " ",
4113 "SET SERVER TIMEOUT n",
4114 "  Server command wait timeout interval, how often the C-Kermit server issues",
4115 "  a NAK while waiting for a command packet.  Specify 0 for no NAKs at all.",
4116 "  Default is 0.",
4117 ""
4118 };
4119 #endif /* NOSERVER */
4120
4121 static char *hmhrmt[] = {
4122 #ifdef NEWFTP
4123 "The REMOTE command sends file management instructions or other commands",
4124 "to a Kermit or FTP server.  If you have a single connection, the command is",
4125 "directed to the server you are connected to; if you have multiple connections"
4126 ,
4127 "the command is directed according to your GET-PUT-REMOTE setting.",
4128 #else
4129 "The REMOTE command sends file management instructions or other commands",
4130 "to a Kermit server.  There should already be a Kermit running in server",
4131 "mode on the other end of the connection.",
4132 #endif /* NEWFTP */
4133 "Type REMOTE ? to see a list of available remote commands.  Type HELP REMOTE",
4134 "xxx to get further information about a particular remote command xxx.",
4135 " ",
4136 "All REMOTE commands except LOGIN and LOGOUT have R-command shortcuts;",
4137 "for example, RDIR for REMOTE DIR, RCD for REMOTE CD, etc.",
4138 " ",
4139 #ifdef NEWFTP
4140 #ifdef LOCUS
4141 "Also see: HELP SET LOCUS, HELP FTP, HELP SET GET-PUT-REMOTE.",
4142 #else
4143 "Also see: HELP FTP, HELP SET GET-PUT-REMOTE.",
4144 #endif /* LOCUS */
4145 #else
4146 #ifdef LOCUS
4147 "Also see: HELP SET LOCUS.",
4148 #endif /* LOCUS */
4149 #endif /* NEWFTP */
4150 "" };
4151
4152 #ifndef NOSPL
4153 static char *ifhlp[] = { "Syntax: IF [NOT] condition commandlist",
4154 " ",
4155 "If the condition is (is not) true, do the commandlist.  The commandlist",
4156 "can be a single command, or a list of commands separated by commas and",
4157 "enclosed in braces.  The condition can be a single condition or a group of",
4158 "conditions separated by AND (&&) or OR (||) and enclosed in parentheses.",
4159 "If parentheses are used they must be surrounded by spaces.  Examples:",
4160 " ",
4161 "  IF EXIST oofa.txt <command>",
4162 "  IF ( EXIST oofa.txt || = \\v(nday) 3 ) <command>",
4163 "  IF ( EXIST oofa.txt || = \\v(nday) 3 ) { <command>, <command>, ... }",
4164 " ",
4165 "The conditions are:",
4166 " ",
4167 "  SUCCESS     - The previous command succeeded",
4168 "  OK          - Synonym for SUCCESS",
4169 "  FAILURE     - The previous command failed",
4170 "  ERROR       - Synonym for FAILURE",
4171 "  FLAG        - Succeeds if SET FLAG ON, fails if SET FLAG OFF",
4172 "  BACKGROUND  - C-Kermit is running in the background",
4173 #ifdef CK_IFRO
4174 "  FOREGROUND  - C-Kermit is running in the foreground",
4175 "  REMOTE-ONLY - C-Kermit was started with the -R command-line option",
4176 #else
4177 "  FOREGROUND  - C-Kermit is running in the foreground",
4178 #endif /* CK_IFRO */
4179 "  KERBANG     - A Kerbang script is running",
4180 "  ALARM       - SET ALARM time has passed",
4181 "  ASKTIMEOUT  - The most recent ASK, ASKQ, GETC, or GETOK timed out",
4182 "  EMULATION   - Succeeds if executed while in CONNECT mode",
4183 #ifdef OS2
4184 "  TAPI        - Current connection is via a Microsoft TAPI device",
4185 #endif /* OS2 */
4186 " ",
4187 "  MS-KERMIT   - Program is MS-DOS Kermit",
4188 "  C-KERMIT    - Program is C-Kermit",
4189 "  K-95        - Program is Kermit 95",
4190 "  GUI         - Program runs in a GUI window",
4191 " ",
4192 "  AVAILABLE CRYPTO                  - Encryption is available",
4193 "  AVAILABLE KERBEROS4               - Kerberos 4 authentication is available",
4194 "  AVAILABLE KERBEROS5               - Kerberos 5 authentication is available",
4195 "  AVAILABLE NTLM                    - NTLM authentication is available",
4196 "  AVAILABLE SRP                     - SRP authentication is available",
4197 "  AVAILABLE SSL                     - SSL/TLS authentication is available",
4198 "  MATCH string pattern              - Succeeds if string matches pattern",
4199 #ifdef CKFLOAT
4200 "  FLOAT number                      - Succeeds if floating-point number",
4201 #endif /* CKFLOAT */
4202 "  COMMAND word                      - Succeeds if word is built-in command",
4203 "  DEFINED variablename or macroname - The named variable or macro is defined",
4204 "  DECLARED arrayname                - The named array is declared",
4205 "  NUMERIC variable or constant      - The variable or constant is numeric",
4206 "  EXIST filename                    - The named file exists",
4207 "  ABSOLUTE filename                 - The filename is absolute, not relative",
4208 #ifdef CK_TMPDIR
4209 "  DIRECTORY string                  - The string is the name of a directory",
4210 #endif /* CK_TMPDIR */
4211 "  READABLE filename                 - Succeeds if the file is readable",
4212 "  WRITEABLE filename                - Succeeds if the file is writeable",
4213 #ifdef ZFCDAT
4214 "  NEWER file1 file2                 - The 1st file is newer than the 2nd one",
4215 #endif /* ZFCDAT */
4216 "  OPEN { READ-FILE,SESSION-LOG,...} - The given file or log is open",
4217 #ifndef NOLOCAL
4218 "  OPEN CONNECTION                   - A connection is open",
4219 #endif /* NOLOCAL */
4220 "  KBHIT                             - A key has been pressed",
4221 " ",
4222 "  VERSION - equivalent to \"if >= \\v(version) ...\"",
4223 "  COUNT   - subtract one from COUNT, execute the command if the result is",
4224 "            greater than zero (see SET COUNT)",
4225 " ",
4226 "  EQUAL s1 s2 - s1 and s2 (character strings or variables) are equal",
4227 "  LLT s1 s2   - s1 is lexically (alphabetically) less than s2",
4228 "  LGT s1 s1   - s1 is lexically (alphabetically) greater than s2",
4229 " ",
4230 "  =  n1 n2 - n1 and n2 (numbers or variables containing numbers) are equal",
4231 "  <  n1 n2 - n1 is arithmetically less than n2",
4232 "  <= n1 n2 - n1 is arithmetically less than or equal to n2",
4233 "  >  n1 n2 - n1 is arithmetically greater than n2",
4234 "  >= n1 n2 - n1 is arithmetically greater than or equal to n2",
4235 " ",
4236 "  (number by itself) - fails if the number is 0, succeeds otherwise",
4237 " ",
4238 "  TRUE     - always succeeds",
4239 "  FALSE    - always fails",
4240 " ",
4241 "The IF command may be followed on the next line by an ELSE command. Example:",
4242 " ",
4243 "  IF < \\%x 10 ECHO It's less",
4244 "  ELSE echo It's not less",
4245 " ",
4246 "It can also include an ELSE part on the same line if braces are used:",
4247 " ",
4248 "  IF < \\%x 10 { ECHO It's less } ELSE { ECHO It's not less }",
4249 " ",
4250 "Also see HELP WILDCARD (for IF MATCH pattern syntax).",
4251 "" };
4252
4253 static char *hmxxeval[] = { "Syntax: EVALUATE variable expression",
4254 "  Evaluates the expression and assigns its value to the given variable.",
4255 "  The expression can contain numbers and/or numeric-valued variables or",
4256 "  functions, combined with mathematical operators and parentheses in",
4257 "  traditional notation.  Operators include +-/*(), etc.  Example:",
4258 "  EVALUATE \\%n (1+1) * (\\%a / 3).",
4259 " ",
4260 "  NOTE: Prior to C-Kermit 7.0, the syntax was \"EVALUATE expression\"",
4261 "  (no variable), and the result was printed.  Use SET EVAL { OLD, NEW }",
4262 "  to choose the old or new behavior, which is NEW by default.",
4263 " ",
4264 "Alse see: HELP FUNCTION EVAL.",
4265 "" };
4266 #endif /* NOSPL */
4267
4268 static char *hmxxexit[] = {
4269 "Syntax: EXIT (or QUIT) [ number [ text ] ]",
4270 "  Exits from the Kermit program, closing all open files and devices.",
4271 "  If a number is given it becomes Kermit's exit status code.  If text is",
4272 "  included, it is printed.  Also see SET EXIT.",
4273 "" };
4274
4275 #ifndef NOSPL
4276 static char *ifxhlp[] = { "\
4277 Syntax: XIF condition { commandlist } [ ELSE { commandlist } ]",
4278 "  Obsolete.  Same as IF (see HELP IF).",
4279 "" };
4280
4281 static char *forhlp[] = { "\
4282 Syntax: FOR variablename initial-value final-value increment { commandlist }",
4283 "  FOR loop.  Execute the comma-separated commands in the commandlist the",
4284 "  number of times given by the initial value, final value and increment.",
4285 "  Example:  FOR \\%i 10 1 -1 { pause 1, echo \\%i }", "" };
4286
4287 static char *whihlp[] = { "\
4288 Syntax: WHILE condition { commandlist }",
4289 "  WHILE loop.  Execute the comma-separated commands in the bracketed",
4290 "  commandlist while the condition is true.  Conditions are the same as for",
4291 "  IF commands.",
4292 "" };
4293
4294 static char *swihlp[] = {
4295 "Syntax: SWITCH <variable> { case-list }",
4296 "  Selects from a group of commands based on the value of a variable.",
4297 "  The case-list is a series of lines like these:",
4298 " ",
4299 "    :x, command, command, ..., break",
4300 " ",
4301 "  where \"x\" is a possible value for the variable.  At the end of the",
4302 "  case-list, you can put a \"default\" label to catch when the variable does",
4303 "  not match any of the labels:",
4304 " ",
4305 "    :default, command, command, ...",
4306 " ",
4307 "The case label \"x\" can be a character, a string, a variable, a function",
4308 "invocation, a pattern, or any combination of these.  See HELP WILDCARDS",
4309 "for information about patterns.",
4310 ""};
4311
4312 static char *openhlp[] = {
4313 "Syntax:  OPEN mode filename",
4314 "  For use with READ and WRITE commands.  Open the local file in the",
4315 "  specified mode: READ, WRITE, or APPEND.  !READ and !WRITE mean to read",
4316 "  from or write to a system command rather than a file.  Examples:",
4317 " ",
4318 "    OPEN READ oofa.txt",
4319 "    OPEN !READ sort foo.bar",
4320 "" };
4321
4322 static char *hxxask[] = {
4323 "Syntax:  ASK [ switches ] variablename [ prompt ]",
4324 "Example: ASK \\%n { What is your name\\? }",
4325 "  Issues the prompt and defines the variable to be whatever is typed in",
4326 "  response, up to the terminating carriage return.  Use braces to preserve",
4327 "  leading and/or trailing spaces in the prompt.",
4328 " ",
4329 "Syntax:  ASKQ [ switches ] variablename [ prompt ]",
4330 "Example: ASKQ \\%p { Password:}",
4331 "  Like ASK except the response does not echo on the screen.",
4332 " ",
4333 "Switches:",
4334 " /DEFAULT:text",
4335 "  Text to supply if the user enters a blank response or the /TIMEOUT",
4336 "  limit expired with no response.",
4337 " ",
4338 #ifdef OS2
4339 " /POPUP",
4340 "  The prompt and response dialog takes place in a text-mode popup.",
4341 "  K95 only; in C-Kermit this switch is ignored.",
4342 " ",
4343 #ifdef KUI
4344 " /GUI",
4345 "  The prompt and response dialog takes place in a GUI popup.",
4346 "  K95 GUI version only; in C-Kermit and the K95 console version,", 
4347 "  this switch is ignored.",
4348 " ",
4349 #endif /* KUI */
4350 #endif /* OS2 */
4351 " /TIMEOUT:number",
4352 "  If the response is not entered within the given number of seconds, the",
4353 "  command fails.  This is equivalent to setting ASK-TIMER to a positive",
4354 "  number, except it applies only to this command.  Also see SET ASK-TIMER.",
4355 "  NOTE: If a /DEFAULT: value was also given, it is supplied automatically",
4356 "  upon timeout and the command does NOT fail.",
4357
4358 " ",
4359 " /QUIET",
4360 "  Suppresses \"?Timed out\" message when /TIMEOUT is given and user doesn't",
4361 "  respond within the time limit.",
4362 ""};
4363 static char *hxxgetc[] = {
4364 "Syntax:  GETC variablename [ prompt ]",
4365 "Example: GETC \\%c { Type any character to continue...}",
4366 "  Issues the prompt and sets the variable to the first character you type.",
4367 "  Use braces to preserve leading and/or trailing spaces in the prompt.",
4368 " ",
4369 "Also see SET ASK-TIMER.",
4370 ""};
4371
4372 static char *hmxytimer[] = {
4373 "Syntax: SET ASK-TIMER number",
4374 "  For use with ASK, ASKQ, GETOK, and GETC.  If ASK-TIMER is set to a number",
4375 "  greater than 0, these commands will time out after the given number of",
4376 "  seconds with no response.  This command is \"sticky\", so to revert to",
4377 " \
4378 untimed ASKs after a timed one, use SET ASK-TIMER 0.  Also see IF ASKTIMEOUT.",
4379 ""};
4380
4381 static char *hxxdot[] = {
4382 "Syntax: .<variable-name> <assignment-operator> <value>",
4383 "  Assigns the value to the variable in the manner indicated by the",
4384 "  assignment operator:",
4385 "  =   Copies without evaluation (like DEFINE).",
4386 "  :=  Copies with evaluation (like ASSIGN).",
4387 "  ::= Copies with arithmetic evaluation (like EVALUATE).",
4388 ""};
4389
4390 static char *hxxdef[] = {
4391 "Syntax: DEFINE name [ definition ]",
4392 "  Defines a macro or variable.  Its value is the definition, taken",
4393 "  literally.  No expansion or evaluation of the definition is done.  Thus",
4394 "  if the definition includes any variable or function references, their",
4395 "  names are included, rather than their values (compare with ASSIGN).  If",
4396 "  the definition is omitted, then the named variable or macro is undefined.",
4397 " ",
4398 "A typical macro definition looks like this:",
4399 " ",
4400 "  DEFINE name command, command, command, ...",
4401 " ",
4402 "for example:",
4403 " ",
4404 "  DEFINE vax set parity even, set duplex full, set flow xon/xoff",
4405 " ",
4406 "which defines a Kermit command macro called 'vax'.  The definition is a",
4407 "comma-separated list of Kermit commands.  Use the DO command to execute",
4408 "the macro, or just type its name, followed optionally by arguments.",
4409 " ",
4410 "The definition of a variable can be anything at all, for example:",
4411 " ",
4412 "  DEFINE \\%a Monday",
4413 "  DEFINE \\%b 3",
4414 " ",
4415 "These variables can be used almost anywhere, for example:",
4416 " ",
4417 "  ECHO Today is \\%a",
4418 "  SET BLOCK-CHECK \\%b",
4419 "" };
4420
4421 static char *hxxass[] = {
4422 "Syntax:  ASSIGN variablename string.",
4423 "Example: ASSIGN \\%a My name is \\%b.",
4424 "  Assigns the current value of the string to the variable (or macro).",
4425 "  The definition string is fully evaluated before it is assigned, so that",
4426 "  the values of any variables that are contained are used, rather than their",
4427 "  names.  Compare with DEFINE.  To illustrate the difference, try this:",
4428 " ",
4429 "    DEFINE \\%a hello",
4430 "    DEFINE \\%x \\%a",
4431 "    ASSIGN \\%y \\%a",
4432 "    DEFINE \\%a goodbye",
4433 "    ECHO \\%x \\%y",
4434 " ",
4435 "  This prints 'goodbye hello'.", "" };
4436
4437 static char *hxxdec[] = {
4438 "Syntax: DECREMENT variablename [ number ]",
4439 "  Decrement (subtract one from) the value of a variable if the current value",
4440 "  is numeric.  If the number argument is given, subtract that number",
4441 "  instead.",
4442 " ",
4443 "Examples: DECR \\%a, DECR \\%a 7, DECR \\%a \\%n", "" };
4444
4445 static char *hxxinc[] = {
4446 "Syntax: INCREMENT variablename [ number ]",
4447 "  Increment (add one to) the value of a variable if the current value is",
4448 "  numeric.  If the number argument is given, add that number instead.",
4449 " ",
4450 "Examples: INCR \\%a, INCR \\%a 7, INCR \\%a \\%n", "" };
4451 #endif /* NOSPL */
4452
4453 #ifdef ANYX25
4454 #ifndef IBMX25
4455 static char *hxxpad[] = {
4456 "Syntax: PAD command",
4457 "X.25 PAD commands:",
4458 " ",
4459 "    PAD CLEAR     - Clear the virtual call",
4460 "    PAD STATUS    - Return the status of virtual call",
4461 "    PAD RESET     - Send a reset packet",
4462 "    PAD INTERRUPT - Send an interrupt packet",
4463 ""};
4464 #endif /* IBMX25 */
4465
4466 static char *hxyx25[] = {
4467 "Syntax: SET X.25 option { ON [ data ], OFF }",
4468 " ",
4469 "X.25 call options:",
4470 "  CLOSED-USER-GROUP { ON index, OFF }",
4471 "    Enable or disable closed user group call, where index is the group",
4472 "    index, 0 to 99.",
4473 "  REVERSE-CHARGE { ON, OFF }",
4474 "    Tell whether you want to reverse the charges for the call.",
4475 "  CALL-USER-DATA { ON string, OFF }",
4476 "    Specify call user-data for the X.25 call.",
4477 ""};
4478 #endif /* ANYX25 */
4479
4480 static char *hxyprtr[] = {
4481 #ifdef PRINTSWI
4482 "Syntax: SET PRINTER [ switches ] [ name ]",
4483 " ",
4484 "  Specifies the printer to be used for transparent-print, autoprint, and",
4485 "  screen-dump material during terminal emulation, as well as for the PRINT",
4486 "  command, plus various options governing print behavior.",
4487 " ",
4488 "Switches for specifying the printer by type:",
4489 " ",
4490 "/NONE",
4491 "  Include this switch to specify that all printer actions should simply be",
4492 "  skipped.  Use this, for example, if you have no printer.",
4493 " ",
4494 "/DOS-DEVICE[:name]",
4495 "  Include this to declare a DOS printer and to specify its name, such as",
4496 "  PRN, LPT1, etc.",
4497 " ",
4498 #ifdef NT
4499 "/WINDOWS-QUEUE[:[queue-name]]",
4500 "  Include this to declare a Windows printer and specify its queue name.",
4501 "  Type question mark (?) after the colon (:) to see a list of known queue",
4502 "  names.  If the colon is absent, the switch indicates the currently",
4503 "  selected printer is a Windows Print Queue.  If the colon is provided",
4504 "  and the name is absent, the Windows Print Queue chosen as the Default",
4505 "  Printer is selected.",
4506 " ",
4507 #endif /* NT */
4508 "/FILE[:name]",
4509 "  Specifies that all printer material is to be appended to the named file,",
4510 "  rather than being sent to a printer.  If the file does not exist, it is",
4511 "  created the first time any material is to be printed.",
4512 " ",
4513 "/PIPE[:name]",
4514 "  Specifies that all printer material is to be sent as standard input to",
4515 "  the program or command whose name is given.  Example:",
4516 " ",
4517 "    SET PRINTER /PIPE:{textps > lpt1}",
4518 " ",
4519 "If you give a printer name without specifying any of these switches, then it",
4520 "is assumed to be a DOS printer device or filename unless the name given",
4521 "(after removing enclosing braces, if any) starts with \"|\", \
4522 in which case it",
4523 "is a pipe.  Examples:",
4524 " ",
4525 "  SET PRINTER LPT1               <-- DOS device",
4526 "  SET PRINTER {| textps > lpt1}  <-- Pipe",
4527 " ",
4528 "The next group of switches tells whether the printer is one-way or",
4529 "bidirectional (two-way):",
4530 " ",
4531 "/OUTPUT-ONLY",
4532 "  Include this to declare the printer capable only of receiving material to",
4533 "  be printed, but not sending anything back.  This is the normal kind of",
4534 "  printer, Kermit's default kind, and the opposite of /BIDIRECTIONAL.",
4535 " ",
4536 "/BIDIRECTIONAL",
4537 "  Include this to declare the printer bidirectional.  This is the opposite ",
4538 "  of /OUTPUT-ONLY.  You can also use this option with serial printers, even",
4539 "  if they aren't bidirectional, in case you need to specify speed, flow",
4540 "  control, or parity.",
4541 " ",
4542 "The next group applies only to bidirectional and/or serial printers:",
4543 " ",
4544 "/FLOW-CONTROL:{NONE,XON/XOFF,RTS/CTS,KEEP}",
4545 "  Flow control to use with a serial bidirectional printer, default KEEP;",
4546 #ifdef NT
4547 "  i.e. use whatever the Windows driver for the port normally uses.",
4548 #else
4549 "  i.e. use whatever the OS/2 driver for the port normally uses.",
4550 #endif /* NT */
4551 " ",
4552 "/PARITY:{NONE,EVEN,ODD,SPACE,MARK}",
4553 "  Parity to use with a serial printer, default NONE; i.e. use 8 data bits",
4554 "  and no parity.  If you omit the colon and the keyword, NONE is selected.",
4555 " ",
4556 "/SPEED:number",
4557 "  Interface speed, in bits per second, to use with a serial printer, such as",
4558 "  2400, 9600, 19200, etc.  Type SET PRINTER /SPEED:? for a list of possible",
4559 "  speeds.",
4560 " ",
4561 "The next group deals with print jobs -- how to identify them, how to start",
4562 "them, how to terminate them:",
4563 " ",
4564 "/TIMEOUT[:number]",
4565 "  Used with host-directed transparent or auto printing, this is the number",
4566 "  of seconds to wait after the host closes the printer before terminating",
4567 "  the print job if the printer is not opened again during the specified",
4568 "  amount of time.",
4569 " ",
4570 "/JOB-HEADER-FILE[:filename]",
4571 "  The name of a file to be sent to the printer at the beginning of each",
4572 "  print job, as a burst page, or to configure the printer.  Normally no file",
4573 "  is is sent.",
4574 " ",
4575 "/END-OF-JOB-STRING[:string]",
4576 "  String of characters to be sent to the printer at the end of the print",
4577 "  job, usually used to force the last or only page out of the printer.  When",
4578 "  such a string is needed, it usually consists of a single formfeed: \"set",
4579 "  printer /end-of-job:{\\12}\".  No end-of-job string is sent unless you",
4580 "  specify one with this option.  If the string contains any spaces or",
4581 "  control characters (even in backslash notation, as above), enclose it in",
4582 "  braces.",
4583 " ",
4584 "The next group is for use with printers that print only PostScript:",
4585 " ",
4586 "/POSTSCRIPT or /PS",
4587 "  Indicates that K95 should convert all text to PostScript before sending",
4588 "  it to the printer.  The fixed-pitch Courier-11 font is used.",
4589 " ",
4590 "/WIDTH:number",
4591 "  Specifies the width of the page in characters.  If this switch is not",
4592 "  given, 80 is used.",
4593 " ",
4594 "/HEIGHT:number",
4595 "  Specifies the height of the page in lines.  If this switch is not given",
4596 "  66 is used.",
4597 " ",
4598 "/NOPOSTSCRIPT or /NOPS",
4599 "  Indicates that K95 should not convert all text to PostScript before",
4600 "  sending it to the printer.",
4601 " ",
4602 "The final switch is for use with AutoPrint mode and Screen Dumps",
4603 " ",
4604 "/CHARACTER-SET:<character-set>",
4605 "  Specifies the character set used by the printer which may be different",
4606 "  from both the character set used by the host and by the local computer.",
4607 "  The default value is CP437.",
4608 " ",
4609 "SHOW PRINTER displays your current printer settings.",
4610 #else
4611 #ifdef UNIX
4612 "Syntax: SET PRINTER [ { |command, filename } ]",
4613 "  Specifies the command (such as \"|lpr\") or filename to be used by the",
4614 "  PRINT command.  If a filename is given, each PRINT command appends to the",
4615 "  given file.  If the SET PRINTER argument contains spaces, it must be",
4616 "  enclosed in braces, e.g. \"set printer {| lpr -Plaser}\". If the argument",
4617 "  is omitted the default value is restored.  SHOW PRINTER lists the current",
4618 "  printer.  See HELP PRINT for further info.",
4619 #else
4620 "Sorry, SET PRINTER not available yet.",
4621 #endif /* UNIX */
4622 #endif /* PRINTSWI */
4623 ""};
4624
4625 #ifdef OS2
4626 #ifdef BPRINT
4627 static char *hxybprtr[] = {
4628 "Syntax: SET BPRINTER [ portname speed [ parity [ flow-control ] ] ]",
4629 "  (Obsolete, replaced by SET PRINTER /BIDIRECTIONAL.)",
4630 ""};
4631 #endif /* BPRINT */
4632 #endif /* OS2 */
4633
4634 static char *hxyexit[] = {
4635 "Syntax: SET EXIT HANGUP { ON, OFF }",
4636 "  When ON (which is the default), C-Kermit executes an implicit HANGUP and",
4637 "  CLOSE command on the communications device or connection when it exits.",
4638 "  When OFF, Kermit skips this sequence.",
4639 " ",
4640 "Syntax: SET EXIT ON-DISCONNECT { ON, OFF }",
4641 "  When ON, C-Kermit EXITs automatically when a network connection",
4642 "  is terminated either by the host or by issuing a HANGUP command.",
4643 " ",
4644 "Syntax: SET EXIT STATUS number",
4645 #ifdef NOSPL
4646 "  Set C-Kermit's program return code to the given number.",
4647 #else
4648 "  Set C-Kermit's program return code to the given number, which can be a",
4649 "  constant, variable, function result, or arithmetic expression.",
4650 #endif /* NOSPL */
4651 " ",
4652 "Syntax: SET EXIT WARNING { ON, OFF, ALWAYS }",
4653 "  When EXIT WARNING is ON, issue a warning message and ask for confirmation",
4654 "  before EXITing if a connection to another computer might still be open.",
4655 "  When EXIT WARNING is ALWAYS, confirmation is always requested.  When OFF",
4656 "  it is never requested.  The default is ON.",
4657 "" };
4658
4659 #ifndef NOSPL
4660 static char *hxxpau[] = {
4661 "Syntax:  PAUSE [ { number-of-seconds, hh:mm:ss } ]",
4662 "Example: PAUSE 3  or  PAUSE 14:52:30",
4663 "  Do nothing for the specified number of seconds or until the given time of",
4664 "  day in 24-hour hh:mm:ss notation.  If the time of day is earlier than the",
4665 "  current time, it is assumed to be tomorrow.  If no argument given, one",
4666 "  second is used.  The pause can be interrupted by typing any character on",
4667 "  the keyboard unless SLEEP CANCELLATION is OFF.  If interrupted, PAUSE",
4668 "  fails, otherwise it succeeds.  Synonym: SLEEP.",
4669 "" };
4670
4671 static char *hxxmsl[] = {
4672 "Syntax:  MSLEEP [ number ]",
4673 "Example: MSLEEP 500",
4674 "  Do nothing for the specified number of milliseconds; if no number given,",
4675 "  100 milliseconds.","" };
4676 #endif /* NOSPL */
4677
4678 #ifndef NOPUSH
4679 extern int nopush;
4680 static char *hxxshe[] = {
4681 "Syntax: !, @, RUN, PUSH, or SPAWN, optionally followed by a command.",
4682 "  Gives the command to the local operating system's command processor, and",
4683 "  displays the results on the screen.  If the command is omitted, enters the",
4684 "  system's command line interpreter or shell; exit from it (the command for",
4685 "  this is usually EXIT or QUIT or LOGOUT) to return to Kermit.",
4686 ""
4687 };
4688 #endif /* NOPUSH */
4689
4690 #ifndef NOXMIT
4691 static char *hxxxmit[] = {
4692 "Syntax: TRANSMIT [ switches ] filename",
4693 "  Sends the contents of a file, without any error checking or correction,",
4694 "  to the computer on the other end of your SET LINE or SET HOST connection",
4695 "  (or if C-Kermit is in remote mode, displays it on the screen).  The",
4696 "  filename is the name of a single file (no wildcards) to be sent or, if",
4697 "  the /PIPE switch is included, the name of a command whose output is to be",
4698 "  sent.",
4699 " ",
4700 "  The file is sent according to your current FILE TYPE setting (BINARY or",
4701 "  TEXT), which you can override with a /BINARY or /TEXT switch without",
4702 "  changing the global setting.  In text mode, it is sent a line at a time,",
4703 "  with carriage return at the end of each line (as if you were typing it at",
4704 "  your keyboard), and C-Kermit waits for a linefeed to echo before sending",
4705 "  the next line; use /NOWAIT to eliminate the feedback requirement.  In",
4706 "  binary mode, it is sent a character at a time, with no feedback required.",
4707 " ",
4708 "  Normally the transmitted material is echoed to your screen.  Use SET",
4709 "  TRANSMIT ECHO OFF or the /NOECHO switch to suppress echoing.  Note that",
4710 "  TRANSMIT /NOECHO /NOWAIT /BINARY is a special case, that more or less",
4711 "  blasts the file out at full speed.",
4712 " ",
4713 #ifndef NOCSETS
4714 "  Character sets are translated according to your current FILE and TERMINAL",
4715 "  CHARACTER-SET settings when TRANSMIT is in text mode.  Include /TRANSPARENT"
4716 ,
4717 "  to disable character-set translation in text mode (/TRANSPARENT implies",
4718 "  /TEXT).",
4719 " ",
4720 #endif /* NOCSETS */
4721 "  There can be no guarantee that the other computer will receive the file",
4722 "  correctly and completely.  Before you start the TRANSMIT command, you",
4723 "  must put the other computer in data collection mode, for example by",
4724 "  starting a text editor.  TRANSMIT may be interrupted by Ctrl-C.  Synonym:",
4725 "  XMIT.  See HELP SET TRANSMIT for further information.",
4726 "" };
4727 #endif /* NOXMIT */
4728
4729 #ifndef NOCSETS
4730 static char *hxxxla[] = {
4731 "Syntax: TRANSLATE file1 cs1 cs2 [ file2 ]",
4732 "  Translates file1 from the character set cs1 into the character set cs2",
4733 "  and stores the result in file2.  The character sets can be any of",
4734 "  C-Kermit's file character sets.  If file2 is omitted, the translation",
4735 "  is displayed on the screen.  An appropriate intermediate character-set",
4736 "  is chosen automatically, if necessary.  Synonym: XLATE.  Example:",
4737 " ",
4738 "    TRANSLATE lasagna.lat latin1 italian lasagna.nrc",
4739 " ",
4740 "  Multiple files can be translated if file2 is a directory or device name,",
4741 "  rather than a filename, or if file2 is omitted.",
4742 "" };
4743 #endif /* NOCSETS */
4744
4745 #ifndef NOSPL
4746 static char *hxxwai[] = {
4747 "Syntax: WAIT { number-of-seconds, hh:mm:ss } [ <what> ]",
4748 " ",
4749 "Examples:",
4750 "  wait 5 cd cts",
4751 "  wait 23:59:59 cd",
4752 " ",
4753 "  Waits up to the given number of seconds or the given time of day for the",
4754 "  specified item or event, which can be FILE, the name(s) of one or more",
4755 "  modem signals, or nothing.  If nothing is specified, WAIT acts like SLEEP.",
4756 "  If one or more modem signal names are given, Kermit waits for the specified"
4757 ,
4758 "  modem signals to appear on the serial communication device.",
4759 "  Sets FAILURE if the signals do not appear in the given time or interrupted",
4760 "  from the keyboard during the waiting period.",
4761 " ",
4762 "Signals:",
4763 "  cd  = Carrier Detect;",
4764 "  dsr = Dataset Ready;",
4765 "  cts = Clear To Send;",
4766 "  ri  = Ring Indicate.",
4767 " ",
4768 "If you want Kermit to wait for a file event, then the syntax is:",
4769 " ",
4770 "  WAIT <time> FILE { CREATION, DELETION, MODIFICATION } <filename>",
4771 " ",
4772 "where <time> is as above, and <filename> is the name of a single file.",
4773 "Kermit waits up to the given amount of time for the specified event to occur",
4774 "with the specified file, succeeds if it does, fails if it doesn't.",
4775 "" };
4776 #endif /* NOSPL */
4777
4778 static char *hxxwri[] = {
4779 "Syntax: WRITE name text",
4780 "  Writes the given text to the named log or file.  The text text may include",
4781 "  backslash codes, and is not terminated by a newline unless you include the",
4782 "  appropriate code.  The name parameter can be any of the following:",
4783 " ",
4784 "   DEBUG-LOG",
4785 "   ERROR (standard error)",
4786 #ifndef NOSPL
4787 "   FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)",
4788 #endif /* NOSPL */
4789 "   PACKET-LOG",
4790 "   SCREEN (compare with ECHO)",
4791 #ifndef NOLOCAL
4792 "   SESSION-LOG",
4793 #endif /* NOLOCAL */
4794 "   TRANSACTION-LOG", "" };
4795
4796 #ifndef NODIAL
4797 static char *hxxlook[] = { "Syntax: LOOKUP name",
4798 "  Looks up the given name in the dialing directory or directories, if any,",
4799 "  specified in the most recent SET DIAL DIRECTORY command.  Each matching",
4800 "  entry is shown, along with any transformations that would be applied to",
4801 "  portable-format entries based on your locale.  HELP DIAL, HELP SET DIAL",
4802 "  for further info.",
4803 ""
4804 };
4805
4806 static char *hxxansw[] = { "Syntax:  ANSWER [ <seconds> ]",
4807 #ifdef OS2
4808 "  Waits for a modem call to come in.  Prior SET MODEM TYPE and SET PORT",
4809 #else
4810 "  Waits for a modem call to come in.  Prior SET MODEM TYPE and SET LINE",
4811 #endif /* OS2 */
4812 "  required.  If <seconds> is 0 or not specified, Kermit waits forever or",
4813 "  until interrupted, otherwise Kermit waits the given number of seconds.",
4814 "  The ANSWER command puts the modem in autoanswer mode.  Subsequent DIAL",
4815 "  commands will automatically put it (back) in originate mode.  SHOW MODEM,",
4816 "  HELP SET MODEM for more info.",
4817 ""
4818 };
4819
4820 static char *hxxdial[] = { "Syntax:  DIAL phonenumber",
4821 "Example: DIAL 7654321",
4822 "  \
4823 Dials a number using an autodial modem.  First you must SET MODEM TYPE, then",
4824 #ifdef OS2
4825 "  SET PORT (or in Windows only, SET PORT TAPI instead of SET MODEM TYPE and",
4826 "  SET LINE), then SET SPEED. Then give the DIAL command, including the phone",
4827 #else
4828 "  SET LINE, then SET SPEED.  Then give the DIAL command, including the phone",
4829 #endif /* OS2 */
4830 "  number, for example:",
4831 " ",
4832 "   DIAL 7654321",
4833 #ifdef NETCONN
4834 " ",
4835 "  If the modem is on a network modem server, SET HOST first, then SET MODEM",
4836 "  TYPE, then DIAL.",
4837 #endif /* NETCONN */
4838 " ",
4839 "If you give the DIAL command interactively at the Kermit prompt, and the",
4840 "call is placed successfully, Kermit automatically enters CONNECT mode.",
4841 "If the DIAL command is given from a macro or command file, Kermit remains",
4842 "in command mode after the call is placed, successfully or not.  You can",
4843 "change this behavior with the SET DIAL CONNECT command.",
4844 " ",
4845 "If the phonenumber starts with a letter, and if you have used the SET DIAL",
4846 "DIRECTORY command to specify one or more dialing-directory files, Kermit",
4847 "looks it up in the given file(s); if it is found, the name is replaced by",
4848 "the number or numbers associated with the name.  If it is not found, the",
4849 "name is sent to the modem literally.",
4850 " ",
4851 "If the phonenumber starts with an equals sign (\"=\"), this forces the part",
4852 "after the = to be sent literally to the modem, even if it starts with a",
4853 "letter, without any directory lookup.",
4854 " ",
4855 "You can also give a list of phone numbers enclosed in braces, e.g:",
4856 " ",
4857 "  dial {{7654321}{8765432}{+1 (212 555-1212}}",
4858 " ",
4859 "(Each number is enclosed in braces and the entire list is also enclosed in",
4860 "braces.)  In this case, each number is tried until there is an answer.  The",
4861 "phone numbers in this kind of list can not be names of dialing directory",
4862 "entries.",
4863 " ",
4864 "A dialing directory is a plain text file, one entry per line:",
4865 " ",
4866 "  name  phonenumber  ;  comments",
4867 " ",
4868 "for example:",
4869 " ",
4870 "  work    9876543              ; This is a comment",
4871 "  e-mail  +1  (212) 555 4321   ; My electronic mailbox",
4872 "  germany +49 (511) 555 1234   ; Our branch in Hanover",
4873 " ",
4874 "If a phone number starts with +, then it must include country code and",
4875 "area code, and C-Kermit will try to handle these appropriately based on",
4876 "the current locale (HELP SET DIAL for further info); these are called",
4877 "PORTABLE entries.  If it does not start with +, it is dialed literally.",
4878 " ",
4879 "If more than one entry is found with the same name, Kermit dials all of",
4880 "them until the call is completed; if the entries are in portable format,",
4881 "Kermit dials them in cheap-to-expensive order: internal, then local, then",
4882 "long-distance, then international, based on its knowledge of your local",
4883 "country code and area code (see HELP SET DIAL).",
4884 " ",
4885 "Specify your dialing directory file(s) with the SET DIAL DIRECTORY command.",
4886 " ",
4887 #ifdef NETCONN
4888 "See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED, REDIAL, and",
4889 "PDIAL.",
4890 #else
4891 "See also SET DIAL, SET MODEM, SET LINE, SET SPEED, PDIAL, and REDIAL.",
4892 #endif /* NETCONN */
4893 "" };
4894
4895 #ifdef CK_TAPI
4896 static char *hxxtapi[] = {
4897 "TAPI CONFIGURE-LINE <tapi-line>",
4898 "  Displays the TAPI Configure Line Dialog box and allows you to",
4899 "  alter the default configuration for the specified <tapi-line>.",
4900 " ",
4901 "TAPI DIALING-PROPERTIES",
4902 "  Displays the TAPI Dialing Properties (locations) Dialog box.  The",
4903 "  Dialing rules may be changed and locations created and deleted.",
4904 "  When the dialog box is closed, K-95 imports the current Dialing",
4905 "  Properties' Location into the Kermit DIAL command settings.",
4906 ""};
4907
4908 static char *hxytapi[] = {
4909 "SET TAPI LINE <tapi-line>",
4910 "  Opens a TAPI device for use by Kermit.",
4911 " ",
4912 "SET TAPI MODEM-DIALING {ON, [OFF]}",
4913 "  If TAPI MODEM-DIALING is OFF when SET TAPI LINE is issued, Kermit opens",
4914 "  the TAPI device directly as a \"raw port\".  The device is unavailable to",
4915 "  other applications and Kermit performs dialing functions using its",
4916 "  built-in dialing and modem databases.  If TAPI MODEM-DIALING is ON, TAPI",
4917 "  handles all dialing functions and the port may be shared with other",
4918 "  applications when a call in not active.  When TAPI MODEM-DIALING is OFF,",
4919 "  SET MODEM TYPE TAPI Kermit uses the TAPI modem commands imported from the",
4920 "  Windows Registry during the previous SET TAPI LINE call.",
4921 " ",
4922 "SET TAPI LOCATION <tapi-location>",
4923 "  Specifies the TAPI location to make current for the entire system.  The",
4924 "  <tapi-location>'s dialing properties are imported into Kermit's SET DIAL",
4925 "  command database.",
4926 " ",
4927 "SET TAPI PHONE-NUMBER-CONVERSIONS {ON, OFF, [AUTO]}",
4928 "  Controls whether the phone number conversions are performed by TAPI (ON)",
4929 "  or by Kermit (OFF), or according the type of port that was selected",
4930 "  (AUTO); AUTO is the default, and is equivalent to ON if the current",
4931 "  LINE/PORT is a TAPI device and TAPI MODEM-DIALING is ON, OFF otherwise.",
4932 " ",
4933 "SET TAPI MODEM-LIGHTS {[ON], OFF}",
4934 "  Displays a modem lights indicator on the Windows 95 Taskbar.  Does nothing",
4935 "  in Windows NT 4.0.",
4936 " ",
4937 "SET TAPI MANUAL-DIALING {ON, [OFF]}",
4938 "  Displays a dialog box during dialing requesting that you manually dial the",
4939 "  phone before continuing.  Applies only when TAPI MODEM-DIALING is ON.",
4940 " ",
4941 "SET TAPI WAIT-FOR-CREDIT-CARD-TONE <seconds>",
4942 "  Some modems don't support the '$' (BONG) symbol during dialing, which",
4943 "  means \"wait for credit card tone before continuing.\"  If TAPI recognizes",
4944 "  the modem as one that does not support BONG, it replaces the '$' with",
4945 "  <seconds> worth of pauses.  The default is 8 seconds.  This command",
4946 "  applies only when TAPI MODEM-DIALING is ON",
4947 " ",
4948 "SET TAPI PRE-DIAL-TERMINAL {ON, [OFF]}",
4949 "SET TAPI POST-DIAL-TERMINAL {ON, [OFF]}",
4950 "  Displays a small terminal window that may be used to communicate with the",
4951 "  modem or the host prior to or immediately after dialing; applies only when",
4952 "  TAPI MODEM-DIALING is ON",
4953 " ",
4954 "SET TAPI INACTIVITY-TIMEOUT <minutes>",
4955 "  Specifies the number of minutes of inactivity that may go by before TAPI",
4956 "  disconnects the line.  The default is 0 which means disable this function.",
4957 "  Applies only when TAPI MODEM-DIALING is ON.",
4958 " ",
4959 "SET TAPI USE-WINDOWS-CONFIGURATION {ON, [OFF]}",
4960 "  Specifies whether the TAPI modem values for speed, parity, stop bits, flow",
4961 "  control, etc. are used in preference to the current values specified",
4962 "  within Kermit-95.",
4963 " ",
4964 ""};
4965 #endif /* CK_TAPI */
4966
4967 #endif /* NODIAL */
4968
4969 #ifdef TNCODE
4970 static char *hmxxiks[] = {
4971 "Syntax: IKS [ switches ] [ host [ service ] ]",
4972 "  Establishes a new connection to an Internet Kermit Service daemon.",
4973 "  Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host KERMIT /TELNET,",
4974 "  IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)",
4975 "  is resumed.  Depending on how Kermit has been built switches may be",
4976 "  available to require a secure authentication method and bidirectional",
4977 "  encryption.  See HELP SET TELNET for more info.",
4978 " ",
4979 #ifdef CK_AUTHENTICATION
4980 " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
4981 "   SET TELOPT AUTH REQUIRED with the following exceptions.  If the type",
4982 "   is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
4983 "   is NONE, then SET TELOPT AUTH REFUSED is executed.",
4984 " ",
4985 #endif /* CK_AUTHENTICATION */
4986 #ifdef CK_ENCRYPTION
4987 " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
4988 "   and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
4989 "   If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
4990 "   and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
4991 "   executed.",
4992 " ",
4993 #endif /* CK_ENCRYPTION */
4994 " /USERID:[<name>]",
4995 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
4996 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
4997 "   Telnet negotiations; if this switch is given but the string is omitted,",
4998 "   no user ID is sent to the host.  If this switch is not given, your",
4999 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
5000 "   host it is a request to login as the specified user.",
5001 " ",
5002 #ifdef CK_AUTHENTICATION
5003 " /PASSWORD:[<string>]",
5004 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
5005 "   it is treated as the password to be used (if required) by any Telnet",
5006 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
5007 "   Password, or X.509 certificate private key decryption.)  If no password",
5008 "   switch is specified a prompt is issued to request the password if one",
5009 "   is required for the negotiated authentication method.",
5010 #endif /* CK_AUTHENTICATION */
5011 ""};
5012
5013 static char *hmxxtel[] = {
5014 "Syntax: TELNET [ switches ] [ host [ service ] ]",
5015 "  Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /TELNET,",
5016 "  IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)",
5017 "  is resumed.  Depending on how Kermit has been built switches may be",
5018 "  available to require a secure authentication method and bidirectional",
5019 "  encryption.  See HELP SET TELNET for more info.",
5020 " ",
5021 #ifdef CK_AUTHENTICATION
5022 " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
5023 "   SET TELOPT AUTH REQUIRED with the following exceptions.  If the type",
5024 "   is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
5025 "   is NONE, then SET TELOPT AUTH REFUSED is executed.",
5026 " ",
5027 #endif /* CK_AUTHENTICATION */
5028 #ifdef CK_ENCRYPTION
5029 " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
5030 "   and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
5031 "   If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
5032 "   and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
5033 "   executed.",
5034 " ",
5035 #endif /* CK_ENCRYPTION */
5036 " /USERID:[<name>]",
5037 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
5038 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
5039 "   Telnet negotiations; if this switch is given but the string is omitted,",
5040 "   no user ID is sent to the host.  If this switch is not given, your",
5041 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
5042 "   host it is a request to login as the specified user.",
5043 " ",
5044 #ifdef CK_AUTHENTICATION
5045 " /PASSWORD:[<string>]",
5046 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
5047 "   it is treated as the password to be used (if required) by any Telnet",
5048 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
5049 "   Password, or X.509 certificate private key decryption.)  If no password",
5050 "   switch is specified a prompt is issued to request the password if one",
5051 "   is required for the negotiated authentication method.",
5052 #endif /* CK_AUTHENTICATION */
5053 ""};
5054
5055 static char *hxtopt[] = {
5056 "TELOPT { AO, AYT, BREAK, CANCEL, EC, EL, EOF, EOR, GA, IP, DMARK, NOP, SE,",
5057 "         SUSP, SB [ option ], DO [ option ], DONT [ option ],",
5058 "         WILL [ option ], WONT [option] }",
5059 "  This command lets you send all the Telnet protocol commands.  Note that",
5060 "  certain commands do not require a response, and therefore can be used as",
5061 "  nondestructive \"probes\" to see if the Telnet session is still open;",
5062 "  e.g.:",
5063 " ",
5064 "    set host xyzcorp.com",
5065 "    ...",
5066 "    telopt nop",
5067 "    telopt nop",
5068 "    if fail stop 1 Connection lost",
5069 " ",
5070 "  TELOPT NOP is sent twice because the failure of the connection will not",
5071 "  be detected until the second send is attempted.  This command is meant",
5072 "  primarily as a debugging tool for the expert user.",
5073 ""};
5074 #endif /* TNCODE */
5075
5076 #endif /* NOHELP */
5077
5078 /*  D O H L P  --  Give a help message  */
5079
5080 _PROTOTYP( int dohset, (int) );
5081 #ifndef NOCMDL
5082 _PROTOTYP( int dohopts, (void) );
5083 #endif /* NOCMDL */
5084 #ifndef NOSPL
5085 _PROTOTYP( int dohfunc, (int) );
5086 extern struct keytab fnctab[];
5087 extern int nfuncs;
5088 #endif /* NOSPL */
5089 #ifdef OS2
5090 #ifndef NOKVERBS
5091 _PROTOTYP( int dohkverb, (int) );
5092 extern struct keytab kverbs[];
5093 extern int nkverbs;
5094 #endif /* NOKVERBS */
5095 #endif /* OS2 */
5096
5097 #ifndef NOSPL
5098 static char * hxxdcl[] = {
5099 "Syntax: ARRAY verb operands...",
5100 " ",
5101 "Declares arrays and performs various operations on them.  Arrays have",
5102 "the following syntax:",
5103 " ",
5104 "  \\&a[n]",
5105 " ",
5106 "where \"a\" is a letter and n is a number or a variable with a numeric value",
5107 "or an arithmetic expression.  The value of an array element can be anything",
5108 "at all -- a number, a character, a string, a filename, etc.",
5109 " ",
5110 "The following ARRAY verbs are available:",
5111 " ",
5112 "[ ARRAY ] DECLARE arrayname[n] [ = initializers... ]",
5113 "  Declares an array of the given size, n.  The resulting array has n+1",
5114 "  elements, 0 through n.  Array elements can be used just like any other",
5115 "  variables.  Initial values can be given for elements 1, 2, ... by",
5116 "  including = followed by one or more values separated by spaces.  If you",
5117 "  omit the size, the array is sized according to the number of initializers;",
5118 "  if none are given the array is destroyed and undeclared if it already",
5119 "  existed.  The ARRAY keyword is optional.  Synonym: [ ARRAY ] DCL.",
5120 " ",
5121 "[ ARRAY ] UNDECLARE arrayname",
5122 "  Destroys and undeclares the given array.  Synonym: ARRAY DESTROY.",
5123 " ",
5124 "ARRAY SHOW [ arrayname ]",
5125 "  Displays the contents of the given array.  A range specifier can be",
5126 "  included to display a segment of the array, e.g. \"array show \\&a[1:24].\""
5127 ,
5128 "  If the arrayname is omitted, all declared arrays are listed, but their",
5129 "  contents is not shown.  Synonym: SHOW ARRAY.",
5130 " ",
5131 "ARRAY CLEAR arrayname",
5132 "  Clears all elements of the array, i.e. sets them to empty values.",
5133 "  You may include a range specifier to clear a segment of the array rather",
5134 "  than the whole array, e.g. \"array clear \\%a[22:38]\"",
5135 " ",
5136 "ARRAY SET arrayname value",
5137 "  Sets all elements of the array to the given value.  You may specify a",
5138 "  range to set a segment of the array, e.g. \"array set \\%a[2:9] 0\"",
5139 " ",
5140 "ARRAY RESIZE arrayname number",
5141 "  Changes the size of the given array, which must already exist, to the",
5142 "  number given.  If the number is smaller than the current size, the extra",
5143 "  elements are discarded; if it is larger, new empty elements are added.",
5144 " ",
5145 "ARRAY COPY array1 array2",
5146 "  Copys array1 to array2.  If array2 has not been declared, it is created",
5147 "  automatically.  Range specifiers may be given on one or both arrays.",
5148 " ",
5149 "ARRAY LINK array1 arra2",
5150 "  Makes array1 a link to array2.",
5151 " ",
5152 "[ ARRAY ] SORT [ switches ] array-name [ array2 ]",
5153 "  Sorts the given array lexically according to the switches.  Element 0 of",
5154 "  the array is excluded from sorting by default.  The ARRAY keyword is",
5155 "  optional.  If a second array name is given, that array is sorted according",
5156 "  to the first one.  Switches:",
5157 " ",
5158 "  /CASE:{ON,OFF}",
5159 "    If ON, alphabetic case matters; if OFF it is ignored.  If this switch is",
5160 "    omitted, the current SET CASE setting applies.",
5161 " ",
5162 "  /KEY:number",
5163 "    \
5164 Position (1-based column number) at which comparisons begin, 1 by default.",
5165 " ",
5166 "  /NUMERIC",
5167 "    Specifies a numeric rather than lexical sort.",
5168 " ",
5169 "  /RANGE:low[:high]",
5170 "    The range of elements, low through high, to be sorted.  If this switch",
5171 "    is not given, elements 1 through the dimensioned size are sorted.  If",
5172 "    :high is omitted, the dimensioned size is used.  To include element 0 in",
5173 "    a sort, use /RANGE:0 (to sort the whole array) or /RANGE:0:n (to sort",
5174 "    elements 0 through n).  You can use a range specifier in the array name",
5175 "    instead of the /RANGE switch.",
5176 " ",
5177 "  /REVERSE",
5178 "    Sort in reverse order.  If this switch is not given, the array is sorted",
5179 "    in ascending order.",
5180 " ",
5181 "Various functions are available for array operations; see HELP FUNCTION for",
5182 "details.  These include \\fdimension(), \\farraylook(), \\ffiles(), \
5183 \\fsplit(),",
5184 "and many more.",
5185 ""};
5186 #endif /* NOSPL */
5187
5188 #ifdef ZCOPY
5189 static char * hmxxcpy[] = {
5190 "Syntax: COPY [ switches ] file1 file2",
5191 "  Copies the source file (file1) to the destination file (file2).  If file2",
5192 "  is a directory, file1 can contain wildcards to denote a group of files to",
5193 "  be copied to the given directory.  Switches:",
5194 " ",
5195 "  /LIST",
5196 "    Print the filenames and status while copying.  Synonyms: /LOG, /VERBOSE",
5197 " ",
5198 "  /NOLIST",
5199 "    Copy silently (default). Synonyms: /NOLOG, /QUIET",
5200 " ",
5201 "  /SWAP-BYTES",
5202 "    Swap bytes while copying.",
5203 #ifndef NOSPL
5204 " ",
5205 "  /FROMB64",
5206 "    Convert from Base64 encoding while copying.",
5207 " ",
5208 "  /TOB64",
5209 "    Convert to Base64 encoding while copying.",
5210 #endif /* NOSPL */
5211 ""
5212 };
5213 #endif /* ZCOPY */
5214
5215 #ifndef NOFRILLS
5216 static char * hmxxren[] = {
5217 #ifdef LOCUS
5218 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
5219 "  this command is equivalent to REMOTE RENAME (RREN).  Otherwise:",
5220 " ",
5221 #endif /* LOCUS */
5222 "Syntax: RENAME [ switches ] name1 name2",
5223 "  Renames the source file (name1) to the target name2.  If name2 is a",
5224 "  directory, name1 is allowed to contain wildcards, and the file(s) matching",
5225 "  name1 are moved to directory name2, subject to rules of the underlying",
5226 "  operating system regarding renaming across disk boundaries, etc.  If name2",
5227 "  is not a directory, name1 may not include wildcards, and the file whose",
5228 "  name is name1 is renamed to name2.  Switches:",
5229 " ",
5230 "  /LIST",
5231 "    Print the filenames and status while renaming.  Synonyms: /LOG, /VERBOSE",
5232 " ",
5233 "  /NOLIST",
5234 "    Rename silently (default). Synonyms: /NOLOG, /QUIET",
5235 ""
5236 };
5237 #endif /* NOFRILLS */
5238
5239 static char *
5240 cmdlhlp[] = {
5241 "Command-line options are given after the program name in the system",
5242 "command that you use to start Kermit.  Example:",
5243 " ",
5244 " kermit -i -s oofa.exe",
5245 " ",
5246 "tells Kermit to send (-s) the file oofa.exe in binary (-i) mode.",
5247 " ",
5248 "Command-line options are case-sensitive; \"-s\" is different from \"-S\".",
5249 #ifdef VMS
5250 "In VMS, uppercase options must be enclosed in doublequotes: ",
5251 " ",
5252 " $ kermit \"-Y\" \"-S\" -s oofa.txt ",
5253 #endif /* VMS */
5254 " ",
5255 "If any \"action options\" are included on the command line, Kermit exits",
5256 "after executing its command-line options.  If -S is included, or no action",
5257 "options were given, Kermit enters its interactive command parser and",
5258 "issues its prompt.",
5259 " ",
5260 "Command-line options are single characters preceded by dash (-).  Some",
5261 "require an \"argument,\" others do not.  If an argument contains spaces, it",
5262 "must be enclosed in doublequotes:",
5263 " ",
5264 " kermit -s \"filename with spaces\"",
5265 " ",
5266 "\
5267 An option that does not require an argument can be bundled with other options:"
5268 ,
5269 " ",
5270 " kermit -Qis oofa.exe",
5271 " ",
5272 "Exceptions to the rules:",
5273 " ",
5274 " . If the first command-line option is a filename, Kermit executes commands",
5275 "   from the file.  Additional command-line options can follow the filename.",
5276 " ",
5277 " . The special option \"=\" (equal sign) or \"--\" (double hyphen) means to",
5278 "   treat the rest of the command line as data, rather than commands; this",
5279 "   data is placed in the argument vector array, \\&@[], along with the other",
5280 "   items on the command line, and also in the top-level \\%1..\\%9 variables."
5281 ,
5282 " ",
5283 #ifdef KERBANG
5284 " . A similar option \"+\" (plus sign) means: the name of a Kermit script",
5285 "   file follows.  This file is to be executed, and its name assigned to \\%0",
5286 "   and \\&_[0].  All subsequent command-line arguments are to be ignored by",
5287 "   Kermit but made available to the script as \\%1, \\%2, ..., as well as",
5288 "   in the argument-vector arrays.  The initialization file is not executed",
5289 "   automatically in this case.",
5290 " ",
5291 #endif /* KERBANG */
5292 " . The -s option can accept multiple filenames, separated by spaces.",
5293 " ",
5294 " . the -j and -J options allow an optional second argument, the TCP port",
5295 "   name or number.",
5296 " ",
5297 "Type \"help options all\" to list all the command-line options.",
5298 "Type \"help option x\" to see the help message for option x.",
5299 " ",
5300 "Kermit also offers a selection of \"extended command-line\" options.",
5301 "These begin with two dashes, followed by a keyword, and then, if the option",
5302 "has arguments, a colon (:) or equal sign (=) followed by the argument.",
5303 "Unlike single-letter options, extended option keywords aren't case sensitive",
5304 "and they can be abbreviated to any length that still distinguishes them from",
5305 "other extended-option keywords.  Example:",
5306 " ",
5307 "  kermit --banner:oofa.txt",
5308 " ",
5309 "which designates the file oofa.txt to be printed upon startup, rather than",
5310 "the built-in banner (greeting) text.  To obtain a list of available",
5311 "extended options, type \"help extended-options ?\".  To get help about all",
5312 "extended options, type \"help extended-options\".  To get help about a",
5313 "particular extended option, type \"help extended-option xxx\", where \"xxx\"",
5314 "is the option keyword.",
5315 #ifdef COMMENT
5316 #ifndef NOIKSD
5317 " ",
5318 "At present, most of the extended options apply only to the Internet Kermit",
5319 "Service Daemon (IKSD).  Type \"help iksd\" for details.",
5320 #endif /* NOIKSD */
5321 #endif /* COMMENT */
5322 ""
5323 };
5324
5325 #ifndef NOHELP
5326 #ifndef NOCMDL
5327 int
5328 doxopts() {
5329     extern char * xopthlp[], * xarghlp[];
5330     extern struct keytab xargtab[];
5331     extern int nxargs;
5332     int i, x, y, n = 0;
5333 #ifdef CK_TTGWSIZ
5334 #ifdef OS2
5335     ttgcwsz();
5336 #else /* OS2 */
5337     /* Check whether window size changed */
5338     if (ttgwsiz() > 0) {
5339         if (tt_rows > 0 && tt_cols > 0) {
5340             cmd_rows = tt_rows;
5341             cmd_cols = tt_cols;
5342         }
5343     }
5344 #endif /* OS2 */
5345 #endif /* CK_TTGWSIZ */
5346     y = cmkey(xargtab,
5347               nxargs,
5348               "Extended argument without the \"--\" prefix",
5349               "",
5350               xxstring
5351               );
5352     if (y == -3) {
5353         printf("\n");
5354         if ((x = cmcfm()) < 0)
5355           return(x);
5356         for (i = 0; i <= XA_MAX; i++) {
5357             if (xopthlp[i]) {
5358                 printf("%s\n",xopthlp[i]);
5359                 printf("   %s\n",xarghlp[i]);
5360                 printf("\n");
5361                 n += 3;
5362                 if (n > (cmd_rows - 6)) {
5363                     if (!askmore())
5364                       return(0);
5365                     else
5366                       n = 0;
5367                 }
5368             }
5369         }
5370         return(1);
5371     } else if (y < 0)
5372       return(y);
5373     if ((x = cmcfm()) < 0)
5374       return(x);
5375     printf("\n%s\n",xopthlp[y]);
5376     printf("   %s\n\n",xarghlp[y]);
5377     return(1);
5378 }
5379
5380 int
5381 dohopts() {
5382     int i, n, x, y, z, all = 0, msg = 0;
5383     char *s;
5384     extern char *opthlp[], *arghlp[];
5385     extern char * xopthlp[], * xarghlp[];
5386     extern int optact[];
5387     if ((x = cmtxt("A command-line option character,\n\
5388 or the word ALL, or carriage return for an overview",
5389                    "", &s, xxstring)) < 0)
5390       return(x);
5391     if (!*s)
5392       msg = 1;
5393     else if (!strcmp(s,"all") || (!strcmp(s,"ALL")))
5394       all = 1;
5395     else if (*s == '-')                 /* Be tolerant of leading hyphen */
5396       s++;
5397     if (!all && (int)strlen(s) > 1) {
5398         printf("?A single character, please, or carriage to list them all.\n");
5399         return(-9);
5400     }
5401     if (all) {
5402         y = 33;
5403         z = 127;
5404     } else {
5405         y = *s;
5406         z = (y == 0) ? 127 : y;
5407         if (y == 0) y = 33;
5408     }
5409 #ifdef CK_TTGWSIZ
5410 #ifdef OS2
5411     ttgcwsz();
5412 #else /* OS2 */
5413     /* Check whether window size changed */
5414     if (ttgwsiz() > 0) {
5415         if (tt_rows > 0 && tt_cols > 0) {
5416             cmd_rows = tt_rows;
5417             cmd_cols = tt_cols;
5418         }
5419     }
5420 #endif /* OS2 */
5421 #endif /* CK_TTGWSIZ */
5422     printf("\n");
5423     for (i = 0, n = 1; msg != 0 && *cmdlhlp[i]; i++) {
5424         printf("%s\n",cmdlhlp[i]);
5425         if (++n > (cmd_rows - 3)) {
5426            if (!askmore())
5427              return(0);
5428            else
5429              n = 0;
5430         }
5431     }
5432     if (all) {
5433         printf("The following command-line options are available:\n\n");
5434         n += 2;
5435     }
5436     for (i = y; msg == 0 && i <= z; i++) {
5437         if (!opthlp[i])
5438           continue;
5439         if (arghlp[i]) {                /* Option with arg */
5440             printf(" -%c <arg>%s\n",(char)i,(optact[i]?" (action option)":""));
5441
5442             printf("     %s\n",opthlp[i]);
5443             printf("     Argument: %s\n\n",arghlp[i]);
5444             x = 4;
5445         } else {                        /* Option without arg */
5446             printf(" -%c  %s%s\n",
5447                    (char)i, opthlp[i],
5448                    (optact[i]?" (action option)":"")
5449                   );
5450             printf("     Argument: (none)\n\n");
5451             x = 3;
5452         }
5453         n += x;
5454         if (n > (cmd_rows - x - 1)) {
5455             if (!askmore())
5456               return(0);
5457            else
5458               n = 0;
5459         }
5460     }
5461     if (all) {                          /* Jeff, Jan 2003 */
5462         printf("\n");
5463         if (++n >= cmd_rows) {
5464             if (!askmore())
5465               return(0);
5466             else
5467               n = 0;
5468         }
5469         printf("The following extended options are available:\n");
5470         if (++n >= cmd_rows) {
5471             if (!askmore())
5472               return(0);
5473             else
5474               n = 0;
5475         }
5476         printf("\n");
5477         if (++n >= cmd_rows) {
5478             if (!askmore())
5479               return(0);
5480             else
5481               n = 0;
5482         }
5483         for (i = 0; i <= XA_MAX; i++) {
5484             if (xopthlp[i]) {
5485                 printf("%s\n",xopthlp[i]);
5486                 printf("   %s\n",xarghlp[i]);
5487                 printf("\n");
5488                 n += 3;
5489                 if (n > (cmd_rows - 4)) {
5490                     if (!askmore())
5491                       return(0);
5492                     else
5493                       n = 0;
5494                 }
5495             }
5496         }
5497     }
5498     return(1);
5499 }
5500 #endif /* NOCMDL */
5501 #endif /* NOHELP */
5502
5503 #ifdef CKCHANNELIO
5504 static char * hxxfile[] = {
5505 "Syntax: FILE <subcommand> [ switches ] <channel> [ <data> ]",
5506 "  Opens, closes, reads, writes, and manages local files.",
5507 " ",
5508 "The FILE commands are:",
5509 " ",
5510 "  FILE OPEN   (or FOPEN)   -- Open a local file.",
5511 "  FILE CLOSE  (or FCLOSE)  -- Close an open file.",
5512 "  FILE READ   (or FREAD)   -- Read data from an open file.",
5513 "  FILE WRITE  (or FWRITE)  -- Write data to an open file.",
5514 "  FILE LIST   (or FLIST)   -- List open files.",
5515 "  FILE STATUS (or FSTATUS) -- Show status of a channel.",
5516 "  FILE REWIND (or FREWIND) -- Rewind an open file",
5517 "  FILE COUNT  (or FCOUNT)  -- Count lines or bytes in an open file",
5518 "  FILE SEEK   (or FSEEK)   -- Seek to specified spot in an open file.",
5519 "  FILE FLUSH  (or FFLUSH)  -- Flush output buffers for an open file.",
5520 " ",
5521 "Type HELP FILE OPEN or HELP FOPEN for details about FILE OPEN;",
5522 "type HELP FILE CLOSE or HELP FCLOSE for details about FILE CLOSE, and so on.",
5523 " ",
5524 "The following variables are related to the FILE command:",
5525 " ",
5526 "  \\v(f_max)     -- Maximum number of files that can be open at once",
5527 "  \\v(f_error)   -- Completion code of most recent FILE command or function",
5528 "  \\v(f_count)   -- Result of most recent FILE COUNT command",
5529 " ",
5530 "The following functions are related to the FILE command:",
5531 " ",
5532 "  \\F_eof()      -- Check if channel is at EOF",
5533 "  \\F_pos()      -- Get channel read/write position (byte number)",
5534 "  \\F_line()     -- Get channel read/write position (line number)",
5535 "  \\F_handle()   -- Get file handle",
5536 "  \\F_status()   -- Get channel status",
5537 "  \\F_getchar()  -- Read character",
5538 "  \\F_getline()  -- Read line",
5539 "  \\F_getblock() -- Read block",
5540 "  \\F_putchar()  -- Write character",
5541 "  \\F_putline()  -- Write line",
5542 "  \\F_putblock() -- Write block",
5543 "  \\F_errmsg()   -- Error message from most recent FILE command or function",
5544 " ",
5545 "Type HELP <function-name> for information about each one.",
5546 ""
5547 };
5548
5549 static char * hxxf_op[] = {
5550 "Syntax: FILE OPEN [ switches ] <variable> <filename>",
5551 "  Opens the file indicated by <filename> in the mode indicated by the",
5552 "  switches, if any, or if no switches are included, in read-only mode, and",
5553 "  assigns a channel number for the file to the given variable.",
5554 "  Synonym: FOPEN.  Switches:",
5555 " ",
5556 "/READ",
5557 "  Open the file for reading.",
5558 " ",
5559 "/WRITE",
5560 "  Open the file for writing.  If /READ was not also specified, this creates",
5561 "  a new file.  If /READ was specifed, the existing file is preserved, but",
5562 "  writing is allowed.  In both cases, the read/write pointer is initially",
5563 "  at the beginning of the file.",
5564 " ",
5565 "/APPEND",
5566 "  If the file does not exist, create a new file and open it for writing.",
5567 "  If the file exists, open it for writing, but with the write pointer",
5568 "  positioned at the end.",
5569 " ",
5570 "/BINARY",
5571 #ifdef VMS
5572 "  Opens the file in binary mode to inhibit end-of-line conversions.",
5573 #else
5574 #ifdef OS2
5575 "  Opens the file in binary mode to inhibit end-of-line conversions.",
5576 #else
5577 #ifdef UNIX
5578 "  This option is ignored in UNIX.",
5579 #else
5580 "  This option is ignored on this platform.",
5581 #endif /* UNIX */
5582 #endif /* OS2 */
5583 #endif /* VMS */
5584 " ",
5585 "Switches can be combined in an way that makes sense and is supported by the",
5586 "underlying operating system.",
5587 ""
5588 };
5589
5590 static char * hxxf_cl[] = {
5591 "Syntax: FILE CLOSE <channel>",
5592 "  Closes the file on the given channel if it was open.",
5593 "  Also see HELP FILE OPEN.  Synonym: FCLOSE.",
5594 ""
5595 };
5596
5597 static char * hxxf_fl[] = {
5598 "Syntax: FILE FLUSH <channel>",
5599 "  Flushes output buffers on the given channel if it was open, forcing",
5600 "  all material previously written to be committed to disk.  Synonym: FFLUSH.",
5601 "  Also available as \\F_flush().",
5602 ""
5603 };
5604
5605 static char * hxxf_li[] = {
5606 "Syntax: FILE LIST",
5607 "  Lists the channel number, name, modes, and position of each file opened",
5608 "  with FILE OPEN.  Synonym: FLIST.",
5609 ""
5610 };
5611
5612 static char * hxxf_re[] = {
5613 "Syntax: FILE READ [ switches ] <channel> [ <variable> ]",
5614 "  Reads data from the file on the given channel number into the <variable>,",
5615 "  if one was given; if no variable was given, the result is printed on",
5616 "  the screen.  The variable should be a macro name rather than a \\%x",
5617 "  variable or array element if you want backslash characters in the file to",
5618 "  be taken literally.  Synonym: FREAD.  Switches:",
5619 " ",
5620 "/LINE",
5621 "  Specifies that a line of text is to be read.  A line is defined according",
5622 "  to the underlying operating system's text-file format.  For example, in",
5623 "  UNIX a line is a sequence of characters up to and including a linefeed.",
5624 "  The line terminator (if any) is removed before assigning the text to the",
5625 "  variable.  If no switches are included with the FILE READ command, /LINE",
5626 "  is assumed.",
5627 " ",
5628 "/SIZE:number",
5629 "  Specifies that the given number of bytes (characters) is to be read.",
5630 "  This gives a semblance of \"record i/o\" for files that do not necessarily",
5631 "  contain lines.  The resulting block of characters is assigned to the",
5632 "  variable without any editing.",
5633 " ",
5634 "/CHARACTER",
5635 "  Equivalent to /SIZE:1.  If FILE READ /CHAR succeeds but the <variable> is",
5636 "  empty, this indicates a NUL byte was read.",
5637 " ",
5638 "/TRIM",
5639 "  Tells Kermit to trim trailing whitespace when used with /LINE.  Ignored",
5640 "  if used with /CHAR or /SIZE.",
5641 " ",
5642 "/UNTABIFY",
5643 "  Tells Kermit to convert tabs to spaces (assuming tabs set every 8 spaces)",
5644 "  when used with /LINE.  Ignored if used with /CHAR or /SIZE.",
5645 " ",
5646 "Synonym: FREAD.",
5647 "Also available as \\F_getchar(), \\F_getline(), \\F_getblock().",
5648 ""
5649 };
5650
5651 static char * hxxf_rw[] = {
5652 "Syntax: FILE REWIND <channel>",
5653 "  If the channel is open, moves the read/write pointer to the beginning of",
5654 "  the file.  Equivalent to FILE SEEK <channel> 0.  Synonym: FREWIND.",
5655 "  Also available as \\F_rewind().",
5656 ""
5657 };
5658
5659 static char * hxxf_se[] = {
5660 "Syntax: FILE SEEK [ switches ] <channel> { [{+,-}]<number>, EOF }",
5661 "  Switches are /BYTE, /LINE, /RELATIVE, ABSOLUTE.",
5662 "  Moves the file pointer for this file to the given position in the",
5663 "  file.  Subsequent FILE READs or WRITEs will take place at that position.",
5664 "  If neither the /RELATIVE nor /ABSOLUTE switch is given, an unsigned",
5665 "  <number> is absolute; a signed number is relative.  EOF means to move to",
5666 "  the end of the file.  Synonym: FSEEK.  Also available as \\F_seek().",
5667 ""
5668 };
5669
5670 static char * hxxf_st[] = {
5671 "Syntax: FILE STATUS <channel>",
5672 "  If the channel is open, this command shows the name of the file, the",
5673 "  switches it was opened with, and the current read/write position.",
5674 "  Synonym: FSTATUS",
5675 ""
5676 };
5677
5678 static char * hxxf_co[] = {
5679 "Syntax: FILE COUNT [ { /BYTES, /LINES, /LIST, /NOLIST } ] <channel>",
5680 "  If the channel is open, this command prints the nubmer of bytes (default)",
5681 "  or lines in the file if at top level or if /LIST is included; if /NOLIST",
5682 "  is given, the result is not printed.  In all cases the result is assigned",
5683 "  to \\v(f_count).  Synonym: FCOUNT",
5684 ""
5685 };
5686
5687 static char * hxxf_wr[] = {
5688 "FILE WRITE [ switches ] <channel> <text>",
5689 "  Writes the given text to the file on the given channel number.  The <text>",
5690 "  can be literal text or a variable, or any combination.  If the text might",
5691 "  contain leading or trailing spaces, it must be enclosed in braces if you",
5692 "  want to preserve them.  Synonym: FWRITE.  Switches:",
5693 " ",
5694 "/LINE",
5695 "  Specifies that an appropriate line terminator is to be added to the",
5696 "  end of the <text>.  If no switches are included, /LINE is assumed.",
5697 " ",
5698 "/SIZE:number",
5699 "  Specifies that the given number of bytes (characters) is to be written.",
5700 "  If the given <text> is longer than the requested size, it is truncated;",
5701 "  if is shorter, it is padded according /LPAD and /RPAD switches.  Synonym:",
5702 "  /BLOCK.",
5703 " ",
5704 "/LPAD[:value]",
5705 "  If /SIZE was given, but the <text> is shorter than the requested size,",
5706 "  the text is padded on the left with sufficient copies of the character",
5707 "  whose ASCII value is given to write the given length.  If no value is",
5708 "  specified, 32 (the code for Space) is used.  The value can also be 0 to",
5709 "  write the indicated number of NUL bytes.  If /SIZE was not given, this",
5710 "  switch is ignored.",
5711 " ",
5712 "/RPAD[:value]",
5713 "  Like LPAD, but pads on the right.",
5714 " ",
5715 "/STRING",
5716 "  Specifies that the <text> is to be written as-is, with no terminator added."
5717 ,
5718 " ",
5719 "/CHARACTER",
5720 "  Specifies that one character should be written.  If the <text> is empty or",
5721 "  not given, a NUL character is written; otherwise the first character of",
5722 "  <text> is given.",
5723 " ",
5724 "Synonym FWRITE.",
5725 "Also available as \\F_putchar(), \\F_putline(), \\F_putblock().",
5726 ""
5727 };
5728
5729 static int
5730 dohfile(cx) int cx; {
5731     extern struct keytab fctab[];
5732     extern int nfctab;
5733     int x;
5734     if (cx == XXFILE) {                 /* FILE command was given */
5735         /* Get subcommand */
5736         if ((cx = cmkey(fctab,nfctab,"Operation","",xxstring)) < 0) {
5737             if (cx == -3) {
5738                 if ((x = cmcfm()) < 0)
5739                   return(x);
5740                 cx = XXFILE;
5741             } else
5742               return(cx);
5743         }
5744         if ((x = cmcfm()) < 0)
5745           return(x);
5746         switch (cx) {
5747           case FIL_CLS: cx = XXF_CL; break;
5748           case FIL_FLU: cx = XXF_FL; break;
5749           case FIL_LIS: cx = XXF_LI; break;
5750           case FIL_OPN: cx = XXF_OP; break;
5751           case FIL_REA: cx = XXF_RE; break;
5752           case FIL_REW: cx = XXF_RW; break;
5753           case FIL_SEE: cx = XXF_SE; break;
5754           case FIL_STA: cx = XXF_ST; break;
5755           case FIL_WRI: cx = XXF_WR; break;
5756           case FIL_COU: cx = XXF_CO; break;
5757         }
5758     }
5759     switch (cx) {
5760       case XXFILE: return(hmsga(hxxfile));
5761       case XXF_CL: return(hmsga(hxxf_cl));
5762       case XXF_FL: return(hmsga(hxxf_fl));
5763       case XXF_LI: return(hmsga(hxxf_li));
5764       case XXF_OP: return(hmsga(hxxf_op));
5765       case XXF_RE: return(hmsga(hxxf_re));
5766       case XXF_RW: return(hmsga(hxxf_rw));
5767       case XXF_SE: return(hmsga(hxxf_se));
5768       case XXF_ST: return(hmsga(hxxf_st));
5769       case XXF_WR: return(hmsga(hxxf_wr));
5770       case XXF_CO: return(hmsga(hxxf_co));
5771       default:
5772         return(-2);
5773     }
5774 }
5775 #endif /* CKCHANNELIO */
5776
5777 int
5778 dohlp(xx) int xx; {
5779     int x,y;
5780
5781     debug(F101,"DOHELP xx","",xx);
5782     if (xx < 0) return(xx);
5783
5784 #ifdef NOHELP
5785     if ((x = cmcfm()) < 0)
5786       return(x);
5787     printf("\n%s, Copyright (C) 1985, 2004,",versio);
5788 #ifndef NOIKSD
5789     if (inserver)
5790       return(hmsga(tophlpi));
5791     else
5792 #endif /* IKSD */
5793       return(hmsga(tophlp));
5794
5795 #else /* help is available */
5796
5797     if (helpfile)
5798       return(dotype(helpfile,xaskmore,0,0,NULL,0,NULL,0,0,NULL,0));
5799
5800 #ifdef CKCHANNELIO
5801     if (xx == XXFILE)
5802       return(dohfile(xx));
5803     else if (xx == XXF_RE || xx == XXF_WR || xx == XXF_OP ||
5804              xx == XXF_CL || xx == XXF_SE || xx == XXF_RW ||
5805              xx == XXF_FL || xx == XXF_LI || xx == XXF_ST || xx == XXF_CO)
5806       return(dohfile(xx));
5807 #endif /* CKCHANNELIO */
5808
5809     switch (xx) {
5810
5811 #ifndef NOSPL
5812 case XXASS:                             /* ASSIGN */
5813     return(hmsga(hxxass));
5814
5815 case XXASK:                             /* ASK */
5816 case XXASKQ:                            /* ASKQ */
5817     return(hmsga(hxxask));
5818
5819 case XXAPC:
5820     return(hmsg("Syntax: APC text\n\
5821   Echoes the text within a VT220/320/420 Application Program Command."));
5822 #endif /* NOSPL */
5823
5824 #ifndef NOFRILLS
5825 case XXBUG:
5826     return(hmsg("Describes how to get technical support."));
5827 #endif /* NOFRILLS */
5828
5829 #ifndef NOSPL
5830 case XXBEEP:
5831 #ifdef OS2
5832     return(hmsg("Syntax: BEEP [ { ERROR, INFORMATION, WARNING } ]\n\
5833   Generates a bell according to the current settings.  If SET BELL is set to\n\
5834   \"system-sounds\" then the appropriate System Sound will be generated.\n\
5835   Default is INFORMATION."));
5836 #else /* OS2 */
5837     return(hmsg("Syntax: BEEP\n\
5838 Sends a BEL character to your terminal."));
5839 #endif /* OS2 */
5840 #endif /* NOSPL */
5841
5842 case XXBYE:                             /* BYE */
5843     return(hmsg(hmxxbye));
5844
5845 case XXCHK:                             /* check */
5846     return(hmsg("\
5847 Syntax: CHECK name\n\
5848   Checks\
5849   to see if the named feature is included in this version of Kermit.\n\
5850   To list the features you can check, type \"check ?\"."));
5851
5852 #ifndef NOFRILLS
5853 case XXCLE:                             /* clear */
5854     return(hmsga(hmxxcle));
5855 #endif /* NOFRILLS */
5856
5857 case XXCLO:                             /* close */
5858     return(hmsga(hmxxclo));
5859
5860 case XXCOM:                             /* comment */
5861 #ifndef STRATUS /* Can't use # for comments in Stratus VOS */
5862     return(hmsg("\
5863 Syntax: COMMENT text\n\
5864 Example: COMMENT - this is a comment.\n\
5865   Introduces a comment.  Beginning of command line only.  Commands may also\n\
5866   have trailing comments, introduced by ; or #."));
5867 #else
5868     return(hmsg("\
5869 Syntax: COMMENT text\n\
5870 Example: COMMENT - this is a comment.\n\
5871   Introduces a comment.  Beginning of command line only.  Commands may also\n\
5872   have trailing comments, introduced by ; (semicolon)."));
5873 #endif /* STRATUS */
5874
5875 #ifndef NOLOCAL
5876 case XXCON:                             /* CONNECT */
5877 case XXCQ:                              /* CQ == CONNECT /QUIETLY */
5878     hmsga(hmxxcon);
5879     printf("Your escape character is Ctrl-%c (ASCII %d, %s)\r\n",
5880            ctl(escape), escape, (escape == 127 ? "DEL" : ccntab[escape]));
5881     return(0);
5882 #endif /* NOLOCAL */
5883
5884 #ifdef ZCOPY
5885 case XXCPY:
5886     return(hmsga(hmxxcpy));
5887 #endif /* ZCOPY */
5888
5889 #ifdef NT
5890 case XXLINK:
5891 return(hmsg(
5892 "  LINK source destination\n\
5893    creates a hard link to the file specified by source to the filename\n\
5894    specified by destination.  Hard links are only supported on NTFS.\n\
5895    destination can either be a filename or a directory.  source may\n\
5896    contain wildcards if destination is a directory."));
5897 #endif /* NT */
5898
5899 #ifndef NOFRILLS
5900 case XXLREN:                            /* LRENAME */
5901     return(hmsg(
5902 "  LRENAME is an alias for the RENAME command forcing it to execute\n\
5903   on the local computer.  Also see: RENAME, RRENAME, SET LOCUS."));
5904
5905 case XXREN:
5906     return(hmsga(hmxxren));
5907 #endif /* NOFRILLS */
5908
5909 case XXCDUP:                             /* CDUP */
5910 case XXLCDU:
5911     return(hmsg(
5912 "Change working directory to the one just above the current one."));
5913
5914 case XXLCWD:
5915     return(hmsg(
5916 "  LCD (LCWD) is an alias for the CD (CWD) command forcing it to execute\n\
5917   on the local computer.  Also see: CD, CDUP, RCD, SET LOCUS."));
5918
5919 case XXCWD:                             /* CD / CWD */
5920     return(hmsga(hmxxcwd));
5921
5922 #ifndef NOSPL
5923 case XXKCD:
5924     return(hmsga(hmxxkcd));
5925
5926 case XXARRAY:
5927 case XXDCL:                             /* DECLARE */
5928 case XXSORT:
5929     return(hmsga(hxxdcl));
5930
5931 case XXDEF:                             /* DEFINE */
5932 #ifndef NOSPL
5933     if (hlptok)                         /* What they actually typed... */
5934       if (hlptok[0] == '.')
5935         return(hmsga(hxxdot));
5936 #endif /* NOSPL */
5937     return(hmsga(hxxdef));
5938
5939 case XXUNDEF:                           /* UNDEFINE */
5940     return(hmsg("Syntax:  UNDEFINE variable-name\n\
5941   Undefines a macro or variable."));
5942 #endif /* NOSPL */
5943
5944 #ifndef NOFRILLS
5945 case XXLDEL:
5946     return(hmsg(
5947 "  LDELETE is an alias for the DELETE command forcing it to execute\n\
5948   on the local computer.  Also see: DELETE, RDELETE, SET LOCUS."));
5949
5950 case XXDEL:                             /* delete */
5951     return(hmsga(hmxxdel));
5952 #endif /* NOFRILLS */
5953
5954 #ifndef NODIAL
5955 case XXDIAL:                            /* DIAL, etc... */
5956     return(hmsga(hxxdial));
5957
5958 case XXPDIA:                            /* PDIAL */
5959     return(hmsg("Syntax: PDIAL phonenumber\n\
5960   Partially dials a phone number.  Like DIAL but does not wait for carrier\n\
5961   or CONNECT message."));
5962
5963 case XXRED:
5964     return(hmsg("Redial the number given in the most recent DIAL commnd."));
5965
5966 case XXANSW:                            /* ANSWER */
5967     return(hmsga(hxxansw));
5968
5969 case XXLOOK:                            /* LOOKUP number in directory */
5970     return(hmsga(hxxlook));
5971 #endif /* NODIAL */
5972
5973 case XXLDIR:                            /* LDIRECTORY */
5974     return(hmsg(
5975 "  LDIRIRECTORY is an alias for the DIRECTORY command forcing it to execute\n\
5976   on the local computer.  Also see: DIRECTORY, SET LOCUS, RDIRECTORY."));
5977
5978 case XXDIR:                             /* DIRECTORY */
5979     return(hmsga(hmxxdir));
5980
5981 case XXLMKD:                            /* LMKDIR */
5982     return(hmsg(
5983 "  LMKDIR is an alias for the MKDIR command forcing it to execute\n\
5984   on the local computer.  Also see: MKDIR, RMKDIR, SET LOCUS."));
5985
5986 case XXMKDIR:                           /* MKDIR */
5987     return(hmsg("Creates a directory.  Also see LRMDIR, RRMDIR, SET LOCUS."));
5988
5989 case XXLRMD:                            /* LRMDIR */
5990     return(hmsg(
5991 "  LRMDIR is an alias for the RMDIR command forcing it to execute\n\
5992   on the local computer.  Also see: RMDIR, RRMDIR, SET LOCUS."));
5993
5994 case XXRMDIR:                           /* RMDIR */
5995     return(hmsg("Removes a directory.  Also see LRMDIR, RRMDIR, SET LOCUS."));
5996
5997 case XXLS:
5998 #ifdef UNIXOROSK
5999     return(hmsg("Syntax: LS [ args ]\n\
6000   Runs \"ls\" with the given arguments."));
6001 #else
6002     return(hmsga(hmxxdir));
6003 #endif /* UNIXOROSK */
6004
6005 #ifndef NOSERVER
6006 #ifndef NOFRILLS
6007 case XXDIS:
6008     return(hmsg("Syntax: DISABLE command\n\
6009   Security for the Kermit server.  Prevents the client Kermit program from\n\
6010   executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc."));
6011 #endif /* NOFRILLS */
6012 #endif /* NOSERVER */
6013
6014 #ifndef NOSPL
6015 case XXDO:                              /* do */
6016     return(hmsg("Syntax: [ DO ] macroname [ arguments ]\n\
6017   Executes a macro that was defined with the DEFINE command.  The word DO\n\
6018   can be omitted.  Trailing argument words, if any, are automatically\n\
6019   assigned to the macro argument variables \\%1 through \\%9."));
6020 #endif /* NOSPL */
6021
6022 #ifndef NOSPL
6023 case XXDEC:
6024     return(hmsga(hxxdec));
6025 #endif /* NOSPL */
6026
6027 case XXECH:                             /* echo */
6028     return(hmsg("Syntax: ECHO text\n\
6029   Displays the text on the screen, followed by a line terminator.  The ECHO\n\
6030   text may contain backslash codes.  Example: ECHO \\7Wake up!\\7.  Also see\n\
6031   XECHO and WRITE SCREEN."));
6032
6033 case XXXECH:                            /* xecho */
6034     return(hmsg("Syntax: XECHO text\n\
6035   Just like ECHO but does not add a line terminator to the text.  See ECHO."));
6036
6037 case XXVOID:
6038     return(hmsg("Syntax: VOID text\n\
6039   Like ECHO but doesn't print anything; can be used to invoke functions\n\
6040   when you don't need to display or use their results."));
6041
6042 #ifndef NOSERVER
6043 #ifndef NOFRILLS
6044 case XXENA:
6045     return(hmsg("Syntax: ENABLE capability\n\
6046   For use with server mode.  Allows the client Kermit program access to the\n\
6047   named capability, such as CD, DELETE, RECEIVE, etc.  Opposite of DISABLE."));
6048 #endif /* NOFRILLS */
6049 #endif /* NOSERVER */
6050
6051 #ifndef NOSPL
6052 case XXEND:                             /* end */
6053     return(hmsg("Syntax: END [ number [ message ] ]\n\
6054   Exits from the current macro or TAKE file, back to wherever invoked from.\n\
6055   Number is return code.  Message, if given, is printed."));
6056
6057 case XXEVAL:                            /* evaluate */
6058     return(hmsga(hmxxeval));
6059 #endif /* NOSPL */
6060
6061 #ifndef NOFRILLS
6062 case XXERR:                             /* e-packet */
6063     return(hmsg("Syntax: E-PACKET\n\
6064   Sends an Error packet to the other Kermit."));
6065 #endif /* NOFRILLS */
6066
6067 case XXEXI:                             /* exit */
6068 case XXQUI:
6069     return(hmsga(hmxxexit));
6070
6071 case XXFIN:
6072     return(hmsg("Syntax: FINISH\n\
6073   Tells the remote Kermit server to shut down without logging out."));
6074
6075 #ifndef NOSPL
6076   case XXFOR:
6077     return(hmsga(forhlp));
6078 #endif /* NOSPL */
6079
6080   case XXGET:
6081     return(hmsga(hmxxget));
6082   case XXMGET:
6083     return(hmsga(hmxxmget));
6084
6085 #ifndef NOSPL
6086 #ifndef NOFRILLS
6087   case XXGOK:
6088     return(hmsg("Syntax: GETOK [ switches ] prompt\n\
6089   Prints the prompt, makes user type 'yes', 'no', or 'ok', and sets SUCCESS\n\
6090   or FAILURE accordingly.  The optional switches are the same as for ASK."));
6091 #endif /* NOFRILLS */
6092 #endif /* NOSPL */
6093
6094 #ifndef NOSPL
6095   case XXGOTO:
6096     return(hmsg("Syntax: GOTO label\n\
6097   In a TAKE file or macro, go to the given label.  A label is a word on the\n\
6098   left margin that starts with a colon (:).  Example:\n\n\
6099   :oofa\n\
6100   echo Hello!\n\
6101   goto oofa"));
6102 #endif /* NOSPL */
6103
6104   case XXHAN:
6105     return(hmsg("Syntax: HANGUP\n\
6106 Hang up the phone or network connection."));
6107
6108   case XXHLP:
6109 /*
6110   We get confirmation here, even though we do it again in hmsga(), to prevent
6111   the Copyright message from being printed prematurely.  This doesn't do any
6112   harm, because the first call to cmcfm() sets cmflgs to 1, making the second
6113   call return immediately.
6114 */
6115     if ((x = cmcfm()) < 0)
6116       return(x);
6117
6118     if (helpfile) {
6119         printf("\n%s, Copyright (C) 1985, 2004,\n\
6120 Trustees of Columbia University in the City of New York.\n\n",versio);
6121         return(dotype(helpfile,xaskmore,3,0,NULL,0,NULL,0,0,NULL,0));
6122     } else {
6123         printf("\n%s, Copyright (C) 1985, 2004,",versio);
6124         return(hmsga(tophlp));
6125     }
6126
6127 case XXINT:
6128 #ifdef OS2
6129     return(hmsg("Give a brief introduction to C-Kermit."));
6130 #else
6131     return(hmsg("Give a brief introduction to Kermit 95."));
6132 #endif /* OS2 */
6133
6134 #ifndef NOSPL
6135 case XXIF:
6136     return(hmsga(ifhlp));
6137
6138 case XXINC:
6139     return(hmsga(hxxinc));
6140
6141 case XXINP:
6142    return(hmsga(hxxinp));
6143 #endif /* NOSPL */
6144
6145 #ifdef CK_MINPUT
6146 case XXMINP:
6147     return(hmsga(hmxxminp));
6148 #endif /* CK_MINPUT */
6149
6150 #ifndef NOSPL
6151 case XXREI:
6152     return(hmsg("Syntax: REINPUT n string\n\
6153   Looks for the string in the text that has recently been INPUT, set SUCCESS\n\
6154   or FAILURE accordingly.  Timeout, n, must be specified but is ignored."));
6155 #endif /* NOSPL */
6156
6157 #ifndef NOSPL
6158 case XXLBL:
6159     return(hmsg("\
6160   Introduces a label, like :loop, for use with GOTO in TAKE files or macros.\n\
6161 See GOTO."));
6162 #endif /* NOSPL */
6163
6164 case XXLOG:
6165     return(hmsga(hmxxlg));
6166
6167 #ifndef NOSCRIPT
6168 case XXLOGI:
6169     return(hmsga(hmxxlogi));
6170 #endif
6171
6172 #ifndef NOFRILLS
6173 case XXMAI:
6174     return(hmsg("Syntax: MAIL filename address\n\
6175   Equivalent to SEND /MAIL:address filename."));
6176 #endif /* NOFRILLS */
6177
6178 #ifndef NOMSEND
6179 case XXMSE:
6180     return(hmsga(hmxxmse));
6181
6182 case XXADD:
6183     return(hmsga(hmxxadd));
6184
6185 case XXMMOVE:
6186     return(hmsg("MMOVE is exactly like MSEND, except each file that is\n\
6187 sent successfully is deleted after it is sent."));
6188 #endif /* NOMSEND */
6189
6190 #ifndef NOSPL
6191 case XXOPE:
6192     return(hmsga(openhlp));
6193 #endif /* NOSPL */
6194
6195 case XXNEW:
6196     return(hmsg(
6197 "  Prints news of new features since publication of \"Using C-Kermit\"."));
6198
6199 case XXUPD:
6200     return(hmsg(
6201 "  New features are described in the online Kermit 95 manual,\n\
6202    accessible via the MANUAL command."));
6203
6204 #ifndef NOSPL
6205 case XXOUT:
6206     return(hmsga(hxxout));
6207 #endif /* NOSPL */
6208
6209 #ifdef ANYX25
6210 #ifndef IBMX25
6211 case XXPAD:
6212     return(hmsga(hxxpad));
6213 #endif /* IBMX25 */
6214 #endif /* ANYX25 */
6215
6216 #ifndef NOSPL
6217 case XXPAU:
6218     return(hmsga(hxxpau));
6219
6220 case XXMSL:
6221     return(hmsga(hxxmsl));
6222 #endif /* NOSPL */
6223
6224 #ifdef TCPSOCKET
6225 case XXPNG:
6226     return(hmsg("Syntax: PING [ IP-hostname-or-number ]\n\
6227   Checks if the given IP network host is reachable.  Default host is from\n\
6228   most recent SET HOST or TELNET command.  Runs system PING program, if any.")
6229            );
6230
6231 case XXFTP:
6232 #ifdef SYSFTP
6233     return(hmsg("Syntax: FTP [ IP-hostname-or-number ]\n\
6234   Makes an FTP connection to the given IP host or, if no host specified, to\n\
6235   the current host.  Uses the system's FTP program, if any."));
6236 #else
6237 #ifndef NOFTP
6238     return(doftphlp());
6239 #endif /* NOFTP */
6240 #endif /* SYSFTP */
6241 #endif /* TCPSOCKET */
6242
6243 #ifndef NOFRILLS
6244 case XXPRI:
6245 #ifdef UNIX
6246     return(hmsg("Syntax: PRINT file [ options ]\n\
6247   Prints the local file on a local printer with the given options.  Also see\n\
6248   HELP SET PRINTER."));
6249 #else
6250 #ifdef VMS
6251     return(hmsg("Syntax: PRINT file [ options ]\n\
6252   Prints the local file on a local printer with the given options.  Also see\n\
6253   HELP SET PRINTER."));
6254 #else
6255     return(hmsg("Syntax: PRINT file\n\
6256   Prints the local file on a local printer.  Also see HELP SET PRINTER."));
6257 #endif /* UNIX */
6258 #endif /* VMS */
6259 #endif /* NOFRILLS */
6260
6261 case XXPWD:
6262 case XXLPWD:
6263     return(hmsg("Syntax: PWD\n\
6264 Print the name of the current working directory."));
6265
6266 #ifndef NOSPL
6267 case XXREA:
6268     return(hmsg("Syntax: READ variablename\n\
6269   Reads a line from the currently open READ or !READ file into the variable\n\
6270   (see OPEN)."));
6271 #endif /* NOSPL */
6272
6273 #ifndef NOXFER
6274 case XXREC:
6275     return(hmsga(hmxxrc));
6276
6277 case XXREM:
6278     y = cmkey(remcmd,nrmt,"Remote command","",xxstring);
6279     return(dohrmt(y));
6280 #endif /* NOXFER */
6281
6282 #ifndef NOSPL
6283 case XXRET:
6284     return(hmsg("Syntax: RETURN [ value ]\n\
6285   Return from a macro.  An optional return value can be given for use with\n\
6286   \\fexecute(macro), which allows macros to be used like functions."));
6287 #endif /* NOSPL */
6288
6289 #ifndef NOXFER
6290 case XXSEN:
6291     return(hmsga(hmxxsen));
6292 case XXMOVE:
6293     return(hmsg("MOVE is exactly like SEND, except each file that is\n\
6294 sent successfully is deleted after it is sent."));
6295 #ifndef NORESEND
6296 case XXRSEN:
6297     return(hmsg(hmxxrsen));
6298 case XXREGET:
6299     return(hmsg(hmxxrget));
6300 case XXPSEN:
6301     return(hmsg(hmxxpsen));
6302 #endif /* NORESEND */
6303
6304 #ifndef NOSERVER
6305 case XXSER:
6306     return(hmsg(hmxxser));
6307 #endif /* NOSERVER */
6308 #endif /* NOXFER */
6309
6310 #ifndef NOJC
6311 case XXSUS:
6312     return(hmsg("Syntax: SUSPEND or Z\n\
6313   Suspends Kermit.  Continue Kermit with the appropriate system command,\n\
6314   such as fg."));
6315 #endif /* NOJC */
6316
6317 case XXSET:
6318     y = cmkey(prmtab,nprm,"Parameter","",xxstring);
6319     debug(F101,"HELP SET y","",y);
6320     return(dohset(y));
6321
6322 #ifndef NOPUSH
6323 case XXSHE:
6324     if (nopush) {
6325         if ((x = cmcfm()) < 0) return(x);
6326         printf("Sorry, help not available for \"%s\"\n",cmdbuf);
6327         break;
6328     } else
6329        return(hmsga(hxxshe));
6330 #ifdef CK_REDIR
6331 case XXFUN:
6332     return(hmsg("Syntax: REDIRECT command\n\
6333   Runs the given local command with its standard input and output redirected\n\
6334   to the current SET LINE or SET HOST communications path.\n\
6335   Synonym: < (Left angle bracket)."));
6336 #endif /* CK_REDIR */
6337
6338 #ifdef CK_REXX
6339 case XXREXX:
6340     return(hmsg("Syntax: REXX text\n\
6341   The text is a Rexx command to be executed. The \\v(rexx) variable is set\n\
6342   to the Rexx command's return value.\n\
6343   To execute a rexx program file, use:  REXX call <filename>\n\
6344   Rexx programs may call Kermit functions by placing the Kermit command\n\
6345   in single quotes.  For instance:  'set parity none'."));
6346 #endif /* CK_REXX */
6347 #endif /* NOPUSH */
6348
6349 #ifndef NOSHOW
6350 case XXSHO:
6351     return(hmsg("\
6352   Display current values of various items (SET parameters, variables, etc).\n\
6353   Type SHOW ? for a list of categories."));
6354 #endif /* NOSHOW */
6355
6356 case XXSPA:
6357 #ifdef datageneral
6358     return(hmsg("\
6359   Display disk usage in current device, directory,\n\
6360   or return space for a specified device, directory."));
6361 #else
6362     return(hmsg("Syntax: SPACE\n\
6363   Display disk usage in current device and/or directory"));
6364 #endif
6365
6366 case XXSTA:
6367     return(hmsg("Syntax: STATISTICS [/BRIEF]\n\
6368   Display statistics about most recent file transfer"));
6369
6370 #ifndef NOSPL
6371 case XXSTO:
6372     return(hmsg("Syntax: STOP [ number [ message ] ]\n\
6373   Stop executing the current macro or TAKE file and return immediately to\n\
6374   the Kermit prompt.  Number is a return code.  Message printed if given."));
6375 #endif /* NOSPL */
6376
6377 case XXTAK:
6378     return(hmsga(hmxxtak));
6379
6380 #ifdef TCPSOCKET
6381 #ifdef TNCODE
6382 case XXIKSD:
6383     return(hmsga(hmxxiks));
6384
6385 case XXTEL:
6386     return(hmsga(hmxxtel));
6387
6388 case XXTELOP:
6389     return(hmsga(hxtopt));
6390 #endif /* TNCODE */
6391
6392 #ifdef RLOGCODE
6393 case XXRLOG:
6394     return(hmsg("Syntax: RLOGIN [ switches ] [ host [ username ] ]\n\
6395   Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /RLOGIN,\n\
6396   IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)\n\
6397   is resumed.  Depending on how Kermit has been built switches may be\n\
6398   available to require Kerberos authentication and DES encryption."));
6399 #endif /* RLOGCODE */
6400 #endif /* TCPSOCKET */
6401
6402 #ifndef NOXMIT
6403 case XXTRA:
6404     return(hmsga(hxxxmit));
6405 #endif /* NOXMIT */
6406
6407 #ifndef NOFRILLS
6408 case XXTYP:
6409     return(hmsga(hmxxtyp));
6410 case XXMORE:
6411     return(hmsg("Syntax: MORE [ switches ] filename\n\
6412   Equivalent to TYPE /PAGE filename; see HELP TYPE."));
6413 case XXCAT:
6414     return(hmsg("Syntax: MORE [ switches ] filename\n\
6415   Equivalent to TYPE /NOPAGE filename; see HELP TYPE."));
6416 case XXHEAD:
6417     return(hmsg("Syntax: HEAD [ switches ] filename\n\
6418   Equivalent to TYPE /HEAD filename; see HELP TYPE."));
6419 case XXTAIL:
6420     return(hmsg("Syntax: TAIL [ switches ] filename\n\
6421   Equivalent to TYPE /TAIL filename; see HELP TYPE."));
6422 #endif /* NOFRILLS */
6423
6424 #ifndef NOSPL
6425 case XXWHI:
6426     return(hmsga(whihlp));
6427
6428 case XXSWIT:
6429     return(hmsga(swihlp));
6430 #endif /* NOSPL */
6431
6432 #ifndef NOCSETS
6433 case XXXLA:
6434     return(hmsga(hxxxla));
6435 #endif /* NOCSETS */
6436
6437 case XXVER:
6438     return(hmsg("Syntax: VERSION\nDisplays the program version number."));
6439
6440 #ifndef NOSPL
6441 case XXWAI:
6442     return(hmsga(hxxwai));
6443 #endif /* NOSPL */
6444
6445 #ifndef NOFRILLS
6446 case XXWHO:
6447     return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));
6448
6449 case XXWRI:
6450     return(hmsga(hxxwri));
6451
6452 case XXWRL:
6453     return(hmsg(
6454 "WRITE-LINE (WRITELN) is just like WRITE, but includes a line terminator\n\
6455 at the end of text.  See WRITE."));
6456 #endif /* NOFRILLS */
6457
6458 #ifndef NOSPL
6459 case XXIFX:
6460     return(hmsga(ifxhlp));
6461
6462 case XXGETC:                            /* GETC */
6463     return(hmsga(hxxgetc));
6464
6465 case XXFWD:                             /* FORWARD */
6466     return(hmsg(
6467 "Like GOTO, but searches only forward for the label.  See GOTO."));
6468
6469 case XXLOCAL:                           /* LOCAL */
6470     return(hmsg(
6471 "Declares a variable to be local to the current macro or command file."));
6472 #endif /* NOSPL */
6473
6474 case XXVIEW:
6475     return(hmsg(
6476 "View the terminal emulation screen even when there is no connection."));
6477
6478 case XXASC:
6479     return(hmsg("Synonym for SET FILE TYPE TEXT."));
6480
6481 case XXBIN:
6482     return(hmsg("Synonym for SET FILE TYPE BINARY."));
6483
6484 case XXDATE:
6485     return(hmsga(hmxxdate));
6486
6487 case XXRETR:
6488     return(hmsg(
6489 "Just like GET but asks the server to delete each file that has been\n\
6490 sent successfully."));
6491
6492 case XXEIGHT:
6493     return(hmsg(
6494 "Equivalent to SET PARITY NONE, SET COMMAND BYTE 8, SET TERMINAL BYTE 8."));
6495
6496 case XXSAVE:
6497     return(hmsga(hmxxsave));
6498
6499 #ifndef NOFRILLS
6500 #ifndef NOPUSH
6501 case XXEDIT:
6502     return(hmsg("Syntax: EDIT [ <file> ]\n\
6503 Starts your preferred editor on the given file, or if none given, the most\n\
6504 recently edited file, if any.  Also see SET EDITOR."));
6505 #endif /* NOPUSH */
6506 #endif /* NOFRILLS */
6507
6508 #ifdef BROWSER
6509 case XXBROWS:
6510     return(hmsg("Syntax: BROWSE [ <url> ]\n\
6511 Starts your preferred Web browser on the given URL, or if none given, the\n\
6512 most recently visited URL, if any.  Also see SET BROWSER."));
6513 #endif /* BROWSER */
6514
6515 #ifdef CK_TAPI
6516 case XXTAPI:
6517     return(hmsga(hxxtapi));
6518 #endif /* CK_TAPI */
6519
6520 #ifdef PIPESEND
6521 case XXCSEN:
6522     return(hmsg("Syntax: CSEND [ switches ] <command> [ <as-name> ]\n\
6523 Sends from the given <command> rather than from a file.  Equivalent to\n\
6524 SEND /COMMAND; see HELP SEND for details."));
6525
6526 case XXCREC:
6527     return(hmsg("Syntax: CRECEIVE [ switches ] <command>\n\
6528 Receives to the given <command> rather than to a file.  Equivalent to\n\
6529 RECEIVE /COMMAND; see HELP RECEIVE for details."));
6530
6531 case XXCGET:
6532     return(hmsg("Syntax: CGET <remote-file-or-command> <local-command>\n\
6533 Equivalent to GET /COMMAND; see HELP GET for details."));
6534 #endif /* PIPESEND */
6535
6536 #ifndef NOSPL
6537 case XXFUNC:
6538 /*
6539   Tricky parsing.  We want to let them type the function name in any format
6540   at all: \fblah(), \fblah, \\fblah(), fblah, blah, blah(), etc, but of course
6541   only one of these is recognized by cmkey().  So we call cmkeyx() (the "no
6542   complaints" version of cmkey()), and if it fails, we try the other formats
6543   silently, and still allow for <no-name-given>, editing and reparse, etc.
6544 */
6545     y = cmkeyx(fnctab,nfuncs,"Name of function","",NULL);
6546     if (y == -1) {                      /* Reparse needed */
6547         return(y);
6548     } else if (y == -3) {
6549         if ((x = cmcfm()) < 0)          /* For recall buffer... */
6550           return(x);
6551         return(dohfunc(y));             /* -3 gives general message */
6552     }
6553     if (y < 0) {                        /* Something given but didn't match */
6554         int dummy;
6555         char * p;
6556         for (p = atmbuf; *p; p++) {     /* Chop off trailing parens if any */
6557             if (*p == '(') {
6558                 *p = NUL;
6559                 break;
6560             }
6561         }
6562         /* Chop off leading "\\f" or "\f" or "f" */
6563         p = atmbuf;
6564         if (*p == CMDQ)                 /* Allow for \\f... */
6565           p++;
6566         if (*p == CMDQ && (*(p+1) == 'f' || *(p+1) == 'F')) { /* or \f */
6567             p += 2;
6568         } else if (*p == 'f' || *p == 'F') { /* or just f */
6569             p++;
6570         }
6571         y = lookup(fnctab,p,nfuncs,&dummy); /* Look up the result */
6572     }
6573     if (y < 0) {
6574         printf("?No such function - \"%s\"\n",atmbuf);
6575         return(-9);
6576     }
6577     x = cmgbrk();                       /* Find out how user terminated */
6578     if (x == LF || x == CR)             /* if with CR or LF */
6579       cmflgs = 1;                       /* restore cmflgs to say so */
6580     if ((x = cmcfm()) < 0)              /* And THEN confirm so command will */
6581       return(x);                        /* get into recall buffer. */
6582     return(dohfunc(y));
6583 #endif /* NOSPL */
6584
6585 #ifndef NOCMDL
6586 case XXOPTS:                            /* Command-line options */
6587     return(dohopts());
6588
6589 case XXXOPTS:                           /* Extended command-line options */
6590     return(doxopts());
6591 #endif /* NOCMDL */
6592
6593 #ifdef OS2
6594 #ifndef NOKVERBS
6595 case XXKVRB: {
6596     y = cmkeyx(kverbs,nkverbs,"Name of keyboard verb without \\k","",NULL);
6597     if (y == -1) {                      /* Reparse needed */
6598         return(y);
6599     } else if (y == -3) {
6600         if ((x = cmcfm()) < 0)          /* For recall buffer... */
6601           return(x);
6602         return(dohkverb(y));            /* -3 gives general message */
6603     }
6604     if (y < 0) {                        /* Something given but didn't match */
6605         int dummy;
6606         char * p;
6607         for (p = atmbuf; *p; p++) {     /* Chop off trailing parens if any */
6608             if (*p == '(') {
6609                 *p = NUL;
6610                 break;
6611             }
6612         }
6613         /* Chop off leading "\\k" or "\k" or "k" */
6614         p = atmbuf;
6615         if (*p == CMDQ)                 /* Allow for \\k... */
6616           p++;
6617         if (*p == CMDQ && (*(p+1) == 'k' || *(p+1) == 'K')) { /* or \k */
6618             p += 2;
6619         } else if (*p == 'k' || *p == 'K') { /* or just k */
6620             p++;
6621         }
6622         y = lookup(kverbs,p,nkverbs,&dummy); /* Look up the result */
6623     }
6624     if (y < 0) {
6625         printf("?No such function - \"%s\"\n",atmbuf);
6626         return(-9);
6627     }
6628     x = cmgbrk();                       /* Find out how user terminated */
6629     if (x == LF || x == CR)             /* if with CR or LF */
6630       cmflgs = 1;                       /* restore cmflgs to say so */
6631     if ((x = cmcfm()) < 0)              /* And THEN confirm so command will */
6632       return(x);                        /* get into recall buffer. */
6633     return(dohkverb(y));
6634 }
6635 #endif /* NOKVERBS */
6636 #endif /* OS2 */
6637
6638 case XXKERMI:
6639     return(hmsg("Syntax: KERMIT [command-line-options]\n\
6640   Lets you give command-line options at the prompt or in a script.\n\
6641   HELP OPTIONS for more info."));
6642
6643 case XXBACK:
6644     return(hmsg("Syntax: BACK\n  Returns to your previous directory."));
6645
6646 case XXWHERE:
6647     return(hmsg("Syntax: WHERE\n  Tells where your transferred files went."));
6648
6649 #ifndef NOXFER
6650 case XXREMV:
6651     return(hmsga(hmxxremv));
6652 #endif /* NOXFER */
6653
6654 #ifdef CK_KERBEROS
6655 case XXAUTH:
6656     return(hmsga(hmxxauth));
6657 #endif /* CK_KERBEROS */
6658
6659 #ifndef NOHTTP
6660 case XXHTTP:
6661     return(hmsga(hmxxhttp));
6662 #endif /* NOHTTP */
6663
6664 #ifdef NETCMD
6665 case XXPIPE:
6666     return(hmsg("Syntax: PIPE [ command ]\n\
6667 Makes a connection through the program whose command line is given. Example:\n\
6668 \n pipe rlogin xyzcorp.com"));
6669 #endif /* NETCMD */
6670
6671 case XXSTATUS:
6672     return(hmsg(
6673 "STATUS is the same as SHOW STATUS; prints SUCCESS or FAILURE for the\n\
6674 previous command."));
6675
6676 #ifndef NOSPL
6677 case XXASSER:
6678     return(hmsg("Syntax: ASSERT <condition>\n\
6679 Succeeds or fails depending on <condition>; see HELP IF for <condition>s."));
6680
6681 case XXFAIL:
6682     return(hmsg("Always fails."));
6683
6684 case XXSUCC:
6685     return(hmsg("Always succeeds."));
6686 #endif /* NOSPL */
6687
6688 #ifdef CK_LOGIN
6689 case XXLOGOUT:
6690     return(hmsg(
6691 "If you haved logged in to Kermit as an Internet Kermit server, the LOGOUT\n\
6692 command, given at the prompt, logs you out and closes your session."));
6693 #endif /* CK_LOGIN */
6694
6695 case XXRESET:
6696     return(hmsg("Closes all open files and logs."));
6697
6698 #ifndef NOCSETS
6699 case XXASSOC:
6700     return(hmsga(hmxxassoc));
6701 #endif /* NOCSETS */
6702
6703 #ifndef NOSPL
6704 case XXSHIFT:
6705     return(hmsg("Syntax: SHIFT [ n ]\n\
6706   Shifts \\%1..9 variables n places to the left; default n = 1."));
6707 #endif /* NOSPL */
6708
6709 #ifndef NOPUSH
6710 case XXMAN:
6711 #ifdef UNIX
6712     return(hmsg("Syntax: MANUAL [ topic ]\n\
6713   Runs the \"man\" command on the given topic (default \"kermit\")."));
6714 #else
6715 #ifdef OS2
6716     return(hmsg("Syntax: MANUAL\n\
6717   Accesses the Kermit 95 HTML manual using the current browser."));
6718 #else
6719     return(hmsg("Syntax: MANUAL [ topic ]\n\
6720   Runs the \"help\" command on the given topic (default \"kermit\")."));
6721 #endif /* OS2 */
6722 #endif /* UNIX */
6723 #endif /* NOPUSH */
6724
6725 case XXWILD:
6726     return(hmsga(hmxxwild));
6727
6728 case XXPAT:
6729     return(hmsga(hmxxpat));
6730
6731 #ifndef NOXFER
6732 case XXFAST:
6733 case XXCAU:
6734 case XXROB:
6735     return(hmsga(hmxxfast));
6736 #endif /* NOXFER */
6737
6738 #ifdef CKPURGE
6739 case XXPURGE:
6740     return(hmsga(hmxxpurge));
6741 #else
6742 #ifdef VMS
6743 case XXPURGE:
6744     return(hmsga(hmxxpurge));
6745 #endif /* VMS */
6746 #endif /* CKPURGE */
6747
6748 #ifndef NOXFER
6749   case XXRASG:
6750     return(hmsg("  RASG and RASSIGN are short forms of REMOTE ASSIGN."));
6751   case XXRCWD:
6752     return(hmsg("  RCD and RCWD are short forms of REMOTE CD."));
6753   case XXRCPY:
6754     return(hmsg("  RCOPY is a short form of REMOTE COPY."));
6755   case XXRDEL:
6756     return(hmsg("  RDELETE is a short form of REMOTE RELETE."));
6757   case XXRDIR:
6758     return(hmsg("  RDIRECTORY is a short form of REMOTE DIRECTORY."));
6759   case XXRXIT:
6760     return(hmsg("  REXIT is a short form of REMOTE EXIT."));
6761   case XXRHLP:
6762     return(hmsg("  RHELP is a short form of REMOTE HELP."));
6763   case XXRHOS:
6764     return(hmsg("  RHOST is a short form of REMOTE HOST."));
6765   case XXRKER:
6766     return(hmsg("  RKERMIT is a short form of REMOTE KERMIT."));
6767   case XXRMKD:
6768     return(hmsg("  RMKDIR is a short form of REMOTE MKDIR."));
6769   case XXRPRI:
6770     return(hmsg("  RPRINT is a short form of REMOTE PRINT."));
6771   case XXRPWD:
6772     return(hmsg("  RPWD is a short form of REMOTE PWD."));
6773   case XXRQUE:
6774     return(hmsg("  QUERY and RQUERY are short forms of REMOTE QUERY."));
6775   case XXRREN:
6776     return(hmsg("  RRENAME is a short form of REMOTE RENAME."));
6777   case XXRRMD:
6778     return(hmsg("  RRMDIR is a short form of REMOTE RMDIR."));
6779   case XXRSET:
6780     return(hmsg("  RSET is a short form of REMOTE SET."));
6781   case XXRSPA:
6782     return(hmsg("  RSPACE is a short form of REMOTE SPACE."));
6783   case XXRTYP:
6784     return(hmsg("  RTYPE is a short form of REMOTE TYPE."));
6785   case XXRWHO:
6786     return(hmsg("  RWHO is a short form of REMOTE WHO."));
6787 #endif /* NOXFER */
6788
6789   case XXSCRN:
6790     return(hmsga(hmxxscrn));
6791
6792 #ifdef CKEXEC
6793   case XXEXEC:
6794     return(hmsg("Syntax: EXEC <command> [ <arg1> [ <arg2> [ ... ] ]\n\
6795   C-Kermit overlays itself with the given system command and starts it with\n\
6796   the given arguments.  Upon any error, control returns to C-Kermit."));
6797 #endif /* CKEXEC */
6798
6799 #ifndef NOSPL
6800   case XXTRACE:
6801     return(hmsg(
6802 "Syntax: TRACE { /ON, /OFF } { ASSIGNMENTS, COMMAND-LEVEL, ALL }\n\
6803   Turns tracing of the given object on or off."));
6804 #endif /* NOSPL */
6805
6806 #ifdef CK_PERMS
6807 #ifdef UNIX
6808   case XXCHMOD:
6809     return(hmsga(hmxxchmod));
6810 #endif /* UNIX */
6811 #endif /* CK_PERMS */
6812
6813 #ifdef CKROOT
6814   case XXCHRT:
6815     return(hmsga(hmxxchroot));
6816 #endif /* CKROOT */
6817
6818 #ifndef NOSPL
6819   case XXPROMP:
6820     return(hmsga(hmxxprompt));
6821 #endif /* NOSPL */
6822
6823   case XXGREP:
6824     return(hmsga(hmxxgrep));
6825
6826 #ifndef NOSEXP
6827 #ifndef NOSPL
6828   case XXSEXP:
6829     return(hmsga(hmxxsexp));
6830 #endif /* NOSPL */
6831 #endif /* NOSEXP */
6832
6833 #ifdef CKLEARN
6834   case XXLEARN:
6835     return(hmsga(hmxxlearn));
6836 #endif /* CKLEARN */
6837
6838 #ifdef ANYSSH
6839   case XXSSH:
6840     return(hmsga(hmxxssh));
6841 #endif /* ANYSSH */
6842
6843 #ifdef TCPSOCKET
6844   case XXFIREW:
6845     return(hmsga(hmxxfirew));
6846 #endif /* TCPSOCKET */
6847
6848 #ifdef NEWFTP
6849   case XXUSER:
6850     return(hmsg(" Equivalent to FTP USER."));
6851   case XXACCT:
6852     return(hmsg(" Equivalent to FTP ACCOUNT."));
6853 #endif /* NEWFTP */
6854
6855   case XXORIE:
6856     return(hmsg(" Shows the directories important to Kermit."));
6857
6858   case XXCONT:
6859     return(hmsg(" In a FOR or WHILE loop: continue the loop.\n\
6860  At the prompt: continue a script that has \"shelled out\" to the prompt."));
6861
6862   case XXNOTAV:
6863     return(hmsg(" This command is not configured in this version of Kermit."));
6864
6865 default: {
6866         char *s;
6867         if ((x = cmcfm()) < 0) return(x);
6868         s = cmdbuf + (int)strlen(cmdbuf) -1;
6869         while (s >= cmdbuf && *s == SP)
6870           *s-- = NUL;
6871         while (s >= cmdbuf && *s != SP)
6872           s--;
6873         while (*s == SP) s++;
6874         printf("Sorry, help not available for \"%s\"\n",s);
6875         break;
6876       }
6877     } /* switch */
6878 #endif /* NOHELP */
6879
6880     return(success = 0);
6881 }
6882
6883 /*  H M S G  --  Get confirmation, then print the given message  */
6884
6885 int
6886 hmsg(s) char *s; {
6887     int x;
6888     if ((x = cmcfm()) < 0) return(x);
6889     printf("\n%s\n\n",s);
6890     return(0);
6891 }
6892
6893 #ifdef NOHELP
6894
6895 int                                     /* Print an array of lines, */
6896 hmsga(s) char *s[]; {                   /* cheap version. */
6897     int i;
6898     if ((i = cmcfm()) < 0) return(i);
6899     printf("\n");                       /* Start off with a blank line */
6900     for (i = 0; *s[i]; i++) {           /* Print each line. */
6901         printf("%s\n",s[i]);
6902     }
6903     printf("\n");
6904     return(0);
6905 }
6906
6907 #else /* NOHELP not defined... */
6908
6909 int                                     /* Print an array of lines, */
6910 hmsga(s) char *s[]; {                   /* pausing at end of each screen. */
6911     extern int hmtopline;               /* (This should be a parameter...) */
6912     int x, y, i, j, k, n;
6913     if ((x = cmcfm()) < 0) return(x);
6914
6915 #ifdef CK_TTGWSIZ
6916 #ifdef OS2
6917     ttgcwsz();
6918 #else /* OS2 */
6919     /* Check whether window size changed */
6920     if (ttgwsiz() > 0) {
6921         if (tt_rows > 0 && tt_cols > 0) {
6922             cmd_rows = tt_rows;
6923             cmd_cols = tt_cols;
6924         }
6925     }
6926 #endif /* OS2 */
6927 #endif /* CK_TTGWSIZ */
6928
6929     printf("\n");                       /* Start off with a blank line */
6930     n = (hmtopline > 0) ? hmtopline : 1; /* Line counter */
6931     for (i = 0; *s[i]; i++) {
6932         printf("%s\n",s[i]);            /* Print a line. */
6933         y = (int)strlen(s[i]);
6934         k = 1;
6935         for (j = 0; j < y; j++)         /* See how many newlines were */
6936           if (s[i][j] == '\n') k++;     /* in the string... */
6937         n += k;
6938         if (n > (cmd_rows - 3) && *s[i+1]) /* After a screenful, give them */
6939           if (!askmore()) return(0);    /* a "more?" prompt. */
6940           else n = 0;
6941     }
6942     printf("\n");
6943     return(0);
6944 }
6945
6946 #ifndef NOXMIT
6947 static char *hsetxmit[] = {
6948 "Syntax: SET TRANSMIT parameter value",
6949 " ",
6950 "Controls the behavior of the TRANSMIT command (see HELP TRANSMIT):",
6951 " ",
6952 "SET TRANSMIT ECHO { ON, OFF }",
6953 "  Whether to echo text to your screen as it is being transmitted.",
6954 " ",
6955 "SET TRANSMIT EOF text",
6956 "  Text to send after end of file is reached, e.g. \\4 for Ctrl-D",
6957 " ",
6958 "SET TRANSMIT FILL number",
6959 "  ASCII value of a character to insert into blank lines, 0 for none.",
6960 "  Applies only to text mode.  0 by default.",
6961 " ",
6962 "SET TRANSMIT LINEFEED { ON, OFF }",
6963 "  Transmit Linefeed as well as Carriage Return (CR) at the end of each line.",
6964 "  Normally, only CR  is sent.",
6965 " ",
6966 "SET TRANSMIT LOCKING-SHIFT { ON, OFF }",
6967 "  Whether to use SO/SI for transmitting 8-bit data when PARITY is not NONE.",
6968 " ",
6969 "SET TRANSMIT PAUSE number",
6970 "  How many milliseconds to pause after transmitting each line (text mode),",
6971 "  or each character (binary mode).",
6972 " ",
6973 "SET TRANSMIT PROMPT number",
6974 "  ASCII value of character to look for from host before sending next line",
6975 "  when TRANSMITting in text mode; normally 10 (Linefeed).  0 means none;",
6976 "  don't wait for a prompt.",
6977 " ",
6978 "SET TRANSMIT TIMEOUT number",
6979 "  Number of seconds to wait for each character to echo when TRANSMIT ECHO",
6980 "  is ON or TRANSMIT PROMPT is not 0.  If 0 is specified, this means wait",
6981 "  indefinitely for each echo.",
6982 " ",
6983 "Synonym: SET XMIT.  SHOW TRANSMIT displays current settings.",
6984 "" };
6985 #endif /* NOXMIT */
6986
6987 static char *hsetbkg[] = {
6988 "Syntax: SET BACKGROUND { OFF, ON }",
6989 " ",
6990 "  SET BACKGROUND OFF forces prompts and messages to appear on your screen",
6991 "  even though Kermit thinks it is running in the background.",
6992 "" };
6993
6994 #ifdef DYNAMIC
6995 static char *hsetbuf[] = {
6996 "Syntax: SET BUFFERS n1 [ n2 ]",
6997 " ",
6998 "  Changes the overall amount of memory allocated for SEND and RECEIVE packet",
6999 "  buffers, respectively.  Bigger numbers let you have longer packets and",
7000 "  more window slots.  If n2 is omitted, the same value as n1 is used.",
7001 #ifdef BIGBUFOK
7002 " ",
7003 "  NOTE: This command is not needed in this version of Kermit, which is",
7004 "  already configured for maximum-size packet buffers.",
7005 #endif /* BIGBUFOK */
7006 "" };
7007 #endif /* DYNAMIC */
7008
7009 static char *hsetcmd[] = {
7010 "Syntax: SET COMMAND parameter value",
7011 " ",
7012
7013 #ifdef CK_AUTODL
7014 "SET COMMAND AUTODOWNLOAD { ON, OFF }",
7015 "  Enables/Disables automatic recognition of Kermit packets while in",
7016 "  command mode.  ON by default.",
7017 " ",
7018 #endif /* CK_AUTODL */
7019
7020 "SET COMMAND BYTESIZE { 7, 8 }",
7021 "  Informs Kermit of the bytesize of the communication path between itself",
7022 "  and your keyboard and screen.  8 is assumed.  SET COMMAND BYTE 7 only if",
7023 "  8-bit characters cannot pass.",
7024 " ",
7025
7026 #ifdef OS2
7027 "SET COMMAND COLOR <foreground-color> <background-color>",
7028 "  Lets you choose colors for Command screen.  Use ? in the color fields to",
7029 "  to get lists of available colors.",
7030 " ",
7031 "SET COMMAND CURSOR-POSITION <row> <column>",
7032 "  Moves the command-screen cursor to the given position (1-based).  This",
7033 "  command should be used in scripts instead of relying on ANSI.SYS escape",
7034 "  sequences.",
7035 " ",
7036 #endif /* OS2 */
7037
7038 #ifdef OS2
7039 #ifdef NT
7040 "SET COMMAND HEIGHT <number>",
7041 "  Changes the number of rows (lines) in your command screen, not",
7042 "  counting the status line.  Recommended values are 24, 42, and 49 (or 25,",
7043 "  43, and 50 if SET COMMAND STATUSLINE is OFF.)",
7044 #else
7045 "SET COMMAND HEIGHT <number>"
7046 "  Changes the number of rows (lines) in your command screen, not",
7047 "  counting the status line.  Windowed sessions can use any value from 8 to",
7048 "  101.  Fullscreen sessions are limited to 24, 42, 49, or 59.  Not all"
7049 "  heights are supported by all video adapters.",
7050 #endif /* NT */
7051 #else  /* OS2 */
7052 "SET COMMAND HEIGHT <number>",
7053 "  Informs Kermit of the number of rows in your command screen for the",
7054 "  purposes of More?-prompting.",
7055 #endif /* OS2 */
7056 " ",
7057 "SET COMMAND WIDTH <number>",
7058 "  Informs Kermit of the number of characters across your screen for",
7059 "  purposes of screen formatting.",
7060 " ",
7061 "SET COMMAND MORE-PROMPTING { ON, OFF }",
7062 "  ON (the default) enables More?-prompting when Kermit needs to display",
7063 "  text that does not fit vertically on your screen.  OFF allows the text to",
7064 "  scroll by without intervention.  If your command window has scroll bars,",
7065 "  you might prefer OFF.",
7066 " ",
7067
7068 #ifdef CK_RECALL
7069 "SET COMMAND RECALL-BUFFER-SIZE number",
7070 "  How big you want Kermit's command recall buffer to be.  By default, it",
7071 "  holds 10 commands.  You can make it any size you like, subject to memory",
7072 "  constraints of the computer.  A size of 0 disables command recall.",
7073 "  Whenever you give this command, previous command history is lost.",
7074 " ",
7075 #endif /* CK_RECALL */
7076
7077 "SET COMMAND QUOTING { ON, OFF }",
7078 "  Whether to treat backslash and question mark as special characters (ON),",
7079 "  or as ordinary data characters (OFF) in commands.  ON by default.",
7080 " ",
7081 #ifdef DOUBLEQUOTING
7082 "SET COMMAND DOUBLEQUOTING { ON, OFF }",
7083 "  Whether to allow doublequotes (\") to be used to enclose fields,",
7084 "  filenames, directory names, and macro arguments that might contain",
7085 "  spaces.  ON by default; use OFF to force compatibility with older",
7086 "  versions.",
7087 " ",
7088 #endif /* DOUBLEQUOTING */
7089
7090 #ifdef CK_RECALL
7091 "SET COMMAND RETRY { ON, OFF }",
7092 "  Whether to reprompt you with the correct but incomplete portion of a",
7093 "  syntactically incorrect command.  ON by default.",
7094 " ",
7095 #endif /* CK_RECALL */
7096
7097 #ifdef OS2
7098 "SET COMMAND SCROLLBACK <lines>",
7099 "  Sets size of virtual Command screen buffer to the given number of lines,",
7100 "  which includes the active Command screen.  The minimum is 256.  The max",
7101 "  is 2 million.  The default is 512.",
7102 " ",
7103 "SET COMMAND STATUSLINE { ON, OFF }",
7104 "  ON (default) enables the Kermit status line in the command screen.",
7105 "  OFF removes it, making the line available for use by the host.",
7106 " ",
7107 #endif /* OS2 */
7108
7109 "Use SHOW COMMAND to display these settings.",
7110 "" };
7111
7112 #ifndef NOLOCAL
7113 static char *hsetcar[] = {
7114 "Syntax: SET CARRIER-WATCH { AUTO, OFF, ON }",
7115 " ",
7116 "  Attempts to control treatment of carrier (the Data Carrier Detect signal)",
7117 "  on serial communication (SET LINE or SET PORT) devices.  ON means that",
7118 "  carrier is required at all times.  OFF means carrier is never required.",
7119 "  AUTO (the default) means carrier is required at all times except during",
7120 "  the DIAL command.  Correct operation of carrier-watch depends on the",
7121 "  capabilities of the underlying OS, drivers, devices, and cables.  If you",
7122 "  need to CONNECT to a serial device that is not asserting carrier, and",
7123 "  Kermit won't let you, use SET CARRIER-WATCH OFF.  Use SHOW COMMUNICATIONS",
7124 "  to display the CARRIER-WATCH setting.",
7125 "" };
7126 #endif /* NOLOCAL */
7127
7128 static char *hsetat[] = {
7129 "Syntax: SET ATTRIBUTES name ON or OFF",
7130 " ",
7131 "  Use this command to enable (ON) or disable (OFF) the transmission of",
7132 "  selected file attributes along with each file, and to handle or ignore",
7133 "  selected incoming file attributes, including:",
7134 " ",
7135 #ifndef NOCSETS
7136 "   CHARACTER-SET:  The transfer character set for text files",
7137 #endif /* NOCSETS */
7138 "   DATE:           The file's creation date",
7139 "   DISPOSITION:    Unusual things to do with the file, like MAIL or PRINT",
7140 "   LENGTH:         The file's length",
7141 "   PROTECTION:     The file's protection (permissions)",
7142 "   SYSTEM-ID:      Machine/Operating system of origin",
7143 "   TYPE:           The file's type (text or binary)",
7144 " ",
7145 "You can also specify ALL to select all of them.  Examples:",
7146 " ",
7147 "   SET ATTR DATE OFF",
7148 "   SET ATTR LENGTH ON",
7149 "   SET ATTR ALL OFF",
7150 " ",
7151 "Also see HELP SET SEND and HELP SET RECEIVE.",
7152 ""
7153 };
7154
7155 static char *hxytak[] = {
7156 "Syntax: SET TAKE parameter value",
7157 " ",
7158 "  Controls behavior of TAKE command:",
7159 " ",
7160 "SET TAKE ECHO { ON, OFF }",
7161 "  Tells whether commands read from a TAKE file should be displayed on the",
7162 "  screen (if so, each command is shown at the time it is read, and labeled",
7163 "  with a line number).",
7164 " ",
7165 "SET TAKE ERROR { ON, OFF }",
7166 "  Tells whether a TAKE command file should be automatically terminated when",
7167 "  a command fails.  This setting is local to the current command file, and",
7168 "  inherited by subordinate command files.",
7169 "" };
7170
7171 #ifndef NOLOCAL
7172 #ifdef OS2MOUSE
7173 static char *hxymouse[] = {
7174 "Syntax: SET MOUSE ACTIVATE { ON, OFF }",
7175 "  Enables or disables the mouse in Connect mode.  Default is ON",
7176 " ",
7177 "Syntax: SET MOUSE BUTTON <number> <key-modifier> <action> [ <text> ]",
7178 " where:",
7179 "  <number> is the mouse button number, 1, 2, or 3;",
7180 "  <key-modifier> denotes modifier keys held down during the mouse event:",
7181 "   ALT, ALT-SHIFT, CTRL, CTRL-ALT CTRL-ALT-SHIFT, CTRL-SHIFT, SHIFT, NONE;",
7182 "  <action> is the mouse action, CLICK, DRAG, or DOUBLE-CLICK.",
7183 " ",
7184 " The <text> has exactly the same properties as the <text> from the SET KEY",
7185 " command -- it can be a character, a string, one or more Kverbs, a macro",
7186 " invoked as a Kverb, or any combination of these.  Thus, anything that can",
7187 " be assigned to a key can also be assigned to the mouse -- and vice versa.",
7188 " If the <text> is omitted, the action will be ignored.  Examples:",
7189 " ",
7190 " SET MOUSE BUTTON 1 NONE DOUBLE \\KmouseCurPos",
7191 " SET MOU B 2 SHIFT CLICK help\\13",
7192 " ",
7193 " DRAG operations perform a \"mark mode\" selection of Text. You should",
7194 " assign only the following actions to drag operations:",
7195 " ",
7196 "  \\Kdump         - copy marked text to printer (or file)",
7197 "  \\Kmarkcopyclip - copy marked text to PM Clipboard",
7198 "  \\Kmarkcopyhost - copy marked text direct to Host",
7199 "  \\Kmousemark    - mark text, no copy operation performed",
7200 " ",
7201 " The following Kverb is only for use with the mouse:",
7202 " ",
7203 "  \\KmouseCurPos",
7204 " ",
7205 " which represents the mouse-directed terminal cursor feature.",
7206 " ",
7207 "Syntax: SET MOUSE CLEAR",
7208 " Restores all mouse events to their default definitions",
7209 "   Button 1 Ctrl-Click = Kverb: \\Kmouseurl",
7210 "   Button 1 Double-Click = Kverb: \\Kmousecurpos",
7211 "   Button 1 Drag = Kverb: \\Kmarkcopyclip",
7212 "   Button 1 Alt-Drag = Kverb: \\Kmarkcopyclip_noeol",
7213 "   Button 1 Ctrl-Drag = Kverb: \\Kmarkcopyhost",
7214 "   Button 1 Ctrl-Alt-Drag = Kverb: \\Kmarkcopyhost_noeol",
7215 "   Button 1 Ctrl-Shift-Drag = Kverb: \\Kdump",
7216 "   Button 2 Double-Click = Kverb: \\Kpaste",
7217 "   Button 2 Drag = Kverb: \\Kmarkcopyhost",
7218 "   Button 2 Alt-Drag = Kverb: \\Kmarkcopyhost_noeol     ",    
7219 "   Button 3 Double-Click = Kverb: \\Kpaste",
7220 ""};
7221 #endif /* OS2MOUSE */
7222
7223 static char *hxyterm[] = {
7224 "Syntax: SET TERMINAL parameter value",
7225 " ",
7226 #ifdef OS2
7227 "SET TERMINAL TYPE { ANSI, VT52, VT100, VT102, VT220, VT320, ... }",
7228 "  Selects type type of terminal to emulate.  Type SET TERMINAL TYPE ? to",
7229 "  see a complete list.",
7230 " ",
7231 "SET TERMINAL ANSWERBACK { OFF, ON }",
7232 "  Disables/enables the ENQ/Answerback sequence (\"K-95 version term-type\").",
7233 " ",
7234 "SET TERMINAL ANSWERBACK MESSAGE <extension>",
7235 "  Allows you to specify an extension to the default answerback message.",
7236 " ",
7237 #else
7238 "SET TERMINAL TYPE ...",
7239 "  This command is not available because this version of Kermit does not",
7240 "  include a terminal emulator.  Instead, it is a \"semitransparent pipe\"",
7241 "  (or a totally transparent one, if you configure it that way) to the",
7242 "  computer or service you have made a connection to.  Your console,",
7243 "  workstation window, or the terminal emulator or terminal from which you",
7244 "  are running Kermit provides the emulation.",
7245 " ",
7246 #endif /* OS2 */
7247
7248 #ifdef CK_APC
7249 "SET TERMINAL APC { ON, OFF, NO-INPUT, NO-INPUT-UNCHECKED, UNCHECKED }",
7250 #ifdef OS2
7251 "  Controls execution of Application Program Commands sent by the host while",
7252 "  K-95 is either in CONNECT mode or processing INPUT commands.  ON allows",
7253 "  execution of \"safe\" commands and disallows potentially dangerous ones",
7254 "  such as DELETE, RENAME, OUTPUT, and RUN.  OFF prevents execution of APCs.",
7255 "  UNCHECKED allows execution of all APCs.  OFF is the default.",
7256 #else /* OS2 */
7257 "  Controls execution of Application Program Commands sent by the host while",
7258 "  C-Kermit is in CONNECT mode.  ON allows execution of \"safe\" commands and",
7259 "  disallows potentially dangerous commands such as DELETE, RENAME, OUTPUT,",
7260 "  and RUN.  OFF prevents execution of APCs.  UNCHECKED allows execution of",
7261 "  all APCs.  OFF is the default.",
7262 #endif /* OS2 */
7263 " ",
7264 #endif /* CK_APC */
7265
7266 #ifdef OS2
7267 "SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }",
7268 "  Sets the mode for the arrow keys during VT terminal emulation.",
7269 " ",
7270 "SET TERMINAL ATTRIBUTE { BLINK, DIM, PROTECTED, REVERSE, UNDERLINE }",
7271 "  Determines how attributes are displayed by Kermit-95.",
7272 " ",
7273 "SET TERMINAL ATTRIBUTE { BLINK, DIM, REVERSE, UNDERLINE } { ON, OFF }",
7274 "  Determines whether real Blinking, Dim, Reverse, and Underline are used in",
7275 "  the terminal display.  When BLINK is turned OFF, reverse background",
7276 "  intensity is used.  When DIM is turned OFF, dim characters appear BOLD.",
7277 "  When REVERSE and UNDERLINE are OFF, the colors selected with SET",
7278 "  TERMINAL COLOR { REVERSE,UNDERLINE } are used instead.  This command",
7279 "  affects the entire current screen and terminal scrollback buffer.",
7280 " ",
7281 "SET TERMINAL ATTRIBUTE PROTECTED [ -",
7282 "   { BOLD, DIM, INVISIBLE, NORMAL, REVERSE, UNDERLINED } ]",
7283 "  Sets the attributes used to represent Protected text in Wyse and Televideo",
7284 "  terminal emulations.  Any combination of attributes may be used.  The",
7285 "  default is DIM.)",
7286 " ",
7287 #endif /* OS2 */
7288
7289 #ifdef OS2
7290 #ifdef CK_XYZ
7291 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7292 "  enables/disables automatic switching into file-transfer mode when a Kermit",
7293 "  or ZMODEM file transfer has been detected during CONNECT mode or while",
7294 "  an INPUT command is active.  Default is OFF.",
7295 #else
7296 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7297 "  enables/disables automatic switching into file-transfer mode when a Kermit",
7298 "  file transfer has been detected during CONNECT mode or while an INPUT",
7299 "  command is active.  Default is OFF.",
7300 #endif /* CK_XYZ */
7301
7302 " ",
7303 "  When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
7304 "  tells what to do if an error occurs during a file transfer or other",
7305 "  protocol operation initiated by the terminal emulator: STOP (the default)",
7306 "  means to remain in command mode so you can see what happened; CONTINUE",
7307 "  means to resume the CONNECT session (e.g. so a far-end script can continue",
7308 "  its work).",
7309 " ",
7310
7311 #ifdef CK_XYZ
7312 "SET TERM... AUTO... { KERMIT, ZMODEM } C0-CONFLICTS { IGNORED, PROCESSED }",
7313 "  Determines whether the active terminal emulator should process or ignore",
7314 "  C0 control characters which are also used for the specified file transfer",
7315 "  protocol.  Kermit by default uses ^A (SOH) and Zmodem uses ^X (CAN).",
7316 "  Default is PROCESSED.",
7317 " ",
7318 "SET TERM... AUTO... { KERMIT, ZMODEM } DETECTION-METHOD { PACKET, STRING }",
7319 "  Determines whether the specified file transfer protocol should be detected",
7320 "  by looking for valid packets or by identifying a specified text string.",
7321 "  Default is PACKET.",
7322 " ",
7323 "SET TERM... AUTO... { KERMIT, ZMODEM } STRING <text>",
7324 "  Lets you assign an autodownload detection string for use with the",
7325 "  specified file transfer protocol.",
7326 "  Default for Kermit is \"READY TO SEND...\", for Zmodem is \"rz\\{13}\".",
7327 " ",
7328 #else /* CK_XYZ */
7329 "SET TERM... AUTO... KERMIT C0-CONFLICTS { IGNORED, PROCESSED }",
7330 "  Determines whether the active terminal emulator should process or ignore",
7331 "  C0 control characters which are also used for the specified file transfer",
7332 "  protocol.  Kermit by default uses ^A <SOH>.  Default is PROCESSED.",
7333 " ",
7334 "SET TERM... AUTO... KERMIT DETECTION-METHOD { PACKET, STRING }",
7335 "  Determines whether the specified file transfer protocol should be detected",
7336 "  by looking for valid packets or by identifying a specified text string.",
7337 "  Default is PACKET.",
7338 " ",
7339 "SET TERM... AUTO... KERMIT STRING <text>",
7340 "  Lets you assign an autodownload detection string for use with the",
7341 "  specified file transfer protocol.  Default is \"READY TO SEND...\".",
7342 " ",
7343 #endif /* CK_XYZ */
7344 "SET TERMINAL AUTOPAGE { ON, OFF }",
7345 " ",
7346 "SET TERMINAL AUTOSCROLL { ON, OFF }",
7347 " ",
7348 #else /* OS2 */
7349 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7350 "  Enables/disables automatic switching into file-transfer mode when a valid",
7351 #ifdef CK_XYZ
7352 "  Kermit or ZMODEM packet of the appropriate type is received during CONNECT",
7353 "  mode.  Default is OFF.",
7354 #else
7355 "  Kermit packet of the appropriate type is received during CONNECT mode.",
7356 "  Default is OFF.",
7357 #endif /* CK_XYZ */
7358
7359 " ",
7360 "  When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
7361 "  tells what to do if an error occurs during a file transfer or other",
7362 "  protocol operation initiated by the terminal emulator: STOP (the default)",
7363 "  means to remain in command mode so you can see what happened; CONTINUE",
7364 "  means to resume the CONNECT session (e.g. so a far-end script can continue",
7365 "  its work).",
7366 " ",
7367
7368 #endif /* OS2 */
7369
7370 #ifdef OS2
7371 "SET TERMINAL BELL { AUDIBLE, VISIBLE, NONE }",
7372 "  Specifies how Control-G (bell) characters are handled.  AUDIBLE means",
7373 "  a beep is sounded; VISIBLE means the screen is flashed momentarily.",
7374 " ",
7375 "  (This command has been superseded by SET BELL.)",
7376 " ",
7377 #endif /* OS2 */
7378
7379 "SET TERMINAL BYTESIZE { 7, 8 }",
7380 "  Use 7- or 8-bit characters between Kermit and the remote computer during",
7381 "  terminal sessions.  The default is 8.",
7382 " ",
7383
7384 #ifndef NOCSETS
7385 #ifdef OS2
7386 "SET TERMINAL CHARACTER-SET <remote-cs>",
7387 "  Specifies the character set used by the remote host, <remote-cs>.",
7388 "  Equivalent to SET TERM REMOTE-CHARACTER-SET <remote-cs> ALL.  For more",
7389 "  control over the details, use SET TERM REMOTE-CHARACTER-SET and (in",
7390 "  non-GUI K95 versions) SET TERM LOCAL-CHARACTER-SET; these are explained",
7391 "  below.  The default TERMINAL CHARACTER-SET is LATIN1 (ISO 8859-1).",
7392 #else  /* not OS2 */
7393 "SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ]",
7394 "  Specifies the character set used by the remote host, <remote-cs>, and the",
7395 "  character set used by C-Kermit locally, <local-cs>.  If you don't specify",
7396 "  the local character set, the current FILE CHARACTER-SET is used.  When",
7397 "  you specify two different character sets, C-Kermit translates between them",
7398 "  during CONNECT.  By default, both character sets are TRANSPARENT, and",
7399 "  no translation is done.",
7400 #endif /* OS2 */
7401 " ",
7402 #endif /* NOCSETS */
7403
7404 #ifdef OS2
7405
7406 "SET TERMINAL CODE-PAGE <number>",
7407 "  Lets you change the PC code page.  Only works for code pages that are",
7408 "  successfully prepared in CONFIG.SYS.  Use SHOW TERMINAL to list the",
7409 "  current code page and the available code pages.",
7410 #ifdef OS2ONLY
7411 " ",
7412 "  Also see SET TERMINAL FONT if the desired code page in not available in",
7413 "  your version of OS/2.",
7414 #endif /* OS2ONLY */
7415 " ",
7416
7417 #ifndef NT
7418 "SET TERMINAL COLOR BORDER <foreground>",
7419 #endif /* NT */
7420 "SET TERMINAL COLOR <screenpart> <foreground> <background>",
7421 " Sets the colors of the terminal emulation screen.",
7422 " <screenpart> may be any of the following:",
7423 "  DEBUG, HELP-TEXT, REVERSE, SELECTION, STATUS-LINE, TERMINAL-SCREEN, or",
7424 "  UNDERLINED-TEXT.",
7425 " <foreground> and <background> may be any of:",
7426 "  BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LGRAY, DGRAY, LBLUE,",
7427 "  LGREEN, LCYAN, LRED, LMAGENTA, YELLOW or WHITE.",
7428 " The L prefix for the color names means Light.",
7429 " ",
7430
7431 "SET TERMINAL COLOR ERASE { CURRENT-COLOR, DEFAULT-COLOR }",
7432 "  Determines whether the current color as set by the host or the default",
7433 "  color as set by the user (SET TERMINAL COLOR TERMINAL) is used to clear",
7434 "  the screen when erase commands are received from the host.",
7435 " ",
7436
7437 "SET TERMINAL COLOR RESET-ON-ESC[0m { CURRENT-COLOR, DEFAULT-COLOR }",
7438 "  Determines whether the current color or the default color is used after",
7439 "  <ESC>[0m (\"reset attributes\") command sequence is received from the",
7440 "  host.",
7441 " ",
7442
7443 "SET TERMINAL CONTROLS { 7, 8 }",
7444 "  Determines whether VT220/320 or Wyse 370 function keys, arrow keys, etc,",
7445 "  that generate ANSI-format escape sequences should send 8-bit control",
7446 "  characters or 7-bit escape sequences.",
7447 " ",
7448 #endif /* OS2 */
7449
7450 "SET TERMINAL CR-DISPLAY { CRLF, NORMAL }",
7451 "  Specifies how incoming carriage return characters are to be displayed",
7452 "  on your screen.",
7453 " ",
7454
7455 #ifdef OS2
7456 #ifdef KUI
7457 "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF, NOBLINK}",
7458 "  Selects the cursor style and visibility for the terminal screen.",
7459 #else
7460 "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF}",
7461 "  Selects the cursor style and visibility for the terminal screen.",
7462 #endif /* KUI */
7463 " ",
7464 "SET TERMINAL DG-UNIX-MODE { ON, OFF }",
7465 "  Specifies whether the Data General emulations should accept control",
7466 "  sequences in Unix compatible format or in native DG format.  The",
7467 "  default is OFF, DG format.",
7468 " ",
7469 #endif /* OS2 */
7470
7471 "SET TERMINAL DEBUG { ON, OFF }",
7472 "  Turns terminal session debugging on and off.  When ON, incoming control",
7473 "  characters are displayed symbolically, rather than be taken as formatting",
7474 "  commands.  SET TERMINAL DEBUG ON implies SET TELNET DEBUG ON.",
7475 " ",
7476 #ifdef OS2
7477 "SET TERMINAL DG-UNIX-MODE { ON, OFF }",
7478 " ",
7479 #endif /* OS2 */
7480
7481 "SET TERMINAL ECHO { LOCAL, REMOTE }",
7482 "  Specifies which side does the echoing during terminal connection.",
7483 " ",
7484
7485 "SET TERMINAL ESCAPE-CHARACTER { ENABLED, DISABLED }",
7486 "  Turns on/off the ability to escape back from CONNECT mode using the SET",
7487 #ifdef OS2
7488 "  ESCAPE character.  If you disable it you can still get back using Alt-key",
7489 "  combinations as shown in the status line.  Also see HELP SET ESCAPE.",
7490 #else
7491 "  ESCAPE character.  If you disable it, Kermit returns to its prompt only",
7492 "  when the connection is closed by the other end.  USE WITH EXTREME CAUTION.",
7493 "  Also see HELP SET ESCAPE.",
7494 #endif /* OS2 */
7495 " ",
7496
7497 #ifdef OS2
7498 #ifdef KUI
7499 "SET TERMINAL FONT <facename> <height>",
7500 "  Specifies the font to be used in the Kermit 95 window.  The font is",
7501 "  determined by the choice of a facename and a height measured in Points.",
7502 "  The available facenames are those installed in the Font Control Panel.",
7503 " ",
7504 #else /* KUI */
7505 #ifdef OS2ONLY
7506 "SET TERMINAL FONT { CP437, CP850, CP852, CP862, CP866, DEFAULT }",
7507 "  CP437 - Original PC code page",
7508 "  CP850 - \"Multilingual\" (West Europe) code page",
7509 "  CP852 - East Europe Roman Alphabet code page (for Czech, Polish, etc)",
7510 "  CP862 - Hebrew code page",
7511 "  CP866 - Cyrillic (Russian, Belorussian, and Ukrainian) code page",
7512 " ",
7513 "  Loads a soft into the video adapter for use during terminal emulation.",
7514 "  Use this command when your OS/2 system does not have the desired code.",
7515 "  page.  Can be used only in full-screen sessions.  Also see SET TERMINAL",
7516 "  CODE-PAGE and SET TERMINAL REMOTE-CHARACTER-SET.",
7517 " ",
7518 #endif /* OS2ONLY */
7519 #endif /* KUI */
7520
7521 #ifdef NT
7522 "SET TERMINAL HEIGHT <number>",
7523 "  Changes the number of rows (lines) to use during terminal emulation, not",
7524 "  counting the status line.  Recommended values are 24, 42, and 49 (or 25,",
7525 "  43, and 50 if SET TERMINAL STATUSLINE is OFF.)",
7526 #else
7527 "SET TERMINAL HEIGHT <number>"
7528 "  Changes the number of rows (lines) to use during terminal emulation, not",
7529 "  counting the status line.  Windowed sessions can use any value from 8 to",
7530 "  101.  Fullscreen sessions are limited to 24, 42, 49, or 59.  Not all"
7531 "  heights are supported by all video adapters.",
7532 #endif /* NT */
7533 #else  /* OS2 */
7534 "SET TERMINAL HEIGHT <number>",
7535 "  Tells C-Kermit how many rows (lines) are on your CONNECT-mode screen.",
7536 #endif /* OS2 */
7537 " ",
7538
7539 #ifdef CKTIDLE
7540 "SET TERMINAL IDLE-TIMEOUT <number>",
7541 "  Sets the limit on idle time in CONNECT mode to the given number of",
7542 "  seconds.  0 (the default) means no limit.",
7543 " ",
7544 "SET TERMINAL IDLE-ACTION { EXIT, HANGUP, OUTPUT [ text ], RETURN }",
7545 "  Specifies the action to be taken when a CONNECT session is idle for the",
7546 "  number of seconds given by SET TERMINAL IDLE-TIMEOUT.  The default action",
7547 "  is to RETURN to command mode.  EXIT exits from Kermit; HANGUP hangs up the",
7548 "  connection, and OUTPUT sends the given text to the host without leaving",
7549 "  CONNECT mode; if no text is given a NUL (0) character is sent.",
7550 #ifdef TNCODE
7551 " ",
7552 "And for Telnet connections:",
7553 " ",
7554 "SET TERMINAL IDLE-ACTION { TELNET-NOP, TELNET-AYT }",
7555 "  Sends the indicated Telnet protocol message: No Operation (NOP) or",
7556 "  \"Are You There?\" (AYT).",
7557 #endif /* TNCODE */
7558 " ",
7559 #endif /* CKTIDLE */
7560
7561 #ifdef OS2
7562
7563 "SET TERMINAL KDB-FOLLOWS-GL/GR { ON, OFF }",
7564 " Specifies whether or not the keyboard character set should follow the",
7565 "  active GL and GR character sets.  This feature is OFF by default and",
7566 "  should not be used unless it is specificly required by the host",
7567 "  application.",
7568 " ",
7569
7570 "SET TERMINAL KEY <mode> /LITERAL <keycode> <text>",
7571 "SET TERMINAL KEY <mode> DEFAULT",
7572 "SET TERMINAL KEY <mode> CLEAR",
7573 "  Configures the key whose <keycode> is given to send the given text when",
7574 "  pressed while <mode> is active.  <mode> may be any of the valid terminal",
7575 "  types or the special modes \"EMACS\", \"HEBREW\" or \"RUSSIAN\".  DEFAULT",
7576 "  restores all default key mappings for the specified mode.  CLEAR erases",
7577 "  all the key mappings.  If there is no text, the default key binding is",
7578 #ifndef NOCSETS
7579 "  restored for the key k.  SET TERMINAL KEY mappings take place before",
7580 "  terminal character-set translation.  SET KEY mappings take precedence over",
7581 "  SET TERMINAL KEY <terminal type> settings.",
7582 #else
7583 "  restored for the key.  SET KEY mappings take precedence over SET TERMINAL",
7584 "  KEY <terminal type> settings.",
7585 #endif /* NOCSETS */
7586 "  The /LITERAL switch may be used to instruct Kermit to ignore character-set",
7587 "  translations when sending this definition to the host.",
7588 " ",
7589 "  The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
7590 "  keypad, function, or editing keys, etc.  For a list of available keyboard",
7591 "  verbs, type SHOW KVERBS.",
7592 " ",
7593 "  To find out the keycode and mapping for a particular key, use the SHOW",
7594 "  KEY command.  Use the SAVE KEYS command to save all settings to a file.",
7595 " ",
7596 "SET TERMINAL KEYBOARD-MODE { NORMAL, EMACS, RUSSIAN, HEBREW }",
7597 "  Select a special keyboard mode for use in the terminal screen.",
7598 " ",
7599
7600 "SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC }",
7601 "  Specifies the \"mode\" of the numeric keypad for VT terminal emulation.",
7602 "  Use this command in case the host or application wants the keypad to be",
7603 "  in a different mode than it's in, but did not send the escape sequence",
7604 "  to put it in the needed mode.",
7605 " ",
7606 #ifdef KUI
7607 "SET TERMINAL LINE-SPACING <float>",
7608 "  Specifies the line spacing used when displaying text.  The default is 1.0.",
7609 "  Valid values range from 1.0 to 3.0 inclusive.",
7610 " ",
7611 #endif /* KUI */
7612 #endif /* OS2 */
7613
7614 #ifndef NOCSETS
7615 #ifdef OS2
7616 "SET TERMINAL LOCAL-CHARACTER-SET <local-cs>",
7617 "  Specifies the character set used by K-95 locally.  If you don't specify",
7618 #ifdef OS2ONLY
7619 "  the local character-set, the current TERMINAL FONT is used if you have",
7620 "  given a SET TERMINAL FONT command; otherwise the current codepage is used.",
7621 #else
7622 "  the local character-set, the current code page is used.",
7623 #endif /* OS2ONLY */
7624 " ",
7625 "  When the local and remote character sets differ, Kermit translates between",
7626 "  them during CONNECT.  By default, the remote character set is Latin1 and",
7627 "  the local one is your current code page.",
7628 #ifdef NT
7629 " ",
7630 "  In Windows NT, Unicode is used as the local character-set regardless of",
7631 "  this setting.",
7632 #endif /* NT */
7633 " ",
7634 "See also SET TERMINAL REMOTE-CHARACTER-SET",
7635 " ",
7636 #endif /* OS2 */
7637 #endif /* NOCSETS */
7638
7639 #ifdef OS2
7640 "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
7641 "  Tells whether to send Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch",
7642 "  between 7-bit and 8-bit characters sent during terminal emulation over",
7643 "  7-bit connections.  OFF by default.",
7644 #else
7645 "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
7646 "  Tells Kermit whether to use Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to",
7647 "  switch between 7-bit and 8-bit characters during CONNECT.  OFF by default.",
7648 #endif /* OS2 */
7649 " ",
7650
7651 #ifdef OS2
7652 "SET TERMINAL MARGIN-BELL { ON [column], OFF }",
7653 "  Determines whether the margin-bell is activated and what column it should",
7654 "  ring at.  OFF by default.",
7655 " ",
7656 #endif /* OS2 */
7657
7658 "SET TERMINAL NEWLINE-MODE { OFF, ON }",
7659 "  Tells whether to send CRLF (Carriage Return and Line Feed) when you type",
7660 "  CR (press the Return or Enter key) in CONNECT mode.",
7661 " ",
7662
7663 #ifdef OS2
7664 "SET TERMINAL OUTPUT-PACING <milliseconds>",
7665 "  Tells how long to pause between sending each character to the host during",
7666 "  CONNECT mode.  Normally not needed but sometimes required to work around",
7667 "  TRANSMISSION BLOCKED conditions when pasting into the terminal window.",
7668 " ",
7669
7670 #ifdef PCTERM
7671 "SET TERMINAL PCTERM { ON, OFF }",
7672 "  Activates or deactivates the PCTERM terminal emulation keyboard mode.",
7673 "  When PCTERM is ON all keystrokes in the terminal screen are sent to the",
7674 "  host as make/break (down/up) codes instead of as characters from the",
7675 "  REMOTE-CHARACTER-SET, and all keyboard mappings, including Kverbs and the",
7676 "  escape character are disabled.  To turn off PCTERM keyboard mode while in",
7677 "  CONNECT mode press Control-CapsLock.  PCTERM is OFF by default.",
7678 " ",
7679 #endif /* PCTERM */
7680 #endif /* OS2 */
7681
7682 #ifdef OS2
7683 "SET TERMINAL PRINT { AUTO, COPY, OFF, USER }",
7684 "  Allows selective control of various types of printing from the Terminal",
7685 "  session.  AUTO prints a line of text from the terminal screen whenever",
7686 "  the cursor is moved off the line.  COPY prints every byte received as",
7687 "  it is received without interpretation.  USER prints every byte after",
7688 "  interpretation by the terminal emulator translates character-sets and",
7689 "  construct escape sequences, ...  The default is OFF.",
7690 " ",
7691 #else
7692 #ifdef XPRINT
7693 "SET TERMINAL PRINT { ON, OFF }",
7694 "  Enables and disables host-initiated transparent printing in CONNECT mode.",
7695 " ",
7696 #endif /* XPRINT */
7697 #endif /* OS2 */
7698
7699 #ifdef OS2
7700 #ifndef NOCSETS
7701 "SET TERMINAL REMOTE-CHARACTER-SET <remote-cs> [ { G0,G1,G2,G3 }... ]",
7702 "  Specifies the character set used by the remote host, <remote-cs>.",
7703 "  When the local and remote character sets differ, Kermit translates",
7704 "  between them during CONNECT.  By default, the remote character set is",
7705 "  Latin1 and the local one is your current code page.  Optionally, you can",
7706 "  also designate the character set to the G0..G3 graphic tables.",
7707 " ",
7708 #endif /* NOCSETS */
7709 #endif /* OS2 */
7710
7711 #ifdef OS2
7712 "SET TERMINAL ROLL-MODE { INSERT, OVERWRITE, KEYSTROKES [ option ] }",
7713 "  Tells whether new data when received from the host is entered into the",
7714 "  scrollback buffer at the current rollback position (OVERWRITE) or at the",
7715 "  end of the buffer (INSERT).  The default is INSERT.  Typing is allowed",
7716 "  during rollbacks in either mode, according to SET TERM ROLL KEYSTROKES:",
7717 "  SEND (the default) means to process keystrokes normally; IGNORE means to",
7718 "  ignore them when the screen is scrolled back; RESTORE-AND-SEND is like",
7719 "  SEND but restores the screen to its active position first.",
7720 " ",
7721
7722 "SET TERMINAL SCREEN-MODE { NORMAL, REVERSE }",
7723 "  When set to REVERSE the foreground and background colors are swapped as",
7724 "  well as the application of the foreground and background intensity bits.",
7725 "  The default is NORMAL.",
7726 " ",
7727
7728 "SET TERMINAL SCREEN-OPTIMIZE { ON, OFF }",
7729 "  When set to ON, the default, Kermit only paints the screen with characters",
7730 "  that have changed since the last screen paint.  When OFF, the screen is",
7731 "  completely repainted each time there is a change.",
7732 " ",
7733
7734 "SET TERMINAL SCREEN-UPDATE { FAST, SMOOTH } [ <milliseconds> ]",
7735 "  Chooses the mechanism used for screen updating and the update frequency.",
7736 "  Defaults are FAST scrolling with updates every 100 milliseconds.",
7737 " ",
7738
7739 "SET TERMINAL SCROLLBACK <lines>",
7740 "  Sets size of CONNECT virtual screen buffer.  <lines> includes the active",
7741 "  terminal screen.  The minimum is 256.  The maximum is 2 million.  The",
7742 "  default is 2000.",
7743 " ",
7744
7745 "SET TERMINAL SEND-DATA { ON, OFF }",
7746 "  Determines whether ASCII emulations such as WYSE 30,50,60 or TVI 910+,925,",
7747 "  950 may send their screen contents to the host upon request.  Allowing the",
7748 "  screen to be read by the host is a significant security risk.  The default",
7749 "  is OFF and should only be changed after a security evaluation of host",
7750 "  environment.",
7751 " ",
7752
7753 "SET TERMINAL SEND-END-OF-BLOCK { CRLF_ETX, US_CR }",
7754 "  Determines which set of characters should be used as end of line and end",
7755 "  of transmission indicators when sending screen data to the host",
7756 " ",
7757
7758 "SET TERMINAL SGR-COLORS { ON, OFF }",
7759 "  ON (default) means allow host control of colors; OFF means ignore host",
7760 "  escape sequences to set color.",
7761 " ",
7762
7763 "SET TERMINAL SNI-CH.CODE { ON, OFF }",
7764 "  This command controls the state of the CH.CODE key.  It is the equivalent",
7765 "  to the SNI_CH_CODE Keyboard verb.  The SNI terminal uses CH.CODE to",
7766 "  easily switch between the National Language character set and U.S. ASCII.",
7767 "  The default is ON which means to display characters as U.S. ASCII.  When",
7768 "  OFF the lanuage specified by SET TERMINAL SNI-LANUAGE is used to display",
7769 "  characters when 7-bit character sets are in use."
7770 " ",
7771 "SET TERMINAL SNI-FIRMWARE-VERSIONS <kbd-version> <terminal-version>",
7772 "  Specifies the Firmware Version number that should be reported to the host",
7773 "  when the terminal is queried.  The default is 920031 for the keyboard",
7774 "  and 830851 for the terminal.",
7775 " ",
7776 "SET TERMINAL SNI-LANGUAGE <national-language>",
7777 "  An alias for SET TERMINAL VT-LANUAGE, this command specifies the national",
7778 "  language character-set that should be used when the NRC mode is activated",
7779 "  for VT emulations or when CH.CODE is OFF for SNI emulations.  The default",
7780 "  language for SET TERMINAL TYPE SNI-97801 is \"German\".",
7781 " ",
7782 "SET TERMINAL SNI-PAGEMODE { ON, OFF }",
7783 "  Determines whether or not page mode is active.  OFF by default.",
7784 " ",
7785 "SET TERMINAL SNI-SCROLLMODE { ON, OFF }",
7786 "  Determines whether or not scroll mode is active.  OFF by default.",
7787 " ",
7788 "SET TERMINAL STATUSLINE { ON, OFF }",
7789 "  ON (default) enables the Kermit status line in the terminal screen.",
7790 "  OFF removes it, making the line available for use by the host.",
7791 " ",
7792
7793 "SET TERMINAL TRANSMIT-TIMEOUT <seconds>",
7794 "  Specifies the maximum amount of time K-95 waits before returning to the",
7795 "  prompt if your keystrokes can't be transmitted for some reason, such as a",
7796 "  flow-control deadlock.",
7797 " ",
7798 #endif /* OS2 */
7799
7800 #ifdef CK_TRIGGER
7801 "SET TERMINAL TRIGGER <string>",
7802 "  Specifies a string that, when detected during any subsequent CONNECT",
7803 "  session, is to cause automatic return to command mode.  Give this command",
7804 "  without a string to cancel the current trigger.  See HELP CONNECT for",
7805 "  additional information.",
7806 " ",
7807 #endif /* CK_TRIGGER */
7808
7809 #ifdef OS2
7810 "SET TERMINAL URL-HIGHLIGHT { ON <attribute>, OFF }",
7811 "  Specifies whether K-95 should highlight URLs and which screen attribute",
7812 "  should be used.  The screen attributes can be one of NORMAL, BLINK, BOLD,",
7813 "  DIM, INVISIBLE, REVERSE, or UNDERLINE.  The default is ON using the",
7814 "  BOLD screen attribute.",
7815 " ",
7816 "SET TERMINAL VIDEO-CHANGE { DISABLED, ENABLED }",
7817 "  Specifies whether K-95 should change video modes automatically in response",
7818 #ifdef NT
7819 "  to escape sequences from the other computer.  ENABLED by default (except",
7820 "  on Windows 95).",
7821 #else /* NT */
7822 "  to escape sequences from the other computer.  ENABLED by default.",
7823 #endif /* NT */
7824 " ",
7825
7826 "SET TERMINAL VT-LANGUAGE <language>",
7827 "  Specifies the National Replacement Character Set (NRC) to be used when",
7828 "  NRC mode is activated.  The default is \"North American\".",
7829 " ",
7830 "SET TERMINAL VT-NRC-MODE { ON, OFF }",
7831 "  OFF (default) chooses VT multinational Character Set mode.  OFF chooses",
7832 "  VT National Replacement Character-set mode.  The NRC is selected with",
7833 "  SET TERMINAL VT-LANGUAGE",
7834 " ",
7835
7836 #ifdef NT
7837 "SET TERMINAL WIDTH <cols>",
7838 "  Tells the number of columns in the terminal screen.",
7839 " ",
7840 "  The default is 80.  You can also use 132.  Other widths can be chosen but",
7841 "  are usually not supported by host software.",
7842 " ",
7843 #else
7844 "SET TERMINAL WIDTH <cols>",
7845 "  Tells how many columns define the terminal size.",
7846 " ",
7847 "Default is 80.  In Windowed OS/2 2.x sessions, this value may not be changed",
7848 "In Windowed OS/2 WARP 3.x sessions, this value may range from 20 to 255.",
7849 "In Full screen sessions, values of 40, 80, and 132 are valid.  Not all",
7850 "combinations of height and width are supported on all adapters.",
7851 " ",
7852 #endif /* NT */
7853 "SET TERMINAL WRAP { OFF, ON }",
7854 "  Tells whether the terminal emulator should automatically wrap long lines",
7855 "  on your screen.",
7856 " ",
7857 #else
7858
7859 "SET TERMINAL WIDTH <number>",
7860 " \
7861 Tells Kermit how many columns (characters) are on your CONNECT-mode screen.",
7862 " ",
7863 #endif /* OS2 */
7864 "Type SHOW TERMINAL to see current terminal settings.",
7865 "" };
7866 #endif /* NOLOCAL */
7867
7868 #ifdef NETCONN
7869 static char *hxyhost[] = {
7870 "SET HOST [ switches ] hostname-or-address [ service ] [ protocol-switch ]",
7871 "  Establishes a connection to the specified network host on the currently",
7872 "  selected network type.  For TCP/IP connections, the default service is",
7873 "  TELNET; specify a different TCP port number or service name to choose a",
7874 "  different service.  The first set of switches can be:",
7875 " ",
7876 " /NETWORK-TYPE:name",
7877 "   Makes the connection on the given type of network.  Equivalent to SET",
7878 "   NETWORK TYPE name prior to SET HOST, except that the selected network",
7879 "   type is used only for this connection.  Type \"set host /net:?\" to see",
7880 #ifdef NETCMD
7881 "   a list.  /NETWORK-TYPE:COMMAND means to make the connection through the",
7882 "   given system command, such as \"rlogin\" or \"cu\".",
7883 #else
7884 "   a list.",
7885 #endif /* NETCMD */
7886 " ",
7887 " /CONNECT",
7888 "   \
7889 Enter CONNECT (terminal) mode automatically if the connection is successful.",
7890 " ",
7891 " /SERVER",
7892 "   Enter server mode automatically if the connection is successful.",
7893 " ",
7894 " /USERID:[<name>]",
7895 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
7896 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
7897 "   Telnet negotiations; if this switch is given but the string is omitted,",
7898 "   no user ID is sent to the host.  If this switch is not given, your",
7899 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
7900 "   host it is a request to login as the specified user.",
7901 " ",
7902 #ifdef CK_AUTHENTICATION
7903 " /PASSWORD:[<string>]",
7904 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
7905 "   it is treated as the password to be used (if required) by any Telnet",
7906 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
7907 "   Password, or X.509 certificate private key decryption.)  If no password",
7908 "   switch is specified a prompt is issued to request the password if one",
7909 "   is required for the negotiated authentication method.",
7910 " ",
7911 #endif /* CK_AUTHENTICATION */
7912 "The protocol-switches can be:",
7913 " ",
7914 " /NO-TELNET-INIT",
7915 "   Do not send initial Telnet negotiations even if this is a Telnet port.",
7916 " ",
7917 " /RAW-SOCKET",
7918 "   This is a connection to a raw TCP socket.",
7919 " ",
7920 #ifdef RLOGCODE
7921 " /RLOGIN",
7922 "   Use Rlogin protocol even if this is not an Rlogin port.",
7923 " ",
7924 #endif /* RLOGCODE */
7925 " /TELNET",
7926 "   Send initial Telnet negotiations even if this is not a Telnet port.",
7927 " ",
7928 #ifdef CK_KERBEROS
7929 #ifdef RLOGCODE
7930 #ifdef KRB4
7931 " /K4LOGIN",
7932 "   Use Kerberos IV klogin protocol even if this is not a klogin port.",
7933 " ",
7934 #ifdef CK_ENCRYPTION
7935 " /EK4LOGIN",
7936 "   Use Kerberos IV Encrypted login protocol even if this is not an eklogin",
7937 "   port.",
7938 " ",
7939 #endif /* CK_ENCRYPTION */
7940 #endif /* KRB4 */
7941 #ifdef KRB5
7942 " /K5LOGIN",
7943 "   Use Kerberos V klogin protocol even if this is not a klogin port.",
7944 " ",
7945 #ifdef CK_ENCRYPTION
7946 " /EK5LOGIN",
7947 "   Use Kerberos V Encrypted login protocol even if this is not an eklogin",
7948 "   port.",
7949 " ",
7950 #endif /* CK_ENCRYPTION */
7951 #endif /* KRB5 */
7952 #endif /* RLOGCODE */
7953 #endif /* CK_KERBEROS */
7954 #ifdef CK_SSL
7955 " /SSL",
7956 "   Perform SSL negotiations.",
7957 " ",
7958 " /SSL-TELNET",
7959 "   Perform SSL negotiations and if successful start Telnet negotiations.",
7960 " ",
7961 " /TLS",
7962 "   Perform TLS negotiations.",
7963 " ",
7964 " /TLS-TELNET",
7965 "   Perform TLS negotiations and if successful start Telnet negotiations.",
7966 " ",
7967 #endif /* CK_SSL */
7968 "Examples:",
7969 "  SET HOST kermit.columbia.edu",
7970 "  SET HOST /CONNECT kermit.columbia.edu",
7971 "  SET HOST * 1649",
7972 "  SET HOST /SERVER * 1649",
7973 "  SET HOST 128.59.39.2",
7974 "  SET HOST madlab.sprl.umich.edu 3000",
7975 "  SET HOST xyzcorp.com 2000 /RAW-SOCKET",
7976 #ifdef SSHBUILTIN
7977 "  SET HOST /NET:SSH kermit.columbia.edu /x11-forwarding:on", 
7978 #endif /* SSHBUILTIN */
7979 #ifdef NETCMD
7980 "  SET HOST /CONNECT /COMMAND rlogin xyzcorp.com",
7981 #endif /* NETCMD */
7982 " ",
7983 #ifdef SUPERLAT
7984 "Notes:",
7985 " ",
7986 " . The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
7987 "   SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
7988 " ",
7989 " . For SUPERLAT connections, the hostname-or-address may be either a service",
7990 "   name, or a node/port combination, as required by your LAT host.",
7991 #else
7992 "The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
7993 "SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
7994 #endif /* SUPERLAT */
7995 " ",
7996 "Also see SET NETWORK, TELNET, SET TELNET.",
7997 "" };
7998
7999 static char *hmxyauth[] = {
8000 "Synatx: SET AUTHENTICATION <auth_type> <parameter> <value>",
8001 "  Sets defaults for the AUTHENTICATE command:",
8002 " ",
8003 #ifdef CK_KERBEROS
8004 "SET AUTHENTICATION KERBEROS5 ADDRESSES {list of ip-addresses}",
8005 "  Specifies a list of IP addresses that should be placed in the Ticket",
8006 "  Getting Ticket in addition to the local machine addresses.",
8007 " ",
8008 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTODESTROY",
8009 "  { ON-CLOSE, ON-EXIT, NEVER }",
8010 "  When ON, Kermit will destroy all credentials in the default",
8011 "  credentials cache upon Kermit termination.  Default is NEVER.",
8012 " ",
8013 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTOGET { ON, OFF }",
8014 "  When ON, if the host offers Kerberos 4 or Kerberos 5 authentication",
8015 "  and Kermit is configured to use that authentication method and there",
8016 "  is no TGT, Kermit will automatically attempt to retrieve one by",
8017 "  prompting for the password (and principal if needed.)  Default is ON.",
8018 " ",
8019 "SET AUTHENTICATION KERBEROS5 CREDENTIALS-CACHE <filename>",
8020 "  Allows an alternative credentials cache to be specified.  This is useful",
8021 "  when you need to maintain two or more sets of credentials for different",
8022 "  realms or roles.  The default is specified by the environment variable",
8023 "  KRB5CCNAME or as reported by the Kerberos 5 library.",
8024 " ",
8025 "SET AUTHENTICATION KERBEROS5 FORWARDABLE { ON, OFF }",
8026 "  When ON, specifies that Kerberos 5 credentials should be forwardable to",
8027 "  the host.  If SET TELNET AUTHENTICATION FORWARDING is ON, forwardable",
8028 "  credentials are sent to the host.  The default is OFF.",
8029 " ",
8030 "SET AUTHENTICATION KERBEROS5 GET-K4-TGT { ON, OFF }",
8031 "  When ON, specifies that Kerberos 4 credentials should be requested each",
8032 "  time Kerberos 5 credentials are requested with AUTH KERBEROS5 INIT.",
8033 "  Default is OFF.",
8034 " ",
8035 "SET AUTHENTICATION KERBEROS4 INSTANCE <instance>",
8036 "  Allows a Kerberos 4 instance to be specified as a default (if needed).",
8037 " ",
8038 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } KEYTAB <filename>",
8039 "  Specifies the location of the keytab file used to authenticate incoming",
8040 "  connections.  The default is none, which means to use the default value",
8041 "  configured in the Kerberos installation.",
8042 " ",
8043 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } LIFETIME <minutes>",
8044 "  Specifies the lifetime of the TGTs requested from the KDC.  The default",
8045 "  is 600 minutes (10 hours).",
8046 " ",
8047 "SET AUTHENTICATION KERBEROS5 NO-ADDRESSES { ON, OFF }",
8048 "  Specifies whether or not IP addresses will be inserted into the TGT."
8049 "  Default is OFF.",
8050 " ",
8051 "SET AUTHENTICATION KERBEROS4 PREAUTH { ON, OFF }",
8052 "  Allows Kerberos 4 preauthenticated TGT requests to be turned off.  The",
8053 "  default is ON.  Only use if absolutely necessary.  We recommend that",
8054 "  preauthenticated requests be required for all tickets returned by a KDC",
8055 "  to a requestor.",
8056 " ",
8057 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL <name>",
8058 "  When Kermit starts, it attempts to set the principal name to that stored",
8059 "  in the current credentials cache.  If no credential cache exists, the",
8060 "  current SET LOGIN USERID value is used.  SET LOGIN USERID is set to the",
8061 "  operating system's current username when Kermit is started.  To force",
8062 "  Kermit to prompt the user for the principal name when requesting TGTs,",
8063 "  place:",
8064 " ",
8065 "    SET AUTH K4 PRINCIPAL {}",
8066 "    SET AUTH K5 PRINCIPAL {}",
8067 " ",
8068 "  in the Kermit initialization file or connection script.",
8069 " ",
8070 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PASSWORD <prompt>",
8071 "  Specifies a custom prompt to be used when prompting for a password.",
8072 "  The Kerberos prompt strings may contain two %s replacement fields.",
8073 "  The first %s is replaced by the principal name; the second by the realm.",
8074 " ",
8075 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PRINCIPAL <prompt>",
8076 "  Specifies a custom prompt to be used when prompting for the Kerberos",
8077 "  principal name.  No %s replacement fields may be used.  Kermit prompts",
8078 "  for a principal name when retrieving a TGT if the command:",
8079 " ",
8080 "    SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL {}",
8081 " ",
8082 "  has been issued.",
8083 " ",
8084 "SET AUTHENTICATION KERBEROS5 PROXIABLE { ON, OFF }",
8085 "  When ON, specifies that Kerberos 5 credentials should be proxiable.",
8086 "  Default is OFF.",
8087 " ",
8088 "SET AUTHENTICATION KERBEROS5 RENEWABLE <minutes>",
8089 "  When <minutes> is greater than the ticket lifetime a TGT may be renewed",
8090 "  with AUTH K5 INIT /RENEW instead of getting a new ticket as long as the",
8091 "  ticket is not expired and its within the renewable lifetime.  Default is",
8092 "  0 (zero) minutes.",
8093 " ",
8094 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } REALM <name>",
8095 "  If no default is set, the default realm configured for the Kerberos",
8096 "  libraries is used.  Abbreviations accepted.",
8097 " ",
8098 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } SERVICE-NAME <name>",
8099 "  This command specifies the service ticket name used to authenticate",
8100 "  to the host when Kermit is used as a client; or the service ticket",
8101 "  name accepted by Kermit when it is acting as the host.",
8102 "  If no default is set, the default service name for Kerberos 4 is",
8103 "  \"rcmd\" and for Kerberos 5 is \"host\".",
8104 " ",
8105 #endif /* CK_KERBEROS */
8106 #ifdef CK_SRP
8107 "SET AUTHENTICATION SRP PROMPT PASSWORD <prompt>",
8108 "  Specifies a custom prompt to be used when prompting for a password.",
8109 "  The SRP prompt string may contain one %s replacement fields which is",
8110 "  replaced by the login userid.",
8111 " ",
8112 #endif /* CK_SRP */
8113 #ifdef CK_SSL
8114 "In all of the following commands \"SSL\" and \"TLS\" are aliases.",
8115 " ",
8116 "SET AUTHENTICATION { SSL, TLS } CIPHER-LIST <list of ciphers>",
8117 "Applies to both SSL and TLS.  A colon separated list of any of the following",
8118 "(case sensitive) options depending on the options chosen when OpenSSL was ",
8119 "compiled: ",
8120 " ",
8121 "  Key Exchange Algorithms:",
8122 "    \"kRSA\"      RSA key exchange",
8123 "    \"kDHr\"      Diffie-Hellman key exchange (key from RSA cert)",
8124 "    \"kDHd\"      Diffie-Hellman key exchange (key from DSA cert)",
8125 "    \"kEDH\"      Ephemeral Diffie-Hellman key exchange (temporary key)",
8126 "    \"kKRB5\"     Kerberos 5",
8127 " ",
8128 "  Authentication Algorithm:",
8129 "    \"aNULL\"     No authentication",
8130 "    \"aRSA\"      RSA authentication",
8131 "    \"aDSS\"      DSS authentication",
8132 "    \"aDH\"       Diffie-Hellman authentication",
8133 "    \"aKRB5\"     Kerberos 5",
8134 " ",
8135 "  Cipher Encoding Algorithm:",
8136 "    \"eNULL\"     No encodiing",
8137 "    \"DES\"       DES encoding",
8138 "    \"3DES\"      Triple DES encoding",
8139 "    \"RC4\"       RC4 encoding",
8140 "    \"RC2\"       RC2 encoding",
8141 "    \"IDEA\"      IDEA encoding",
8142 " ",
8143 "  MAC Digest Algorithm:",
8144 "    \"MD5\"       MD5 hash function",
8145 "    \"SHA1\"      SHA1 hash function",
8146 "    \"SHA\"       SHA hash function (should not be used)",
8147 " ",
8148 "  Aliases:",
8149 "    \"SSLv2\"     all SSL version 2.0 ciphers (should not be used)",
8150 "    \"SSLv3\"     all SSL version 3.0 ciphers",
8151 "    \"EXP\"       all export ciphers (40-bit)",
8152 "    \"EXPORT56\"  all export ciphers (56-bit)",
8153 "    \"LOW\"       all low strength ciphers (no export)",
8154 "    \"MEDIUM\"    all ciphers with 128-bit encryption",
8155 "    \"HIGH\"      all ciphers using greater than 128-bit encryption",
8156 "    \"RSA\"       all ciphers using RSA key exchange",
8157 "    \"DH\"        all ciphers using Diffie-Hellman key exchange",
8158 "    \"EDH\"       all ciphers using Ephemeral Diffie-Hellman key exchange",
8159 "    \"ADH\"       all ciphers using Anonymous Diffie-Hellman key exchange",
8160 "    \"DSS\"       all ciphers using DSS authentication",
8161 "    \"KRB5\"      all ciphers using Kerberos 5 authentication",
8162 "    \"NULL\"      all ciphers using no encryption",
8163 " ",
8164 "Each item in the list may include a prefix modifier:",
8165 " ",
8166 "    \"+\"         move cipher(s) to the current location in the list",
8167 "    \"-\"         remove cipher(s) from the list (may be added again by",
8168 "                a subsequent list entry)",
8169 "    \"!\"         kill cipher from the list (it may not be added again",
8170 "                by a subsequent list entry)",
8171 " ",
8172 "If no modifier is specified the entry is added to the list at the current ",
8173 "position.  \"+\" may also be used to combine tags to specify entries such as "
8174 ,
8175 "\"RSA+RC4\" describes all ciphers that use both RSA and RC4.",
8176 " ",
8177 "For example, all available ciphers not including ADH key exchange:",
8178 " ",
8179 "  ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP",
8180 " ",
8181 "All algorithms including ADH and export but excluding patented algorithms: ",
8182 " ",
8183 "  HIGH:MEDIUM:LOW:EXPORT56:EXP:ADH:!kRSA:!aRSA:!RC4:!RC2:!IDEA",
8184 " ",
8185 "The OpenSSL command ",
8186 " ",
8187 "  openssl.exe ciphers -v <list of ciphers> ",
8188 " ",
8189 "may be used to list all of the ciphers and the order described by a specific",
8190 "<list of ciphers>.",
8191 " ",
8192 "SET AUTHENTICATION { SSL, TLS } CRL-DIR <directory>",
8193 "specifies a directory that contains certificate revocation files where each",
8194 "file is named by the hash of the certificate that has been revoked.",
8195 " ",
8196 "  OpenSSL expects the hash symlinks to be made like this:",
8197 " ",
8198 "    ln -s crl.pem `openssl crl -hash -noout -in crl.pem`.r0",
8199 " ",
8200 "  Since not all file systems have symlinks you can use the following command",
8201 "  in Kermit to copy the crl.pem file to the hash file name.",
8202 " ",
8203 "     copy crl.pem {\\fcommand(openssl.exe crl -hash -noout -in crl.pem).r0}",
8204 " ",
8205 "  This produces a hash based on the issuer field in the CRL such ",
8206 "  that the issuer field of a Cert may be quickly mapped to the ",
8207 "  correct CRL.",
8208 " ",
8209 "SET AUTHENTICATION { SSL, TLS } CRL-FILE <filename>",
8210 "specifies a file that contains a list of certificate revocations.",
8211 " ",
8212 "SET AUTHENTICATION { SSL, TLS } DEBUG { ON, OFF }",
8213 "specifies whether debug information should be displayed about the SSL/TLS",
8214 "connection.  When DEBUG is ON, the VERIFY command does not terminate",
8215 "connections when set to FAIL-IF-NO-PEER-CERT when a certificate is",
8216 "presented that cannot be successfully verified.  Instead each error",
8217 "is displayed but the connection automatically continues.",
8218 " ",
8219 "SET AUTHENTICATION { SSL, TLS } DH-PARAM-FILE <filename>",
8220 "  Specifies a file containing DH parameters which are used to generate",
8221 "  temporary DH keys.  If a DH parameter file is not provided Kermit uses a",
8222 "  fixed set of parameters depending on the negotiated key length.  Kermit",
8223 "  provides DH parameters for key lengths of 512, 768, 1024, 1536, and 2048",
8224 "  bits.",
8225 " ",
8226 "SET AUTHENTICATION { SSL, TLS } DSA-CERT-CHAIN-FILE <filename>",
8227 "  Specifies a file containing a DSA certificate chain to be sent along with",
8228 "  the DSA-CERT to the peer.  This file must only be specified if Kermit is",
8229 "  being used as a server and the DSA certificate was signed by an",
8230 "  intermediary certificate authority.",
8231 " ",
8232 "SET AUTHENTICATION { SSL, TLS } DSA-CERT-FILE <filename>",
8233 "  Specifies a file containing a DSA certificate to be sent to the peer to ",
8234 "  authenticate the host or end user.  The file may contain the matching DH ",
8235 "  private key instead of using the DSA-KEY-FILE command.",
8236 " ",
8237 "SET AUTHENTICATION { SSL, TLS } DSA-KEY-FILE <filename>",
8238 "Specifies a file containing the private DH key that matches the DSA ",
8239 "certificate specified with DSA-CERT-FILE.  This command is only necessary if",
8240 "the private key is not appended to the certificate in the file specified by",
8241 "DSA-CERT-FILE.",
8242 " ",
8243 "  Note: When executing a script in the background or when it is",
8244 "  running as an Internet Kermit Service Daemon, Kermit cannot support ",
8245 "  encrypted private keys.  When attempting to load a private key that is",
8246 "  encrypted, a prompt will be generated requesting the passphrase necessary",
8247 "  to decrypt the keyfile.  To automate access to the private key you must",
8248 "  decrypt the encrypted keyfile and create an unencrypted keyfile for use",
8249 "  by Kermit.  This can be accomplished by using the following command and",
8250 "  the passphrase:",
8251 " ",
8252 "  openssl dsa -in <encrypted-key-file> -out <unencrypted-key-file>",
8253 " ",
8254 "SET AUTHENTICATION { SSL, TLS } RANDOM-FILE <filename>",
8255 "  Specifies a file containing random data to be used as seed for the",
8256 "  Pseudo Random Number Generator.  The contents of the file are",
8257 "  overwritten with new random data on each use.",
8258 " ",
8259 "SET AUTHENTICATION { SSL, TLS } RSA-CERT-CHAIN-FILE <filename>",
8260 "  Specifies a file containing a RSA certificate chain to be sent along with",
8261 "  the RSA-CERT to the peer.  This file must only be specified if Kermit is",
8262 "  being used as a server and the RSA certificate was signed by an",
8263 "  intermediary certificate authority.",
8264 " ",
8265 "SET AUTHENTICATION { SSL, TLS } RSA-CERT-FILE <filename>",
8266 "  Specifies a file containing a RSA certificate to be sent to the peer to ",
8267 "  authenticate the host or end user.  The file may contain the matching RSA ",
8268 "  private key instead of using the RSA-KEY-FILE command.",
8269 " ",
8270 "SET AUTHENTICATION { SSL, TLS } RSA-KEY-FILE <filename>",
8271 "  Specifies a file containing the private RSA key that matches the RSA",
8272 "  certificate specified with RSA-CERT-FILE.  This command is only necessary",
8273 "  if the private key is not appended to the certificate in the file specified"
8274 ,
8275 "  by RSA-CERT-FILE.  ",
8276 " ",
8277 "  Note: When executing a script in the background or when it is",
8278 "  running as an Internet Kermit Service Daemon, Kermit cannot support ",
8279 "  encrypted private keys.  When attempting to load a private key that is",
8280 "  encrypted, a prompt will be generated requesting the passphrase necessary",
8281 "  to decrypt the keyfile.  To automate access to the private key you must",
8282 "  decrypt the encrypted keyfile and create an unencrypted keyfile for use",
8283 "  by Kermit.  This can be accomplished by using the following command and",
8284 "  the passphrase:",
8285 " ",
8286 "  openssl rsa -in <encrypted-key-file> -out <unencrypted-key-file>",
8287 " ",
8288 "SET AUTHENTICATION { SSL, TLS } VERBOSE { ON, OFF }",
8289 "  Specifies whether information about the authentication (ie, the",
8290 "  certificate chain) should be displayed upon making a connection.",
8291 " ",
8292 "SET AUTHENTICATION { SSL, TLS } VERIFY { NO,PEER-CERT,FAIL-IF-NO-PEER-CERT }",
8293 "  Specifies whether certificates should be requested from the peer verified;",
8294 "  whether they should be verified when they are presented; and whether they",
8295 "  should be required.  When set to NO (the default for IKSD), Kermit does",
8296 "  not request that the peer send a certificate; if one is presented it is",
8297 "  ignored.  When set to PEER-CERT (the default when not IKSD), Kermit",
8298 "  requests a certificate be sent by the peer.  If presented, the certificate",
8299 "  is verified.  Any errors during the verification process result in",
8300 "  queries to the end user.  When set to FAIL-IF-NO-PEER-CERT, Kermit",
8301 "  requests a certificate be sent by the peer.  If the certificate is not",
8302 "  presented or fails to verify, the connection is terminated without",
8303 "  querying the user.",
8304 " ",
8305 "  If an anonymous cipher (i.e., ADH) is desired, the NO setting must be",
8306 "  used.  Otherwise, the receipt of the peer certificate request is",
8307 "  interpreted as a protocol error and the negotiation fails.",
8308 " ",
8309 "  If you wish to allow the peer to authenticate using either an X509",
8310 "  certificate to userid mapping function or via use of a ~/.tlslogin file",
8311 "  you must use either PEER-CERT or FAIL-IF-NO-PEER-CERT.  Otherwise, any",
8312 "  certificates that are presented is ignored.  In other words, use NO if you",
8313 "  want to disable the ability to use certificates to authenticate a peer.",
8314 " ",
8315 "SET AUTHENTICATION { SSL, TLS } VERIFY-DIR <directory>",
8316 "  Specifies a directory that contains root CA certificate files used to",
8317 "  verify the certificate chains presented by the peer.  Each file is named",
8318 "  by a hash of the certificate.",
8319 " ",
8320 "  OpenSSL expects the hash symlinks to be made like this:",
8321 " ",
8322 "    ln -s cert.pem `openssl x509 -hash -noout -in cert.pem`.0",
8323 " ",
8324 "  Since not all file systems have symlinks you can use the following command",
8325 "  in Kermit to copy the cert.pem file to the hash file name.",
8326 " ",
8327 "    copy cert.pem {\\fcommand(openssl.exe x509 -hash -noout -in cert.pem).0}",
8328 " ",
8329 "  This produces a hash based on the subject field in the cert such that the",
8330 "  certificate may be quickly found.",
8331 " ",
8332 "SET AUTHENTICATION { SSL, TLS } VERIFY-FILE <file>",
8333 "  Specifies a file that contains root CA certificates to be used for",
8334 "  verifying certificate chains.",
8335 " ",
8336 #endif /* CK_SSL */
8337 ""
8338 };
8339
8340 static char *hxynet[] = {
8341 "Syntax: SET NETWORK { TYPE network-type, DIRECTORY [ file(s)... ] }",
8342 " ",
8343 "Select the type of network to be used with SET HOST connections:",
8344 " ",
8345 #ifdef NETCMD
8346 "  SET NETWORK TYPE COMMAND   ; Make a connection through an external command",
8347 #endif /* NETCMD */
8348 #ifdef TCPSOCKET
8349 "  SET NETWORK TYPE TCP/IP    ; Internet: Telnet, Rlogin, etc.",
8350 #endif /* TCPSOCKET */
8351 #ifdef ANYX25
8352 "  SET NETWORK TYPE X.25      ; X.25 peer-to-peer connections.",
8353 #endif /* ANYX25 */
8354 #ifdef DECNET
8355 "  SET NETWORK TYPE PATHWORKS { LAT, CTERM } ; DEC LAT or CTERM connections.",
8356 #endif /* DECNET */
8357 #ifdef NPIPE
8358 "  SET NETWORK TYPE NAMED-PIPE <pipename>  ; OS/2 Named Pipe connections.",
8359 #endif /* NPIPE */
8360 #ifdef CK_NETBIOS
8361 "  SET NETWORK TYPE NETBIOS                ; NETBIOS peer-to-peer connections",
8362 #endif /* CK_NETBIOS */
8363 #ifdef SUPERLAT
8364 "  SET NETWORK TYPE SUPERLAT ; LAT connections (Meridian Technology SuperLAT)",
8365 #endif /* SUPERLAT */
8366 " ",
8367 "If only one network type is listed above, that is the default network for",
8368 #ifdef RLOGCODE
8369 "SET HOST commands.  Also see SET HOST, TELNET, RLOGIN.",
8370 #else
8371 #ifdef TNCODE
8372 "SET HOST commands.  Also see SET HOST, TELNET.",
8373 #else
8374 "SET HOST commands.  Also see SET HOST.",
8375 #endif /* TNCODE */
8376 #endif /* RLOGCODE */
8377 " ",
8378 "SET NETWORK DIRECTORY [ file [ file [ ... ] ] ]",
8379 "  Specifies the name(s) of zero or more network directory files, similar to",
8380 "  dialing directories (HELP DIAL for details).  The general format of a",
8381 "  network directory entry is:",
8382 " ",
8383 "    name network-type address [ network-specific-info ] [ ; comment ]",
8384 " ",
8385 "  For TCP/IP, the format is:",
8386 " ",
8387 "    name tcp/ip ip-hostname-or-address [ socket ] [ ; comment ]",
8388 " ",
8389 "You can have multiple network directories and you can have multiple entries",
8390 "with the same name.  SET HOST <name> and TELNET <name> commands look up the",
8391 "given <name> in the directory and, if found, fill in the additional items",
8392 "from the entry, and then try all matching entries until one succeeds.",
8393 ""};
8394
8395 #ifndef NOTCPOPTS
8396 static char *hxytcp[] = {
8397 #ifdef SOL_SOCKET
8398 "SET TCP ADDRESS <ip-address>",
8399 "  This allows a specific IP Address on a multihomed host to be used",
8400 "  instead of allowing the TCP/IP stack to choose.  This may be necessary",
8401 "  when using authentication or listening for an incoming connection.",
8402 "  Specify no <ip-address> to remove the preference.",
8403 " ",
8404 "SET TCP KEEPALIVE { ON, OFF }",
8405 "  Setting this ON might help to detect broken connections more quickly.",
8406 "  (default is ON.)",
8407 " ",
8408 "SET TCP LINGER { ON [timeout], OFF }",
8409 "  Setting this ON ensures that a connection doesn't close before all",
8410 "  outstanding data has been transferred and acknowledged.  The timeout is",
8411 "  measured in 10ths of milliseconds.  The default is ON with a timeout of 0.",
8412 " ",
8413 "SET TCP NODELAY { ON, OFF }",
8414 "  ON means send short TCP packets immediately rather than waiting",
8415 "  to accumulate a bunch of them before transmitting (Nagle Algorithm).",
8416 "  (default is OFF.)",
8417 " ",
8418 "SET TCP RECVBUF <number>",
8419 "SET TCP SENDBUF <number>",
8420 "   TCP receive and send buffer sizes.  (default is -1, use system defaults.)",
8421 " ",
8422 "These items let you tune TCP networking performance on a per-connection",
8423 "basis by adjusting parameters you normally would not have access to.  You",
8424 "should use these commands only if you feel that the TCP/IP protocol stack",
8425 "that Kermit is using is giving you inadequate performance, and then only if",
8426 "you understand the concepts (see, for example, the Comer TCP/IP books), and",
8427 "then at your own risk.  These settings are displayed by SHOW NETWORK.  Not",
8428 "all options are necessarily available in all Kermit versions; it depends on",
8429 "the underlying TCP/IP services.",
8430 " ",
8431 "The following TCP and/or IP parameter(s) may also be changed:",
8432 " ",
8433 #endif /* SOL_SOCKET */
8434 "SET TCP REVERSE-DNS-LOOKUP { AUTO, ON, OFF }",
8435 "  Tells Kermit whether to perform reverse DNS lookup on TCP/IP connections",
8436 "  so Kermit can determine the actual hostname of the host it is connected",
8437 "  to, which is useful for connections to host pools, and is required for",
8438 "  Kerberos connections to host pools and for incoming connections.  If the",
8439 "  other host does not have a DNS entry, the reverse lookup could take a long",
8440 "  time (minutes) to fail, but the connection will still be made.  Turn this",
8441 "  option OFF for speedier connections if you do not need to know exactly",
8442 "  which host you are connected to and you are not using Kerberos.  AUTO, the",
8443 "  default, means the lookup is done on hostnames, but not on numeric IP",
8444 "  addresses unless Kerberos support is installed.",
8445 #ifdef CK_DNS_SRV
8446 " ",
8447 "SET TCP DNS-SERVICE-RECORDS {ON, OFF}",
8448 "  Tells Kermit whether to try to use DNS SRV records to determine the",
8449 "  host and port number upon which to find an advertised service.  For",
8450 "  example, if a host wants regular Telnet connections redirected to some",
8451 "  port other than 23, this feature allows Kermit to ask the host which",
8452 "  port it should use.  Since not all domain servers are set up to answer",
8453 "  such requests, this feature is OFF by default.",
8454 #endif /* CK_DNS_SRV */
8455 #ifdef NT
8456 #ifdef CK_SOCKS
8457 " ",
8458 "SET TCP SOCKS-SERVER [<hostname or ip-address>]",
8459 "  If a hostname or ip-address is specified, Kermit will use the SOCKS",
8460 "  server when attempting outgoing connections.  If no hostname or",
8461 "  ip-address is specified, any previously specified SOCKS server will",
8462 "  be removed.",
8463 #endif /* CK_SOCKS */
8464 #endif /* NT */
8465 #ifndef NOHTTP
8466 " ",
8467 "SET TCP HTTP-PROXY [<hostname or ip-address>[:<port>]]",
8468 "  If a hostname or ip-address is specified, Kermit will use the Proxy",
8469 "  server when attempting outgoing connections.  If no hostname or",
8470 "  ip-address is specified, any previously specified Proxy server will",
8471 "  be removed.  If no port number is specified, the \"http\" service",
8472 "  will be used.",
8473 #endif /* NOHTTP */
8474 ""};
8475 #endif /* NOTCPOPTS */
8476 #endif /* NETCONN */
8477
8478 #ifdef TNCODE
8479 static char *hxytopt[] = {
8480 "SET TELOPT [ { /CLIENT, /SERVER } ] <option> -",
8481 "    { ACCEPTED, REFUSED, REQUESTED, REQUIRED } -",
8482 "    [ { ACCEPTED, REFUSED, REQUESTED, REQUIRED } ]",
8483 "  SET TELOPT lets you specify policy requirements for Kermit's handling of",
8484 "  Telnet option negotiations.  Setting an option REQUIRED causes Kermit",
8485 "  to offer the option to the peer and disconnect if the option is refused.",
8486 "  REQUESTED causes Kermit to offer an option to the peer.  ACCEPTED results",
8487 "  in no offer but Kermit will attempt to negotiate the option if it is",
8488 "  requested.  REFUSED instructs Kermit to refuse the option if it is",
8489 "  requested by the peer.",
8490 " ",
8491 "  Some options are negotiated in two directions and accept separate policies",
8492 "  for each direction; the first keyword applies to Kermit itself, the second",
8493 "  applies to Kermit's Telnet partner; if the second keyword is omitted, an",
8494 "  appropriate (option-specific) default is applied.  You can also include a",
8495 "  /CLIENT or /SERVER switch to indicate whether the given policies apply",
8496 "  when Kermit is the Telnet client or the Telnet server; if no switch is",
8497 "  given, the command applies to the client.",
8498 " ",
8499 "  Note that some of Kermit's Telnet partners fail to refuse options that",
8500 "  they do not recognize and instead do not respond at all.  In this case it",
8501 "  is possible to use SET TELOPT to instruct Kermit to REFUSE the option",
8502 "  before connecting to the problem host, thus skipping the problematic",
8503 "  negotiation.",
8504 " ",
8505 "  Use SHOW TELOPT to view current Telnet Option negotiation settings.",
8506 "  SHOW TELNET displays current Telnet settings.",
8507 ""};
8508
8509 static char *hxytel[] = {
8510 "Syntax: SET TELNET parameter value",
8511 " ",
8512 "For TCP/IP TELNET connections, which are in NVT (ASCII) mode by default:",
8513 " ",
8514 #ifdef CK_AUTHENTICATION
8515 #ifdef COMMENT
8516 "SET TELNET AUTHENICATION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
8517 "  ACCEPT or REFUSE authentication bids, or actively REQUEST authentication.",
8518 "  REQUIRED refuses the connection if authentication is not successfully",
8519 "  negotiated.  ACCEPTED by default.",
8520 " ",
8521 #endif /* COMMENT */
8522 "SET TELNET AUTHENTICATION TYPE { AUTOMATIC, KERBEROS_IV, KERBEROS_V, ...",
8523 #ifdef NT
8524 "  ..., NTLM, SSL, SRP, NONE } [...]",
8525 #else /* NT */
8526 "  ..., SSL, SRP, NONE } [...]",
8527 #endif /* NT */
8528 "  AUTOMATIC is the default.  Available options can vary depending on the",
8529 "  features Kermit was built to support and the operating system",
8530 "  configuration; type SET TELNET AUTHENTICATION TYPE ? for a list.",
8531 " ",
8532 "  When Kermit is the Telnet client:",
8533 "    AUTOMATIC allows the host to choose the preferred type of authentication."
8534 ,
8535 "    NONE instructs Kermit to refuse all authentication methods when the",
8536 "    authentication option is negotiated.  A list of one or more other values",
8537 "    allow a specific subset of the supported authentication methods to be",
8538 "    used.",
8539 " ",
8540 "  When Kermit is the Telnet server:",
8541 "    AUTOMATIC results in available authentication methods being offered",
8542 "    to the telnet client in the following order:",
8543 " ",
8544 #ifdef NT
8545 "      KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
8546 #else /* NT */
8547 "      KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
8548 #endif /* NT */
8549 " ",
8550 "  NONE results in no authentication methods being offered to the Telnet",
8551 "  server when the authentication option is negotiated.  The preferred",
8552 "  method of disabling authentication is:",
8553 " ",
8554 "    SET TELOPT /SERVER AUTHENTICATION REFUSE",
8555 " ",
8556 "  A list of one or more authentication methods specifies the order those",
8557 "  methods are to be offered to the telnet client.",
8558 #ifdef NT
8559 " ",
8560 "  If you wish to allow NTLM authentication to be used with the Microsoft",
8561 "  Windows 2000 or Services for Unix Telnet client you must specify a list",
8562 "  with NTLM as the first item in the list.  By default, NTLM is the last",
8563 "  item in the list because it does not provide any form of data encryption.",
8564 #endif /* NT */
8565 " ",
8566 #ifdef CK_KERBEROS
8567 "SET TELNET AUTHENTICATION FORWARDING { ON, OFF }",
8568 "  Set this to ON to forward Kerberos V ticket-granting-tickets to the host",
8569 "  after authentication is complete.  OFF by default.",
8570 " ",
8571 #endif /* CK_KERBEROS */
8572 "SET TELNET AUTHENTICATION ENCRYPT-FLAG { ANY, NONE, TELOPT }",
8573 "  Use this command to specify which AUTH telopt encryption flags may be",
8574 "  accepted in client mode or offered in server mode.  The default is ANY.",
8575 " ",
8576 "SET TELNET AUTHENTICATION HOW-FLAG { ANY, ONE-WAY, MUTUAL }",
8577 "  Use this command to specify which AUTH telopt how flags may be",
8578 "  accepted in client mode or offered in server mode.  The default is ANY.",
8579 " ",
8580 #endif /* CK_AUTHENTICATION */
8581 #ifdef COMMENT
8582 "SET TELNET BINARY-MODE { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
8583 "  ACCEPT or REFUSE binary-mode bids, or actively REQUEST binary mode.",
8584 "  REQUIRED refuses the connection if binary mode is not successfully",
8585 "  negotiated in both directions.  ACCEPTED by default.",
8586 " ",
8587 #endif /* COMMENT */
8588 "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
8589 "  When ON (OFF by default) and BINARY negotiations are not REFUSED Kermit",
8590 "  will attempt to negotiate BINARY mode in each direction before the start",
8591 "  of each file transfer.  After the transfer is complete BINARY mode will",
8592 "  be restored to the pre-transfer state.",
8593 " ",
8594 "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
8595 "  Set this command to ON if you want to force Kermit to negotiate",
8596 "  Telnet Binary in both directions when performing file transfers.",
8597 "  Default is OFF.  Alias SET TELNET BINARY-XFER-MODE.",
8598 " ",
8599 "SET TELNET BUG AUTH-KRB5-DES { ON, OFF }",
8600 "  Default is ON.  Disable this bug to enable the use of encryption types",
8601 "  other than DES such as 3DES or CAST-128 when the Kerberos 5 session key",
8602 "  is longer than 8 bytes.",
8603 " ",
8604 "SET TELNET BUG BINARY-ME-MEANS-U-TOO { ON, OFF }",
8605 "  Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
8606 "  Kermit's TELNET partner.",
8607 " ",
8608 "SET TELNET BUG BINARY-U-MEANS-ME-TOO { ON, OFF }",
8609 "  Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
8610 "  Kermit's TELNET partner.",
8611 " ",
8612 "SET TELNET BUG INFINITE-LOOP-CHECK { ON, OFF }",
8613 "  Set this to ON to prevent Kermit from responding to a telnet negotiation",
8614 "  sequence that enters an infinite loop.  The default is OFF because this",
8615 "  should never occur.",
8616 " ",
8617 "SET TELNET BUG SB-IMPLIES-WILL-DO { ON, OFF }",
8618 "  Set this to ON to allow Kermit to respond to telnet sub-negotiations if",
8619 "  the peer forgets to respond to WILL with DO or to DO with WILL.",
8620 " ",
8621 "SET TELNET DEBUG { ON, OFF }",
8622 "  Set this to ON to display telnet negotiations as they are sent and",
8623 "  received.",
8624 " ",
8625 "SET TELNET DELAY-SB { ON, OFF }",
8626 "  When ON, telnet subnegotiation responses are delayed until after all",
8627 "  authentication and encryption options are either successfully negotiated",
8628 "  or refused. This ensures that private data is protected.  When OFF, telnet",
8629 "  subnegotiation responses are sent immediately.  The default is ON.",
8630 " ",
8631 "SET TELNET ECHO { LOCAL, REMOTE }",
8632 "  Kermit's initial echoing state for TELNET connections, LOCAL by default.",
8633 "  After the connection is made, TELNET negotiations determine the echoing.",
8634 " ",
8635 #ifdef CK_ENCRYPTION
8636 #ifdef COMMENT
8637 "SET TELNET ENCRYPTION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
8638 "  ACCEPT or REFUSE encryption bids, or actively REQUEST encryption in both.",
8639 "  directions.  REQUIRED refuses the connection if encryption is not",
8640 "  successfully negotiated in both directions.  ACCEPTED by default.",
8641 " ",
8642 #endif /* COMMENT */
8643 "SET TELNET ENCRYPTION TYPE { AUTOMATIC, CAST128_CFB64, CAST128_OFB64, ",
8644 "  CAST5_40_CFB64, CAST5_40_OFB64, DES_CFB64, DES_OFB64, NONE }",
8645 "  AUTOMATIC allows the host to choose the preferred type of encryption.",
8646 "  Other values allow a specific encryption method to be specified.",
8647 "  AUTOMATIC is the default.  The list of options will vary depending",
8648 "  on the encryption types selected at compilation time.",
8649 " ",
8650 #endif /* CK_ENCRYPTION */
8651 #ifdef CK_ENVIRONMENT
8652 #ifdef COMMENT
8653 "SET TELNET ENVIRONMENT { ON, OFF, variable-name [ value ] }",
8654 "  This feature lets Kermit send the values of certain environment variables",
8655 "  to the other computer if it asks for them.  The variable-name can be any",
8656 "  of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
8657 "  \"SYSTEMTYPE\", or \"DISPLAY\".  Some Telnet servers, if given a USER",
8658 "  value in this way, will accept it and therefore not prompt you for user",
8659 "  name when you log in.  The default values are taken from your environment;",
8660 "  use this command to change or remove them.  See RFC1572 for details.  You",
8661 "  may also specify OFF to disable this feature, and ON to re-enable it.",
8662 " ",
8663 #else
8664 "SET TELNET ENVIRONMENT { variable-name [ value ] }",
8665 "  This feature lets Kermit send the values of certain environment variables",
8666 "  to the other computer if it asks for them.  The variable-name can be any",
8667 "  of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
8668 "  \"SYSTEMTYPE\", or \"DISPLAY\".  Some Telnet servers, if given a USER",
8669 "  value in this way, will accept it and therefore not prompt you for user",
8670 "  name when you log in.  The default values are taken from your environment;",
8671 "  use this command to change or remove them.  See RFC1572 for details.",
8672 " ",
8673 #endif /* COMMENT */
8674 #endif /* CK_ENVIRONMENT */
8675 #ifdef CK_FORWARD_X
8676 "SET TELNET FORWARD-X XAUTHORITY-FILE <file>",
8677 "  If your X Server requires X authentication and the location of the",
8678 "  .Xauthority file is not defined by the XAUTHORITY environment variable,",
8679 "  use this command to specify the location of the .Xauthority file."
8680 "  ",
8681 #endif /* CK_FORWARD_X */
8682 #ifdef CK_SNDLOC
8683 "SET TELNET LOCATION [ text ]",
8684 "  Location string to send to the Telnet server if it asks.  By default this",
8685 "  is picked up from the LOCATION environment variable.  Give this command",
8686 "  with no text to disable this feature.",
8687 " ",
8688 #endif /* CK_SNDLOC */
8689 "SET TELNET NEWLINE-MODE { NVT, BINARY-MODE } { OFF, ON, RAW }",
8690
8691 "  Determines how carriage returns are handled on TELNET connections.  There",
8692 "  are separate settings for NVT (ASCII) mode and binary mode.  ON (default",
8693 "  for NVT mode) means CRLF represents CR.  OFF means CR followed by NUL",
8694 "  represents CR.  RAW (default for BINARY mode) means CR stands for itself.",
8695 " ",
8696 #ifdef TCPSOCKET
8697 "SET TELNET PROMPT-FOR-USERID <prompt>",
8698 "  Specifies a custom prompt to be used when prompting for a userid.  Kermit",
8699 "  prompts for a userid if the command:",
8700 " ",
8701 "    SET LOGIN USERID {}",
8702 " ",
8703 "  has been issued prior to a Telnet authentication negotiation for an",
8704 "  authentication type that requires the transmission of a name, such as",
8705 "  Secure Remote Password.",
8706 " ",
8707 #endif /* TCPSOCKET */
8708 "SET TELNET REMOTE-ECHO { ON, OFF }",
8709 "  Applies only to incoming connections created with:",
8710 "    SET HOST * <port> /TELNET",
8711 "  This command determines whether Kermit will actually echo characters",
8712 "  received from the remote when it has negotiated to do so.  The default",
8713 "  is ON.  Remote echoing may be turned off when it is necessary to read",
8714 "  a password with the INPUT command.",
8715 " ",
8716 "SET TELNET TERMINAL-TYPE name",
8717 "  The terminal type to send to the remote TELNET host.  If none is given,",
8718 #ifdef OS2
8719 "  your current SET TERMINAL TYPE value is sent, e.g. VT220.",
8720 " ",
8721 #else
8722 "  your local terminal type is sent.",
8723 " ",
8724 #endif /* OS2 */
8725 "SET TELNET WAIT-FOR-NEGOTIATIONS { ON, OFF }",
8726 "  Each Telnet option must be fully negotiated either On or Off before the",
8727 "  session can continue.  This is especially true with options that require",
8728 "  subnegotiations such as Authentication, Encryption, and Kermit; for",
8729 "  proper support of these options Kermit must wait for the negotiations to",
8730 "  complete.  Of course, Kermit has no way of knowing whether a reply is",
8731 "  delayed or not coming at all, and so will wait a minute or more for",
8732 "  required replies before continuing the session.  If you know that Kermit's",
8733 "  Telnet partner will not be sending the required replies, you can set this",
8734 "  option of OFF to avoid the long timeouts.  Or you can instruct Kermit to",
8735 "  REFUSE specific options with the SET TELOPT command.",
8736 "",
8737 "Type SHOW TELNET to see the current values of these parameters.",
8738 "" };
8739 #endif /* TNCODE */
8740
8741 #ifndef NOSPL
8742 static char *hxymacr[] = {
8743 "Syntax: SET MACRO parameter value",
8744 "  Controls the behavior of macros.",
8745 " ",
8746 "SET MACRO ECHO { ON, OFF }",
8747 "  Tells whether commands executed from a macro definition should be",
8748 "  displayed on the screen.  OFF by default; use ON for debugging.",
8749 " ",
8750 "SET MACRO ERROR { ON, OFF }",
8751 "  Tells whether a macro should be automatically terminated upon a command",
8752 "  error.  This setting is local to the current macro, and inherited by",
8753 "  subordinate macros.",
8754 "" };
8755 #endif /* NOSPL */
8756
8757 static char *hmxyprm[] = {
8758 "Syntax: SET PROMPT [ text ]",
8759 " ",
8760 #ifdef OS2
8761 "Prompt text for this program, normally 'K-95>'.  May contain backslash",
8762 #else
8763 #ifdef MAC
8764 "Prompt text for this program, normally 'Mac-Kermit>'.  May contain backslash",
8765 #else
8766 "Prompt text for this program, normally 'C-Kermit>'.  May contain backslash",
8767 #endif /* MAC */
8768 #endif /* OS2 */
8769 "codes for special effects.  Surround by { } to preserve leading or trailing",
8770 #ifdef OS2
8771 "spaces.  If text omitted, prompt reverts to K-95>.  Prompt can include",
8772 #else
8773 #ifdef MAC
8774 "spaces.  If text omitted, prompt reverts to Mac-Kermit>.  Prompt can include",
8775 #else
8776 "spaces.  If text omitted, prompt reverts to C-Kermit>.  Prompt can include",
8777 #endif /* OS2 */
8778 #endif /* MAC */
8779 "variables like \\v(dir) or \\v(time) to show current directory or time.",
8780 "" };
8781
8782 #ifdef UNIX
8783 static char *hxywild[] = {
8784 "Syntax: SET WILDCARD-EXPANSION { KERMIT [ switch ], SHELL }",
8785 "  KERMIT (the default) means C-Kermit expands filename wildcards in SEND and",
8786 "  similar commands itself, and in incoming GET commands.  Optional switches",
8787 "  are /NO-MATCH-DOT-FILES (\"*\" and \"?\" should not match in initial",
8788 "  period in a filename; this is the default) and /MATCH-DOT-FILES if you",
8789 "  want files whose names begin with \".\" included.  SET WILDCARD SHELL",
8790 "  means that Kermit asks your preferred shell to expand wildcards (this",
8791 "  should not be necessary in C-Kermit 7.0 and later).  HELP WILDCARD for",
8792 "  further information.",
8793 "" };
8794 #endif /* UNIX */
8795
8796 #ifndef NOXFER
8797 static char *hxywind[] = {
8798 "Syntax: SET WINDOW-SIZE number",
8799 "  Specifies number of slots for sliding windows, i.e. the number of packets",
8800 "  that can be transmitted before waiting for acknowledgement.  The default",
8801 #ifdef XYZ_INTERNAL
8802 "  for Kermit protocol is one, the maximum is 32; for ZMODEM, the default",
8803 "  is no windowing (0).  For ZMODEM, the window size is really the packet",
8804 "  length, and is used only when non-windowed (streaming) transfers fail; the",
8805 "  ZMODEM window size should be a largish number, like 1024, and it should be",
8806 "  a multiple of 64.",
8807 #else
8808 "  is one, the maximum is 32.  Increased window size might result in reduced",
8809 "  maximum packet length.  Use sliding windows for improved efficiency on",
8810 "  connections with long delays.  A full duplex connection is required, as",
8811 "  well as a cooperating Kermit on the other end.",
8812 #endif /* XYZ_INTERNAL */
8813 "" };
8814
8815 static char *hxyrpt[] = {
8816 "Syntax: SET REPEAT { COUNTS { ON, OFF }, PREFIX <code> }",
8817 "  SET REPEAT COUNTS turns the repeat-count compression mechanism ON and OFF.",
8818 "  The default is ON.  SET REPEAT PREFIX <code> sets the repeat-count prefix",
8819 "  character to the given code.  The default is 126 (tilde).",
8820 "" };
8821
8822 static char *hxyrcv[] = {
8823 "Syntax: SET RECEIVE parameter value",
8824 "  Specifies parameters for inbound packets:",
8825 " ",
8826 #ifndef NOCSETS
8827 "SET RECEIVE CHARACTER-SET { AUTOMATIC, MANUAL }",
8828 "  Whether to automatically switch to an appropriate file-character set based",
8829 "  on the transfer character-set announcer, if any, of an incoming text file.",
8830 "  AUTOMATIC by default.  Also see HELP ASSOCIATE.",
8831 " ",
8832 #endif /* NOCSETS */
8833 "SET RECEIVE CONTROL-PREFIX number",
8834 "  ASCII value of prefix character used for quoting control characters in",
8835 "  packets that Kermit receives, normally 35 (number sign).  Don't change",
8836 "  this unless something is wrong with the other Kermit program.",
8837 " ",
8838 "SET RECEIVE END-OF-PACKET number",
8839 "  ASCII value of control character that terminates incoming packets,",
8840 "  normally 13 (carriage return).",
8841 " ",
8842 #ifdef CKXXCHAR
8843 "SET RECEIVE IGNORE-CHARACTER number",
8844 "  ASCII value of character to be discarded when receiving packets, such as",
8845 "  line folding characters.",
8846 " ",
8847 #endif /* CKXXCHAR */
8848 "SET RECEIVE MOVE-TO [ directory ]",
8849 "  If a directory name is specified, then every file that is received",
8850 "  successfully is moved to the given directory immediately after reception",
8851 "  is complete.  Omit the directory name to remove any previously set move-to",
8852 "  directory.",
8853 " ",
8854 "SET RECEIVE PACKET-LENGTH number",
8855 "  Maximum length packet the other Kermit should send.",
8856 " ",
8857 "SET RECEIVE PADDING number",
8858 "  Number of prepacket padding characters to ask for (normally 0).",
8859 " ",
8860 "SET RECEIVE PAD-CHARACTER number",
8861 "  ASCII value of control character to use for padding (normally 0).",
8862 " ",
8863 "SET RECEIVE PATHNAMES {OFF, ABSOLUTE, RELATIVE, AUTO}",
8864 "  If a recognizable path (directory, device) specification appears in an",
8865 "  incoming filename, strip it OFF before trying to create the output file.",
8866 #ifdef CK_MKDIR
8867 "  Otherwise, then if any of the directories in the path don't exist, Kermit",
8868 "  tries to create them, relative to your current or download directory, or",
8869 "  absolutely, as specified.  RELATIVE means force all incoming names, even",
8870 "  if they are absolute, to be relative to your current or download directory."
8871 ,
8872 "  AUTO, which is the default, means RELATIVE if the file sender indicates in",
8873 "  advance that this is a recursive transfer, otherwise OFF.",
8874 #endif /* CK_MKDIR */
8875 " ",
8876 "SET RECEIVE PAUSE number",
8877 "  Milliseconds to pause between packets, normally 0.",
8878 " ",
8879
8880 #ifdef CK_PERMS
8881 "SET RECEIVE PERMISSIONS { ON, OFF }",
8882 "  Whether to copy file permissions from inbound Attribute packets.",
8883 " ",
8884 #endif /* CK_PERMS */
8885
8886 "SET RECEIVE RENAME-TO [ template ]",
8887 "  If a template is specified, then every file that is received successfully",
8888 "  \
8889 is renamed according to the given template immediately after it is received.",
8890 "  \
8891 The template should include variables like \\v(filename) or \\v(filenumber).",
8892 "  Omit the template to remove any template previously set.",
8893 " ",
8894 "SET RECEIVE START-OF-PACKET number",
8895 "  ASCII value of character that marks start of inbound packet.",
8896 " ",
8897 "SET RECEIVE TIMEOUT number",
8898 "  Number of seconds the other Kermit should wait for a packet before sending",
8899 "  a NAK or retransmitting.",
8900 #ifdef VMS
8901 " ",
8902 "SET RECEIVE VERSION-NUMBERS { ON, OFF }",
8903 "  If ON, and in incoming filename includes a VMS version number, use it when",
8904 "  creating the file.  If OFF (which is the default), strip any VMS version",
8905 "  number from incoming filenames before attempting to create the file, \
8906 causing",
8907 "  the new file to receive the next highest version number.",
8908 #endif /* VMS */
8909 "" };
8910
8911 static char *hxysnd[] = {
8912 "Syntax: SET SEND parameter value",
8913 "  Specifies parameters for outbound files or packets.",
8914 " ",
8915 "SET SEND BACKUP { ON, OFF }",
8916 "  Tells whether to include backup files when sending file groups.  Backup",
8917 "  files are those created by Kermit, EMACS, etc, when creating a new file",
8918 "  that has the same name as an existing file.  A backup file has a version",
8919 "  appended to its name, e.g. oofa.txt.~23~.  ON is the default, meaning",
8920 "  don't exclude backup files.  Use OFF to exclude backup files from group",
8921 "  transfers.",
8922 " ",
8923 #ifndef NOCSETS
8924 "SET SEND CHARACTER-SET { AUTOMATIC, MANUAL }",
8925 "  Whether to automatically switch to an appropriate file-character when a",
8926 "  SET TRANSFER CHARACTER-SET command is given, or vice versa.  AUTOMATIC by",
8927 "  default.  Also see HELP ASSOCIATE.",
8928 " ",
8929 #endif /* NOCSETS */
8930
8931 "SET SEND CONTROL-PREFIX number",
8932 "  ASCII value of prefix character used for quoting control characters in",
8933 "  packets that Kermit sends, normally 35 (number sign).",
8934 " ",
8935 #ifdef CKXXCHAR
8936 "SET SEND DOUBLE-CHARACTER number",
8937 "  ASCII value of character to be doubled when sending packets, such as an",
8938 "  X.25 PAD escape character.",
8939 " ",
8940 #endif /* CKXXCHAR */
8941 "SET SEND END-OF-PACKET number",
8942 "  ASCII value of control character to terminate an outbound packet,",
8943 "  normally 13 (carriage return).",
8944 " ",
8945 "SET SEND MOVE-TO [ directory ]",
8946 "  \
8947 If a directory name is specified, then every file that is sent successfully",
8948 "  is moved to the given directory immediately after it is sent.",
8949 "  Omit the directory name to remove any previously set move-to directory.",
8950 " ",
8951 "SET SEND PACKET-LENGTH number",
8952 "  Maximum length packet to send, even if other Kermit asks for longer ones.",
8953 "  This command can not be used to force packets to be sent that are longer",
8954 "  than the length requested by the receiver.  Use this command only to",
8955 "  force shorter ones.",
8956 " ",
8957 "SET SEND PADDING number",
8958 "  Number of prepacket padding characters to send.",
8959 " ",
8960 "SET SEND PAD-CHARACTER number",
8961 "  ASCII value of control character to use for padding.",
8962 " ",
8963 "SET SEND PATHNAMES {OFF, ABSOLUTE, RELATIVE}",
8964 "  Include the path (device, directory) portion with the file name when",
8965 "  sending it as specified; ABSOLUTE means to send the whole pathname,",
8966 "  RELATIVE means to include the pathname relative to the current directory.",
8967 "  Applies to the actual filename, not to the \"as-name\".  The default is",
8968 "  OFF.",
8969 " ",
8970 "SET SEND PAUSE number",
8971 "  Milliseconds to pause between packets, normally 0.",
8972 " ",
8973
8974 #ifdef CK_PERMS
8975 "SET SEND PERMISSIONS { ON, OFF }",
8976 "  Whether to include file permissions in outbound Attribute packets.",
8977 " ",
8978 #endif /* CK_PERMS */
8979
8980 "SET SEND RENAME-TO [ template ]",
8981 "  If a template is specified, then every file that is sent successfully",
8982 "  is renamed according to the given template immediately after it is sent.",
8983 "  \
8984 The template should include variables like \\v(filename) or \\v(filenumber).",
8985 "  Omit the template to remove any template previously set.",
8986 " ",
8987 "SET SEND START-OF-PACKET number",
8988 "  ASCII value of character to mark start of outbound packet.",
8989 " ",
8990 #ifdef CK_TIMERS
8991 "SET SEND TIMEOUT number [ { DYNAMIC [ min max ] ], FIXED } ]",
8992 #else
8993 "SET SEND TIMEOUT number",
8994 #endif /* CK_TIMERS */
8995
8996 "  Number of seconds to wait for a packet before sending NAK or",
8997 #ifdef CK_TIMERS
8998 "  retransmitting.  Include the word DYNAMIC after the number in the",
8999 "  SET SEND TIMEOUT command to have Kermit compute the timeouts dynamically",
9000 "  throughout the transfer based on the packet rate.  Include the word FIXED",
9001 "  to use the \"number\" given throughout the transfer.  DYNAMIC is the",
9002 "  default.  After DYNAMIC you may include minimum and maximum values.",
9003 #else
9004 "  retransmitting.",
9005 #endif /* CK_TIMERS */
9006 #ifdef VMS
9007 " ",
9008 "SET SEND VERSION-NUMBERS { ON, OFF }",
9009 "  If ON, include VMS version numbers in outbound filenames.  If OFF (which",
9010 "  is the default), strip version numbers.",
9011 #endif /* VMS */
9012 "" };
9013
9014 static char *hxyxfer[] = {
9015 "Syntax: SET TRANSFER (or XFER) paramater value",
9016 " ",
9017 "Choices:",
9018 " ",
9019 "SET TRANSFER BELL { OFF, ON }",
9020 "  Whether to ring the terminal bell at the end of a file transfer.",
9021 " ",
9022 #ifdef XFRCAN
9023 "SET TRANSFER CANCELLATION { OFF, ON [ <code> [ <number> ] ] }",
9024 "  OFF disables remote-mode packet-mode cancellation from the keyboard.",
9025 "  ON enables it.  The optional <code> is the control character to use for",
9026 "  cancellation; the optional <number> is how many consecutive occurrences",
9027 "  of the given control character are required for cancellation.",
9028 " ",
9029 #endif /* XFRCAN */
9030 "SET TRANSFER INTERRUPTION { ON, OFF }",
9031 "  TRANSFER INTERRUPTION is normally ON, allowing for interruption of a file",
9032 "  transfer in progress by typing certain characters while the file-transfer",
9033 "  display is active.  SET TRANSFER INTERRUPTION OFF disables interruption",
9034 "  of file transfer from the keyboard in local mode.",
9035 " ",
9036 #ifndef NOSPL
9037 "SET TRANSFER CRC-CALCULATION { OFF, ON }",
9038 "  Tells whether Kermit should accumulate a Cyclic Redundancy Check for ",
9039 "  each file transfer.  Normally ON, in which case the CRC value is available",
9040 "  in the \\v(crc16) variable after the transfer.  Adds some overhead.  Use",
9041 "  SET TRANSFER CRC OFF to disable.",
9042 " ",
9043 #endif /* NOSPL */
9044 #ifndef NOCSETS
9045 "SET TRANSFER CHARACTER-SET name",
9046 "  Selects the character set used to represent textual data in Kermit",
9047 "  packets.  Text characters are translated to/from the FILE CHARACTER-SET.",
9048 "  Choices:",
9049 " ",
9050 "  TRANSPARENT (no translation, the default)",
9051 "  ASCII",
9052 "  LATIN1 (ISO 8859-1 Latin Alphabet 1)",
9053 #ifndef NOLATIN2
9054 "  LATIN2 (ISO 8859-2 Latin Alphabet 2)",
9055 #endif /* NOLATIN2 */
9056 "  LATIN9 (ISO 8859-15 Latin Alphabet 9)",
9057 #ifdef CYRILLIC
9058 "  CYRILLIC-ISO (ISO 8859-5 Latin/Cyrillic)",
9059 #endif /* CYRILLIC */
9060 #ifdef GREEK
9061 "  GREEK-ISO (ISO 8859-7 Latin/Greek)",
9062 #endif /* GREEK */
9063 #ifdef HEBREW
9064 "  HEBREW-ISO (ISO 8859-8 Latin/Hebrew)",
9065 #endif /* HEBREW */
9066 #ifdef KANJI
9067 "  JAPANESE-EUC (JIS X 0208 Kanji + Roman and Katakana)",
9068 #endif /* KANJI */
9069 #ifdef UNICODE
9070 "  UCS-2 (ISO 10646 / Unicode 2-byte form)",
9071 "  UTF-8 (ISO 10646 / Unicode 8-bit serialized transformation format)",
9072 #endif /* UNICODE */
9073 " ",
9074 "SET TRANSFER TRANSLATION { ON, OFF }",
9075 "  Enables and disables file-transfer character-set translation.  It's",
9076 "  enabled by default.",
9077 #endif /* NOCSETS */
9078 " ",
9079 #ifdef CK_CURSES
9080 "SET TRANSFER DISPLAY { BRIEF, CRT, FULLSCREEN, NONE, SERIAL }",
9081 #else
9082 "SET TRANSFER DISPLAY { BRIEF, CRT, NONE, SERIAL }",
9083 #endif  /* CK_CURSES */
9084 "  Choose the desired format for the progress report to be displayed on",
9085 "  your screen during file transfers when Kermit is in local mode.",
9086 #ifdef CK_CURSES
9087 "  FULLSCREEN requires your terminal type be set correctly; the others",
9088 "  are independent of terminal type.",
9089 #else
9090 "  file transfer.",
9091 #endif  /* CK_CURSES */
9092 " ",
9093 "SET TRANSFER LOCKING-SHIFT { OFF, ON, FORCED }",
9094 "  Tell whether locking-shift protocol should be used during file transfer",
9095 "  to achieve 8-bit transparency on a 7-bit connection.  ON means to request",
9096 "  its use if PARITY is not NONE and to use it if the other Kermit agrees,",
9097 "  OFF means not to use it, FORCED means to use it even if the other Kermit",
9098 "  does not agree.",
9099 " ",
9100 "SET TRANSFER MODE { AUTOMATIC, MANUAL }",
9101 "  Automatic (the default) means Kermit should automatically go into binary",
9102 "  file-transfer mode and use literal filenames if the other Kermit says it",
9103 "  has a compatible file system, e.g. UNIX-to-UNIX, but not UNIX-to-DOS.",
9104 #ifdef PATTERNS
9105 "  Also, when sending files, Kermit should switch between binary and text",
9106 "  mode automatically per file based on the SET FILE BINARY-PATTERNS and SET",
9107 "  FILE TEXT-PATTERNS.",
9108 #endif /* PATTERNS */
9109 " ",
9110 #ifdef PIPESEND
9111 "SET TRANSFER PIPES { ON, OFF }",
9112 "  Enables/Disables automatic sending from / reception to command pipes when",
9113 "  the incoming filename starts with '!'.  Also see CSEND, CRECEIVE.",
9114 " ",
9115 #endif /* PIPESEND */
9116 #ifdef CK_XYZ
9117 "SET TRANSFER PROTOCOL { KERMIT, XMODEM, ... }",
9118 "  Synonym for SET PROTOCOL (q.v.).",
9119 " ",
9120 #endif /* CK_XYZ */
9121 "SET TRANSFER REPORT { ON, OFF }",
9122 "  Enables/Disables the automatic post-transfer message telling what files",
9123 "  went where from C-Kermit when it is in remote mode.  ON by default.",
9124 " ",
9125 "SET TRANSFER SLOW-START { OFF, ON }",
9126 "  ON (the default) tells Kermit, when sending files, to gradually build up",
9127 "  the packet length to the maximum negotiated length.  OFF means start",
9128 "  sending the maximum length right away.",
9129 " ",
9130 "Synonym: SET XFER.  Use SHOW TRANSFER (XFER) to see SET TRANSFER values.",
9131 "" };
9132 #endif /* NOXFER */
9133
9134 #ifdef NT
9135 static char *hxywin95[] = {
9136 "SET WIN95 8.3-FILENAMES { ON, OFF }",
9137 "  Instructs K-95 to report all filenames using 8.3 notation instead of the",
9138 "  normal long filenames.  Default is OFF",
9139 " ",
9140 "SET WIN95 ALT-GR { ON, OFF }",
9141 "  Instructs K-95, when used on MS Windows 95, to interpret the Right Alt key",
9142 "  as the Alt-Gr key.  This is necessary to work around the failure of",
9143 "  Windows 95 to properly translate non-US keyboards.  Default is OFF.",
9144 " ",
9145 "SET WIN95 KEYBOARD-TRANSLATION <character-set>",
9146 "  Specifies the character-set that Windows 95 is using to send keystrokes",
9147 "  to Kermit-95 via the keyboard input functions.  Default is Latin1-ISO.",
9148 " ",
9149 "SET WIN95 OVERLAPPED-IO { ON <requests>, OFF }",
9150 "  Determines whether or not K-95 uses Overlapped-I/O methods for reading",
9151 "  from and writing to serial and TAPI communication devices.  <requests>",
9152 "  specifies the maximum number of simultaneous write requests that may be",
9153 "  overlapped, from 1 to 30.  Default is ON.",
9154 " ",
9155 "SET WIN95 POPUPS { ON, OFF }",
9156 "  Determines whether or not Kermit 95 uses Popups to query the user for",
9157 "  necessary information such as user IDs or passwords.  Default is ON.",
9158 " ",
9159 "SET WIN95 SELECT-BUG { ON, OFF }"
9160 "  Some TCP/IP (Winsock) implementations for Windows have a defective",
9161 "  select() function.  Use this command to avoid the use of select() if",
9162 "  K95 appears to be unable to send data over TCP/IP.  Default is OFF.",
9163 ""};
9164 #endif /* NT */
9165
9166 static char *hmxybel[] = {
9167 #ifdef OS2
9168 "Syntax: SET BELL { AUDIBLE [ { BEEP, SYSTEM-SOUNDS } ], VISIBLE, NONE }",
9169 "  Specifies how incoming Ctrl-G (bell) characters are handled in CONNECT",
9170 "  mode and how command warnings are presented in command mode.  AUDIBLE",
9171 "  means either a beep or a system-sound is generated; VISIBLE means the",
9172 "  screen is flashed momentarily.",
9173 #else
9174 "Syntax: SET BELL { OFF, ON }",
9175 "  ON (the default) enables ringing of the terminal bell (beep) except where",
9176 "  it is disabled in certain circumstances, e.g. by SET TRANSFER BELL.  OFF",
9177 "  disables ringing of the bell in all circumstances, overriding any specific",
9178 "  SET xxx BELL selections.",
9179 #endif /* OS2 */
9180 ""};
9181
9182 static char *hmxycd[] = {
9183 "Syntax: SET CD { HOME <path>, PATH <path>, MESSAGE { ON, OFF, FILE <list> } }"
9184 ,
9185 " ",
9186 "SET CD HOME <path>",
9187 "  Specified which directory to change to if CD or KCD is given without a",
9188 "  pathname.  If this command is not given, your login or HOME directory is",
9189 "  used.",
9190 " ",
9191 "SET CD PATH <path>",
9192 "  Overrides normal CDPATH environment variable, which tells the CD command",
9193 "  where to look for directories to CD to if you don't specify them fully.",
9194 "  The format is:",
9195 " ",
9196 #ifdef UNIXOROSK
9197 "    set cd path :directory:directory:...",
9198 " ",
9199 "  in other words, a list of directories separated by colons, with a colon",
9200 "  at the beginning, e.g.:",
9201 " ",
9202 "    set cd path :/usr/olga:/usr/ivan/public:/tmp",
9203 #else
9204 #ifdef OS2
9205 "    set cd path disk:directory;disk:directory;...",
9206 " ",
9207 "  just like the DOS PATH; in other words, a list of disk:directory names",
9208 "  separated by semicolons, e.g.:",
9209 " ",
9210 "    SET CD PATH C:\\K95;C:\\HOME;C:\\LOCAL;C:\\",
9211 #else
9212 #ifdef VMS
9213 "    set cd path directory,directory,...",
9214 " ",
9215 "  in other words, a list of directory specifications or logical names that",
9216 "  represent them, e.g.:",
9217 " ",
9218 "    SET CD PATH SYS$LOGIN:,$DISK1:[OLGA],$DISK2[SCRATCH.IVAN].",
9219 #else
9220 "  (unknown for this platform)",
9221 #endif /* VMS */
9222 #endif /* OS2 */
9223 #endif /* UNIXOROSK */
9224 " ",
9225 "SET CD MESSAGE { ON, OFF }",
9226 "  Default is OFF.  When ON, this tells Kermit to look for a file with a",
9227 "  certain name in any directory that you CD to, and if it finds one, to",
9228 "  display it on your screen when you give the CD command.  The filename,",
9229 "  or list of names, is given in the SET CD MESSAGE FILE command.",
9230 " ",
9231 "SET CD MESSAGE FILE name",
9232 "  or:",
9233 "SET CD MESSAGE FILE {{name1}{name2}...{name8}}",
9234 "  Specify up to 8 filenames to look for when when CDing to a new directory",
9235 "  and CD MESSAGE is ON.  The first one found, if any, in the new directory",
9236 #ifndef DFCDMSG
9237 "  is displayed.",
9238 #else
9239 "  is displayed.  The default list is:",
9240 " ",
9241 #ifdef UNIXOROSK
9242 "   {{./.readme}{README.TXT}{READ.ME}}",
9243 #else
9244 "   {{README.TXT}{READ.ME}}",
9245 #endif /* UNIXOROSK */
9246 " ",
9247 #endif /* DFCDMSG */
9248 #ifndef NOSERVER
9249 "Synonym: SET SERVER CD-MESSAGE FILE.",
9250 #endif /* NOSERVER */
9251 " ",
9252 "Type SHOW CD to view current CD settings.  Also see HELP SET SERVER.",
9253 ""
9254 };
9255
9256 #ifndef NOIKSD
9257 static char * hsetiks[] = {
9258 #ifdef OS2
9259 "SET IKS ANONYMOUS ACCOUNT <username>",
9260 "  On Windows NT/2000 this is the account that will be used to allow",
9261 "  anonymous access to the system.  This account MUST have no password",
9262 "  and its privileges should be restricted to only allow those operations",
9263 "  which should be permitted to unknown users.  In practice this means",
9264 "  List Directories and Read-Execute privileges only.  If a directory",
9265 "  is configured for Write privileges then Read privileges should be",
9266 "  denied for that directory.  Otherwise, your system will become used",
9267 "  by software pirates.  If this command is not specified in the IKSD.KSC",
9268 "  file the username \"GUEST\" is used by default.  This command has no",
9269 "  effect on Windows 95/98.",
9270 " ",
9271 #endif /* OS2 */
9272 "SET IKS ANONYMOUS INITFILE filename",
9273 #ifdef OS2
9274 "  The initialization file to be executed for anonymous logins.  By default",
9275 "  it is K95.INI in the home directory associated with the ANNONYMOUS account."
9276 ,
9277 "  Any filename that you specify here must be readable by the ANONYMOUS",
9278 "  account and if a SET IKS ANONYMOUS ROOT command was given, exist within",
9279 "  the restricted directory tree.  This option is independent of the SET IKS",
9280 "  INITFILE command which applies only to real users.",
9281 #else
9282 "  The initialization file to be executed for anonymous logins.  By default",
9283 "  it is .kermrc in the anonymous root directory.  This option is independent",
9284 "  of the SET IKS INITFILE command which applies only to real users.",
9285 #endif /* OS2 */
9286 " ",
9287 "SET IKS ANONYMOUS LOGIN { ON, OFF }",
9288 #ifdef OS2
9289 "  Whether anonymous logins are allowed.  By default they are NOT allowed,",
9290 "  so this option need be included only to allow them (or for clarity, to",
9291 "  emphasize that they are not allowed).  Anonymous login occurs when the",
9292 "  username \"anonymous\" is specified with any password (as with ftpd).",
9293 "  In order for anonymous logins to succeed on Windows NT/2000, the",
9294 "  ANONYMOUS account must be enabled.",
9295 " ",
9296 "  On Windows NT and 2000, anonymous users have the same access rights as",
9297 "  the ANONYMOUS account.  In Windows 95/98, anonymous users, just like any",
9298 "  other users, have full access rights to your entire PC, since Windows 95",
9299 "  and 98 include no security features.  For this reason, if you are allowing",
9300 "  anonymous logins, be sure to also SET an IKS ANONYMOUS ROOT directory to",
9301 "  restrict anonymous users' file access.",
9302 " ",
9303 "  Anonymous user permissions may be restricted via the specification of ",
9304 "  DISABLE commands in the ANONYMOUS initfile.  Anonymous users are not ",
9305 "  permitted to execute an ENABLE command.  Anonymous users are also prevented"
9306 ,
9307 "  from SHOWing sensitive data about the operating system or the IKS",
9308 "  configuration.",
9309 #else
9310 "  Whether anonymous logins are allowed. By default they are allowed, so this",
9311 "  option need be included only to disallow them (or for clarity, to emphasize"
9312 ,
9313 "  they are allowed). Anonymous login occurs when the username \"anonymous\"",
9314 "  or \"ftp\" is given, with any password (as with ftpd).",
9315 #endif /* OS2 */
9316 " ",
9317 "SET IKS ANONYMOUS ROOT <directory>",
9318 "  Specifies a directory tree to which anonymous users are restricted after",
9319 "  login.",
9320 " ",
9321 "SET IKS BANNERFILE <filename>",
9322 "  The name of a file containing a message to be printed after the user logs",
9323 "  in, in place of the normal message (copyright notice, \"Type HELP or ? for",
9324 "  help\", etc).",
9325 " ",
9326 "SET IKS CDFILE <filelist>",
9327 "  When cdmessage is on, this is the name of the \"read me\" file to be shown."
9328 ,
9329 "  Normally you would specify a relative (not absolute) name, since the file",
9330 "  is opened using the literal name you specified, after changing to the new",
9331 "  directory.  Example:",
9332 " ",
9333 "    SET IKS CDFILE READ.ME",
9334 " ",
9335 "  You can also give a list of up to 8 filenames by (a) enclosing each",
9336 "  filename in braces, and (b) enclosing the entire list in braces.  Example:",
9337 " ",
9338 "    SET IKS CDFILE {{READ.ME}{aareadme.txt}{README}{read-this-first}}",
9339 " ",
9340 "  When a list is given, it is searched from left to right and the first",
9341 "  file found is displayed.",
9342 " ",
9343 "SET IKS CDMESSAGE {ON, OFF, 0, 1, 2}",
9344 "  For use in the Server-Side Server configuration; whenever the client",
9345 "  tells the server to change directory, the server sends the contents of a",
9346 "  \"read me\" file to the client's screen.  This feature is ON by default,",
9347 "  and operates in client/server mode only when ON or 1.  If set to 2 or",
9348 "  higher, it also operates when the CD command is given at the IKSD> prompt.",
9349 "  Synonym: SET IKS CDMSG.",
9350 " ",
9351 "SET IKS DATABASE { ON, OFF }",
9352 "  This command determines whether entries are inserted into the SET IKS",
9353 "  DBFILE (IKSD active sessions database).",
9354 " ",
9355 "SET IKS DBFILE <filename>",
9356 "  Specifies the file which should be used for storing runtime status",
9357 #ifdef OS2
9358 "  information about active connections.  The default is a file called",
9359 "  \"iksd.db\" in the WINDOWS directory.",
9360 #else
9361 #ifdef UNIX
9362 "  information about active connections.  The default is a file called",
9363 "  \"iksd.db\" in the /var/log directory.",
9364 #else
9365 "  information about active connections.",
9366 #endif /* UNIX */
9367 #endif /* OS2 */
9368 " ",
9369 #ifdef OS2
9370 "SET IKS DEFAULT-DOMAIN <domain-name>",
9371 "  A userid on Windows is of the form DOMAIN\\\\userid.  This command",
9372 "  determines which domain will be searched for the userid if a domain",
9373 "  is not specified by the user.  On Windows 95/98 when User-level",
9374 "  access is activated in the Network Control Panel, the default ",
9375 "  domain will be automatically set.  If the default domain is not",
9376 "  specified, accounts on the local machine will take precedence over",
9377 "  accounts in Domains to which the local machine belongs.",
9378 #endif /* OS2 */
9379 " ",
9380 "SET IKS HELPFILE <filename>",
9381 "  Specifies the name of a file to be displayed if the user types HELP",
9382 "  (not followed by a specific command or topic), in place of the built-in",
9383 "  top-level help text.  The file need not fit on one screen; more-prompting",
9384 "  is used if the file is more than one screen long if COMMAND MORE-PROMPTING",
9385 "  is ON, as it is by default.",
9386 " ",
9387 "SET IKS INITFILE <filename>",
9388 "  Execute <filename> rather than the normal initialization file for real",
9389 "  users; this option does not apply to anonymous users.",
9390 " ",
9391 "SET IKS NO-INITFILE { ON, OFF }",
9392 "  Do not execute an initialization file, even if a real user is logging in.",
9393 " ",
9394 "SET IKS SERVER-ONLY { ON, OFF }",
9395 "  If this option is included on the IKSD command line, the Client Side Server"
9396 ,
9397 "  configuration is disabled, and the user will not get a Username: or",
9398 "  Password: prompt, and will not be able to access the IKSD command prompt.",
9399 "  A FINISH command sent to the IKSD will log it out and close the",
9400 "  connection, rather than returning it to its prompt.",
9401 " ",
9402 "SET IKS TIMEOUT <number>",
9403 "  This sets a limit (in seconds) on the amount of time the client has to log",
9404 "  in once the connection is made.  If successful login does not occur within",
9405 "  the given number of seconds, the connection is closed.  The default timeout"
9406 ,
9407 "  is 300 seconds (5 minutes).  A value of 0 or less indicates there is to be",
9408 "  no limit.",
9409 " ",
9410 "SET IKS USERFILE <filename>",
9411 #ifdef UNIX
9412 "  This file contains a list of local usernames that are to be denied access",
9413 "  to Internet Kermit Service.  The default is /etc/ftpusers.  This can be the"
9414 ,
9415 "  same file that is used by wuftpd, and the syntax is the same: one username",
9416 "  per line; lines starting with \"#\" are ignored.  Use this option to",
9417 "  specify the name of a different forbidden-user file, or use",
9418 "  \"set iks userfile /dev/null\" to disable this feature in case there is a",
9419 "   /etc/ftpusers file but you don't want to use it.",
9420 #else
9421 "  This file contains a list of local usernames that are to be denied access",
9422 "  to Internet Kermit Service.  The syntax is: one username per line; lines",
9423 "  starting with \"#\" are ignored.",
9424 #endif /* UNIX */
9425 " ",
9426 "SET IKS XFERLOG { ON, OFF }",
9427 #ifdef UNIX
9428 "  Whether a file-transfer log should be kept.  Off by default.  If \"on\",",
9429 "  but no SET IKSD XFERFILE command is given, /var/log/iksd.log is used.",
9430 #else
9431 "  Whether a file-transfer log should be kept.  Off by default.",
9432 #endif /* UNIX */
9433 " ",
9434 "SET IKS XFERFILE <filename>",
9435 "  Use this option to specify an iksd log file name.  If you include this",
9436 "  option, it implies SET IKS XFERFILE ON.",
9437 ""
9438 };
9439 #endif /* NOIKSD */
9440
9441 /*  D O H S E T  --  Give help for SET command  */
9442
9443 int
9444 dohset(xx) int xx; {
9445     int x;
9446
9447     if (xx == -3) return(hmsga(hmhset));
9448     if (xx < 0) return(xx);
9449
9450 #ifdef NEWFTP
9451     if (xx == XYFTPX)
9452       return(dosetftphlp());
9453     if (xx == XYGPR)
9454       return(hmsga(hmxygpr));
9455 #endif /* NEWFTP */
9456
9457     if ((x = cmcfm()) < 0) return(x);
9458     switch (xx) {
9459 #ifndef NOIKSD
9460       case XYIKS:
9461         return(hmsga(hsetiks));
9462 #endif /* NOIKSD */
9463
9464 case XYATTR:
9465     return(hmsga(hsetat));
9466
9467 case XYBACK:
9468     return(hmsga(hsetbkg));
9469
9470 case XYBELL:
9471     return(hmsga(hmxybel));
9472
9473 #ifdef OS2
9474 case XYPRTY:
9475     return(hmsg("SET PRIORITY { REGULAR, FOREGROUND-SERVER, TIME-CRITICAL }\n\
9476   Specifies at which priority level the communication and screen update\n\
9477   threads should operate.  The default value is FOREGROUND-SERVER."));
9478 #endif /* OS2 */
9479
9480 #ifdef DYNAMIC
9481 case XYBUF:
9482     return(hmsga(hsetbuf));
9483 #endif /* DYNAMIC */
9484
9485 #ifndef NOLOCAL
9486 case XYCARR:
9487     return(hmsga(hsetcar));
9488 #endif /* NOLOCAL */
9489
9490 #ifndef NOSPL
9491 case XYCASE:
9492     return(hmsg("Syntax: SET CASE { ON, OFF }\n\
9493   Tells whether alphabetic case is significant in string comparisons\n\
9494   done by INPUT, IF, and other commands.  This setting is local to the\n\
9495   current macro or command file, and inherited by subordinates."));
9496
9497 #endif /* NOSPL */
9498
9499 case XYCMD:
9500     return(hmsga(hsetcmd));
9501
9502 case XYIFD:
9503     return(hmsg("Syntax: SET INCOMPLETE { DISCARD, KEEP }\n\
9504   Whether to discard or keep incompletely received files, default is KEEP."));
9505
9506 #ifndef NOSPL
9507 case XYINPU:
9508     return(hmsga(hxyinp));
9509 #endif /* NOSPL */
9510
9511 case XYCHKT:
9512     return(hmsga(hmxychkt));
9513
9514 #ifndef NOSPL
9515 case XYCOUN:
9516     return(hmsg("Syntax:  SET COUNT number\n\
9517  Example: SET COUNT 5\n\
9518   Set up a loop counter, for use with IF COUNT.  Local to current macro\n\
9519   or command file, inherited by subordinate macros and command files."));
9520 #endif /* NOSPL */
9521
9522 case XYDEBU:
9523     return(hmsga(hmxydeb));
9524
9525 case XYDFLT:
9526     return(hmsg("Syntax: SET DEFAULT directory\n\
9527   Change directory.  Equivalent to CD command."));
9528
9529 case XYDELA:
9530     return(hmsg("Syntax: SET DELAY number\n\
9531   Number of seconds to wait before sending first packet after SEND command."));
9532
9533 #ifndef NODIAL
9534 case XYDIAL:
9535     return(hmsga(hmxydial));
9536 #endif /* NODIAL */
9537
9538 #ifdef UNIX
9539 case XYSUSP:
9540     return(hmsg("Syntax: SET SUSPEND { OFF, ON }\n\
9541   Disables SUSPEND command, suspend signals, and <esc-char>Z during CONNECT.")
9542            );
9543 #endif
9544
9545 #ifndef NOSCRIPT
9546 case XYSCRI:
9547     return(hmsg("Syntax: SET SCRIPT ECHO { OFF, ON }\n\
9548   Disables/Enables echoing of SCRIPT command operation."));
9549 #endif /* NOSCRIPT */
9550
9551 case XYTAKE:
9552     return(hmsga(hxytak));
9553
9554 #ifndef NOLOCAL
9555 case XYTERM:
9556     return(hmsga(hxyterm));
9557
9558 case XYDUPL:
9559     return(hmsg("Syntax: SET DUPLEX { FULL, HALF }\n\
9560   During CONNECT: FULL means remote host echoes, HALF means Kermit\n\
9561   does its own echoing."));
9562
9563 case XYLCLE:
9564     return(hmsg("Syntax: SET LOCAL-ECHO { OFF, ON }\n\
9565   During CONNECT: OFF means remote host echoes, ON means Kermit\n\
9566   does its own echoing.  Synonym for SET DUPLEX { FULL, HALF }."));
9567
9568 case XYESC:
9569     return(hmsga(hxyesc));              /* SET ESCAPE */
9570 #endif /* NOLOCAL */
9571
9572 case XYPRTR:                            /* SET PRINTER */
9573     return(hmsga(hxyprtr));
9574
9575 #ifdef OS2
9576 #ifdef BPRINT
9577 case XYBDCP:                            /* SET BPRINTER */
9578     return(hmsga(hxybprtr));
9579 #endif /* BPRINT */
9580 #endif /* OS2 */
9581
9582 case XYEXIT:
9583     return(hmsga(hxyexit));
9584
9585 case XYFILE:
9586     return(hmsga(hmxyf));
9587
9588 case XYFLOW:
9589     return(hmsga(hmxyflo));
9590
9591 case XYHAND:
9592    return(hmsga(hmxyhsh));
9593
9594 #ifdef NETCONN
9595
9596 case XYHOST:
9597     return(hmsga(hxyhost));
9598
9599 case XYNET:
9600     return(hmsga(hxynet));
9601
9602 #ifndef NOTCPOPTS
9603 #ifdef SOL_SOCKET
9604 case XYTCP:
9605     return(hmsga(hxytcp));
9606 #endif /* SOL_SOCKET */
9607 #endif /* NOTCPOPTS */
9608
9609 #ifdef ANYX25
9610 case XYX25:
9611     return(hmsga(hxyx25));
9612
9613 #ifndef IBMX25
9614 case XYPAD:
9615     return(hmsg("Syntax: SET PAD name value\n\
9616 Set a PAD X.3 parameter with a desired value."));
9617 #endif /* IBMX25 */
9618 #endif /* ANYX25 */
9619 #endif /* NETCONN */
9620
9621 #ifndef NOSPL
9622 case XYOUTP:
9623     return(hmsga(hxyout));
9624 #endif /* NOSPL */
9625
9626 #ifndef NOSETKEY
9627 case XYKEY:                             /* SET KEY */
9628     return(hmsga(hmhskey));
9629 #endif /* NOSETKEY */
9630
9631 #ifndef NOCSETS
9632 case XYLANG:
9633     return(hmsg("Syntax: SET LANGUAGE name\n\
9634   Selects language-specific translation rules for text-mode file transfers.\n\
9635   Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one\n\
9636   of these is ASCII."));
9637 #endif /* NOCSETS */
9638
9639 case XYLINE:
9640     printf("\nSyntax: SET LINE (or SET PORT) [ switches ] [ devicename ]\n\
9641   Selects a serial-port device to use for making connections.\n");
9642 #ifdef OS2
9643 #ifdef NT
9644     printf("\n");
9645     printf(
9646 "  You may access communication ports by the traditional \"DOS\" port name\n");
9647     printf(
9648 "  (e.g. SET PORT COM1) or by the Microsoft Telephony modem name from the\n");
9649     printf(
9650 "  Modems folder of the Control Panel (e.g. SET PORT TAPI). If one method\n");
9651     printf("  doesn't work, try the other.\n\n");
9652 #endif /* NT */
9653 #else  /* OS2 */
9654     printf("  Typical device name for this platform: %s.\n",ttgtpn());
9655     printf("  The default device name is %s (i.e. none).\n",dftty);
9656     if (!dfloc) {
9657         printf(
9658 "  If you do not give a SET LINE command or if you give a SET LINE command\n");
9659         printf(
9660 "  with no device name, or if you specify %s as the device name,\n",dftty);
9661         printf(
9662 "  Kermit will be in \"remote mode\", suitable for use on the far end of a\n");
9663         printf(
9664 "  connection, e.g. as the file-transfer partner of your desktop communication\
9665 \n");
9666         printf(
9667 "  software.  If you SET LINE to a specific device other than %s,\n", dftty);
9668         printf(
9669 "  Kermit is in \"local mode\", suitable for making a connection to another\n"
9670               );
9671         printf(
9672 "  computer.  SET LINE alone resets Kermit to remote mode.\n");
9673     }
9674 #endif /* OS2 */
9675         printf(
9676 "  To use a modem to dial out, first SET MODEM TYPE (e.g., to USR), then\n");
9677     printf(
9678 #ifdef OS2
9679 "  SET PORT COMx (or SET PORT TAPI), SET SPEED, then give a DIAL command.\n");
9680 #else
9681 "  SET LINE xxx, then SET SPEED, then give a DIAL command.\n");
9682 #endif /* OS2 */
9683     printf(
9684 #ifdef OS2
9685 "  For direct null-modem connections use SET MODEM TYPE NONE, SET PORT COMx,\n"
9686 #else
9687 "  For direct null-modem connections, use SET MODEM TYPE NONE, SET LINE xxx,\n"
9688 #endif /* OS2 */
9689     );
9690     printf(
9691 "  then SET FLOW, SET SPEED, and CONNECT.\n");
9692     printf(
9693 "\nOptional switches:\n\
9694   /CONNECT - Enter CONNECT mode automatically if SET LINE succeeds.\n");
9695     printf(
9696 "  /SERVER  - Enter server mode automatically if SET LINE succeeds.\n");
9697 #ifdef VMS
9698     printf(
9699 "  /SHARE   - Open the device in shared mode.\n");
9700     printf(
9701 "  /NOSHARE - Open the device in exclusive mode.\n");
9702 #endif /* VMS */
9703     printf("\n");
9704     printf(
9705 "Also see HELP SET MODEM, HELP SET DIAL, HELP SET SPEED, HELP SET FLOW.\n");
9706     return(0);
9707
9708 #ifndef NOSPL
9709 case XYMACR:
9710     return(hmsga(hxymacr));
9711 #endif /* NOSPL */
9712
9713 #ifndef NODIAL
9714 case XYMODM:
9715     return(hmsga(hxymodm));
9716 #endif /* NODIAL */
9717
9718 case XYPARI:
9719     return(hmsga(hxypari));
9720
9721 case XYPROM:
9722     return(hmsga(hmxyprm));
9723
9724 case XYQUIE:
9725     return(hmsg("Syntax: SET QUIET {ON, OFF}\n\
9726   Normally OFF.  ON disables most information messages during interactive\n\
9727   operation."));
9728
9729 #ifdef CK_SPEED
9730 case XYQCTL:
9731     return(hmsga(hmxyqctl));
9732 #endif /* CK_SPEED */
9733
9734 case XYRETR:
9735     return(hmsg("Syntax: SET RETRY number\n\
9736   In Kermit protocol file transfers: How many times to retransmit a\n\
9737   particular packet before giving up; 0 = no limit."));
9738
9739 #ifndef NOLOCAL
9740 case XYSESS:
9741 #ifdef UNIX
9742     return(hmsg(
9743 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9744   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9745   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
9746   also includes Telnet negotiations on TCP/IP connections."));
9747 #else
9748 #ifdef datageneral
9749     return(hmsg(
9750 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9751   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9752   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
9753   also includes Telnet negotiations on TCP/IP connections."));
9754 #else
9755 #ifdef STRATUS
9756     return(hmsg(
9757 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9758   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9759   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
9760   also includes Telnet negotiations on TCP/IP connections."));
9761 #else
9762 #ifdef AMIGA
9763     return(hmsg(
9764 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9765   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9766   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
9767   also includes Telnet negotiations on TCP/IP connections."));
9768 #else
9769 #ifdef GEMDOS
9770     return(hmsg(
9771 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9772   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9773   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
9774   also includes Telnet negotiations on TCP/IP connections."));
9775 #else
9776 #ifdef OS2
9777     return(hmsg(
9778 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9779   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9780   out NUL and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
9781   also includes Telnet negotiations on TCP/IP connections."));
9782 #else
9783 #ifdef VMS
9784     return(hmsg(
9785 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9786   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9787   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
9788   also includes Telnet negotiations on TCP/IP connections."));
9789 #else
9790 #ifdef OSK
9791     return(hmsg(
9792 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9793   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9794   out LF, NUL and XON/XOFF characters."));
9795 #else
9796 #ifdef MAC
9797     return(hmsg(
9798 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
9799   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
9800   out LF, NUL and XON/XOFF characters."));
9801 #endif /* MAC */
9802 #endif /* OSK */
9803 #endif /* OS2 */
9804 #endif /* VMS */
9805 #endif /* GEMDOS */
9806 #endif /* AMIGA */
9807 #endif /* STRATUS */
9808 #endif /* datageneral */
9809 #endif /* OS2ORUNIX */
9810
9811 case XYSPEE:
9812 #ifdef OS2
9813
9814     return(hmsg("Syntax: SET SPEED number\n\
9815   Speed for serial-port communication device specified in most recent\n\
9816   SET PORT command, in bits per second.  Type SET SPEED ? for a list of\n\
9817   possible speeds."));
9818 #else
9819     return(hmsg("Syntax: SET SPEED number\n\
9820   Speed for serial-port communication device specified in most recent\n\
9821   SET LINE command, in bits per second.  Type SET SPEED ? for a list of\n\
9822   possible speeds.  Has no effect on job's controlling terminal."));
9823 #endif /* OS2 */
9824 #endif /* NOLOCAL */
9825
9826 #ifndef NOXFER
9827 case XYRECV:
9828     return(hmsga(hxyrcv));
9829 case XYSEND:
9830     return(hmsga(hxysnd));
9831 case XYREPT:
9832     return(hmsga(hxyrpt));
9833 #endif /* NOXFER */
9834
9835 #ifndef NOSERVER
9836 case XYSERV:
9837     return(hmsga(hsetsrv));
9838 #endif /* NOSERVER */
9839
9840 #ifdef TNCODE
9841 case XYTEL:
9842     return(hmsga(hxytel));
9843
9844 case XYTELOP:
9845     return(hmsga(hxytopt));
9846 #endif /* TNCODE */
9847
9848 #ifndef NOXMIT
9849 case XYXMIT:
9850     return(hmsga(hsetxmit));
9851 #endif /* NOXMIT */
9852
9853 #ifndef NOCSETS
9854 case XYUNCS:
9855     return(hmsg("Syntax: SET UNKNOWN-CHAR-SET action\n\
9856   DISCARD (default) means reject any arriving files encoded in unknown\n\
9857   character sets.  KEEP means to accept them anyway."));
9858 #endif /* NOCSETS */
9859
9860 #ifdef UNIX
9861 case XYWILD:
9862     return(hmsga(hxywild));
9863 #endif /* UNIX */
9864
9865 #ifndef NOXFER
9866 case XYWIND:
9867     return(hmsga(hxywind));
9868 case XYXFER:
9869     return(hmsga(hxyxfer));
9870 #endif /* NOXFER */
9871
9872 #ifndef NOLOCAL
9873 #ifdef OS2MOUSE
9874 case XYMOUSE:
9875     return(hmsga(hxymouse));
9876 #endif /* OS2MOUSE */
9877 #endif /* NOLOCAL */
9878
9879 case XYALRM:
9880     return(hmsg("Syntax: SET ALARM [ { seconds, hh:mm:ss } ]\n\
9881   Number of seconds from now, or time of day, after which IF ALARM\n\
9882   will succeed.  0, or no time at all, means no alarm."));
9883
9884 case XYPROTO:
9885     return(hmsga(hxyxyz));
9886
9887 #ifdef CK_SPEED
9888 case XYPREFIX:
9889     return(hmsg("Syntax: SET PREFIXING { ALL, CAUTIOUS, MINIMAL }\n\
9890   \
9891 Selects the degree of control-character prefixing.  Also see HELP SET CONTROL."
9892 ));
9893 #endif /* CK_SPEED */
9894
9895 #ifdef OS2
9896 case XYLOGIN:
9897     return(hmsg("Syntax: SET LOGIN { USERID, PASSWORD, PROMPT } <text>\n\
9898   Provides access information for use by login scripts."));
9899 #endif /* OS2 */
9900
9901 #ifndef NOSPL
9902 case XYTMPDIR:
9903     return(hmsg("Syntax: SET TEMP-DIRECTORY [ <directory-name> ]\n\
9904   Overrides automatic assignment of \\v(tmpdir) variable."));
9905 #endif /* NOSPL */
9906
9907 #ifdef OS2
9908 case XYTITLE:
9909     return(hmsg("Syntax: SET TITLE <text>\n\
9910   Sets window title to text instead of using current host/port name."));
9911 #endif /* OS2 */
9912
9913 #ifndef NOPUSH
9914 #ifndef NOFRILLS
9915 case XYEDIT:
9916     return(hmsg("Syntax: SET EDITOR pathname [ options ]\n\
9917   Specifies the name of your preferred editor, plus any command-line\n\
9918   options.  SHOW EDITOR displays it."));
9919 #endif /* NOFRILLS */
9920 #endif /* NOPUSH */
9921
9922 #ifdef BROWSER
9923 case XYBROWSE:
9924 #ifdef NT
9925     return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
9926   Specifies the name of your preferred browser plus any command-line\n\
9927   options.  SHOW BROWSER displays it.  Omit pathname and options to use\n\
9928   ShellExecute."));
9929 #else
9930     return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
9931   Specifies the name of your preferred browser plus any command-line\n\
9932   options.  SHOW BROWSER displays it."));
9933 #endif /* NT */
9934 #endif /* BROWSER */
9935
9936 #ifdef CK_TAPI
9937 case XYTAPI:
9938     return(hmsga(hxytapi));
9939 #endif /* CK_TAPI */
9940
9941 #ifdef NT
9942 case XYWIN95:
9943     return(hmsga(hxywin95));
9944 #endif /* NT */
9945
9946 #ifndef NOSPL
9947 case XYFUNC:
9948     return(hmsga(hxyfunc));
9949 #endif /* NOSPL */
9950
9951 #ifdef CK_AUTHENTICATION
9952 case XYAUTH:
9953     return(hmsga(hmxyauth));
9954 #else /* CK_AUTHENTICATION */
9955 #ifdef CK_SSL
9956 case XYAUTH:
9957     return(hmsga(hmxyauth));
9958 #endif /* CK_SSL */
9959 #endif /* CK_AUTHENTICATION */
9960
9961 #ifdef BROWSER
9962 case XYFTP:
9963     return(hmsg("Syntax: SET FTP [ pathname [ options ] ]\n\
9964   Specifies the name of your ftp client, plus any command-line options.\n\
9965   SHOW FTP displays it."));
9966 #endif /* BROWSER */
9967
9968 case XYSLEEP:
9969     return(hmsg("Syntax: SET SLEEP CANCELLATION { ON, OFF }\n\
9970   Tells whether SLEEP (PAUSE) or WAIT commands can be interrupted from the\n\
9971   keyboard; ON by default."));
9972
9973 case XYCD:
9974     return(hmsga(hmxycd));
9975
9976 case XYSERIAL:
9977     return(hmsg("Syntax: SET SERIAL dps\n\
9978   d is data length in bits, 7 or 8; p is first letter of parity; s is stop\n\
9979   bits, 1 or 2.  Examples: \"set serial 7e1\", \"set serial 8n1\"."));
9980
9981 #ifdef HWPARITY
9982 case XYSTOP:
9983     return(hmsg("Syntax: SET STOP-BITS { 1, 2 }\n\
9984   Number of stop bits to use on SET LINE connections, normally 1."));
9985 #endif /* HWPARITY */
9986
9987 #ifndef NOLOCAL
9988 case XYDISC:
9989     return(hmsg("Syntax: SET DISCONNECT { ON, OFF }\n\
9990   Whether to close and release a SET LINE device automatically upon\n\
9991   disconnection; OFF = keep device open (default); ON = close and release."));
9992 #endif /* NOLOCAL */
9993
9994 #ifdef STREAMING
9995 case XYSTREAM:
9996     return(hmsg("Syntax: SET STREAMING { ON, OFF, AUTO }\n\
9997   Tells Kermit whether streaming protocol can be used during Kermit file\n\
9998   transfers.  Default is AUTO, meaning use it if connection is reliable."));
9999 #endif /* STREAMING */
10000
10001 case XYRELY:
10002     return(hmsg("Syntax: SET RELIABLE { ON, OFF, AUTO }\n\
10003   Tells Kermit whether its connection is reliable.  Default is AUTO,\n\
10004   meaning Kermit should figure it out for itself."));
10005
10006 case XYCLEAR:
10007     return(hmsg("Syntax: SET CLEAR-CHANNEL { ON, OFF, AUTO }\n\
10008   Tells Kermit whether its connection is transparent to all 8-bit bytes.\n\
10009   Default is AUTO, meaning Kermit figures it out from the connection type.\n\
10010   When both sender and receiver agree channel is clear, SET PREFIXING NONE\n\
10011   is used automatically."));
10012
10013 #ifdef TLOG
10014 case XYTLOG:
10015     return(hmsg("Syntax: SET TRANSACTION-LOG { BRIEF, FTP, VERBOSE }\n\
10016   Selects the transaction-log format; BRIEF and FTP have one line per file;\n\
10017   FTP is compatible with FTP log.  VERBOSE (the default) has more info."));
10018 #endif /* TLOG */
10019
10020 case XYOPTS:
10021     return(hmsg("Syntax: SET OPTIONS command [ switches... ]\n\
10022   For use with commands that have switches; sets the default switches for\n\
10023   the given command.  Type SET OPTIONS ? for a list of amenable commands."));
10024
10025 #ifndef NOSPL
10026 case XYTIMER:
10027     return(hmsga(hmxytimer));
10028 #endif /* NOSPL */
10029
10030 #ifdef CKROOT
10031   case XYROOT:
10032     return(hmsga(hmxxchroot));
10033 #endif /* XYROOT */
10034
10035 #ifdef ANYSSH
10036   case XYSSH:
10037     return(hmsga(hmxyssh));
10038 #endif /* ANYCMD */
10039
10040 #ifdef LOCUS
10041   case XYLOCUS:
10042     return(hmsga(hmxylocus));
10043 #endif /* LOCUS */
10044
10045 #ifdef OS2
10046 #ifdef KUI
10047   case XYGUI:
10048     return(hmsga(hmxygui));
10049 #endif /* KUI */
10050 #endif /* OS2 */
10051
10052   case XYMATCH:
10053     return(hmsga(hmxymatch));
10054
10055 default:
10056     printf("Not available - \"%s\"\n",cmdbuf);
10057     return(0);
10058     }
10059 }
10060
10061 #ifndef NOSPL
10062 /*  D O H F U N C  --  Give help for a function  */
10063
10064 int
10065 dohfunc(xx) int xx; {
10066     /* int x; */
10067     if (xx == -3) {
10068         printf("\n Type SHOW FUNCTIONS to see a list of available functions.\n"
10069                );
10070         printf(
10071         " Type HELP FUNCTION <name> for help on a particular function.\n");
10072         printf(
10073         " For function settings use HELP SET FUNCTION and SHOW SCRIPTS.\n\n");
10074         return(0);
10075     }
10076     if (xx == FN_WORD)                  /* Long help message */
10077         return(hmsga(hmfword));
10078
10079     printf("\n");
10080     switch (xx) {
10081       case FN_IND:                      /* Index (of string 1 in string 2) */
10082       case FN_RIX:                      /* Rindex (index from right) */
10083         printf("\\f%sindex(s1,s2,n1)\n\
10084   s1 = string to look for.\n\
10085   s2 = string to look in.\n\
10086   n1 = optional 1-based starting position, default = 1.\n",
10087                xx == FN_RIX ? "r" : ""
10088                );
10089         printf("Returns integer:\n\
10090   1-based position of %smost occurrence of s1 in s2, ignoring the %smost\n\
10091   (n1-1) characters in s2; returns 0 if s1 not found in s2.\n",
10092                xx == FN_IND ? "left" : "right",
10093                xx == FN_IND ? "left" : "right"
10094         );
10095         break;
10096       case FN_SEARCH:                   /* Search for pattern */
10097       case FN_RSEARCH:                  /* Search for pattern from right */
10098         printf("\\f%ssearch(s1,s2,n1)\n\
10099   s1 = pattern to look for.\n\
10100   s2 = string to look in.\n\
10101   n1 = optional 1-based offset, default = 1.\n",
10102                xx == FN_RSEARCH ? "r" : ""
10103                );
10104         printf("Returns integer:\n\
10105   1-based position of %smost match for s1 in s2, ignoring the %smost\n\
10106   (n1-1) characters in s2; returns 0 if no match.\n",
10107                xx == FN_SEARCH ? "left" : "right",
10108                xx == FN_SEARCH ? "left" : "right"
10109         );
10110         printf("  See HELP WILDCARDS for info about patterns.\n");
10111         break;
10112       case FN_LEN:                      /* Length (of string) */
10113         printf("\\flength(s1)\n\
10114   s1 = string.\n");
10115         printf("Returns integer:\n\
10116   Length of string s1.\n");
10117         break;
10118       case FN_LIT:                      /* Literal (don't expand the string) */
10119         printf("\\fliteral(s1)\n\
10120   s1 = string.\n");
10121         printf("Returns string:\n\
10122   s1 literally without evaluation.\n");
10123         break;
10124       case FN_LOW:                      /* Lower (convert to lowercase) */
10125         printf("\\flower(s1)\n\
10126   s1 = string.\n");
10127         printf("Returns string:\n\
10128   s1 with uppercase letters converted to lowercase.\n");
10129         break;
10130       case FN_MAX:                      /* Max (maximum) */
10131         printf("\\fmaximum(n1,n2)\n\
10132   n1 = integer.\n\
10133   n2 = integer.\n");
10134         printf("Returns integer:\n\
10135   The greater of n1 and n2.\n");
10136         break;
10137       case FN_MIN:                      /* Min (minimum) */
10138         printf("\\fminimum(n1,n2)\n\
10139   n1 = integer.\n\
10140   n2 = integer.\n");
10141         printf("Returns integer:\n\
10142   The lesser of n1 and n2.\n");
10143         break;
10144       case FN_MOD:                      /* Mod (modulus) */
10145         printf("\\fmodulus(n1,n2)\n\
10146   n1 = integer.\n\
10147   n2 = integer.\n");
10148         printf("Returns integer:\n\
10149   The remainder after dividing n1 by n2.\n");
10150         break;
10151       case FN_EVA:                      /* Eval (evaluate arith expression) */
10152         printf("\\fevaluate(e)\n\
10153   e = arithmetic expression.\n");
10154         printf("Returns integer:\n\
10155   The result of evaluating the expression.\n");
10156         break;
10157       case FN_SUB:                      /* Substr (substring) */
10158         printf("\\fsubstring(s1,n1,n2)\n\
10159   s1 = string.\n\
10160   n1 = integer, 1-based starting position, default = 1.\n\
10161   n2 = integer, length, default = length(s1) - n1 + 1.\n");
10162         printf("Returns string:\n\
10163   Substring of s1 starting at n1, length n2.\n");
10164         break;
10165       case FN_UPP:                      /* Upper (convert to uppercase) */
10166         printf("\\fupper(s1)\n\
10167   s1 = string.\n");
10168         printf("Returns string:\n\
10169   s1 with lowercase letters converted to uppercase.\n");
10170         break;
10171       case FN_REV:                      /* Reverse (a string) */
10172         printf("\\freverse(s1)\n\
10173   s1 = string.\n");
10174         printf("Returns string:\n\
10175   s1 with its characters in reverse order.\n");
10176         break;
10177       case FN_REP:                      /* Repeat (a string) */
10178         printf("\\frepeat(s1,n1)\n\
10179   s1 = string.\n\
10180   n1 = integer.\n");
10181         printf("Returns string:\n\
10182   s1 repeated n1 times.\n");
10183         break;
10184       case FN_EXE:                      /* Execute (a macro) */
10185         printf("\\fexecute(m1,a1,a2,a3,...)\n\
10186   m1 = macro name.\n\
10187   a1 = argument 1.\n\
10188   a2 = argument 2, etc\n");
10189         printf("Returns string:\n\
10190   The return value of the macro (HELP RETURN for further info).\n");
10191         break;
10192       case FN_LPA:                      /* LPAD (left pad) */
10193       case FN_RPA:                      /* RPAD (right pad) */
10194         printf("\\f%cpad(s1,n1,c1)\n\
10195   s1 = string.\n\
10196   n1 = integer.\n\
10197   c1 = character, default = space.\n",
10198                 xx == FN_LPA ? 'l' : 'r');
10199         printf("Returns string:\n\
10200   s1 %s-padded with character c1 to length n1.\n",
10201                xx == FN_LPA ? "left" : "right");
10202         break;
10203       case FN_DEF:                      /* Definition of a macro, unexpanded */
10204         printf("\\fdefinition(m1)\n\
10205   m1 = macro name.\n");
10206         printf("Returns string:\n\
10207   Literal definition of macro m1.\n");
10208         break;
10209       case FN_CON:                      /* Contents of a variable, ditto */
10210         printf("\\fcontents(v1)\n\
10211   v1 = variable name such as \\%%a.\n");
10212         printf("Returns string:\n\
10213   Literal definition of variable v1, evaluated one level only.\n");
10214         break;
10215       case FN_FIL:                      /* Next file */
10216         printf("\\fnextfile()\n");
10217         printf("Returns string:\n\
10218   Name of next file from list created by most recent \\f[r]files() or\n\
10219   \\f[r]dir()invocation, or an empty string if there are no more files in\n\
10220   the list.\n");
10221         break;
10222       case FN_FC:                       /* File count */
10223         printf("\\ffiles(f1[,&a]) - File list.\n\
10224   f1 = file specification, possibly containing wildcards.\n\
10225   &a = optional name of array to assign file list to.\n");
10226         printf("Returns integer:\n\
10227   The number of regular files that match f1.  Use with \\fnextfile().\n");
10228         break;
10229       case FN_CHR:                      /* Character (like BASIC CHR$()) */
10230         printf("\\fcharacter(n1)\n\
10231   n1 = integer.\n");
10232         printf("Returns character:\n\
10233   The character whose numeric code is n1.\n");
10234         break;
10235       case FN_RIG:                      /* Right (like BASIC RIGHT$()) */
10236         printf("\\fright(s1,n1)\n\
10237   s1 = string.\n\
10238   n1 = integer, default = length(s1).\n");
10239         printf("Returns string:\n\
10240   The rightmost n1 characters of string s1.\n");
10241         break;
10242       case FN_LEF:                      /* Left (like BASIC LEFT$()) */
10243         printf("\\fleft(s1,n1)\n\
10244   s1 = string.\n\
10245   n1 = integer, default = length(s1).\n");
10246         printf("Returns string:\n\
10247   The leftmost n1 characters of string s1.\n");
10248         break;
10249       case FN_COD:                      /* Code value of character */
10250         printf("\\fcode(s1)\n\
10251   c1 = character.\n");
10252         printf("Returns integer:\n\
10253   The numeric code of the first character in string s1, or 0 if s1 empty.\n");
10254         break;
10255       case FN_RPL:                      /* Replace */
10256         printf("\\freplace(s1,s2,s3[,n1])\n\
10257   s1 = original string.\n\
10258   s2 = match string.\n\
10259   s3 = replacement string.\n\
10260   n1 = occurrence.\n");
10261         printf("Returns string:\n\
10262   s1 with occurrence number n1 of s2 replaced by s3.\n\
10263   If n1 = 0 or omitted, all occurrences are replaced.\n\
10264   If n1 < 0, occurrences are counted from the right.\n");
10265         break;
10266
10267       case FN_FD:                       /* File date */
10268         printf("\\fdate(f1)\n\
10269   f1 = filename.\n");
10270 #ifdef VMS
10271         printf("Returns string:\n\
10272   Creation date of file f1, format: yyyymmdd hh:mm:ss.\n");
10273 #else
10274         printf("Returns string:\n\
10275   Modification date of file f1, format: yyyymmdd hh:mm:ss.\n");
10276 #endif /* VMS */
10277         break;
10278       case FN_FS:                       /* File size */
10279         printf("\\fsize(f1)\n\
10280   f1 = filename.\n");
10281         printf("Returns integer:\n\
10282   Size of file f1.\n");
10283         break;
10284       case FN_VER:                      /* Verify */
10285         printf("\\fverify(s1,s2,n1)\n\
10286   s1 = string of characters to look for.\n\
10287   s2 = string to look in.\n\
10288   n1 = starting position in s2.\n");
10289         printf("Returns integer:\n\
10290   1-based position of first character in s2 that is not also in s1,\n\
10291   or -1 if s1 is empty, or 0 if all characters in s2 are also in s1.\n");
10292         break;
10293       case FN_IPA:                      /* Find and return IP address */
10294         printf("\\fipaddress(s1,n1)\n\
10295   s1 = string.\n\
10296   n1 = 1-based integer starting position, default = 1.\n");
10297         printf("Returns string:\n\
10298   First IP address in s1, scanning from left starting at position n1.\n");
10299         break;
10300       case FN_HEX:                      /* Hexify */
10301         printf("\\fhexify(s1)\n\
10302   s1 = string.\n");
10303         printf("Returns string:\n\
10304   The hexadecimal representation of s1.  Also see \\fn2hex().\n");
10305         break;
10306       case FN_UNH:                      /* Unhexify */
10307         printf("\\funhexify(h1)\n\
10308   h1 = Hexadecimal string.\n");
10309         printf("Returns string:\n\
10310   The result of unhexifying s1, or nothing if s1 is not a hex string.\n");
10311         break;
10312       case FN_UNTAB:                    /* Untabify */
10313         printf("\\funtabify(s1)\n\
10314   s1 = string.\n");
10315         printf("Returns string:\n\
10316   The result of converting tabs in s1 to spaces assuming tab stops every\n\
10317   8 spaces.\n");
10318         break;
10319       case FN_BRK:                      /* Break */
10320       case FN_SPN:                      /* Span */
10321         printf("\\f%s(s1,s2,n1)\n\
10322   s1 = string to look in.\n\
10323   s2 = string of characters to look for.\n\
10324   n1 = 1-based integer starting position, default = 1.\n",
10325               xx == FN_BRK ? "break" : "span"
10326               );
10327         printf("Returns string:\n\
10328   s1 up to the first occurrence of any character%salso in s2,\n\
10329   scanning from the left starting at position n1.\n",
10330                xx == FN_SPN ? " not " : " ");
10331         break;
10332       case FN_TRM:                      /* Trim */
10333       case FN_LTR:                      /* Left-Trim */
10334         printf("\\f%s(s1,s2)\n\
10335   s1 = string to look in.\n\
10336   s2 = string of characters to look for, default = blanks and tabs.\n",
10337                xx == FN_TRM ? "trim" : "ltrim");
10338         printf("Returns string:\n\
10339   s1 with all characters that are also in s2 trimmed from the %s.\n.",
10340                xx == FN_TRM ? "right" : "left");
10341         break;
10342       case FN_CAP:                      /* Capitalize */
10343         printf("\\fcapitalize(s1)\n\
10344   s1 = string.\n");
10345         printf("Returns string:\n\
10346   s1 with its first letter converted to uppercase and the remaining\n\
10347   letters to lowercase.\n");
10348         printf("Synonym: \\fcaps(s1)\n");
10349         break;
10350       case FN_TOD:                      /* Time-of-day-to-secs-since-midnite */
10351         printf("\\ftod2secs(s1)\n\
10352   s1 = time-of-day string, hh:mm:ss, 24-hour format.\n");
10353         printf("Returns number:\n\
10354   Seconds since midnight.\n");
10355         break;
10356       case FN_FFN:                      /* Full file name */
10357         printf("\\fpathname(f1)\n\
10358   f1 = filename, possibly wild.\n");
10359         printf("Returns string:\n\
10360   Full pathname of f1.\n");
10361         break;
10362       case FN_CHK:                      /* Checksum of text */
10363         printf("\\fchecksum(s1)\n\
10364   s1 = string.\n");
10365         printf("Returns integer:\n\
10366   16-bit checksum of string s1.\n");
10367         break;
10368       case FN_CRC:                      /* CRC-16 of text */
10369         printf("\\fcrc16(s1)\n\
10370   s1 = string.\n");
10371         printf("Returns integer:\n\
10372   16-bit cyclic redundancy check of string s1.\n");
10373         break;
10374       case FN_BSN:                      /* Basename of file */
10375         printf("\\fbasename(f1)\n\
10376   f1 = filename, possibly wild.\n");
10377         printf("Returns string:\n\
10378   Filename f1 stripped of all device and directory information.\n");
10379         break;
10380       case FN_CMD:                      /* Output of a command (cooked) */
10381         printf("\\fcommand(s1)\n\
10382   s1 = string\n");
10383         printf("Returns string:\n\
10384   Output of system command s1, if any, with final line terminator stripped.\n"
10385                );
10386         break;
10387       case FN_RAW:                      /* Output of a command (raw) */
10388         printf("\\frawcommand(s1)\n\
10389   s1 = string\n");
10390         printf("Returns string:\n\
10391   Output of system command s1, if any.\n");
10392         break;
10393       case FN_STX:                      /* Strip from right */
10394         printf("\\fstripx(s1,c1)\n\
10395   s1 = string to look in.\n\
10396   c1 = character to look for, default = \".\".\n");
10397         printf("Returns string:\n\
10398   s1 up to the rightmost occurrence of character c1.\n"
10399         );
10400         break;
10401
10402       case FN_STL:                      /* Strip from left */
10403         printf("\\flop(s1,c1)\n\
10404   s1 = string to look in.\n\
10405   c1 = character to look for, default = \".\".\n");
10406         printf("Returns string:\n\
10407   The part of s1 after the leftmost occurrence of character c1.\n"
10408         );
10409         break;
10410
10411       case FN_STN:                      /* Strip n chars */
10412         printf("\\fstripn(s1,n1)\n\
10413   s1 = string to look in.\n\
10414   n1 = integer, default = 0.\n");
10415         printf("Returns string:\n\
10416   s1 with n1 characters removed from the right.\n"
10417         );
10418         break;
10419
10420       case FN_STB:                      /* Strip enclosing brackets */
10421         printf("\\fstripb(s1[,c1[,c2]])\n\
10422   s1 = original string.\n\
10423   c1 = optional first character\n");
10424         printf("\
10425   c2 = optional final character.\n");
10426         printf("Returns string:\n\
10427   s1 with the indicated enclosing characters removed.  If c1 and c2 not\n\
10428      specified, any matching brackets, braces, parentheses, or quotes are\n");
10429         printf("\
10430      assumed.  If c1 is given but not c2, the appropriate c2 is assumed.\n\
10431      if both c1 and c2 are given, they are used as-is.\n"
10432                );
10433         printf(
10434 "Alternative format:\n\
10435   Include a grouping mask number in place of c1 and omit c2 to specify more\n\
10436   than one possibility at once; see \\fword() for details.\n"
10437                );
10438         break;
10439
10440 #ifdef OS2
10441       case FN_SCRN_CX:                  /* Screen Cursor X Pos */
10442         printf("\\fscrncurx()\n");
10443         printf("Returns integer:\n\
10444   The 0-based X coordinate (column) of the Terminal screen cursor.\n");
10445         break;
10446       case FN_SCRN_CY:                  /* Screen Cursor Y Pos */
10447         printf("\\fscrncury()\n");
10448         printf("Returns integer:\n\
10449   The 0-based Y coordinate (row) of the Terminal screen cursor.\n");
10450         break;
10451       case FN_SCRN_STR:                 /* Screen String */
10452         printf("\\fscrnstr(ny,nx,n1)\n\
10453   ny = integer.\n\
10454   nx = integer.\n\
10455   n1 = integer.\n");
10456         printf("Returns string:\n\
10457   The string at Terminal-screen coordinates (nx,ny), length n1,\n\
10458   blanks included.  Coordinates start at 0.  Default values are\n\
10459   0 for ny and nx, and line width for n1.\n");
10460         break;
10461 #endif /* OS2 */
10462
10463       case FN_2HEX:                     /* Num to hex */
10464         printf("\\fn2hex(n1) - Number to hex\n  n1 = integer.\n");
10465         printf("Returns string:\n  The hexadecimal representation of n1.\n");
10466         break;
10467
10468       case FN_2OCT:                     /* Num to hex */
10469         printf("\\fn2octal(n1) - Number to octal\n  n1 = integer.\n");
10470         printf("Returns string:\n  The octal representation of n1.\n");
10471         break;
10472
10473 #ifdef RECURSIVE
10474       case FN_DIR:                      /* Recursive directory count */
10475         printf("\\fdirectories(f1) - Directory list.\n\
10476   f1 = directory specification, possibly containing wildcards.\n\
10477   &a = optional name of array to assign directory list to.\n");
10478         printf("Returns integer:\n\
10479   The number of directories that match f1; use with \\fnextfile().\n");
10480         break;
10481
10482       case FN_RFIL:                     /* Recursive file count */
10483         printf("\\frfiles(f1[,&a]) - Recursive file list.\n\
10484   f1 = file specification, possibly containing wildcards.\n\
10485   &a = optional name of array to assign file list to.\n");
10486         printf("Returns integer:\n\
10487   The number of files whose names match f1 in the current or given\n\
10488   directory tree; use with \\fnextfile().\n");
10489         break;
10490
10491       case FN_RDIR:                     /* Recursive directory count */
10492         printf("\\frdirectories(f1) - Recursive directory list.\n\
10493   f1 = directory specification, possibly containing wildcards.\n\
10494   &a = optional name of array to assign directory list to.\n");
10495         printf("Returns integer:\n\
10496   The number of directories that match f1 in the current or given directory\n\
10497   tree.  Use with \\fnextfile().\n");
10498         break;
10499 #endif /* RECURSIVE */
10500
10501       case FN_DNAM:                     /* Directory part of a filename */
10502         printf("\\fdirname(f) - Directory part of a filename.\n\
10503   f = a file specification.\n");
10504         printf("Returns directory name:\n\
10505   The full name of the directory that the file is in, or if the file is a\n\
10506   directory, its full name.\n");
10507         break;
10508
10509 #ifndef NORANDOM
10510       case FN_RAND:                     /* Random number */
10511         printf("\\frandom(n) - Random number.\n\
10512   n = a positive integer.\n");
10513         printf("Returns integer:\n\
10514   A random number between 0 and n-1.\n");
10515         break;
10516 #endif /* NORANDOM */
10517
10518       case FN_SPLIT:                    /* Split */
10519         printf("\\fsplit(s1,&a,s2,s3,n2,n3) - \
10520 Assign string words to an array.\n\
10521   s1 = source string\n  &a = array designator\n  s2 = optional break set.\n");
10522         printf("  s3 = optional include set.\n");
10523         printf("  n2 = optional grouping mask.\n");
10524         printf("  n3 = optional separator flag.\n");
10525         printf("  s2, s3, n2, n3 are as in \\fword().\n");
10526         printf(
10527 "  All arguments are optional; if \\&a[] already exists, it is recycled;\n\
10528   if array not specified, the count is returned but no array is created.\n");
10529         printf("Returns integer:\n\
10530   Number of words in source string.\n");
10531         break;
10532
10533       case FN_DTIM:                     /* CVTDATE */
10534         printf("\\fcvtdate([date-time][,n1]) - Date/time conversion.\n");
10535         printf("  Converts date and/or time to standard format.\n");
10536         printf("  If no date/time given, returns current date/time.\n");
10537         printf("  [date-time], if given, is free-format date and/or time.\n");
10538         printf("  HELP DATE for info about date-time formats.\n");
10539         printf("Returns string:\n\
10540   Standard-format date and time: yyyymmdd hh:mm:ss (numeric)\n");
10541         printf("  If n1 is given:\n\
10542   n1 = 1: yyyy-mmm-dd hh:mm:ss (mmm = English 3-letter month abbreviation)\n\
10543   n1 = 2: dd-mmm-yyyy hh:mm:ss (ditto)\n\
10544   n1 = 3: yyyymmddhhmmss (all numeric)\n");
10545         break;
10546
10547       case FN_JDATE:                    /* DOY */
10548         printf("\\fdoy([date-time]) - Day of Year.\n");
10549         printf("  Converts date and/or time to day-of-year (DOY) format.\n");
10550         printf("  If no date/time given, returns current date.\n");
10551         printf("  [date-time], if given, is free-format date and/or time.\n");
10552         printf("  HELP DATE for info about date-time formats.\n");
10553         printf("Returns numeric string:\n\
10554   DOY: yyyyddd, where ddd is 1-based day number in year.\n");
10555         break;
10556
10557       case FN_PNCVT:
10558         printf("\\fdialconvert(phone-number) - Convert phone number.\n");
10559         printf("  Converts the given phone number for dialing according\n");
10560         printf(
10561 "  to the prevailing dialing rules -- country code, area code, etc.\n");
10562         printf("Returns string:\n\
10563   The dial string that would be used if the same phone number had been\n\
10564   given to the DIAL command.\n"
10565               );
10566         break;
10567
10568       case FN_DATEJ:                    /* DOY2DATE */
10569         printf("\\fdoy2date([doy[ time]]) - Day of Year to Date.\n");
10570         printf("  Converts yyyymmm to yyyymmdd\n");
10571         printf("  If time included, it is converted to 24-hour format.");
10572         printf(
10573             "Returns standard date or date-time string yyyymmdd hh:mm:ss\n");
10574         break;
10575
10576       case FN_MJD:
10577         printf("\\fmjd([[date][ time]]) - Modified Julian Date (MJD).\n");
10578         printf(
10579 "  Converts date and/or time to MJD, the number of days since 17 Nov 1858.\n");
10580         printf("  HELP DATE for info about date-time formats.\n");
10581         printf("Returns: integer.\n");
10582         break;
10583
10584       case FN_MJD2:
10585         printf("\\fmjd2date(mjd) - Modified Julian Date (MJD) to Date.\n");
10586         printf("  Converts MJD to standard-format date.\n");
10587         printf("Returns: yyyymmdd.\n");
10588         break;
10589
10590       case FN_DAY:
10591         printf("\\fday([[date][ time]]) - Day of Week.\n");
10592         printf("Returns day of week of given date as Mon, Tue, etc.\n");
10593         printf("HELP DATE for info about date-time formats.\n");
10594         break;
10595
10596       case FN_NDAY:
10597         printf("\\fnday([[date][ time]]) - Numeric Day of Week.\n");
10598         printf(
10599     "Returns numeric day of week of given date, 0=Sun, 1=Mon, ..., 6=Sat.\n");
10600         printf("HELP DATE for info about date-time formats.\n");
10601         break;
10602
10603       case FN_TIME:
10604         printf("\\ftime([[date][ time]]) - Time.\n");
10605         printf(
10606 "Returns time portion of given date and/or time in hh:mm:ss format.\n");
10607         printf("If no argument given, returns current time.\n");
10608         printf("HELP DATE for info about date-time formats.\n");
10609         break;
10610
10611       case FN_NTIM:
10612         printf("\\fntime([[date][ time]]) - Numeric Time.\n");
10613         printf(
10614 "Returns time portion of given date and/or time as seconds since midnight.\n");
10615         printf("If no argument given, returns current time.\n");
10616         printf("HELP DATE for info about date-time formats.\n");
10617         break;
10618
10619       case FN_N2TIM:
10620         printf("\\fn2time(seconds) - Numeric Time to Time.\n");
10621         printf(
10622 "Returns the given number of seconds in hh:mm:ss format.\n");
10623         break;
10624
10625       case FN_PERM:
10626         printf("\\fpermissions(file) - Permissions of File.\n");
10627         printf(
10628 #ifdef UNIX
10629 "Returns permissions of given file as they would be shown by \"ls -l\".\n"
10630 #else
10631 #ifdef VMS
10632 "Returns permissions of given file as they would be shown by \"dir /prot\".\n"
10633 #else
10634 "Returns the permissions of the given file.\n"
10635 #endif /* VMS */
10636 #endif /* UNIX */
10637                );
10638         break;
10639
10640       case FN_ALOOK:
10641         printf("\\farraylook(pattern,&a) - Lookup pattern in array.\n\
10642   pattern = String or pattern\n");
10643         printf("  &a = array designator, can include range specifier.\n");
10644         printf(
10645 "Returns number:\n\
10646   The index of the first matching array element or -1 if none.\n");
10647         printf("More info:\n\
10648   HELP PATTERN for pattern syntax.\n  HELP ARRAY for arrays.\n");
10649         break;
10650
10651       case FN_TLOOK:
10652         printf(
10653 "\\ftablelook(keyword,&a,[c]) - Lookup keyword in keyword table.\n\
10654   pattern = String\n");
10655         printf("  keyword = keyword to look up (can be abbreviated).\n");
10656         printf("  &a      = array designator, can include range specifier.\n");
10657         printf("            This array must be in alphabetical order.\n");
10658         printf("  c       = Optional field delimiter, colon(:) by default.\n");
10659         printf(
10660 "Returns number:\n\
10661   1 or greater, index of array element that uniquely matches given keyword;\n"
10662                );
10663         printf(
10664 "or -2 if keyword was ambiguous, or -1 if keyword empty or not found.\n"
10665                );
10666         printf("Also see:\n\
10667   HELP FUNC ARRAYLOOK for a similar function.\n  HELP ARRAY for arrays.\n");
10668         break;
10669
10670       case FN_ABS:                      /* Absolute */
10671         printf("\\fabsolute(n1)\n\
10672   n1 = integer.\n");
10673         printf("Returns integer:\n\
10674   The absolute (unsigned) value of n1.\n");
10675         break;
10676
10677 #ifdef FNFLOAT
10678       case FN_FPABS:
10679         printf("\\ffpabsolute(f1,d)\n\
10680   f1 = floating-point number or integer.\n\
10681    d = integer.\n");
10682         printf("Returns floating-point number:\n\
10683   The absolute (unsigned) value of f1 to d decimal places.\n");
10684         break;
10685
10686       case FN_FPADD:
10687         printf("\\ffpadd(f1,f2,d)\n\
10688   f1,f2 = floating-point numbers or integers.\n\
10689       d = integer.\n");
10690         printf("Returns floating-point number:\n\
10691   The sum of f1 and f2 to d decimal places.\n");
10692         break;
10693
10694       case FN_FPSUB:
10695         printf("\\ffpsubtract(f1,f2,d)\n\
10696   f1,f2 = floating-point numbers or integers.\n\
10697       d = integer.\n");
10698         printf("Returns floating-point number:\n\
10699   f1 minus f2 to d decimal places.\n");
10700         break;
10701
10702       case FN_FPMUL:
10703         printf("\\ffpmultiply(f1,f2,d)\n\
10704   f1,f2 = floating-point numbers or integers.\n\
10705       d = integer.\n");
10706         printf("Returns floating-point number:\n\
10707   The product of f1 and f2 to d decimal places.\n");
10708         break;
10709
10710       case FN_FPDIV:
10711         printf("\\ffpdivide(f1,f2,d)\n\
10712   f1,f2 = floating-point numbers or integers.\n\
10713       d = integer.\n");
10714         printf("Returns floating-point number:\n\
10715   f1 divided by f2 to d decimal places.\n");
10716         break;
10717
10718       case FN_FPMAX:
10719         printf("\\ffpmaximum(f1,f2,d)\n\
10720   f1,f2 = floating-point numbers or integers.\n\
10721       d = integer.\n");
10722         printf("Returns floating-point number:\n\
10723   The maximum of f1 and f2 to d decimal places.\n");
10724         break;
10725
10726       case FN_FPMIN:
10727         printf("\\ffpminimum(f1,f2,d)\n\
10728   f1,f2 = floating-point numbers or integers.\n\
10729       d = integer.\n");
10730         printf("Returns floating-point number:\n\
10731   The minimum of f1 and f2 to d decimal places.\n");
10732         break;
10733
10734       case FN_FPMOD:
10735         printf("\\ffpmodulus(f1,f2,d)\n\
10736   f1,f2 = floating-point numbers or integers.\n\
10737       d = integer.\n");
10738         printf("Returns floating-point number:\n\
10739   The modulus of f1 and f2 to d decimal places.\n");
10740         break;
10741
10742       case FN_FPPOW:
10743         printf("\\ffpraise(f1,f2,d)\n\
10744   f1,f2 = floating-point numbers or integers.\n\
10745       d = integer.\n");
10746         printf("Returns floating-point number:\n\
10747   f1 raised to the power f2, to d decimal places.\n");
10748         break;
10749
10750       case FN_FPCOS:
10751         printf("\\ffpcosine(f1,d)\n\
10752   f1 = floating-point number or integer.\n\
10753    d = integer.\n");
10754         printf("Returns floating-point number:\n\
10755   The cosine of angle f1 (in radians) to d decimal places.\n");
10756         break;
10757
10758       case FN_FPSIN:
10759         printf("\\ffpsine(f1,d)\n\
10760   f1 = floating-point number or integer.\n\
10761    d = integer.\n");
10762         printf("Returns floating-point number:\n\
10763   The sine of angle f1 (in radians) to d decimal places.\n");
10764         break;
10765
10766       case FN_FPTAN:
10767         printf("\\ffptangent(f1,d)\n\
10768   f1 = floating-point number or integer.\n\
10769    d = integer.\n");
10770         printf("Returns floating-point number:\n\
10771   The tangent of angle f1 (in radians) to d decimal places.\n");
10772         break;
10773
10774       case FN_FPEXP:
10775         printf("\\ffpexp(f1,d)\n\
10776   f1 = floating-point number or integer.\n\
10777    d = integer.\n");
10778         printf("Returns floating-point number:\n\
10779   e (the base of natural logarithms) raised to the f1 power,\n\
10780   to d decimal places.\n");
10781         break;
10782
10783       case FN_FPINT:
10784         printf("\\ffpint(f1)\n\
10785   f1 = floating-point number or integer.\n");
10786         printf("Returns integer:\n\
10787   The integer part of f1.\n");
10788         break;
10789
10790       case FN_FPLOG:
10791         printf("\\ffplog10(f1,d)\n\
10792   f1 = floating-point number or integer.\n\
10793    d = integer.\n");
10794         printf("Returns floating-point number:\n\
10795   The logarithm, base 10, of f1 to d decimal places.\n");
10796         break;
10797
10798       case FN_FPLN:
10799         printf("\\ffplogn(f1,d)\n\
10800   f1 = floating-point number or integer.\n\
10801    d = integer.\n");
10802         printf("Returns floating-point number:\n\
10803   The natural logarithm of f1 to d decimal places.\n");
10804         break;
10805
10806       case FN_FPROU:
10807         printf("\\ffpround(f1,d)\n\
10808   f1 = floating-point number or integer.\n\
10809    d = integer.\n");
10810         printf("Returns floating-point number:\n\
10811   f1 rounded to d decimal places.\n");
10812         break;
10813
10814       case FN_FPSQR:
10815         printf("\\ffpsqrt(f1,d)\n\
10816   f1 = floating-point number or integer.\n\
10817    d = integer.\n");
10818         printf("Returns floating-point number:\n\
10819   The square root of f1 to d decimal places.\n");
10820         break;
10821 #endif /* FNFLOAT */
10822
10823 #ifdef CKCHANNELIO
10824       case FN_FEOF:
10825         printf("\\f_eof(n1)\n\
10826   n1 = channel number.\n");
10827         printf("Returns number:\n\
10828   1 if channel n1 at end of file, 0 otherwise.\n");
10829         break;
10830       case FN_FPOS:
10831         printf("\\f_pos(n1)\n\
10832   n1 = channel number.\n");
10833         printf("Returns number:\n\
10834   Read/write pointer of channel n1 as byte number.\n");
10835         break;
10836       case FN_NLINE:
10837         printf("\\f_line(n1)\n\
10838   n1 = channel number.\n");
10839         printf("Returns number:\n\
10840   Read/write pointer of channel n1 as line number.\n");
10841         break;
10842       case FN_FILNO:
10843         printf("\\f_handle(n1)\n\
10844   n1 = channel number.\n");
10845         printf("Returns number:\n\
10846   File %s of open file on channel n1.\n",
10847 #ifdef OS2
10848                "handle"
10849 #else
10850                "descriptor"
10851 #endif /* OS2 */
10852                );
10853         break;
10854       case FN_FSTAT:
10855         printf("\\f_status(n1)\n\
10856   n1 = channel number.\n");
10857         printf("Returns number:\n\
10858   Sum of open modes of channel n1: 1 = read; 2 = write; 4 = append, or:\n\
10859   0 if not open.\n");
10860         break;
10861       case FN_FGCHAR:
10862         printf("\\f_getchar(n1)\n\
10863   n1 = channel number.\n");
10864         printf("  Reads a character from channel n1 and returns it.\n");
10865         break;
10866       case FN_FGLINE:
10867         printf("\\f_getline(n1)\n\
10868   n1 = channel number.\n");
10869         printf("  Reads a line from channel n1 and returns it.\n");
10870         break;
10871       case FN_FGBLK:
10872         printf("\\f_getblock(n1,n2)\n\
10873   n1 = channel number, n2 = size\n");
10874         printf(
10875 "  Reads a block of n2 characters from channel n1 and returns it.\n");
10876         break;
10877       case FN_FPCHAR:
10878         printf("\\f_putchar(n1,c)\n\
10879   n1 = channel number, c = character\n");
10880         printf("  Writes a character to channel n1.\n\
10881 Returns number:\n\
10882   1 if successful, otherwise a negative error code.\n");
10883         break;
10884       case FN_FPLINE:
10885         printf("\\f_putline(n1,s1)\n\
10886   n1 = channel number, s1 = string\n");
10887         printf(
10888 "  Writes the string s1 to channel n1 and adds a line terminator.\n\
10889 Returns number:\n");
10890         printf("  How many characters written if successful;\n\
10891   Otherwise a negative error code.\n"
10892                );
10893         break;
10894       case FN_FPBLK:
10895         printf("\\f_putblock(n1,s1)\n\
10896   n1 = channel number, s1 = string\n");
10897         printf(
10898 "  Writes the string s1 to channel n1.\n\
10899   Returns number:\n");
10900         printf("  How many characters written if successful;\n\
10901   Otherwise a negative error code.\n"
10902                );
10903         break;
10904       case FN_FERMSG:
10905         printf("\\f_errmsg([n1])\n\
10906   n1 = numeric error code, \\v(f_error) by default.\n");
10907         printf("  Returns the associated error message string.\n");
10908         break;
10909 #endif /* CKCHANNELIO */
10910
10911       case FN_AADUMP:
10912         printf("\\faaconvert(name,&a[,&b])\n\
10913   name = name of associative array, &a and &b = names of regular arrays.\n");
10914         printf(
10915 "  Converts the given associative array into two regular arrays, &a and &b,\n\
10916   containing the indices and values, respectively:\n");
10917         printf("Returns number:\n\
10918   How many elements were converted.\n");
10919         break;
10920
10921 #ifdef CK_KERBEROS
10922       case FN_KRB_TK:
10923         printf("\\fkrbtickets(n)\n\
10924   n = Kerberos version number (4 or 5).\n\
10925   Returns string:\n\
10926   The number of active Kerberos 4 or 5 tickets.\n\
10927   Resets the ticket list used by \\fkrbnextticket(n).\n");
10928         break;
10929
10930       case FN_KRB_NX:
10931         printf("\\fkrbnextticket(n)\n\
10932   n = Kerberos version number (4 or 5).\n\
10933   Returns string:\n\
10934     The next ticket in the Kerberos 4 or 5 ticket list that was set up by\n\
10935     the most recent invocation of \\fkrbtickets(n).\n");
10936         break;
10937
10938       case FN_KRB_IV:
10939         printf("\\fkrbisvalid(n,name)\n\
10940   n    = Kerberos version number (4 or 5).\n\
10941   name = a ticket name as returned by \\fkrbnextticket(n).\n\
10942   Returns number:\n\
10943     1 if the ticket is valid, 0 if not valid.\n\
10944     A ticket is valid if all the following conditions are true:\n\n");
10945         printf("\n\
10946     (i)   it exists in the current cache file;\n\
10947     (ii)  it is not expired;\n\
10948     (iii) it is not marked invalid (K5 only);\n\
10949     (iv)  it was issued from the current IP address\n");
10950         printf("\n  This value can be used in an IF statement, e.g.:\n\n");
10951         printf("    if \\fkrbisvalid(4,krbtgt.FOO.BAR.EDU@FOO.BAR.EDU) ...\n");
10952         break;
10953
10954       case FN_KRB_TT:
10955         printf("\\fkrbtimeleft(n,name)\n\
10956   n    = Kerberos version number (4 or 5).\n\
10957   name = a ticket name as returned by \\fkrbnextticket(n).\n\
10958   Returns string:\n\
10959     The number of seconds remaining in the ticket's lifetime.\n");
10960         break;
10961
10962       case FN_KRB_FG:
10963         printf("\\fkrbflags(n,name)\n\
10964   n    = Kerberos version number (4 or 5).\n\
10965   name = a ticket name as returned by \\fkrbnextticket(n).\n\
10966   Returns string:\n");
10967         printf(
10968 "    The flags string as reported with AUTH K5 LIST /FLAGS.  This string can\n\
10969     be searched for a particular flag using the \\findex() function when\n\
10970     SET CASE is ON (for case sensitive searches).  Flag strings are only\n\
10971     available for K5 tickets.\n");
10972         break;
10973 #endif /* CK_KERBEROS */
10974
10975       case FN_PATTERN:
10976         printf("\\fpattern(s)\n\
10977   s = string\n\
10978   Returns string: s with any variables, etc, evaluated in the normal manner.\n"
10979                );
10980         printf("\
10981   For use with INPUT, MINPUT, and REINPUT to declare that a search target is\n\
10982   a pattern rather than a literal string.\n");
10983         break;
10984
10985       case FN_HEX2N:
10986         printf("\\fhex2n(s)\n\
10987   s = hexadecimal number\n\
10988   Returns decimal equivalent.\n");
10989         break;
10990
10991       case FN_HEX2IP:
10992         printf("\\fhex2ip(s)\n\
10993   s = 8-digit hexadecimal number\n\
10994   Returns the equivalent decimal dotted IP address.\n");
10995         break;
10996
10997       case FN_IP2HEX:
10998         printf("\\fip2hex(s)\n\
10999   s = decimal dotted IP address\n\
11000   Returns the equivalent 8-digit hexadecimal number.\n");
11001         break;
11002
11003       case FN_OCT2N:
11004         printf("\\foct2n(s)\n\
11005   s = octal number\n\
11006   Returns decimal equivalent.\n");
11007         break;
11008
11009       case FN_RADIX:
11010         printf("\\fradix(s,n1,n2)\n\
11011   s = number in radix n1\n\
11012   Returns the number's representation in radix n2.\n");
11013         break;
11014
11015       case FN_JOIN:
11016         printf("\\fjoin(&a[,s[,n1[,n2]]])\n\
11017   &a = array designator, can include range specifier.\n\
11018   s  = optional separator.\n");
11019         printf("\
11020   n1 = nonzero to put grouping around elements that contain spaces;\n\
11021        see \\fword() grouping mask for values of n.\n");
11022         printf("\
11023   n2 = 0 or omitted to put spaces between elements; nonzero to omit them.\n");
11024         printf("\
11025   Returns the (selected) elements of the array joined to together,\n\
11026   separated by the separator.\n");
11027         break;
11028
11029       case FN_SUBST:
11030         printf("\\fsubstitute(s1,s2,s3)\n\
11031   s1 = Source string.\n\
11032   s2 = List of characters to be translated.\n\
11033   s3 = List of characters to translate them to.\n");
11034         printf(
11035 "  Returns: s1, with each character that is in s2 translated to the\n\
11036   corresponding character in s3.  s2 and s3 can contain ASCII ranges,\n\
11037   like [a-z].  Any characters in s2 that don't have corresponding\n\
11038   characters in s3 (after range expansion) are removed from the result.\n");
11039         break;
11040
11041 #ifndef NOSEXP
11042       case FN_SEXP:
11043         printf("\\fsexpression(s1)\n\
11044   s1 = S-Expression.\n");
11045         printf("  Returns: The result of evaluating s1.\n");
11046         break;
11047
11048 #endif /* NOSEXP */
11049
11050       case FN_CMDSTK:
11051         printf("\\fcmdstack(n1,n2)\n\
11052   n1 = Command-stack level, 0 to \\v(cmdlevel), default \\v(cmdlevel).\n\
11053   n2 = Function code, 0 or 1.\n");
11054         printf("Returns:\n");
11055         printf("  n2 = 0: name of object at stack level n1\n\
11056   n2 = 1: type of object at stack level n1:\n\
11057      0 = interactive prompt\n\
11058      1 = command file\n\
11059      2 = macro\n"
11060                );
11061           break;
11062
11063 #ifdef CKFLOAT
11064       case FN_DIFDATE:
11065         printf("\\fdiffdates(d1,d2)\n\
11066   d1 = free-format date and/or time (default = NOW).\n\
11067   d2 = ditto.\n");
11068         printf("Returns:\n");
11069         printf("  Difference expressed as delta time:\n");
11070         printf("  Negative if d2 is later than d1, otherwise positive.\n");
11071         break;
11072 #endif /* CKFLOAT */
11073
11074       case FN_CMPDATE:
11075         printf("\\fcmpdates(d1,d2)\n\
11076   d1 = free-format date and/or time (default = NOW).\n\
11077   d2 = ditto.\n");
11078         printf("Returns:\n");
11079         printf("  0 if d1 is equal to d2;\n\
11080   1 if d1 is later than d2;\n\
11081  -1 if d1 is earlier than d2.\n");
11082         break;
11083
11084       case FN_TOGMT:
11085         printf("\\futcdate(d1)\n\
11086   d1 = free-format date and/or time (default = NOW).\n");
11087         printf("Returns:\n");
11088         printf("  Date-time converted to UTC (GMT) yyyymmdd hh:mm:ss.\n");
11089         break;
11090
11091 #ifdef TCPSOCKET
11092       case FN_HSTADD:
11093         printf("\\faddr2name(s)\n\
11094   s = numeric IP address.\n");
11095         printf("Returns:\n");
11096         printf("  Corresponding IP hostname if found, otherwise null.\n");
11097         break;
11098       case FN_HSTNAM:
11099         printf("\\fname2addr(s)\n\
11100   s = IP host name.\n");
11101         printf("Returns:\n");
11102         printf("  Corresponding numeric IP address if found, else null.\n");
11103         break;
11104 #endif /* TCPSOCKET */
11105
11106       case FN_DELSEC:
11107         printf("\\fdelta2secs(dt)\n\
11108   dt = Delta time, e.g. +3d14:27:52.\n");
11109         printf("Returns:\n");
11110         printf("  The corresponding number of seconds.\n");
11111         break;
11112
11113       case FN_PC_DU:
11114         printf("\\fdos2unixpath(p)\n\
11115   p = string, DOS pathname.\n");
11116         printf("Returns:\n");
11117         printf("  The argument converted to a Unix pathname.\n");
11118         break;
11119
11120       case FN_PC_UD:
11121         printf("\\funix2dospath(p)\n\
11122   p = string, Unix pathname.\n");
11123         printf("Returns:\n");
11124         printf("  The argument converted to a DOS pathname.\n");
11125         break;
11126
11127 #ifdef FN_ERRMSG
11128       case FN_ERRMSG:
11129         printf("\\ferrstring(n)\n\
11130   n = platform-dependent numeric error code.\n");
11131         printf("Returns:\n");
11132         printf("  The corresponding error string.\n");
11133         break;
11134 #endif /* FN_ERRMSG */
11135
11136       case FN_KWVAL:
11137         printf("\\fkeywordvalue(s1,c1)\n\
11138   s1 = string of the form \"name=value\"\n\
11139   c1 = separator character (default separator is \"=\")\n");
11140         printf("    Assigns the value, if any, to the named macro.\n");
11141         printf("    If s1 contains no separator, nothing happens.\n");
11142         printf(
11143 "    If s1 contains a separator but no value, the macro is undefined.\n");
11144         printf("Returns:\n");
11145         printf("  0 on failure\n");
11146         printf("  1 on success\n");
11147         break;
11148
11149 #ifdef COMMENT
11150       case FN_SLEEP:
11151         printf("\\fsleep(n)\n\
11152   n = number of seconds\n");
11153         printf("    Pauses for the given number of seconds.\n");
11154         printf("Returns: the empty string.\n");
11155         break;
11156
11157       case FN_MSLEEP:
11158         printf("\\fmsleep(n)\n\
11159   n = number of milliseconds\n");
11160         printf("    Pauses for the given number of milliseconds.\n");
11161         printf("Returns: the empty string.\n");
11162         break;
11163 #endif /* COMMENT */
11164
11165 #ifdef NT
11166       case FN_SNAME:
11167         printf("\\fshortpathname(s)\n\
11168   s = file or directory name string\n");
11169         printf("    Returns the short path form of the given input.\n");
11170         break;
11171
11172       case FN_LNAME:
11173         printf("\\flongpathname(s)\n\
11174   s = file or directory name string\n");
11175         printf("    Returns the long path form of the given input.\n");
11176         break;
11177 #else
11178       case FN_SNAME:
11179         printf("\\fshortpathname(s)\n\
11180     Synonym for \fpathname()\n");
11181         break;
11182
11183       case FN_LNAME:
11184         printf("\\flongpathname(s)\n\
11185     Synonym for \fpathname()\n");
11186         break;
11187 #endif /* NT */
11188
11189       default:
11190         printf("Sorry, help not available for \"%s\"\n",cmdbuf);
11191     }
11192    printf("\n");
11193    return(0);
11194 }
11195 #endif /* NOSPL */
11196
11197 #ifdef OS2
11198 #ifndef NOKVERBS
11199
11200 /*  D O H K V E R B  --  Give help for a Kverb  */
11201
11202 int
11203 dohkverb(xx) int xx; {
11204     int x,i,found,button,event;
11205
11206     if (xx == -3) {
11207         printf("\n Type SHOW KVERBS to see a list of available Kverbs.\n"
11208                );
11209         printf(
11210 " Type HELP KVERB <name> to see the current definition of a given Kverb.\n\n"
11211               );
11212         return(-9);
11213     }
11214     if (xx < 0) return(xx);
11215     if ((x = cmcfm()) < 0) return(x);
11216     switch ( xx ) {
11217         /* DEC VT keyboard key definitions */
11218
11219     case  K_COMPOSE :                   /* Compose key */
11220         printf("\\Kcompose           Compose an accented character\n");
11221         break;
11222     case  K_C_UNI16 :                   /* UCS2 key */
11223         printf("\\Kucs2              Enter a Unicode character\n");
11224         break;
11225
11226 /* DEC arrow keys */
11227
11228     case  K_UPARR     :                 /* DEC Up Arrow key */
11229         printf("\\Kuparr         Transmit Terminal Up Arrow sequence\n");
11230         break;
11231     case  K_DNARR     :                 /* DEC Down Arrow key */
11232         printf("\\Kdnarr         Transmit Terminal Down Arrow sequence\n");
11233         break;
11234     case  K_RTARR     :                 /* DEC Right Arrow key */
11235         printf("\\Krtarr         Transmit Terminal Right Arrow sequence\n");
11236         break;
11237     case  K_LFARR     :                 /* DEC Left Arrow key */
11238         printf("\\Klfarr         Transmit Terminal Left Arrow sequence\n");
11239         break;
11240
11241     case  K_PF1       :                 /* DEC PF1 key */
11242         printf("\\Kpf1,\\Kgold    Transmit DEC PF1 sequence\n");
11243         break;
11244     case  K_PF2       :                 /* DEC PF2 key */
11245         printf("\\Kpf2           Transmit DEC PF2 sequence\n");
11246         break;
11247     case  K_PF3       :                 /* DEC PF3 key */
11248         printf("\\Kpf3           Transmit DEC PF3 sequence\n");
11249         break;
11250     case  K_PF4       :                 /* DEC PF4 key */
11251         printf("\\Kpf4           Transmit DEC PF4 sequence\n");
11252         break;
11253
11254     case  K_KP0       :                 /* DEC Keypad 0 */
11255         printf("\\Kkp0           Transmit DEC Keypad-0 sequence\n");
11256         break;
11257     case  K_KP1       :                 /* DEC Keypad 1 */
11258         printf("\\Kkp1           Transmit DEC Keypad-1 sequence\n");
11259         break;
11260     case  K_KP2       :                 /* etc ... through 9 */
11261         printf("\\Kkp2           Transmit DEC Keypad-2 sequence\n");
11262         break;
11263     case  K_KP3       :
11264         printf("\\Kkp3           Transmit DEC Keypad-3 sequence\n");
11265         break;
11266     case  K_KP4       :
11267         printf("\\Kkp4           Transmit DEC Keypad-4 sequence\n");
11268         break;
11269     case  K_KP5       :
11270         printf("\\Kkp5           Transmit DEC Keypad-5 sequence\n");
11271         break;
11272     case  K_KP6       :
11273         printf("\\Kkp6           Transmit DEC Keypad-6 sequence\n");
11274         break;
11275     case  K_KP7       :
11276         printf("\\Kkp7           Transmit DEC Keypad-7 sequence\n");
11277         break;
11278     case  K_KP8       :
11279         printf("\\Kkp8           Transmit DEC Keypad-8 sequence\n");
11280         break;
11281     case  K_KP9       :
11282         printf("\\Kkp9           Transmit DEC Keypad-9 sequence\n");
11283         break;
11284     case  K_KPCOMA    :                 /* DEC keypad comma */
11285         printf("\\Kkpcoma        Transmit DEC Keypad-Comma sequence\n");
11286         break;
11287     case  K_KPMINUS   :                 /* DEC keypad minus */
11288         printf("\\Kkpminus       Transmit DEC Keypad-Minus sequence\n");
11289         break;
11290     case  K_KPDOT     :                 /* DEC keypad period */
11291         printf("\\Kkpdot         Transmit DEC Keypad-Period sequence\n");
11292         break;
11293     case  K_KPENTER   :                 /* DEC keypad enter */
11294         printf("\\Kkpenter       Transmit DEC Keypad-Enter sequence\n");
11295         break;
11296
11297 /* DEC Top-Rank F keys */
11298
11299     case  K_DECF1     :                 /* DEC F1 key */
11300         printf("\\Kdecf1         Transmit DEC F1 sequence for PC keyboard\n");
11301         break;
11302     case  K_DECF2     :                 /* DEC F2 key */
11303         printf("\\Kdecf2         Transmit DEC F2 sequence for PC keyboard\n");
11304         break;
11305     case  K_DECF3     :                 /* DEC F3 key */
11306         printf("\\Kdecf3         Transmit DEC F3 sequence for PC keyboard\n");
11307         break;
11308     case  K_DECF4     :                 /* DEC F4 key */
11309         printf("\\Kdecf4         Transmit DEC F4 sequence for PC keyboard\n");
11310         break;
11311     case  K_DECF5     :                 /* DEC F5 key */
11312         printf("\\Kdecf5         Transmit DEC F5 sequence for PC keyboard\n");
11313         break;
11314     case  K_DECHOME:                    /* DEC HOME key */
11315        printf("\\Kdechome       Transmit DEC HOME sequence for PC keyboard\n");
11316        break;
11317
11318     case  K_DECF6     :                 /* DEC F6 key */
11319         printf("\\Kdecf6         Transmit DEC F6 sequence\n");
11320         break;
11321     case  K_DECF7     :                 /* etc, through F20 */
11322         printf("\\Kdecf7         Transmit DEC F7 sequence\n");
11323         break;
11324     case  K_DECF8     :
11325         printf("\\Kdecf8         Transmit DEC F8 sequence\n");
11326         break;
11327     case  K_DECF9     :
11328         printf("\\Kdecf9         Transmit DEC F9 sequence\n");
11329         break;
11330     case  K_DECF10    :
11331         printf("\\Kdecf10        Transmit DEC F10 sequence\n");
11332         break;
11333     case  K_DECF11    :
11334         printf("\\Kdecf11        Transmit DEC F11 sequence\n");
11335         break;
11336     case  K_DECF12    :
11337         printf("\\Kdecf12        Transmit DEC F12 sequence\n");
11338         break;
11339     case  K_DECF13    :
11340         printf("\\Kdecf13        Transmit DEC F13 sequence\n");
11341         break;
11342     case  K_DECF14    :
11343         printf("\\Kdecf14        Transmit DEC F14 sequence\n");
11344         break;
11345     case  K_DECHELP   :                 /* DEC Help key */
11346         printf("\\Kdecf15,\\Kdechelp  Transmit DEC HELP sequence\n");
11347         break;
11348     case  K_DECDO     :                 /* DEC Do key */
11349         printf("\\Kdecf16,\\Kdecdo    Transmit DEC DO sequence\n");
11350         break;
11351     case  K_DECF17    :
11352         printf("\\Kdecf17        Transmit DEC F17 sequence\n");
11353         break;
11354     case  K_DECF18    :
11355         printf("\\Kdecf18        Transmit DEC F18 sequence\n");
11356         break;
11357     case  K_DECF19    :
11358         printf("\\Kdecf19        Transmit DEC F19 sequence\n");
11359         break;
11360     case  K_DECF20    :
11361         printf("\\Kdecf20        Transmit DEC F20 sequence\n");
11362         break;
11363
11364 /* DEC editing keys */
11365
11366     case  K_DECFIND   :                 /* DEC Find key */
11367         printf("\\Kdecfind       Transmit DEC FIND sequence\n");
11368         break;
11369     case  K_DECINSERT :                 /* DEC Insert key */
11370         printf("\\Kdecinsert     Transmit DEC INSERT HERE sequence\n");
11371         break;
11372     case  K_DECREMOVE :                 /* DEC Remove key */
11373         printf("\\Kdecremove     Transmit DEC REMOVE sequence\n");
11374         break;
11375     case  K_DECSELECT :                 /* DEC Select key */
11376         printf("\\Kdecfselect    Transmit DEC SELECT sequence\n");
11377         break;
11378     case  K_DECPREV   :                 /* DEC Previous Screen key */
11379         printf("\\Kdecprev       Transmit DEC PREV SCREEN sequence\n");
11380         break;
11381     case  K_DECNEXT   :                 /* DEC Next Screen key */
11382         printf("\\Kdecnext       Transmit DEC NEXT SCREEN sequence\n");
11383         break;
11384
11385 /* DEC User-Defined Keys */
11386
11387     case  K_UDKF1     :                 /* F1 - F5 are XTERM extensions */
11388       printf("\\Kudkf1         Transmit XTERM F1 User Defined Key sequence\n");
11389       break;
11390     case  K_UDKF2     :
11391       printf("\\Kudkf2         Transmit XTERM F2 User Defined Key sequence\n");
11392       break;
11393     case  K_UDKF3     :
11394       printf("\\Kudkf3         Transmit XTERM F3 User Defined Key sequence\n");
11395       break;
11396     case  K_UDKF4     :
11397       printf("\\Kudkf4         Transmit XTERM F4 User Defined Key sequence\n");
11398       break;
11399     case  K_UDKF5     :
11400       printf("\\Kudkf5         Transmit XTERM F5 User Defined Key sequence\n");
11401       break;
11402     case  K_UDKF6     :                 /* DEC User Defined Key F6 */
11403       printf("\\Kudkf6         Transmit DEC F6 User Defined Key sequence\n");
11404       break;
11405     case  K_UDKF7     :                 /* DEC User Defined Key F7 */
11406       printf("\\Kudkf7         Transmit DEC F7 User Defined Key sequence\n");
11407       break;
11408     case  K_UDKF8     :                 /* etc ... through F20 */
11409       printf("\\Kudkf8         Transmit DEC F8 User Defined Key sequence\n");
11410       break;
11411     case  K_UDKF9     :
11412       printf("\\Kudkf9         Transmit DEC F9 User Defined Key sequence\n");
11413       break;
11414     case  K_UDKF10    :
11415       printf("\\Kudkf10        Transmit DEC F10 User Defined Key sequence\n");
11416       break;
11417     case  K_UDKF11    :
11418       printf("\\Kudkf11        Transmit DEC F11 User Defined Key sequence\n");
11419       break;
11420     case  K_UDKF12    :
11421       printf("\\Kudkf12        Transmit DEC F12 User Defined Key sequence\n");
11422       break;
11423     case  K_UDKF13    :
11424       printf("\\Kudkf13        Transmit DEC F13 User Defined Key sequence\n");
11425       break;
11426     case  K_UDKF14    :
11427       printf("\\Kudkf14        Transmit DEC F14 User Defined Key sequence\n");
11428       break;
11429     case  K_UDKHELP   :
11430       printf(
11431       "\\Kudkhelp,\\Kudkf15  Transmit DEC HELP User Defined Key sequence\n");
11432       break;
11433     case  K_UDKDO     :
11434       printf(
11435       "\\Kudkdo,\\Kudkf16    Transmit DEC DO User Defined Key sequence\n");
11436       break;
11437     case  K_UDKF17    :
11438       printf("\\Kudkf17        Transmit DEC F17 User Defined Key sequence\n");
11439       break;
11440     case  K_UDKF18    :
11441       printf("\\Kudkf18        Transmit DEC F18 User Defined Key sequence\n");
11442       break;
11443     case  K_UDKF19    :
11444       printf("\\Kudkf19        Transmit DEC F19 User Defined Key sequence\n");
11445       break;
11446     case  K_UDKF20    :
11447       printf("\\Kudkf20        Transmit DEC F20 User Defined Key sequence\n");
11448       break;
11449
11450 /* Emacs Keys */
11451     case  K_EMACS_OVER:
11452       printf(
11453      "\\Kemacs_overwrite  Transmit EMACS Overwrite toggle command sequence\n");
11454       break;
11455
11456 /* Kermit screen-scrolling keys */
11457
11458     case  K_DNONE     :                 /* Screen rollback: down one line */
11459       printf("\\Kdnone         Screen rollback: down one line\n");
11460       break;
11461     case  K_DNSCN     :                 /* Screen rollback: down one screen */
11462       printf("\\Kdnscn         Screen rollback: down one screen\n");
11463       break;
11464     case  K_UPONE     :                 /* Screen rollback: Up one line */
11465       printf("\\Kupone         Screen rollback: up one line\n");
11466       break;
11467     case  K_UPSCN     :                 /* Screen rollback: Up one screen */
11468       printf("\\Kupscn         Screen rollback: up one screen\n");
11469       break;
11470     case  K_ENDSCN    :                 /* Screen rollback: latest screen */
11471       printf("\\Kendscn        Screen rollback: latest screen\n");
11472       break;
11473     case  K_HOMSCN    :                 /* Screen rollback: oldest screen */
11474       printf("\\Khomscn        Screen rollback: oldest screen\n");
11475       break;
11476     case  K_GO_BOOK   :         /* Scroll to bookmark */
11477       printf("\\Kgobook        Screen rollback: go to bookmark\n");
11478       break;
11479     case  K_GOTO      :         /* Scroll to line number */
11480       printf("\\Kgoto          Screen rollback: go to line number\n");
11481       break;
11482
11483     case  K_LFONE     :                 /* Horizontal Scroll: Left one cell */
11484       printf("\\Klfone         Horizontal Scroll: Left one column\n");
11485       break;
11486     case  K_LFPAGE    :                 /* Horizontal Scroll: Left one page */
11487       printf("\\Klfpage        Horizontal Scroll: Left eight columns\n");
11488       break;
11489     case  K_LFALL     :
11490       printf("\\Klfall         Horizontal Scroll: Left to margin\n");
11491       break;
11492     case  K_RTONE     :                 /* Horizontal Scroll: Right one cell */
11493       printf("\\Krtone         Horizontal Scroll: Right one column\n");
11494       break;
11495     case  K_RTPAGE    :                 /* Horizontal Scroll: Right one page */
11496       printf("\\Krtpage        Horizontal Scroll: Right eight columns\n");
11497       break;
11498     case  K_RTALL     :
11499       printf("\\Krtall         Horizontal Scroll: Right to margin\n");
11500       break;
11501
11502 /* Keyboard language switching verbs */
11503
11504     case  K_KB_ENG    :                 /* English keyboard mode */
11505       printf("\\Kkbenglish     Switch to Normal (English) keyboard mode\n");
11506       break;
11507     case  K_KB_HEB    :                 /* Hebrew keyboard mode */
11508       printf("\\Kkbhebrew      Switch to Hebrew keyboard mode\n");
11509       break;
11510     case  K_KB_RUS    :                 /* Russian keyboard mode */
11511       printf("\\Kkbrussian     Switch to Russian keyboard mode\n");
11512       break;
11513     case  K_KB_EMA    :                 /* Emacs keyboard mode */
11514       printf("\\Kkbemacs       Switch to EMACS keyboard mode\n");
11515       break;
11516     case  K_KB_WP     :                 /* Word Perfect 5.1 mode */
11517       printf("\\Kkbwp          Switch to Word Perfect 5.1 keyboard mode\n");
11518       break;
11519
11520 /* Mark Mode actions */
11521
11522     case  K_MARK_START  :       /* Enter Mark Mode/Start marking */
11523       printf("\\Kmarkstart     Mark Mode: Enter mode or Start marking\n");
11524       break;
11525     case  K_MARK_CANCEL :       /* Exit Mark Mode - Do Nothing */
11526       printf("\\Kmarkcancel    Mark Mode: Cancel mode\n");
11527       break;
11528     case  K_MARK_COPYCLIP:      /* Exit Mark Mode - Copy data to clipboard */
11529       printf("\\Kmarkcopyclip  Mark Mode: Copy marked text to clipboard\n");
11530       break;
11531     case  K_MARK_COPYHOST:      /* Exit Mark Mode - Copy data to host   */
11532       printf("\\Kmarkcopyhost  Mark Mode: Copy marked text to host\n");
11533       break;
11534     case  K_MARK_SELECT :       /* Exit Mark Mode - Select */
11535       printf(
11536       "\\Kmarkselect    Mark Mode: Place marked text into \\v(select)\n");
11537       break;
11538     case  K_BACKSRCH    :            /* Search Backwards for text */
11539       printf("\\Kbacksearch    Search: Begin backward search for text\n");
11540       break;
11541     case  K_FWDSRCH     :            /* Search Forwards for text */
11542       printf("\\Kfwdsearch     Search: Begin forward search for text\n");
11543       break;
11544     case  K_BACKNEXT    :     /* Search Backwards for next instance of text */
11545       printf(
11546       "\\Kbacknext      Search: Find next instance of text backwards\n");
11547       break;
11548     case  K_FWDNEXT     :      /* Search Forwards for next instance of text */
11549       printf("\\Kfwdnext       Search: Find next instance of text forwards\n");
11550       break;
11551
11552 /* Miscellaneous Kermit actions */
11553
11554     case  K_EXIT        :               /* Return to command parser */
11555       printf("\\Kexit          Toggle between COMMAND and CONNECT modes\n");
11556       break;
11557     case  K_BREAK       :               /* Send a BREAK */
11558       printf("\\Kbreak         Transmit BREAK signal to host\n");
11559       break;
11560     case  K_RESET       :               /* Reset emulator */
11561       printf("\\Kreset         Reset Terminal Emulator to user defaults\n");
11562       break;
11563     case  K_DOS         :               /* Push to DOS (i.e. OS/2) */
11564       printf("\\Kdos,\\Kos2     Push to Command Shell\n");
11565       break;
11566     case  K_HANGUP      :               /* Hang up the connection */
11567       printf("\\Khangup        Hangup the active connection\n");
11568       break;
11569     case  K_DUMP        :               /* Dump/Print current screen */
11570       printf(
11571      "\\Kdump          Dump/copy current screen to SET PRINTER device/file\n");
11572       break;
11573     case  K_LBREAK      :               /* Send a Long BREAK */
11574       printf("\\Klbreak        Transmit LONG BREAK signal to host\n");
11575       break;
11576     case  K_NULL        :               /* Send a NUL */
11577       printf("\\Knull          Transmit NULL ('\0') character to host\n");
11578       break;
11579     case  K_HELP        :               /* Pop-up help */
11580       printf("\\Khelp          Raise Pop-Up help display\n");
11581       break;
11582     case  K_HOLDSCRN    :               /* Hold screen */
11583       printf("\\Kholdscrn      Pause data input during CONNECT mode\n");
11584       break;
11585     case  K_IGNORE      :               /* Ignore this key, don't even beep */
11586       printf("\\Kignore        Ignore key\n");
11587       break;
11588
11589     case  K_LOGOFF      :               /* Turn off session logging */
11590       printf("\\Klogoff        Turn off session logging (see \\Ksession)\n");
11591       break;
11592     case  K_LOGON       :               /* Turn on session logging */
11593       printf("\\Klogon         Turn on session logging (see \\Ksession)\n");
11594       break;
11595     case K_SESSION:
11596       printf(
11597          "\\Ksession       Toggle on/off session logging to 'session.log'\n");
11598       break;
11599     case K_AUTODOWN:
11600       printf("\\Kautodown      Toggle on/off terminal autodownload.\n");
11601       break;
11602     case K_BYTESIZE:
11603       printf(
11604         "\\Kbytesize      Toggle terminal bytesize between 7 and 8 bits.\n");
11605       break;
11606
11607 #ifdef COMMENT
11608     case MODELINE:
11609     case  K_NETHOLD     :               /* Put network connection on hold */
11610     case  K_NEXTSESS    :               /* Toggle to next network session */
11611 #endif /* COMMENT */
11612
11613     case K_CURSOR_URL:
11614         printf(
11615      "\\Kurl           Treat text under cursor position as a URL\n");
11616         break;
11617     case  K_STATUS      :               /* Show status */
11618       printf(
11619      "\\Kstatus        Toggle statusline (None, Indicator, Host Writeable)\n");
11620       break;
11621     case  K_TERMTYPE    :               /* Toggle term type: text/graphics */
11622       printf("\\Ktermtype      Toggle Terminal Type\n");
11623       break;
11624     case  K_PRTCTRL     :               /* Print Controller mode */
11625       printf("\\Kprtctrl       Toggle Ctrl-Print (transparent) mode\n");
11626       break;
11627     case  K_PRINTFF     :               /* Print formfeed */
11628       printf("\\Kprintff       Output Form Feed to SET PRINTER device\n");
11629       break;
11630     case  K_FLIPSCN     :               /* Flip screen */
11631       printf("\\Kflipscn       Reverse foreground and background colors\n");
11632       break;
11633     case  K_DEBUG       :               /* Toggle debugging */
11634       printf("\\Kdebug         Toggle Terminal Debug mode\n");
11635       break;
11636     case  K_TN_SAK      :               /* TELNET Secure Access Key */
11637       printf("\\Ktn_sak        TELNET: IBM Secure Access Key\n");
11638       printf("                Used to request a Trusted Shell with AIX\n");
11639       break;
11640     case  K_TN_AO       :               /* TELNET Cancel Output */
11641       printf("\\Ktn_ao         TELNET: Transmit Cancel-Output request\n");
11642       break;
11643     case  K_TN_AYT      :               /* TELNET Are You There */
11644       printf("\\Ktnayt         TELNET: Transmit Are You There? request\n");
11645       break;
11646     case  K_TN_EC       :               /* TELNET Erase Character */
11647       printf("\\Ktn_ec         TELNET: Transmit Erase Character request\n");
11648       break;
11649     case  K_TN_EL       :               /* TELNET Erase Line */
11650       printf("\\Ktn_el         TELNET: Transmit Erase Line request\n");
11651       break;
11652     case  K_TN_GA       :               /* TELNET Go Ahead */
11653       printf("\\Ktn_ga         TELNET: Transmit Go Ahead request\n");
11654       break;
11655     case  K_TN_IP       :               /* TELNET Interrupt Process */
11656       printf("\\Ktn_ip         TELNET: Transmit Interrupt Process request\n");
11657       break;
11658     case  K_TN_LOGOUT   :               /* TELNET Logout */
11659       printf("\\Ktn_logout     TELNET: Transmit Do Logout Option\n");
11660       break;
11661     case  K_TN_NAWS   :                 /* TELNET NAWS */
11662       printf(
11663         "\\Ktn_naws       TELNET: Transmit Window Size if NAWS is active\n");
11664       break;
11665     case  K_PASTE       :               /* Paste data from clipboard */
11666       printf("\\Kpaste         Paste data from clipboard to host\n");
11667       break;
11668     case  K_CLRSCRN     :               /* Clear Terminal Screen */
11669       printf("\\Kclearscreen   Clear the Terminal screen\n");
11670       break;
11671     case  K_PRTAUTO     :               /* Print Auto mode */
11672       printf("\\Kprtauto       Toggle Auto-Print mode\n");
11673       break;
11674     case  K_PRTCOPY     :               /* Print Copy mode */
11675       printf("\\Kprtcopy       Toggle Copy-Print mode\n");
11676       break;
11677     case  K_ANSWERBACK  :               /* Transmit Answerback String */
11678       printf("\\Kanswerback    Transmit answerback string to host\n");
11679       break;
11680     case  K_SET_BOOK    :               /* Set Bookmark */
11681       printf("\\Ksetbook       Set bookmark\n");
11682       break;
11683     case  K_QUIT        :               /* Quit Kermit */
11684       printf("\\Kquit          Hangup connection and quit kermit\n");
11685       break;
11686     case  K_KEYCLICK    :               /* Toggle Keyclick */
11687       printf("\\Kkeyclick      Toggle Keyclick mode\n");
11688       break;
11689     case  K_LOGDEBUG    :               /* Toggle Debug Log File */
11690       printf("\\Klogdebug      Toggle Debug Logging to File\n");
11691       break;
11692     case  K_FNKEYS      :               /* Show Function Key Labels */
11693       printf("\\Kfnkeys        Display Function Key Labels\n");
11694       break;
11695
11696 #ifdef OS2MOUSE
11697 /* Mouse only Kverbs */
11698
11699     case  K_MOUSE_CURPOS :
11700       printf("\\Kmousecurpos   Mouse: Move host cursor to position\n");
11701       break;
11702     case  K_MOUSE_MARK   :
11703       printf(
11704      "\\Kmousemark     Mouse: Mark text for selection (drag event only)\n");
11705       break;
11706     case  K_MOUSE_URL    :
11707       printf("\\Kmouseurl      Mouse: Start browser with selected URL\n");
11708       break;
11709 #endif /* OS2MOUSE */
11710
11711 /* ANSI Function Key definitions */
11712     case  K_ANSIF01          :
11713       printf("\\Kansif01       Transmit SCOANSI/AT386: F1 \n");
11714       break;
11715     case  K_ANSIF02          :
11716       printf("\\Kansif02       Transmit SCOANSI/AT386: F2 \n");
11717       break;
11718     case  K_ANSIF03          :
11719       printf("\\Kansif03       Transmit SCOANSI/AT386: F3 \n");
11720       break;
11721     case  K_ANSIF04          :
11722       printf("\\Kansif04       Transmit SCOANSI/AT386: F4 \n");
11723       break;
11724     case  K_ANSIF05          :
11725       printf("\\Kansif05       Transmit SCOANSI/AT386: F5 \n");
11726       break;
11727     case  K_ANSIF06          :
11728       printf("\\Kansif06       Transmit SCOANSI/AT386: F6 \n");
11729       break;
11730     case  K_ANSIF07          :
11731       printf("\\Kansif07       Transmit SCOANSI/AT386: F7 \n");
11732       break;
11733     case  K_ANSIF08          :
11734       printf("\\Kansif08       Transmit SCOANSI/AT386: F8 \n");
11735       break;
11736     case  K_ANSIF09          :
11737       printf("\\Kansif09       Transmit SCOANSI/AT386: F9 \n");
11738       break;
11739     case  K_ANSIF10          :
11740       printf("\\Kansif10       Transmit SCOANSI/AT386: F10\n");
11741       break;
11742     case  K_ANSIF11          :
11743       printf("\\Kansif11       Transmit SCOANSI/AT386: F11\n");
11744       break;
11745     case  K_ANSIF12          :
11746       printf("\\Kansif12       Transmit SCOANSI/AT386: F12\n");
11747       break;
11748     case  K_ANSIF13          :
11749       printf("\\Kansif13       Transmit SCOANSI/AT386: Shift-F1 \n");
11750       break;
11751     case  K_ANSIF14          :
11752       printf("\\Kansif14       Transmit SCOANSI/AT386: Shift-F2 \n");
11753       break;
11754     case  K_ANSIF15          :
11755       printf("\\Kansif15       Transmit SCOANSI/AT386: Shift-F3 \n");
11756       break;
11757     case  K_ANSIF16          :
11758       printf("\\Kansif16       Transmit SCOANSI/AT386: Shift-F4 \n");
11759       break;
11760     case  K_ANSIF17          :
11761       printf("\\Kansif17       Transmit SCOANSI/AT386: Shift-F5 \n");
11762       break;
11763     case  K_ANSIF18          :
11764       printf("\\Kansif18       Transmit SCOANSI/AT386: Shift-F6 \n");
11765       break;
11766     case  K_ANSIF19          :
11767       printf("\\Kansif19       Transmit SCOANSI/AT386: Shift-F7 \n");
11768       break;
11769     case  K_ANSIF20          :
11770       printf("\\Kansif20       Transmit SCOANSI/AT386: Shift-F8 \n");
11771       break;
11772     case  K_ANSIF21          :
11773       printf("\\Kansif21       Transmit SCOANSI/AT386: Shift-F9 \n");
11774       break;
11775     case  K_ANSIF22          :
11776       printf("\\Kansif22       Transmit SCOANSI/AT386: Shift-F10\n");
11777       break;
11778     case  K_ANSIF23          :
11779       printf("\\Kansif23       Transmit SCOANSI/AT386: Shift-F11\n");
11780       break;
11781     case  K_ANSIF24          :
11782       printf("\\Kansif24       Transmit SCOANSI/AT386: Shift-F12\n");
11783       break;
11784     case  K_ANSIF25          :
11785       printf("\\Kansif25       Transmit SCOANSI/AT386: Ctrl-F1 \n");
11786       break;
11787     case  K_ANSIF26          :
11788       printf("\\Kansif26       Transmit SCOANSI/AT386: Ctrl-F2 \n");
11789       break;
11790     case  K_ANSIF27          :
11791       printf("\\Kansif27       Transmit SCOANSI/AT386: Ctrl-F3 \n");
11792       break;
11793     case  K_ANSIF28          :
11794       printf("\\Kansif28       Transmit SCOANSI/AT386: Ctrl-F4 \n");
11795       break;
11796     case  K_ANSIF29          :
11797       printf("\\Kansif29       Transmit SCOANSI/AT386: Ctrl-F5 \n");
11798       break;
11799     case  K_ANSIF30          :
11800       printf("\\Kansif30       Transmit SCOANSI/AT386: Ctrl-F6 \n");
11801       break;
11802     case  K_ANSIF31          :
11803       printf("\\Kansif31       Transmit SCOANSI/AT386: Ctrl-F7 \n");
11804       break;
11805     case  K_ANSIF32          :
11806       printf("\\Kansif32       Transmit SCOANSI/AT386: Ctrl-F8 \n");
11807       break;
11808     case  K_ANSIF33          :
11809       printf("\\Kansif33       Transmit SCOANSI/AT386: Ctrl-F9 \n");
11810       break;
11811     case  K_ANSIF34          :
11812       printf("\\Kansif34       Transmit SCOANSI/AT386: Ctrl-F10\n");
11813       break;
11814     case  K_ANSIF35          :
11815       printf("\\Kansif35       Transmit SCOANSI/AT386: Ctrl-F11\n");
11816       break;
11817     case  K_ANSIF36          :
11818       printf("\\Kansif36       Transmit SCOANSI/AT386: Ctrl-F12\n");
11819       break;
11820     case  K_ANSIF37          :
11821       printf("\\Kansif37       Transmit SCOANSI/AT386: Ctrl-Shift-F1 \n");
11822       break;
11823     case  K_ANSIF38          :
11824       printf("\\Kansif38       Transmit SCOANSI/AT386: Ctrl-Shift-F2 \n");
11825       break;
11826     case  K_ANSIF39          :
11827       printf("\\Kansif39       Transmit SCOANSI/AT386: Ctrl-Shift-F3 \n");
11828       break;
11829     case  K_ANSIF40          :
11830       printf("\\Kansif40       Transmit SCOANSI/AT386: Ctrl-Shift-F4 \n");
11831       break;
11832     case  K_ANSIF41          :
11833       printf("\\Kansif41       Transmit SCOANSI/AT386: Ctrl-Shift-F5 \n");
11834       break;
11835     case  K_ANSIF42          :
11836       printf("\\Kansif42       Transmit SCOANSI/AT386: Ctrl-Shift-F6 \n");
11837       break;
11838     case  K_ANSIF43          :
11839       printf("\\Kansif43       Transmit SCOANSI/AT386: Ctrl-Shift-F7 \n");
11840       break;
11841     case  K_ANSIF44          :
11842       printf("\\Kansif44       Transmit SCOANSI/AT386: Ctrl-Shift-F8 \n");
11843       break;
11844     case  K_ANSIF45          :
11845       printf("\\Kansif45       Transmit SCOANSI/AT386: Ctrl-Shift-F9 \n");
11846       break;
11847     case  K_ANSIF46          :
11848       printf("\\Kansif46       Transmit SCOANSI/AT386: Ctrl-Shift-F10\n");
11849       break;
11850     case  K_ANSIF47          :
11851       printf("\\Kansif47       Transmit SCOANSI/AT386: Ctrl-Shift-F11\n");
11852       break;
11853     case  K_ANSIF48          :
11854       printf("\\Kansif48       Transmit SCOANSI/AT386: Ctrl-Shift-F12\n");
11855       break;
11856     case  K_ANSIF49          :
11857       printf("\\Kansif49       Transmit SCOANSI/AT386: Home\n");
11858       break;
11859     case  K_ANSIF50          :
11860       printf("\\Kansif50       Transmit SCOANSI/AT386: Up Arrow\n");
11861       break;
11862     case  K_ANSIF51          :
11863       printf("\\Kansif51       Transmit SCOANSI/AT386: PgUp\n");
11864       break;
11865     case  K_ANSIF52          :
11866       printf("\\Kansif52       Transmit SCOANSI/AT386: Ctrl-Shift-Subtract\n");
11867       break;
11868     case  K_ANSIF53          :
11869       printf("\\Kansif53       Transmit SCOANSI/AT386: Left Arrow\n");
11870       break;
11871     case  K_ANSIF54          :
11872       printf("\\Kansif54       Transmit SCOANSI/AT386: Clear\n");
11873       break;
11874     case  K_ANSIF55          :
11875       printf("\\Kansif55       Transmit SCOANSI/AT386: Right Arrow\n");
11876       break;
11877     case  K_ANSIF56          :
11878       printf("\\Kansif56       Transmit SCOANSI/AT386: Shift-Add\n");
11879       break;
11880     case  K_ANSIF57          :
11881       printf("\\Kansif57       Transmit SCOANSI/AT386: End\n");
11882       break;
11883     case  K_ANSIF58          :
11884       printf("\\Kansif58       Transmit SCOANSI/AT386: Down Arrow\n");
11885       break;
11886     case  K_ANSIF59          :
11887       printf("\\Kansif59       Transmit SCOANSI/AT386: PgDn\n");
11888       break;
11889     case  K_ANSIF60          :
11890       printf("\\Kansif60       Transmit SCOANSI/AT386: Insert\n");
11891       break;
11892     case  K_ANSIF61          :
11893       printf("\\Kansif61       Transmit SCOANSI/AT386: (not named)\n");
11894       break;
11895
11896 /* WYSE Function Keys (unshifted) */
11897     case  K_WYF01            :
11898       printf("\\Kwyf01         Transmit WYSE 30/50/60/160: F1\n");
11899       break;
11900     case  K_WYF02            :
11901       printf("\\Kwyf02         Transmit WYSE 30/50/60/160: F2\n");
11902       break;
11903     case  K_WYF03            :
11904       printf("\\Kwyf03         Transmit WYSE 30/50/60/160: F3\n");
11905       break;
11906     case  K_WYF04            :
11907       printf("\\Kwyf04         Transmit WYSE 30/50/60/160: F4\n");
11908       break;
11909     case  K_WYF05            :
11910       printf("\\Kwyf05         Transmit WYSE 30/50/60/160: F5\n");
11911       break;
11912     case  K_WYF06            :
11913       printf("\\Kwyf06         Transmit WYSE 30/50/60/160: F6\n");
11914       break;
11915     case  K_WYF07            :
11916       printf("\\Kwyf07         Transmit WYSE 30/50/60/160: F7\n");
11917       break;
11918     case  K_WYF08            :
11919       printf("\\Kwyf08         Transmit WYSE 30/50/60/160: F8\n");
11920       break;
11921     case  K_WYF09            :
11922       printf("\\Kwyf09         Transmit WYSE 30/50/60/160: F9\n");
11923       break;
11924     case  K_WYF10            :
11925       printf("\\Kwyf10         Transmit WYSE 30/50/60/160: F10\n");
11926       break;
11927     case  K_WYF11            :
11928       printf("\\Kwyf11         Transmit WYSE 30/50/60/160: F11\n");
11929       break;
11930     case  K_WYF12            :
11931       printf("\\Kwyf12         Transmit WYSE 30/50/60/160: F12\n");
11932       break;
11933     case  K_WYF13            :
11934       printf("\\Kwyf13         Transmit WYSE 30/50/60/160: F13\n");
11935       break;
11936     case  K_WYF14            :
11937       printf("\\Kwyf14         Transmit WYSE 30/50/60/160: F14\n");
11938       break;
11939     case  K_WYF15            :
11940       printf("\\Kwyf15         Transmit WYSE 30/50/60/160: F15\n");
11941       break;
11942     case  K_WYF16            :
11943       printf("\\Kwyf16         Transmit WYSE 30/50/60/160: F16\n");
11944       break;
11945     case  K_WYF17            :
11946       printf("\\Kwyf17         Transmit WYSE 30/50/60/160: F17\n");
11947       break;
11948     case  K_WYF18            :
11949       printf("\\Kwyf18         Transmit WYSE 30/50/60/160: F18\n");
11950       break;
11951     case  K_WYF19            :
11952       printf("\\Kwyf19         Transmit WYSE 30/50/60/160: F19\n");
11953       break;
11954     case  K_WYF20            :
11955       printf("\\Kwyf20         Transmit WYSE 30/50/60/160: F20\n");
11956       break;
11957
11958 /* WYSE Function Keys (shifted) */
11959     case  K_WYSF01           :
11960       printf("\\Kwysf01        Transmit WYSE 30/50/60/160: Shift-F1\n");
11961       break;
11962     case  K_WYSF02           :
11963       printf("\\Kwysf02        Transmit WYSE 30/50/60/160: Shift-F2\n");
11964       break;
11965     case  K_WYSF03            :
11966       printf("\\Kwysf03        Transmit WYSE 30/50/60/160: Shift-F3\n");
11967       break;
11968     case  K_WYSF04            :
11969       printf("\\Kwysf04        Transmit WYSE 30/50/60/160: Shift-F4\n");
11970       break;
11971     case  K_WYSF05            :
11972       printf("\\Kwysf05        Transmit WYSE 30/50/60/160: Shift-F5\n");
11973       break;
11974     case  K_WYSF06            :
11975       printf("\\Kwysf06        Transmit WYSE 30/50/60/160: Shift-F6\n");
11976       break;
11977     case  K_WYSF07            :
11978       printf("\\Kwysf07        Transmit WYSE 30/50/60/160: Shift-F7\n");
11979       break;
11980     case  K_WYSF08            :
11981       printf("\\Kwysf08        Transmit WYSE 30/50/60/160: Shift-F8\n");
11982       break;
11983     case  K_WYSF09            :
11984       printf("\\Kwysf09        Transmit WYSE 30/50/60/160: Shift-F9\n");
11985       break;
11986     case  K_WYSF10            :
11987       printf("\\Kwysf10        Transmit WYSE 30/50/60/160: Shift-F10\n");
11988       break;
11989     case  K_WYSF11            :
11990       printf("\\Kwysf11        Transmit WYSE 30/50/60/160: Shift-F11\n");
11991       break;
11992     case  K_WYSF12            :
11993       printf("\\Kwysf12        Transmit WYSE 30/50/60/160: Shift-F12\n");
11994       break;
11995     case  K_WYSF13            :
11996       printf("\\Kwysf13        Transmit WYSE 30/50/60/160: Shift-F13\n");
11997       break;
11998     case  K_WYSF14            :
11999       printf("\\Kwysf14        Transmit WYSE 30/50/60/160: Shift-F14\n");
12000       break;
12001     case  K_WYSF15            :
12002       printf("\\Kwysf15        Transmit WYSE 30/50/60/160: Shift-F15\n");
12003       break;
12004     case  K_WYSF16            :
12005       printf("\\Kwysf16        Transmit WYSE 30/50/60/160: Shift-F16\n");
12006       break;
12007     case  K_WYSF17           :
12008       printf("\\Kwysf17        Transmit WYSE 30/50/60/160: Shift-F17\n");
12009       break;
12010     case  K_WYSF18           :
12011       printf("\\Kwysf18        Transmit WYSE 30/50/60/160: Shift-F18\n");
12012       break;
12013     case  K_WYSF19           :
12014       printf("\\Kwysf19        Transmit WYSE 30/50/60/160: Shift-F19\n");
12015       break;
12016     case  K_WYSF20           :
12017       printf("\\Kwysf20        Transmit WYSE 30/50/60/160: Shift-F20\n");
12018       break;
12019
12020 /* WYSE Edit and Special Keys */
12021     case  K_WYBS         :
12022       printf("\\Kwybs          Transmit WYSE 30/50/60/160: Backspace\n");
12023       break;
12024     case  K_WYCLRLN          :
12025       printf("\\Kwyclrln       Transmit WYSE 30/50/60/160: Clear Line\n");
12026       break;
12027     case  K_WYSCLRLN     :
12028      printf("\\Kwysclrln      Transmit WYSE 30/50/60/160: Shift-Clear Line\n");
12029       break;
12030     case  K_WYCLRPG      :
12031       printf("\\Kwyclrpg       Transmit WYSE 30/50/60/160: Clear Page\n");
12032       break;
12033     case  K_WYSCLRPG     :
12034     printf("\\Kwysclrpg      Transmit WYSE 30/50/60/160: Shift-Clear Page\n");
12035       break;
12036     case  K_WYDELCHAR    :
12037       printf("\\Kwydelchar     Transmit WYSE 30/50/60/160: Delete Char\n");
12038       break;
12039     case  K_WYDELLN      :
12040       printf("\\Kwydelln       Transmit WYSE 30/50/60/160: Delete Line\n");
12041       break;
12042     case  K_WYENTER          :
12043       printf("\\Kwyenter       Transmit WYSE 30/50/60/160: Enter\n");
12044       break;
12045     case  K_WYESC            :
12046       printf("\\Kwyesc         Transmit WYSE 30/50/60/160: Esc\n");
12047       break;
12048     case  K_WYHOME           :
12049       printf("\\Kwyhome        Transmit WYSE 30/50/60/160: Home\n");
12050       break;
12051     case  K_WYSHOME          :
12052       printf("\\Kwyshome       Transmit WYSE 30/50/60/160: Shift-Home\n");
12053       break;
12054     case  K_WYINSERT     :
12055       printf("\\Kwyinsert      Transmit WYSE 30/50/60/160: Insert\n");
12056       break;
12057     case  K_WYINSCHAR    :
12058       printf("\\Kwyinschar     Transmit WYSE 30/50/60/160: Insert Char\n");
12059       break;
12060     case  K_WYINSLN          :
12061       printf("\\Kwyinsln       Transmit WYSE 30/50/60/160: Insert Line\n");
12062       break;
12063     case  K_WYPGNEXT     :
12064       printf("\\Kwypgnext      Transmit WYSE 30/50/60/160: Page Next\n");
12065       break;
12066     case  K_WYPGPREV     :
12067       printf("\\Kwypgprev      Transmit WYSE 30/50/60/160: Page Previous\n");
12068       break;
12069     case  K_WYREPLACE    :
12070       printf("\\Kwyreplace     Transmit WYSE 30/50/60/160: Replace      \n");
12071       break;
12072     case  K_WYRETURN     :
12073       printf("\\Kwyreturn      Transmit WYSE 30/50/60/160: Return       \n");
12074       break;
12075     case  K_WYTAB            :
12076       printf("\\Kwytab         Transmit WYSE 30/50/60/160: Tab          \n");
12077       break;
12078     case  K_WYSTAB           :
12079       printf("\\Kwystab        Transmit WYSE 30/50/60/160: Shift-Tab    \n");
12080       break;
12081     case  K_WYPRTSCN     :
12082       printf("\\Kwyprtscn      Transmit WYSE 30/50/60/160: Print Screen \n");
12083       break;
12084     case  K_WYSESC       :
12085       printf("\\Kwysesc        Transmit WYSE 30/50/60/160: Shift-Esc    \n");
12086       break;
12087     case  K_WYSBS        :
12088     printf("\\Kwysbs         Transmit WYSE 30/50/60/160: Shift-Backspace\n");
12089       break;
12090     case  K_WYSENTER     :
12091       printf("\\Kwysenter      Transmit WYSE 30/50/60/160: Shift-Enter\n");
12092       break;
12093     case  K_WYSRETURN    :
12094       printf("\\Kwysreturn     Transmit WYSE 30/50/60/160: Shift-Return\n");
12095       break;
12096     case  K_WYUPARR          :
12097       printf("\\Kwyuparr       Transmit WYSE 30/50/60/160: Up Arrow\n");
12098       break;
12099     case  K_WYDNARR          :
12100       printf("\\Kwydnarr       Transmit WYSE 30/50/60/160: Down Arrow\n");
12101       break;
12102     case  K_WYLFARR          :
12103       printf("\\Kwylfarr       Transmit WYSE 30/50/60/160: Left Arrow\n");
12104       break;
12105     case  K_WYRTARR          :
12106       printf("\\Kwyrtarr       Transmit WYSE 30/50/60/160: Right Arrow\n");
12107       break;
12108     case  K_WYSUPARR     :
12109       printf("\\Kwysuparr      Transmit WYSE 30/50/60/160: Shift-Up Arrow\n");
12110       break;
12111     case  K_WYSDNARR     :
12112     printf("\\Kwysdnarr      Transmit WYSE 30/50/60/160: Shift-Down Arrow\n");
12113       break;
12114     case  K_WYSLFARR     :
12115     printf("\\Kwyslfarr      Transmit WYSE 30/50/60/160: Shift-Left Arrow\n");
12116       break;
12117     case  K_WYSRTARR     :
12118     printf("\\Kwysrtarr      Transmit WYSE 30/50/60/160: Shift-Right Arrow\n");
12119       break;
12120     case  K_WYSEND:
12121       printf("\\Kwysend        Transmit WYSE 30/50/60/160: Send\n");
12122       break;
12123     case  K_WYSSEND:
12124       printf("\\Kwyssend       Transmit WYSE 30/50/60/160: Shift-Send\n");
12125       break;
12126
12127 /* Data General Function Keys (unshifted) */
12128     case  K_DGF01            :
12129       printf("\\Kdgf01         Transmit Data General: F1                 \n");
12130       break;
12131     case  K_DGF02            :
12132       printf("\\Kdgf01         Transmit Data General: F2                 \n");
12133       break;
12134     case  K_DGF03            :
12135       printf("\\Kdgf01         Transmit Data General: F3                 \n");
12136       break;
12137     case  K_DGF04            :
12138       printf("\\Kdgf01         Transmit Data General: F4                 \n");
12139       break;
12140     case  K_DGF05            :
12141       printf("\\Kdgf01         Transmit Data General: F5                 \n");
12142       break;
12143     case  K_DGF06            :
12144       printf("\\Kdgf01         Transmit Data General: F6                 \n");
12145       break;
12146     case  K_DGF07            :
12147       printf("\\Kdgf01         Transmit Data General: F7                 \n");
12148       break;
12149     case  K_DGF08            :
12150       printf("\\Kdgf01         Transmit Data General: F8                 \n");
12151       break;
12152     case  K_DGF09            :
12153       printf("\\Kdgf01         Transmit Data General: F9                 \n");
12154       break;
12155     case  K_DGF10            :
12156       printf("\\Kdgf01         Transmit Data General: F10                \n");
12157       break;
12158     case  K_DGF11            :
12159       printf("\\Kdgf01         Transmit Data General: F11                \n");
12160       break;
12161     case  K_DGF12            :
12162       printf("\\Kdgf01         Transmit Data General: F12                \n");
12163       break;
12164     case  K_DGF13            :
12165       printf("\\Kdgf01         Transmit Data General: F13                \n");
12166       break;
12167     case  K_DGF14            :
12168       printf("\\Kdgf01         Transmit Data General: F14                \n");
12169       break;
12170     case  K_DGF15            :
12171       printf("\\Kdgf01         Transmit Data General: F15                \n");
12172       break;
12173
12174 /* Data General Function Keys (shifted) */
12175     case  K_DGSF01           :
12176       printf(
12177       "\\Kdgsf01        Transmit Data General: Shift-F1                 \n");
12178       break;
12179     case  K_DGSF02           :
12180       printf(
12181       "\\Kdgsf02        Transmit Data General: Shift-F2                 \n");
12182       break;
12183     case  K_DGSF03           :
12184       printf(
12185       "\\Kdgsf03        Transmit Data General: Shift-F3                 \n");
12186       break;
12187     case  K_DGSF04           :
12188       printf(
12189       "\\Kdgsf04        Transmit Data General: Shift-F4                 \n");
12190       break;
12191     case  K_DGSF05           :
12192       printf(
12193       "\\Kdgsf05        Transmit Data General: Shift-F5                 \n");
12194       break;
12195     case  K_DGSF06           :
12196       printf(
12197       "\\Kdgsf06        Transmit Data General: Shift-F6                 \n");
12198       break;
12199     case  K_DGSF07           :
12200       printf(
12201       "\\Kdgsf07        Transmit Data General: Shift-F7                 \n");
12202       break;
12203     case  K_DGSF08           :
12204       printf(
12205       "\\Kdgsf08        Transmit Data General: Shift-F8                 \n");
12206       break;
12207     case  K_DGSF09           :
12208       printf(
12209       "\\Kdgsf09        Transmit Data General: Shift-F9                 \n");
12210       break;
12211     case  K_DGSF10           :
12212       printf(
12213       "\\Kdgsf10        Transmit Data General: Shift-F10                \n");
12214       break;
12215     case  K_DGSF11           :
12216       printf(
12217       "\\Kdgsf11        Transmit Data General: Shift-F11                \n");
12218       break;
12219     case  K_DGSF12           :
12220       printf(
12221       "\\Kdgsf12        Transmit Data General: Shift-F12                \n");
12222       break;
12223     case  K_DGSF13           :
12224       printf(
12225       "\\Kdgsf13        Transmit Data General: Shift-F13                \n");
12226       break;
12227     case  K_DGSF14           :
12228       printf(
12229       "\\Kdgsf14        Transmit Data General: Shift-F14                \n");
12230       break;
12231     case  K_DGSF15           :
12232       printf(
12233       "\\Kdgsf15        Transmit Data General: Shift-F15                \n");
12234       break;
12235
12236 /* Data General Function Keys (control) */
12237     case  K_DGCF01           :
12238       printf(
12239       "\\Kdgcf01        Transmit Data General: Ctrl-F1                 \n");
12240       break;
12241     case  K_DGCF02            :
12242       printf(
12243       "\\Kdgcf02        Transmit Data General: Ctrl-F2                 \n");
12244       break;
12245     case  K_DGCF03            :
12246       printf(
12247       "\\Kdgcf03        Transmit Data General: Ctrl-F3                 \n");
12248       break;
12249     case  K_DGCF04            :
12250       printf(
12251       "\\Kdgcf04        Transmit Data General: Ctrl-F4                 \n");
12252       break;
12253     case  K_DGCF05            :
12254       printf(
12255       "\\Kdgcf05        Transmit Data General: Ctrl-F5                 \n");
12256       break;
12257     case  K_DGCF06            :
12258       printf(
12259       "\\Kdgcf06        Transmit Data General: Ctrl-F6                 \n");
12260       break;
12261     case  K_DGCF07            :
12262       printf(
12263       "\\Kdgcf07        Transmit Data General: Ctrl-F7                 \n");
12264       break;
12265     case  K_DGCF08            :
12266       printf(
12267       "\\Kdgcf08        Transmit Data General: Ctrl-F8                 \n");
12268       break;
12269     case  K_DGCF09            :
12270       printf(
12271       "\\Kdgcf09        Transmit Data General: Ctrl-F9                 \n");
12272       break;
12273     case  K_DGCF10            :
12274       printf(
12275       "\\Kdgcf10        Transmit Data General: Ctrl-F10                \n");
12276       break;
12277     case  K_DGCF11            :
12278       printf(
12279       "\\Kdgcf11        Transmit Data General: Ctrl-F11                \n");
12280       break;
12281     case  K_DGCF12            :
12282       printf(
12283       "\\Kdgcf12        Transmit Data General: Ctrl-F12                \n");
12284       break;
12285     case  K_DGCF13            :
12286       printf(
12287       "\\Kdgcf13        Transmit Data General: Ctrl-F13                \n");
12288       break;
12289     case  K_DGCF14            :
12290       printf(
12291       "\\Kdgcf14        Transmit Data General: Ctrl-F14                \n");
12292       break;
12293     case  K_DGCF15            :
12294       printf(
12295       "\\Kdgcf15        Transmit Data General: Ctrl-F15                \n");
12296       break;
12297
12298 /* Data General Function Keys (control shifted) */
12299     case  K_DGCSF01          :
12300       printf(
12301     "\\Kdgcsf01       Transmit Data General: Ctrl-Shift-F1                \n");
12302       break;
12303     case  K_DGCSF02          :
12304       printf(
12305     "\\Kdgcsf02       Transmit Data General: Ctrl-Shift-F2                \n");
12306       break;
12307     case  K_DGCSF03          :
12308       printf(
12309     "\\Kdgcsf03       Transmit Data General: Ctrl-Shift-F3                \n");
12310       break;
12311     case  K_DGCSF04          :
12312       printf(
12313     "\\Kdgcsf04       Transmit Data General: Ctrl-Shift-F4                \n");
12314       break;
12315     case  K_DGCSF05          :
12316       printf(
12317     "\\Kdgcsf05       Transmit Data General: Ctrl-Shift-F5                \n");
12318       break;
12319     case  K_DGCSF06          :
12320       printf(
12321     "\\Kdgcsf06       Transmit Data General: Ctrl-Shift-F6                \n");
12322       break;
12323     case  K_DGCSF07          :
12324       printf(
12325     "\\Kdgcsf07       Transmit Data General: Ctrl-Shift-F7                \n");
12326       break;
12327     case  K_DGCSF08          :
12328       printf(
12329     "\\Kdgcsf08       Transmit Data General: Ctrl-Shift-F8                \n");
12330       break;
12331     case  K_DGCSF09          :
12332       printf(
12333     "\\Kdgcsf09       Transmit Data General: Ctrl-Shift-F9                \n");
12334       break;
12335     case  K_DGCSF10          :
12336       printf(
12337     "\\Kdgcsf10       Transmit Data General: Ctrl-Shift-F10               \n");
12338       break;
12339     case  K_DGCSF11          :
12340       printf(
12341     "\\Kdgcsf11       Transmit Data General: Ctrl-Shift-F11               \n");
12342       break;
12343     case  K_DGCSF12          :
12344       printf(
12345     "\\Kdgcsf12       Transmit Data General: Ctrl-Shift-F12               \n");
12346       break;
12347     case  K_DGCSF13          :
12348       printf(
12349     "\\Kdgcsf13       Transmit Data General: Ctrl-Shift-F13               \n");
12350       break;
12351     case  K_DGCSF14          :
12352       printf(
12353     "\\Kdgcsf14       Transmit Data General: Ctrl-Shift-F14               \n");
12354       break;
12355     case  K_DGCSF15          :
12356       printf(
12357     "\\Kdgcsf15       Transmit Data General: Ctrl-Shift-F15               \n");
12358       break;
12359
12360     case  K_DGUPARR          :
12361       printf("\\Kdguparr       Transmit Data General: Up Arrow          \n");
12362       break;
12363     case  K_DGDNARR          :
12364       printf("\\Kdgdnarr       Transmit Data General: Down Arrow        \n");
12365       break;
12366     case  K_DGLFARR          :
12367       printf("\\Kdglfarr       Transmit Data General: Left Arrow        \n");
12368       break;
12369     case  K_DGRTARR          :
12370       printf("\\Kdgrtarr       Transmit Data General: Right Arrow       \n");
12371       break;
12372     case  K_DGSUPARR     :
12373       printf("\\Kdgsuparr      Transmit Data General: Shift-Up Arrow    \n");
12374       break;
12375     case  K_DGSDNARR     :
12376       printf("\\Kdgsdnarr      Transmit Data General: Shift-Down Arrow  \n");
12377       break;
12378     case  K_DGSLFARR     :
12379       printf("\\Kdgslfarr      Transmit Data General: Shift-Left Arrow  \n");
12380       break;
12381     case  K_DGSRTARR     :
12382       printf("\\Kdgsrtarr      Transmit Data General: Shift-Right Arrow \n");
12383       break;
12384
12385     case  K_DGERASEPAGE  :
12386       printf("\\Kdgerasepage   Transmit Data General: Erase Page        \n");
12387       break;
12388     case  K_DGC1             :
12389       printf("\\Kdgc1          Transmit Data General: C1                \n");
12390       break;
12391     case  K_DGC2             :
12392       printf("\\Kdgc2          Transmit Data General: C2                \n");
12393       break;
12394     case  K_DGERASEEOL   :
12395       printf("\\Kdgeraseeol    Transmit Data General: Erase EOL         \n");
12396       break;
12397     case  K_DGC3             :
12398       printf("\\Kdgc3          Transmit Data General: C3                \n");
12399       break;
12400     case  K_DGC4             :
12401       printf("\\Kdgc4          Transmit Data General: C4                \n");
12402       break;
12403     case  K_DGCMDPRINT   :
12404       printf("\\Kdgcmdprint    Transmit Data General: Command Print     \n");
12405       break;
12406     case  K_DGHOME       :
12407       printf("\\Kdghome        Transmit Data General: Home              \n");
12408       break;
12409     case  K_DGSERASEPAGE :
12410       printf("\\Kdgserasepage  Transmit Data General: Erase Page        \n");
12411       break;
12412     case  K_DGSC1            :
12413       printf("\\Kdgsc1         Transmit Data General: Shift-C1          \n");
12414       break;
12415     case  K_DGSC2            :
12416       printf("\\Kdgsc2         Transmit Data General: Shift-C2          \n");
12417       break;
12418     case  K_DGSERASEEOL  :
12419       printf("\\Kdgseraseeol   Transmit Data General: Shift-Erase EOL  \n");
12420       break;
12421     case  K_DGSC3            :
12422       printf("\\Kdgsc3         Transmit Data General: Shift-C3          \n");
12423       break;
12424     case  K_DGSC4            :
12425       printf("\\Kdgsc4         Transmit Data General: Shift-C4          \n");
12426       break;
12427     case  K_DGSCMDPRINT  :
12428       printf("\\Kdgscmdprint   Transmit Data General: Shift-Command Print\n");
12429       break;
12430     case  K_DGBS         :
12431       printf("\\Kdgbs          Transmit Data General: Backspace         \n");
12432       break;
12433     case  K_DGSHOME      :
12434       printf("\\Kdshome        Transmit Data General: Shift-Home        \n");
12435       break;
12436
12437
12438 /* Televideo Function Keys (unshifted) */
12439     case  K_TVIF01           :
12440       printf("\\Ktvif01        Transmit Televideo: F1       \n");
12441       break;
12442     case  K_TVIF02           :
12443       printf("\\Ktvif02        Transmit Televideo: F2              \n");
12444       break;
12445     case  K_TVIF03           :
12446       printf("\\Ktvif03        Transmit Televideo: F3             \n");
12447       break;
12448     case  K_TVIF04           :
12449       printf("\\Ktvif04        Transmit Televideo: F4              \n");
12450       break;
12451     case  K_TVIF05           :
12452       printf("\\Ktvif05        Transmit Televideo: F5              \n");
12453       break;
12454     case  K_TVIF06           :
12455       printf("\\Ktvif06        Transmit Televideo: F6              \n");
12456       break;
12457     case  K_TVIF07           :
12458       printf("\\Ktvif07        Transmit Televideo: F7              \n");
12459       break;
12460     case  K_TVIF08           :
12461       printf("\\Ktvif08        Transmit Televideo: F8              \n");
12462       break;
12463     case  K_TVIF09           :
12464       printf("\\Ktvif09        Transmit Televideo: F9              \n");
12465       break;
12466     case  K_TVIF10           :
12467       printf("\\Ktvif10        Transmit Televideo: F10             \n");
12468       break;
12469     case  K_TVIF11           :
12470       printf("\\Ktvif11        Transmit Televideo: F11             \n");
12471       break;
12472     case  K_TVIF12           :
12473       printf("\\Ktvif12        Transmit Televideo: F12             \n");
12474       break;
12475     case  K_TVIF13           :
12476       printf("\\Ktvif13        Transmit Televideo: F13             \n");
12477       break;
12478     case  K_TVIF14           :
12479       printf("\\Ktvif14        Transmit Televideo: F14             \n");
12480       break;
12481     case  K_TVIF15           :
12482       printf("\\Ktvif15        Transmit Televideo: F15             \n");
12483       break;
12484     case  K_TVIF16           :
12485       printf("\\Ktvif16        Transmit Televideo: F16             \n");
12486       break;
12487
12488 /* Televideo Function Keys (shifted) */
12489     case  K_TVISF01          :
12490       printf("\\Ktvisf01       Transmit Televideo: Shift-F1 \n");
12491       break;
12492     case  K_TVISF02          :
12493       printf("\\Ktvisf02       Transmit Televideo: Shift-F2 \n");
12494       break;
12495     case  K_TVISF03            :
12496       printf("\\Ktvisf03       Transmit Televideo: Shift-F3 \n");
12497       break;
12498     case  K_TVISF04            :
12499       printf("\\Ktvisf04       Transmit Televideo: Shift-F4 \n");
12500       break;
12501     case  K_TVISF05            :
12502       printf("\\Ktvisf05       Transmit Televideo: Shift-F5 \n");
12503       break;
12504     case  K_TVISF06            :
12505       printf("\\Ktvisf06       Transmit Televideo: Shift-F6 \n");
12506       break;
12507     case  K_TVISF07            :
12508       printf("\\Ktvisf07       Transmit Televideo: Shift-F7 \n");
12509       break;
12510     case  K_TVISF08            :
12511       printf("\\Ktvisf08       Transmit Televideo: Shift-F8 \n");
12512       break;
12513     case  K_TVISF09            :
12514       printf("\\Ktvisf09       Transmit Televideo: Shift-F9 \n");
12515       break;
12516     case  K_TVISF10            :
12517       printf("\\Ktvisf10       Transmit Televideo: Shift-F10\n");
12518       break;
12519     case  K_TVISF11            :
12520       printf("\\Ktvisf11       Transmit Televideo: Shift-F11\n");
12521       break;
12522     case  K_TVISF12            :
12523       printf("\\Ktvisf12       Transmit Televideo: Shift-F12\n");
12524       break;
12525     case  K_TVISF13            :
12526       printf("\\Ktvisf13       Transmit Televideo: Shift-F13\n");
12527       break;
12528     case  K_TVISF14            :
12529       printf("\\Ktvisf14       Transmit Televideo: Shift-F14\n");
12530       break;
12531     case  K_TVISF15            :
12532       printf("\\Ktvisf15       Transmit Televideo: Shift-F15\n");
12533       break;
12534     case  K_TVISF16            :
12535       printf("\\Ktvisf16       Transmit Televideo: Shift-F16\n");
12536       break;
12537
12538 /* Televideo Edit and Special Keys */
12539     case  K_TVIBS         :
12540       printf("\\Ktvibs         Transmit Televideo: Backspace       \n");
12541       break;
12542     case  K_TVICLRLN         :
12543       printf("\\Ktviclrln      Transmit Televideo: Clear Line      \n");
12544       break;
12545     case  K_TVISCLRLN     :
12546       printf("\\Ktvisclrln     Transmit Televideo: Shift-Clear Line\n");
12547       break;
12548     case  K_TVICLRPG      :
12549       printf("\\Ktviclrpg      Transmit Televideo: Clear Page      \n");
12550       break;
12551     case  K_TVISCLRPG     :
12552       printf("\\Ktvisclrpg     Transmit Televideo: Shift-Clear Page\n");
12553       break;
12554     case  K_TVIDELCHAR    :
12555       printf("\\Ktvidelchar    Transmit Televideo: Delete Char     \n");
12556       break;
12557     case  K_TVIDELLN      :
12558       printf("\\Ktvidelln      Transmit Televideo: Delete Line     \n");
12559       break;
12560     case  K_TVIENTER         :
12561       printf("\\Ktvienter      Transmit Televideo: Enter           \n");
12562       break;
12563     case  K_TVIESC           :
12564       printf("\\Ktviesc        Transmit Televideo: Esc             \n");
12565       break;
12566     case  K_TVIHOME          :
12567       printf("\\Ktvihome       Transmit Televideo: Home            \n");
12568       break;
12569     case  K_TVISHOME         :
12570       printf("\\Ktvishome      Transmit Televideo: Shift-Home      \n");
12571       break;
12572     case  K_TVIINSERT     :
12573       printf("\\Ktviinsert     Transmit Televideo: Insert          \n");
12574       break;
12575     case  K_TVIINSCHAR    :
12576       printf("\\Ktviinschar    Transmit Televideo: Insert Char     \n");
12577       break;
12578     case  K_TVIINSLN         :
12579       printf("\\Ktviinsln      Transmit Televideo: Insert Line     \n");
12580       break;
12581     case  K_TVIPGNEXT     :
12582       printf("\\Ktvipgnext     Transmit Televideo: Page Next       \n");
12583       break;
12584     case  K_TVIPGPREV     :
12585       printf("\\Ktvipgprev     Transmit Televideo: Page Previous   \n");
12586       break;
12587     case  K_TVIREPLACE    :
12588       printf("\\Ktvireplace    Transmit Televideo: Replace         \n");
12589       break;
12590     case  K_TVIRETURN     :
12591       printf("\\Ktvireturn     Transmit Televideo: Return          \n");
12592       break;
12593     case  K_TVITAB           :
12594       printf("\\Ktvitab        Transmit Televideo: Tab             \n");
12595       break;
12596     case  K_TVISTAB          :
12597       printf("\\Ktvistab       Transmit Televideo: Shift-Tab       \n");
12598       break;
12599     case  K_TVIPRTSCN     :
12600       printf("\\Ktviprtscn     Transmit Televideo: Print Screen    \n");
12601       break;
12602     case  K_TVISESC       :
12603       printf("\\Ktvisesc       Transmit Televideo: Shift-Esc       \n");
12604       break;
12605     case  K_TVISBS        :
12606       printf("\\Ktvisbs        Transmit Televideo: Shift-Backspace \n");
12607       break;
12608     case  K_TVISENTER     :
12609       printf("\\Ktvisenter     Transmit Televideo: Shift-Enter     \n");
12610       break;
12611     case  K_TVISRETURN    :
12612       printf("\\Ktvisreturn    Transmit Televideo: Shift-Return    \n");
12613       break;
12614     case  K_TVIUPARR         :
12615       printf("\\Ktviuparr      Transmit Televideo: Up Arrow        \n");
12616       break;
12617     case  K_TVIDNARR         :
12618       printf("\\Ktvidnarr      Transmit Televideo: Down Arrow      \n");
12619       break;
12620     case  K_TVILFARR         :
12621       printf("\\Ktvilfarr      Transmit Televideo: Left Arrow      \n");
12622       break;
12623     case  K_TVIRTARR         :
12624       printf("\\Ktvirtarr      Transmit Televideo: Right Arrow     \n");
12625       break;
12626     case  K_TVISUPARR     :
12627       printf("\\Ktvisuparr     Transmit Televideo: Shift-Up Arrow  \n");
12628       break;
12629     case  K_TVISDNARR     :
12630       printf("\\Ktvisdnarr     Transmit Televideo: Shift-Down Arrow\n");
12631       break;
12632     case  K_TVISLFARR     :
12633       printf("\\Ktvislfarr     Transmit Televideo: Shift-Left Arrow\n");
12634       break;
12635     case  K_TVISRTARR     :
12636       printf("\\Ktvisrtarr     Transmit Televideo: Shift-Right Arrow\n");
12637       break;
12638     case K_TVISEND:
12639       printf("\\Ktvisend       Transmit Televideo: Send\n");
12640       break;
12641     case K_TVISSEND:
12642       printf("\\Ktvissend      Transmit Televideo: Shift-Send\n");
12643       break;
12644
12645 /* HP Function and Edit keys */
12646     case  K_HPF01            :
12647       printf("\\Khpf01         Transmit Hewlett-Packard: F1       \n");
12648       break;
12649     case  K_HPF02            :
12650       printf("\\Khpf02         Transmit Hewlett-Packard: F2              \n");
12651       break;
12652     case  K_HPF03            :
12653       printf("\\Khpf03         Transmit Hewlett-Packard: F3             \n");
12654       break;
12655     case  K_HPF04            :
12656       printf("\\Khpf04         Transmit Hewlett-Packard: F4              \n");
12657       break;
12658     case  K_HPF05            :
12659       printf("\\Khpf05         Transmit Hewlett-Packard: F5              \n");
12660       break;
12661     case  K_HPF06            :
12662       printf("\\Khpf06         Transmit Hewlett-Packard: F6              \n");
12663       break;
12664     case  K_HPF07            :
12665       printf("\\Khpf07         Transmit Hewlett-Packard: F7              \n");
12666       break;
12667     case  K_HPF08            :
12668       printf("\\Khpf08         Transmit Hewlett-Packard: F8              \n");
12669       break;
12670     case  K_HPF09            :
12671       printf("\\Khpf09         Transmit Hewlett-Packard: F9              \n");
12672       break;
12673     case  K_HPF10            :
12674       printf("\\Khpf10         Transmit Hewlett-Packard: F10             \n");
12675       break;
12676     case  K_HPF11            :
12677       printf("\\Khpf11         Transmit Hewlett-Packard: F11             \n");
12678       break;
12679     case  K_HPF12            :
12680       printf("\\Khpf12         Transmit Hewlett-Packard: F12             \n");
12681       break;
12682     case  K_HPF13            :
12683       printf("\\Khpf13         Transmit Hewlett-Packard: F13             \n");
12684       break;
12685     case  K_HPF14            :
12686       printf("\\Khpf14         Transmit Hewlett-Packard: F14             \n");
12687       break;
12688     case  K_HPF15            :
12689       printf("\\Khpf15         Transmit Hewlett-Packard: F15             \n");
12690       break;
12691     case  K_HPF16            :
12692       printf("\\Khpf16         Transmit Hewlett-Packard: F16             \n");
12693       break;
12694     case  K_HPRETURN     :
12695       printf("\\Khpreturn      Transmit Hewlett-Packard: Return\n");
12696       break;
12697     case  K_HPENTER          :
12698       printf("\\Khpenter       Transmit Hewlett-Packard: Enter (keypad)\n");
12699       break;
12700     case  K_HPBACKTAB        :
12701       printf("\\Khpbacktab     Transmit Hewlett-Packard: Back Tab\n");
12702       break;
12703         /* Siemens Nixdorf International 97801-5xx kverbs */
12704     case K_SNI_DOUBLE_0      :
12705         printf("\\Ksni_00          Transmit SNI-97801-5xx: Double-Zero\n");
12706         break;
12707     case K_SNI_C_DOUBLE_0    :
12708         printf(
12709 "\\Ksni_c_00        Transmit SNI-97801-5xx: Ctrl-Double-Zero\n");
12710         break;
12711     case K_SNI_C_CE          :
12712         printf("\\Ksni_c_ce        Transmit SNI-97801-5xx: Ctrl-CE\n");
12713         break;
12714     case K_SNI_C_COMPOSE     :
12715         printf("\\Ksni_c_compose   Transmit SNI-97801-5xx: Ctrl-Compose\n");
12716         break;
12717     case K_SNI_C_DELETE_CHAR :
12718         printf(
12719 "\\Ksni_c_del_char  Transmit SNI-97801-5xx: Ctrl-Delete Char\n");
12720         break;
12721     case K_SNI_C_DELETE_LINE :
12722         printf(
12723 "\\Ksni_c_del_line  Transmit SNI-97801-5xx: Ctrl-Delete Line\n");
12724         break;
12725     case K_SNI_C_DELETE_WORD :
12726         printf(
12727 "\\Ksni_c_del_word  Transmit SNI-97801-5xx: Ctrl-Delete Word\n");
12728         break;
12729     case K_SNI_C_CURSOR_DOWN :
12730         printf(
12731 "\\Ksni_c_dnarr     Transmit SNI-97801-5xx: Ctrl-Cursor Down\n");
12732         break;
12733     case K_SNI_C_ENDMARKE    :
12734         printf("\\Ksni_c_endmarke  Transmit SNI-97801-5xx: Ctrl-End Marke\n");
12735         break;
12736     case K_SNI_C_F01         :
12737         printf("\\Ksni_c_f01       Transmit SNI-97801-5xx: Ctrl-F1\n");
12738         break;
12739     case K_SNI_C_F02         :
12740         printf("\\Ksni_c_f02       Transmit SNI-97801-5xx: Ctrl-F2\n");
12741         break;
12742     case K_SNI_C_F03         :
12743         printf("\\Ksni_c_f03       Transmit SNI-97801-5xx: Ctrl-F3\n");
12744         break;
12745     case K_SNI_C_F04         :
12746         printf("\\Ksni_c_f04       Transmit SNI-97801-5xx: Ctrl-F4\n");
12747         break;
12748     case K_SNI_C_F05         :
12749         printf("\\Ksni_c_f05       Transmit SNI-97801-5xx: Ctrl-F5\n");
12750         break;
12751     case K_SNI_C_F06         :
12752         printf("\\Ksni_c_f06       Transmit SNI-97801-5xx: Ctrl-F6\n");
12753         break;
12754     case K_SNI_C_F07         :
12755         printf("\\Ksni_c_f07       Transmit SNI-97801-5xx: Ctrl-F7\n");
12756         break;
12757     case K_SNI_C_F08         :
12758         printf("\\Ksni_c_f08       Transmit SNI-97801-5xx: Ctrl-F8\n");
12759         break;
12760     case K_SNI_C_F09         :
12761         printf("\\Ksni_c_f09       Transmit SNI-97801-5xx: Ctrl-F9\n");
12762         break;
12763     case K_SNI_C_F10         :
12764         printf("\\Ksni_c_f10       Transmit SNI-97801-5xx: Ctrl-F10\n");
12765         break;
12766     case K_SNI_C_F11         :
12767         printf("\\Ksni_c_f11       Transmit SNI-97801-5xx: Ctrl-F11\n");
12768         break;
12769     case K_SNI_C_F12         :
12770         printf("\\Ksni_c_f12       Transmit SNI-97801-5xx: Ctrl-F12\n");
12771         break;
12772     case K_SNI_C_F13         :
12773         printf("\\Ksni_c_f13       Transmit SNI-97801-5xx: Ctrl-F13\n");
12774         break;
12775     case K_SNI_C_F14         :
12776         printf("\\Ksni_c_f14       Transmit SNI-97801-5xx: Ctrl-F14\n");
12777         break;
12778     case K_SNI_C_F15         :
12779         printf("\\Ksni_c_f15       Transmit SNI-97801-5xx: Ctrl-F15\n");
12780         break;
12781     case K_SNI_C_F16         :
12782         printf("\\Ksni_c_f16       Transmit SNI-97801-5xx: Ctrl-F16\n");
12783         break;
12784     case K_SNI_C_F17         :
12785         printf("\\Ksni_c_f17       Transmit SNI-97801-5xx: Ctrl-F17\n");
12786         break;
12787     case K_SNI_C_F18         :
12788         printf("\\Ksni_c_f18       Transmit SNI-97801-5xx: Ctrl-F18\n");
12789         break;
12790     case K_SNI_C_USER1        :
12791         printf(
12792 "\\Ksni_c_user1     Transmit SNI-97801-5xx: Ctrl-Key below F18\n");
12793         break;
12794     case K_SNI_C_F19         :
12795         printf("\\Ksni_c_f19       Transmit SNI-97801-5xx: Ctrl-F19\n");
12796         break;
12797     case K_SNI_C_USER2       :
12798         printf(
12799 "\\Ksni_c_user2     Transmit SNI-97801-5xx: Ctrl-Key below F19\n");
12800         break;
12801     case K_SNI_C_F20         :
12802         printf("\\Ksni_c_f20       Transmit SNI-97801-5xx: Ctrl-F20\n");
12803         break;
12804     case K_SNI_C_USER3       :
12805         printf(
12806 "\\Ksni_c_user3     Transmit SNI-97801-5xx: Ctrl-Key below F20\n");
12807         break;
12808     case K_SNI_C_F21         :
12809         printf("\\Ksni_c_f21       Transmit SNI-97801-5xx: Ctrl-F21\n");
12810         break;
12811     case K_SNI_C_USER4       :
12812         printf(
12813 "\\Ksni_c_user4     Transmit SNI-97801-5xx: Ctrl-Key below F21\n");
12814         break;
12815     case K_SNI_C_F22         :
12816         printf("\\Ksni_c_f22       Transmit SNI-97801-5xx: Ctrl-F22\n");
12817         break;
12818     case K_SNI_C_USER5       :
12819         printf(
12820 "\\Ksni_c_user5     Transmit SNI-97801-5xx: Ctrl-Key below F22\n");
12821         break;
12822     case K_SNI_C_HELP        :
12823         printf("\\Ksni_c_help      Transmit SNI-97801-5xx: Ctrl-Help\n");
12824         break;
12825     case K_SNI_C_HOME        :
12826         printf("\\Ksni_c_home      Transmit SNI-97801-5xx: Ctrl-Home\n");
12827         break;
12828     case K_SNI_C_INSERT_CHAR :
12829         printf(
12830 "\\Ksni_c_ins_char  Transmit SNI-97801-5xx: Ctrl-Insert Char\n");
12831         break;
12832     case K_SNI_C_INSERT_LINE :
12833         printf(
12834 "\\Ksni_c_ins_line  Transmit SNI-97801-5xx: Ctrl-Insert Line\n");
12835         break;
12836     case K_SNI_C_INSERT_WORD :
12837         printf(
12838 "\\Ksni_c_ins_word  Transmit SNI-97801-5xx: Ctrl-Insert Word\n");
12839         break;
12840     case K_SNI_C_LEFT_TAB    :
12841         printf("\\Ksni_c_left_tab  Transmit SNI-97801-5xx: Ctrl-Left Tab\n");
12842         break;
12843     case K_SNI_C_CURSOR_LEFT :
12844         printf(
12845 "\\Ksni_c_lfarr     Transmit SNI-97801-5xx: Ctrl-Cursor Left\n");
12846         break;
12847     case K_SNI_C_MODE        :
12848         printf("\\Ksni_c_mode      Transmit SNI-97801-5xx: Ctrl-Mode\n");
12849         break;
12850     case K_SNI_C_PAGE        :
12851         printf("\\Ksni_c_page      Transmit SNI-97801-5xx: Ctrl-Page\n");
12852         break;
12853     case K_SNI_C_PRINT       :
12854         printf("\\Ksni_c_print     Transmit SNI-97801-5xx: Ctrl-Print\n");
12855         break;
12856     case K_SNI_C_CURSOR_RIGHT:
12857         printf(
12858 "\\Ksni_c_rtarr     Transmit SNI-97801-5xx: Ctrl-Cursor Right\n");
12859         break;
12860     case K_SNI_C_SCROLL_DOWN :
12861         printf(
12862 "\\Ksni_c_scroll_dn Transmit SNI-97801-5xx: Ctrl-Scroll Down\n");
12863         break;
12864     case K_SNI_C_SCROLL_UP   :
12865         printf("\\Ksni_c_scroll_up Transmit SNI-97801-5xx: Ctrl-Scroll Up\n");
12866         break;
12867     case K_SNI_C_START       :
12868         printf("\\Ksni_c_start     Transmit SNI-97801-5xx: Ctrl-Start\n");
12869         break;
12870     case K_SNI_C_CURSOR_UP   :
12871         printf("\\Ksni_c_uparr     Transmit SNI-97801-5xx: Ctrl-Cursor Up\n");
12872         break;
12873     case K_SNI_C_TAB         :
12874         printf("\\Ksni_c_tab       Transmit SNI-97801-5xx: Ctrl-Tab\n");
12875         break;
12876     case K_SNI_CE            :
12877         printf("\\Ksni_ce          Transmit SNI-97801-5xx: CE\n");
12878         break;
12879     case K_SNI_CH_CODE:
12880         printf("\\Ksni_ch_code     Toggle SNI-97801-5xx: CH.CODE function.\n");
12881         break;
12882     case K_SNI_COMPOSE       :
12883         printf("\\Ksni_compose     Transmit SNI-97801-5xx: Compose\n");
12884         break;
12885     case K_SNI_DELETE_CHAR   :
12886         printf("\\Ksni_del_char    Transmit SNI-97801-5xx: Delete Char\n");
12887         break;
12888     case K_SNI_DELETE_LINE   :
12889         printf("\\Ksni_del_line    Transmit SNI-97801-5xx: Delete Line\n");
12890         break;
12891     case K_SNI_DELETE_WORD   :
12892         printf("\\Ksni_del_word    Transmit SNI-97801-5xx: Delete Word\n");
12893         break;
12894     case K_SNI_CURSOR_DOWN   :
12895         printf("\\Ksni_dnarr       Transmit SNI-97801-5xx: Cursor Down\n");
12896         break;
12897     case K_SNI_ENDMARKE      :
12898         printf("\\Ksni_endmarke    Transmit SNI-97801-5xx: End Marke\n");
12899         break;
12900     case K_SNI_F01           :
12901         printf("\\Ksni_f01         Transmit SNI-97801-5xx: F1\n");
12902         break;
12903     case K_SNI_F02           :
12904         printf("\\Ksni_f02         Transmit SNI-97801-5xx: F2\n");
12905         break;
12906     case K_SNI_F03           :
12907         printf("\\Ksni_f03         Transmit SNI-97801-5xx: F3\n");
12908         break;
12909     case K_SNI_F04           :
12910         printf("\\Ksni_f04         Transmit SNI-97801-5xx: F4\n");
12911         break;
12912     case K_SNI_F05           :
12913         printf("\\Ksni_f05         Transmit SNI-97801-5xx: F5\n");
12914         break;
12915     case K_SNI_F06           :
12916         printf("\\Ksni_f06         Transmit SNI-97801-5xx: F6\n");
12917         break;
12918     case K_SNI_F07           :
12919         printf("\\Ksni_f07         Transmit SNI-97801-5xx: F7\n");
12920         break;
12921     case K_SNI_F08           :
12922         printf("\\Ksni_f08         Transmit SNI-97801-5xx: F8\n");
12923         break;
12924     case K_SNI_F09           :
12925         printf("\\Ksni_f09         Transmit SNI-97801-5xx: F9\n");
12926         break;
12927     case K_SNI_F10           :
12928         printf("\\Ksni_f10         Transmit SNI-97801-5xx: F10\n");
12929         break;
12930     case K_SNI_F11           :
12931         printf("\\Ksni_f11         Transmit SNI-97801-5xx: F11\n");
12932         break;
12933     case K_SNI_F12           :
12934         printf("\\Ksni_f12         Transmit SNI-97801-5xx: F12\n");
12935         break;
12936     case K_SNI_F13           :
12937         printf("\\Ksni_f13         Transmit SNI-97801-5xx: F13\n");
12938         break;
12939     case K_SNI_F14           :
12940         printf("\\Ksni_f14         Transmit SNI-97801-5xx: F14\n");
12941         break;
12942     case K_SNI_F15           :
12943         printf("\\Ksni_f15         Transmit SNI-97801-5xx: F15\n");
12944         break;
12945     case K_SNI_F16           :
12946         printf("\\Ksni_f16         Transmit SNI-97801-5xx: F16\n");
12947         break;
12948     case K_SNI_F17           :
12949         printf("\\Ksni_f17         Transmit SNI-97801-5xx: F17\n");
12950         break;
12951     case K_SNI_F18           :
12952         printf("\\Ksni_f18         Transmit SNI-97801-5xx: F18\n");
12953         break;
12954     case K_SNI_USER1          :
12955         printf("\\Ksni_user1       Transmit SNI-97801-5xx: Key below F18\n");
12956         break;
12957     case K_SNI_F19           :
12958         printf("\\Ksni_f19         Transmit SNI-97801-5xx: F19\n");
12959         break;
12960     case K_SNI_USER2          :
12961         printf("\\Ksni_user2       Transmit SNI-97801-5xx: Key below F19\n");
12962         break;
12963     case K_SNI_F20           :
12964         printf("\\Ksni_f20         Transmit SNI-97801-5xx: F20\n");
12965         break;
12966     case K_SNI_USER3          :
12967         printf("\\Ksni_user3       Transmit SNI-97801-5xx: Key below F20\n");
12968         break;
12969     case K_SNI_F21           :
12970         printf("\\Ksni_f21         Transmit SNI-97801-5xx: F21\n");
12971         break;
12972     case K_SNI_USER4          :
12973         printf("\\Ksni_user4       Transmit SNI-97801-5xx: Key below F21\n");
12974         break;
12975     case K_SNI_F22           :
12976         printf("\\Ksni_f22         Transmit SNI-97801-5xx: F22\n");
12977         break;
12978     case K_SNI_USER5          :
12979         printf("\\Ksni_user5       Transmit SNI-97801-5xx: Key below F22\n");
12980         break;
12981     case K_SNI_HELP          :
12982         printf("\\Ksni_help        Transmit SNI-97801-5xx: Help\n");
12983         break;
12984     case K_SNI_HOME          :
12985         printf("\\Ksni_home        Transmit SNI-97801-5xx: Home\n");
12986         break;
12987     case K_SNI_INSERT_CHAR   :
12988         printf("\\Ksni_ins_char    Transmit SNI-97801-5xx: Insert Char\n");
12989         break;
12990     case K_SNI_INSERT_LINE   :
12991         printf("\\Ksni_ins_line    Transmit SNI-97801-5xx: Insert Line\n");
12992         break;
12993     case K_SNI_INSERT_WORD   :
12994         printf("\\Ksni_ins_word    Transmit SNI-97801-5xx: Insert Word\n");
12995         break;
12996     case K_SNI_LEFT_TAB      :
12997         printf("\\Ksni_left_tab    Transmit SNI-97801-5xx: Left Tab\n");
12998         break;
12999     case K_SNI_CURSOR_LEFT   :
13000         printf("\\Ksni_lfarr       Transmit SNI-97801-5xx: Cursor Left\n");
13001         break;
13002     case K_SNI_MODE          :
13003         printf("\\Ksni_mode        Transmit SNI-97801-5xx: Mode\n");
13004         break;
13005     case K_SNI_PAGE          :
13006         printf("\\Ksni_page        Transmit SNI-97801-5xx: Page\n");
13007         break;
13008     case K_SNI_PRINT         :
13009         printf("\\Ksni_print       Transmit SNI-97801-5xx: Print\n");
13010         break;
13011     case K_SNI_CURSOR_RIGHT  :
13012         printf("\\Ksni_rtarr       Transmit SNI-97801-5xx: Cursor Right\n");
13013         break;
13014     case K_SNI_S_DOUBLE_0    :
13015         printf(
13016 "\\Ksni_s_00        Transmit SNI-97801-5xx: Shift-Double-Zero\n");
13017         break;
13018     case K_SNI_S_CE          :
13019         printf("\\Ksni_s_ce        Transmit SNI-97801-5xx: Shift-CE\n");
13020         break;
13021     case K_SNI_S_COMPOSE     :
13022         printf("\\Ksni_s_compose   Transmit SNI-97801-5xx: Shift-Compose\n");
13023         break;
13024     case K_SNI_S_DELETE_CHAR :
13025         printf(
13026 "\\Ksni_s_del_char  Transmit SNI-97801-5xx: Shift-Delete Char\n");
13027         break;
13028     case K_SNI_S_DELETE_LINE :
13029         printf(
13030 "\\Ksni_s_del_line  Transmit SNI-97801-5xx: Shift-Delete Line\n");
13031         break;
13032     case K_SNI_S_DELETE_WORD :
13033         printf(
13034 "\\Ksni_s_del_word  Transmit SNI-97801-5xx: Shift-Delete Word\n");
13035         break;
13036     case K_SNI_S_CURSOR_DOWN :
13037         printf(
13038 "\\Ksni_s_dnarr     Transmit SNI-97801-5xx: Shift-Cursor Down\n");
13039         break;
13040     case K_SNI_S_ENDMARKE    :
13041         printf("\\Ksni_s_endmarke  Transmit SNI-97801-5xx: Shift-End Marke\n");
13042         break;
13043     case K_SNI_S_F01         :
13044         printf("\\Ksni_s_f01       Transmit SNI-97801-5xx: Shift-F1\n");
13045         break;
13046     case K_SNI_S_F02         :
13047         printf("\\Ksni_s_f02       Transmit SNI-97801-5xx: Shift-F2\n");
13048         break;
13049     case K_SNI_S_F03         :
13050         printf("\\Ksni_s_f03       Transmit SNI-97801-5xx: Shift-F3\n");
13051         break;
13052     case K_SNI_S_F04         :
13053         printf("\\Ksni_s_f04       Transmit SNI-97801-5xx: Shift-F4\n");
13054         break;
13055     case K_SNI_S_F05         :
13056         printf("\\Ksni_s_f05       Transmit SNI-97801-5xx: Shift-F5\n");
13057         break;
13058     case K_SNI_S_F06         :
13059         printf("\\Ksni_s_f06       Transmit SNI-97801-5xx: Shift-F6\n");
13060         break;
13061     case K_SNI_S_F07         :
13062         printf("\\Ksni_s_f07       Transmit SNI-97801-5xx: Shift-F7\n");
13063         break;
13064     case K_SNI_S_F08         :
13065         printf("\\Ksni_s_f08       Transmit SNI-97801-5xx: Shift-F8\n");
13066         break;
13067     case K_SNI_S_F09         :
13068         printf("\\Ksni_s_f09       Transmit SNI-97801-5xx: Shift-F9\n");
13069         break;
13070     case K_SNI_S_F10         :
13071         printf("\\Ksni_s_f10       Transmit SNI-97801-5xx: Shift-F10\n");
13072         break;
13073     case K_SNI_S_F11         :
13074         printf("\\Ksni_s_f11       Transmit SNI-97801-5xx: Shift-F11\n");
13075         break;
13076     case K_SNI_S_F12         :
13077         printf("\\Ksni_s_f12       Transmit SNI-97801-5xx: Shift-F12\n");
13078         break;
13079     case K_SNI_S_F13         :
13080         printf("\\Ksni_s_f13       Transmit SNI-97801-5xx: Shift-F13\n");
13081         break;
13082     case K_SNI_S_F14         :
13083         printf("\\Ksni_s_f14       Transmit SNI-97801-5xx: Shift-F14\n");
13084         break;
13085     case K_SNI_S_F15         :
13086         printf("\\Ksni_s_f15       Transmit SNI-97801-5xx: Shift-F15\n");
13087         break;
13088     case K_SNI_S_F16         :
13089         printf("\\Ksni_s_f16       Transmit SNI-97801-5xx: Shift-F16\n");
13090         break;
13091     case K_SNI_S_F17         :
13092         printf("\\Ksni_s_f17       Transmit SNI-97801-5xx: Shift-F17\n");
13093         break;
13094     case K_SNI_S_F18         :
13095         printf("\\Ksni_s_f18       Transmit SNI-97801-5xx: Shift-F18\n");
13096         break;
13097     case K_SNI_S_USER1        :
13098         printf(
13099 "\\Ksni_s_user1     Transmit SNI-97801-5xx: Shift-Key below F18\n");
13100         break;
13101     case K_SNI_S_F19         :
13102         printf("\\Ksni_s_f19       Transmit SNI-97801-5xx: Shift-F19\n");
13103         break;
13104     case K_SNI_S_USER2       :
13105         printf(
13106 "\\Ksni_s_user2     Transmit SNI-97801-5xx: Shift-Key below F19\n");
13107         break;
13108     case K_SNI_S_F20         :
13109         printf("\\Ksni_s_f20       Transmit SNI-97801-5xx: Shift-F20\n");
13110         break;
13111     case K_SNI_S_USER3       :
13112         printf(
13113 "\\Ksni_s_user3     Transmit SNI-97801-5xx: Shift-Key below F20\n");
13114         break;
13115     case K_SNI_S_F21         :
13116         printf("\\Ksni_s_f21       Transmit SNI-97801-5xx: Shift-F21\n");
13117         break;
13118     case K_SNI_S_USER4       :
13119         printf(
13120 "\\Ksni_s_user4     Transmit SNI-97801-5xx: Shift-Key below F21\n");
13121         break;
13122     case K_SNI_S_F22         :
13123         printf("\\Ksni_s_f22       Transmit SNI-97801-5xx: Shift-F22\n");
13124         break;
13125     case K_SNI_S_USER5       :
13126         printf(
13127 "\\Ksni_s_user5     Transmit SNI-97801-5xx: Shift-Key below F22\n");
13128         break;
13129     case K_SNI_S_HELP        :
13130         printf("\\Ksni_s_help      Transmit SNI-97801-5xx: Shift-Help\n");
13131         break;
13132     case K_SNI_S_HOME        :
13133         printf("\\Ksni_s_home      Transmit SNI-97801-5xx: Shift-Home\n");
13134         break;
13135     case K_SNI_S_INSERT_CHAR :
13136         printf(
13137 "\\Ksni_s_ins_char  Transmit SNI-97801-5xx: Shift-Insert Char\n");
13138         break;
13139     case K_SNI_S_INSERT_LINE :
13140         printf(
13141 "\\Ksni_s_ins_line  Transmit SNI-97801-5xx: Shift-Insert Line\n");
13142         break;
13143     case K_SNI_S_INSERT_WORD :
13144         printf(
13145 "\\Ksni_s_ins_word  Transmit SNI-97801-5xx: Shift-Insert Word\n");
13146         break;
13147     case K_SNI_S_LEFT_TAB    :
13148         printf("\\Ksni_s_left_tab  Transmit SNI-97801-5xx: Shift-Left Tab\n");
13149         break;
13150     case K_SNI_S_CURSOR_LEFT :
13151         printf(
13152 "\\Ksni_s_lfarr     Transmit SNI-97801-5xx: Shift-Cursor Left\n");
13153         break;
13154     case K_SNI_S_MODE        :
13155         printf("\\Ksni_s_mode      Transmit SNI-97801-5xx: Shift-Mode\n");
13156         break;
13157     case K_SNI_S_PAGE        :
13158         printf("\\Ksni_s_page      Transmit SNI-97801-5xx: Shift-Page\n");
13159         break;
13160     case K_SNI_S_PRINT       :
13161         printf("\\Ksni_s_print     Transmit SNI-97801-5xx: Shift-Print\n");
13162         break;
13163     case K_SNI_S_CURSOR_RIGHT:
13164         printf(
13165 "\\Ksni_s_rtarr     Transmit SNI-97801-5xx: Shift-Cursor Right\n");
13166         break;
13167     case K_SNI_S_SCROLL_DOWN :
13168         printf(
13169 "\\Ksni_s_scroll_dn Transmit SNI-97801-5xx: Shift-Scroll Down\n");
13170         break;
13171     case K_SNI_S_SCROLL_UP   :
13172         printf("\\Ksni_s_scroll_up Transmit SNI-97801-5xx: Shift-Scroll Up\n");
13173         break;
13174     case K_SNI_S_START       :
13175         printf("\\Ksni_s_start     Transmit SNI-97801-5xx: Shift-Start\n");
13176         break;
13177     case K_SNI_S_CURSOR_UP   :
13178         printf("\\Ksni_s_uparr     Transmit SNI-97801-5xx: Shift-Cursor Up\n");
13179         break;
13180     case K_SNI_S_TAB         :
13181         printf("\\Ksni_s_tab       Transmit SNI-97801-5xx: Shift-Tab\n");
13182         break;
13183     case K_SNI_SCROLL_DOWN   :
13184         printf("\\Ksni_scroll_dn   Transmit SNI-97801-5xx: Scroll Down\n");
13185         break;
13186     case K_SNI_SCROLL_UP     :
13187         printf("\\Ksni_scroll_up   Transmit SNI-97801-5xx: Scroll Up\n");
13188         break;
13189     case K_SNI_START         :
13190         printf("\\Ksni_start       Transmit SNI-97801-5xx: Start\n");
13191         break;
13192     case K_SNI_TAB           :
13193         printf("\\Ksni_tab         Transmit SNI-97801-5xx: Tab\n");
13194         break;
13195     case K_SNI_CURSOR_UP     :
13196         printf("\\Ksni_uparr       Transmit SNI-97801-5xx: Cursor Up\n");
13197         break;
13198
13199     case K_BA80_ATTR:
13200         printf("\\Kba80_attr       Transmit BA80: Attr\n");
13201         break;
13202     case K_BA80_C_KEY:
13203         printf("\\Kba80_c_key      Transmit BA80: C\n");
13204         break;
13205     case K_BA80_CLEAR:
13206         printf("\\Kba80_clear      Transmit BA80: Clear\n");
13207         break;
13208     case K_BA80_CMD:
13209         printf("\\Kba80_cmd        Transmit BA80: Cmd\n");
13210         break;
13211     case K_BA80_COPY:
13212         printf("\\Kba80_copy       Transmit BA80: Copy\n");
13213         break;
13214     case K_BA80_DEL:
13215         printf("\\Kba80_del        Transmit BA80: Delete\n");
13216         break;
13217     case K_BA80_DEL_B:
13218         printf("\\Kba80_del_b      Transmit BA80: Delete B\n");
13219         break;
13220     case K_BA80_DO:
13221         printf("\\Kba80_do         Transmit BA80: Do\n");
13222         break;
13223     case K_BA80_END:
13224         printf("\\Kba80_end        Transmit BA80: End\n");
13225         break;
13226     case K_BA80_ENV:
13227         printf("\\Kba80_env        Transmit BA80: Env\n");
13228         break;
13229     case K_BA80_EOP:
13230         printf("\\Kba80_eop        Transmit BA80: EOP\n");
13231         break;
13232     case K_BA80_ERASE:
13233         printf("\\Kba80_erase      Transmit BA80: Erase\n");
13234         break;
13235     case K_BA80_FMT:
13236         printf("\\Kba80_fmt        Transmit BA80: Format\n");
13237         break;
13238     case K_BA80_HELP:
13239         printf("\\Kba80_help       Transmit BA80: Help\n");
13240         break;
13241     case K_BA80_HOME:
13242         printf("\\Kba80_home       Transmit BA80: Home\n");
13243         break;
13244     case K_BA80_INS:
13245         printf("\\Kba80_ins        Transmit BA80: Insert\n");
13246         break;
13247     case K_BA80_INS_B:
13248         printf("\\Kba80_ins_b      Transmit BA80: Insert B\n");
13249         break;
13250     case K_BA80_MARK:
13251         printf("\\Kba80_mark       Transmit BA80: Mark\n");
13252         break;
13253     case K_BA80_MOVE:
13254         printf("\\Kba80_move       Transmit BA80: Move\n");
13255         break;
13256     case K_BA80_PA01:
13257         printf("\\Kba80_pa01       Transmit BA80: PA1\n");
13258         break;
13259     case K_BA80_PA02:
13260         printf("\\Kba80_pa02       Transmit BA80: PA2\n");
13261         break;
13262     case K_BA80_PA03:
13263         printf("\\Kba80_pa03       Transmit BA80: PA3\n");
13264         break;
13265     case K_BA80_PA04:
13266         printf("\\Kba80_pa04       Transmit BA80: PA4\n");
13267         break;
13268     case K_BA80_PA05:
13269         printf("\\Kba80_pa05       Transmit BA80: PA5\n");
13270         break;
13271     case K_BA80_PA06:
13272         printf("\\Kba80_pa06       Transmit BA80: PA6\n");
13273         break;
13274     case K_BA80_PA07:
13275         printf("\\Kba80_pa07       Transmit BA80: PA7\n");
13276         break;
13277     case K_BA80_PA08:
13278         printf("\\Kba80_pa08       Transmit BA80: PA8\n");
13279         break;
13280     case K_BA80_PA09:
13281         printf("\\Kba80_pa09       Transmit BA80: PA9\n");
13282         break;
13283     case K_BA80_PA10:
13284         printf("\\Kba80_pa10       Transmit BA80: PA10\n");
13285         break;
13286     case K_BA80_PA11:
13287         printf("\\Kba80_pa11       Transmit BA80: PA11\n");
13288         break;
13289     case K_BA80_PA12:
13290         printf("\\Kba80_pa12       Transmit BA80: PA12\n");
13291         break;
13292     case K_BA80_PA13:
13293         printf("\\Kba80_pa13       Transmit BA80: PA13\n");
13294         break;
13295     case K_BA80_PA14:
13296         printf("\\Kba80_pa14       Transmit BA80: PA14\n");
13297         break;
13298     case K_BA80_PA15:
13299         printf("\\Kba80_pa15       Transmit BA80: PA15\n");
13300         break;
13301     case K_BA80_PA16:
13302         printf("\\Kba80_pa16       Transmit BA80: PA16\n");
13303         break;
13304     case K_BA80_PA17:
13305         printf("\\Kba80_pa17       Transmit BA80: PA17\n");
13306         break;
13307     case K_BA80_PA18:
13308         printf("\\Kba80_pa18       Transmit BA80: PA18\n");
13309         break;
13310     case K_BA80_PA19:
13311         printf("\\Kba80_pa19       Transmit BA80: PA19\n");
13312         break;
13313     case K_BA80_PA20:
13314         printf("\\Kba80_pa20       Transmit BA80: PA20\n");
13315         break;
13316     case K_BA80_PA21:
13317         printf("\\Kba80_pa21       Transmit BA80: PA21\n");
13318         break;
13319     case K_BA80_PA22:
13320         printf("\\Kba80_pa22       Transmit BA80: PA22\n");
13321         break;
13322     case K_BA80_PA23:
13323         printf("\\Kba80_pa23       Transmit BA80: PA23\n");
13324         break;
13325     case K_BA80_PA24:
13326         printf("\\Kba80_pa24       Transmit BA80: PA24\n");
13327         break;
13328     case K_BA80_PGDN:
13329         printf("\\Kba80_pgdn       Transmit BA80: Page Down\n");
13330         break;
13331     case K_BA80_PGUP:
13332         printf("\\Kba80_pgup       Transmit BA80: Page Up\n");
13333         break;
13334     case K_BA80_PICK:
13335         printf("\\Kba80_pick       Transmit BA80: Pick\n");
13336         break;
13337     case K_BA80_PRINT:
13338         printf("\\Kba80_print      Transmit BA80: Print\n");
13339         break;
13340     case K_BA80_PUT:
13341         printf("\\Kba80_put        Transmit BA80: Put\n");
13342         break;
13343     case K_BA80_REFRESH:
13344         printf("\\Kba80_refresh    Transmit BA80: Refresh \n");
13345         break;
13346     case K_BA80_RESET:
13347         printf("\\Kba80_reset      Transmit BA80: Reset\n");
13348         break;
13349     case K_BA80_RUBOUT:
13350         printf("\\Kba80_rubout     Transmit BA80: Rubout\n");
13351         break;
13352     case K_BA80_SAVE:
13353         printf("\\Kba80_save       Transmit BA80: Save\n");
13354         break;
13355     case K_BA80_SOFTKEY1:
13356         printf("\\Kba80_softkey1   Transmit BA80: Softkey 1\n");
13357         break;
13358     case K_BA80_SOFTKEY2:
13359         printf("\\Kba80_softkey2   Transmit BA80: Softkey 2\n");
13360         break;
13361     case K_BA80_SOFTKEY3:
13362         printf("\\Kba80_softkey3   Transmit BA80: Softkey 3\n");
13363         break;
13364     case K_BA80_SOFTKEY4:
13365         printf("\\Kba80_softkey4   Transmit BA80: Softkey 4\n");
13366         break;
13367     case K_BA80_SOFTKEY5:
13368         printf("\\Kba80_softkey5   Transmit BA80: Softkey 5\n");
13369         break;
13370     case K_BA80_SOFTKEY6:
13371         printf("\\Kba80_softkey6   Transmit BA80: Softkey 6\n");
13372         break;
13373     case K_BA80_SOFTKEY7:
13374         printf("\\Kba80_softkey7   Transmit BA80: Softkey 7\n");
13375         break;
13376     case K_BA80_SOFTKEY8:
13377         printf("\\Kba80_softkey8   Transmit BA80: Softkey 8\n");
13378         break;
13379     case K_BA80_SOFTKEY9:
13380         printf("\\Kba80_softkey9   Transmit BA80: Softkey 9\n");
13381         break;
13382     case K_BA80_UNDO:
13383         printf("\\Kba80_undo       Transmit BA80: Undo\n");
13384         break;
13385
13386         case  K_I31_F01:
13387         printf("\\Ki31_f01         Transmit IBM 31xx: F1\n");
13388         break;
13389        case  K_I31_F02:         
13390         printf("\\Ki31_f02         Transmit IBM 31xx: F2\n");
13391         break;
13392        case  K_I31_F03:         
13393         printf("\\Ki31_f03         Transmit IBM 31xx: F3\n");
13394         break;
13395        case  K_I31_F04:         
13396         printf("\\Ki31_f04         Transmit IBM 31xx: F4\n");
13397         break;
13398        case  K_I31_F05:         
13399         printf("\\Ki31_f05         Transmit IBM 31xx: F5\n");
13400         break;
13401        case  K_I31_F06:         
13402         printf("\\Ki31_f06         Transmit IBM 31xx: F6\n");
13403         break;
13404        case  K_I31_F07:         
13405         printf("\\Ki31_f07         Transmit IBM 31xx: F7\n");
13406         break;
13407        case  K_I31_F08:         
13408         printf("\\Ki31_f08         Transmit IBM 31xx: F8\n");
13409         break;
13410        case  K_I31_F09:         
13411         printf("\\Ki31_f09         Transmit IBM 31xx: F9\n");
13412         break;
13413        case  K_I31_F10:         
13414         printf("\\Ki31_f10         Transmit IBM 31xx: F10\n");
13415         break;
13416        case  K_I31_F11:         
13417         printf("\\Ki31_f11         Transmit IBM 31xx: F11\n");
13418         break;
13419        case  K_I31_F12:         
13420         printf("\\Ki31_f12         Transmit IBM 31xx: F12\n");
13421         break;
13422        case  K_I31_F13:         
13423         printf("\\Ki31_f13         Transmit IBM 31xx: F13\n");
13424         break;
13425        case  K_I31_F14:         
13426         printf("\\Ki31_f14         Transmit IBM 31xx: F14\n");
13427         break;
13428        case  K_I31_F15:         
13429         printf("\\Ki31_f15         Transmit IBM 31xx: F15\n");
13430         break;
13431        case  K_I31_F16:         
13432         printf("\\Ki31_f16         Transmit IBM 31xx: F16\n");
13433         break;
13434        case  K_I31_F17:         
13435         printf("\\Ki31_f17         Transmit IBM 31xx: F17\n");
13436         break;
13437        case  K_I31_F18:         
13438         printf("\\Ki31_f18         Transmit IBM 31xx: F18\n");
13439         break;
13440        case  K_I31_F19:         
13441         printf("\\Ki31_f19         Transmit IBM 31xx: F19\n");
13442         break;
13443        case  K_I31_F20:         
13444         printf("\\Ki31_f20         Transmit IBM 31xx: F20\n");
13445         break;
13446        case  K_I31_F21:         
13447         printf("\\Ki31_f21         Transmit IBM 31xx: F21\n");
13448         break;
13449        case  K_I31_F22:         
13450         printf("\\Ki31_f22         Transmit IBM 31xx: F22\n");
13451         break;
13452        case  K_I31_F23:         
13453         printf("\\Ki31_f23         Transmit IBM 31xx: F23\n");
13454         break;
13455        case  K_I31_F24:         
13456         printf("\\Ki31_f24         Transmit IBM 31xx: F24\n");
13457         break;
13458        case  K_I31_F25:         
13459         printf("\\Ki31_f25         Transmit IBM 31xx: F25\n");
13460         break;
13461        case  K_I31_F26:         
13462         printf("\\Ki31_f26         Transmit IBM 31xx: F26\n");
13463         break;
13464        case  K_I31_F27:         
13465         printf("\\Ki31_f27         Transmit IBM 31xx: F27\n");
13466         break;
13467        case  K_I31_F28:         
13468         printf("\\Ki31_f28         Transmit IBM 31xx: F28\n");
13469         break;
13470        case  K_I31_F29:         
13471         printf("\\Ki31_f29         Transmit IBM 31xx: F29\n");
13472         break;
13473        case  K_I31_F30:         
13474         printf("\\Ki31_f30         Transmit IBM 31xx: F30\n");
13475         break;
13476        case  K_I31_F31:         
13477         printf("\\Ki31_f31         Transmit IBM 31xx: F31\n");
13478         break;
13479        case  K_I31_F32:         
13480         printf("\\Ki31_f32         Transmit IBM 31xx: F32\n");
13481         break;
13482        case  K_I31_F33:         
13483         printf("\\Ki31_f33         Transmit IBM 31xx: F33\n");
13484         break;
13485        case  K_I31_F34:         
13486         printf("\\Ki31_f34         Transmit IBM 31xx: F34\n");
13487         break;
13488        case  K_I31_F35:         
13489         printf("\\Ki31_f35         Transmit IBM 31xx: F35\n");
13490         break;
13491        case  K_I31_F36:         
13492         printf("\\Ki31_f36         Transmit IBM 31xx: F36\n");
13493         break;
13494        case  K_I31_PA1:         
13495         printf("\\Ki31_pa1         Transmit IBM 31xx: PA1\n");
13496         break;
13497        case  K_I31_PA2:         
13498         printf("\\Ki31_pa2         Transmit IBM 31xx: PA2\n");
13499         break;
13500        case  K_I31_PA3:         
13501         printf("\\Ki31_pa3         Transmit IBM 31xx: PA3\n");
13502         break;
13503        case  K_I31_RESET:
13504         printf("\\Ki31_reset       Transmit IBM 31xx: Reset\n");
13505         break;            
13506        case  K_I31_JUMP:        
13507         printf("\\Ki31_jump        Transmit IBM 31xx: Jump\n");
13508         break;
13509        case  K_I31_CLEAR:       
13510         printf("\\Ki31_clear       Transmit IBM 31xx: Clear\n");
13511         break;
13512        case  K_I31_ERASE_EOF:   
13513         printf("\\Ki31_erase_eof   Transmit IBM 31xx: Erase to End of Field\n");
13514         break;
13515        case  K_I31_ERASE_EOP:   
13516         printf("\\Ki31_eop         Transmit IBM 31xx: Erase to End of Page\n");
13517         break;
13518        case  K_I31_ERASE_INP:   
13519         printf("\\Ki31_inp         Transmit IBM 31xx: Erase Input Operation\n");
13520         break;
13521        case  K_I31_INSERT_CHAR: 
13522         printf("\\Ki31_ins_char    Transmit IBM 31xx: Insert Character\n");
13523         break;
13524        case  K_I31_INSERT_SPACE:
13525         printf("\\Ki31_ins_space   Transmit IBM 31xx: Insert Space\n");
13526         break;
13527        case  K_I31_DELETE:      
13528         printf("\\Ki31_delete      Transmit IBM 31xx: Delete Character\n");
13529         break;
13530        case  K_I31_INS_LN:      
13531         printf("\\Ki31_ins_line    Transmit IBM 31xx: Insert Line\n");
13532         break;
13533        case  K_I31_DEL_LN:      
13534         printf("\\Ki31_del_ln      Transmit IBM 31xx: Delete Line\n");
13535         break;
13536        case  K_I31_PRINT_LINE:  
13537         printf("\\Ki31_prt_line    Transmit IBM 31xx: Print Line\n");
13538         break;
13539        case  K_I31_PRINT_MSG:   
13540         printf("\\Ki31_prt_msg     Transmit IBM 31xx: Print Message\n");
13541         break;
13542        case  K_I31_PRINT_SHIFT: 
13543         printf("\\Ki31_prt_shift   Transmit IBM 31xx: Print Shift\n");
13544         break;
13545        case  K_I31_CANCEL:      
13546         printf("\\Ki31_cancel      Transmit IBM 31xx: Cancel\n");
13547         break;
13548        case  K_I31_SEND_LINE:   
13549         printf("\\Ki31_send_line   Transmit IBM 31xx: Send Line\n");
13550         break;
13551        case  K_I31_SEND_MSG:    
13552         printf("\\Ki31_send_msg    Transmit IBM 31xx: Send Message\n");
13553         break;
13554        case  K_I31_SEND_PAGE:   
13555         printf("\\Ki31_send_page   Transmit IBM 31xx: Send Page\n");
13556         break;
13557        case  K_I31_HOME:        
13558         printf("\\Ki31_home        Transmit IBM 31xx: Home\n");
13559         break;
13560        case  K_I31_BACK_TAB:    
13561         printf("\\Ki31_back_tab    Transmit IBM 31xx: Back Tab\n");
13562         break;
13563        case  K_SUN_STOP: 
13564         printf("\\Ksunstop         Transmit SUN Console: Stop\n");
13565         break;
13566        case  K_SUN_AGAIN:
13567         printf("\\Ksunagain        Transmit SUN Console: Again\n");
13568         break;
13569        case  K_SUN_PROPS:
13570         printf("\\Ksunprops        Transmit SUN Console: Props\n");
13571         break;
13572        case  K_SUN_UNDO: 
13573         printf("\\Ksunundo         Transmit SUN Console: Undo\n");
13574         break;
13575        case  K_SUN_FRONT:
13576         printf("\\Ksunfront        Transmit SUN Console: Front\n");
13577         break;
13578        case  K_SUN_COPY: 
13579         printf("\\Ksuncopy         Transmit SUN Console: Copy\n");
13580         break;
13581        case  K_SUN_OPEN: 
13582         printf("\\Ksunopen         Transmit SUN Console: Open\n");
13583         break;
13584        case  K_SUN_PASTE:
13585         printf("\\Ksunpaste        Transmit SUN Console: Paste\n");
13586         break;
13587        case  K_SUN_FIND: 
13588         printf("\\Ksunfind         Transmit SUN Console: Find\n");
13589         break;
13590        case  K_SUN_CUT:  
13591         printf("\\Ksuncut          Transmit SUN Console: Cut\n");
13592         break;
13593        case  K_SUN_HELP: 
13594         printf("\\Ksunhelp         Transmit SUN Console: Help\n");
13595         break;
13596
13597        default:
13598         printf("No additional help available for this kverb\n");
13599   }
13600     printf("\n");
13601
13602     /* This is not the proper way to do it since it doesn't show  */
13603     /* all emulations, nor does it show the special modes, but it */
13604     /* is better than nothing.                                    */
13605
13606     printf("Current bindings:\n");
13607     found = 0;
13608     for (i = 256; i < KMSIZE ; i++) {
13609         con_event evt = mapkey(i);
13610         if (evt.type != kverb)
13611           continue;
13612         if ((evt.kverb.id & ~F_KVERB) == xx) {
13613             found = 1;
13614             printf("  \\%-4d - %s\n",i,keyname(i));
13615         }
13616     }
13617 #ifdef OS2MOUSE
13618     for ( button = 0 ; button < MMBUTTONMAX ; button++ )
13619       for ( event = 0 ; event < MMEVENTSIZE ; event++ )
13620         if ( mousemap[button][event].type == kverb ) {
13621             if ( (mousemap[button][event].kverb.id & ~F_KVERB) == xx ) {
13622                 found = 1;
13623                 printf("  Mouse - %s\n",mousename(button,event));
13624             }
13625         }
13626 #endif /* OS2MOUSE */
13627
13628     if ( !found ) {
13629         printf("  (none)\n");
13630     }
13631     return(0);
13632 }
13633 #endif /* NOKVERBS */
13634 #endif /* OS2 */
13635
13636 #ifndef NOXFER
13637 /*  D O H R M T  --  Give help about REMOTE command  */
13638
13639 static char *hrset[] = {
13640 "Syntax:  REMOTE SET parameter value",
13641 "Example: REMOTE SET FILE TYPE BINARY",
13642 "  Asks the Kermit server to set the named parameter to the given value.",
13643 "  Equivalent to typing the corresponding SET command directly to the other",
13644 "  Kermit if it were in interactive mode.", "" };
13645
13646 int
13647 dohrmt(xx) int xx; {
13648     int x;
13649     if (xx == -3) return(hmsga(hmhrmt));
13650     if (xx < 0) return(xx);
13651     if ((x = cmcfm()) < 0) return(x);
13652     switch (xx) {
13653
13654 case XZCPY:
13655     return(hmsg("Syntax: REMOTE COPY source destination\n\
13656   Asks the Kermit server to copy the source file to destination.\n\
13657   Synonym: RCOPY."));
13658
13659 case XZCWD:
13660 #ifdef NEWFTP
13661     return(hmsg("Syntax: REMOTE CD [ name ]\n\
13662   Asks the Kermit or FTP server to change its working directory or device.\n\
13663   If the device or directory name is omitted, restore the default.\n\
13664   Synonym: RCD."));
13665 #else
13666     return(hmsg("Syntax: REMOTE CD [ name ]\n\
13667   Asks the Kermit server to change its working directory or device.\n\
13668   If the device or directory name is omitted, restore the default.\n\
13669   Synonym: RCD."));
13670 #endif /* NEWFTP */
13671
13672 case XZDEL:
13673 #ifdef NEWFTP
13674     return(hmsg("Syntax: REMOTE DELETE filespec\n\
13675   Asks the Kermit or FTP server to delete the named file(s).\n\
13676   Synonym: RDEL."));
13677 #else
13678     return(hmsg("Syntax: REMOTE DELETE filespec\n\
13679   Asks the Kermit server to delete the named file(s).\n\
13680   Synonym: RDEL."));
13681 #endif /* NEWFTP */
13682
13683 case XZMKD:
13684 #ifdef NEWFTP
13685     return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
13686   Asks the Kermit or FTP server to create the named directory.\n\
13687   Synonym: RMKDIR."));
13688 #else
13689     return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
13690   Asks the Kermit server to create the named directory.\n\
13691   Synonym: RMKDIR."));
13692 #endif /* NEWFTP */
13693
13694 case XZRMD:
13695 #ifdef NEWFTP
13696     return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
13697   Asks the Kermit or FTP server to remove the named directory.\n\
13698   Synonym: RRMDIR."));
13699 #else
13700     return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
13701   Asks the Kermit server to remove the named directory.\n\
13702   Synonym: RRMDIR."));
13703 #endif /* NEWFTP */
13704
13705 case XZDIR:
13706 #ifdef NEWFTP
13707     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
13708   Asks the Kermit or FTP server to provide a directory listing of the named\n\
13709   file(s) or if no file specification is given, of all files in its current\n\
13710   directory.  Synonym: RDIR."));
13711 #else
13712     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
13713   Asks the Kermit server to provide a directory listing of the named\n\
13714   file(s) or if no file specification is given, of all files in its current\n\
13715   directory.  Synonym: RDIR."));
13716 #endif /* NEWFTP */
13717
13718 case XZHLP:
13719 #ifdef NEWFTP
13720     return(hmsg("Syntax: REMOTE HELP\n\
13721   Asks the Kermit or FTP server to list the services it provides.\n\
13722   Synonym: RHELP."));
13723 #else
13724     return(hmsg("Syntax: REMOTE HELP\n\
13725   Asks the Kermit server to list the services it provides.\n\
13726   Synonym: RHELP."));
13727 #endif /* NEWFTP */
13728
13729 case XZHOS:
13730     return(hmsg("Syntax: REMOTE HOST command\n\
13731   Sends a command to the other computer in its own command language\n\
13732   through the Kermit server that is running on that host.  Synonym: RHOST."));
13733
13734 #ifndef NOFRILLS
13735 case XZKER:
13736     return(hmsg("Syntax: REMOTE KERMIT command\n\
13737   Sends a command to the remote Kermit server in its own command language.\n\
13738   Synonym: RKERMIT."));
13739
13740 case XZLGI:
13741     return(hmsg("Syntax: REMOTE LOGIN user password [ account ]\n\
13742   Logs in to a remote Kermit server that requires you login.  Note: RLOGIN\n\
13743   is NOT a synonym for REMOTE LOGIN."));
13744
13745 case XZLGO:
13746     return(hmsg("Syntax: REMOTE LOGOUT\n\
13747   Logs out from a remote Kermit server to which you have previously logged in."
13748 ));
13749
13750 case XZPRI:
13751     return(hmsg("Syntax: REMOTE PRINT filespec [ options ]\n\
13752   Sends the specified file(s) to the remote Kermit and ask it to have the\n\
13753   file printed on the remote system's printer, using any specified options.\n\
13754   Synonym: RPRINT."));
13755 #endif /* NOFRILLS */
13756
13757 case XZREN:
13758 #ifdef NEWFTP
13759     return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
13760   Asks the Kermit or FTP server to rename the file.  Synonym: RRENAME."));
13761 #else
13762     return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
13763   Asks the Kermit server to rename the file.  Synonym: RRENAME."));
13764 #endif /* NEWFTP */
13765
13766 case XZSET:
13767     return(hmsga(hrset));
13768
13769 case XZSPA:
13770     return(hmsg("Syntax: REMOTE SPACE [ name ]\n\
13771   Asks the Kermit server to tell you about its disk space on the current\n\
13772   disk or directory, or in the one that you name.  Synonym: RSPACE."));
13773
13774 #ifndef NOFRILLS
13775 case XZTYP:
13776 #ifdef NEWFTP
13777     return(hmsg("Syntax: REMOTE TYPE file\n\
13778   Asks the Kermit or FTP server to send the named file to your screen.\n\
13779   Synonym: RTYPE."));
13780 #else
13781     return(hmsg("Syntax: REMOTE TYPE file\n\
13782   Asks the Kermit server to send the named file(s) to your screen.\n\
13783   Synonym: RTYPE."));
13784 #endif /* NEWFTP */
13785
13786
13787 case XZWHO:
13788     return(hmsg("Syntax: REMOTE WHO [ name ]\n\
13789   Asks the Kermit server to list who's logged in, or to give information\n\
13790   about the named user.  Synonym: RWHO."));
13791 #endif /* NOFRILLS */
13792
13793 #ifndef NOSPL
13794 case XZQUE:
13795     return(hmsg(
13796 "Syntax: [ REMOTE ] QUERY { KERMIT, SYSTEM, USER } variable-name\n\
13797   Asks the Kermit server to send the value of the named variable of the\n\
13798   given type, and make it available in the \\v(query) variable.  When the\n\
13799   type is KERMIT functions may also be specified as if they were variables."));
13800
13801 case XZASG:
13802     return(hmsg(
13803 "Syntax: REMOTE ASSIGN variable-name [ value ]\n\
13804   Assigns the given value to the named global variable on the server.\n\
13805   Synonyms: RASG, RASSIGN."));
13806 #endif /* NOSPL */
13807
13808 case XZPWD:
13809     return(hmsg(
13810 #ifdef NEWFTP
13811 "Syntax: REMOTE PWD\n\
13812   Asks the Kermit server to display its current working directory.\n\
13813   Synonym: RPWD."));
13814 #else
13815 "Syntax: REMOTE PWD\n\
13816   Asks the Kermit or FTP server to display its current working directory.\n\
13817   Synonym: RPWD."));
13818 #endif /* NEWFTP */
13819
13820 case XZXIT:
13821 #ifdef NEWFTP
13822     return(hmsg("Syntax: REMOTE EXIT\n\
13823    Asks the Kermit server to exit (without disconnecting), or closes an FTP\n\
13824    connection.  Synonym: REXIT, and (for FTP only) BYE, FTP BYE."));
13825 #else
13826     return(hmsg("Syntax: REMOTE EXIT\n\
13827   Asks the Kermit server to exit.  Synonym: REXIT."));
13828 #endif /* NEWFTP */
13829
13830 default:
13831     if ((x = cmcfm()) < 0) return(x);
13832     printf("?Sorry, no help available - \"%s\"\n",cmdbuf);
13833     return(-9);
13834     }
13835 }
13836 #endif /* NOXFER */
13837 #endif /* NOHELP */
13838 #endif /* NOICP */