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, New York City
11     Jeffrey E Altman <jaltman@secure-endpoints.com>
12       Secure Endpoints Inc., New York City
13 
14   Copyright (C) 1985, 2017,
15     Trustees of Columbia University in the City of New York.
16     All rights reserved.  See the C-Kermit COPYING.TXT file or the
17     copyright text in the ckcmai.c module for disclaimer and permissions.
18 
19   This module contains HELP command and other long text strings.
20 
21   IMPORTANT: Character string constants longer than about 250 are not portable.
22   Longer strings should be broken up into arrays of strings and accessed with
23   hmsga() rather than hmsg().  (This statement was true in the 1980s and
24   probably is not a big concern in the 21st Century, but you never know;
25   there still might exist some 16-bit platforms and C compilers that have
26   restrictions like this.
27 */
28 #include "ckcsym.h"
29 #include "ckcdeb.h"
30 #include "ckcnet.h"
31 #include "ckcasc.h"
32 #include "ckcker.h"
33 #include "ckuusr.h"
34 #include "ckcxla.h"
35 #ifdef OS2
36 #ifdef NT
37 #include <windows.h>
38 #else /* not NT */
39 #define INCL_KBD
40 #ifdef OS2MOUSE
41 #define INCL_MOU
42 #endif /* OS2MOUSE */
43 #define INCL_DOSMISC
44 #define INCL_DOSDEVICES
45 #include <os2.h>                /* This pulls in a whole load of stuff */
46 #undef COMMENT
47 #endif /* NT */
48 #include "ckocon.h"
49 #include "ckokvb.h"
50 #include "ckokey.h"
51 #endif /* OS2 */
52 
53 extern char * ck_cryear;		/* For copyright notice */
54 
55 extern xx_strp xxstring;
56 extern char * ccntab[];
57 /*
58   hlptok contains the string for which the user requested help.  This is
59   useful for distinguishing synonyms, in case different help text is needed
60   depending on which synonym was given.
61 */
62 extern char * hlptok;
63 
64 #ifndef NOIKSD
65     extern int inserver;
66 #endif /* IKSD */
67 
68 #ifndef NOICP
69 extern int cmflgs;
70 
71 #ifdef DCMDBUF
72 extern char *cmdbuf, *atmbuf;
73 #else
74 extern char cmdbuf[], atmbuf[];
75 #endif /* DCMDBUF */
76 #endif /* NOICP */
77 
78 extern char *xarg0;
79 extern int nrmt, nprm, dfloc, local, parity, escape;
80 extern int turn, flow;
81 extern int binary, quiet, keep;
82 extern int success, xaskmore;
83 #ifdef OS2
84 extern int tt_rows[], tt_cols[];
85 #else /* OS2 */
86 extern int tt_rows, tt_cols;
87 #endif /* OS2 */
88 extern int cmd_rows, cmd_cols;
89 
90 extern long speed;
91 extern char *dftty, *versio, *ckxsys;
92 #ifndef NOHELP
93 extern char *helpfile;
94 #endif /* NOHELP */
95 extern struct keytab prmtab[];
96 #ifndef NOXFER
97 extern struct keytab remcmd[];
98 #endif /* NOXFER */
99 
100 #ifndef NOICP
101 
102 /*  Interactive help strings  */
103 
104 /* Top-level HELP text.  IMPORTANT: Also see tophlpi[] for IKSD. */
105 
106 static char *tophlp[] = {
107 "Trustees of Columbia University in the City of New York.\n",
108 
109 #ifndef NOHELP
110 "  Type EXIT    to exit.",
111 #ifdef OS2
112 "  Type INTRO   for a brief introduction to the C-Kermit Command screen.",
113 #else
114 "  Type INTRO   for a brief introduction to C-Kermit.",
115 #endif /* OS2 */
116 "  Type LICENSE to see the C-Kermit license.",
117 "  Type HELP    followed by a command name for help about a specific command.",
118 #ifndef NOPUSH
119 #ifdef UNIX
120 "  Type MANUAL  to access the C-Kermit manual page.",
121 #else
122 #ifdef VMS
123 "  Type MANUAL  to access the C-Kermit help topic.",
124 #else
125 "  Type MANUAL  to access the C-Kermit manual.",
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",
148 #else
149 "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
150 "2nd Edition, Digital Press / Butterworth-Heinemann 1997, ISBN 1-55558-164-1,",
151 "plus supplements at http://www.kermitproject.org/ckermit.html#doc.",
152 #endif /* MAC */
153 #endif /* OS2 */
154 #ifdef MAC
155 " ",
156 "Also see the Mac Kermit Doc and Bwr files on the Mac Kermit diskette.\n",
157 #else
158 #ifdef HPUX10
159 " ",
160 "See the files in /usr/share/lib/kermit/ for additional information.",
161 #endif /* HPUX10 */
162 #endif /* MAC */
163 ""
164 };
165 
166 #ifndef NOIKSD
167 static char *tophlpi[] = {              /* Top-level help for IKSD */
168 
169 "Trustees of Columbia University in the City of New York.\n",
170 
171 #ifndef NOHELP
172 "  Type INTRO   for a brief introduction to Kermit commands.",
173 "  Type VERSION for version and copyright information.",
174 "  Type HELP    followed by a command name for help about a specific command.",
175 "  Type SUPPORT to learn how to get technical support.",
176 "  Type LOGOUT  (or EXIT) to log out.",
177 "  Press ?      (question mark) at the prompt, or anywhere within a command,",
178 "               for a menu (context-sensitive help, menu on demand).",
179 #else
180 "Press ? for a list of commands; see documentation for detailed descriptions.",
181 #endif /* NOHELP */
182 " ",
183 "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
184 "2nd Edition, Digital Press (1997), ISBN 1-55558-164-1.  More info at the",
185 "Kermit Project website, http://www.kermitproject.org/.",
186 ""
187 };
188 #endif /* NOIKSD */
189 
190 #ifndef NOHELP
191 char *newstxt[] = {
192 #ifdef OS2
193 "Welcome to C-Kermit for Windows, the Open-Source successor to",
194 "Columbia University's Kermit 95 package.",
195 
196 #ifdef BETATEST
197 " ",
198 "THIS IS A PRERELEASE TEST VERSION NOT SUITABLE FOR PRODUCTION."
199 "FOR DETAILS, SEE http://www.kermitproject.org/ckwindows.html",
200 #endif /* BETATEST */
201 
202 " ",
203 "Major new features since the final Kermit 95 release include:",
204 #else
205 "Welcome to C-Kermit 9.0.304.  New features since 8.0.211 include:",
206 #endif /* OS2 */
207 " . Open Source Simplified 3-Clause BSD License",
208 #ifdef OS2
209 " . Source code!  The Windows edition of C-Kermit, formerly known",
210 "   as Kermit 95 or K-95, is now available under the Revised 3-Clause",
211 "   BSD Open Source license.",
212 #endif /* OS2 */
213 #ifndef OS2
214 " . Full 64-bit memory model on platforms that support it",
215 " . Large file support (64-bit file size) on most platforms",
216 " . Long integer variables and constants in commands and scripts",
217 #endif /* OS2 */
218 " . Bigger maximum command and macro lengths",
219 " . Bigger filename expansion space",
220 " . New super-flexible RENAME command (HELP RENAME)",
221 " . New CHANGE command for changing text files (HELP CHANGE)",
222 " . New COPY and DIRECTORY command options (HELP COPY, HELP DIRECTORY)",
223 " . New TOUCH command (HELP TOUCH)",
224 #ifdef UNIX
225 " . Limited Unix Locale support (HELP SET LOCALE)",
226 #endif /* UNIX */
227 #ifdef CK_SSL
228 " . Raw SSL/TLS connections for connecting to POP3 and similar services",
229 #endif /* CK_SSL */
230 " . At the prompt, Ctrl-K recalls most recent filename",
231 " . Scripting and performance improvements",
232 " . Bug fixes",
233 " ",
234 "Documentation:",
235 " 1. http://www.kermitproject.org/usingckermit.html",
236 "    \"Using C-Kermit\", second edition (1997), current with C-Kermit 6.0.",
237 " ",
238 " 2. http://www.kermitproject.org/ckermit70.html",
239 "    which documents the new features of C-Kermit 7.0.",
240 " ",
241 " 3. http://www.kermitproject.org/ckermit80.html",
242 "    which documents the new features of C-Kermit 8.0.",
243 " ",
244 " 4. http://www.kermitproject.org/ckermit90.html",
245 "    which documents the new features of C-Kermit 9.0.",
246 " ",
247 "If the release date shown by the VERSION command is long past, be sure to",
248 "check the Kermit website to see if there have been updates:",
249 " ",
250 "  http://www.kermitproject.org/             (Kermit Project home page)",
251 "  http://www.kermitproject.org/ckermit.html (C-Kermit home page)",
252 "  http://www.kermitproject.org/ckdaily.html (C-Kermit development)",
253 ""
254 };
255 #endif /* NOHELP */
256 
257 #ifndef NOHELP
258 char *introtxt[] = {
259 #ifdef OS2
260 "Welcome to C-Kermit for Windows, communication software for:",
261 #else
262 #ifdef UNIX
263 "Welcome to UNIX C-Kermit communications software for:",
264 #else
265 #ifdef VMS
266 "Welcome to VMS C-Kermit communications software for:",
267 #else
268 #ifdef VOS
269 "Welcome to VOS C-Kermit communications software for:",
270 #else
271 #ifdef MAC
272 "Welcome to Mac Kermit communications software for:",
273 #else
274 "Welcome to C-Kermit communications software for:",
275 #endif /* MAC */
276 #endif /* VOS */
277 #endif /* VMS */
278 #endif /* UNIX */
279 #endif /* OS2 */
280 #ifndef NOXFER
281 " . Error-free and efficient file transfer",
282 #endif /* NOXFER */
283 #ifndef NOLOCAL
284 #ifdef OS2
285 " . VT320/220/102/100/52, ANSI, Wyse, Linux, Televideo, and other emulations",
286 #else
287 #ifdef MAC
288 " . VT220 terminal emulation",
289 #else
290 " . Terminal connection",
291 #endif /* MAC */
292 #endif /* OS2 */
293 #endif /* NOLOCAL */
294 #ifndef NOSPL
295 " . Script programming",
296 #endif /* NOSPL */
297 #ifndef NOICS
298 " . International character set conversion",
299 #endif /* NOICS */
300 #ifndef NODIAL
301 #ifndef NOSPL
302 " . Numeric and alphanumeric paging",
303 #endif /* NOSPL */
304 #endif /* NODIAL */
305 
306 #ifndef NOLOCAL
307 " ",
308 "Supporting:",
309 " . Serial connections, direct or dialed.",
310 #ifndef NODIAL
311 " . Automatic modem dialing",
312 #endif /* NODIAL */
313 #ifdef TCPSOCKET
314 " . TCP/IP network connections:",
315 #ifdef TNCODE
316 "   - Telnet sessions",
317 #endif /* TNCODE */
318 #ifdef SSHBUILTIN
319 "   - SSH v1 and v2 connections",
320 #else
321 #ifdef ANYSSH
322 "   - SSH connections via external agent",
323 #endif /* ANYSSH */
324 #endif /* SSHBUILTIN */
325 #ifdef RLOGCODE
326 "   - Rlogin sessions",
327 #endif /* RLOGCODE */
328 #ifdef NEWFTP
329 "   - FTP sessions",
330 #endif /* NEWFTP */
331 #ifdef CKHTTP
332 "   - HTTP 1.1 sessions",
333 #endif /* CKHTTP */
334 #ifdef IKSD
335 "   - Internet Kermit Service",
336 #endif /* IKSD */
337 #endif /* TCPSOCKET */
338 #ifdef ANYX25
339 " . X.25 network connections",
340 #endif /* ANYX25 */
341 #ifdef OS2
342 #ifdef DECNET
343 " . DECnet/PATHWORKS LAT Ethernet connections",
344 #endif /* DECNET */
345 #ifdef SUPERLAT
346 " . Meridian Technologies' SuperLAT connections",
347 #endif /* SUPERLAT */
348 #ifdef NPIPE
349 " . Named-pipe connections",
350 #endif /* NPIPE */
351 #ifdef CK_NETBIOS
352 " . NETBIOS connections",
353 #endif /* CK_NETBIOS */
354 #endif /* OS2 */
355 #endif /* NOLOCAL */
356 
357 " ",
358 "While typing commands, you may use the following special characters:",
359 " . DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
360 " . CTRL-W:      Delete the most recent word typed.",
361 " . CTRL-U:      Delete the current line.",
362 " . CTRL-R:      Redisplay the current line.",
363 
364 #ifdef CK_RECALL
365 #ifdef OS2
366 " . Uparrow:     Command recall - go backwards in command recall buffer.",
367 " . Downarrow:   Command recall - go forward in command recall buffer.",
368 #ifndef NOIKSD
369 "   (Note: Arrow keys can be used only on the PC's physical keyboard.)",
370 #endif /* NOIKSD */
371 #endif /* OS2 */
372 " . CTRL-P:      Command recall - go backwards in command recall buffer.",
373 " . CTRL-B:      Command recall - same as Ctrl-P.",
374 " . CTRL-N:      Command recall - go forward in command recall buffer.",
375 #endif /* CK_RECALL */
376 #ifndef NOLASTFILE
377 " . CTRL-K:      Insert the most recently entered local file specifiction.",
378 #endif	/* NOLASTFILE */
379 
380 " . ?            (question mark) Display a menu for the current command field."
381 ,
382 " . ESC          (or TAB or Ctrl-I) Attempt to complete the current field.",
383 " . \\            (backslash) include the following character literally",
384 #ifndef NOSPL
385 "                or introduce a backslash code, variable, or function.",
386 #else
387 "                or introduce a numeric backslash code.",
388 #endif /* NOSPL */
389 " ",
390 
391 "IMPORTANT: Since backslash (\\) is Kermit's command-line escape character,",
392 "you must enter DOS, Windows, or OS/2 pathnames using either forward slash (/)"
393 ,
394 "or double backslash (\\\\) as the directory separator in most contexts.",
395 "Examples: C:/TMP/README.TXT, C:\\\\TMP\\\\README.TXT.",
396 " ",
397 
398 "Command words other than filenames can be abbreviated in most contexts.",
399 " ",
400 
401 "Basic commands:",
402 "  EXIT          Exit from Kermit",
403 "  HELP          Request general help",
404 "  HELP command  Request help about the given command",
405 "  TAKE          Execute commands from a file",
406 "  TYPE          Display a file on your screen",
407 "  ORIENTATION   Explains directory structure",
408 " ",
409 
410 #ifndef NOXFER
411 "Commands for file transfer:",
412 "  SEND          Send files",
413 "  RECEIVE       Receive files",
414 "  GET           Get files from a Kermit server",
415 #ifdef CK_RESEND
416 "  RESEND        Recover an interrupted send",
417 "  REGET         Recover an interrupted get from a server",
418 #endif /* CK_RESEND */
419 #ifndef NOSERVER
420 "  SERVER        Be a Kermit server",
421 #endif /* NOSERVER */
422 " ",
423 "File-transfer speed selection:",
424 "  FAST          Use fast settings -- THIS IS THE DEFAULT",
425 "  CAUTIOUS      Use slower, more cautious settings",
426 "  ROBUST        Use extremely slow and cautious settings",
427 " ",
428 "File-transfer performance fine tuning:",
429 "  SET RECEIVE PACKET-LENGTH  Kermit packet size",
430 "  SET WINDOW                 Number of sliding window slots",
431 "  SET PREFIXING              Amount of control-character prefixing",
432 #endif /* NOXFER */
433 
434 #ifndef NOLOCAL
435 " ",
436 "To make a direct serial connection:",
437 #ifdef OS2
438 #ifdef NT
439 #ifdef CK_TAPI
440 "  SET PORT TAPI Select TAPI communication device",
441 #endif /* CK_TAPI */
442 "  SET PORT      Select serial communication device",
443 #else
444 "  SET PORT      Select serial communication port or server",
445 #endif /* NT */
446 #else
447 "  SET LINE      Select serial communication device",
448 #endif /* OS2 */
449 "  SET SPEED     Select communication speed",
450 "  SET PARITY    Communications parity (if necessary)",
451 #ifdef CK_RTSCTS
452 "  SET FLOW      Communications flow control, such as RTS/CTS",
453 #else
454 "  SET FLOW      Communications flow control, such as XON/XOFF",
455 #endif /* CK_RTSCTS */
456 "  CONNECT       Begin terminal connection",
457 
458 #ifndef NODIAL
459 " ",
460 "To dial out with a modem:",
461 "  SET DIAL DIRECTORY     Specify dialing directory file (optional)",
462 "  SET DIAL COUNTRY-CODE  Country you are dialing from (*)",
463 "  SET DIAL AREA-CODE     Area-code you are dialing from (*)",
464 "  LOOKUP                 Lookup entries in your dialing directory (*)",
465 "  SET MODEM TYPE         Select modem type",
466 #ifdef OS2
467 #ifdef NT
468 #ifdef CK_TAPI
469 "  SET PORT TAPI          Select TAPI communication device",
470 #endif /* CK_TAPI */
471 "  SET PORT               Select serial communication device",
472 #else
473 "  SET PORT               Select serial communication port or server",
474 #endif /* NT */
475 #else
476 "  SET LINE               Select serial communication device",
477 #endif /* OS2 */
478 "  SET SPEED              Select communication speed",
479 "  SET PARITY             Communications parity (if necessary)",
480 "  DIAL                   Dial the phone number",
481 "  CONNECT                Begin terminal connection",
482 " ",
483 #ifdef OS2
484 "Further info:   HELP DIAL, HELP SET MODEM, HELP SET PORT, HELP SET DIAL",
485 #else
486 "Further info:   HELP DIAL, HELP SET MODEM, HELP SET LINE, HELP SET DIAL",
487 #endif /* OS2 */
488 "(*) (For use with optional dialing directory)",
489 #endif /* NODIAL */
490 
491 #ifdef NETCONN
492 " ",
493 "To make a network connection:",
494 #ifndef NODIAL
495 "  SET NETWORK DIRECTORY  Specify a network services directory (optional)",
496 "  LOOKUP                 Lookup entries in your network directory",
497 #endif /* NODIAL */
498 "  SET NETWORK TYPE       Select network type (if more than one available)",
499 "  SET HOST               Make a network connection but stay in command mode",
500 "  CONNECT                Begin terminal connection",
501 #ifdef TNCODE
502 "  TELNET                 Select a Telnet host and CONNECT to it",
503 #endif /* TNCODE */
504 #ifdef RLOGCODE
505 "  RLOGIN                 Select an Rlogin host and CONNECT to it",
506 #endif /* RLOGCODE */
507 #ifdef ANYSSH
508 "  SSH [ OPEN ]           Select an SSH host and CONNECT to it",
509 #endif /* ANYSSH */
510 #ifdef NEWFTP
511 "  FTP [ OPEN ]           Make an FTP connection",
512 #endif /* NEWFTP */
513 #ifdef CKHTTP
514 "  HTTP OPEN              Make an HTTP connection",
515 #endif /* CKHTTP */
516 #endif /* NETCONN */
517 
518 #ifdef NT
519 " ",
520 "To return from the terminal window to the C-Kermit> prompt:",
521 #else
522 #ifdef OS2
523 " ",
524 "To return from the terminal window to the C-Kermit> prompt:",
525 #else
526 " ",
527 "To return from a terminal connection to the C-Kermit prompt:",
528 #endif /* OS2 */
529 #endif /* NT */
530 #ifdef OS2
531 "  \
532 Press the key or key-combination shown after \"Command:\" in the status line",
533 "  (such as Alt-x) or type your escape character followed by the letter C.",
534 #else
535 "  Type your escape character followed by the letter C.",
536 #endif /* OS2 */
537 " ",
538 "To display your escape character:",
539 "  SHOW ESCAPE",
540 " ",
541 "To display other settings:",
542 "  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
543 #else  /* !NOLOCAL */
544 " ",
545 "To display settings:",
546 "  SHOW COMMUNICATIONS, SHOW FILE, SHOW PROTOCOL, etc.",
547 #endif /* NOLOCAL */
548 " ",
549 "The manual for C-Kermit is the book \"Using C-Kermit\".  For information",
550 "about the manual, visit:",
551 "  http://www.kermitproject.org/usingckermit.html",
552 " ",
553 "For an online C-Kermit tutorial, visit:",
554 "  http://www.kermitproject.org/ckututor.html",
555 " ",
556 "To learn about script programming and automation:",
557 "  http://www.kermitproject.org/ckscripts.html",
558 " ",
559 "For further information about a particular command, type HELP xxx,",
560 "where xxx is the name of the command.  For documentation, news of new",
561 "releases, and information about other Kermit software, visit the",
562 "Kermit Project website:",
563 " ",
564 "  http://www.kermitproject.org/",
565 " ",
566 "For information about technical support please visit this page:",
567 " ",
568 "  http://www.kermitproject.org/support.html",
569 ""
570 };
571 
572 static char * hmxymatch[] = {
573 "SET MATCH { DOTFILE, FIFO } { ON, OFF }",
574 "  Tells whether wildcards should match dotfiles (files whose names begin",
575 "  with period) or UNIX FIFO special files.  MATCH FIFO default is OFF.",
576 "  MATCH DOTFILE default is OFF in UNIX, ON elsewhere.",
577 ""
578 };
579 
580 #ifndef NOSEXP
581 static char * hmxysexp[] = {
582 "SET SEXPRESSION { DEPTH-LIMIT, ECHO-RESULT, TRUNCATE-ALL-RESULTS }",
583 "  DEPTH-LIMIT sets a limit on the depth of nesting or recursion in",
584 "  S-Expressions to prevent the program from crashing from memory exhaustion.",
585 "  ECHO-RESULT tells whether S-Expression results should be displayed as",
586 "  a result of evaluating an expression; the default is to display only at",
587 "  top (interactive) level; OFF means never display; ON means always display.",
588 "  TRUNCATE-ALL-RESULTS ON means the results of all arithmetic operations",
589 "  should be forced to integers (whole numbers) by discarding any fractional",
590 "  part.  The default is OFF.  SHOW SEXPRESSION displays the current settings."
591 ,""
592 };
593 #endif	/* NOSEXP */
594 
595 #ifdef OS2
596 #ifdef KUI
597 static char * hmxygui[] = {
598 "SET GUI CLOSE OFF",
599 "  Disables the System Menu Close and File->Exit functions which could be",
600 "  used to exit Kermit.  Once disabled these functions cannot be re-enabled",
601 "  and the only way to exit Kermit is via the Kermit Script EXIT command.",
602 " ",
603 "SET GUI DIALOGS { ON, OFF }",
604 "  ON means that popups, alerts, use GUI dialogs; OFF means to use",
605 "  text-mode popups or prompts.  ON by default.",
606 " ",
607 "SET GUI FONT name size",
608 "  Chooses the font and size.  Type \"set gui font ?\" to see the list of",
609 "  choices.  The size can be a whole number or can contain a decimal point",
610 "  and a fraction (which is rounded to the nearest half point).",
611 " ",
612 "SET GUI MENUBAR OFF",
613 "  Disables menubar functions which could be used to modify the Kermit",
614 "  session configuration.  Once disabled the menubar functions cannot be",
615 "  re-enabled.",
616 " ",
617 "SET GUI RGBCOLOR colorname redvalue greenvalue bluevalue",
618 "  Specifies the red-green-blue mixture to be used to render the given",
619 "  color name.  Type \"set gui rgbcolor\" to see a list of colornames.",
620 "  the RGB values are whole numbers from 0 to 255.",
621 " ",
622 "SET GUI TOOLBAR OFF",
623 "  Disables toolbar functions which could be used to modify the Kermit",
624 "  session configuration.  Once disabled the toolbar functions cannot be",
625 "  re-enabled.",
626 " ",
627 "SET GUI WINDOW POSITION x y",
628 "  Moves the C-Kermit window to the given X,Y coordinates, pixels from top",
629 "  left.  (Not yet implemented -- use command-line options to do this.)",
630 " ",
631 "SET GUI WINDOW RESIZE-MODE { CHANGE-DIMENSIONS, SCALE-FONT }",
632 "  Default is CHANGE-DIMENSIONS.",
633 "",
634 "SET GUI WINDOW RUN-MODE { MAXIMIZE, MINIMIZE, RESTORE }",
635 "  Changes the run mode state of the GUI window.",
636 ""
637 };
638 #endif /* KUI */
639 #endif /* OS2 */
640 
641 static char * hmxxfunc[] = {
642 "KERMIT FUNCTIONS",
643 "   ",
644 "  Functions are part of Kermit's programming language used in writing",
645 "  scripts.  They are like functions in other programming languages like C",
646 "  and Perl; each function has a name and an argument list, and it returns",
647 "  (is replaced by) a value.  In a Kermit script, the function name preceded",
648 "  by a backslash (\\) and then the letter F; for example:",
649 " ",
650 "     \\Findex(string1,string2).",
651 " ",
652 "  The argument list is in parentheses.  In this example the name of the",
653 "  function is 'index', the arguments are string1 and string2, and the return",
654 "  value is the starting position of string2 in string1; type HELP FUNC INDEX",
655 "  for details.",
656 " ",
657 "  Type SHOW FUNCTIONS to see a list of available functions.",
658 " ",
659 "  Type HELP FUNCTION xxx more information about specific functions:",
660 " ",
661 "   . If xxx matches only one function name the documentation for that",
662 "     function is printed; example: HELP FUNCTION INDEX.",
663 " ",
664 "  . If xxx matches more than one function name, a list of all functions",
665 "     whose names contain xxx is printed; example: HELP FUNCTION DATE.",
666 ""
667 };
668 
669 #ifdef ANYSSH
670 static char * hmxxssh[] = {
671 #ifdef SSHBUILTIN
672 "Syntax: SSH { ADD, AGENT, CLEAR, KEY, [ OPEN ], V2 } operands...",
673 "  Performs an SSH-related action, depending on the keyword that follows:",
674 " ",
675 "SSH ADD LOCAL-PORT-FORWARD local-port host port",
676 "  Adds a port forwarding triplet to the local port forwarding list.",
677 "  The triplet specifies a local port to be forwarded and the hostname /",
678 "  ip-address and port number to which the port should be forwarded from",
679 "  the remote host.  Port forwarding is activated at connection",
680 "  establishment and continues until the connection is terminated.",
681 " ",
682 "SSH ADD REMOTE-PORT-FORWARD remote-port host port",
683 "  Adds a port forwarding triplet to the remote port forwarding list.",
684 "  The triplet specifies a remote port to be forwarded and the",
685 "  hostname/ip-address and port number to which the port should be",
686 "  forwarded from the local machine.  Port forwarding is activated at",
687 "  connection establishment and continues until the connection is",
688 "  terminated.",
689 " ",
690 "SSH AGENT ADD [ identity-file ]",
691 "  Adds the contents of the identity-file (if any) to the SSH AGENT",
692 "  private key cache.  If no identity-file is specified, all files",
693 "  specified with SET SSH IDENTITY-FILE are added to the cache.",
694 " ",
695 "SSH AGENT DELETE [ identity-file ]",
696 "  Deletes the contents of the identity-file (if any) from the SSH AGENT",
697 "  private key cache.  If no identity-file is specified, all files",
698 "  specified with SET SSH IDENTITY-FILE are deleted from the cache.",
699 " ",
700 "SSH AGENT LIST [ /FINGERPRINT ]",
701 "  Lists the contents of the SSH AGENT private key cache.  If /FINGERPRINT",
702 "  is specified, the fingerprint of the private keys are displayed instead",
703 "  of the keys.",
704 " ",
705 "SSH CLEAR LOCAL-PORT-FORWARD",
706 "  Clears the local port forwarding list.",
707 " ",
708 "SSH CLEAR REMOTE-PORT-FORWARD",
709 "  Clears the remote port forwarding list.",
710 " ",
711 "SSH KEY commands:",
712 "  The SSH KEY commands create and manage public and private key pairs",
713 "  (identities).  There are three forms of SSH keys.  Each key pair is",
714 "  stored in its own set of files:",
715 " ",
716 "   Key Type      Private Key File           Public Key File",
717 "    v1 RSA keys   \\v(appdata)ssh/identity   \\v(appdata)ssh/identity.pub",
718 "    v2 RSA keys   \\v(appdata)ssh/id_rsa     \\v(appdata)ssh/id_rsa.pub",
719 "    v2 DSA keys   \\v(appdata)ssh/id_dsa     \\v(appdata)ssh/id_dsa.pub",
720 " ",
721 "  Keys are stored using the OpenSSH keyfile format.  The private key",
722 "  files can be (optionally) protected by specifying a passphrase.  A",
723 "  passphrase is a longer version of a password.  English text provides",
724 "  no more than 2 bits of key data per character.  56-bit keys can be",
725 "  broken by a brute force attack in approximately 24 hours.  When used,",
726 "  private key files should therefore be protected by a passphrase of at",
727 "  least 40 characters (about 80 bits).",
728 " ",
729 "  To install a public key file on the host, you must transfer the file",
730 "  to the host and append it to your \"authorized_keys\" file.  The file",
731 "  permissions must be 600 (or equivalent).",
732 " ",
733 "SSH KEY CHANGE-PASSPHRASE [ /NEW-PASSPHRASE:passphrase",
734 "      /OLD-PASSPHRASE:passphrase ] filename",
735 "  This re-encrypts the specified private key file with a new passphrase.",
736 "  The old passphrase is required.  If the passphrases (and filename) are",
737 "  not provided Kermit prompts your for them.",
738 " ",
739 "SSH KEY CREATE [ /BITS:bits /PASSPHRASE:passphrase",
740 "    /TYPE:{ V1-RSA, V2-DSA, V2-RSA } /V1-RSA-COMMENT:comment ] filename",
741 "  This command creates a new private/public key pair.  The defaults are:",
742 "  BITS:1024 and TYPE:V2-RSA.  The filename is the name of the private",
743 "  key file.  The public key is created with the same name with .pub",
744 "  appended to it.  If a filename is not specified Kermit prompts you for",
745 "  it.  V1 RSA key files may have an optional comment, which is ignored",
746 "  for other key types.",
747 " ",
748 "SSH KEY DISPLAY [ /FORMAT:{FINGERPRINT,IETF,OPENSSH,SSH.COM} ] filename",
749 "  This command displays the contents of a public or private key file.",
750 "  The default format is OPENSSH.",
751 " ",
752 "SSH KEY V1 SET-COMMENT filename comment",
753 "  This command replaces the comment associated with a V1 RSA key file.",
754 " ",
755 "SSH [ OPEN ] host [ port ] [ /COMMAND:command /USER:username",
756 "      /PASSWORD:pwd /VERSION:{ 1, 2 } /X11-FORWARDING:{ ON, OFF } ]",
757 "  This command establishes a new connection using SSH version 1 or",
758 "  version 2 protocol.  The connection is made to the specified host on",
759 "  the SSH port (you can override the port by including a port name or",
760 "  number after the host name).  Once the connection is established the",
761 "  authentication negotiations begin.  If the authentication is accepted,",
762 "  the local and remote port forwarding lists are used to establish the",
763 "  desired connections.  If X11 Forwarding is active, this results in a",
764 "  remote port forwarding between the X11 clients on the remote host and",
765 "  X11 Server on the local machine.  If a /COMMAND is provided, the",
766 "  command is executed on the remote host in place of your default shell.",
767 " ",
768 "  An example of a /COMMAND to execute C-Kermit in SERVER mode is:",
769 "     SSH OPEN hostname /COMMAND:{kermit -x -l 0}",
770 " ",
771 "SSH V2 REKEY",
772 "  Requests that an existing SSH V2 connection generate new session keys.",
773 #else  /* SSHBUILTIN */
774 "Syntax: SSH [ options ] <hostname> [ command ]",
775 "  Makes an SSH connection using the external ssh program via the SET SSH",
776 "  COMMAND string, which is \"ssh -e none\" by default.  Options for the",
777 "  external ssh program may be included.  If the hostname is followed by a",
778 "  command, the command is executed on the host instead of an interactive",
779 "  shell.",
780 #endif /* SSHBUILTIN */
781 ""
782 };
783 
784 static char *hmxyssh[] = {
785 #ifdef SSHBUILTIN
786 "SET SSH AGENT-FORWARDING { ON, OFF }",
787 "  If an authentication agent is in use, setting this value to ON",
788 "  results in the connection to the agent being forwarded to the remote",
789 "  computer.  The default is OFF.",
790 " ",
791 "SET SSH CHECK-HOST-IP { ON, OFF }",
792 "  Specifies whether the remote host's ip-address should be checked",
793 "  against the matching host key in the known_hosts file.  This can be",
794 "  used to determine if the host key changed as a result of DNS spoofing.",
795 "  The default is ON.",
796 " ",
797 "SET SSH COMPRESSION { ON, OFF }",
798 "  Specifies whether compression will be used.  The default is ON.",
799 " ",
800 "SET SSH DYNAMIC-FORWARDING { ON, OFF }",
801 "  Specifies whether Kermit is to act as a SOCKS4 service on port 1080",
802 "  when connected to a remote host via SSH.  When Kermit acts as a SOCKS4",
803 "  service, it accepts connection requests and forwards the connections",
804 "  through the remote host.  The default is OFF.",
805 " ",
806 "SET SSH GATEWAY-PORTS { ON, OFF }",
807 "  Specifies whether Kermit should act as a gateway for forwarded",
808 "  connections received from the remote host.  The default is OFF.",
809 " ",
810 "SET SSH GSSAPI DELEGATE-CREDENTIALS { ON, OFF }",
811 "  Specifies whether Kermit should delegate GSSAPI credentials to ",
812 "  the remote host after authentication.  Delegating credentials allows",
813 "  the credentials to be used from the remote host.  The default is OFF.",
814 " ",
815 "SET SSH HEARTBEAT-INTERVAL <seconds>",
816 "  Specifies a number of seconds of idle time after which an IGNORE",
817 "  message will be sent to the server.  This pulse is useful for",
818 "  maintaining connections through HTTP Proxy servers and Network",
819 "  Address Translators.  The default is OFF (0 seconds).",
820 " ",
821 "SET SSH IDENTITY-FILE filename [ filename [ ... ] ]",
822 "  Specifies one or more files from which the user's authorization",
823 "  identities (private keys) are to be read when using public key",
824 "  authorization.  These are files used in addition to the default files:",
825 " ",
826 "    \\v(appdata)ssh/identity      V1 RSA",
827 "    \\v(appdata)ssh/id_rsa        V2 RSA",
828 "    \\v(appdata)ssh/id_dsa        V2 DSA",
829 " ",
830 "SET SSH KERBEROS4 TGT-PASSING { ON, OFF }",
831 "  Specifies whether Kermit should forward Kerberos 4 TGTs to the host.",
832 "  The default is OFF.",
833 " ",
834 "SET SSH KERBEROS5 TGT-PASSING { ON, OFF }",
835 "  Specifies whether Kermit should forward Kerberos 5 TGTs to to the",
836 "  host.  The default is OFF.",
837 " ",
838 "SET SSH PRIVILEGED-PORT { ON, OFF }",
839 "  Specifies whether a privileged port (less than 1024) should be used",
840 "  when connecting to the host.  Privileged ports are not required except",
841 "  when using SSH V1 with Rhosts or RhostsRSA authorization.  The default",
842 "  is OFF.",
843 " ",
844 "SET SSH QUIET { ON, OFF }",
845 "  Specifies whether all messages generated in conjunction with SSH",
846 "  protocols should be suppressed.  The default is OFF.",
847 " ",
848 "SET SSH STRICT-HOST-KEY-CHECK { ASK, ON, OFF }",
849 "  Specifies how Kermit should behave if the the host key check fails.",
850 "  When strict host key checking is OFF, the new host key is added to the",
851 "  protocol-version-specific user-known-hosts-file.  When strict host key",
852 "  checking is ON, the new host key is refused and the connection is",
853 "  dropped.  When set to ASK, Kermit prompt you to say whether the new",
854 "  host key should be accepted.  The default is ASK.",
855 " ",
856 "  Strict host key checking protects you against Trojan horse attacks.",
857 "  It depends on you to maintain the contents of the known-hosts-file",
858 "  with current and trusted host keys.",
859 " ",
860 "SET SSH USE-OPENSSH-CONFIG { ON, OFF }",
861 "  Specifies whether Kermit should parse an OpenSSH configuration file",
862 "  after applying Kermit's SET SSH commands.  The configuration file",
863 "  would be located at \\v(home)ssh/ssh_config.  The default is OFF.",
864 " ",
865 "SET SSH V1 CIPHER { 3DES, BLOWFISH, DES }",
866 "  Specifies which cipher should be used to protect SSH version 1",
867 "  connections.  The default is 3DES.",
868 " ",
869 "SET SSH V1 GLOBAL-KNOWN-HOSTS-FILE filename",
870 "  Specifies the location of the system-wide known-hosts file.  The",
871 "  default is:",
872 " ",
873 "    \v(common)ssh_known_hosts",
874 " ",
875 "SET SSH V1 USER-KNOWN-HOSTS-FILE filename",
876 "  Specifies the location of the user-known-hosts-file.  The default",
877 "  location is:",
878 " ",
879 "    \\v(appdata)ssh/known_hosts",
880 " ",
881 "SET SSH V2 AUTHENTICATION { EXTERNAL-KEYX, GSSAPI, HOSTBASED, ",
882 "    KEYBOARD-INTERACTIVE, PASSWORD, PUBKEY, SRP-GEX-SHA1 } [ ... ]",
883 "  Specifies an ordered list of SSH version 2 authentication methods to",
884 "  be used when connecting to the remote host.  The default list is:",
885 " ",
886 "    external-keyx gssapi hostbased publickey srp-gex-sha1 publickey",
887 "    keyboard-interactive password none",
888 " ",
889 "SET SSH V2 AUTO-REKEY { ON, OFF }",
890 "  Specifies whether Kermit automatically issues rekeying requests",
891 "  once an hour when SSH version 2 in in use.  The default is ON.",
892 " ",
893 "SET SSH V2 CIPHERS { 3DES-CBC, AES128-CBC AES192-CBC AES256-CBC",
894 "     ARCFOUR BLOWFISH-CBC CAST128-CBC RIJNDAEL128-CBC RIJNDAEL192-CBC",
895 "     RIJNDAEL256-CBC }",
896 "  Specifies an ordered list of SSH version ciphers to be used to encrypt",
897 "  the established connection.  The default list is:",
898 " ",
899 "    aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour aes192-cbc",
900 "    aes256-cbc",
901 " ",
902 "  \"rijndael\" is an alias for \"aes\".",
903 " ",
904 "SET SSH V2 GLOBAL-KNOWN-HOSTS-FILE filename",
905 "  Specifies the location of the system-wide known-hosts file.  The default",
906 "  location is:",
907 " ",
908 "    \\v(common)ssh/known_hosts2",
909 " ",
910 "SET SSH V2 HOSTKEY-ALGORITHMS { SSH-DSS, SSH-RSA }",
911 "  Specifies an ordered list of hostkey algorithms to be used to verify",
912 "  the identity of the host.  The default list is",
913 " ",
914 "    ssh-rsa ssh-dss",
915 " ",
916 "SET SSH V2 MACS { HMAC-MD5 HMAC-MD5-96 HMAC-RIPEMD160 HMAC-SHA1",
917 "     HMAC-SHA1-96 }",
918 "  Specifies an ordered list of Message Authentication Code algorithms to",
919 "  be used for integrity  protection of the established connection.  The",
920 "  default list is:",
921 " ",
922 "    hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 hmac-md5-96",
923 " ",
924 "SET SSH V2 USER-KNOWN-HOSTS-FILE filename",
925 "  Specifies the location of the user-known-hosts file.  The default",
926 "  location is:",
927 " ",
928 "    \\v(appdata)ssh/known_hosts2",
929 " ",
930 "SET SSH VERBOSE level",
931 "  Specifies how many messages should be generated by the OpenSSH engine.",
932 "  The level can range from 0 to 7.  The default value is 2.",
933 " ",
934 "SET SSH VERSION { 1, 2, AUTOMATIC }",
935 "  Specifies which SSH version should be negotiated.  The default is",
936 "  AUTOMATIC which means use version 2 if supported; otherwise to fall",
937 "  back to version 1.",
938 " ",
939 "SET SSH X11-FORWARDING { ON, OFF }",
940 "  Specifies whether X Windows System Data is to be forwarded across the",
941 "  established SSH connection.  The default is OFF.  When ON, the DISPLAY",
942 "  value is either set using the SET TELNET ENV DISPLAY command or read",
943 "  from the DISPLAY environment variable.",
944 " ",
945 "SET SSH XAUTH-LOCATION filename",
946 "  Specifies the location of the xauth executable (if provided with the",
947 "  X11 Server software.)",
948 #else  /* SSHBUILTIN */
949 "Syntax: SET SSH COMMAND command",
950 "  Specifies the external command to be used to make an SSH connection.",
951 "  By default it is \"ssh -e none\" (ssh with no escape character).",
952 #endif /* SSHBUILTIN */
953 ""
954 };
955 #endif /* ANYSSH */
956 
957 #ifdef NEWFTP
958 static char *hmxygpr[] = {
959 "Syntax: SET GET-PUT-REMOTE { AUTO, FTP, KERMIT}",
960 "  Tells Kermit whether GET, PUT, and REMOTE commands should be directed",
961 "  at a Kermit server or an FTP server.  The default is AUTO, meaning that",
962 "  if you have only one active connection, the appropriate action is taken",
963 "  when you give a GET, PUT, or REMOTE command.  SET GET-PUT-REMOTE FTP forces"
964 ,
965 "  Kermit to treat GET, PUT, and REMOTE as FTP client commands; setting this",
966 "  to KERMIT forces these commands to be treated as Kermit client commands.",
967 "  NOTE: PUT includes SEND, MPUT, MSEND, and all other similar commands.",
968 "  Also see HELP REMOTE, HELP SET LOCUS, HELP FTP.",
969 ""
970 };
971 #endif /* NEWFTP */
972 
973 #ifdef LOCUS
974 static char *hmxylocus[] = {
975 #ifdef KUI
976 "Syntax: SET LOCUS { ASK, AUTO, LOCAL, REMOTE }",
977 #else
978 "Syntax: SET LOCUS { AUTO, LOCAL, REMOTE }",
979 #endif /* KUI */
980 "  Specifies whether unprefixed file management commands should operate",
981 "  locally or (when there is a connection to a remote FTP or Kermit",
982 "  server) sent to the server.  The affected commands are: CD (CWD), PWD,",
983 "  CDUP, DIRECTORY, DELETE, RENAME, MKDIR, and RMDIR.  To force any of",
984 "  these commands to be executed locally, give it an L-prefix: LCD, LDIR,",
985 "  etc.  To force remote execution, use the R-prefix: RCD, RDIR, and so",
986 "  on.  SHOW COMMAND shows the current Locus.",
987 " ",
988 "  By default, the Locus for file management commands is switched",
989 "  automatically whenever you make or close a connection: if you make an",
990 "  FTP connection, the Locus becomes REMOTE; if you close an FTP connection",
991 "  or make any other kind of connection, the Locus becomes LOCAL.",
992 #ifdef KUI
993 " ",
994 "  There are two kinds of automatic switching: ASK (the default) which",
995 "  asks you if it's OK to switch, and AUTO, which switches without asking.",
996 #endif /* KUI */
997 " ",
998 "  If you give a SET LOCUS LOCAL or SET LOCUS REMOTE command, this sets",
999 "  the locus as indicated and disables automatic switching.",
1000 #ifdef KUI
1001 "  SET LOCUS AUTO or SET LOCUS ASK restores automatic switching.",
1002 "  You can also change Locus switching and behavior in the Actions menu.",
1003 #else
1004 "  SET LOCUS AUTO restores automatic switching.",
1005 #endif /* KUI */
1006 "",
1007 };
1008 #endif /* LOCUS */
1009 
1010 #ifdef UNIX
1011 #ifndef NOPUTENV
1012 static char *hmxxputenv[] = {
1013 "Syntax: PUTENV name value",
1014 "  Creates or modifies the environment variable with the given name to have",
1015 "  the given value.  Purpose: to pass parameters to subprocesses without",
1016 "  having them appear on the command line.  If the value is blank (empty),",
1017 "  the variable is deleted.  The result is visible to this instantiation of",
1018 "  C-Kermit via \\$(name) and to any inferior processes by whatever method",
1019 "  they use to access environment variables.  The value may be enclosed in",
1020 "  doublequotes or braces, but it need not be; if it is the outermost",
1021 "  doublequotes or braces are removed.",
1022 " ",
1023 "  Note the syntax:",
1024 "    PUTENV name value",
1025 "  not:",
1026 "    PUTENV name=value",
1027 " ",
1028 "  There is no equal sign between name and value, and the name itself may",
1029 "  not include an equal sign.",
1030 "",
1031 };
1032 #endif	/* NOPUTENV */
1033 #endif	/* UNIX */
1034 
1035 static char *hmxxtak[] = {
1036 "Syntax: TAKE filename [ arguments ]",
1037 "  Tells Kermit to execute commands from the named file.  Optional argument",
1038 "  words, are automatically assigned to the macro argument variables \\%1",
1039 "  through \\%9.  Kermit command files may themselves contain TAKE commands,",
1040 "  up to any reasonable depth of nesting.",
1041 ""
1042 };
1043 
1044 #ifdef TCPSOCKET
1045 static char *hmxxfirew[] = {
1046 "Firewall Traversal in C-Kermit",
1047 " ",
1048 #ifndef NEWFTP
1049 #ifndef CKHTTP
1050 #ifndef CK_SOCKS
1051 #define NOFIREWALL
1052 #endif
1053 #endif
1054 #endif
1055 #ifdef NOFIREWALL
1056 "This version of Kermit was built with no support for firewall traversal",
1057 "protocols.  Kermit can be built with support for HTTP Proxy Servers,",
1058 "SOCKS authorized firewall traversal, and FTP Passive connection modes.",
1059 " ",
1060 #else /* NOFIREWALL */
1061 #ifdef CKHTTP
1062 "The simplist form of firewall traversal is the HTTP CONNECT command. The",
1063 "CONNECT command was implemented to allow a public web server which usually",
1064 "resides on the boundary between the public and private networks to forward",
1065 "HTTP requests from clients on the private network to public web sites.  To",
1066 "allow secure web connections, the HTTP CONNECT command authenticates the",
1067 "client with a username/password and then establishes a tunnel to the",
1068 "desired host.",
1069 
1070 " ",
1071 
1072 "Web servers that support the CONNECT command can be configured to allow",
1073 "outbound connections for authenticated users to any TCP/IP hostname-port",
1074 "combination accessible to the Web server.  HTTP CONNECT can be used only",
1075 "with TCP-based protocols.  Protocols such as Kerberos authentication that",
1076 "use UDP/IP cannot be tunneled using HTTP CONNECT.",
1077 
1078 " ",
1079 
1080 "SET TCP HTTP-PROXY [switches] [<hostname or ip-address>[:<port>]]",
1081 "  If a hostname or ip-address is specified, Kermit uses the given",
1082 "  proxy server when attempting outgoing TCP connections.  If no hostnamer",
1083 "  or ip-address is specified, any previously specified Proxy server is",
1084 "  removed.  If no port number is specified, the \"http\" service is used.",
1085 "  [switches] can be one or more of:",
1086 "     /AGENT:<agent> /USER:<user> /PASSWORD:<password>",
1087 "  Switch parameters are used when connecting to the proxy server and",
1088 "  override any other values associated with the connection.",
1089 " ",
1090 
1091 #endif /* CKHTTP */
1092 #ifdef CK_SOCKS
1093 
1094 "In the early 1990s as firewalls were becoming prevalent, David Koblas",
1095 "developed the SOCKS protocol for TCP/IP firewall traversal.  Two versions",
1096 "of SOCKS are currently in use: Version 4.2 lets TCP/IP client applications",
1097 "traverse firewalls, similar to HTTP CONNECT, except that the SOCKS client",
1098 "is aware of the public source IP address and port, which can be used within",
1099 "the application protocol to assist in securing the connection (e.g. FTP",
1100 "sessions secured with GSSAPI Kerberos 5).",
1101 
1102 " ",
1103 
1104 "In 1995 the IETF issued SOCKS Protocol Version 5 (RFC 1928), which is",
1105 "significantly more general than version 4.  Besides supporting client-",
1106 "to-server TCP/IP connections, it also includes:",
1107 
1108 " ",
1109 " . Authenticated firewall traversal of UDP/IP packets.",
1110 " . Authenticated binding of incoming public ports on the firewall.",
1111 " ",
1112 
1113 "This lets a service on the private network offer public services.  It also",
1114 "lets client applications like FTP establish a temporary public presence",
1115 "that can be used by the FTP server to create a data channel.  By allowing",
1116 "the client to bind to a public port on the firewall and be aware of the",
1117 "public address, SOCKS 5 lets the application protocol communicate this",
1118 "information to the server.",
1119 
1120 " ",
1121 
1122 #ifdef OS2
1123 #ifdef NT
1124 "C-Kermit for Windows supports SOCKS 4.2. The SOCKS Server is specified with:",
1125 " ",
1126 "  SET TCP SOCKS-SERVER hostname/ip-address",
1127 " ",
1128 "The SOCKS.CONF file is found by examining the ETC environment variable;",
1129 "searching in \\WINDOWS on Windows 95/98/ME; or the",
1130 "\\WINDOWS\\SYSTEM\\DRIVERS\\ETC directory on NT\\2000\\XP systems.",
1131 
1132 #else /* NT */
1133 
1134 "C-Kermit provides support for SOCKS 4.2 servers when using IBM TCP/IP 2.0,",
1135 "IBM OS/2 WARP, or a compatible protocol stack. SOCKS is one popular means",
1136 "of implementing a firewall between a private network and the Internet.",
1137 " ",
1138 "C-Kermit shares the same SOCKS environment variables as IBM Gopher. It also",
1139 "supports the use of local SOCKS configuration files.",
1140 " ",
1141 "To specify the default SOCKS Server, add SET SOCKS_SERVER= to your",
1142 "CONFIG.SYS file.",
1143 " ",
1144 "If you must use a SOCKS Distributed Name Server, add SET SOCKS_NS= to your",
1145 "CONFIG.SYS file.",
1146 " ",
1147 
1148 "If you must use a specific with your SOCKS server, be sure to add SET USER=",
1149 "to your CONFIG.SYS file. Otherwise, \"os2user\" is used by default.",
1150 
1151 " ",
1152 
1153 "The SOCKS configuration file must be placed in the directory pointed to by",
1154 "the ETC environment variable as declared in your CONFIG.SYS file. The name",
1155 "should be SOCKS.CONF. On a FAT file system, use SOCKS.CNF.",
1156 
1157 " ",
1158 "The format of the lines in the SOCKS configuration file are as follows:",
1159 " ",
1160 " . # comments",
1161 " . deny [*=userlist] dst_addr dst_mask [op port]",
1162 " . direct [*=userlist] dst_addr dst_mask [op port]",
1163 " . sockd [@=serverlist] [*=userlist] dst_addr dst_mask [op port]",
1164 " ",
1165 
1166 "op must be one of 'eq', 'neq', 'lt', 'gt', 'le', or 'ge'. dst_addr,",
1167 "dst_mask, and port may be either numeric or name equivalents.",
1168 
1169 " ",
1170 
1171 "C-Kermit ignores the [*=userlist] and [@=serverlist] fields. Matches are",
1172 "determined on a first match not a best match basis. Addresses for which no",
1173 "match is found default to \"sockd\".",
1174 
1175 " ",
1176 
1177 "For completeness: Fields in square brackets are optional. The optional",
1178 "@=serverlist field with a 'sockd' line specifies the list of SOCKS servers",
1179 "the client should try (in the given order) instead of the default SOCKS",
1180 "server. If the @=serverlist part is omitted, then the default SOCKS server",
1181 "is used.  Commas are used in the userlist and serverlist as separators, no",
1182 "white spaces are allowed.",
1183 
1184 #endif /* NT */
1185 
1186 " ",
1187 
1188 #else /* OS2 */
1189 #ifdef CK_SOCKS5
1190 "This version of C-Kermit supports SOCKS version 5.",
1191 #else /* CK_SOCKS5 */
1192 "This version of C-Kermit supports SOCKS version 4.",
1193 #endif /* CK_SOCKS5 */
1194 
1195 "See the man page (or other system documentation) for information on",
1196 "configuring the SOCKS library via the /etc/socks.conf file.",
1197 
1198 #endif /* OS2 */
1199 " ",
1200 #endif /* CK_SOCKS */
1201 
1202 #ifdef NEWFTP
1203 
1204 "FTP is one of the few well-known Internet services that requires",
1205 "multiple connections.  As described above, FTP originally required the",
1206 "server to establish the data connection to the client using a destination",
1207 "address and port provided by the client.  This doesn't work with port",
1208 "filtering firewalls.",
1209 
1210 " ",
1211 
1212 "Later, FTP protocol added a \"passive\" mode, in which connections for",
1213 "the data channels are created in the reverse direction.  Instead of the",
1214 "server establishing a connection to the client, the client makes a second",
1215 "connection with the server as the destination.  This works just fine as",
1216 "long as the client is behind the firewall and the server is in public",
1217 "address space.  If the server is behind a firewall then the traditional",
1218 "active mode must be used.  If both the client and server are behind their",
1219 "own port filtering firewalls then data channels cannot be established.",
1220 
1221 " ",
1222 
1223 "In Kermit's FTP client, passive mode is controlled with the command:",
1224 
1225 " ",
1226 "  SET FTP PASSIVE-MODE { ON, OFF }",
1227 " ",
1228 
1229 "The default is ON, meaning to use passive mode.",
1230 
1231 #endif /* NEWFTP */
1232 #endif /* NOFIREWALL */
1233 
1234 ""
1235 };
1236 #endif /* TCPSOCKET */
1237 
1238 static char *hmxxsave[] = {
1239 "Syntax: SAVE item filename { NEW, APPEND }",
1240 "  Saves the requested material in the given file.  A new file is created",
1241 "  by default; include APPEND at the end of the command to append to an",
1242 "  existing file.  Items:",
1243 #ifndef NOSETKEY
1244 "    KEYMAP               Saves the current key settings.",
1245 #endif /* NOSETKEY */
1246 #ifdef CK_RECALL
1247 "    COMMAND HISTORY      Saves the current command recall (history) buffer",
1248 #endif /* CK_RECALL */
1249 #ifdef OS2
1250 "    COMMAND SCROLLBACK   Saves the current command-screen scrollback buffer",
1251 "    TERMINAL SCROLLBACK  Saves the current terminal-screen scrollback buffer",
1252 #endif /* OS2 */
1253 ""
1254 };
1255 
1256 #ifdef CKROOT
1257 static char *hmxxchroot[] = {
1258 "Syntax: SET ROOT directoryname",
1259 "  Sets the root for file access to the given directory and disables access",
1260 "  to system and shell commands and external programs.  Once this command",
1261 "  is given, no files or directories outside the tree rooted by the given",
1262 "  directory can be opened, read, listed, deleted, renamed, or accessed in",
1263 "  any other way.  This command can not be undone by a subsequent SET ROOT",
1264 "  command.  Primarily for use with server mode, to restrict access of",
1265 "  clients to a particular directory tree.  Synonym: CHROOT.",
1266 ""
1267 };
1268 #endif /* CKROOT */
1269 
1270 static char *hmxxscrn[] = {
1271 "Syntax: SCREEN { CLEAR, CLEOL, MOVE row column }",
1272 #ifdef OS2
1273 "  Performs screen-formatting actions.",
1274 #else
1275 "  Performs screen-formatting actions.  Correct operation of these commands",
1276 "  depends on proper terminal setup on both ends of the connection -- mainly",
1277 "  that the host terminal type is set to agree with the kind of terminal or",
1278 "  the emulation you are viewing C-Kermit through.",
1279 #endif /* OS2 */
1280 " ",
1281 "SCREEN CLEAR",
1282 "  Moves the cursor to home position and clears the entire screen.",
1283 #ifdef OS2
1284 "  Synonyms: CLS, CLEAR SCREEN, CLEAR COMMAND-SCREEN ALL",
1285 #else
1286 "  Synonyms: CLS, CLEAR SCREEN.",
1287 #endif /* OS2 */
1288 " ",
1289 "SCREEN CLEOL",
1290 "  Clears from the current cursor position to the end of the line.",
1291 #ifdef OS2
1292 "  Synonym: CLEAR COMMAND-SCREEN EOL",
1293 #endif /* OS2 */
1294 " ",
1295 "SCREEN MOVE row column",
1296 "  Moves the cursor to the indicated row and column.  The row and column",
1297 "  numbers are 1-based so on a 24x80 screen, the home position is 1 1 and",
1298 "  the lower right corner is 24 80.  If a row or column number is given that",
1299 "  too large for what Kermit or the operating system thinks is your screen",
1300 "  size, the appropriate number is substituted.",
1301 " ",
1302 "Also see:",
1303 #ifdef OS2
1304 "  HELP FUNCTION SCRNCURX, HELP FUNCTION SCRNCURY, HELP FUNCTION SCRSTR,",
1305 #endif /* OS2 */
1306 "  SHOW VARIABLE TERMINAL, SHOW VARIABLE COLS, SHOW VAR ROWS, SHOW COMMAND.",
1307 ""
1308 };
1309 
1310 #ifndef NOSPL
1311 static char *hmfword[] = {
1312 "Function \\fword(s1,n1,s2,s3,n2,n3) - Extracts a word from a string.",
1313 "    s1 = source string.",
1314 "    n1 = word number (1-based) counting from left; if negative, from right.",
1315 "    s2 = optional break set.",
1316 "    s3 = optional include set (or ALL, CSV, or TSV).",
1317 "    n2 = optional grouping mask.",
1318 "    n3 = optional separator flag:",
1319 "       0 = collapse adjacent separators;",
1320 "       1 = don't collapse adjacent separators.",
1321 " ",
1322 "  \\fword() returns the n1th \"word\" of the string s1, according to the",
1323 "  criteria specified by the other parameters.",
1324 " ",
1325 "  The BREAK SET is the set of all characters that separate words. The",
1326 "  default break set is all characters except ASCII letters and digits.",
1327 "  ASCII (C0) control characters are treated as break characters by default,",
1328 "  as are spacing and punctuation characters, brackets, and so on, and",
1329 "  all 8-bit characters.",
1330 " ",
1331 "  The INCLUDE SET is the set of characters that are to be treated as ",
1332 "  parts of words even though they normally would be separators.  The",
1333 "  default include set is empty.  Three special symbolic include sets are",
1334 "  also allowed:",
1335 "   ",
1336 "    ALL (meaning include all bytes that are not in the break set)",
1337 "    CSV (special treatment for Comma-Separated-Value records)",
1338 "    TSV (special treatment for Tab-Separated-Value records)",
1339 " ",
1340 "  For operating on 8-bit character sets, the include set should be ALL.",
1341 " ",
1342 "  If the GROUPING MASK is given and is nonzero, words can be grouped by",
1343 "  quotes or brackets selected by the sum of the following:",
1344 " ",
1345 "     1 = doublequotes:    \"a b c\"",
1346 "     2 = braces:          {a b c}",
1347 "     4 = apostrophes:     'a b c'",
1348 "     8 = parentheses:     (a b c)",
1349 "    16 = square brackets: [a b c]",
1350 "    32 = angle brackets:  <a b c>",
1351 " ",
1352 "  Nesting is possible with {}()[]<> but not with quotes or apostrophes.",
1353 " ",
1354 "Returns string:",
1355 "  Word number n1, if there is one, otherwise an empty string.",
1356 " ",
1357 "Also see:",
1358 "  HELP FUNCTION SPLIT",
1359 ""
1360 };
1361 
1362 static char *hmxxprompt[] = {
1363 "Syntax: PROMPT [ text ]",
1364 "  Enters interactive command level from within a script in such a way that",
1365 "  the script can be continued with an END or RETURN command.  STOP, EXIT,",
1366 "  SHOW STACK, TRACE, and Ctrl-C all have their normal effects.  The PROMPT",
1367 "  command allows variables to be examined or changed, or any other commands",
1368 "  to be given, in any number, prior to returning to the script, allowing",
1369 "  Kermit to serve as its own debugger; adding the PROMPT command to a script",
1370 "  is like setting a breakpoint.  If the optional text is included, it is",
1371 "  used as the new prompt for this level, e.g. \"prompt Breakpoint_1>\".",
1372 ""
1373 };
1374 
1375 static char *hxxinp[] = {
1376 "Syntax:  INPUT [ /COUNT:n /CLEAR /NOMATCH /NOWRAP ] \
1377 { number-of-seconds, time-of-day } [ text ]",
1378 " ",
1379 "Examples:",
1380 "  INPUT 5 Login:",
1381 "  INPUT 23:59:59 RING",
1382 "  INPUT /NOMATCH 10",
1383 "  INPUT /CLEAR 10 \\13\\10",
1384 "  INPUT /CLEAR 10 \\13\\10$\32",
1385 "  INPUT /COUNT:256 10",
1386 "  INPUT 10 \\fpattern(<*@*.*>)",
1387 " ",
1388 "  Waits up to the given number of seconds, or until the given time of day,",
1389 "  for the given text to arrive on the connection. For use in script programs",
1390 "  with IF FAILURE or IF SUCCESS, which tell whether the desired text arrived",
1391 "  within the given amount of time.",
1392 " ",
1393 "  The text, if given, can be a regular text or it can be a \\pattern()",
1394 "  invocation, in which case it is treated as a pattern rather than a literal",
1395 "  string (HELP PATTERNS for details).",
1396 " ",
1397 "  If the /COUNT: switch is included, INPUT waits for the given number of",
1398 "  characters to arrive.",
1399 " ",
1400 "  If no text is specified, INPUT waits for the first character that arrives",
1401 "  and makes it available in the \\v(inchar) variable.  This is equivalent to",
1402 "  including a /COUNT: switch with an argument of 1.",
1403 " ",
1404 "  If the /NOMATCH switch is included, INPUT does not attempt to match any",
1405 "  characters, but continues reading from the communication connection until",
1406 "  the timeout interval expires.  If the timeout interval is 0, the INPUT",
1407 "  command does not wait; i.e. the given text must already be available for",
1408 "  reading for the INPUT command to succeed.  If the interval is negative,",
1409 "  the INPUT command waits forever.",
1410 " ",
1411 "  The INPUT buffer, \\v(input), is normally circular.  Incoming material is",
1412 "  appended to it until it reaches the end, and then it wraps around to the",
1413 "  beginning.  If the /CLEAR switch is given, INPUT clears its buffer before",
1414 "  reading from the connection.",
1415 " ",
1416 "  Typical example of use:",
1417 " ",
1418 "    INPUT 10 login:",
1419 "    IF FAIL EXIT 1 \"Timed out waiting for login prompt\"",
1420 "    LINEOUT myuserid",
1421 "    INPUT 10 Password:",
1422 "    IF FAIL EXIT 1 \"Timed out waiting for Password prompt\"",
1423 "    LINEOUT xxxxxxx",
1424 " ",
1425 "  The /NOWRAP switch means that INPUT should return with failure status",
1426 "  and with \\v(instatus) set to 6 if its internal buffer fills up before",
1427 "  any of the other completion criteria are met.  This allows for capture",
1428 "  of the complete incoming data stream (except NUL bytes, which are",
1429 "  discarded).  CAUTION: if the search target (if any) spans the INPUT buffer",
1430 "  boundary, INPUT will not succeed.",
1431 " ",
1432 "  \
1433 \\v(instatus) values are: 0 (success), 1 (timed out), 2 (keyboard interrupt),",
1434 "  3 (internal error), 4 (I/O error or connection lost), 5 (INPUT disabled),",
1435 "  and 6 (buffer filled and /NOWRAP set); these are shown by \\v(inmessage).",
1436 " ",
1437 "  Also see OUTPUT, MINPUT, REINPUT, SET INPUT and CLEAR.  See HELP PAUSE for",
1438 "  details on time-of-day format and HELP PATTERNS for pattern syntax.",
1439 ""};
1440 
1441 static char *hxxout[] = {
1442 "Syntax: OUTPUT text",
1443 "  Sends the text out the communications connection, as if you had typed it",
1444 "  during CONNECT mode.  The text may contain backslash codes, variables,",
1445 "  etc, plus the following special codes:",
1446 " ",
1447 "    \\N - Send a NUL (ASCII 0) character (you can't use \\0 for this).",
1448 "    \\B - Send a BREAK signal.",
1449 "    \\L - Send a Long BREAK signal.",
1450 " ",
1451 "Also see SET OUTPUT.",
1452 "" };
1453 #endif /* NOSPL */
1454 
1455 static char *hxypari[] = {
1456 "SET PARITY NONE",
1457 "  Chooses 8 data bits and no parity.",
1458 " ",
1459 "SET PARITY { EVEN, ODD, MARK, SPACE }",
1460 "  Chooses 7 data bits plus the indicated kind of parity.",
1461 "  Forces 8th-bit prefixing during file transfer.",
1462 " ",
1463 #ifdef HWPARITY
1464 "SET PARITY HARDWARE { EVEN, ODD }",
1465 "  Chooses 8 data bits plus the indicated kind of parity.",
1466 " ",
1467 "Also see SET TERMINAL BYTESIZE, SET SERIAL, and SET STOP-BITS.",
1468 #else
1469 "Also see SET TERMINAL BYTESIZE and SET SERIAL.",
1470 #endif /* HWPARITY */
1471 ""};
1472 
1473 #ifndef NOLOCAL
1474 static char *hxyesc[] = {
1475 #ifdef OS2
1476 "Syntax: SET ESCAPE number",
1477 "  Decimal ASCII value for escape character during CONNECT, normally 29",
1478 "  (Control-]).  Type the escape character followed by C to get back to the",
1479 "  C-Kermit prompt or followed by ? to see other options, or use the \\Kexit",
1480 "  keyboard verb, normally assigned to Alt-x.",
1481 #else
1482 #ifdef NEXT
1483 "Syntax: SET ESCAPE number",
1484 "  Decimal ASCII value for escape character during CONNECT, normally 29",
1485 "  (Control-]).  Type the escape character followed by C to get back to the",
1486 "  C-Kermit prompt or followed by ? to see other options.",
1487 #else
1488 "Syntax: SET ESCAPE number",
1489 "  Decimal ASCII value for escape character during CONNECT, normally 28",
1490 "  (Control-\\).  Type the escape character followed by C to get back to the",
1491 "  C-Kermit prompt or followed by ? to see other options.",
1492 #endif /* NEXT */
1493 #endif /* OS2 */
1494 " ",
1495 "You may also enter the escape character as ^X (circumflex followed by a",
1496 "letter or one of: @, ^, _, [, \\, or ], to indicate a control character;",
1497 "for example, SET ESC ^_ sets your escape character to Ctrl-Underscore.",
1498 " ",
1499 "You can also specify an 8-bit character (128-255) as your escape character,",
1500 "either by typing it literally or by entering its numeric code.",
1501 "" };
1502 #endif /* NOLOCAL */
1503 
1504 #ifndef NOSPL
1505 static char *hxyout[] = {
1506 "SET OUTPUT PACING <number>",
1507 "  How many milliseconds to pause after sending each OUTPUT character,",
1508 "  normally 0.",
1509 " ",
1510 "SET OUTPUT SPECIAL-ESCAPES { ON, OFF }",
1511 "  Whether to process the special OUTPUT-only escapes \\B, \\L, and \\N.",
1512 "  Normally ON (they are processed).",
1513 "" };
1514 
1515 static char *hxyinp[] = {
1516 "Syntax: SET INPUT parameter value",
1517 " ",
1518 #ifdef CK_AUTODL
1519 "SET INPUT AUTODOWNLOAD { ON, OFF }",
1520 "  Controls whether autodownloads are allowed during INPUT command execution.",
1521 " ",
1522 #endif /* CK_AUTODL */
1523 "SET INPUT BUFFER-LENGTH number-of-bytes",
1524 "  Removes the old INPUT buffer and creates a new one with the given length.",
1525 " ",
1526 "SET INPUT CANCELLATION { ON, OFF }",
1527 "  Whether an INPUT in progress can be can interrupted from the keyboard.",
1528 " ",
1529 "SET INPUT CASE { IGNORE, OBSERVE }",
1530 "  Tells whether alphabetic case is to be significant in string comparisons.",
1531 "  This setting is local to the current macro or command file, and is",
1532 "  inherited by subordinate macros and take files.",
1533 " ",
1534 "SET INPUT ECHO { ON, OFF }",
1535 "  Tells whether to display arriving characters read by INPUT on the screen.",
1536 " ",
1537 #ifdef CKFLOAT
1538 "SET INPUT SCALE-FACTOR <number>",
1539 "  A number to multiply all INPUT timeouts by, which may include a fractional",
1540 "  part, e.g. 2.5.  All INPUT commands that specify a timeout in seconds",
1541 "  (as opposed to a specific time of day) have their time limit adjusted",
1542 "  automatically by this factor, which is also available in the built-in",
1543 "  read-only variable \\v(inscale).  The default value is 1.0.",
1544 " ",
1545 
1546 #endif	/* CKFLOAT */
1547 
1548 "SET INPUT SILENCE <number>",
1549 "  The maximum number to seconds of silence (no input at all) before the",
1550 "  INPUT command times out, 0 for no maximum.",
1551 " ",
1552 #ifdef OS2
1553 "SET INPUT TERMINAL { ON, OFF }",
1554 "  Determines whether the data received during an INPUT command is displayed",
1555 "  in the terminal window.  Default is ON.",
1556 " ",
1557 #endif /* OS2 */
1558 "SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }",
1559 "  Tells whether to proceed or quit from a script program if an INPUT command",
1560 "  fails.  PROCEED (default) allows use of IF SUCCESS / IF FAILURE commands.",
1561 "  This setting is local to the current macro or command file, and is",
1562 "  inherited by subordinate macros and take files.",
1563 "" };
1564 
1565 static char *hxyfunc[] = {
1566 "SET FUNCTION DIAGNOSTICS { ON, OFF }",
1567 "  Whether to issue diagnostic messages for illegal function calls and",
1568 "  references to nonexistent built-in variables.  ON by default.",
1569 " ",
1570 "SET FUNCTION ERROR { ON, OFF }",
1571 "  Whether an illegal function call or reference to a nonexistent built-in",
1572 "  variable should cause a command to fail.  OFF by default.",
1573 "" };
1574 #endif /* NOSPL */
1575 
1576 static char *hxyxyz[] = {
1577 #ifdef CK_XYZ
1578 #ifdef XYZ_INTERNAL
1579 
1580 /* This is for built-in protocols */
1581 
1582 "Syntax: SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 [ s3 ] ]",
1583 "  Selects protocol to use for transferring files.  String s1 is a command to",
1584 "  send to the remote host prior to SENDing files with this protocol in",
1585 "  binary mode; string s2 is the same thing but for text mode.  Use \"%s\" in",
1586 "  any of these strings to represent the filename(s).  If the protocol is",
1587 "  KERMIT, you may also specify a string s3, the command to start a Kermit",
1588 "  server on the remote host when you give a GET, REGET, REMOTE, or other",
1589 "  client command.  Use { braces } if any command contains spaces.  Examples:",
1590 " ",
1591 "    set proto xmodem {rx %s} {rx -a %s}",
1592 "    set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
1593 
1594 #else /* This is for when non-Kermit protocols are external */
1595 
1596 "Syntax: \
1597 SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 s3 s4 s5 s6 ]",
1598 "  Selects protocol to use for transferring files.  s1 and s2 are commands to",
1599 "  output prior to SENDing with this protocol, to automatically start the",
1600 "  RECEIVE process on the other end in binary or text mode, respectively.",
1601 "  If the protocol is KERMIT, s3 is the command to start a Kermit server on",
1602 "  the remote computer, and there are no s4-s6 commands.  Otherwise, s3 and",
1603 "  s4 are commands used on this computer for sending files with this protocol",
1604 "  in binary or text mode, respectively; s5 and s6 are the commands for",
1605 "  receiving files with this protocol.  Use \"%s\" in any of these strings",
1606 "  to represent the filename(s).  Use { braces } if any command contains",
1607 "  spaces.  Examples:",
1608 " ",
1609 "    set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
1610 "    set proto ymodem rb {rb -a} {sb %s} {sb -a %s} rb rb",
1611 " ",
1612 "External protocols require REDIRECT and external file transfer programs that",
1613 "use redirectable standard input/output.",
1614 #endif /* XYZ_INTERNAL */
1615 #else
1616 "Syntax: \
1617 SET PROTOCOL KERMIT [ s1 [ s2 [ s3 ] ] ]",
1618 "  Lets you specify the autoupload binary, autoupload text, and autoserver",
1619 "  command strings to be sent to the remote system in advance of any SEND",
1620 "  or GET commands.  By default these are \"kermit -ir\", \"kermit -r\", and",
1621 "  \"kermit -x\".  Use { braces } around any command that contains spaces.",
1622 "  Example:",
1623 " ",
1624 "    set proto kermit {kermit -Yir} {kermit -YTr} {kermit -Yx}",
1625 #endif /* CK_XYZ */
1626 " ",
1627 "  SHOW PROTOCOL displays the current settings.",
1628 ""};
1629 
1630 static char *hmxxbye = "Syntax: BYE\n\
1631   Shut down and log out a remote Kermit server";
1632 
1633 #ifdef CK_PERMS
1634 #ifdef UNIX
1635 static char *hmxxchmod[] = {
1636 "Syntax: CHMOD [ switches ] code filespec",
1637 "  UNIX only.  Changes permissions of the given file(s) to the given code,",
1638 "  which must be an octal number such as 664 or 775.  Optional switches:",
1639 " ",
1640 "   /FILES        Only change permissions of regular files.",
1641 "   /DIRECTORIES  Only change permissions of directory files.",
1642 "   /TYPE:BINARY  Only change permissions of binary files.",
1643 "   /TYPE:TEXT    Only change permissions of text files.",
1644 "   /DOTFILES     Include files whose names begin with dot (.).",
1645 "   /RECURSIVE    Change permissions in subdirectories too.",
1646 "   /LIST         List each file (synonym: /VERBOSE).",
1647 "   /NOLIST       Operate silently (synonym: /QUIET).",
1648 "   /PAGE         When listing, pause at end of each screen (implies /LIST).",
1649 "   /NOPAGE       When listing, don't pause at end of each screen.",
1650 "   /SIMULATE     Show what would be done but don't actually do it.",
1651 ""
1652 };
1653 #endif /* UNIX */
1654 #endif /* CK_PERMS */
1655 
1656 #ifndef NOSPL
1657 #ifndef NOSEXP
1658 static char *hmxxsexp[] = {
1659 "Syntax: (operation operand [ operand [ ... ] ])",
1660 " ",
1661 "  C-Kermit includes a simple LISP-like S-Expression parser operating on",
1662 "  numbers only.  An S-Expression is always enclosed in parentheses.  The",
1663 "  parentheses can contain (a) a number, (b) a variable, (c) a function that",
1664 "  returns a number, or (d) an operator followed by one or more operands.",
1665 "  Operands can be any of (a) through (c) or an S-Expression.  Numbers can be",
1666 "  integers or floating-point.  Any operand that is not a number and does not",
1667 "  start with backslash (\\) is treated as a Kermit macro name.  Operators:",
1668 " ",
1669 " Operator  Action                                 Example           Value",
1670 "  EVAL (.)  Returns the contained value            (6)               6",
1671 "  QUOTE (') Inhibits evaluation of following value (quote a)         a",
1672 "  SETQ      Assigns a value to a global variable   (setq a 2)        2",
1673 "  LET       Assigns a value to a local variable    (let b -1.3)     -1.3",
1674 "  +         Adds all operands (1 or more)          (+ a b)           0.7",
1675 "  -         Subtracts all operands (1 or more)     (- 9 5 2 1)       1",
1676 "  *         Multiplies all operands (1 or more)    (* a (+ b 1) 3)  -1.8",
1677 "  /         Divides all operands (1 or more)       (/ b a 2)        -0.325",
1678 "  ^         Raise given number to given power      (^ 3 2)           9",
1679 "  ++        Increments a variable                  (++ a 1.2)        3.2",
1680 "  --        Decrements a variable                  (-- a)            1",
1681 "  ABS       Absolute value of 1 operand            (abs (* a b 3))   7.8",
1682 "  MAX       Maximum of all operands (1 or more)    (max 1 2 3 4)     4",
1683 "  MIN       Minimum of all operands (1 or more)    (min 1 2 3 4)     1",
1684 "  MOD       Modulus of all operands (1 or more)    (mod 7 4 2)       1",
1685 "  TRUNCATE  Integer part of floating-point operand (truncate 1.333)  1",
1686 "  CEILING   Ceiling of floating-point operand      (ceiling 1.25)    2",
1687 "  FLOOR     Floor of floating-point operand        (floor 1.25)      1",
1688 "  ROUND     Operand rounded to nearest integer     (round 1.75)      2",
1689 "  ROUND     ...or to given number of decimals      (round 1.7584 2)  1.76",
1690 "  SQRT      Square root of 1 operand               (sqrt 2)          1.414..",
1691 "  EXP       e (2.71828..) to the given power       (exp -1)          0.367..",
1692 "  SIN       Sine of angle expressed in radians     (sin (/ pi 2))    1.0",
1693 "  COS       Cosine of given number                 (cos pi)         -1.0",
1694 "  TAN       Tangent of given number                (tan pi)          0.0",
1695 "  LOG       Natural log (base e) of given number   (log 2.7183)      1.000..",
1696 "  LOG10     Log base 10 of given number            (log10 1000)      3.0",
1697 " ",
1698 "Predicate operators return 0 if false, 1 if true, and if it is the outermost",
1699 "operator, sets SUCCESS or FAILURE accordingly:",
1700 " ",
1701 "  <         Operands in strictly descending order  (< 6 5 4 3 2 1)   1",
1702 "  <=        Operands in descending order           (<= 6 6 5 4 3 2)  1",
1703 "  !=        Operands are not equal                 (!= 1 1 1.0)      0",
1704 "  =   (==)  All operands are equal                 (= 3 3 3 3)       1",
1705 "  >         Operands in strictly ascending order   (> 1 2 3 4 5 6)   1",
1706 "  >=        Operands in ascending order            (> 1 1 2 3 4 5)   1",
1707 "  AND (&&)  Operands are all true                  (and 1 1 1 1 0)   0",
1708 "  OR  (||)  At least one operand is true           (or 1 1 1 1 0)    1",
1709 "  XOR       Logical Exclusive OR                   (xor 3 1)         0",
1710 "  NOT (!)   Reverses truth value of operand        (not 3)           0",
1711 " ",
1712 "Bit-oriented operators:",
1713 " ",
1714 "  &         Bitwise AND                            (& 7 2)           2",
1715 "  |         Bitwise OR                             (| 1 2 3 4)       7",
1716 "  #         Bitwise Exclusive OR                   (# 3 1)           2",
1717 "  ~         Reverses all bits                      (~ 3)            -4",
1718 " ",
1719 "Operators that work on truth values:",
1720 " ",
1721 "  IF        Conditional evaluation                 (if (1) 2 3)      2",
1722 " ",
1723 "Operators can also be names of Kermit macros that return either numeric",
1724 "values or no value at all.",
1725 " ",
1726 "Built-in constants are:",
1727 " ",
1728 "  t         True (1)",
1729 "  nil       False (empty)",
1730 "  pi        The value of Pi (3.1415926...)",
1731 " ",
1732 "If SET SEXPRESSION TRUNCATE-ALL-RESULTS is ON, all results are trunctated",
1733 "to integer values by discarding any fractional part.  Otherwise results",
1734 "are floating-point if there fractional part and integer otherwise.",
1735 "If SET SEXPRESSION ECHO-RESULT is AUTO (the default), the value of the",
1736 "S-Expression is printed if the S-Expression is given at top level; if ON,",
1737 "it is printed at any level; if OFF it is not printed.  At all levels, the",
1738 "variable \\v(sexpression) is set to the most recent S-Expression, and",
1739 "\\v(svalue) is set to its value.  You can use the \\fsexpresssion() function",
1740 "to evaluate an S-Expression anywhere in a Kermit command.",
1741 ""
1742 };
1743 #endif /* NOSEXP */
1744 #endif /* NOSPL */
1745 
1746 static char *hmxxgrep[] = {
1747 #ifdef UNIXOROSK
1748 "Syntax: GREP [ options ] pattern filespec",
1749 #else
1750 "Syntax: FIND [ options ] pattern filespec",
1751 #endif /* UNIXOROSK */
1752 "  Searches through the given file or files for the given character string",
1753 "  or pattern.  In the normal case, all lines containing any text that matches"
1754 ,
1755 "  the pattern are printed.  Pattern syntax is as described in HELP PATTERNS",
1756 "  except that '*' is implied at the beginning unless the pattern starts with",
1757 "  '^' and also at the end unless the pattern ends with '$'.  Therefore,",
1758 "  \"grep something *.txt\" lists all lines in all *.txt files that contain",
1759 "  the word \"something\", but \"grep ^something *.txt\" lists only the lines",
1760 "  that START with \"something\".  The command succeeds if any of the given",
1761 "  files contained any lines that match the pattern, otherwise it fails.",
1762 #ifdef UNIXOROSK
1763 "  Synonym: FIND.",
1764 #else
1765 "  Synonym: GREP.",
1766 #endif /* UNIXOROSK */
1767 " ",
1768 "File selection options:",
1769 "  /NOBACKUPFILES",
1770 "    Excludes backup files (like oofa.txt.~3~) from the search.",
1771 "  /DOTFILES",
1772 "    Includes files whose names start with dot (.) in the search.",
1773 "  /NODOTFILES",
1774 "    Excludes files whose names start with dot (.) from the search.",
1775 #ifdef RECURSIVE
1776 "  /RECURSIVE",
1777 "    Searches through files in subdirectories too.",
1778 #endif /* RECURSIVE */
1779 "  /TYPE:TEXT",
1780 "    Search only text files (requires FILE SCAN ON).",
1781 "  /TYPE:BINARY",
1782 "    Search only binary files (requires FILE SCAN ON).",
1783 " ",
1784 "Pattern-matching options:",
1785 "  /NOCASE",
1786 "    Ignores case of letters (ASCII only) when comparing.",
1787 "  /NOMATCH",
1788 "    Searches for lines that do NOT match the pattern.",
1789 "  /EXCEPT:pattern",
1790 "    Exclude lines that match the main pattern that also match this pattern.",
1791 " ",
1792 "Display options:",
1793 "  /COUNT:variable-name",
1794 "    For each file, prints only the filename and a count of matching lines",
1795 "    and assigns the total match count to the variable, if one is given.",
1796 "  /NAMEONLY",
1797 "    Prints the name of each file that contains at least one matching line,",
1798 "    one name per line, rather than showing each matching line.",
1799 "  /NOLIST",
1800 "    Doesn't print anything (but sets SUCCESS or FAILURE appropriately).",
1801 "  /LINENUMBERS",
1802 "    Precedes each file line by its line number within the file.",
1803 "  /PAGE",
1804 "    Pauses after each screenful.",
1805 "  /NOPAGE",
1806 "    Doesn't pause after each screenful.",
1807 "  /OUTPUT:name",
1808 "    Sends results to the given file.  If this switch is omitted, the",
1809 "    results appear on your screen.  This switch overrides any express or",
1810 "    implied /PAGE switch.",
1811 ""};
1812 
1813 static char *hmxxdir[] = {
1814 #ifdef DOMYDIR
1815 "Syntax: DIRECTORY [ switches ] [ filespec [ filespec [ ... ] ] ]",
1816 #ifdef LOCUS
1817 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
1818 "  this command is equivalent to REMOTE DIRECTORY (RDIR).  Otherwise:",
1819 " ",
1820 #endif /* LOCUS */
1821 "  Lists local files.  The filespec may be a filename, possibly containing",
1822 "  wildcard characters, or a directory name.  If no filespec is given, all",
1823 "  files in the current directory are listed.  If a directory name is given,",
1824 "  all the  files in it are listed.  Multiple filespecs can be given.",
1825 "  Optional switches:",
1826 " ",
1827 "   /BRIEF           List filenames only.",
1828 #ifdef CK_PERMS
1829 "   /VERBOSE       + Also list permissions, size, and date.",
1830 #else
1831 "   /VERBOSE       + Also list date and size.",
1832 #endif /* CK_PERMS */
1833 "   /FILES           Show files but not directories.",
1834 "   /DIRECTORIES     Show directories but not files.",
1835 "   /ALL           + Show both files and directories.",
1836 "   /ARRAY:&a        Store file list in specified array (e.g. \\%a[]).",
1837 "   /PAGE            Pause after each screenful.",
1838 "   /NOPAGE          Don't pause after each screenful.",
1839 "   /TOP:n           Only show the top n lines of the directory listing.",
1840 #ifdef UNIXOROSK
1841 "   /DOTFILES        Include files whose names start with dot (period).",
1842 "   /NODOTFILES    + Don't include files whose names start with dot.",
1843 "   /FOLLOWLINKS     Follow symbolic links.",
1844 "   /NOFOLLOWLINKS + Don't follow symbolic links.",
1845 "   /NOLINKS         Don't list symbolic links at all.",
1846 "   /BACKUP        + Include backup files (names end with .~n~).",
1847 "   /NOBACKUPFILES   Don't include backup files.",
1848 #endif /* UNIXOROSK */
1849 "   /OUTPUT:file     Store directory listing in the given file.",
1850 "   /HEADING         Include heading and summary.",
1851 "   /NOHEADING     + Don't include heading or summary.",
1852 "   /COUNT:var       Put the number of matching files in the given variable.",
1853 "   /SUMMARY         Print only count and total size of matching files.",
1854 "   /XFERMODE        Show pattern-based transfer mode (T=Text, B=Binary).",
1855 "   /TYPE:           Show only files of the specified type (text or binary).",
1856 "   /MESSAGE:text    Add brief message to each listing line.",
1857 "   /NOMESSAGE     + Don't add message to each listing line.",
1858 "   /NOXFERMODE    + Don't show pattern-based transfer mode",
1859 "   /ISODATE       + In verbose listings, show date in ISO 8061 format.",
1860 "   /ENGLISHDATE     In verbose listings, show date in \"English\" format.",
1861 #ifdef RECURSIVE
1862 "   /RECURSIVE       Descend through subdirectories.",
1863 "   /NORECURSIVE   + Don't descend through subdirectories.",
1864 #endif /* RECURSIVE */
1865 "   /SORT:key        Sort by key, NAME, DATE, or SIZE; default key is NAME.",
1866 "   /NOSORT        + Don't sort.",
1867 "   /ASCENDING     + If sorting, sort in ascending order.",
1868 "   /REVERSE         If sorting, sort in reverse order.",
1869 " ",
1870 "Factory defaults are marked with +.  Default for paging depends on SET",
1871 "COMMAND MORE-PROMPTING.  Use SET OPTIONS DIRECTORY [ switches ] to change",
1872 "defaults; use SHOW OPTIONS to display customized defaults.  Also see",
1873 "WDIRECTORY.",
1874 #else
1875 "Syntax: DIRECTORY [ filespec ]",
1876 "  Lists the specified file or files.  If no filespec is given, all files",
1877 "  in the current directory are listed.",
1878 #endif /* DOMYDIR */
1879 ""};
1880 
1881 static char *hmxxtouch[] = {
1882 "Syntax: TOUCH [ switches ] filespec",
1883 "  Updates the modification time of the given file or files to the current",
1884 "  date and time or to the date and time specified in the /MODTIME: switch.",
1885 "  If the filespec is the name of a single file that does not exist, the file",
1886 "  is created.  The following switches can be used to restrict the files",
1887 "  to be touched according to various criteria:",
1888 " ",
1889 "   /FILES           Select files but not directories.",
1890 "   /DIRECTORIES     Select directories but not files.",
1891 "   /ALL           + Select both files and directories.",
1892 "   /AFTER:          Select files modified after the given date",
1893 "   /BEFORE:         Select files modified before the given date",
1894 "   /LARGER:         Select files larger than the given size in bytes",
1895 "   /SMALLER:        Select files smaller than the given size in bytes",
1896 "   /EXCEPT:         Exclude the given files (list or pattern)",
1897 #ifdef UNIXOROSK
1898 "   /DOTFILES        Include files whose names start with dot (period).",
1899 "   /NODOTFILES    + Don't include files whose names start with dot.",
1900 "   /FOLLOWLINKS     For symbolic link touch the linked-to file, not the link",
1901 "   /NOFOLLOWLINKS + Select the link itself, not the file it links to.",
1902 "   /NOLINKS         Skip over symbolic links.",
1903 "   /BACKUP        + Include backup files (names end with .~n~).",
1904 "   /NOBACKUPFILES   Don't include backup files.",
1905 #endif /* UNIXOROSK */
1906 "   /TYPE:           Select only files of the given type, TEXT or BINARY.",
1907 #ifdef RECURSIVE
1908 "   /RECURSIVE       Descend through subdirectories.",
1909 "   /NORECURSIVE   + Don't descend through subdirectories.",
1910 " ",
1911 " Action switches:",
1912 " ",
1913 "   /MODTIME:        Modification time for selected files.",
1914 "   /SIMULATE        List files that would be touched, but don't touch them.",
1915 "   /LIST            Show which files are being touched.",
1916 #endif /* RECURSIVE */
1917 " ",
1918 "Factory defaults are marked with +.  Use HELP DATE to learn the date-time",
1919 "formats usable with /MODTIME:.  If a /MODTIME: switch is not given, each",
1920 "selected file gets a modification time equal to the current clock time.",
1921 "You can use the /SIMULATE switch in combination with other switches to see",
1922 "which files will be affected without actually changing their dates.",
1923 ""};
1924 
1925 static char *hmxxchange[] = {
1926 "Syntax: CHANGE [ switches ] filespec string1 string2",
1927 "  Changes all occurrences of string1 to string2 in the given file or files.",
1928 "  Works line by line, does not do multiline or across-line substitutions.",
1929 "  To remove strings from files, specify string2 as \"\" or omit string2.",
1930 "  Temporary files are created in the directory indicated by \\v(tmpdir)",
1931 "  (show var tmpdir).  You can select a different temporary directory with",
1932 "  the SET TEMP-DIRECTORY command.  All temporary files are deleted after use."
1933 ,
1934 " ",
1935 "  String1 and String2 should be enclosed in doublequotes \"\" or braces {} if"
1936 ,
1937 "  if they contain spaces.  In the event that they already contain braces or",
1938 "  doublequotes, especially if these are not balanced, some quoting may be",
1939 "  required.  Or you can assign the strings to variables and then use the",
1940 "  variable names in the CHANGE command; example:",
1941 " ",
1942 "    .a = {value=\"./",
1943 "    .b = {value=\"../",
1944 "    change *.html \\m(a) \\m(b)",
1945 " ",
1946 "  Since the CHANGE command works line by line, only text files can be",
1947 "  changed; C-Kermit automatically skips over binary files.",
1948 " ",
1949 "  File selection switches (factory defaults are marked with +):",
1950 " ",
1951 "   /AFTER:         Select files modified after the given date",
1952 "   /BEFORE:        Select files modified before the given date",
1953 "   /LARGER:        Select files larger than the given size in bytes",
1954 "   /SMALLER:       Select files smaller than the given size in bytes",
1955 "   /EXCEPT:        Exclude the given files (list or pattern)",
1956 #ifdef UNIXOROSK
1957 "   /DOTFILES       Include files whose names start with dot (period).",
1958 "   /NODOTFILES   + Don't include files whose names start with dot.",
1959 #endif /* UNIXOROSK */
1960 #ifdef RECURSIVE
1961 "   /RECURSIVE      Descend through subdirectories.",
1962 "   /NORECURSIVE  + Don't descend through subdirectories.",
1963 #endif /* RECURSIVE */
1964 " ",
1965 " File disposition switches:",
1966 " ",
1967 "   /BACKUP:name       Back up original files to named directory.",
1968 "   /DESTINATION:name  Store resulting changed files in named directory.",
1969 "   If neither of these options is given, original files are overwritten.",
1970 " ",
1971 " String selection switches:",
1972 " ",
1973 "   /CASE:{ON,OFF}  OFF (default) = ignore case in string1; \
1974 ON = don't ignore",
1975 " ",
1976 " Action switches:",
1977 " ",
1978 "   /COUNT:name     Set named variable to number of files that were changed.",
1979 "   /SIMULATE       List files that would be changed, but don't change them.",
1980 "   /LIST           Show which files are being changed.",
1981 "   /MODTIME:       Modification time for change files, PRESERVE or UPDATE.",
1982 " ",
1983 "You can use the /SIMULATE switch in combination with other switches to see",
1984 "which files will be affected without actually changing them.",
1985 ""};
1986 
1987 #ifndef NOSPL
1988 static char *hmxxkcd[] = {
1989 "Syntax: KCD symbolic-directory-name",
1990 "  Kermit Change Directory: Like CD (q.v.) but (a) always acts locally, and",
1991 "  (b) takes a symbolic directory name rather than an actual directory name.",
1992 "  The symbolic names correspond to Kermit's directory-valued built-in",
1993 "  variables, such as \\v(download), \\v(exedir), and so on.  Here's the list:"
1994 ,
1995 " ",
1996 #ifdef NT
1997 "    appdata       Your personal C-Kermit Windows application data directory",
1998 "    common        C-Kermit's application data directory for all users",
1999 "    desktop       Your Windows desktop",
2000 #endif /* NT */
2001 "    download      Your download directory (if any)",
2002 #ifdef OS2ORUNIX
2003 "    exedir        The directory where the Kermit executable resides",
2004 #endif /* OS2ORUNIX */
2005 "    home          Your home, login, or default directory",
2006 "    inidir        The directory where Kermit's initialization was found",
2007 #ifdef UNIX
2008 "    lockdir       The UNIX UUCP lockfile directory on this computer",
2009 #endif /* UNIX */
2010 #ifdef NT
2011 "    personal      Your \"My Documents\" directory",
2012 #endif /* NT */
2013 "    startup       Your current directory at the time Kermit started",
2014 "    textdir       The directory where Kermit text files reside, if any",
2015 "    tmpdir        Your temporary directory",
2016 " ",
2017 "  Also see CD, SET FILE DOWNLOAD, SET TEMP-DIRECTORY.",
2018 ""
2019 };
2020 #endif /* NOSPL */
2021 
2022 static char *hmxxcwd[] = {
2023 #ifdef LOCUS
2024 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
2025 "  this command is equivalent to REMOTE CD (RCD).  Otherwise:",
2026 " ",
2027 #endif /* LOCUS */
2028 #ifdef vms
2029 "Syntax: CD [ directory or device:directory ]",
2030 "  Change Working Directory.  Equivalent to VMS SET DEFAULT command.",
2031 #else
2032 #ifdef datageneral
2033 "Change Working Directory, equivalent to AOS/VS 'dir' command.",
2034 #else
2035 #ifdef OS2
2036 "Syntax: CD [ disk or directory name ]",
2037 "  Change Disk or Directory.  If a disk or directory name is not specified,",
2038 "  your current directory becomes the one specified by HOME environment",
2039 "  variable, if any.  A disk letter must be followed by a colon.",
2040 #else
2041 "Syntax: CD [ directory name ]",
2042 "  Change Directory.  Changes your current, working, default directory to the",
2043 "  one given, so that future non-absolute filename references are relative to",
2044 "  this directory.  If the directory name is omitted, your home (login)",
2045 "  directory is supplied.",
2046 #endif /* OS2 */
2047 #endif /* datageneral */
2048 #endif /* vms */
2049 "  C-Kermit's default prompt shows your current directory.",
2050 "  Synonyms: LCD, CWD.",
2051 #ifdef LOCUS
2052 "  Also see: SET LOCUS, PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
2053 #else
2054 "  Also see: PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
2055 #endif /* LOCUS */
2056 #ifndef NOSPL
2057 "  And see: HELP KCD.",
2058 #endif /* NOSPL */
2059 "  Relevant environment variables: CDPATH, HOME.",
2060 ""};
2061 
2062 static char *hmxxdel[] = {
2063 "Syntax: DELETE [ switches... ] filespec",
2064 #ifdef LOCUS
2065 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
2066 "  this command is equivalent to REMOTE DELETE (RDELETE).  Otherwise:",
2067 " ",
2068 #endif /* LOCUS */
2069 "  Deletes a file or files on the computer where C-Kermit is running.",
2070 "  The filespec may denote a single file or can include wildcard characters",
2071 "  to match multiple files.  RM is a synonym for DELETE.  Switches include:",
2072 " ",
2073 "/AFTER:date-time",
2074 #ifdef VMS
2075 "  Specifies that only those files created after the given date-time are",
2076 #else
2077 "  Specifies that only those files modified after the given date-time are",
2078 #endif /* VMS */
2079 "  to be deleted.  HELP DATE for info about date-time formats.",
2080 " ",
2081 "/BEFORE:date-time",
2082 #ifdef VMS
2083 "  Specifies that only those files modified before the given date-time",
2084 #else
2085 "  Specifies that only those files modified before the given date-time",
2086 #endif /* VMS */
2087 "  are to be deleted.",
2088 " ",
2089 "/NOT-AFTER:date-time",
2090 #ifdef VMS
2091 "  Specifies that only those files modified at or before the given date-time",
2092 #else
2093 "  Specifies that only those files modified at or before the given date-time",
2094 #endif /* VMS */
2095 "  are to be deleted.",
2096 " ",
2097 "/NOT-BEFORE:date-time",
2098 #ifdef VMS
2099 "  Specifies that only those files modified at or after the given date-time",
2100 #else
2101 "  Specifies that only those files modified at or after the given date-time",
2102 #endif /* VMS */
2103 "  are to be deleted.",
2104 " ",
2105 "/LARGER-THAN:number",
2106 "  Specifies that only those files longer than the given number of bytes are",
2107 "  to be deleted.",
2108 " ",
2109 "/SMALLER-THAN:number",
2110 "  Specifies that only those files smaller than the given number of bytes are",
2111 "  to be sent.",
2112 " ",
2113 "/EXCEPT:pattern",
2114 "  Specifies that any files whose names match the pattern, which can be a",
2115 "  regular filename or may contain wildcards, are not to be deleted.  To",
2116 "  specify multiple patterns (up to 8), use outer braces around the group",
2117 "  and inner braces around each pattern:",
2118 " ",
2119 "    /EXCEPT:{{pattern1}{pattern2}...}",
2120 " ",
2121 #ifdef UNIXOROSK
2122 "/DOTFILES",
2123 "  Include (delete) files whose names begin with \".\".",
2124 " ",
2125 "/NODOTFILES",
2126 "  Skip (don't delete) files whose names begin with \".\".",
2127 " ",
2128 #endif /* UNIXOROSK */
2129 "/TYPE:TEXT",
2130 "  Delete only regular text files (requires FILE SCAN ON)",
2131 " ",
2132 "/TYPE:BINARY",
2133 "  Delete only regular binary files (requires FILE SCAN ON)",
2134 " ",
2135 "/DIRECTORIES",
2136 "  Include directories.  If this switch is not given, only regular files",
2137 "  are deleted.  If it is given, Kermit attempts to delete any directories",
2138 "  that match the given file specification, which succeeds only if the",
2139 "  directory is empty.",
2140 " ",
2141 #ifdef RECURSIVE
2142 "/RECURSIVE",
2143 "  The DELETE command applies to the entire directory tree rooted in the",
2144 "  current or specified directory.  When the /DIRECTORIES switch is also",
2145 "  given, Kermit deletes all the (matching) files in each directory before",
2146 "  attempting to delete the directory itself.",
2147 " ",
2148 #endif /* RECURSIVE */
2149 #ifdef UNIX
2150 #ifdef RECURSIVE
2151 "/ALL",
2152 "  This is a shortcut for /RECURSIVE /DIRECTORIES /DOTFILES.",
2153 #else
2154 "/ALL",
2155 "  This is a shortcut for /DIRECTORIES /DOTFILES.",
2156 #endif /* RECURSIVE */
2157 #else  /* !UNIX */
2158 #ifdef RECURSIVE
2159 "/ALL",
2160 "  This is a shortcut for /RECURSIVE /DIRECTORIES.",
2161 #else
2162 "/ALL",
2163 "  This is a synonym for /DIRECTORIES.",
2164 #endif /* RECURSIVE */
2165 #endif /* UNIX */
2166 " ",
2167 "/LIST",
2168 "  List each file and tell whether it was deleted.  Synonyms: /LOG, /VERBOSE.",
2169 " ",
2170 "/NOLIST",
2171 "  Don't list files while deleting.  Synonyms: /NOLOG, /QUIET.",
2172 " ",
2173 "/HEADING",
2174 "  Print heading and summary information.",
2175 " ",
2176 "/NOHEADING",
2177 "  Don't print heading and summary information.",
2178 " ",
2179 "/SUMMARY",
2180 "  Like /HEADING /NOLIST, but only prints the summary line.",
2181 " ",
2182 "/PAGE",
2183 "  If listing, pause after each screenful.",
2184 " ",
2185 "/NOPAGE",
2186 "  Don't pause after each screenful.",
2187 " ",
2188 "/ASK",
2189 "  Interactively ask permission to delete each file.  Reply Yes or OK to",
2190 "  delete it, No not to delete it, Quit to cancel the DELETE command, and",
2191 "  Go to go ahead and delete all the rest of the files without asking.",
2192 " ",
2193 "/NOASK",
2194 "  Delete files without asking permission.",
2195 " ",
2196 "/SIMULATE",
2197 "  Preview files selected for deletion without actually deleting them.",
2198 "  Implies /LIST.",
2199 " ",
2200 "Use SET OPTIONS DELETE to make selected switches effective for every DELETE",
2201 "command \
2202 unless you override them; use SHOW OPTIONS to see selections currently",
2203 #ifdef LOCUS
2204 "in effect.  Also see HELP SET LOCUS, HELP PURGE, HELP WILDCARD.",
2205 #else
2206 "in effect.  Also see HELP PURGE, HELP WILDCARD.",
2207 #endif /* LOCUS */
2208 ""};
2209 
2210 #ifndef NOHTTP
2211 static char *hmxxhttp[] = {
2212 "Syntax:",
2213 #ifdef CK_SSL
2214 "HTTP [ <switches> ] OPEN [{ /SSL, /TLS }] <hostname> <service/port>",
2215 #else
2216 "HTTP [ <switches> ] OPEN <hostname> <service/port>",
2217 #endif /*CK_SSL */
2218 "  Instructs Kermit to open a new connection for HTTP communication with",
2219 "  the specified host on the specified port.  The default port is \"http\".",
2220 #ifdef CK_SSL
2221 "  If /SSL or /TLS are specified or if the service is \"https\" or port 443,",
2222 "  a secure connection will be established using the current authentication",
2223 "  settings.  See HELP SET AUTH for details.",
2224 #endif /* CK_SSL */
2225 "  If <switches> are specified, they are applied to all subsequent HTTP",
2226 "  actions (GET, PUT, ...) until an HTTP CLOSE command is executed.",
2227 "  A URL can be included in place of the hostname and service or port.",
2228 " ",
2229 "HTTP CLOSE",
2230 "  Instructs Kermit to close any open HTTP connection and clear any saved",
2231 "  switch values.",
2232 " ",
2233 "HTTP [ <switches> ] CONNECT <host>[:<port>]",
2234 "  Instructs the server to establish a connection with the specified host",
2235 "  and to redirect all data transmitted between Kermit and the host for the",
2236 "  life of the connection.",
2237 " ",
2238 "HTTP [ <switches> ] GET <remote-filename> [ <local-filename> ]",
2239 "  Retrieves the named file on the currently open HTTP connection.  The",
2240 "  default local filename is the same as the remote filename, but with any",
2241 "  path stripped.  If you want the file to be displayed on the screen instead",
2242 "  of stored on disk, include the /TOSCREEN switch and omit the local",
2243 "  filename.  If you give a URL instead of a remote filename, this commands",
2244 "  opens the connection, GETs the file, and closes the connection; the same",
2245 "  is true for the remaining HTTP commands for which you can specify a",
2246 "  remote filename, directory name, or path.",
2247 " ",
2248 "HTTP [ <switches> ] HEAD <remote-filename> [ <local-filename> ]",
2249 "  Like GET except without actually getting the file; instead it gets only",
2250 "  the headers, storing them into the given file (if a local filename is",
2251 "  specified), one line per header item as shown in the /ARRAY: switch",
2252 "  description.",
2253 " ",
2254 "HTTP [ <switches> ] INDEX <remote-directory> [ <local-filename> ]",
2255 "  Retrieves the file listing for the given server directory.",
2256 "  NOTE: This command is not supported by most Web servers, and even when",
2257 "  the server understand it, there is no stardard response format.",
2258 " ",
2259 "HTTP [ <switches> ] POST [ /MIME-TYPE:<type> ] <local-file> <remote-path>",
2260 "     [ <dest-file> ]",
2261 "  Used to send a response as if it were sent from a form.  The data to be",
2262 "  posted must be read from a file.",
2263 " ",
2264 "HTTP [ <switches> ] PUT [ /MIME-TYPE:<type> ] <local-file> <remote-file>",
2265 "     [ <dest-file> ]",
2266 "  Uploads the given local file to server file.  If the remote filename is",
2267 "  omitted, the local name is used, but with any path stripped.",
2268 " ",
2269 "HTTP [ <switches> ] DELETE <remote-filename>",
2270 "  Instructs the server to delete the specified filename.",
2271 " ",
2272 "where <switches> are:",
2273 "/AGENT:<user-agent>",
2274 "  Identifies the client to the server; \"C-Kermit\"",
2275 "  by default.",
2276 " ",
2277 "/HEADER:<header-line>",
2278 "  Used for specifying any optional headers.  A list of headers is provided",
2279 "  using braces for grouping:",
2280 " ",
2281 "    /HEADER:{{<tag>:<value>}{<tag>:<value>}...}",
2282 " ",
2283 "  For a listing of valid <tag> value and <value> formats see RFC 1945:",
2284 "  \"Hypertext Transfer Protocol -- HTTP/1.0\".  A maximum of eight headers",
2285 "  may be specified.",
2286 " ",
2287 "/TOSCREEN",
2288 "  Display server responses on the screen.",
2289 " ",
2290 "/USER:<name>",
2291 "  In case a page requires a username for access.",
2292 " ",
2293 "/PASSWORD:<password>",
2294 "  In case a page requires a password for access.",
2295 " ",
2296 "/ARRAY:<arrayname>",
2297 "  Tells Kermit to store the response headers in the given array, one line",
2298 "  per element.  The array need not be declared in advance.  Example:",
2299 " ",
2300 "    http /array:c get kermit/index.html",
2301 "    show array c",
2302 "    Dimension = 9",
2303 "    1. Date: Fri, 26 Nov 1999 23:12:22 GMT",
2304 "    2. Server: Apache/1.3.4 (Unix)",
2305 "    3. Last-Modified: Mon, 06 Sep 1999 22:35:58 GMT",
2306 "    4. ETag: \"bc049-f72-37d441ce\"",
2307 "    5. Accept-Ranges: bytes",
2308 "    6. Content-Length: 3954",
2309 "    7. Connection: close     ",
2310 "    8. Content-Type: text/html",
2311 " ",
2312 "As you can see, the header lines are like MIME e-mail header lines:",
2313 "identifier, colon, value.  The /ARRAY switch is the only method available",
2314 "to a script to process the server responses for a POST or PUT command.",
2315 " ",
2316 ""
2317 };
2318 #endif /* NOHTTP */
2319 
2320 #ifdef CK_KERBEROS
2321 static char *hmxxauth[] = {
2322 "Syntax:",
2323 "AUTHENTICATE { KERBEROS4, KERBEROS5 [ switches ] } <action> [ switches ]",
2324 "  Obtains or destroys Kerberos tickets and lists information about them.",
2325 "  Actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS.  KERBEROS4 can be",
2326 "  abbreviated K4 or KRB4; KERBEROS5 can be abbreviated K5 or KRB5.  Use ? to",
2327 "  see which keywords, switches, or other quantities are valid at each point",
2328 "  in the command.",
2329 " ",
2330 "  The actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS:",
2331 " ",
2332 "    AUTH { K4, K5 } { INITIALIZE [switches], DESTROY,",
2333 "      LIST-CREDENTIALS [switches] }",
2334 " ",
2335 "  The INITIALIZE action is the most complex, and its format is different",
2336 "  for Kerberos 4 and Kerberos 5.  The format for Kerberos 4 is:",
2337 " ",
2338 "  AUTH K4 INITIALIZE [ /INSTANCE:<name> /LIFETIME:<minutes> -",
2339 "    /PASSWORD:<password> /PREAUTH /REALM:<name> <principal> ]",
2340 " ",
2341 "  All switches are optional.  Kerberos 4 INITIALIZE switches are:",
2342 " ",
2343 "  /INSTANCE:<name>",
2344 "    Allows an Instance (such as a hostname) to be specified.",
2345 " ",
2346 "  /LIFETIME:<number>",
2347 "    Specifies the requested lifetime in minutes for the ticket.  If no",
2348 "    lifetime is specified, 600 minutes is used.  If the lifetime is greater",
2349 "    than the maximum supported by the ticket granting service, the resulting",
2350 "    lifetime is shortened accordingly.",
2351 " ",
2352 "  /NOT-PREAUTH",
2353 "    Instructs Kermit to send a ticket getting ticket (TGT) request to the",
2354 "    KDC without any preauthentication data.",
2355 " ",
2356 "  /PASSWORD:<string>",
2357 "    Allows a password to be included on the command line or in a script",
2358 "    file.  If no /PASSWORD switch is included, you are prompted on a separate"
2359 ,
2360 "    line.  The password switch is provided on a use-at-your-own-risk basis",
2361 "    for use in automated scripts.  WARNING: Passwords should not be stored in"
2362 ,
2363 "    files.",
2364 " ",
2365 "  /PREAUTH",
2366 "    Instructs Kermit to send a preauthenticated Ticket-Getting Ticket (TGT)",
2367 "    request to the KDC instead of a plaintext request.  The default when",
2368 "    supported by the Kerberos libraries.",
2369 " ",
2370 "  /REALM:<name>",
2371 "    Allows a realm to be specified (overriding the default realm).",
2372 " ",
2373 "  <principal>",
2374 "    Your identity in the given or default Kerberos realm, of the form:",
2375 "    userid[.instance[.instance]]@[realm]  ",
2376 "    Can be omitted if it is the same as your username or SET LOGIN USERID",
2377 "    value on the client system.",
2378 " ",
2379 "  The format for Kerberos 5 is as follows:",
2380 " ",
2381 "  AUTH K5 [ /CACHE:<filename> ] { INITIALIZE [ switches ], DESTROY,",
2382 "    LIST-CREDENTIALS ...}",
2383 " ",
2384 "The INITIALIZE command for Kerberos 5 can include a number of switches;",
2385 "all are optional:",
2386 " ",
2387 "AUTH K5 [ /CACHE:<filename> ] INITITIALIZE [ /ADDRESSES:<addr-list>",
2388 "  /FORWARDABLE /KERBEROS4 /LIFETIME:<minutes> /PASSWORD:<password>",
2389 "  /POSTDATE:<date-time> /PROXIABLE /REALM:<name> /RENEW /RENEWABLE:<minutes>",
2390 "  /SERVICE:<name> /VALIDATE <principal> ]",
2391 " ",
2392 "  All Kerberos 5 INITIALIZE switches are optional:",
2393 " ",
2394 "  /ADDRESSES:{list of ip-addresses}",
2395 "    Specifies a list of IP addresses that should be placed in the Ticket",
2396 "    Getting Ticket in addition to the local machine addresses.",
2397 " ",
2398 "  /FORWARDABLE",
2399 "    Requests forwardable tickets.",
2400 " ",
2401 "  /INSTANCE:<name>",
2402 "    Allows an Instance (such as a hostname) to be specified.",
2403 " ",
2404 "  /KERBEROS4",
2405 "    Instructs Kermit to get Kerberos 4 tickets in addition to Kerberos 5",
2406 "    tickets.  If Kerberos 5 tickets are not supported by the server, a",
2407 "    mild warning is printed and Kerberos 4 tickets are requested.",
2408 " ",
2409 "  /LIFETIME:<number>",
2410 "    Specifies the requested lifetime in minutes for the ticket.  If no",
2411 "    lifetime is specified, 600 minutes is used.  If the lifetime is greater",
2412 "    than the maximum supported by the ticket granting service, the resulting",
2413 "    lifetime is shortened.",
2414 " ",
2415 "  /NO-KERBEROS4",
2416 "    Instructs Kermit to not attempt to retrieve Kerberos 4 credentials.",
2417 " ",
2418 "  /NOT-FORWARDABLE",
2419 "    Requests non-forwardable tickets.",
2420 " ",
2421 "  /NOT-PROXIABLE",
2422 "    Requests non-proxiable tickets.",
2423 " ",
2424 "  /PASSWORD:<string>",
2425 "    Allows a password to be included on the command line or in a script",
2426 "    file.  If no /PASSWORD switch is included, you are prompted on a separate"
2427 ,
2428 "    line.  The password switch is provided on a use-at-your-own-risk basis",
2429 "    for use in automated scripts.  WARNING: Passwords should not be stored in"
2430 ,
2431 "    files.",
2432 " ",
2433 "  /POSTDATE:<date-time>",
2434 "    Requests a postdated ticket, valid starting at <date-time>.  Postdated",
2435 "    tickets are issued with the invalid flag set, and need to be fed back to",
2436 "    the KDC before use with the /VALIDATE switch.  Type HELP DATE for info",
2437 "    on date-time formats.",
2438 " ",
2439 "  /PROXIABLE",
2440 "    Requests proxiable tickets.",
2441 " ",
2442 "  /REALM:<string>",
2443 "    Allows an alternative realm to be specified.",
2444 " ",
2445 "  /RENEW",
2446 "    Requests renewal of a renewable Ticket-Granting Ticket.  Note that ",
2447 "    an expired ticket cannot be renewed even if it is within its renewable ",
2448 "    lifetime.",
2449 " ",
2450 "  /RENEWABLE:<number>",
2451 "    Requests renewable tickets, with a total lifetime of <number> minutes.",
2452 " ",
2453 "  /SERVICE:<string>",
2454 "    Allows a service other than the ticket granting service to be specified.",
2455 " ",
2456 "  /VALIDATE",
2457 "    Requests that the Ticket Granting Ticket in the cache (with the invalid",
2458 "    flag set) be passed to the KDC for validation.  If the ticket is within",
2459 "    its requested time range, the cache is replaced with the validated",
2460 "    ticket.",
2461 " ",
2462 "  <principal>",
2463 "    Your identity in the given or default Kerberos realm, of the form:",
2464 "    userid[/instance][@realm]  ",
2465 "    Can be omitted if it is the same as your username or SET LOGIN USERID",
2466 "    value on the client system.",
2467 " ",
2468 "  Note: Kerberos 5 always attempts to retrieve a Ticket-Getting Ticket (TGT)",
2469 "  using the preauthenticated TGT request.",
2470 " ",
2471 "  AUTHORIZE K5 LIST-CREDENTIALS [ /ADDRESSES /FLAGS /ENCRYPTION ]",
2472 " ",
2473 "  Shows start time, expiration time, service or principal name, plus",
2474 "  the following additional information depending the switches:",
2475 " ",
2476 "  /ADDRESSES displays the hostnames and/or IP addresses embedded within",
2477 "    the tickets.",
2478 " ",
2479 "  /FLAGS provides the following information (if applicable) for each ticket:",
2480 "    F - Ticket is Forwardable",
2481 "    f - Ticket was Forwarded",
2482 "    P - Ticket is Proxiable",
2483 "    p - Ticket is a Proxy",
2484 "    D - Ticket may be Postdated",
2485 "    d - Ticket has been Postdated",
2486 "    i - Ticket is Invalid",
2487 "    R - Ticket is Renewable",
2488 "    I - Ticket is the Initial Ticket",
2489 "    H - Ticket has been authenticated by Hardware",
2490 "    A - Ticket has been Pre-authenticated",
2491 " ",
2492 "  /ENCRYPTION displays the encryption used by each ticket (if applicable):",
2493 "    DES-CBC-CRC",
2494 "    DES-CBC-MD4",
2495 "    DES-CBC-MD5",
2496 "    DES3-CBC-SHA",
2497 ""
2498 };
2499 #endif /* CK_KERBEROS */
2500 
2501 #ifndef NOCSETS
2502 static char *hmxxassoc[] = {
2503 "ASSOCIATE FILE-CHARACTER-SET <file-character-set> <transfer-character-set>",
2504 "  Tells C-Kermit that whenever the given file-character set is selected, and",
2505 "  SEND CHARACTER-SET (q.v.) is AUTOMATIC, the given transfer character-set",
2506 "  is selected automatically.",
2507 " ",
2508 "ASSOCIATE XFER-CHARACTER-SET <xfer-character-set> <file-character-set>",
2509 "  Tells C-Kermit that whenever the given transfer-character set is selected,",
2510 "  either by command or by an announcer attached to an incoming text file,",
2511 "  and SEND CHARACTER-SET is AUTOMATIC, the specified file character-set is",
2512 "  to be selected automatically.  Synonym: ASSOCIATE TRANSFER-CHARACTER-SET.",
2513 " ",
2514 "Use SHOW ASSOCIATIONS to list the current character-set associations, and",
2515 "SHOW CHARACTER-SETS to list the current settings.",
2516 ""
2517 };
2518 #endif /* NOCSETS */
2519 
2520 static char *hmxxpat[] = {
2521 "A \"pattern\" is notation used in a search string when searching through",
2522 "text.  C-Kermit uses three kinds of patterns: floating patterns, anchored",
2523 "patterns, and wildcards.  Wildcards are anchored patterns that are used to",
2524 "match file names; type HELP WILDCARD to learn about them.",
2525 " ",
2526 "In a pattern, certain characters are special:",
2527 " ",
2528 "* Matches any sequence of zero or more characters.  For example, \"k*t\"",
2529 "  matches all strings that start with \"k\" and end with \"t\" including",
2530 "  \"kt\", \"kit\", \"knight\", or \"kermit\".",
2531 " ",
2532 #ifdef VMS
2533 "% Matches any single character.  For example, \"k%%%%t\" matches all strings",
2534 #else
2535 "? Matches any single character.  For example, \"k????t\" matches all strings",
2536 #endif /* VMS */
2537 "  that are exactly 6 characters long and start with \"k\" and end with",
2538 #ifdef VMS
2539 "  with \"t\".",
2540 #else
2541 "  with \"t\".  When typing commands at the prompt, you must precede any",
2542 "  question mark to be used for matching by a backslash (\\) to override the",
2543 "  normal function of question mark in interactive commands, which is to",
2544 "  provide menus and file lists.",
2545 #endif /* VMS */
2546 " ",
2547 #ifdef OS2ORUNIX
2548 #ifdef CKREGEX
2549 "[abc]",
2550 "  Square brackets enclosing a list of characters matches any character in",
2551 "  the list.  Example: h[aou]t matches hat, hot, and hut.",
2552 " ",
2553 "[a-z]",
2554 "  Square brackets enclosing a range of characters matches any character in",
2555 "  the range; a hyphen (-) separates the low and high elements of the range.",
2556 "  For example, [a-z] matches any character from a to z.",
2557 " ",
2558 "[acdm-z]",
2559 "  Lists and ranges may be combined.  This example matches a, c, d, or any",
2560 "  letter from m through z.",
2561 " ",
2562 "{string1,string2,...}",
2563 "  Braces enclose a list of strings to be matched.  For example:",
2564 "  ker{mit,nel,beros} matches kermit, kernel, and kerberos.  The strings",
2565 "  may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
2566 #endif /* CKREGEX */
2567 #endif /* OS2ORUNIX */
2568 #ifndef NOSPL
2569 " ",
2570 "To force a special pattern character to be taken literally, precede it with",
2571 "a backslash, e.g. [a\\-z] matches a, hyphen, or z rather than a through z.",
2572 " ",
2573 "A floating  pattern can also include the following special characters:",
2574 " ",
2575 "^ (First character of pattern) Anchors the pattern at the beginning.",
2576 "$ (Last character of pattern) Anchors the pattern at the end.",
2577 " ",
2578 "If a floating pattern does not start with \"^\", the pattern can match",
2579 "anywhere in the string instead of only at the beginning; in other words, a",
2580 "leading \"*\" is assumed.  Similarly, if the pattern doesn't end with \"$\",",
2581 "a trailing \"*\" is assumed.",
2582 " ",
2583 "The following commands and functions use floating patterns:",
2584 "  GREP [ <switches> ] <pattern> <filespec>",
2585 "  TYPE /MATCH:<pattern> <file>",
2586 "  \\farraylook(<pattern>,<arrayname>)",
2587 "  \\fsearch(<pattern>,<string>[,<offset>])",
2588 "  \\frsearch(<pattern>,<string>[,<offset>])",
2589 "  The /EXCEPT: clause in SEND, GET, DELETE, etc.",
2590 " ",
2591 "Example:",
2592 "  \\fsearch(abc,xxabcxxx) succeeds because xxabcxx contains abc.",
2593 "  \\fsearch(^abc,xxabcxx) fails because xxabcxx does not start with abc.",
2594 " ",
2595 
2596 "All other commands and functions use anchored patterns, meaning that ^ and $",
2597 "are not treated specially, and * is not assumed at the beginning or end of",
2598 "the pattern.  This is true mainly of filename patterns (wildcards), since",
2599 "you would not want a command like \"delete x\" to delete all files whose",
2600 "names contained \"x\"!",
2601 
2602 " ",
2603 "You can use anchored patterns not only in filenames, but also in SWITCH",
2604 "case labels, in the INPUT and MINPUT commands, and in file binary- and",
2605 "text-patterns for filenames.  The IF MATCH pattern is also anchored.",
2606 #endif /* NOSPL */
2607 "" };
2608 
2609 static char *hmxxwild[] = {
2610 
2611 "A \"wildcard\" is a notation used in a filename to match multiple files.",
2612 "For example, in \"send *.txt\" the asterisk is a wildcard.  Kermit commands",
2613 "that accept filenames also accepts wildcards, except commands that are",
2614 "allowed to operate on only one file, such as TRANSMIT.",
2615 "This version of Kermit accepts the following wildcards:",
2616 " ",
2617 "* Matches any sequence of zero or more characters.  For example, \"ck*.c\"",
2618 "  matches all files whose names start with \"ck\" and end with \".c\"",
2619 "  including \"ck.c\".",
2620 " ",
2621 #ifdef VMS
2622 "% Matches any single character.  For example, \"ck%.c\" matches all files",
2623 #else
2624 "? Matches any single character.  For example, \"ck?.c\" matches all files",
2625 #endif /* VMS */
2626 "  whose names are exactly 5 characters long and start with \"ck\" and end",
2627 #ifdef VMS
2628 "  with \".c\".",
2629 #else
2630 "  with \".c\".  When typing commands at the prompt, you must precede any",
2631 "  question mark to be used for matching by a backslash (\\) to override the",
2632 "  normal function of question mark in interactive commands, which is to",
2633 "  provide menus and file lists.  You don't, however, need to quote filename",
2634 "  question marks in command files (script programs).",
2635 #endif /* VMS */
2636 " ",
2637 #ifdef OS2ORUNIX
2638 #ifdef CKREGEX
2639 "[abc]",
2640 "  Square brackets enclosing a list of characters matches any character in",
2641 "  the list.  Example: ckuusr.[ch] matches ckuusr.c and ckuusr.h.",
2642 " ",
2643 "[a-z]",
2644 "  Square brackets enclosing a range of characters matches any character in",
2645 "  the range; a hyphen (-) separates the low and high elements of the range.",
2646 "  For example, [a-z] matches any character from a to z.",
2647 " ",
2648 "[acdm-z]",
2649 "  Lists and ranges may be combined.  This example matches a, c, d, or any",
2650 "  letter from m through z.",
2651 " ",
2652 "{string1,string2,...}",
2653 "  Braces enclose a list of strings to be matched.  For example:",
2654 "  ck{ufio,vcon,cmai}.c matches ckufio.c, ckvcon.c, or ckcmai.c.  The strings",
2655 "  may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
2656 #endif /* CKREGEX */
2657 #endif /* OS2ORUNIX */
2658 " ",
2659 "To force a special pattern character to be taken literally, precede it with",
2660 "a backslash, e.g. [a\\-z] matches a, hyphen, or z rather than a through z.",
2661 "Or tell Kermit to SET WILDCARD-EXPANSION OFF before entering or referring",
2662 "to the filename.",
2663 " ",
2664 #ifndef NOSPL
2665 "Similar notation can be used in general-purpose string matching.  Type HELP",
2666 "PATTERNS for details.  Also see HELP SET MATCH.",
2667 #endif /* NOSPL */
2668 "" };
2669 
2670 #ifndef NOXFER
2671 static char *hmxxfast[] = {
2672 "FAST, CAUTIOUS, and ROBUST are predefined macros that set several",
2673 "file-transfer parameters at once to achieve the desired file-transfer goal.",
2674 "FAST chooses a large packet size, a large window size, and a fair amount of",
2675 "control-character unprefixing at the risk of possible failure on some",
2676 "connections.  FAST is the default tuning in C-Kermit 7.0 and later.  In case",
2677 "FAST file transfers fail for you on a particular connection, try CAUTIOUS.",
2678 "If that fails too, try ROBUST.  You can also change the definitions of each",
2679 "macro with the DEFINE command.  To see the current definitions, type",
2680 "\"show macro fast\", \"show macro cautious\", or \"show macro robust\".",
2681 ""
2682 };
2683 #endif /* NOXFER */
2684 
2685 #ifdef VMS
2686 static char * hmxxpurge[] = {
2687 "Syntax: PURGE [ switches ] [ filespec ]",
2688 "  Runs the DCL PURGE command.  Switches and filespec are not parsed or",
2689 "  verified by Kermit, but passed directly to DCL.",
2690 ""
2691 };
2692 #else
2693 #ifdef CKPURGE
2694 static char * hmxxpurge[] = {
2695 "Syntax: PURGE [ switches ] [ filespec ]",
2696 "  Deletes backup files; that is, files whose names end in \".~n~\", where",
2697 "  n is a number.  PURGE by itself deletes all backup files in the current",
2698 "  directory.  Switches:",
2699 
2700 " ",
2701 "/AFTER:date-time",
2702 #ifdef VMS
2703 "  Specifies that only those files created after the given date-time are",
2704 #else
2705 "  Specifies that only those files modified after the given date-time are",
2706 #endif /* VMS */
2707 "  to be purged.  HELP DATE for info about date-time formats.",
2708 " ",
2709 "/BEFORE:date-time",
2710 #ifdef VMS
2711 "  Specifies that only those files modified before the given date-time",
2712 #else
2713 "  Specifies that only those files modified before the given date-time",
2714 #endif /* VMS */
2715 "  are to be purged.",
2716 " ",
2717 "/NOT-AFTER:date-time",
2718 #ifdef VMS
2719 "  Specifies that only those files modified at or before the given date-time",
2720 #else
2721 "  Specifies that only those files modified at or before the given date-time",
2722 #endif /* VMS */
2723 "  are to be purged.",
2724 " ",
2725 "/NOT-BEFORE:date-time",
2726 #ifdef VMS
2727 "  Specifies that only those files modified at or after the given date-time",
2728 #else
2729 "  Specifies that only those files modified at or after the given date-time",
2730 #endif /* VMS */
2731 "  are to be purged.",
2732 " ",
2733 "/LARGER-THAN:number",
2734 "  Specifies that only those files longer than the given number of bytes are",
2735 "  to be purged.",
2736 " ",
2737 "/SMALLER-THAN:number",
2738 "  Specifies that only those files smaller than the given number of bytes are",
2739 "  to be purged.",
2740 " ",
2741 "/EXCEPT:pattern",
2742 "  Specifies that any files whose names match the pattern, which can be a",
2743 "  regular filename or may contain wildcards, are not to be purged.  To",
2744 "  specify multiple patterns (up to 8), use outer braces around the group",
2745 "  and inner braces around each pattern:",
2746 " ",
2747 "    /EXCEPT:{{pattern1}{pattern2}...}",
2748 " ",
2749 #ifdef UNIXOROSK
2750 "/DOTFILES",
2751 "  Include (purge) files whose names begin with \".\".",
2752 " ",
2753 "/NODOTFILES",
2754 "  Skip (don't purge) files whose names begin with \".\".",
2755 " ",
2756 #endif /* UNIXOROSK */
2757 #ifdef RECURSIVE
2758 "/RECURSIVE",
2759 "  Descends through the current or specified directory tree.",
2760 " ",
2761 #endif /* RECURSIVE */
2762 "/KEEP:n",
2763 "  Retain the 'n' most recent (highest-numbered) backup files for each file.",
2764 "  By default, none are kept.  If /KEEP is given without a number, 1 is used.",
2765 " ",
2766 "/LIST",
2767 "  Display each file as it is processed and say whether it is purged or kept.",
2768 "  Synonyms: /LOG, /VERBOSE.",
2769 " ",
2770 "/NOLIST",
2771 "  The PURGE command should operate silently (default).",
2772 "  Synonyms: /NOLOG, /QUIET.",
2773 " ",
2774 "/HEADING",
2775 "  Print heading and summary information.",
2776 " ",
2777 "/NOHEADING",
2778 "  Don't print heading and summary information.",
2779 " ",
2780 "/PAGE",
2781 "  When /LIST is in effect, pause at the end of each screenful, even if",
2782 "  COMMAND MORE-PROMPTING is OFF.",
2783 " ",
2784 "/NOPAGE",
2785 "  Don't pause, even if COMMAND MORE-PROMPTING is ON.",
2786 " ",
2787 "/ASK",
2788 "  Interactively ask permission to delete each backup file.",
2789 " ",
2790 "/NOASK",
2791 "  Purge backup files without asking permission.",
2792 " ",
2793 "/SIMULATE",
2794 "  Inhibits the actual deletion of files; use to preview which files would",
2795 "  actually be deleted.  Implies /LIST.",
2796 " ",
2797 "Use SET OPTIONS PURGE [ switches ] to change defaults; use SHOW OPTIONS to",
2798 "display customized defaults.  Also see HELP DELETE, HELP WILDCARD.",
2799 ""
2800 };
2801 #endif /* CKPURGE */
2802 #endif /* VMS */
2803 
2804 static char *hmxxclo[] = {
2805 "Syntax:  CLOSE [ item ]",
2806 "  Close the indicated item.  The default item is CONNECTION, which is the",
2807 "  current SET LINE or SET HOST connection.  The other items are:",
2808 " ",
2809 #ifdef CKLOGDIAL
2810 "    CX-LOG          (connection log, opened with LOG CX)",
2811 #endif /* CKLOGDIAL */
2812 #ifndef NOLOCAL
2813 "    SESSION-LOG     (opened with LOG SESSION)",
2814 #endif /* NOLOCAL */
2815 #ifdef TLOG
2816 "    TRANSACTION-LOG (opened with LOG TRANSACTIONS)",
2817 #endif /* TLOG */
2818 "    PACKET-LOG      (opened with LOG PACKETS)",
2819 #ifdef DEBUG
2820 "    DEBUG-LOG       (opened with LOG DEBUG)",
2821 #endif /* DEBUG */
2822 #ifndef NOSPL
2823 "    READ-FILE       (opened with OPEN READ)",
2824 "    WRITE-FILE      (opened with OPEN WRITE or OPEN APPEND)",
2825 #endif /* NOSPL */
2826 " ",
2827 "Type HELP LOG and HELP OPEN for further info.",
2828 ""
2829 };
2830 
2831 #ifdef CKLEARN
2832 static char * hmxxlearn[] = {
2833 "Syntax: LEARN [ /ON /OFF /CLOSE ] [ filename ]",
2834 "  Records a login script.  If you give a filename, the file is opened for",
2835 "  subsequent recording.  If you don't give any switches, /ON is assumed.",
2836 "  /ON enables recording to the current file (if any); /OFF disables",
2837 "  recording.  /CLOSE closes the current file (if any).  After LEARN /CLOSE",
2838 "  or exit from Kermit, your script is available for execution by the TAKE",
2839 "  command.",
2840 ""
2841 };
2842 #endif /* CKLEARN */
2843 
2844 #ifdef CK_MINPUT
2845 static char *hmxxminp[] = {
2846 "Syntax:  MINPUT [ switches ] n [ string1 [ string2 [ ... ] ] ]",
2847 "Example: MINPUT 5 Login: {Username: } {NO CARRIER} BUSY RING",
2848 "  For use in script programs.  Waits up to n seconds for any one of the",
2849 "  strings to arrive on the communication device.  If no strings are given,",
2850 "  the command waits for any character at all to arrive.  Strings are",
2851 "  separated by spaces; use {braces} or \"doublequotes\" for grouping.  If",
2852 "  any of the strings is encountered within the timeout interval, the command",
2853 "  succeeds and the \\v(minput) variable is set to the number of the string",
2854 "  that was matched: 1, 2, 3, etc.  If none of the strings arrives, the",
2855 "  command times out, fails, and \\v(minput) is set to 0.  In all other",
2856 "  respects, MINPUT is like INPUT.  See HELP INPUT for the available switches",
2857 "  and other details of operation.",
2858 "" };
2859 #endif /* CK_MINPUT */
2860 
2861 #ifndef NOLOCAL
2862 static char *hmxxcon[] = {
2863 "Syntax: CONNECT (or C, or CQ) [ switches ]",
2864 "  Connect to a remote computer via the serial communications device given in",
2865 #ifdef OS2
2866 "  the most recent SET PORT command, or to the network host named in the most",
2867 #else
2868 "  the most recent SET LINE command, or to the network host named in the most",
2869 #endif /* OS2 */
2870 "  recent SET HOST command.  Type the escape character followed by C to get",
2871 "  back to the C-Kermit prompt, or followed by ? for a list of CONNECT-mode",
2872 #ifdef OS2
2873 "  escape commands.  You can also assign the \\Kexit verb to the key or",
2874 "  key-combination of your choice; by default it is assigned to Alt-x.",
2875 #else
2876 "  escape commands.",
2877 " ",
2878 "Include the /QUIETLY switch to suppress the informational message that",
2879 "tells you how to escape back, etc.  CQ is a synonym for CONNECT /QUIETLY.",
2880 #endif /* OS2 */
2881 " ",
2882 "Other switches include:",
2883 #ifdef CK_TRIGGER
2884 " ",
2885 "/TRIGGER:string",
2886 "  One or more strings to look for that will cause automatic return to",
2887 "  command mode.  To specify one string, just put it right after the",
2888 "  colon, e.g. \"/TRIGGER:Goodbye\".  If the string contains any spaces, you",
2889 "  must enclose it in braces, e.g. \"/TRIGGER:{READY TO SEND...}\".  To",
2890 "  specify more than one trigger, use the following format:",
2891 " ",
2892 "    /TRIGGER:{{string1}{string2}...{stringn}}",
2893 " ",
2894 "  Upon return from CONNECT mode, the variable \\v(trigger) is set to the",
2895 "  trigger string, if any, that was actually encountered.  This value, like",
2896 "  all other CONNECT switches applies only to the CONNECT command with which",
2897 "  it is given, and overrides (temporarily) any global SET TERMINAL TRIGGER",
2898 "  string that might be in effect.",
2899 #endif /* CK_TRIGGER */
2900 #ifdef OS2
2901 " ",
2902 "/IDLE-LIMIT:number",
2903 "  The number of seconds of idle time, after which Kermit returns",
2904 "  automatically to command mode; default 0 (no limit).",
2905 " ",
2906 "/IDLE-INTERVAL:number",
2907 "  The number of seconds of idle time, after which Kermit automatically",
2908 "  transmits the idle string.",
2909 " ",
2910 "/IDLE-STRING:string",
2911 "  The string to transmit whenever the idle interval has passed.",
2912 " ",
2913 "/TIME-LIMIT:number",
2914 "  The maximum number of seconds for which the CONNECT session may last.",
2915 "  The default is 0 (no limit).  If a nonzero number is given, Kermit returns",
2916 "  automatically to command mode after this many seconds.",
2917 #endif /* OS2 */
2918 "" };
2919 #endif /* NOLOCAL */
2920 
2921 static char *hmxxmget[] = {
2922 "Syntax: MGET [ switches... ] remote-filespec [ remote-filespec ... ]",
2923 " ",
2924 "Just like GET (q.v.) except allows a list of remote file specifications,",
2925 "separated by spaces.",
2926 ""
2927 };
2928 
2929 static char *hmxxget[] = {
2930 "Syntax: GET [ switches... ] remote-filespec [ as-name ]",
2931 "  Tells the other Kermit, which must be in (or support autoswitching into)",
2932 "  server mode, to send the named file or files.  If the remote-filespec or",
2933 "  the as-name contain spaces, they must be enclosed in braces.  If as-name",
2934 "  is the name of an existing local directory, incoming files are placed in",
2935 "  that directory; if it is the name of directory that does not exist, Kermit",
2936 "  tries to create it.  Optional switches include:",
2937 " ",
2938 "/AS-NAME:text",
2939 "  Specifies \"text\" as the name to store the incoming file under, or",
2940 "  directory to store it in.  You can also specify the as-name as the second",
2941 "  filename on the GET command line.",
2942 " ",
2943 "/BINARY",
2944 "  Performs this transfer in binary mode without affecting the global",
2945 "  transfer mode.",
2946 " ",
2947 "/COMMAND",
2948 "  Receives the file into the standard input of a command, rather than saving",
2949 "  it on  disk.  The /AS-NAME or the second \"filename\" on the GET command",
2950 "  line is interpreted as the name of a command.",
2951 " ",
2952 "/DELETE",
2953 "  Asks the other Kermit to delete the file (or each file in the group)",
2954 "  after it has been transferred successfully.",
2955 " ",
2956 "/EXCEPT:pattern",
2957 "  Specifies that any files whose names match the pattern, which can be a",
2958 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
2959 "  are to be refused.  To specify multiple patterns (up to 8), use outer",
2960 "  braces around the group, and inner braces around each pattern:",
2961 " ",
2962 "    /EXCEPT:{{pattern1}{pattern2}...}",
2963 " ",
2964 "/FILENAMES:{CONVERTED,LITERAL}",
2965 "  Overrides the global SET FILE NAMES setting for this transfer only.",
2966 " ",
2967 "/FILTER:command",
2968 "  Causes the incoming file to passed through the given command (standard",
2969 "  input/output filter) before being written to disk.",
2970 " ",
2971 #ifdef VMS
2972 "/IMAGE",
2973 "  Transfer in image mode.",
2974 " ",
2975 #endif /* VMS */
2976 #ifdef CK_LABELED
2977 "/LABELED",
2978 "  VMS and OS/2 only: Specifies labeled transfer mode.",
2979 " ",
2980 #endif /* CK_LABELED */
2981 
2982 "/MOVE-TO:directory-name",
2983 "  Specifies that each file that arrives should be moved to the specified",
2984 "  directory after, and only if, it has been received successfully.",
2985 " ",
2986 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
2987 "  Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
2988 " ",
2989 "/PIPES:{ON,OFF}",
2990 "  Overrides the TRANSFER PIPES setting for this command only.  ON allows",
2991 "  reception of files with names like \"!tar xf -\" to be automatically",
2992 "  directed to a pipeline.",
2993 " ",
2994 "/QUIET",
2995 "  When sending in local mode, this suppresses the file-transfer display.",
2996 " ",
2997 "/RECOVER",
2998 "  Used to recover from a previously interrupted transfer; GET /RECOVER",
2999 "  is equivalent REGET.  Works only in binary mode.",
3000 " ",
3001 "/RECURSIVE",
3002 "  Tells the server to descend through the directory tree when locating",
3003 "  the files to be sent.",
3004 " ",
3005 "/RENAME-TO:string",
3006 "  Specifies that each file that arrives should be renamed as specified",
3007 "  after, and only if, it has been received successfully.  The string should",
3008 "  normally contain variables like \\v(filename) or \\v(filenum).",
3009 " ",
3010 "/TEXT",
3011 "  Performs this transfer in text mode without affecting the global",
3012 "  transfer mode.",
3013 " ",
3014 "/TRANSPARENT",
3015 "  Inhibits character-set translation of incoming text files for the duration",
3016 "  of the GET command without affecting subsequent commands.",
3017 " ",
3018 "Also see HELP MGET, HELP SEND, HELP RECEIVE, HELP SERVER, HELP REMOTE.",
3019 ""};
3020 
3021 static char *hmxxlg[] = {
3022 "Syntax: LOG (or L) log-type [ filename [ { NEW, APPEND } ] ]",
3023 " ",
3024 "Record information in a log file:",
3025 " ",
3026 #ifdef CKLOGDIAL
3027 "CX",
3028 "  Connections made with SET LINE, SET PORT, SET HOST, DIAL, TELNET, etc.",
3029 "  The default filename is CX.LOG in your home directory and APPEND is the",
3030 "  default mode for opening.",
3031 " ",
3032 #endif /* CKLOGDIAL */
3033 #ifdef DEBUG
3034 "DEBUG",
3035 "  Debugging information, to help track down bugs in the C-Kermit program.",
3036 "  The default log name is debug.log in current directory.",
3037 " ",
3038 #endif /* DEBUG */
3039 "PACKETS",
3040 "  Kermit packets, to help with protocol problems.  The default filename is",
3041 "  packet.log in current directory.",
3042 " ",
3043 #ifndef NOLOCAL
3044 "SESSION",
3045 "  Records your CONNECT session (default: session.log in current directory).",
3046 " ",
3047 #endif /* NOLOCAL */
3048 #ifdef TLOG
3049 "TRANSACTIONS",
3050 "  Names and statistics about files transferred (default: transact.log in",
3051 "  current directory; see HELP SET TRANSACTION-LOG for transaction-log format",
3052 "  options.)",
3053 " ",
3054 #endif /* TLOG */
3055 "If you include the APPEND keyword after the filename, the existing log file,",
3056 "if any, is appended to; otherwise a new file is created (except APPEND is",
3057 "the default for the connection log).  Use CLOSE <keyword> to stop logging.",
3058 #ifdef OS2ORUNIX
3059 " ",
3060 "Note: The filename can also be a pipe, e.g.:",
3061 " ",
3062 "  log transactions |lpr",
3063 "  log debug {| grep \"^TELNET\" > debug.log}",
3064 " ",
3065 "Braces are required if the pipeline or filename contains spaces.",
3066 #endif /* OS2ORUNIX */
3067 "" };
3068 
3069 #ifndef NOSCRIPT
3070 static char *hmxxlogi[] = { "\
3071 Syntax: SCRIPT text",
3072 "  A limited and cryptic \"login assistant\", carried over from old C-Kermit",
3073 "  releases for comptability, but not recommended for use.  Instead, please",
3074 "  use the full script programming language described in chapters 17-19 of",
3075 "  \"Using C-Kermit\".",
3076 " ",
3077 "  Login to a remote system using the text provided.  The login script",
3078 "  is intended to operate similarly to UNIX uucp \"L.sys\" entries.",
3079 "  A login script is a sequence of the form:",
3080 " ",
3081 "    expect send [expect send] . . .",
3082 " ",
3083 "  where 'expect' is a prompt or message to be issued by the remote site, and",
3084 "  'send' is the names, numbers, etc, to return.  The send may also be the",
3085 "  keyword EOT to send Control-D, or BREAK (or \\\\b) to send a break signal.",
3086 "  Letters in send may be prefixed by ~ to send special characters:",
3087 " ",
3088 "  ~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t",
3089 "  append a return, and ~o[o[o]] for octal of a character.  As with some",
3090 "  UUCP systems, sent strings are followed by ~r unless they end with ~c.",
3091 " ",
3092 "  Only the last 7 characters in each expect are matched.  A null expect,",
3093 "  e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect",
3094 "  that a sequence might not arrive, as with uucp, conditional sequences",
3095 "  may be expressed in the form:",
3096 " ",
3097 "    -send-expect[-send-expect[...]]",
3098 " ",
3099 "  where dashed sequences are followed as long as previous expects fail.",
3100 "" };
3101 #endif /* NOSCRIPT */
3102 
3103 #ifndef NOFRILLS
3104 static char * hmxxtyp[] = {
3105 "Syntax: TYPE [ switches... ] file",
3106 "  Displays a file on the screen.  Pauses automatically at end of each",
3107 "  screenful if COMMAND MORE-PROMPTING is ON.  Optional switches:",
3108 " ",
3109 "  /PAGE",
3110 "     Pause at the end of each screenful even if COMMAND MORE-PROMPTING OFF.",
3111 "     Synonym: /MORE",
3112 "  /NOPAGE",
3113 "     Don't pause at the end of each screen even if COMMAND MORE-PROMPTING ON."
3114 ,
3115 "  /HEAD:n",
3116 "     Only type the first 'n' lines of the file.",
3117 "  /TAIL:n",
3118 "     Only type the last 'n' lines of the file.",
3119 "  /MATCH:pattern",
3120 "     Only type lines that match the given pattern.  HELP WILDCARDS for info",
3121 "     info about patterns.  /HEAD and /TAIL apply after /MATCH.",
3122 "  /PREFIX:string",
3123 "     Print the given string at the beginning of each line.",
3124 "  /NUMBER",
3125 "     Add line numbers (conflicts with /PREFIX)",
3126 "  /WIDTH:number",
3127 "     Truncate each line at the given column number before printing.",
3128 #ifdef KUI
3129 "     Or when combined with /GUI specifies the width of the dialog box.",
3130 "  /HEIGHT:number",
3131 "     When combined with /GUI specifies the height of the dialog box.",
3132 "  /GUI:string",
3133 "     Specifies the title to use for the dialog box.",
3134 #endif /* KUI */
3135 "  /COUNT",
3136 "     Count lines (and matches) and print the count(s) but not the lines.",
3137 #ifdef UNICODE
3138 "  /CHARACTER-SET:name",
3139 "     Translates from the named character set.",
3140 #ifndef OS2
3141 "  /TRANSLATE-TO:name",
3142 "     Translates to the named character set (default = current file charset).",
3143 #endif /* OS2 */
3144 "  /TRANSPARENT",
3145 "     Inhibits character-set translation.",
3146 #endif /* UNICODE */
3147 "  /OUTPUT:name",
3148 "     Sends results to the given file.  If this switch is omitted, the",
3149 "     results appear on your screen.  This switch overrides any express or",
3150 "     implied /PAGE switch.",
3151 " ",
3152 "You can use SET OPTIONS TYPE to set the defaults for /PAGE or /NOPAGE and",
3153 "/WIDTH.  Use SHOW OPTIONS to see current TYPE options.",
3154 ""
3155 };
3156 
3157 static char * hmxxcle[] = {
3158 "Syntax: CLEAR [ item-name ]",
3159 " ",
3160 "Clears the named item.  If no item is named, DEVICE-AND-INPUT is assumed.",
3161 " ",
3162 "  ALARM            Clears any pending alarm (see SET ALARM).",
3163 #ifdef CK_APC
3164 "  APC-STATUS       Clears Application Program Command status.",
3165 #endif /* CK_APC */
3166 #ifdef PATTERNS
3167 "  BINARY-PATTERNS  Clears the file binary-patterns list.",
3168 #endif /* PATTERNS */
3169 #ifdef OS2
3170 "  COMMAND-SCREEN   Clears the current command screen.",
3171 #endif /* OS2 */
3172 "  DEVICE           Clears the current port or network input buffer.",
3173 "  DEVICE-AND-INPUT Clears both the device and the INPUT buffer.",
3174 "  DIAL-STATUS      Clears the \\v(dialstatus) variable.",
3175 "  \
3176 INPUT            Clears the INPUT-command buffer and the \\v(input) variable.",
3177 "  KEYBOARD-BUFFER  Clears the command terminal keyboard input buffer.",
3178 #ifdef OS2
3179 "  \
3180 SCROLLBACK       empties the scrollback buffer including the current screen.",
3181 #endif /* OS2 */
3182 "  SEND-LIST        Clears the current SEND list (see ADD).",
3183 #ifdef OS2
3184 "  \
3185 TERMINAL-SCREEN  Clears the current screen a places it into the scrollback.",
3186 "    buffer.",
3187 #endif /* OS2 */
3188 #ifdef PATTERNS
3189 "  TEXT-PATTERNS    Clears the file text-patterns list.",
3190 #endif /* PATTERNS */
3191 ""};
3192 #endif /* NOFRILLS */
3193 
3194 static char * hmxxdate[] = {
3195 "Syntax: DATE [ date-time [ timezone ] ] [ delta-time ]",
3196 "  Prints a date-time in standard format: yyyymmdd_hh:mm:ss.",
3197 "  Various date-time formats are accepted:",
3198 " ",
3199 "  . The date, if given, must precede the time.",
3200 "  . The year must be four digits or else a 2-digit format dd mmm yy,",
3201 "    in which case if (yy < 50) yyyy = yy + 2000; else yyyy = yy + 1900.",
3202 "  . If the year comes first, the second field is the month.",
3203 "  . The day, month, and year may be separated by spaces, /, -, or underscore."
3204 ,"  . The date and time may be separated by spaces or underscore.",
3205 "  . The month may be numeric (1 = January) or spelled out or abbreviated in",
3206 "    English.",
3207 "  . The time may be in 24-hour format or 12-hour format.",
3208 "  . If the hour is 12 or less, AM is assumed unless AM or PM is included.",
3209 "  . If the date is omitted but a time is given, the current date is supplied."
3210 ,
3211 "  . If the time is given but date omitted, 00:00:00 is supplied.",
3212 "  . If both the date and time are omitted, the current date and time are",
3213 "    supplied.",
3214 " ",
3215 "  The following shortcuts can also be used in place of dates:",
3216 " ",
3217 "  NOW",
3218 "    Stands for the current date and time.",
3219 " ",
3220 "  TODAY",
3221 "    Today's date, optionally followed by a time; 00:00:00 if no time given.",
3222 " ",
3223 "  YESTERDAY",
3224 "    Yesterday's date, optionally followed by a time (default 00:00:00).",
3225 " ",
3226 "  TOMORROW",
3227 "    Tomorrows's date, optionally followed by a time (default 00:00:00).",
3228 " ",
3229 "  Timezone specifications are similar to those used in e-mail and HTTP",
3230 "    headers, either a USA timezone name, e.g. EST, or a signed four-digit",
3231 "    timezone offset, {+,-}hhmm, e.g., -0500; it is used to convert date-time,"
3232 ,
3233 "    a local time in that timezone, to GMT which is then converted to the",
3234 "    local time at the host.  If no timezone is given, the date-time is local."
3235 ,"    To convert local time (or a time in a specified timezone) to UTC (GMT),",
3236 "    use the function \futcdate().",
3237 " ",
3238 "  Delta times are given as {+,-}[number date-units][hh[:mm[:ss]]]",
3239 "    A date in the future/past relative to the date-time; date-units may be",
3240 "    DAYS, WEEKS, MONTHS, YEARS: +3days, -7weeks, +3:00, +1month 8:00.",
3241 " ",
3242 "All the formats shown above are acceptable as arguments to date-time switches"
3243 ,
3244 "such as /AFTER: or /BEFORE:, and to functions such as \\fcvtdate(),",
3245 "\\fdiffdate(), and \\futcdate(), that take date-time strings as arguments.",
3246 ""
3247 };
3248 
3249 
3250 #ifndef NOXFER
3251 static char * hmxxsen[] = {
3252 "Syntax: SEND (or S) [ switches...] [ filespec [ as-name ] ]",
3253 "  Sends the file or files specified by filespec.  If the filespec is omitted",
3254 "  the SEND-LIST is used (HELP ADD for more info).  The filespec may contain",
3255 "  wildcard characters.  An 'as-name' may be given to specify the name(s)",
3256 "  the files(s) are sent under; if the as-name is omitted, each file is",
3257 "  sent under its own name.  Also see HELP MSEND, HELP WILDCARD.",
3258 "  Optional switches include:",
3259 " ",
3260 #ifndef NOSPL
3261 "/ARRAY:<arrayname>",
3262 "  Specifies that the data to be sent comes from the given array, such as",
3263 "  \\&a[].  A range may be specified, e.g. SEND /ARRAY:&a[100:199].  Leave",
3264 "  the brackets empty or omit them altogether to send the whole 1-based array."
3265 ,
3266 "  Include /TEXT to have Kermit supply a line terminator at the end of each",
3267 "  array element (and translate character sets if character-set translations",
3268 "  are set up), or /BINARY to treat the array as one long string of characters"
3269 ,
3270 "  to be sent as-is.  If an as-name is not specified, the array is sent with",
3271 "  the name _ARRAY_X_, where \"X\" is replaced by actual array letter.",
3272 " ",
3273 #endif /* NOSPL */
3274 
3275 "/AS-NAME:<text>",
3276 "  Specifies <text> as the name to send the file under instead of its real",
3277 "  name.  This is equivalent to giving an as-name after the filespec.",
3278 " ",
3279 "/BINARY",
3280 "  Performs this transfer in binary mode without affecting the global",
3281 "  transfer mode.",
3282 " ",
3283 "/TEXT",
3284 "  Performs this transfer in text mode without affecting the global",
3285 "  transfer mode.",
3286 " ",
3287 "/TRANSPARENT",
3288 "  Inhibits character-set translation for text files for the duration of",
3289 "  the SEND command without affecting subsequent commands.",
3290 " ",
3291 "/NOBACKUPFILES",
3292 "  Skip (don't send) Kermit or EMACS backup files (files with names that",
3293 "  end with .~n~, where n is a number).",
3294 " ",
3295 #ifdef UNIXOROSK
3296 "/DOTFILES",
3297 "  Include (send) files whose names begin with \".\".",
3298 " ",
3299 "/NODOTFILES",
3300 "  Don't send files whose names begin with \".\".",
3301 " ",
3302 "/FOLLOWLINKS",
3303 "  Send files that are pointed to by symbolic links.",
3304 " ",
3305 "/NOFOLLOWLINKS",
3306 "  Skip over symbolic links (default).",
3307 " ",
3308 #endif /* UNIXOROSK */
3309 
3310 #ifdef VMS
3311 "/IMAGE",
3312 "  Performs this transfer in image mode without affecting the global",
3313 "  transfer mode.",
3314 " ",
3315 #endif /* VMS */
3316 #ifdef CK_LABELED
3317 "/LABELED",
3318 "  Performs this transfer in labeled mode without affecting the global",
3319 "  transfer mode.",
3320 " ",
3321 #endif /* CK_LABELED */
3322 "/COMMAND",
3323 "  Sends the output from a command, rather than the contents of a file.",
3324 "  The first \"filename\" on the SEND command line is interpreted as the name",
3325 "  of a command; the second (if any) is the as-name.",
3326 " ",
3327 "/FILENAMES:{CONVERTED,LITERAL}",
3328 "  Overrides the global SET FILE NAMES setting for this transfer only.",
3329 " ",
3330 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE}",
3331 "  Overrides the global SET SEND PATHNAMES setting for this transfer.",
3332 " ",
3333 "/FILTER:command",
3334 "  Specifies a command \
3335 (standard input/output filter) to pass the file through",
3336 "  before sending it.",
3337 " ",
3338 "/DELETE",
3339 "  Deletes the file (or each file in the group) after it has been sent",
3340 "  successfully (applies only to real files).",
3341 " ",
3342 "/QUIET",
3343 "  When sending in local mode, this suppresses the file-transfer display.",
3344 " ",
3345 "/RECOVER",
3346 "  Used to recover from a previously interrupted transfer; SEND /RECOVER",
3347 "  is equivalent RESEND (use in binary mode only).",
3348 " ",
3349 "/RECURSIVE",
3350 "  Tells C-Kermit to look not only in the given or current directory for",
3351 "  files that match the filespec, but also in all its subdirectories, and",
3352 "  all their subdirectories, etc.",
3353 " ",
3354 "/RENAME-TO:name",
3355 "  Tells C-Kermit to rename each source file that is sent successfully to",
3356 "  the given name (usually you should include \\v(filename) in the new name,",
3357 "  which is replaced by the original filename.",
3358 " ",
3359 "/MOVE-TO:directory",
3360 "  Tells C-Kermit to move each source file that is sent successfully to",
3361 "  the given directory.",
3362 " ",
3363 "/STARTING:number",
3364 "  Starts sending the file from the given byte position.",
3365 "  SEND /STARTING:n filename is equivalent to PSEND filename n.",
3366 " ",
3367 "/SUBJECT:text",
3368 "  Specifies the subject of an email message, to be used with /MAIL.  If the",
3369 "  text contains spaces, it must be enclosed in braces.",
3370 " ",
3371 "/MAIL:address",
3372 "  Sends the file as e-mail to the given address; use with /SUBJECT:.",
3373 " ",
3374 "/PRINT:options",
3375 "  Sends the file to be printed, with optional options for the printer.",
3376 " ",
3377 #ifdef CK_XYZ
3378 "/PROTOCOL:name",
3379 "  Uses the given protocol to send the file (Kermit, Zmodem, etc) for this",
3380 "  transfer without changing global protocol.",
3381 " ",
3382 #endif /* CK_XYZ */
3383 "/AFTER:date-time",
3384 #ifdef VMS
3385 "  Specifies that only those files created after the given date-time are",
3386 #else
3387 "  Specifies that only those files modified after the given date-time are",
3388 #endif /* VMS */
3389 "  to be sent.  HELP DATE for info about date-time formats.",
3390 " ",
3391 "/BEFORE:date-time",
3392 #ifdef VMS
3393 "  Specifies that only those files modified before the given date-time",
3394 #else
3395 "  Specifies that only those files modified before the given date-time",
3396 #endif /* VMS */
3397 "  are to be sent.",
3398 " ",
3399 "/NOT-AFTER:date-time",
3400 #ifdef VMS
3401 "  Specifies that only those files modified at or before the given date-time",
3402 #else
3403 "  Specifies that only those files modified at or before the given date-time",
3404 #endif /* VMS */
3405 "  are to be sent.",
3406 " ",
3407 "/NOT-BEFORE:date-time",
3408 #ifdef VMS
3409 "  Specifies that only those files modified at or after the given date-time",
3410 #else
3411 "  Specifies that only those files modified at or after the given date-time",
3412 #endif /* VMS */
3413 "  are to be sent.",
3414 " ",
3415 "/LARGER-THAN:number",
3416 "  Specifies that only those files longer than the given number of bytes are",
3417 "  to be sent.",
3418 " ",
3419 "/SMALLER-THAN:number",
3420 "  Specifies that only those files smaller than the given number of bytes are",
3421 "  to be sent.",
3422 " ",
3423 "/EXCEPT:pattern",
3424 "  Specifies that any files whose names match the pattern, which can be a",
3425 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
3426 "  are not to be sent.  To specify multiple patterns (up to 8), use outer",
3427 "  braces around the group, and inner braces around each pattern:",
3428 " ",
3429 "    /EXCEPT:{{pattern1}{pattern2}...}",
3430 " ",
3431 "/TYPE:{ALL,TEXT,BINARY}",
3432 "  Send only files of the given type (see SET FILE SCAN).",
3433 " ",
3434 "/LISTFILE:filename",
3435 "  Specifies the name of a file that contains the list of names of files",
3436 "  that are to be sent.  The filenames should be listed one name per line",
3437 "  in this file (but a name can contain wildcards).",
3438 " ",
3439 "Also see HELP RECEIVE, HELP GET, HELP SERVER, HELP REMOTE.",
3440 ""};
3441 
3442 static char *hmxxrc[] = {
3443 "Syntax: RECEIVE (or R) [ switches... ] [ as-name ]",
3444 "  Wait for a file to arrive from the other Kermit, which must be given a",
3445 "  SEND command.  If the optional as-name is given, the incoming file or",
3446 "  files are stored under that name, otherwise it will be stored under",
3447 #ifndef CK_TMPDIR
3448 "  the name it arrives with.",
3449 #else
3450 #ifdef OS2
3451 "  the name it arrives with.  If the filespec denotes a disk and/or",
3452 "  directory, the incoming file or files will be stored there.",
3453 #else
3454 "  the name it arrives with.  If the filespec denotes a directory, the",
3455 "  incoming file or files will be placed in that directory.",
3456 #endif /* OS2 */
3457 #endif /* CK_TMPDIR */
3458 " ",
3459 "Optional switches include:",
3460 " ",
3461 "/AS-NAME:text",
3462 "  Specifies \"text\" as the name to store the incoming file under.",
3463 "  You can also specify the as-name as a filename on the command line.",
3464 " ",
3465 "/BINARY",
3466 "  Skips text-mode conversions unless the incoming file arrives with binary",
3467 "  attribute",
3468 " ",
3469 "/COMMAND",
3470 "  Receives the file into the standard input of a command, rather than saving",
3471 "  it on disk.  The /AS-NAME or the \"filename\" on the RECEIVE command line",
3472 "  is interpreted as the name of a command.",
3473 " ",
3474 "/EXCEPT:pattern",
3475 "  Specifies that any files whose names match the pattern, which can be a",
3476 "  regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
3477 "  are to be refused.  To specify multiple patterns (up to 8), use outer",
3478 "  braces around the group, and inner braces around each pattern:",
3479 " ",
3480 "    /EXCEPT:{{pattern1}{pattern2}...}",
3481 " ",
3482 "/FILENAMES:{CONVERTED,LITERAL}",
3483 "  Overrides the global SET FILE NAMES setting for this transfer only.",
3484 " ",
3485 "/FILTER:command",
3486 "  Causes the incoming file to passed through the given command (standard",
3487 "  input/output filter) before being written to disk.",
3488 " ",
3489 #ifdef VMS
3490 "/IMAGE",
3491 "  Receives the file in image mode.",
3492 " ",
3493 #endif /* VMS */
3494 #ifdef CK_LABELED
3495 "/LABELED",
3496 "  Specifies labeled transfer mode.",
3497 " ",
3498 #endif /* CK_LABELED */
3499 
3500 "/MOVE-TO:directory-name",
3501 "  Specifies that each file that arrives should be moved to the specified",
3502 "  directory after, and only if, it has been received successfully.",
3503 " ",
3504 "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
3505 "  Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
3506 " ",
3507 "/PIPES:{ON,OFF}",
3508 "  Overrides the TRANSFER PIPES setting for this command only.  ON allows",
3509 "  reception of files with names like \"!tar xf -\" to be automatically",
3510 "  directed to a pipeline.",
3511 " ",
3512 "/PROTOCOL:name",
3513 "  Use the given protocol to receive the incoming file(s).",
3514 " ",
3515 "/QUIET",
3516 "  When sending in local mode, this suppresses the file-transfer display.",
3517 " ",
3518 "/RECURSIVE",
3519 "  Equivalent to /PATHNAMES:RELATIVE.",
3520 " ",
3521 "/RENAME-TO:string",
3522 "  Specifies that each file that arrives should be renamed as specified",
3523 "  after, and only if, it has been received successfully.  The string should",
3524 "  normally contain variables like \\v(filename) or \\v(filenum).",
3525 " ",
3526 "/TEXT",
3527 "  Forces text-mode conversions unless the incoming file has the binary",
3528 "  attribute",
3529 " ",
3530 "/TRANSPARENT",
3531 "  Inhibits character-set translation of incoming text files for the duration",
3532 "  of the RECEIVE command without affecting subsequent commands.",
3533 " ",
3534 "Also see HELP SEND, HELP GET, HELP SERVER, HELP REMOTE.",
3535 "" };
3536 
3537 #ifndef NORESEND
3538 static char *hmxxrsen = "\
3539 Syntax: RESEND filespec [name]\n\n\
3540   Resends the file or files, whose previous transfer was interrupted.\n\
3541   Picks up from where previous transfer left off, IF the receiver kept the\n\
3542   partially received file.  Works only for binary-mode transfers.\n\
3543   Requires file-transfer partner to support recovery.  Synonym: REPUT.";
3544 
3545 static char *hmxxrget = "\
3546 Syntax: REGET filespec\n\n\
3547   Ask a server to RESEND a file to C-Kermit.";
3548 
3549 static char *hmxxpsen = "\
3550 Syntax: PSEND filespec position [name]\n\n\
3551   Just like SEND, except sends the file starting at the given byte position.";
3552 #endif /* NORESEND */
3553 
3554 #ifndef NOMSEND
3555 static char *hmxxmse[] = {
3556 "Syntax: MSEND [ switches... ] filespec [ filespec [ ... ] ]",
3557 "  Sends the files specified by the filespecs.  One or more filespecs may be",
3558 "  listed, separated by spaces.  Any or all filespecs may contain wildcards",
3559 "  and they may be in different directories.  Alternative names cannot be",
3560 "  given.  Switches include /BINARY /DELETE /MAIL /PROTOCOL /QUIET /RECOVER",
3561 "  /TEXT /TYPE; see HELP SEND for descriptions.",
3562 ""
3563 };
3564 #endif /* NOMSEND */
3565 
3566 static char *hmxxadd[] = {
3567 #ifndef NOMSEND
3568 "ADD SEND-LIST filespec [ <mode> [ <as-name> ] ]",
3569 "  Adds the specified file or files to the current SEND list.  Use SHOW",
3570 "  SEND-LIST and CLEAR SEND-LIST to display and clear the list; use SEND",
3571 "  by itself to send the files from it.",
3572 " ",
3573 #endif /* NOMSEND */
3574 #ifdef PATTERNS
3575 "ADD BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3576 "  Adds the pattern(s), if any, to the SET FILE BINARY-PATTERNS list.",
3577 " ",
3578 "ADD TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3579 "  Adds the pattern(s), if any, to the SET FILE TEXT-PATTERNS list.",
3580 "  Use SHOW PATTERNS to see the lists.  See HELP SET FILE for further info.",
3581 #endif /* PATTERNS */
3582 ""};
3583 
3584 static char *hmxxremv[] = {
3585 #ifdef PATTERNS
3586 "REMOVE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3587 "  Removes the pattern(s), if any, from the SET FILE BINARY-PATTERNS list",
3588 " ",
3589 "REMOVE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
3590 "  Removes the given patterns from the SET FILE TEXT-PATTERNS list.",
3591 "  Use SHOW PATTERNS to see the lists.  See HELP SET FILE for further info.",
3592 #endif /* PATTERNS */
3593 ""};
3594 #endif /* NOXFER */
3595 
3596 #ifndef NOSERVER
3597 static char *hmxxser = "Syntax: SERVER\n\
3598   Enter server mode on the current connection.  All further commands\n\
3599   are taken in packet form from the other Kermit program.  Use FINISH,\n\
3600   BYE, or REMOTE EXIT to get C-Kermit out of server mode.";
3601 #endif /* NOSERVER */
3602 
3603 static char *hmhset[] = {
3604 "  The SET command establishes communication, file, scripting, or other",
3605 "  parameters.  The SHOW command can be used to display the values of",
3606 "  SET parameters.  Help is available for each individual parameter;",
3607 "  type HELP SET ? to see what's available.",
3608 "" };
3609 
3610 #ifndef NOSETKEY
3611 static char *hmhskey[] = {
3612 "Syntax: SET KEY k text",
3613 "Or:     SET KEY CLEAR",
3614 "  Configure the key whose \"scan code\" is k to send the given text when",
3615 "  pressed during CONNECT mode.  SET KEY CLEAR restores all the default",
3616 "  key mappings.  If there is no text, the default key binding is restored",
3617 #ifndef NOCSETS
3618 "  for the key k.  SET KEY mappings take place before terminal character-set",
3619 "  translation.",
3620 #else
3621 "  the key k.",
3622 #endif /* NOCSETS */
3623 #ifdef OS2
3624 " ",
3625 "  The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
3626 "  keypad, function, or editing keys, etc.  For a list of available keyboard",
3627 "  verbs, type SHOW KVERBS.",
3628 #endif /* OS2 */
3629 " ",
3630 "  To find out the scan code and mapping for a particular key, use the",
3631 "  SHOW KEY command.",
3632 ""};
3633 #endif /* NOSETKEY */
3634 
3635 static char *hmxychkt[] = { "Syntax: SET BLOCK-CHECK number",
3636 " ",
3637 "Type of block check to be used for error detection on file-transfer",
3638 "packets: 1, 2, 3, 4, or 5.  This command must be given to the file",
3639 "sender prior to the transfer.",
3640 " ",
3641 "Type 1 is standard and supported by all Kermit protocol implementations,",
3642 "  but it's only a 6-bit checksum, represented in a single printable ASCII",
3643 "  character.  It's fine for reliable connections (error-correcting modems,",
3644 "  TCP/IP, etc) but type 3 is recommended for connections where errors can",
3645 "  occur.",
3646 " ",
3647 "Type 2 is a 12-bit checksum represented in two printable characters.",
3648 " ",
3649 "Type 3 is a 16-bit cyclic redundancy check, the strongest error",
3650 "  detection method supported by Kermit protocol, represented in three",
3651 "  printable characters.",
3652 " ",
3653 "Type 4 (alias \"BLANK-FREE-2\") is a 12-bit checksum guaranteed to",
3654 "  contain no blanks in its representation; this is needed for connections",
3655 "  where trailing blanks are stripped from incoming lines of text.",
3656 " ",
3657 "Type 5 (alias \"FORCE-3\") means to force a Type 3 block check on",
3658 "  every packet, including the first packet, which normally has a type 1",
3659 "  block check.  This is for use in critical applications on noisy",
3660 "  connections.  As with types 2, 3, and 4, if the Kermit file",
3661 "  transfer partner does not support this type, the transfer fails",
3662 "  immediately at the beginning of the transfer.",
3663 "" };
3664 
3665 static char * hmxydeb[] = {
3666 "Syntax: SET DEBUG { SESSION, ON, OFF, TIMESTAMP, MESSAGES }",
3667 " ",
3668 "SET DEBUG ON",
3669 #ifdef DEBUG
3670 "  Opens a debug log file named debug.log in the current directory.",
3671 "  Use LOG DEBUG if you want specify a different log file name or path.",
3672 #else
3673 "  (Has no effect in this version of Kermit.)",
3674 #endif /* DEBUG */
3675 " ",
3676 "SET DEBUG OFF",
3677 "  Stops debug logging and session debugging.",
3678 " ",
3679 "SET DEBUG SESSION",
3680 #ifndef NOLOCAL
3681 "  Displays control and 8-bit characters symbolically during CONNECT mode.",
3682 "  Equivalent to SET TERMINAL DEBUG ON.",
3683 #else
3684 "  (Has no effect in this version of Kermit.)",
3685 #endif /* NOLOCAL */
3686 " ",
3687 "SET DEBUG TIMESTAMP { ON, OFF }",
3688 "  Enables/Disables timestamps on debug log entries.",
3689 " ",
3690 "SET DEBUG MESSAGES { ON, OFF, STDERR } [C-Kermit 9.0]",
3691 "  Enables/Disables messages printed by the DEBUG command.",
3692 "  SET DEBUG OFF causes DEBUG messages not to be printed.",
3693 "  SET DEBUG ON sends DEBUG messages to standard output (stdout);",
3694 "  SET DEBUG STDERR sends DEBUG messages to standard error (stderr);",
3695 "" };
3696 
3697 #ifdef CK_SPEED
3698 static char *hmxyqctl[] = {
3699 "Syntax: SET CONTROL-CHARACTER { PREFIXED, UNPREFIXED } { <code>..., ALL }",
3700 " ",
3701 "  <code> is the numeric ASCII code for a control character 1-31,127-159,255."
3702 ,
3703 "  The word \"ALL\" means all characters in this range.",
3704 " ",
3705 "  PREFIXED <code> means the given control character must be converted to a",
3706 "  printable character and prefixed, the default for all control characters.",
3707 " ",
3708 "  UNPREFIXED <code> means you think it is safe to send the given control",
3709 "  character as-is, without a prefix.  USE THIS OPTION AT YOUR OWN RISK!",
3710 " ",
3711 "  SHOW CONTROL to see current settings.  SET CONTROL PREFIXED ALL is",
3712 "  recommended for safety.  You can include multiple <code> values in one",
3713 "  command, separated by spaces.",
3714 "" };
3715 #endif /* CK_SPEED */
3716 
3717 #ifndef NODIAL
3718 static char *hxymodm[] = {
3719 "Syntax: SET MODEM <parameter> <value> ...",
3720 " ",
3721 "Note: Many of the SET MODEM parameters are configured automatically when",
3722 "you SET MODEM TYPE, according to the modem's capabilities.  SHOW MODEM to",
3723 "see them.  Also see HELP DIAL and HELP SET DIAL.",
3724 " ",
3725 "SET MODEM TYPE <name>",
3726 
3727 " Tells Kermit which kind of modem you have, so it can issue the",
3728 " appropriate modem-specific commands for configuration, dialing, and",
3729 " hanging up.  For a list of the modem types known to Kermit, type \"set",
3730 " modem type ?\".  The default modem type is GENERIC, which should work",
3731 " with any AT command-set modem that is configured for error correction,",
3732 " data compression, and hardware flow control.  Use SET MODEM TYPE NONE",
3733 " for direct serial, connections.  Use SET MODEM TYPE USER-DEFINED to use",
3734 " a type of modem that is not built in to Kermit, and then use SET MODEM",
3735 " CAPABILITIES, SET MODEM, DIAL-COMMAND, and SET MODEM COMMAND to tell",
3736 " Kermit how to configure and control it.",
3737 
3738 " ",
3739 
3740 "SET MODEM CAPABILITIES <list>",
3741 "  Use this command for changing Kermit's idea of your modem's capabilities,",
3742 "  for example, if your modem is supposed to have built-in error correction",
3743 "  but in fact does not.  Also use this command to define the capabilities",
3744 "  of a USER-DEFINED modem.  Capabilities are:",
3745 " ",
3746 "    AT      AT-commands",
3747 "    DC      data-compression",
3748 "    EC      error-correction",
3749 "    HWFC    hardware-flow",
3750 "    ITU     v25bis-commands",
3751 "    SWFC    software-flow",
3752 "    KS      kermit-spoof",
3753 "    SB      speed-buffering",
3754 "    TB      Telebit",
3755 " ",
3756 "SET MODEM CARRIER-WATCH { AUTO, ON, OFF }",
3757 "  Synonym for SET CARRIER-WATCH (q.v.)",
3758 " ",
3759 "SET MODEM COMPRESSION { ON, OFF }",
3760 "  Enables/disables the modem's data compression feature, if any.",
3761 " ",
3762 "SET MODEM DIAL-COMMAND <text>",
3763 "  The text replaces Kermit's built-in modem dialing command.  It must",
3764 "  include '%s' (percent s) as a place-holder for the telephone numbers",
3765 "  given in your DIAL commands.",
3766 " ",
3767 "SET MODEM ERROR-CORRECTION { ON, OFF }",
3768 "  Enables/disables the modem's error-correction feature, if any.",
3769 " ",
3770 "SET MODEM ESCAPE-CHARACTER number",
3771 "  Numeric ASCII value of modem's escape character, e.g. 43 for '+'.",
3772 "  For Hayes-compatible modems, Kermit uses three copies, e.g. \"+++\".",
3773 " ",
3774 "SET MODEM FLOW-CONTROL {AUTO, NONE, RTS/CTS, XON/XOFF}",
3775 "  Selects the type of local flow control to be used by the modem.",
3776 " ",
3777 "SET MODEM HANGUP-METHOD { MODEM-COMMAND, RS232-SIGNAL, DTR }",
3778 "  How hangup operations should be done.  MODEM-COMMAND means try to",
3779 "  escape back to the modem's command processor and give a modem-specific",
3780 "  hangup command.  RS232-SIGNAL means turn off the DTR signal.  DTR is a",
3781 "  synonym for RS232-SIGNAL.",
3782 " ",
3783 "SET MODEM KERMIT-SPOOF {ON, OFF}",
3784 "  If the selected modem type supports the Kermit protocol directly,",
3785 "  use this command to turn its Kermit protocol function on or off.",
3786 " ",
3787 "SET MODEM MAXIMUM-SPEED <number>",
3788 "  Specify the maximum interface speed for the modem.",
3789 " ",
3790 "SET MODEM NAME <text>",
3791 "  Descriptive name for a USER-DEFINED modem.",
3792 " ",
3793 "SET MODEM SPEAKER {ON, OFF}",
3794 "  Turns the modem's speaker on or off during dialing.",
3795 " ",
3796 "SET MODEM SPEED-MATCHING {ON, OFF}",
3797 "  ON means that C-Kermit changes its serial interface speed to agree with",
3798 "  the speed reported by the modem's CONNECT message, if any.  OFF means",
3799 "  Kermit should not change its interface speed.",
3800 " ",
3801 "SET MODEM VOLUME {LOW, MEDIUM, HIGH}",
3802 "  Selects the desired modem speaker volume for when the speaker is ON.",
3803 " ",
3804 "SET MODEM COMMAND commands are used to override built-in modem commands for",
3805 "each modem type, or to fill in commands for the USER-DEFINED modem type.",
3806 "Omitting the optional [ text ] restores the built-in modem-specific command,",
3807 "if any:",
3808 " ",
3809 "SET MODEM COMMAND AUTOANSWER {ON, OFF} [ text ]",
3810 "  Modem commands to turn autoanswer on and off.",
3811 " ",
3812 "SET MODEM COMMAND COMPRESSION {ON, OFF} [ text ]",
3813 "  Modem commands to turn data compression on and off.",
3814 " ",
3815 "SET MODEM COMMAND ERROR-CORRECTION {ON, OFF} [ text ]",
3816 "  Modem commands to turn error correction on and off.",
3817 " ",
3818 "SET MODEM COMMAND HANGUP [ text ]",
3819 "  Command that tells the modem to hang up the connection.",
3820 " ",
3821 "SET MODEM COMMAND IGNORE-DIALTONE [ text ]",
3822 "  Command that tells the modem not to wait for dialtone before dialing.",
3823 " ",
3824 "SET MODEM COMMAND INIT-STRING [ text ]",
3825 "  The 'text' is a replacement for C-Kermit's built-in initialization command",
3826 "  for the modem.",
3827 " ",
3828 "SET MODEM COMMAND PREDIAL-INIT [ text ]",
3829 "  A second INIT-STRING that is to be sent to the modem just prior to \
3830 dialing.",
3831 " ",
3832 "SET MODEM COMMAND HARDWARE-FLOW [ text ]",
3833 "  Modem command to enable hardware flow control (RTS/CTS) in the modem.",
3834 " ",
3835 "SET MODEM COMMAND SOFTWARE-FLOW [ text ]",
3836 "  Modem command to enable local software flow control (Xon/Xoff) in modem.",
3837 " ",
3838 "SET MODEM COMMAND SPEAKER { ON, OFF } [ text ]",
3839 "  Modem command to turn the modem's speaker on or off.",
3840 " ",
3841 "SET MODEM COMMAND NO-FLOW-CONTROL [ text ]",
3842 "  Modem command to disable local flow control in the modem.",
3843 " ",
3844 "SET MODEM COMMAND PULSE [ text ]",
3845 "  Modem command to select pulse dialing.",
3846 " ",
3847 "SET MODEM COMMAND TONE [ text ]",
3848 "  Modem command to select tone dialing.",
3849 " ",
3850 "SET MODEM COMMAND VOLUME { LOW, MEDIUM, HIGH } [ text ]",
3851 "  Modem command to set the modem's speaker volume.",
3852 ""};
3853 
3854 static char *hmxydial[] = {
3855 "The SET DIAL command establishes or changes all parameters related to",
3856 "dialing the telephone.  Also see HELP DIAL and HELP SET MODEM.  Use SHOW",
3857 "DIAL to display all of the SET DIAL values.",
3858 " ",
3859 "SET DIAL COUNTRY-CODE <number>",
3860 "  Tells Kermit the telephonic country-code of the country you are dialing",
3861 "  from, so it can tell whether a portable-format phone number from your",
3862 "  dialing directory will result in a national or an international call.",
3863 "  Examples: 1 for USA, Canada, Puerto Rico, etc; 7 for Russia, 39 for Italy,",
3864 "  351 for Portugal, 47 for Norway, 44 for the UK, 972 for Israel, 81 for",
3865 "  Japan, ...",
3866 " ",
3867 "  If you have not already set your DIAL INTL-PREFIX and LD-PREFIX, then this",
3868 "  command sets default values for them: 011 and 1, respectively, for country",
3869 "  code 1; 00 and 0, respectively, for all other country codes.  If these are",
3870 "  not your true international and long-distance dialing prefixes, then you",
3871 "  should follow this command by DIAL INTL-PREFIX and LD-PREFIX to let Kermit",
3872 "  know what they really are.",
3873 " ",
3874 "SET DIAL AREA-CODE [ <number> ]",
3875 "  Tells Kermit the area or city code that you are dialing from, so it can",
3876 "  tell whether a portable-format phone number from the dialing directory is",
3877 "  local or long distance.  Be careful not to include your long-distance",
3878 "  dialing prefix as part of your area code; for example, the area code for",
3879 "  central London is 171, not 0171.",
3880 " ",
3881 "SET DIAL CONFIRMATION {ON, OFF}",
3882 "  Kermit does various transformations on a telephone number retrieved from",
3883 "  the dialing directory prior to dialing (use LOOKUP <name> to see them).",
3884 "  In case the result might be wrong, you can use SET DIAL CONFIRM ON to have",
3885 "  Kermit ask you if it is OK to dial the number, and if not, to let you type",
3886 "  in a replacement.",
3887 " ",
3888 "SET DIAL CONNECT { AUTO, ON, OFF }",
3889 "  Whether to CONNECT (enter terminal mode) automatically after successfully",
3890 "  dialing.  ON means to do this; OFF means not to.  AUTO (the default) means",
3891 "  do it if the DIAL command was given interactively, but don't do it if the",
3892 "  DIAL command was issued from a macro or command file.  If you specify ON",
3893 "  or AUTO, you may follow this by one of the keywords VERBOSE or QUIET, to",
3894 "  indicate whether the verbose 4-line 'Connecting...' message is to be",
3895 "  displayed if DIAL succeeds and Kermit goes into CONNECT mode.",
3896 " ",
3897 "SET DIAL CONVERT-DIRECTORY {ASK, ON, OFF}",
3898 "  The format of Kermit's dialing directory changed in version 5A(192).  This",
3899 "  command tells Kermit what to do when it encounters an old-style directory:",
3900 "  ASK you whether to convert it, or convert it automatically (ON), or leave",
3901 "  it alone (OFF).  Old-style directories can still be used without",
3902 "  conversion, but the parity and speed fields are ignored.",
3903 " ",
3904 "SET DIAL DIRECTORY [ filename [ filename [ filename [ ... ] ] ] ]",
3905 "  The name(s) of your dialing directory file(s).  If you do not supply any",
3906 "  filenames, the  dialing directory feature is disabled and all numbers are",
3907 "  dialed literally as given in the DIAL command.  If you supply more than",
3908 "  one directory, all of them are searched.",
3909 " ",
3910 "SET DIAL SORT {ON, OFF}",
3911 "  When multiple entries are obtained from your dialing directory, they are",
3912 "  sorted in \"cheapest-first\" order.  If this does not produce the desired",
3913 "  effect, SET DIAL SORT OFF to disable sorting, and the numbers will be",
3914 "  dialed in the order in which they were found.",
3915 " ",
3916 "SET DIAL DISPLAY {ON, OFF}",
3917 "  Whether to display dialing progress on the screen; default is OFF.",
3918 " ",
3919 "SET DIAL HANGUP {ON, OFF}",
3920 "  Whether to hang up the phone prior to dialing; default is ON.",
3921 " ",
3922 "SET DIAL IGNORE-DIALTONE {ON, OFF}",
3923 "  Whether to ignore dialtone when dialing; default is OFF.",
3924 " ",
3925 #ifndef NOSPL
3926 "SET DIAL MACRO [ name ]",
3927 "  Specify the name of a macro to execute on every phone number dialed, just",
3928 "  prior to dialing it, in order to perform any last-minute alterations.",
3929 " ",
3930 #endif /* NOSPL */
3931 "SET DIAL METHOD {AUTO, DEFAULT, TONE, PULSE}",
3932 "  Whether to use the modem's DEFAULT dialing method, or to force TONE or",
3933 "  PULSE dialing.  AUTO (the default) means to choose tone or pulse dialing",
3934 "  based on the country code.  (Also see SET DIAL TONE-COUNTRIES and SET DIAL",
3935 "  PULSE-COUNTRIES.)",
3936 " ",
3937 "SET DIAL PACING number",
3938 "  How many milliseconds to pause between sending each character to the modem",
3939 "  dialer.  The default is -1, meaning to use the number from the built-in",
3940 " modem database.",
3941 "  ",
3942 "SET DIAL PULSE-COUNTRIES [ cc [ cc [ ... ] ] ]",
3943 "  Sets the list of countries in which pulse dialing is required.  Each cc",
3944 "  is a country code.",
3945 " ",
3946 "SET DIAL TEST { ON, OFF }",
3947 "  OFF for normal dialing.  Set to ON to test dialing procedures without",
3948 "  actually dialing.",
3949 " ",
3950 "SET DIAL TONE-COUNTRIES [ cc [ cc [ ... ] ] ]",
3951 "  Sets the list of countries in which tone dialing is available.  Each cc",
3952 "  is a country code.",
3953 " ",
3954 "SET DIAL TIMEOUT number",
3955 "  How many seconds to wait for a dialed call to complete.  Use this command",
3956 "  to override the DIAL command's automatic timeout calculation.  A value",
3957 "  of 0 turns off this feature and returns to Kermit's automatic dial",
3958 "  timeout calculation.",
3959 " ",
3960 "SET DIAL RESTRICT { INTERNATIONAL, LOCAL, LONG-DISTANCE, NONE }",
3961 "  Prevents placing calls of the type indicated, or greater.  For example",
3962 "  SET DIAL RESTRICT LONG prevents placing of long-distance and international",
3963 "  calls.  If this command is not given, there are no restrictions.  Useful",
3964 "  when dialing a list of numbers fetched from a dialing directory.",
3965 " ",
3966 "SET DIAL RETRIES <number>",
3967 "  How many times to redial each number if the dialing result is busy or no",
3968 "  no answer, until the call is successfully answered.  The default is 0",
3969 "  because automatic redialing is illegal in some countries.",
3970 " ",
3971 "SET DIAL INTERVAL <number>",
3972 "  How many seconds to pause between automatic redial attempts; default 10.",
3973 " ",
3974 "The following commands apply to all phone numbers, whether given literally",
3975 "or found in the dialing directory:",
3976 " ",
3977 "SET DIAL PREFIX [ text ]",
3978 "  Establish a prefix to be applied to all phone numbers that are dialed,",
3979 "  for example to disable call waiting.",
3980 " ",
3981 "SET DIAL SUFFIX [ text ]",
3982 "  Establish a suffix to be added after all phone numbers that are dialed.",
3983 " ",
3984 "The following commands apply only to portable-format numbers obtained from",
3985 "the dialing directory; i.e. numbers that start with a \"+\" sign and",
3986 "country code, followed by area code in parentheses, followed by the phone",
3987 "number.",
3988 " ",
3989 "SET DIAL LC-AREA-CODES [ <list> ]",
3990 "  Species a list of area codes to which dialing is local, i.e. does not",
3991 "  require the LD-PREFIX.  Up to 32 area codes may be listed, separated by",
3992 "  spaces.  Any area codes in this list will be included in the final dial",
3993 "  string so do not include your own area code if it should not be dialed.",
3994 " ",
3995 "SET DIAL LC-PREFIX [ <text> ]",
3996 "  Specifies a prefix to be applied to local calls made from portable dialing",
3997 "  directory entries.  Normally no prefix is used for local calls.",
3998 " ",
3999 "SET DIAL LC-SUFFIX [ <text> ]",
4000 "  Specifies a suffix to be applied to local calls made from portable dialing",
4001 "  directory entries.  Normally no suffix is used for local calls.",
4002 " ",
4003 "SET DIAL LD-PREFIX [ <text> ]",
4004 "  Your long-distance dialing prefix, to be used with portable dialing",
4005 "  directory entries that result in long-distance calls.",
4006 " ",
4007 "SET DIAL LD-SUFFIX [ <text> ]",
4008 "  Long-distance dialing suffix, if any, to be used with portable dialing",
4009 "  directory entries that result in long-distance calls.  This would normally",
4010 "  be used for appending a calling-card number to the phone number.",
4011 " ",
4012 "SET DIAL FORCE-LONG-DISTANCE { ON, OFF }",
4013 "  Whether to force long-distance dialing for calls that normally would be",
4014 "  local.  For use (e.g.) in France.",
4015 " ",
4016 "SET DIAL TOLL-FREE-AREA-CODE [ <number> [ <number> [ ... ] ] ]",
4017 "  Tells Kermit the toll-free area code(s) in your country.",
4018 " ",
4019 "SET DIAL TOLL-FREE-PREFIX [ <text> ]",
4020 "  You toll-free dialing prefix, in case it is different from your long-",
4021 "  distance dialing prefix.",
4022 " ",
4023 "SET DIAL INTL-PREFIX <text>",
4024 "  Your international dialing prefix, to be used with portable dialing",
4025 "  directory entries that result in international calls.",
4026 " ",
4027 "SET DIAL INTL-SUFFIX <text>",
4028 "  International dialing suffix, if any, to be used with portable dialing",
4029 "  directory entries that result in international calls.",
4030 " ",
4031 "SET DIAL PBX-OUTSIDE-PREFIX <text>",
4032 "  Use this to tell Kermit how to get an outside line when dialing from a",
4033 "  Private Branch Exchange (PBX).",
4034 " ",
4035 "SET DIAL PBX-EXCHANGE <text> [ <text> [ ... ] ]",
4036 "  If PBX-OUTSIDE-PREFIX is set, then you can use this command to tell Kermit",
4037 "  the leading digits of one or more local phone numbers that identify it as",
4038 "  being on your PBX, so it can make an internal call by deleting those digits"
4039 ,
4040 "  from the phone number.",
4041 " ",
4042 "SET DIAL PBX-INTERNAL-PREFIX <text>",
4043 "  If PBX-EXCHANGE is set, and Kermit determines from it that a call is",
4044 "  internal, then this prefix, if any, is added to the number prior to",
4045 "  \
4046 dialing.  Use this if internal calls from your PBX require a special prefix.",
4047 "" };
4048 #endif /* NODIAL */
4049 
4050 static char *hmxyflo[] = { "Syntax: SET FLOW [ switch ] value",
4051 " ",
4052 #ifndef NOLOCAL
4053 "  Selects the type of flow control to use during file transfer, terminal",
4054 "  connection, and script execution.",
4055 #else
4056 "  Selects the type of flow control to use during file transfer.",
4057 #endif /* NOLOCAL */
4058 " ",
4059 "  Switches let you associate a particular kind of flow control with each",
4060 "  kind of connection: /REMOTE, /MODEM, /DIRECT-SERIAL, /TCPIP, etc; type",
4061 "  \"set flow ?\" for a list of available switches.  Then whenever you make",
4062 "  a connection, the associated flow-control is chosen automatically.",
4063 "  The flow-control values are NONE, KEEP, XON/XOFF, and possibly RTS/CTS",
4064 "  and some others; again, type \"set flow ?\" for a list.  KEEP tells Kermit",
4065 "  not to try to change the current flow-control method for the connection.",
4066 " ",
4067 "  If you omit the switch and simply supply a value, this value becomes the",
4068 "  current flow control type, overriding any default value that might have",
4069 "  been chosen in your most recent SET LINE, SET PORT, or SET HOST, or other",
4070 "  connection-establishment command.",
4071 " ",
4072 "  Type SHOW FLOW-CONTROL to see the current defaults for each connection type"
4073 ,
4074 "  as well as the current connection type and flow-control setting.  SHOW",
4075 "  COMMUNICATIONS also shows the current flow-control setting.",
4076 ""};
4077 
4078 static char *hmxyf[] = {
4079 "Syntax: SET FILE parameter value",
4080 " ",
4081 "Sets file-related parameters.  Use SHOW FILE to view them.  Also see SET",
4082 "(and SHOW) TRANSFER and PROTOCOL.",
4083 " ",
4084 #ifdef VMS
4085 "SET FILE TYPE { TEXT, BINARY, IMAGE, LABELED }",
4086 #else
4087 #ifdef STRATUS
4088 "SET FILE TYPE { TEXT, BINARY, LABELED }",
4089 #else
4090 #ifdef MAC
4091 "SET FILE TYPE { TEXT, BINARY, MACBINARY }",
4092 #else
4093 "SET FILE TYPE { TEXT, BINARY }",
4094 #endif /* STRATUS */
4095 #endif /* MAC */
4096 #endif /* VMS */
4097 "  How file contents are to be treated during file transfer in the absence",
4098 "  of any other indication.  TYPE can be TEXT for conversion of record format",
4099 "  and character set, which is usually needed when transferring text files",
4100 "  between unlike platforms (such as UNIX and Windows), or BINARY for no",
4101 "  conversion if TRANSFER MODE is MANUAL, which is not the default.  Use",
4102 "  BINARY with TRANSFER MODE MANUAL for executable programs or binary data or",
4103 "  whenever you wish to duplicate the original contents of the file, byte for"
4104 ,
4105 "  byte.  In most modern Kermit programs, the file sender informs the receiver"
4106 ,
4107 "  of the file type automatically.  However, when sending files from C-Kermit",
4108 "  to an ancient or non-Columbia Kermit implementation, you might need to set",
4109 "  the corresponding file type at the receiver as well.",
4110 " ",
4111 #ifdef VMS
4112 "  FILE TYPE settings of TEXT and BINARY have no effect when sending files,",
4113 "  since VMS C-Kermit determines each file's type automatically from its",
4114 "  record format: binary for fixed, text for others.  For incoming files,",
4115 "  these settings are effective only in the absence of a file-type indication",
4116 "  from the sender.",
4117 " ",
4118 "  You may include an optional record-format after the word BINARY.  This may",
4119 "  be FIXED (the default) or UNDEFINED.  UNDEFINED is used when you need to",
4120 "  receive binary files in binary mode and have them stored with UNDEFINED",
4121 "  record format, which is required by certain VMS applications.",
4122 " ",
4123 "  Two additional VMS file types are also supported: IMAGE and LABELED.",
4124 "  IMAGE means raw block i/o, no interference from RMS, applies to file",
4125 "  transmission only, and overrides the normal automatica file type",
4126 "  determination.   LABELED means to send or interpret RMS attributes",
4127 "  with the file.",
4128 " ",
4129 #else
4130 "  When TRANSFER MODE is AUTOMATIC (as it is by default), various automatic",
4131 "  methods (depending on the platform) are used to determine whether a file",
4132 "  is transferred in text or binary mode; these methods (which might include",
4133 "  content scan (see SET FILE SCAN below), filename pattern matching (SET FILE"
4134 ,
4135 "  PATTERNS), client/server \"kindred-spirit\" recognition, or source file",
4136 "  record format) supersede the FILE TYPE setting but can, themselves, be",
4137 "  superseded by including a /BINARY or /TEXT switch in the SEND, GET, or",
4138 "  RECEIVE command.",
4139 " ",
4140 "  When TRANSFER MODE is MANUAL, the automatic methods are skipped for sending"
4141 ,
4142 "  files; the FILE TYPE setting is used instead, which can be superseded on",
4143 "  a per-command basis with a /TEXT or /BINARY switch.",
4144 #endif /* VMS */
4145 " ",
4146 
4147 #ifndef NOXFER
4148 
4149 "SET FILE BYTESIZE { 7, 8 }",
4150 "  Normally 8.  If 7, Kermit truncates the 8th bit of all file bytes.",
4151 " ",
4152 #ifndef NOCSETS
4153 "SET FILE CHARACTER-SET name",
4154 "  Tells the encoding of the local file, ASCII by default.",
4155 "  The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646",
4156 "  national character sets.  LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1",
4157 "  for Western European languages.",
4158 "  NEXT is the 8-bit character set of the NeXT workstation.",
4159 "  The CPnnn sets are for PCs.  MACINTOSH-LATIN is for the Macintosh.",
4160 #ifndef NOLATIN2
4161 "  LATIN2 is ISO 8859-2 for Eastern European languages that are written with",
4162 "  Roman letters.  Mazovia is a PC code page used in Poland.",
4163 #endif /* NOLATIN2 */
4164 #ifdef CYRILLIC
4165 "  KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.",
4166 "  SHORT-KOI is a 7-bit ASCII coding for Cyrillic.  BULGARIA-PC is a PC code",
4167 "  page used in Bulgaria",
4168 #endif /* CYRILLIC */
4169 #ifdef HEBREW
4170 "  HEBREW-ISO is ISO 8859-8 Latin/Hebrew.  CP862 is the Hebrew PC code page.",
4171 "  HEBREW-7 is like ASCII with the lowercase letters replaced by Hebrew.",
4172 #endif /* HEBREW */
4173 #ifdef GREEK
4174 "  GREEK-ISO is ISO 8859-7 Latin/Greek.  CP869 is the Greek PC code page.",
4175 "  ELOT-927 is like ASCII with the lowercase letters replaced by Greek.",
4176 #endif /* GREEK */
4177 #ifdef KANJI
4178 "  JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI are Japanese",
4179 "  Kanji character sets.",
4180 #endif /* KANJI */
4181 #ifdef UNICODE
4182 "  UCS-2 is the 2-byte form of the Universal Character Set.",
4183 "  UTF-8 is the serialized form of the Universal Character Set.",
4184 #endif /* UNICODE */
4185 "  Type SET FILE CHAR ? for a complete list of file character sets.",
4186 " ",
4187 "SET FILE DEFAULT 7BIT-CHARACTER-SET",
4188 "  When automatically switching among different kinds of files while sending",
4189 "  this tells the character set to be used for 7-bit text files.",
4190 " ",
4191 "SET FILE DEFAULT 8BIT-CHARACTER-SET",
4192 "  This tells the character set to be used for 8-bit text files when",
4193 "  switching automatically among different kinds of files.",
4194 " ",
4195 #endif /* NOCSETS */
4196 
4197 "SET FILE COLLISION option",
4198 "  Tells what to do when a file arrives that has the same name as",
4199 "  an existing file.  The options are:",
4200 "   BACKUP (default) - Rename the old file to a new, unique name and store",
4201 "     the incoming file under the name it was sent with.",
4202 "   OVERWRITE - Overwrite (replace) the existing file; doesn't work for",
4203 "     a Kermit server unless you also tell it to ENABLE DELETE.",
4204 "   APPEND - Append the incoming file to the end of the existing file.",
4205 "   REJECT - Refuse and/or discard the incoming file (= DISCARD).",
4206 "   RENAME - Give the incoming file a unique name.",
4207 "   UPDATE - Accept the incoming file only if newer than the existing file.",
4208 " ",
4209 
4210 "SET FILE DESTINATION { DISK, PRINTER, SCREEN, NOWHERE }",
4211 "  DISK (default): Store incoming files on disk.",
4212 "  PRINTER:        Send incoming files to SET PRINTER device.",
4213 "  SCREEN:         Display incoming files on screen (local mode only).",
4214 "  NOWHERE:        Do not put incoming files anywhere (use for calibration).",
4215 " ",
4216 "SET FILE DISPLAY option",
4217 "  Selects the format of the file transfer display for local-mode file",
4218 "  transfer.  The choices are:",
4219 " ",
4220 "  BRIEF      A line per file, showing size, mode, status, and throughput.",
4221 "  SERIAL     One dot is printed for every K bytes transferred.",
4222 "  CRT        Numbers are continuously updated on a single screen line.",
4223 "             This format can be used on any video display terminal.",
4224 #ifdef CK_CURSES
4225 "  FULLSCREEN A fully formatted 24x80 screen showing lots of information.",
4226 "             This requires a terminal or terminal emulator.",
4227 #endif /* CK_CURSES */
4228 "  NONE       No file transfer display at all.",
4229 " ",
4230 
4231 "SET FILE DOWNLOAD-DIRECTORY [ <directory-name> ]",
4232 "  The directory into which all received files should be placed.  By default,",
4233 "  received files go into your current directory.",
4234 " ",
4235 #endif /* NOXFER */
4236 
4237 #ifdef CK_CTRLZ
4238 "SET FILE EOF { CTRL-Z, LENGTH }",
4239 "  End-Of-File detection method, normally LENGTH.  Applies only to text-mode",
4240 "  transfers.  When set to CTRL-Z, this makes the file sender treat the first",
4241 "  Ctrl-Z in the input file as the end of file (EOF), and it makes the file",
4242 "  receiver tack a Ctrl-Z onto the end of the output file if it does not",
4243 "  already end with Ctrl-Z.",
4244 " ",
4245 #endif /* CK_CTRLZ */
4246 
4247 "SET FILE END-OF-LINE { CR, CRLF, LF }",
4248 "  Use this command to specify nonstandard line terminators for text files.",
4249 " ",
4250 
4251 #ifndef NOXFER
4252 "SET FILE INCOMPLETE { AUTO, KEEP, DISCARD }",
4253 "  What to do with an incompletely received file: KEEP, DISCARD, or AUTO.",
4254 "  AUTO (the default) means DISCARD if transfer is in text mode, KEEP if it",
4255 "  is in binary mode.",
4256 " ",
4257 #ifdef VMS
4258 "SET FILE LABEL { ACL, BACKUP-DATE, NAME, OWNER, PATH } { ON, OFF }",
4259 "  Tells which items to include (ON) or exclude (OFF) in labeled file",
4260 "  transfers",
4261 " ",
4262 #else
4263 #ifdef OS2
4264 "SET FILE LABEL { ARCHIVE, READ-ONLY, HIDDEN, SYSTEM, EXTENDED } { ON, OFF }",
4265 "  Tells which items to include (ON) or exclude (OFF) in labeled file",
4266 "  transfers.",
4267 " ",
4268 #endif /* OS2 */
4269 #endif /* VMS */
4270 
4271 #ifdef UNIX
4272 #ifdef DYNAMIC
4273 "SET FILE LISTSIZE number",
4274 "  Changes the size of the internal wildcard expansion list.  Use SHOW FILE",
4275 "  to see the current size.  Use this command to increase the size if you get",
4276 "  a \"?Too many files\" error.  Also see SET FILE STRINGSPACE.",
4277 " ",
4278 #endif /* DYNAMIC */
4279 #endif /* UNIX */
4280 
4281 "SET FILE NAMES { CONVERTED, LITERAL }",
4282 "  File names are normally CONVERTED to \"common form\" during transmission",
4283 "  (e.g. lowercase to uppercase, extra periods changed to underscore, etc).",
4284 "  LITERAL means use filenames literally (useful between like systems).  Also",
4285 "  see SET SEND PATHNAMES and SET RECEIVE PATHNAMES.",
4286 " ",
4287 
4288 #ifdef UNIX
4289 "SET FILE OUTPUT { { BUFFERED, UNBUFFERED } [ size ], BLOCKING, NONBLOCKING }",
4290 "  Lets you control the disk output buffer for incoming files.  Buffered",
4291 "  blocking writes are normal.  Nonblocking writes might be faster on some",
4292 "  systems but might also be risky, depending on the underlying file service.",
4293 "  Unbuffered writes might be useful in critical applications to ensure that",
4294 "  cached disk writes are not lost in a crash, but will probably also be",
4295 "  slower.  The optional size parameter after BUFFERED or UNBUFFERED lets you",
4296 "  change the disk output buffer size; this might make a difference in",
4297 "  performance.",
4298 " ",
4299 #endif /* UNIX */
4300 
4301 #ifdef PATTERNS
4302 "SET FILE PATTERNS { ON, OFF, AUTO }",
4303 "  ON means to use filename pattern lists to determine whether to send a file",
4304 "  in text or binary mode.  OFF means to send all files in the prevailing",
4305 "  mode.  AUTO (the default) is like ON if the other Kermit accepts Attribute",
4306 "  packets and like OFF otherwise.  FILE PATTERNS are used only if FILE SCAN",
4307 "  is OFF (see SET FILE SCAN).",
4308 " ",
4309 "SET FILE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
4310 "  Zero or more filename patterns which, if matched, cause a file to be sent",
4311 "  in binary mode when FILE PATTERNS are ON.  HELP WILDCARDS for a description"
4312 ,
4313 "  of pattern syntax.  SHOW PATTERNS to see the current file pattern lists.",
4314 " ",
4315 "SET FILE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
4316 "  Zero or more filename patterns which, if matched, cause a file to be sent",
4317 "  in text mode when FILE PATTERNS is ON; if a file does not match a text or",
4318 "  binary pattern, the prevailing SET FILE TYPE is used.",
4319 " ",
4320 #endif /* PATTERNS */
4321 
4322 #ifdef VMS
4323 "SET FILE RECORD-LENGTH number",
4324 "  Sets the record length for received files of type BINARY.  Use this to",
4325 "  receive VMS BACKUP savesets or other fixed-format files that do not use",
4326 "  the default record length of 512.",
4327 " ",
4328 #endif /* VMS */
4329 
4330 "SET FILE SCAN { ON [ size ], OFF }",
4331 "  If TRANSFER MODE is AUTOMATIC and FILE SCAN is ON (as it is by default)",
4332 "  Kermit peeks at the file's contents to see if it's text or binary.  Use",
4333 "  SET FILE SCAN OFF to disable file peeking, while still keeping TRANSFER",
4334 "  MODE automatic to allow name patterns and other methods.  The optional",
4335 "  size is the number of file bytes to scan, 49152 by default.  -1 means to",
4336 "  scan the whole file.  Also see SET FILE PATTERNS.",
4337 " ",
4338 
4339 #ifdef UNIX
4340 #ifdef DYNAMIC
4341 "SET FILE STRINGSPACE number",
4342 "  Changes the size (in bytes) of the internal buffer that holds lists of",
4343 "  filenames such as wildcard expansion lists.  Use SHOW FILE to see the",
4344 "  current size.  Use this command to increase the size if you get a",
4345 "  \"?String space exhausted\" error.  Also see SET FILE LISTSIZE.",
4346 " ",
4347 #endif /* DYNAMIC */
4348 #endif /* UNIX */
4349 
4350 #ifdef UNICODE
4351 "SET FILE UCS BOM { ON, OFF }",
4352 "  Whether to write a Byte Order Mark when creating a UCS-2 file.",
4353 " ",
4354 "SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }",
4355 "  Byte order to use when creating UCS-2 files, and to use when reading UCS-2",
4356 "  files that do not start with a Byte Order Mark.",
4357 " ",
4358 #endif /* UNICODE */
4359 
4360 "SET FILE WARNING { ON, OFF }",
4361 "  SET FILE WARNING is superseded by the newer command, SET FILE",
4362 "  COLLISION.  SET FILE WARNING ON is equivalent to SET FILE COLLISION RENAME",
4363 "  and SET FILE WARNING OFF is equivalent to SET FILE COLLISION OVERWRITE.",
4364 #endif /* NOXFER */
4365 "" };
4366 
4367 static char *hmxyhsh[] = {
4368 "Syntax: SET HANDSHAKE { NONE, XON, LF, BELL, ESC, CODE number }",
4369 "  Character to use for half duplex line turnaround handshake during file",
4370 "  transfer.  C-Kermit waits for this character from the other computer",
4371 "  before sending its next packet.  Default is NONE; you can give one of the",
4372 "  other names like BELL or ESC, or use SET HANDSHAKE CODE to specify the",
4373 "  numeric code value of the handshake character.  Type SET HANDSH ? for a",
4374 "  complete list of possibilities.",
4375 "" };
4376 
4377 #ifndef NOSERVER
4378 static char *hsetsrv[] = {
4379 "SET SERVER CD-MESSAGE {ON,OFF}",
4380 "  Tells whether the server, after successfully executing a REMOTE CD",
4381 "  command, should send the contents of the new directory's READ.ME",
4382 "  (or similar) file to your screen.",
4383 " ",
4384 "SET SERVER CD-MESSAGE FILE name",
4385 "  Tells the name of the file to be displayed as a CD-MESSAGE, such as",
4386 "  READ.ME (SHOW SERVER tells the current CD-MESSAGE FILE name).",
4387 "  To specify more than one filename to look for, use {{name1}{name2}..}.",
4388 "  Synonym: SET CD MESSAGE FILE <list>.",
4389 " ",
4390 "SET SERVER DISPLAY {ON,OFF}",
4391 "  Tells whether local-mode C-Kermit during server operation should put a",
4392 "  file transfer display on the screen.  Default is OFF.",
4393 " ",
4394 "SET SERVER GET-PATH [ directory [ directory [ ... ] ] ]",
4395 "  Tells the C-Kermit server where to look for files whose names it receives",
4396 "  from client GET commands when the names are not fully specified pathnames.",
4397 "  Default is no GET-PATH, so C-Kermit looks only in its current directory.",
4398 " ",
4399 "SET SERVER IDLE-TIMEOUT seconds",
4400 "  Idle time limit while in server mode, 0 for no limit.",
4401 #ifndef OS2
4402 "  NOTE: SERVER IDLE-TIMEOUT and SERVER TIMEOUT are mutually exclusive.",
4403 #endif /* OS2 */
4404 " ",
4405 "SET SERVER KEEPALIVE {ON,OFF}",
4406 "  Tells whether C-Kermit should send \"keepalive\" packets while executing",
4407 "  REMOTE HOST commands, which is useful in case the command takes a long",
4408 "  time to produce any output and therefore might cause the operation to time",
4409 "  out.  ON by default; turn it OFF if it causes trouble with the client or",
4410 "  slows down the server too much.",
4411 " ",
4412 "SET SERVER LOGIN [ username [ password [ account ] ] ]",
4413 "  Sets up a username and optional password which must be supplied before",
4414 "  the server will respond to any commands other than REMOTE LOGIN.  The",
4415 "  account is ignored.  If you enter SET SERVER LOGIN by itself, then login",
4416 "  is no longer required.  Only one SET SERVER LOGIN command can be in effect",
4417 "  at a time; C-Kermit does not support multiple user/password pairs.",
4418 " ",
4419 "SET SERVER TIMEOUT n",
4420 "  Server command wait timeout interval, how often the C-Kermit server issues",
4421 "  a NAK while waiting for a command packet.  Specify 0 for no NAKs at all.",
4422 "  Default is 0.",
4423 ""
4424 };
4425 #endif /* NOSERVER */
4426 
4427 static char *hmhrmt[] = {
4428 #ifdef NEWFTP
4429 "The REMOTE command sends file management instructions or other commands",
4430 "to a Kermit or FTP server.  If you have a single connection, the command is",
4431 "directed to the server you are connected to; if you have multiple connections"
4432 ,
4433 "the command is directed according to your GET-PUT-REMOTE setting.",
4434 #else
4435 "The REMOTE command sends file management instructions or other commands",
4436 "to a Kermit server.  There should already be a Kermit running in server",
4437 "mode on the other end of the connection.",
4438 #endif /* NEWFTP */
4439 "Type REMOTE ? to see a list of available remote commands.  Type HELP REMOTE",
4440 "xxx to get further information about a particular remote command xxx.",
4441 " ",
4442 "All REMOTE commands except LOGIN and LOGOUT have R-command shortcuts;",
4443 "for example, RDIR for REMOTE DIR, RCD for REMOTE CD, etc.",
4444 " ",
4445 #ifdef NEWFTP
4446 #ifdef LOCUS
4447 "Also see: HELP SET LOCUS, HELP FTP, HELP SET GET-PUT-REMOTE.",
4448 #else
4449 "Also see: HELP FTP, HELP SET GET-PUT-REMOTE.",
4450 #endif /* LOCUS */
4451 #else
4452 #ifdef LOCUS
4453 "Also see: HELP SET LOCUS.",
4454 #endif /* LOCUS */
4455 #endif /* NEWFTP */
4456 "" };
4457 
4458 #ifndef NOSPL
4459 static char *ifhlp[] = { "Syntax: IF [NOT] condition commandlist",
4460 " ",
4461 "If the condition is (is not) true, do the commandlist.  The commandlist",
4462 "can be a single command, or a list of commands separated by commas and",
4463 "enclosed in braces.  The condition can be a single condition or a group of",
4464 "conditions separated by AND (&&) or OR (||) and enclosed in parentheses.",
4465 "If parentheses are used they must be surrounded by spaces.  Examples:",
4466 " ",
4467 "  IF EXIST oofa.txt <command>",
4468 "  IF ( EXIST oofa.txt || = \\v(nday) 3 ) <command>",
4469 "  IF ( EXIST oofa.txt || = \\v(nday) 3 ) { <command>, <command>, ... }",
4470 " ",
4471 "The conditions are:",
4472 " ",
4473 "  SUCCESS     - The previous command succeeded",
4474 "  OK          - Synonym for SUCCESS",
4475 "  FAILURE     - The previous command failed",
4476 "  ERROR       - Synonym for FAILURE",
4477 "  FLAG        - Succeeds if SET FLAG ON, fails if SET FLAG OFF",
4478 "  BACKGROUND  - C-Kermit is running in the background",
4479 #ifdef CK_IFRO
4480 "  FOREGROUND  - C-Kermit is running in the foreground",
4481 "  REMOTE-ONLY - C-Kermit was started with the -R command-line option",
4482 #else
4483 "  FOREGROUND  - C-Kermit is running in the foreground",
4484 #endif /* CK_IFRO */
4485 "  KERBANG     - A Kerbang script is running",
4486 "  ALARM       - SET ALARM time has passed",
4487 "  ASKTIMEOUT  - The most recent ASK, ASKQ, GETC, or GETOK timed out",
4488 "  EMULATION   - Succeeds if executed while in CONNECT mode",
4489 #ifdef OS2
4490 "  TAPI        - Current connection is via a Microsoft TAPI device",
4491 #endif /* OS2 */
4492 " ",
4493 "  MS-KERMIT   - Program is MS-DOS Kermit",
4494 "  C-KERMIT    - Program is C-Kermit",
4495 "  WINDOWS     - Program is C-Kermit for Windows",
4496 "  GUI         - Program runs in a GUI window",
4497 " ",
4498 "  AVAILABLE CRYPTO                  - Encryption is available",
4499 "  AVAILABLE KERBEROS4               - Kerberos 4 authentication is available",
4500 "  AVAILABLE KERBEROS5               - Kerberos 5 authentication is available",
4501 "  AVAILABLE NTLM                    - NTLM authentication is available",
4502 "  AVAILABLE SRP                     - SRP authentication is available",
4503 "  AVAILABLE SSL                     - SSL/TLS authentication is available",
4504 "  MATCH string pattern              - Succeeds if string matches pattern",
4505 #ifdef CKFLOAT
4506 "  FLOAT number                      - Succeeds if floating-point number",
4507 #endif /* CKFLOAT */
4508 "  COMMAND word                      - Succeeds if word is built-in command",
4509 "  DEFINED variablename or macroname - The named variable or macro is defined",
4510 "  DECLARED arrayname                - The named array is declared",
4511 "  NUMERIC variable or constant      - The variable or constant is numeric",
4512 "  FUNCTION name                     - The name is of a built-in function",
4513 "  EXIST filename                    - The named file exists",
4514 "  ABSOLUTE filename                 - The filename is absolute, not relative",
4515 "  BINARY filename                   - The file is a binary regular file",
4516 "  TEXT filename                     - The file is a text regular file",
4517 #ifdef CK_TMPDIR
4518 "  DIRECTORY string                  - The string is the name of a directory",
4519 #endif /* CK_TMPDIR */
4520 #ifdef UNIX
4521 "  LINK string                       - The string is a symbolic link",
4522 #endif	/* UNIX */
4523 "  READABLE filename                 - Succeeds if the file is readable",
4524 "  WRITEABLE filename                - Succeeds if the file is writeable",
4525 #ifdef ZFCDAT
4526 "  NEWER file1 file2                 - The 1st file is newer than the 2nd one",
4527 #endif /* ZFCDAT */
4528 "  OPEN { READ-FILE,SESSION-LOG,...} - The given file or log is open",
4529 #ifndef NOLOCAL
4530 "  OPEN CONNECTION                   - A connection is open",
4531 #endif /* NOLOCAL */
4532 "  KBHIT                             - A key has been pressed",
4533 "  TRUE                              - always succeeds",
4534 "  FALSE                             - always fails",
4535 " ",
4536 "  VERSION - equivalent to \"if >= \\v(version) ...\"",
4537 " ",
4538 "  EQUAL s1 s2 - s1 and s2 (character strings or variables) are equal",
4539 "  LLT   s1 s2 - s1 is lexically (alphabetically) less than s2",
4540 "  LLE   s1 s2 - s1 is lexically less than or equal to s2",
4541 "  LGT   s1 s2 - s1 is lexically (alphabetically) greater than s2",
4542 "  LGE   s1 s2 - s1 is lexically greater than or equal to s2",
4543 "  NEQ   s1 s2 - s1 is not equal to s2",
4544 " ",
4545 "  =  n1 n2 - n1 and n2 (numbers or variables containing numbers) are equal",
4546 "  <  n1 n2 - n1 is arithmetically less than n2",
4547 "  <= n1 n2 - n1 is arithmetically less than or equal to n2",
4548 "  >  n1 n2 - n1 is arithmetically greater than n2",
4549 "  >= n1 n2 - n1 is arithmetically greater than or equal to n2",
4550 "  != n1 n2 - n1 is not equal to n2",
4551 " ",
4552 "  (number by itself) - fails if the number is 0, succeeds otherwise",
4553 " ",
4554 "  (variable name)    - If value numeric: succeeds if nonzero, fails if zero",
4555 "                       NOTE: variable name must not be the same as keyword",
4556 " ",
4557 "The IF command may be followed on the next line by an ELSE command. Example:",
4558 " ",
4559 "  IF < \\%x 10 ECHO It's less",
4560 "  ELSE echo It's not less",
4561 " ",
4562 "It can also include an ELSE part on the same line if braces are used:",
4563 " ",
4564 "  IF < \\%x 10 { ECHO It's less } ELSE { ECHO It's not less }",
4565 " ",
4566 "Multiple commands can be enclosed in braces, separated by commas:",
4567 " ",
4568 "  IF > \\%n \\m(max) { echo \\%n > old max \\m(max), .max := \\%n }",
4569 " ",
4570 "When braces are used the command may split onto multiple lines:",
4571 " ",
4572 "  IF > \\%n \\m(max) {",
4573 "      echo \"\\%n greater than old max \\m(max)\"",
4574 "      .max := \\%n",
4575 "  } else if < \\%n \\m(min) {",
4576 "      echo \"\\%n less than old min \\m(min)\"",
4577 "      .min := \\%n",
4578 "  }",
4579 " ",
4580 "Also see HELP WILDCARD (for IF MATCH pattern syntax).",
4581 "" };
4582 
4583 static char *hmxxeval[] = { "Syntax: EVALUATE variable expression",
4584 "  Evaluates the expression and assigns its value to the given variable.",
4585 "  The expression can contain numbers and/or numeric-valued variables or",
4586 "  functions, combined with mathematical operators and parentheses in",
4587 "  traditional notation.  Operators include +-/*(), etc.  Example:",
4588 "  EVALUATE \\%n (1+1) * (\\%a / 3).",
4589 " ",
4590 "  NOTE: Prior to C-Kermit 7.0, the syntax was \"EVALUATE expression\"",
4591 "  (no variable), and the result was printed.  Use SET EVAL { OLD, NEW }",
4592 "  to choose the old or new behavior, which is NEW by default.",
4593 " ",
4594 "Alse see: HELP FUNCTION EVAL.",
4595 "" };
4596 #endif /* NOSPL */
4597 
4598 static char *hmxxexit[] = {
4599 "Syntax: EXIT (or QUIT) [ number [ text ] ]",
4600 "  Exits from the Kermit program, closing all open files and devices.",
4601 "  If a number is given it becomes Kermit's exit status code.  If text is",
4602 "  included, it is printed.  Also see SET EXIT.",
4603 "" };
4604 
4605 #ifndef NOSPL
4606 static char *ifxhlp[] = { "\
4607 Syntax: XIF condition { commandlist } [ ELSE { commandlist } ]",
4608 "  Obsolete.  Same as IF (see HELP IF).",
4609 "" };
4610 
4611 static char *forhlp[] = { "\
4612 Syntax: FOR variablename initial-value final-value increment { commandlist }",
4613 "  FOR loop.  Execute the comma-separated commands in the commandlist the",
4614 "  number of times given by the initial value, final value and increment.",
4615 "  Example:  FOR \\%i 10 1 -1 { pause 1, echo \\%i }", "" };
4616 
4617 static char *whihlp[] = { "\
4618 Syntax: WHILE condition { commandlist }",
4619 "  WHILE loop.  Execute the comma-separated commands in the bracketed",
4620 "  commandlist while the condition is true.  Conditions are the same as for",
4621 "  IF commands.",
4622 "" };
4623 
4624 static char *swihlp[] = {
4625 "Syntax: SWITCH <variable> { case-list }",
4626 "  Selects from a group of commands based on the value of a variable.",
4627 "  The case-list is a series of lines like these:",
4628 " ",
4629 "    :x, command, command, ..., break",
4630 " ",
4631 "  where \"x\" is a possible value for the variable.  At the end of the",
4632 "  case-list, you can put a \"default\" label to catch when the variable does",
4633 "  not match any of the labels:",
4634 " ",
4635 "    :default, command, command, ...",
4636 " ",
4637 "The case label \"x\" can be a character, a string, a variable, a function",
4638 "invocation, a pattern, or any combination of these.  See HELP WILDCARDS",
4639 "for information about patterns.",
4640 ""};
4641 
4642 static char *openhlp[] = {
4643 "Syntax:  OPEN mode filename",
4644 "  For use with READ and WRITE commands.  Open the local file in the",
4645 "  specified mode: READ, WRITE, or APPEND.  !READ and !WRITE mean to read",
4646 "  from or write to a system command rather than a file.  Examples:",
4647 " ",
4648 "    OPEN READ oofa.txt",
4649 "    OPEN !READ sort foo.bar",
4650 "" };
4651 
4652 static char *hxxask[] = {
4653 "Syntax:  ASK [ switches ] variablename [ prompt ]",
4654 "Example: ASK \\%n { What is your name\\? }",
4655 "  Issues the prompt and defines the variable to be whatever is typed in",
4656 "  response, up to the terminating carriage return.  Use braces to preserve",
4657 "  leading and/or trailing spaces in the prompt.",
4658 " ",
4659 "Syntax:  ASKQ [ switches ] variablename [ prompt ]",
4660 "Example: ASKQ \\%p { Password:}",
4661 "  Like ASK except the response does not echo on the screen or, if specified",
4662 "  it echoes as asterisks or other specified character.",
4663 " ",
4664 "Switches:",
4665 " /DEFAULT:text",
4666 "  Text to supply if the user enters a blank response or the /TIMEOUT",
4667 "  limit expired with no response.",
4668 " ",
4669 " /ECHO:char",
4670 "  (ASKQ only) Character to be echoed each time the user presses a key",
4671 "  corresponding to a printable character.  This lets users see what they are",
4672 "  doing when they are typing (e.g.) passwords, and makes editing easier.",
4673 " ",
4674 #ifdef OS2
4675 " /POPUP",
4676 "  The prompt and response dialog takes place in a text-mode popup.",
4677 "  C-Kermit for Windows only; in other C-Kermit versions /POPUP is ignored.",
4678 " ",
4679 #ifdef KUI
4680 " /GUI",
4681 "  The prompt and response dialog takes place in a GUI popup.",
4682 "  C-Kermit for Windows only; this switch is ignored elsewhere",
4683 " ",
4684 #endif /* KUI */
4685 #endif /* OS2 */
4686 " /TIMEOUT:number",
4687 "  If the response is not entered within the given number of seconds, the",
4688 "  command fails.  This is equivalent to setting ASK-TIMER to a positive",
4689 "  number, except it applies only to this command.  Also see SET ASK-TIMER.",
4690 "  NOTE: If a /DEFAULT: value was also given, it is supplied automatically",
4691 "  upon timeout and the command does NOT fail.",
4692 
4693 " ",
4694 " /QUIET",
4695 "  Suppresses \"?Timed out\" message when /TIMEOUT is given and user doesn't",
4696 "  respond within the time limit.",
4697 ""};
4698 static char *hxxgetc[] = {
4699 "Syntax:  GETC [ switches] [ variablename [ prompt ] ]",
4700 "Example: GETC \\%c { Type any character to continue...}",
4701 "  Issues the prompt and sets the variable to the first character you type.",
4702 "  Use braces to preserve leading and/or trailing spaces in the prompt.",
4703 " ",
4704 "Switches:",
4705 "  /CHECK",
4706 "    GETC /CHECK (no variable or prompt is given when /CHECK is used)",
4707  "   succeeds if characters are waiting to be read and fails if not.",
4708 " ",
4709 "  /QUIET",
4710 "    In case of errors, no error message is issued.",
4711 " ",
4712 "  /TIMEOUT:n",
4713 "    Gives GETC a time limit of n seconds to wait for a character to appear;",
4714 "    if no character appears within n seconds, GETC fails and (if a /QUIET",
4715 "    switch was not given, an error message is printed.",
4716 /* "Also see SET ASK-TIMER.", */
4717 ""};
4718 
4719 static char *hmxytimer[] = {
4720 "Syntax: SET ASK-TIMER number",
4721 "  For use with ASK, ASKQ, GETOK, and GETC.  If ASK-TIMER is set to a number",
4722 "  greater than 0, these commands will time out after the given number of",
4723 "  seconds with no response.  This command is \"sticky\", so to revert to",
4724 " \
4725 untimed ASKs after a timed one, use SET ASK-TIMER 0.  Also see IF ASKTIMEOUT.",
4726 ""};
4727 
4728 static char *hxxdot[] = {
4729 "Syntax: .<variable-name> <assignment-operator> <value>",
4730 "  Assigns the value to the variable in the manner indicated by the",
4731 "  assignment operator:",
4732 "  =   Copies without evaluation (like DEFINE).",
4733 "  :=  Copies with evaluation (like ASSIGN).",
4734 "  ::= Copies with arithmetic evaluation (like EVALUATE).",
4735 ""};
4736 
4737 static char *hxxdef[] = {
4738 "Syntax: DEFINE name [ definition ]",
4739 "  Defines a macro or variable.  Its value is the definition, taken",
4740 "  literally.  No expansion or evaluation of the definition is done.  Thus",
4741 "  if the definition includes any variable or function references, their",
4742 "  names are included, rather than their values (compare with ASSIGN).  If",
4743 "  the definition is omitted, then the named variable or macro is undefined.",
4744 " ",
4745 "A typical macro definition looks like this:",
4746 " ",
4747 "  DEFINE name command, command, command, ...",
4748 " ",
4749 "for example:",
4750 " ",
4751 "  DEFINE vax set parity even, set duplex full, set flow xon/xoff",
4752 " ",
4753 "which defines a Kermit command macro called 'vax'.  The definition is a",
4754 "comma-separated list of Kermit commands.  Use the DO command to execute",
4755 "the macro, or just type its name, followed optionally by arguments.",
4756 " ",
4757 "The definition of a variable can be anything at all, for example:",
4758 " ",
4759 "  DEFINE \\%a Monday",
4760 "  DEFINE \\%b 3",
4761 " ",
4762 "These variables can be used almost anywhere, for example:",
4763 " ",
4764 "  ECHO Today is \\%a",
4765 "  SET BLOCK-CHECK \\%b",
4766 "" };
4767 
4768 static char *hxxass[] = {
4769 "Syntax:  ASSIGN variablename string.",
4770 "Example: ASSIGN \\%a My name is \\%b.",
4771 "  Assigns the current value of the string to the variable (or macro).",
4772 "  The definition string is fully evaluated before it is assigned, so that",
4773 "  the values of any variables that are contained are used, rather than their",
4774 "  names.  Compare with DEFINE.  To illustrate the difference, try this:",
4775 " ",
4776 "    DEFINE \\%a hello",
4777 "    DEFINE \\%x \\%a",
4778 "    ASSIGN \\%y \\%a",
4779 "    DEFINE \\%a goodbye",
4780 "    ECHO \\%x \\%y",
4781 " ",
4782 "  This prints 'goodbye hello'.", "" };
4783 
4784 static char *hxxdec[] = {
4785 "Syntax: DECREMENT variablename [ amount ]",
4786 "  Decrement (subtract one from) the value of a variable if the current value",
4787 "  is numeric.  If an optional amount is specified (as a number, a variable,",
4788 "  \
4789 or an arithmetic expression that evaluates to a number, or any combination)",
4790 "  the variable is decremented by that number instead of 1.  The result is",
4791 "  always an integer.  If floating-point numbers are given, the result is",
4792 "  truncated.",
4793 " ",
4794 "Examples: DECR \\%a, DECR days 7, DECR x \\%n, DECR sum \\%x+12",
4795 ""
4796 };
4797 
4798 static char *hxxinc[] = {
4799 "Syntax: INCREMENT variablename [ number ]",
4800 "  Increment (add one to) the value of a variable if the current value is",
4801 "  numeric.  If an optional amount is specified (as a number, a variable,",
4802 "  \
4803 or an arithmetic expression that evaluates to a number, or any combination)",
4804 "  the variable is incremented by that number instead of 1.  The result is",
4805 "  always an integer.  If floating-point numbers are given, the result is",
4806 "  truncated.",
4807 " ",
4808 "Examples: INCR \\%a, INCR dollars 100, INCR size \\%n, INCR total \\%x/10",
4809 "" };
4810 #endif /* NOSPL */
4811 
4812 #ifdef ANYX25
4813 #ifndef IBMX25
4814 static char *hxxpad[] = {
4815 "Syntax: PAD command",
4816 "X.25 PAD commands:",
4817 " ",
4818 "    PAD CLEAR     - Clear the virtual call",
4819 "    PAD STATUS    - Return the status of virtual call",
4820 "    PAD RESET     - Send a reset packet",
4821 "    PAD INTERRUPT - Send an interrupt packet",
4822 ""};
4823 #endif /* IBMX25 */
4824 
4825 static char *hxyx25[] = {
4826 "Syntax: SET X.25 option { ON [ data ], OFF }",
4827 " ",
4828 "X.25 call options:",
4829 "  CLOSED-USER-GROUP { ON index, OFF }",
4830 "    Enable or disable closed user group call, where index is the group",
4831 "    index, 0 to 99.",
4832 "  REVERSE-CHARGE { ON, OFF }",
4833 "    Tell whether you want to reverse the charges for the call.",
4834 "  CALL-USER-DATA { ON string, OFF }",
4835 "    Specify call user-data for the X.25 call.",
4836 ""};
4837 #endif /* ANYX25 */
4838 
4839 static char *hxyprtr[] = {
4840 #ifdef PRINTSWI
4841 "Syntax: SET PRINTER [ switches ] [ name ]",
4842 " ",
4843 "  Specifies the printer to be used for transparent-print, autoprint, and",
4844 "  screen-dump material during terminal emulation, as well as for the PRINT",
4845 "  command, plus various options governing print behavior.",
4846 " ",
4847 "Switches for specifying the printer by type:",
4848 " ",
4849 "/NONE",
4850 "  Include this switch to specify that all printer actions should simply be",
4851 "  skipped.  Use this, for example, if you have no printer.",
4852 " ",
4853 "/DOS-DEVICE[:name]",
4854 "  Include this to declare a DOS printer and to specify its name, such as",
4855 "  PRN, LPT1, etc.",
4856 " ",
4857 #ifdef NT
4858 "/WINDOWS-QUEUE[:[queue-name]]",
4859 "  Include this to declare a Windows printer and specify its queue name.",
4860 "  Type question mark (?) after the colon (:) to see a list of known queue",
4861 "  names.  If the colon is absent, the switch indicates the currently",
4862 "  selected printer is a Windows Print Queue.  If the colon is provided",
4863 "  and the name is absent, the Windows Print Queue chosen as the Default",
4864 "  Printer is selected.",
4865 " ",
4866 #endif /* NT */
4867 "/FILE[:name]",
4868 "  Specifies that all printer material is to be appended to the named file,",
4869 "  rather than being sent to a printer.  If the file does not exist, it is",
4870 "  created the first time any material is to be printed.",
4871 " ",
4872 "/PIPE[:name]",
4873 "  Specifies that all printer material is to be sent as standard input to",
4874 "  the program or command whose name is given.  Example:",
4875 " ",
4876 "    SET PRINTER /PIPE:{textps > lpt1}",
4877 " ",
4878 "If you give a printer name without specifying any of these switches, then it",
4879 "is assumed to be a DOS printer device or filename unless the name given",
4880 "(after removing enclosing braces, if any) starts with \"|\", \
4881 in which case it",
4882 "is a pipe.  Examples:",
4883 " ",
4884 "  SET PRINTER LPT1               <-- DOS device",
4885 "  SET PRINTER {| textps > lpt1}  <-- Pipe",
4886 " ",
4887 "The next group of switches tells whether the printer is one-way or",
4888 "bidirectional (two-way):",
4889 " ",
4890 "/OUTPUT-ONLY",
4891 "  Include this to declare the printer capable only of receiving material to",
4892 "  be printed, but not sending anything back.  This is the normal kind of",
4893 "  printer, Kermit's default kind, and the opposite of /BIDIRECTIONAL.",
4894 " ",
4895 "/BIDIRECTIONAL",
4896 "  Include this to declare the printer bidirectional.  This is the opposite ",
4897 "  of /OUTPUT-ONLY.  You can also use this option with serial printers, even",
4898 "  if they aren't bidirectional, in case you need to specify speed, flow",
4899 "  control, or parity.",
4900 " ",
4901 "The next group applies only to bidirectional and/or serial printers:",
4902 " ",
4903 "/FLOW-CONTROL:{NONE,XON/XOFF,RTS/CTS,KEEP}",
4904 "  Flow control to use with a serial bidirectional printer, default KEEP;",
4905 #ifdef NT
4906 "  i.e. use whatever the Windows driver for the port normally uses.",
4907 #else
4908 "  i.e. use whatever the OS/2 driver for the port normally uses.",
4909 #endif /* NT */
4910 " ",
4911 "/PARITY:{NONE,EVEN,ODD,SPACE,MARK}",
4912 "  Parity to use with a serial printer, default NONE; i.e. use 8 data bits",
4913 "  and no parity.  If you omit the colon and the keyword, NONE is selected.",
4914 " ",
4915 "/SPEED:number",
4916 "  Interface speed, in bits per second, to use with a serial printer, such as",
4917 "  2400, 9600, 19200, etc.  Type SET PRINTER /SPEED:? for a list of possible",
4918 "  speeds.",
4919 " ",
4920 "The next group deals with print jobs -- how to identify them, how to start",
4921 "them, how to terminate them:",
4922 " ",
4923 "/TIMEOUT[:number]",
4924 "  Used with host-directed transparent or auto printing, this is the number",
4925 "  of seconds to wait after the host closes the printer before terminating",
4926 "  the print job if the printer is not opened again during the specified",
4927 "  amount of time.",
4928 " ",
4929 "/JOB-HEADER-FILE[:filename]",
4930 "  The name of a file to be sent to the printer at the beginning of each",
4931 "  print job, as a burst page, or to configure the printer.  Normally no file",
4932 "  is is sent.",
4933 " ",
4934 "/END-OF-JOB-STRING[:string]",
4935 "  String of characters to be sent to the printer at the end of the print",
4936 "  job, usually used to force the last or only page out of the printer.  When",
4937 "  such a string is needed, it usually consists of a single formfeed: \"set",
4938 "  printer /end-of-job:{\\12}\".  No end-of-job string is sent unless you",
4939 "  specify one with this option.  If the string contains any spaces or",
4940 "  control characters (even in backslash notation, as above), enclose it in",
4941 "  braces.",
4942 " ",
4943 "The next group is for use with printers that print only PostScript:",
4944 " ",
4945 "/POSTSCRIPT or /PS",
4946 "  Indicates that Kermit should convert all text to PostScript before sending",
4947 "  it to the printer.  The fixed-pitch Courier-11 font is used.",
4948 " ",
4949 "/WIDTH:number",
4950 "  Specifies the width of the page in characters.  If this switch is not",
4951 "  given, 80 is used.",
4952 " ",
4953 "/HEIGHT:number",
4954 "  Specifies the height of the page in lines.  If this switch is not given",
4955 "  66 is used.",
4956 " ",
4957 "/NOPOSTSCRIPT or /NOPS",
4958 "  Indicates that Kermit should not convert all text to PostScript before",
4959 "  sending it to the printer.",
4960 " ",
4961 "The final switch is for use with AutoPrint mode and Screen Dumps",
4962 " ",
4963 "/CHARACTER-SET:<character-set>",
4964 "  Specifies the character set used by the printer which may be different",
4965 "  from both the character set used by the host and by the local computer.",
4966 "  The default value is CP437.",
4967 " ",
4968 "SHOW PRINTER displays your current printer settings.",
4969 #else
4970 #ifdef UNIX
4971 "Syntax: SET PRINTER [ { |command, filename } ]",
4972 "  Specifies the command (such as \"|lpr\") or filename to be used by the",
4973 "  PRINT command.  If a filename is given, each PRINT command appends to the",
4974 "  given file.  If the SET PRINTER argument contains spaces, it must be",
4975 "  enclosed in braces, e.g. \"set printer {| lpr -Plaser}\". If the argument",
4976 "  is omitted the default value is restored.  SHOW PRINTER lists the current",
4977 "  printer.  See HELP PRINT for further info.",
4978 #else
4979 "Sorry, SET PRINTER not available yet.",
4980 #endif /* UNIX */
4981 #endif /* PRINTSWI */
4982 ""};
4983 
4984 #ifdef OS2
4985 #ifdef BPRINT
4986 static char *hxybprtr[] = {
4987 "Syntax: SET BPRINTER [ portname speed [ parity [ flow-control ] ] ]",
4988 "  (Obsolete, replaced by SET PRINTER /BIDIRECTIONAL.)",
4989 ""};
4990 #endif /* BPRINT */
4991 #endif /* OS2 */
4992 
4993 static char *hxyexit[] = {
4994 "Syntax: SET EXIT HANGUP { ON, OFF }",
4995 "  When ON (which is the default), C-Kermit executes an implicit HANGUP and",
4996 "  CLOSE command on the communications device or connection when it exits.",
4997 "  When OFF, Kermit skips this sequence.",
4998 " ",
4999 "Syntax: SET EXIT MESSAGE { ON, OFF, STDERR }",
5000 "  Allows the text (if any) from an EXIT command (see HELP EXIT) to be",
5001 "  supressed (OFF), printed normally (ON, the default), or sent to STDERR.",
5002 " ",
5003 "Syntax: SET EXIT ON-DISCONNECT { ON, OFF }",
5004 "  When ON, C-Kermit EXITs automatically when a network connection",
5005 "  is terminated either by the host or by issuing a HANGUP command.",
5006 " ",
5007 "Syntax: SET EXIT STATUS number",
5008 #ifdef NOSPL
5009 "  Set C-Kermit's program return code to the given number.",
5010 #else
5011 "  Set C-Kermit's program return code to the given number, which can be a",
5012 "  constant, variable, function result, or arithmetic expression.",
5013 #endif /* NOSPL */
5014 " ",
5015 "Syntax: SET EXIT WARNING { ON, OFF, ALWAYS }",
5016 "  When EXIT WARNING is ON, issue a warning message and ask for confirmation",
5017 "  before EXITing if a connection to another computer might still be open.",
5018 "  When EXIT WARNING is ALWAYS, confirmation is always requested.  When OFF",
5019 "  it is never requested.  The default is ON.",
5020 "" };
5021 
5022 #ifndef NOSPL
5023 static char *hxxpau[] = {
5024 "Syntax:  PAUSE [ { number-of-seconds, hh:mm:ss } ]",
5025 "Example: PAUSE 3  or  PAUSE 14:52:30",
5026 "  Do nothing for the specified number of seconds or until the given time of",
5027 "  day in 24-hour hh:mm:ss notation.  If the time of day is earlier than the",
5028 "  current time, it is assumed to be tomorrow.  If no argument given, one",
5029 "  second is used.  The pause can be interrupted by typing any character on",
5030 "  the keyboard unless SLEEP CANCELLATION is OFF.  If interrupted, PAUSE",
5031 "  fails, otherwise it succeeds.  Synonym: SLEEP.",
5032 "" };
5033 
5034 static char *hxxmsl[] = {
5035 "Syntax:  MSLEEP [ number ]",
5036 "Example: MSLEEP 500",
5037 "  Do nothing for the specified number of milliseconds; if no number given,",
5038 "  100 milliseconds.","" };
5039 #endif /* NOSPL */
5040 
5041 #ifndef NOPUSH
5042 extern int nopush;
5043 static char *hxxshe[] = {
5044 "Syntax: !, @, RUN, PUSH, or SPAWN, optionally followed by a command.",
5045 "  Gives the command to the local operating system's command processor, and",
5046 "  displays the results on the screen.  If the command is omitted, enters the",
5047 "  system's command line interpreter or shell; exit from it (the command for",
5048 "  this is usually EXIT or QUIT or LOGOUT) to return to Kermit.",
5049 ""
5050 };
5051 #endif /* NOPUSH */
5052 
5053 #ifndef NOXMIT
5054 static char *hxxxmit[] = {
5055 "Syntax: TRANSMIT [ switches ] filename",
5056 "  Sends the contents of a file, without any error checking or correction,",
5057 "  to the computer on the other end of your SET LINE or SET HOST connection",
5058 "  (or if C-Kermit is in remote mode, displays it on the screen).  The",
5059 "  filename is the name of a single file (no wildcards) to be sent or, if",
5060 "  the /PIPE switch is included, the name of a command whose output is to be",
5061 "  sent.",
5062 " ",
5063 "  The file is sent according to your current FILE TYPE setting (BINARY or",
5064 "  TEXT), which you can override with a /BINARY or /TEXT switch without",
5065 "  changing the global setting.  In text mode, it is sent a line at a time,",
5066 "  with carriage return at the end of each line (as if you were typing it at",
5067 "  your keyboard), and C-Kermit waits for a linefeed to echo before sending",
5068 "  the next line; use /NOWAIT to eliminate the feedback requirement.  In",
5069 "  binary mode, it is sent a character at a time, with no feedback required.",
5070 " ",
5071 "  Normally the transmitted material is echoed to your screen.  Use SET",
5072 "  TRANSMIT ECHO OFF or the /NOECHO switch to suppress echoing.  Note that",
5073 "  TRANSMIT /NOECHO /NOWAIT /BINARY is a special case, that more or less",
5074 "  blasts the file out at full speed.",
5075 " ",
5076 #ifndef NOCSETS
5077 "  Character sets are translated according to your current FILE and TERMINAL",
5078 "  CHARACTER-SET settings when TRANSMIT is in text mode.  Include /TRANSPARENT"
5079 ,
5080 "  to disable character-set translation in text mode (/TRANSPARENT implies",
5081 "  /TEXT).",
5082 " ",
5083 #endif /* NOCSETS */
5084 "  There can be no guarantee that the other computer will receive the file",
5085 "  correctly and completely.  Before you start the TRANSMIT command, you",
5086 "  must put the other computer in data collection mode, for example by",
5087 "  starting a text editor.  TRANSMIT may be interrupted by Ctrl-C.  Synonym:",
5088 "  XMIT.  See HELP SET TRANSMIT for further information.",
5089 "" };
5090 #endif /* NOXMIT */
5091 
5092 #ifndef NOCSETS
5093 static char *hxxxla[] = {
5094 "Syntax: TRANSLATE file1 cs1 cs2 [ file2 ]",
5095 "  Translates file1 from the character set cs1 into the character set cs2",
5096 "  and stores the result in file2.  The character sets can be any of",
5097 "  C-Kermit's file character sets.  If file2 is omitted, the translation",
5098 "  is displayed on the screen.  An appropriate intermediate character-set",
5099 "  is chosen automatically, if necessary.  Synonym: XLATE.  Example:",
5100 " ",
5101 "    TRANSLATE lasagna.txt latin1 utf8 lasagna-utf8.txt",
5102 " ",
5103 "  Multiple files can be translated if file2 is a directory or device name,",
5104 "  rather than a filename, or if file2 is omitted.  Note: CONVERT would",
5105 "" };
5106 #endif /* NOCSETS */
5107 
5108 #ifndef NOSPL
5109 static char *hxxwai[] = {
5110 "Syntax: WAIT { number-of-seconds, hh:mm:ss } [ <what> ]",
5111 " ",
5112 "Examples:",
5113 "  wait 5 cd cts",
5114 "  wait 23:59:59 cd",
5115 " ",
5116 "  Waits up to the given number of seconds or the given time of day for the",
5117 "  specified item or event, which can be FILE, the name(s) of one or more",
5118 "  modem signals, or nothing.  If nothing is specified, WAIT acts like SLEEP.",
5119 "  If one or more modem signal names are given, Kermit waits for the specified"
5120 ,
5121 "  modem signals to appear on the serial communication device.",
5122 "  Sets FAILURE if the signals do not appear in the given time or interrupted",
5123 "  from the keyboard during the waiting period.",
5124 " ",
5125 "Signals:",
5126 "  cd  = Carrier Detect;",
5127 "  dsr = Dataset Ready;",
5128 "  cts = Clear To Send;",
5129 "  ri  = Ring Indicate.",
5130 " ",
5131 "If you want Kermit to wait for a file event, then the syntax is:",
5132 " ",
5133 "  WAIT <time> FILE { CREATION, DELETION, MODIFICATION } <filename>",
5134 " ",
5135 "where <time> is as above, and <filename> is the name of a single file.",
5136 "Kermit waits up to the given amount of time for the specified event to occur",
5137 "with the specified file, succeeds if it does, fails if it doesn't.",
5138 "" };
5139 #endif /* NOSPL */
5140 
5141 static char *hxxwri[] = {
5142 "Syntax: WRITE name text",
5143 "  Writes the given text to the named log or file.  The text text may include",
5144 "  backslash codes, and is not terminated by a newline unless you include the",
5145 "  appropriate code.  The name parameter can be any of the following:",
5146 " ",
5147 "   DEBUG-LOG",
5148 "   ERROR (standard error)",
5149 #ifndef NOSPL
5150 "   FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)",
5151 #endif /* NOSPL */
5152 "   PACKET-LOG",
5153 "   SCREEN (compare with ECHO)",
5154 #ifndef NOLOCAL
5155 "   SESSION-LOG",
5156 #endif /* NOLOCAL */
5157 "   TRANSACTION-LOG", "" };
5158 
5159 #ifndef NODIAL
5160 static char *hxxlook[] = { "Syntax: LOOKUP name",
5161 "  Looks up the given name in the dialing directory or directories, if any,",
5162 "  specified in the most recent SET DIAL DIRECTORY command.  Each matching",
5163 "  entry is shown, along with any transformations that would be applied to",
5164 "  portable-format entries based on your locale.  HELP DIAL, HELP SET DIAL",
5165 "  for further info.",
5166 ""
5167 };
5168 
5169 static char *hxxansw[] = { "Syntax:  ANSWER [ <seconds> ]",
5170 #ifdef OS2
5171 "  Waits for a modem call to come in.  Prior SET MODEM TYPE and SET PORT",
5172 #else
5173 "  Waits for a modem call to come in.  Prior SET MODEM TYPE and SET LINE",
5174 #endif /* OS2 */
5175 "  required.  If <seconds> is 0 or not specified, Kermit waits forever or",
5176 "  until interrupted, otherwise Kermit waits the given number of seconds.",
5177 "  The ANSWER command puts the modem in autoanswer mode.  Subsequent DIAL",
5178 "  commands will automatically put it (back) in originate mode.  SHOW MODEM,",
5179 "  HELP SET MODEM for more info.",
5180 ""
5181 };
5182 
5183 static char *hxxdial[] = { "Syntax:  DIAL phonenumber",
5184 "Example: DIAL 7654321",
5185 "  \
5186 Dials a number using an autodial modem.  First you must SET MODEM TYPE, then",
5187 #ifdef OS2
5188 "  SET PORT (or in Windows only, SET PORT TAPI instead of SET MODEM TYPE and",
5189 "  SET LINE), then SET SPEED. Then give the DIAL command, including the phone",
5190 #else
5191 "  SET LINE, then SET SPEED.  Then give the DIAL command, including the phone",
5192 #endif /* OS2 */
5193 "  number, for example:",
5194 " ",
5195 "   DIAL 7654321",
5196 #ifdef NETCONN
5197 " ",
5198 "  If the modem is on a network modem server, SET HOST first, then SET MODEM",
5199 "  TYPE, then DIAL.",
5200 #endif /* NETCONN */
5201 " ",
5202 "If you give the DIAL command interactively at the Kermit prompt, and the",
5203 "call is placed successfully, Kermit automatically enters CONNECT mode.",
5204 "If the DIAL command is given from a macro or command file, Kermit remains",
5205 "in command mode after the call is placed, successfully or not.  You can",
5206 "change this behavior with the SET DIAL CONNECT command.",
5207 " ",
5208 "If the phonenumber starts with a letter, and if you have used the SET DIAL",
5209 "DIRECTORY command to specify one or more dialing-directory files, Kermit",
5210 "looks it up in the given file(s); if it is found, the name is replaced by",
5211 "the number or numbers associated with the name.  If it is not found, the",
5212 "name is sent to the modem literally.",
5213 " ",
5214 "If the phonenumber starts with an equals sign (\"=\"), this forces the part",
5215 "after the = to be sent literally to the modem, even if it starts with a",
5216 "letter, without any directory lookup.",
5217 " ",
5218 "You can also give a list of phone numbers enclosed in braces, e.g:",
5219 " ",
5220 "  dial {{7654321}{8765432}{+1 (212 555-1212}}",
5221 " ",
5222 "(Each number is enclosed in braces and the entire list is also enclosed in",
5223 "braces.)  In this case, each number is tried until there is an answer.  The",
5224 "phone numbers in this kind of list can not be names of dialing directory",
5225 "entries.",
5226 " ",
5227 "A dialing directory is a plain text file, one entry per line:",
5228 " ",
5229 "  name  phonenumber  ;  comments",
5230 " ",
5231 "for example:",
5232 " ",
5233 "  work    9876543              ; This is a comment",
5234 "  e-mail  +1  (212) 555 4321   ; My electronic mailbox",
5235 "  germany +49 (511) 555 1234   ; Our branch in Hanover",
5236 " ",
5237 "If a phone number starts with +, then it must include country code and",
5238 "area code, and C-Kermit will try to handle these appropriately based on",
5239 "the current locale (HELP SET DIAL for further info); these are called",
5240 "PORTABLE entries.  If it does not start with +, it is dialed literally.",
5241 " ",
5242 "If more than one entry is found with the same name, Kermit dials all of",
5243 "them until the call is completed; if the entries are in portable format,",
5244 "Kermit dials them in cheap-to-expensive order: internal, then local, then",
5245 "long-distance, then international, based on its knowledge of your local",
5246 "country code and area code (see HELP SET DIAL).",
5247 " ",
5248 "Specify your dialing directory file(s) with the SET DIAL DIRECTORY command.",
5249 " ",
5250 #ifdef NETCONN
5251 "See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED, REDIAL, and",
5252 "PDIAL.",
5253 #else
5254 "See also SET DIAL, SET MODEM, SET LINE, SET SPEED, PDIAL, and REDIAL.",
5255 #endif /* NETCONN */
5256 "" };
5257 
5258 #ifdef CK_TAPI
5259 static char *hxxtapi[] = {
5260 "TAPI CONFIGURE-LINE <tapi-line>",
5261 "  Displays the TAPI Configure Line Dialog box and allows you to",
5262 "  alter the default configuration for the specified <tapi-line>.",
5263 " ",
5264 "TAPI DIALING-PROPERTIES",
5265 "  Displays the TAPI Dialing Properties (locations) Dialog box.  The",
5266 "  Dialing rules may be changed and locations created and deleted.",
5267 "  When the dialog box is closed, C-Kermit imports the current Dialing",
5268 "  Properties' Location into the Kermit DIAL command settings.",
5269 ""};
5270 
5271 static char *hxytapi[] = {
5272 "SET TAPI LINE <tapi-line>",
5273 "  Opens a TAPI device for use by Kermit.",
5274 " ",
5275 "SET TAPI MODEM-DIALING {ON, [OFF]}",
5276 "  If TAPI MODEM-DIALING is OFF when SET TAPI LINE is issued, Kermit opens",
5277 "  the TAPI device directly as a \"raw port\".  The device is unavailable to",
5278 "  other applications and Kermit performs dialing functions using its",
5279 "  built-in dialing and modem databases.  If TAPI MODEM-DIALING is ON, TAPI",
5280 "  handles all dialing functions and the port may be shared with other",
5281 "  applications when a call is not active.  When TAPI MODEM-DIALING is OFF,",
5282 "  SET MODEM TYPE TAPI Kermit uses the TAPI modem commands imported from the",
5283 "  Windows Registry during the previous SET TAPI LINE call.",
5284 " ",
5285 "SET TAPI LOCATION <tapi-location>",
5286 "  Specifies the TAPI location to make current for the entire system.  The",
5287 "  <tapi-location>'s dialing properties are imported into Kermit's SET DIAL",
5288 "  command database.",
5289 " ",
5290 "SET TAPI PHONE-NUMBER-CONVERSIONS {ON, OFF, [AUTO]}",
5291 "  Controls whether the phone number conversions are performed by TAPI (ON)",
5292 "  or by Kermit (OFF), or according the type of port that was selected",
5293 "  (AUTO); AUTO is the default, and is equivalent to ON if the current",
5294 "  LINE/PORT is a TAPI device and TAPI MODEM-DIALING is ON, OFF otherwise.",
5295 " ",
5296 "SET TAPI MODEM-LIGHTS {[ON], OFF}",
5297 "  Displays a modem lights indicator on the Windows Taskbar.  Does nothing",
5298 "  in Windows NT 4.0.",
5299 " ",
5300 "SET TAPI MANUAL-DIALING {ON, [OFF]}",
5301 "  Displays a dialog box during dialing requesting that you manually dial the",
5302 "  phone before continuing.  Applies only when TAPI MODEM-DIALING is ON.",
5303 " ",
5304 "SET TAPI WAIT-FOR-CREDIT-CARD-TONE <seconds>",
5305 "  Some modems don't support the '$' (BONG) symbol during dialing, which",
5306 "  means \"wait for credit card tone before continuing.\"  If TAPI recognizes",
5307 "  the modem as one that does not support BONG, it replaces the '$' with",
5308 "  <seconds> worth of pauses.  The default is 8 seconds.  This command",
5309 "  applies only when TAPI MODEM-DIALING is ON",
5310 " ",
5311 "SET TAPI PRE-DIAL-TERMINAL {ON, [OFF]}",
5312 "SET TAPI POST-DIAL-TERMINAL {ON, [OFF]}",
5313 "  Displays a small terminal window that may be used to communicate with the",
5314 "  modem or the host prior to or immediately after dialing; applies only when",
5315 "  TAPI MODEM-DIALING is ON",
5316 " ",
5317 "SET TAPI INACTIVITY-TIMEOUT <minutes>",
5318 "  Specifies the number of minutes of inactivity that may go by before TAPI",
5319 "  disconnects the line.  The default is 0 which means disable this function.",
5320 "  Applies only when TAPI MODEM-DIALING is ON.",
5321 " ",
5322 "SET TAPI USE-WINDOWS-CONFIGURATION {ON, [OFF]}",
5323 "  Specifies whether the TAPI modem values for speed, parity, stop bits, flow",
5324 "  control, etc. are used in preference to the current values specified",
5325 "  within C-Kermit.",
5326 " ",
5327 ""};
5328 #endif /* CK_TAPI */
5329 
5330 #endif /* NODIAL */
5331 
5332 #ifdef TNCODE
5333 static char *hmxxiks[] = {
5334 "Syntax: IKS [ switches ] [ host [ service ] ]",
5335 "  Establishes a new connection to an Internet Kermit Service daemon.",
5336 "  Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host KERMIT /TELNET,",
5337 "  IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)",
5338 "  is resumed.  Depending on how Kermit has been built switches may be",
5339 "  available to require a secure authentication method and bidirectional",
5340 "  encryption.  See HELP SET TELNET for more info.",
5341 " ",
5342 #ifdef CK_AUTHENTICATION
5343 " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
5344 "   SET TELOPT AUTH REQUIRED with the following exceptions.  If the type",
5345 "   is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
5346 "   is NONE, then SET TELOPT AUTH REFUSED is executed.",
5347 " ",
5348 #endif /* CK_AUTHENTICATION */
5349 #ifdef CK_ENCRYPTION
5350 " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
5351 "   and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
5352 "   If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
5353 "   and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
5354 "   executed.",
5355 " ",
5356 #endif /* CK_ENCRYPTION */
5357 " /USERID:[<name>]",
5358 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
5359 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
5360 "   Telnet negotiations; if this switch is given but the string is omitted,",
5361 "   no user ID is sent to the host.  If this switch is not given, your",
5362 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
5363 "   host it is a request to login as the specified user.",
5364 " ",
5365 #ifdef CK_AUTHENTICATION
5366 " /PASSWORD:[<string>]",
5367 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
5368 "   it is treated as the password to be used (if required) by any Telnet",
5369 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
5370 "   Password, or X.509 certificate private key decryption.)  If no password",
5371 "   switch is specified a prompt is issued to request the password if one",
5372 "   is required for the negotiated authentication method.",
5373 #endif /* CK_AUTHENTICATION */
5374 ""};
5375 
5376 static char *hmxxtel[] = {
5377 "Syntax: TELNET [ switches ] [ host [ service ] ]",
5378 "  Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /TELNET,",
5379 "  IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)",
5380 "  is resumed.  Depending on how Kermit has been built switches may be",
5381 "  available to require a secure authentication method and bidirectional",
5382 "  encryption.  See HELP SET TELNET for more info.",
5383 " ",
5384 #ifdef CK_AUTHENTICATION
5385 " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
5386 "   SET TELOPT AUTH REQUIRED with the following exceptions.  If the type",
5387 "   is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
5388 "   is NONE, then SET TELOPT AUTH REFUSED is executed.",
5389 " ",
5390 #endif /* CK_AUTHENTICATION */
5391 #ifdef CK_ENCRYPTION
5392 " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
5393 "   and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
5394 "   If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
5395 "   and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
5396 "   executed.",
5397 " ",
5398 #endif /* CK_ENCRYPTION */
5399 " /USERID:[<name>]",
5400 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
5401 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
5402 "   Telnet negotiations; if this switch is given but the string is omitted,",
5403 "   no user ID is sent to the host.  If this switch is not given, your",
5404 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
5405 "   host it is a request to login as the specified user.",
5406 " ",
5407 #ifdef CK_AUTHENTICATION
5408 " /PASSWORD:[<string>]",
5409 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
5410 "   it is treated as the password to be used (if required) by any Telnet",
5411 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
5412 "   Password, or X.509 certificate private key decryption.)  If no password",
5413 "   switch is specified a prompt is issued to request the password if one",
5414 "   is required for the negotiated authentication method.",
5415 #endif /* CK_AUTHENTICATION */
5416 ""};
5417 
5418 static char *hxtopt[] = {
5419 "TELOPT { AO, AYT, BREAK, CANCEL, EC, EL, EOF, EOR, GA, IP, DMARK, NOP, SE,",
5420 "         SUSP, SB [ option ], DO [ option ], DONT [ option ],",
5421 "         WILL [ option ], WONT [option] }",
5422 "  This command lets you send all the Telnet protocol commands.  Note that",
5423 "  certain commands do not require a response, and therefore can be used as",
5424 "  nondestructive \"probes\" to see if the Telnet session is still open;",
5425 "  e.g.:",
5426 " ",
5427 "    set host xyzcorp.com",
5428 "    ...",
5429 "    telopt nop",
5430 "    telopt nop",
5431 "    if fail stop 1 Connection lost",
5432 " ",
5433 "  TELOPT NOP is sent twice because the failure of the connection will not",
5434 "  be detected until the second send is attempted.  This command is meant",
5435 "  primarily as a debugging tool for the expert user.",
5436 ""};
5437 #endif /* TNCODE */
5438 
5439 #endif /* NOHELP */
5440 
5441 /*  D O H L P  --  Give a help message  */
5442 
5443 _PROTOTYP( int dohset, (int) );
5444 #ifndef NOCMDL
5445 _PROTOTYP( int dohopts, (void) );
5446 #endif /* NOCMDL */
5447 #ifndef NOSPL
5448 _PROTOTYP( int dohfunc, (int) );
5449 extern struct keytab fnctab[];
5450 extern int nfuncs;
5451 #endif /* NOSPL */
5452 #ifdef OS2
5453 #ifndef NOKVERBS
5454 _PROTOTYP( int dohkverb, (int) );
5455 extern struct keytab kverbs[];
5456 extern int nkverbs;
5457 #endif /* NOKVERBS */
5458 #endif /* OS2 */
5459 
5460 #ifndef NOSPL
5461 static char * hxxdcl[] = {
5462 "Syntax: ARRAY verb operands...",
5463 " ",
5464 "Declares arrays and performs various operations on them.  Arrays have",
5465 "the following syntax:",
5466 " ",
5467 "  \\&a[n]",
5468 " ",
5469 "where \"a\" is a letter and n is a number or a variable with a numeric value",
5470 "or an arithmetic expression.  The value of an array element can be anything",
5471 "at all -- a number, a character, a string, a filename, etc.",
5472 " ",
5473 "The following ARRAY verbs are available:",
5474 " ",
5475 "[ ARRAY ] DECLARE arrayname[n] [ = initializers... ]",
5476 "  Declares an array of the given size, n.  The resulting array has n+1",
5477 "  elements, 0 through n.  Array elements can be used just like any other",
5478 "  variables.  Initial values can be given for elements 1, 2, ... by",
5479 "  including = followed by one or more values separated by spaces.  If you",
5480 "  omit the size, the array is sized according to the number of initializers;",
5481 "  if none are given the array is destroyed and undeclared if it already",
5482 "  existed.  The ARRAY keyword is optional.  Synonym: [ ARRAY ] DCL.",
5483 " ",
5484 "[ ARRAY ] UNDECLARE arrayname",
5485 "  Destroys and undeclares the given array.  Synonym: ARRAY DESTROY.",
5486 " ",
5487 "ARRAY SHOW [ arrayname ]",
5488 "  Displays the contents of the given array.  A range specifier can be",
5489 "  included to display a segment of the array, e.g. \"array show \\&a[1:24].\""
5490 ,
5491 "  If the arrayname is omitted, all declared arrays are listed, but their",
5492 "  contents is not shown.  Synonym: SHOW ARRAY.",
5493 " ",
5494 "ARRAY CLEAR arrayname",
5495 "  Clears all elements of the array, i.e. sets them to empty values.",
5496 "  You may include a range specifier to clear a segment of the array rather",
5497 "  than the whole array, e.g. \"array clear \\%a[22:38]\"",
5498 " ",
5499 "ARRAY SET arrayname value",
5500 "  Sets all elements of the array to the given value.  You may specify a",
5501 "  range to set a segment of the array, e.g. \"array set \\%a[2:9] 0\"",
5502 " ",
5503 "ARRAY RESIZE arrayname number",
5504 "  Changes the size of the given array, which must already exist, to the",
5505 "  number given.  If the number is smaller than the current size, the extra",
5506 "  elements are discarded; if it is larger, new empty elements are added.",
5507 " ",
5508 "ARRAY COPY array1 array2",
5509 "  Copies array1 to array2.  If array2 has not been declared, it is created",
5510 "  automatically.  If it array2 does exist, array1 is copied INTO it, as",
5511 "  much as will fit.  Range specifiers may be given on one or both arrays.",
5512 " ",
5513 "ARRAY LINK array1 arra2",
5514 "  Makes array1 a link to array2.",
5515 " ",
5516 "[ ARRAY ] SORT [ switches ] array-name [ array2 ]",
5517 "  Sorts the given array lexically according to the switches.  Element 0 of",
5518 "  the array is excluded from sorting by default.  The ARRAY keyword is",
5519 "  optional.  If a second array name is given, that array is sorted according",
5520 "  to the first one.  Switches:",
5521 " ",
5522 "  /CASE:{ON,OFF}",
5523 "    If ON, alphabetic case matters; if OFF it is ignored.  If this switch is",
5524 "    omitted, the current SET CASE setting applies.",
5525 " ",
5526 "  /KEY:number",
5527 "    \
5528 Position (1-based column number) at which comparisons begin, 1 by default.",
5529 " ",
5530 "  /NUMERIC",
5531 "    Specifies a numeric rather than lexical sort.",
5532 " ",
5533 "  /RANGE:low[:high]",
5534 "    The range of elements, low through high, to be sorted.  If this switch",
5535 "    is not given, elements 1 through the dimensioned size are sorted.  If",
5536 "    :high is omitted, the dimensioned size is used.  To include element 0 in",
5537 "    a sort, use /RANGE:0 (to sort the whole array) or /RANGE:0:n (to sort",
5538 "    elements 0 through n).  You can use a range specifier in the array name",
5539 "    instead of the /RANGE switch.",
5540 " ",
5541 "  /REVERSE",
5542 "    Sort in reverse order.  If this switch is not given, the array is sorted",
5543 "    in ascending order.",
5544 " ",
5545 "Various functions are available for array operations; see HELP FUNCTION for",
5546 "details.  These include \\fdimension(), \\farraylook(), \\ffiles(), \
5547 \\fsplit(),",
5548 "and many more.",
5549 ""};
5550 #endif /* NOSPL */
5551 
5552 #ifdef ZCOPY
5553 static char * hmxxcpy[] = {
5554 "Syntax: COPY [ switches ] file1 file2",
5555 "  Copies the source file (file1) to the destination file (file2).  If file2",
5556 "  is a directory, file1 can contain wildcards to denote a group of files to",
5557 "  be copied to the given directory.  Switches:",
5558 " ",
5559 "  /LIST",
5560 "    Print the filenames and status while copying.  Synonyms: /LOG, /VERBOSE.",
5561 " ",
5562 "  /NOLIST",
5563 "    Copy silently (default). Synonyms: /NOLOG, /QUIET.",
5564 " ",
5565 "  /PRESERVE",
5566 "    Copy timestamp and permissions from source file to destination file.",
5567 " ",
5568 "  /OVERWRITE:{ALWAYS,NEVER,NEWER,OLDER}",
5569 "    When copying from one directory to another, this tells what to do when",
5570 "    the destination file already exists: overwrite it always; never; only if",
5571 "    the source file is newer; or only if the source file is older.",
5572 " ",
5573 "  /APPEND",
5574 "    Append the source file to the destination file.  In this case the source",
5575 "    file specification can contain wildcards, and all the matching source",
5576 "    files are appended, one after the other in alphabetical order by name,",
5577 "    to the destination file.",
5578 " ",
5579 "  /SWAP-BYTES",
5580 "    Swap bytes while copying (e.g. for converting between Big-Endian and",
5581 "    Little-Endian binary data formats).",
5582 #ifndef NOSPL
5583 " ",
5584 "  /FROMB64",
5585 "    Convert from Base64 encoding while copying.",
5586 " ",
5587 "  /TOB64",
5588 "    Convert to Base64 encoding while copying.",
5589 #endif /* NOSPL */
5590 ""
5591 };
5592 #endif /* ZCOPY */
5593 
5594 #ifndef NOFRILLS
5595 static char * hmxxren[] = {
5596 #ifdef LOCUS
5597 "  If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
5598 "  this command is equivalent to REMOTE RENAME (RREN).  Otherwise:",
5599 " ",
5600 #endif /* LOCUS */
5601 #ifndef OLDMOVE
5602 "Syntax: RENAME or MOVE or MV [ switches ] name1 [ name2 ]",
5603 #else
5604 "Syntax: RENAME or MV [ switches ] name1 [ name2 ]",
5605 #endif /* OLDMOVE */
5606 "  Renames the source file (name1) to the target name2.  If name2 is a",
5607 "  directory, name1 is allowed to contain wildcards, and the file(s) matching",
5608 "  name1 are moved to directory name2, subject to rules of the underlying",
5609 "  operating system regarding renaming across disk boundaries, etc. Switches:",
5610 " ",
5611 "  /LIST",
5612 "    Print the filenames and status while renaming.  Synonyms: /LOG, /VERBOSE",
5613 " ",
5614 "  /NOLIST",
5615 "    Rename silently (default). Synonyms: /NOLOG, /QUIET",
5616 " ",
5617 "  /COLLISION:{FAIL,SKIP,OVERWRITE}",
5618 "    Tells what to do if a file with the given (or derived) new name already",
5619 "    exists: fail (and stop without renaming any files); skip this file",
5620 "    without renaming it and go on to the next one, if any; or overwrite (the",
5621 "    existing file).  PROCEED is a synonym for SKIP.",
5622 " ",
5623 "  /SIMULATE",
5624 "    Show what the effects of the RENAME command would be without actually",
5625 "    renaming any files.",
5626 " ",
5627 "  When any of the following switches is given, name2 must either be the",
5628 "  the name of a directory, or else omitted, and name1 is allowed to contain",
5629 "  contain wildcards, allowing multiple files to be renamed at once. If name2",
5630 "  is given, then all files matching name1 are moved to the name2 directory",
5631 "  after being renamed.",
5632 " ",
5633 "  /LOWER:{ALL,UPPER}",
5634 "    Converts letters in the filename to lowercase.  ALL means to convert",
5635 "    all matching filenames, UPPER means to convert only those filenames",
5636 "    that contain no lowercase letters.  The switch argument can be omitted,",
5637 "    in which case ALL filenames are converted.",
5638 " ",
5639 "  /UPPER:{ALL,LOWER}",
5640 "    Converts letters in the filename to uppercase.  ALL means to convert",
5641 "    all matching filenames, LOWER means to convert only those filenames",
5642 "    that contain no uppercase letters.  As with /LOWER, ALL is the default",
5643 "    switch argument.",
5644 " ",
5645 "  /FIXSPACES:s",
5646 "    Replaces all spaces in each matching filename by the string s, which may",
5647 "    be empty, a single character, or a string of characters.  The default",
5648 "    replacement (if no argument is given) is underscore (_).",
5649 " ",
5650 "  /REPLACE:{{string1}{string2}{options}}",
5651 "    Replaces all or selected occurrences of string1 with string2 in the",
5652 "    matching filenames.  The braces are part of the command.  The options",
5653 "    string can contain the following characters:",
5654 "     A: String matching is case-sensitive.",
5655 "     a: String matching is case-insensitive.",
5656 "     ^: String matching is anchored to the beginning of the filename.",
5657 "     $: String matching is anchored to the end of the filename.",
5658 "     1: Only the first occurrence of the string (if any) will be changed.",
5659 "     2: Only the second occurrence, and so on for all digits up to 9.",
5660 "     -: (before a digit) Occurrences are counted from the right.",
5661 "     ~: (before occurrence) All occurences BUT the one given are changed.",
5662 " ",
5663 "  /CONVERT:cset1:cset1",
5664 "    Converts each matching filename from character-set 1 to character-set 2.",
5665 "    Character sets are the same as for SET FILE CHARACTER-SET.",
5666 " ",
5667 "  Global values for /LIST and COLLISION can be set with SET RENAME and",
5668 "  displayed with SHOW RENAME.",
5669 ""
5670 };
5671 #endif /* NOFRILLS */
5672 
5673 static char *
5674 cmdlhlp[] = {
5675 "Command-line options are given after the program name in the system",
5676 "command that you use to start Kermit.  Example:",
5677 " ",
5678 " kermit -i -s oofa.exe",
5679 " ",
5680 "tells Kermit to send (-s) the file oofa.exe in binary (-i) mode.",
5681 " ",
5682 "Command-line options are case-sensitive; \"-s\" is different from \"-S\".",
5683 #ifdef VMS
5684 "In VMS, uppercase options must be enclosed in doublequotes: ",
5685 " ",
5686 " $ kermit \"-Y\" \"-S\" -s oofa.txt ",
5687 #endif /* VMS */
5688 " ",
5689 "If any \"action options\" are included on the command line, Kermit exits",
5690 "after executing its command-line options.  If -S is included, or no action",
5691 "options were given, Kermit enters its interactive command parser and",
5692 "issues its prompt.",
5693 " ",
5694 "Command-line options are single characters preceded by dash (-).  Some",
5695 "require an \"argument,\" others do not.  If an argument contains spaces, it",
5696 "must be enclosed in doublequotes:",
5697 " ",
5698 " kermit -s \"filename with spaces\"",
5699 " ",
5700 "\
5701 An option that does not require an argument can be bundled with other options:"
5702 ,
5703 " ",
5704 " kermit -Qis oofa.exe",
5705 " ",
5706 "Exceptions to the rules:",
5707 " ",
5708 " . If the first command-line option is a filename, Kermit executes commands",
5709 "   from the file.  Additional command-line options can follow the filename.",
5710 " ",
5711 " . The special option \"=\" (equal sign) or \"--\" (double hyphen) means to",
5712 "   treat the rest of the command line as data, rather than commands; this",
5713 "   data is placed in the argument vector array, \\&@[], along with the other",
5714 "   items on the command line, and also in the top-level \\%1..\\%9 variables."
5715 ,
5716 " ",
5717 #ifdef KERBANG
5718 " . A similar option \"+\" (plus sign) means: the name of a Kermit script",
5719 "   file follows.  This file is to be executed, and its name assigned to \\%0",
5720 "   and \\&_[0].  All subsequent command-line arguments are to be ignored by",
5721 "   Kermit but made available to the script as \\%1, \\%2, ..., as well as",
5722 "   in the argument-vector arrays.  The initialization file is not executed",
5723 "   automatically in this case.",
5724 " ",
5725 #endif /* KERBANG */
5726 " . The -s option can accept multiple filenames, separated by spaces.",
5727 " ",
5728 " . the -j and -J options allow an optional second argument, the TCP port",
5729 "   name or number.",
5730 " ",
5731 "Type \"help options all\" to list all the command-line options.",
5732 "Type \"help option x\" to see the help message for option x.",
5733 " ",
5734 "Kermit also offers a selection of \"extended command-line\" options.",
5735 "These begin with two dashes, followed by a keyword, and then, if the option",
5736 "has arguments, a colon (:) or equal sign (=) followed by the argument.",
5737 "Unlike single-letter options, extended option keywords aren't case sensitive",
5738 "and they can be abbreviated to any length that still distinguishes them from",
5739 "other extended-option keywords.  Example:",
5740 " ",
5741 "  kermit --banner:oofa.txt",
5742 " ",
5743 "which designates the file oofa.txt to be printed upon startup, rather than",
5744 "the built-in banner (greeting) text.  To obtain a list of available",
5745 "extended options, type \"help extended-options ?\".  To get help about all",
5746 "extended options, type \"help extended-options\".  To get help about a",
5747 "particular extended option, type \"help extended-option xxx\", where \"xxx\"",
5748 "is the option keyword.",
5749 #ifdef COMMENT
5750 #ifndef NOIKSD
5751 " ",
5752 "At present, most of the extended options apply only to the Internet Kermit",
5753 "Service Daemon (IKSD).  Type \"help iksd\" for details.",
5754 #endif /* NOIKSD */
5755 #endif /* COMMENT */
5756 ""
5757 };
5758 
5759 
5760 #ifndef NOHELP
5761 #ifndef NOCMDL
5762 int
doxopts()5763 doxopts() {
5764     extern char * xopthlp[], * xarghlp[];
5765     extern struct keytab xargtab[];
5766     extern int nxargs;
5767     int i, x, y, n = 0;
5768 #ifdef CK_TTGWSIZ
5769 #ifdef OS2
5770     ttgcwsz();
5771 #else /* OS2 */
5772     /* Check whether window size changed */
5773     if (ttgwsiz() > 0) {
5774         if (tt_rows > 0 && tt_cols > 0) {
5775             cmd_rows = tt_rows;
5776             cmd_cols = tt_cols;
5777         }
5778     }
5779 #endif /* OS2 */
5780 #endif /* CK_TTGWSIZ */
5781     y = cmkey(xargtab,
5782               nxargs,
5783               "Extended argument without the \"--\" prefix",
5784               "",
5785               xxstring
5786               );
5787     if (y == -3) {
5788 	printf("\n");
5789         if ((x = cmcfm()) < 0)
5790 	  return(x);
5791         for (i = 0; i <= XA_MAX; i++) {
5792             if (xopthlp[i]) {
5793                 printf("%s\n",xopthlp[i]);
5794                 printf("   %s\n",xarghlp[i]);
5795                 printf("\n");
5796                 n += 3;
5797                 if (n > (cmd_rows - 6)) {
5798                     if (!askmore())
5799                       return(0);
5800                     else
5801                       n = 0;
5802                 }
5803             }
5804         }
5805         return(1);
5806     } else if (y < 0)
5807       return(y);
5808     if ((x = cmcfm()) < 0)
5809       return(x);
5810     printf("\n%s\n",xopthlp[y]);
5811     printf("   %s\n\n",xarghlp[y]);
5812     return(1);
5813 }
5814 
5815 int
dohopts()5816 dohopts() {
5817     int i, n, x, y, z, all = 0, msg = 0;
5818     char *s;
5819     extern char *opthlp[], *arghlp[];
5820     extern char * xopthlp[], * xarghlp[];
5821     extern int optact[];
5822     if ((x = cmtxt("A command-line option character,\n\
5823 or the word ALL, or carriage return for an overview",
5824                    "", &s, xxstring)) < 0)
5825       return(x);
5826     if (!*s)
5827       msg = 1;
5828     else if (!strcmp(s,"all") || (!strcmp(s,"ALL")))
5829       all = 1;
5830     else if (*s == '-')                 /* Be tolerant of leading hyphen */
5831       s++;
5832     if (!all && (int)strlen(s) > 1) {
5833         printf("?A single character, please, or carriage to list them all.\n");
5834         return(-9);
5835     }
5836     if (all) {
5837         y = 33;
5838         z = 127;
5839     } else {
5840         y = *s;
5841         z = (y == 0) ? 127 : y;
5842         if (y == 0) y = 33;
5843     }
5844 #ifdef CK_TTGWSIZ
5845 #ifdef OS2
5846     ttgcwsz();
5847 #else /* OS2 */
5848     /* Check whether window size changed */
5849     if (ttgwsiz() > 0) {
5850         if (tt_rows > 0 && tt_cols > 0) {
5851             cmd_rows = tt_rows;
5852             cmd_cols = tt_cols;
5853         }
5854     }
5855 #endif /* OS2 */
5856 #endif /* CK_TTGWSIZ */
5857     printf("\n");
5858     for (i = 0, n = 1; msg != 0 && *cmdlhlp[i]; i++) {
5859         printf("%s\n",cmdlhlp[i]);
5860         if (++n > (cmd_rows - 3)) {
5861            if (!askmore())
5862              return(0);
5863            else
5864              n = 0;
5865         }
5866     }
5867     if (all) {
5868         printf("The following command-line options are available:\n\n");
5869         n += 2;
5870     }
5871     for (i = y; msg == 0 && i <= z; i++) {
5872         if (!opthlp[i])
5873           continue;
5874         if (arghlp[i]) {                /* Option with arg */
5875             printf(" -%c <arg>%s\n",(char)i,(optact[i]?" (action option)":""));
5876 
5877             printf("     %s\n",opthlp[i]);
5878             printf("     Argument: %s\n\n",arghlp[i]);
5879             x = 4;
5880         } else {                        /* Option without arg */
5881             printf(" -%c  %s%s\n",
5882                    (char)i, opthlp[i],
5883                    (optact[i]?" (action option)":"")
5884                   );
5885             printf("     Argument: (none)\n\n");
5886             x = 3;
5887         }
5888         n += x;
5889         if (n > (cmd_rows - x - 1)) {
5890             if (!askmore())
5891               return(0);
5892            else
5893               n = 0;
5894         }
5895     }
5896     if (all) {				/* Jeff, Jan 2003 */
5897         printf("\n");
5898         if (++n >= cmd_rows) {
5899             if (!askmore())
5900               return(0);
5901 	    else
5902               n = 0;
5903         }
5904         printf("The following extended options are available:\n");
5905         if (++n >= cmd_rows) {
5906             if (!askmore())
5907               return(0);
5908 	    else
5909               n = 0;
5910         }
5911         printf("\n");
5912         if (++n >= cmd_rows) {
5913             if (!askmore())
5914               return(0);
5915 	    else
5916               n = 0;
5917         }
5918         for (i = 0; i <= XA_MAX; i++) {
5919             if (xopthlp[i]) {
5920                 printf("%s\n",xopthlp[i]);
5921                 printf("   %s\n",xarghlp[i]);
5922                 printf("\n");
5923                 n += 3;
5924                 if (n > (cmd_rows - 4)) {
5925                     if (!askmore())
5926 		      return(0);
5927                     else
5928 		      n = 0;
5929                 }
5930             }
5931         }
5932     }
5933     return(1);
5934 }
5935 #endif /* NOCMDL */
5936 #endif /* NOHELP */
5937 
5938 #ifdef CKCHANNELIO
5939 static char * hxxfile[] = {
5940 "Syntax: FILE <subcommand> [ switches ] <channel> [ <data> ]",
5941 "  Opens, closes, reads, writes, and manages local files.",
5942 " ",
5943 "The FILE commands are:",
5944 " ",
5945 "  FILE OPEN   (or FOPEN)   -- Open a local file.",
5946 "  FILE CLOSE  (or FCLOSE)  -- Close an open file.",
5947 "  FILE READ   (or FREAD)   -- Read data from an open file.",
5948 "  FILE WRITE  (or FWRITE)  -- Write data to an open file.",
5949 "  FILE LIST   (or FLIST)   -- List open files.",
5950 "  FILE STATUS (or FSTATUS) -- Show status of a channel.",
5951 "  FILE REWIND (or FREWIND) -- Rewind an open file",
5952 "  FILE COUNT  (or FCOUNT)  -- Count lines or bytes in an open file",
5953 "  FILE SEEK   (or FSEEK)   -- Seek to specified spot in an open file.",
5954 "  FILE FLUSH  (or FFLUSH)  -- Flush output buffers for an open file.",
5955 " ",
5956 "Type HELP FILE OPEN or HELP FOPEN for details about FILE OPEN;",
5957 "type HELP FILE CLOSE or HELP FCLOSE for details about FILE CLOSE, and so on.",
5958 " ",
5959 "The following variables are related to the FILE command:",
5960 " ",
5961 "  \\v(f_max)     -- Maximum number of files that can be open at once",
5962 "  \\v(f_error)   -- Completion code of most recent FILE command or function",
5963 "  \\v(f_count)   -- Result of most recent FILE COUNT command",
5964 " ",
5965 "The following functions are related to the FILE command:",
5966 " ",
5967 "  \\F_eof()      -- Check if channel is at EOF",
5968 "  \\F_pos()      -- Get channel read/write position (byte number)",
5969 "  \\F_line()     -- Get channel read/write position (line number)",
5970 "  \\F_handle()   -- Get file handle",
5971 "  \\F_status()   -- Get channel status",
5972 "  \\F_getchar()  -- Read character",
5973 "  \\F_getline()  -- Read line",
5974 "  \\F_getblock() -- Read block",
5975 "  \\F_putchar()  -- Write character",
5976 "  \\F_putline()  -- Write line",
5977 "  \\F_putblock() -- Write block",
5978 "  \\F_errmsg()   -- Error message from most recent FILE command or function",
5979 " ",
5980 "Type HELP <function-name> for information about each one.",
5981 ""
5982 };
5983 
5984 static char * hxxf_op[] = {
5985 "Syntax: FILE OPEN [ switches ] <variable> <filename>",
5986 "  Opens the file indicated by <filename> in the mode indicated by the",
5987 "  switches, if any, or if no switches are included, in read-only mode, and",
5988 "  assigns a channel number for the file to the given variable.",
5989 "  Synonym: FOPEN.  Switches:",
5990 " ",
5991 "/READ",
5992 "  Open the file for reading.",
5993 " ",
5994 
5995 #ifdef UNIX
5996 "/STDIN",
5997 "  Tells Kermit to read from Standard Input.  In this case you don't specify",
5998 "  a filename.",
5999 " ",
6000 "/STDOUT",
6001 "  Tells Kermit to write to Standard Output.  In this case you don't specify",
6002 "  a filename.",
6003 " ",
6004 "/STDERR",
6005 "  Tells Kermit to write to Standard Error.  In this case you don't specify",
6006 "  a filename.",
6007 " ",
6008 #endif  /* UNIX */
6009 
6010 "/WRITE",
6011 "  Open the file for writing.  If /READ was not also specified, this creates",
6012 "  a new file.  If /READ was specified, the existing file is preserved, but",
6013 "  writing is allowed.  In both cases, the read/write pointer is initially",
6014 "  at the beginning of the file.",
6015 " ",
6016 "/APPEND",
6017 "  If the file does not exist, create a new file and open it for writing.",
6018 "  If the file exists, open it for writing, but with the write pointer",
6019 "  positioned at the end.",
6020 " ",
6021 "/BINARY",
6022 #ifdef VMS
6023 "  Opens the file in binary mode to inhibit end-of-line conversions.",
6024 #else
6025 #ifdef OS2
6026 "  Opens the file in binary mode to inhibit end-of-line conversions.",
6027 #else
6028 #ifdef UNIX
6029 "  This option is ignored in UNIX.",
6030 #else
6031 "  This option is ignored on this platform.",
6032 #endif /* UNIX */
6033 #endif /* OS2 */
6034 #endif /* VMS */
6035 " ",
6036 "Switches can be combined in an way that makes sense and is supported by the",
6037 "underlying operating system.",
6038 ""
6039 };
6040 
6041 static char * hxxf_cl[] = {
6042 "Syntax: FILE CLOSE <channel>",
6043 "  Closes the file on the given channel if it was open.",
6044 "  Also see HELP FILE OPEN.  Synonym: FCLOSE.",
6045 ""
6046 };
6047 
6048 static char * hxxf_fl[] = {
6049 "Syntax: FILE FLUSH <channel>",
6050 "  Flushes output buffers on the given channel if it was open, forcing",
6051 "  all material previously written to be committed to disk.  Synonym: FFLUSH.",
6052 "  Also available as \\F_flush().",
6053 ""
6054 };
6055 
6056 static char * hxxf_li[] = {
6057 "Syntax: FILE LIST",
6058 "  Lists the channel number, name, modes, and position of each file opened",
6059 "  with FILE OPEN.  Synonym: FLIST.",
6060 ""
6061 };
6062 
6063 static char * hxxf_re[] = {
6064 "Syntax: FILE READ [ switches ] <channel> [ <variable> ]",
6065 "  Reads data from the file on the given channel number into the <variable>,",
6066 "  if one was given; if no variable was given, the result is printed on",
6067 "  the screen.  The variable should be a macro name rather than a \\%x",
6068 "  variable or array element if you want backslash characters in the file to",
6069 "  be taken literally.  Synonym: FREAD.  Switches:",
6070 " ",
6071 "/LINE",
6072 "  Specifies that a line of text is to be read.  A line is defined according",
6073 "  to the underlying operating system's text-file format.  For example, in",
6074 "  UNIX a line is a sequence of characters up to and including a linefeed.",
6075 "  The line terminator (if any) is removed before assigning the text to the",
6076 "  variable.  If no switches are included with the FILE READ command, /LINE",
6077 "  is assumed.",
6078 " ",
6079 "/SIZE:number",
6080 "  Specifies that the given number of bytes (characters) is to be read.",
6081 "  This gives a semblance of \"record i/o\" for files that do not necessarily",
6082 "  contain lines.  The resulting block of characters is assigned to the",
6083 "  variable without any editing.",
6084 " ",
6085 "/CHARACTER",
6086 "  Equivalent to /SIZE:1.  If FILE READ /CHAR succeeds but the <variable> is",
6087 "  empty, this indicates a NUL byte was read.",
6088 " ",
6089 "/TRIM",
6090 "  Tells Kermit to trim trailing whitespace when used with /LINE.  Ignored",
6091 "  if used with /CHAR or /SIZE.",
6092 " ",
6093 "/UNTABIFY",
6094 "  Tells Kermit to convert tabs to spaces (assuming tabs set every 8 spaces)",
6095 "  when used with /LINE.  Ignored if used with /CHAR or /SIZE.",
6096 " ",
6097 "Synonym: FREAD.",
6098 "Also available as \\F_getchar(), \\F_getline(), \\F_getblock().",
6099 ""
6100 };
6101 
6102 static char * hxxf_rw[] = {
6103 "Syntax: FILE REWIND <channel>",
6104 "  If the channel is open, moves the read/write pointer to the beginning of",
6105 "  the file.  Equivalent to FILE SEEK <channel> 0.  Synonym: FREWIND.",
6106 "  Also available as \\F_rewind().",
6107 ""
6108 };
6109 
6110 static char * hxxf_se[] = {
6111 "Syntax: FILE SEEK [ switches ] <channel> { [{+,-}]<number>, EOF }",
6112 "  Switches are /BYTE, /LINE, /RELATIVE, /ABSOLUTE, and /FIND:pattern.",
6113 "  Moves the file pointer for this file to the given position in the",
6114 "  file.  Subsequent FILE READs or WRITEs will take place at that position.",
6115 "  If neither the /RELATIVE nor /ABSOLUTE switch is given, an unsigned",
6116 "  <number> is absolute; a signed number is relative.  EOF means to move to",
6117 "  the end of the file.  If a /FIND: switch is included, Kermit seeks to the",
6118 "  specified spot (e.g. 0 for the beginning) and then begins searching line",
6119 "  by line for the first line that matches the given pattern.  To start",
6120 "  searching from the current file position specify a line number of +0.",
6121 "  To start searching from the line after the current one, use +1 (etc).",
6122 "  Synonym: FSEEK.",
6123 ""
6124 };
6125 
6126 static char * hxxf_st[] = {
6127 "Syntax: FILE STATUS <channel>",
6128 "  If the channel is open, this command shows the name of the file, the",
6129 "  switches it was opened with, and the current read/write position.",
6130 "  Synonym: FSTATUS",
6131 ""
6132 };
6133 
6134 static char * hxxf_co[] = {
6135 "Syntax: FILE COUNT [ { /BYTES, /LINES, /LIST, /NOLIST } ] <channel>",
6136 "  If the channel is open, this command prints the nubmer of bytes (default)",
6137 "  or lines in the file if at top level or if /LIST is included; if /NOLIST",
6138 "  is given, the result is not printed.  In all cases the result is assigned",
6139 "  to \\v(f_count).  Synonym: FCOUNT",
6140 ""
6141 };
6142 
6143 static char * hxxf_wr[] = {
6144 "FILE WRITE [ switches ] <channel> <text>",
6145 "  Writes the given text to the file on the given channel number.  The <text>",
6146 "  can be literal text or a variable, or any combination.  If the text might",
6147 "  contain leading or trailing spaces, it must be enclosed in braces if you",
6148 "  want to preserve them.  Synonym: FWRITE.  Switches:",
6149 " ",
6150 "/LINE",
6151 "  Specifies that an appropriate line terminator is to be added to the",
6152 "  end of the <text>.  If no switches are included, /LINE is assumed.",
6153 " ",
6154 "/SIZE:number",
6155 "  Specifies that the given number of bytes (characters) is to be written.",
6156 "  If the given <text> is longer than the requested size, it is truncated;",
6157 "  if is shorter, it is padded according /LPAD and /RPAD switches.  Synonym:",
6158 "  /BLOCK.",
6159 " ",
6160 "/LPAD[:value]",
6161 "  If /SIZE was given, but the <text> is shorter than the requested size,",
6162 "  the text is padded on the left with sufficient copies of the character",
6163 "  whose ASCII value is given to write the given length.  If no value is",
6164 "  specified, 32 (the code for Space) is used.  The value can also be 0 to",
6165 "  write the indicated number of NUL bytes.  If /SIZE was not given, this",
6166 "  switch is ignored.",
6167 " ",
6168 "/RPAD[:value]",
6169 "  Like LPAD, but pads on the right.",
6170 " ",
6171 "/STRING",
6172 "  Specifies that the <text> is to be written as-is, with no terminator added."
6173 ,
6174 " ",
6175 "/CHARACTER",
6176 "  Specifies that one character should be written.  If the <text> is empty or",
6177 "  not given, a NUL character is written; otherwise the first character of",
6178 "  <text> is given.",
6179 " ",
6180 "Synonym FWRITE.",
6181 "Also available as \\F_putchar(), \\F_putline(), \\F_putblock().",
6182 ""
6183 };
6184 
6185 static int
dohfile(cx)6186 dohfile(cx) int cx; {
6187     extern struct keytab fctab[];
6188     extern int nfctab;
6189     int x;
6190     if (cx == XXFILE) {                 /* FILE command was given */
6191         /* Get subcommand */
6192         if ((cx = cmkey(fctab,nfctab,"Operation","",xxstring)) < 0) {
6193             if (cx == -3) {
6194                 if ((x = cmcfm()) < 0)
6195                   return(x);
6196                 cx = XXFILE;
6197             } else
6198               return(cx);
6199         }
6200         if ((x = cmcfm()) < 0)
6201           return(x);
6202         switch (cx) {
6203           case FIL_CLS: cx = XXF_CL; break;
6204           case FIL_FLU: cx = XXF_FL; break;
6205           case FIL_LIS: cx = XXF_LI; break;
6206           case FIL_OPN: cx = XXF_OP; break;
6207           case FIL_REA: cx = XXF_RE; break;
6208           case FIL_REW: cx = XXF_RW; break;
6209           case FIL_SEE: cx = XXF_SE; break;
6210           case FIL_STA: cx = XXF_ST; break;
6211           case FIL_WRI: cx = XXF_WR; break;
6212           case FIL_COU: cx = XXF_CO; break;
6213         }
6214     }
6215     switch (cx) {
6216       case XXFILE: return(hmsga(hxxfile));
6217       case XXF_CL: return(hmsga(hxxf_cl));
6218       case XXF_FL: return(hmsga(hxxf_fl));
6219       case XXF_LI: return(hmsga(hxxf_li));
6220       case XXF_OP: return(hmsga(hxxf_op));
6221       case XXF_RE: return(hmsga(hxxf_re));
6222       case XXF_RW: return(hmsga(hxxf_rw));
6223       case XXF_SE: return(hmsga(hxxf_se));
6224       case XXF_ST: return(hmsga(hxxf_st));
6225       case XXF_WR: return(hmsga(hxxf_wr));
6226       case XXF_CO: return(hmsga(hxxf_co));
6227       default:
6228         return(-2);
6229     }
6230 }
6231 #endif /* CKCHANNELIO */
6232 
6233 int
dohlp(xx)6234 dohlp(xx) int xx; {
6235     int x,y;
6236 
6237     debug(F101,"DOHELP xx","",xx);
6238     if (xx < 0) return(xx);
6239 
6240 #ifdef NOHELP
6241     if ((x = cmcfm()) < 0)
6242       return(x);
6243     printf("\n%s, Copyright (C) 1985, %s,",versio, ck_cryear);
6244 #ifndef NOIKSD
6245     if (inserver)
6246       return(hmsga(tophlpi));
6247     else
6248 #endif /* IKSD */
6249       return(hmsga(tophlp));
6250 
6251 #else /* help is available */
6252 
6253     if (helpfile)
6254       return(dotype(helpfile,xaskmore,0,0,NULL,0,NULL,0,0,NULL,0));
6255 
6256 #ifdef CKCHANNELIO
6257     if (xx == XXFILE)
6258       return(dohfile(xx));
6259     else if (xx == XXF_RE || xx == XXF_WR || xx == XXF_OP ||
6260              xx == XXF_CL || xx == XXF_SE || xx == XXF_RW ||
6261              xx == XXF_FL || xx == XXF_LI || xx == XXF_ST || xx == XXF_CO)
6262       return(dohfile(xx));
6263 #endif /* CKCHANNELIO */
6264 
6265     switch (xx) {
6266 
6267 #ifndef NOSPL
6268 case XXASS:                             /* ASSIGN */
6269     return(hmsga(hxxass));
6270 
6271 case XXASK:                             /* ASK */
6272 case XXASKQ:                            /* ASKQ */
6273     return(hmsga(hxxask));
6274 
6275 case XXAPC:
6276     return(hmsg("Syntax: APC text\n\
6277   Echoes the text within a VT220/320/420 Application Program Command."));
6278 #endif /* NOSPL */
6279 
6280 #ifndef NOFRILLS
6281 case XXBUG:
6282     return(hmsg("Describes how to get technical support."));
6283 #endif /* NOFRILLS */
6284 
6285 #ifndef NOSPL
6286 case XXBEEP:
6287 #ifdef OS2
6288     return(hmsg("Syntax: BEEP [ { ERROR, INFORMATION, WARNING } ]\n\
6289   Generates a bell according to the current settings.  If SET BELL is set to\n\
6290   \"system-sounds\" then the appropriate System Sound will be generated.\n\
6291   Default is INFORMATION."));
6292 #else /* OS2 */
6293     return(hmsg("Syntax: BEEP\n\
6294 Sends a BEL character to your terminal."));
6295 #endif /* OS2 */
6296 #endif /* NOSPL */
6297 
6298 case XXBYE:                             /* BYE */
6299     return(hmsg(hmxxbye));
6300 
6301 case XXCHK:                             /* check */
6302     return(hmsg("\
6303 Syntax: CHECK name\n\
6304   Checks\
6305   to see if the named feature is included in this version of Kermit.\n\
6306   To list the features you can check, type \"check ?\"."));
6307 
6308 #ifndef NOFRILLS
6309 case XXCLE:                             /* clear */
6310     return(hmsga(hmxxcle));
6311 #endif /* NOFRILLS */
6312 
6313 case XXCLO:                             /* close */
6314     return(hmsga(hmxxclo));
6315 
6316 case XXCOM:                             /* comment */
6317 #ifndef STRATUS /* Can't use # for comments in Stratus VOS */
6318     return(hmsg("\
6319 Syntax: COMMENT text\n\
6320 Example: COMMENT - this is a comment.\n\
6321   Introduces a comment.  Beginning of command line only.  Commands may also\n\
6322   have trailing comments, introduced by ; or #."));
6323 #else
6324     return(hmsg("\
6325 Syntax: COMMENT text\n\
6326 Example: COMMENT - this is a comment.\n\
6327   Introduces a comment.  Beginning of command line only.  Commands may also\n\
6328   have trailing comments, introduced by ; (semicolon)."));
6329 #endif /* STRATUS */
6330 
6331 #ifndef NOLOCAL
6332 case XXCON:                             /* CONNECT */
6333 case XXCQ:                              /* CQ == CONNECT /QUIETLY */
6334     hmsga(hmxxcon);
6335     printf("Your escape character is Ctrl-%c (ASCII %d, %s)\r\n",
6336            ctl(escape), escape, (escape == 127 ? "DEL" : ccntab[escape]));
6337     return(0);
6338 #endif /* NOLOCAL */
6339 
6340 #ifdef ZCOPY
6341 case XXCPY:
6342     return(hmsga(hmxxcpy));
6343 #endif /* ZCOPY */
6344 
6345 #ifdef NT
6346 case XXLINK:
6347 return(hmsg(
6348 "  LINK source destination\n\
6349    creates a hard link to the file specified by source to the filename\n\
6350    specified by destination.  Hard links are only supported on NTFS.\n\
6351    destination can either be a filename or a directory.  source may\n\
6352    contain wildcards if destination is a directory."));
6353 #endif /* NT */
6354 
6355 #ifndef NOFRILLS
6356 case XXLREN:                            /* LRENAME */
6357     return(hmsg(
6358 "  LRENAME is an alias for the RENAME command forcing it to execute\n\
6359   on the local computer.  Also see: RENAME, RRENAME, SET LOCUS."));
6360 
6361 case XXREN:
6362     return(hmsga(hmxxren));
6363 #endif /* NOFRILLS */
6364 
6365 case XXCDUP:                             /* CDUP */
6366 case XXLCDU:
6367     return(hmsg(
6368 "Change working directory to the one just above the current one."));
6369 
6370 case XXLCWD:
6371     return(hmsg(
6372 "  LCD (LCWD) is an alias for the CD (CWD) command forcing it to execute\n\
6373   on the local computer.  Also see: CD, CDUP, RCD, SET LOCUS."));
6374 
6375 case XXCWD:                             /* CD / CWD */
6376     return(hmsga(hmxxcwd));
6377 
6378 #ifndef NOSPL
6379 case XXKCD:
6380     return(hmsga(hmxxkcd));
6381 
6382 case XXARRAY:
6383 case XXDCL:                             /* DECLARE */
6384 case XXSORT:
6385     return(hmsga(hxxdcl));
6386 
6387 case XXDEF:                             /* DEFINE */
6388 #ifndef NOSPL
6389     if (hlptok)                         /* What they actually typed... */
6390       if (hlptok[0] == '.')
6391         return(hmsga(hxxdot));
6392 #endif /* NOSPL */
6393     return(hmsga(hxxdef));
6394 
6395 case XXUNDEF:                           /* UNDEFINE */
6396     return(hmsg("Syntax:  UNDEFINE variable-name\n\
6397   Undefines a macro or variable."));
6398 #endif /* NOSPL */
6399 
6400 case XXMSG:
6401     return(hmsg("Syntax: MESSAGE text-to-print-if-debugging\n\
6402   Prints the given text to stdout if SET DEBUG MESSAGE is ON; prints it\n\
6403   to stderr if SET DEBUG MESSAGE is STDERR; doesn't print it at all if SET\n\
6404   DEBUG MESSAGE is OFF.  Synonym: MSG."));
6405 
6406 case XXXMSG:
6407     return(hmsg("Syntax: XMESSAGE text-to-print-if-debugging\n\
6408   Like MESSAGE, except does not include a line terminator at the end.\n\
6409   Prints the given text to stdout if SET DEBUG MESSAGE is ON; prints it\n\
6410   to stderr if SET DEBUG MESSAGE is STDERR; doesn't print it at all if SET\n\
6411   DEBUG MESSAGE is OFF.  Synonym: XMSG."));
6412 
6413 #ifndef NOFRILLS
6414 case XXLDEL:
6415     return(hmsg(
6416 "  LDELETE is an alias for the DELETE command forcing it to execute\n\
6417   on the local computer.  Also see: DELETE, RDELETE, SET LOCUS."));
6418 
6419 case XXDEL:                             /* delete */
6420     return(hmsga(hmxxdel));
6421 #endif /* NOFRILLS */
6422 
6423 #ifndef NODIAL
6424 case XXDIAL:                            /* DIAL, etc... */
6425     return(hmsga(hxxdial));
6426 
6427 case XXPDIA:                            /* PDIAL */
6428     return(hmsg("Syntax: PDIAL phonenumber\n\
6429   Partially dials a phone number.  Like DIAL but does not wait for carrier\n\
6430   or CONNECT message."));
6431 
6432 case XXRED:
6433     return(hmsg("Redial the number given in the most recent DIAL commnd."));
6434 
6435 case XXANSW:                            /* ANSWER */
6436     return(hmsga(hxxansw));
6437 
6438 case XXLOOK:                            /* LOOKUP number in directory */
6439     return(hmsga(hxxlook));
6440 #endif /* NODIAL */
6441 
6442 case XXLDIR:                            /* LDIRECTORY */
6443     return(hmsg(
6444 "  LDIRIRECTORY is an alias for the DIRECTORY command forcing it to execute\n\
6445   on the local computer.  Also see: DIRECTORY, SET LOCUS, RDIRECTORY."));
6446 
6447 case XXDIR:                             /* DIRECTORY */
6448     return(hmsga(hmxxdir));
6449 
6450 case XXTOUC:				/* TOUCH */
6451     return(hmsga(hmxxtouch));
6452 
6453 case XXCHG:				/* CHANGE */
6454     return(hmsga(hmxxchange));
6455 
6456 case XXWDIR:				/* WDIRECTORY */
6457   return(hmsg("  WDIRECTORY is shorthand for DIRECTORY /SORT:DATE /REVERSE;\n\
6458   it produces a listing in reverse chronological order.  See the DIRECTORY\n\
6459   command for further information."));
6460 
6461 case XXHDIR:				/* HDIRECTORY */
6462   return(hmsg("  HDIRECTORY is shorthand for DIRECTORY /SORT:SIZE /REVERSE;\n\
6463   it produces a listing showing the biggest files first.  See the DIRECTORY\n\
6464   command for further information."));
6465 
6466 case XXLMKD:                            /* LMKDIR */
6467     return(hmsg(
6468 "  LMKDIR is an alias for the MKDIR command forcing it to execute\n\
6469   on the local computer.  Also see: MKDIR, RMKDIR, SET LOCUS."));
6470 
6471 case XXMKDIR:                           /* MKDIR */
6472     return(hmsg("Creates a directory.  Also see LRMDIR, RRMDIR, SET LOCUS."));
6473 
6474 case XXLRMD:                            /* LRMDIR */
6475     return(hmsg(
6476 "  LRMDIR is an alias for the RMDIR command forcing it to execute\n\
6477   on the local computer.  Also see: RMDIR, RRMDIR, SET LOCUS."));
6478 
6479 case XXRMDIR:                           /* RMDIR */
6480     return(hmsg("Removes a directory.  Also see LRMDIR, RRMDIR, SET LOCUS."));
6481 
6482 case XXLS:
6483 #ifdef UNIXOROSK
6484     return(hmsg("Syntax: LS [ args ]\n\
6485   Runs \"ls\" with the given arguments."));
6486 #else
6487     return(hmsga(hmxxdir));
6488 #endif /* UNIXOROSK */
6489 
6490 #ifndef NOSERVER
6491 #ifndef NOFRILLS
6492 case XXDIS:
6493     return(hmsg("Syntax: DISABLE command\n\
6494   Security for the Kermit server.  Prevents the client Kermit program from\n\
6495   executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc."));
6496 #endif /* NOFRILLS */
6497 #endif /* NOSERVER */
6498 
6499 #ifndef NOSPL
6500 case XXDO:                              /* do */
6501     return(hmsg("Syntax: [ DO ] macroname [ arguments ]\n\
6502   Executes a macro that was defined with the DEFINE command.  The word DO\n\
6503   can be omitted.  Trailing argument words, if any, are automatically\n\
6504   assigned to the macro argument variables \\%1 through \\%9."));
6505 #endif /* NOSPL */
6506 
6507 #ifndef NOSPL
6508 case XXDEC:
6509     return(hmsga(hxxdec));
6510 #endif /* NOSPL */
6511 
6512 case XXECH:                             /* echo */
6513     return(hmsg("Syntax: ECHO text\n\
6514   Displays the text on the screen, followed by a line terminator.  The ECHO\n\
6515   text may contain backslash codes.  Example: ECHO \\7Wake up!\\7.  Also see\n\
6516   XECHO and WRITE SCREEN."));
6517 
6518 case XXXECH:                            /* xecho */
6519     return(hmsg("Syntax: XECHO text\n\
6520   Just like ECHO but does not add a line terminator to the text.  See ECHO."));
6521 
6522 case XXVOID:
6523     return(hmsg("Syntax: VOID text\n\
6524   Like ECHO but doesn't print anything; can be used to invoke functions\n\
6525   when you don't need to display or use their results."));
6526 
6527 #ifndef NOSERVER
6528 #ifndef NOFRILLS
6529 case XXENA:
6530     return(hmsg("Syntax: ENABLE capability\n\
6531   For use with server mode.  Allows the client Kermit program access to the\n\
6532   named capability, such as CD, DELETE, RECEIVE, etc.  Opposite of DISABLE."));
6533 #endif /* NOFRILLS */
6534 #endif /* NOSERVER */
6535 
6536 #ifndef NOSPL
6537 case XXEND:                             /* end */
6538     return(hmsg("Syntax: END [ number [ message ] ]\n\
6539   Exits from the current macro or TAKE file, back to wherever invoked from.\n\
6540   Number is return code.  Message, if given, is printed."));
6541 
6542 case XXEVAL:                            /* evaluate */
6543     return(hmsga(hmxxeval));
6544 #endif /* NOSPL */
6545 
6546 #ifndef NOFRILLS
6547 case XXERR:                             /* e-packet */
6548     return(hmsg("Syntax: E-PACKET\n\
6549   Sends an Error packet to the other Kermit."));
6550 #endif /* NOFRILLS */
6551 
6552 case XXEXI:                             /* exit */
6553 case XXQUI:
6554     return(hmsga(hmxxexit));
6555 
6556 case XXFIN:
6557     return(hmsg("Syntax: FINISH\n\
6558   Tells the remote Kermit server to shut down without logging out."));
6559 
6560 #ifndef NOSPL
6561   case XXFOR:
6562     return(hmsga(forhlp));
6563 #endif /* NOSPL */
6564 
6565   case XXGET:
6566     return(hmsga(hmxxget));
6567   case XXMGET:
6568     return(hmsga(hmxxmget));
6569 
6570 #ifndef NOSPL
6571 #ifndef NOFRILLS
6572   case XXGOK:
6573     return(hmsg("Syntax: GETOK [ switches ] prompt\n\
6574   Prints the prompt, makes user type 'yes', 'no', or 'ok', and sets SUCCESS\n\
6575   or FAILURE accordingly.  The optional switches are the same as for ASK."));
6576 #endif /* NOFRILLS */
6577 #endif /* NOSPL */
6578 
6579 #ifndef NOSPL
6580   case XXGOTO:
6581     return(hmsg("Syntax: GOTO label\n\
6582   In a TAKE file or macro, go to the given label.  A label is a word on the\n\
6583   left margin that starts with a colon (:).  Example:\n\n\
6584   :oofa\n\
6585   echo Hello!\n\
6586   goto oofa"));
6587 #endif /* NOSPL */
6588 
6589   case XXHAN:
6590     return(hmsg("Syntax: HANGUP\n\
6591 Hang up the phone or network connection."));
6592 
6593   case XXHLP:
6594 /*
6595   We get confirmation here, even though we do it again in hmsga(), to prevent
6596   the Copyright message from being printed prematurely.  This doesn't do any
6597   harm, because the first call to cmcfm() sets cmflgs to 1, making the second
6598   call return immediately.
6599 */
6600     if ((x = cmcfm()) < 0)
6601       return(x);
6602 
6603     if (helpfile) {
6604         printf("\n%s, Copyright (C) 1985, %s,\n\
6605 Trustees of Columbia University in the City of New York.\n\n",
6606 	       versio,
6607 	       ck_cryear
6608 	       );
6609         return(dotype(helpfile,xaskmore,3,0,NULL,0,NULL,0,0,NULL,0));
6610     } else {
6611         printf("\n%s, Copyright (C) 1985, %s,",versio,ck_cryear);
6612         return(hmsga(tophlp));
6613     }
6614 
6615 case XXINT:
6616     return(hmsg("The INTRO command gives a brief introduction to C-Kermit."));
6617 
6618 #ifndef NOSPL
6619 case XXIF:
6620     return(hmsga(ifhlp));
6621 
6622 case XXINC:
6623     return(hmsga(hxxinc));
6624 
6625 case XXINP:
6626    return(hmsga(hxxinp));
6627 #endif /* NOSPL */
6628 
6629 #ifdef CK_MINPUT
6630 case XXMINP:
6631     return(hmsga(hmxxminp));
6632 #endif /* CK_MINPUT */
6633 
6634 #ifndef NOSPL
6635 case XXREI:
6636     return(hmsg("Syntax: REINPUT n string\n\
6637   Looks for the string in the text that has recently been INPUT, set SUCCESS\n\
6638   or FAILURE accordingly.  Timeout, n, must be specified but is ignored."));
6639 #endif /* NOSPL */
6640 
6641 #ifndef NOSPL
6642 case XXLBL:
6643     return(hmsg("\
6644   Introduces a label, like :loop, for use with GOTO in TAKE files or macros.\n\
6645 See GOTO."));
6646 #endif /* NOSPL */
6647 
6648 case XXLOG:
6649     return(hmsga(hmxxlg));
6650 
6651 #ifndef NOSCRIPT
6652 case XXLOGI:
6653     return(hmsga(hmxxlogi));
6654 #endif
6655 
6656 #ifndef NOFRILLS
6657 case XXMAI:
6658     return(hmsg("Syntax: MAIL filename address\n\
6659   Equivalent to SEND /MAIL:address filename."));
6660 #endif /* NOFRILLS */
6661 
6662 #ifndef NOMSEND
6663 case XXMSE:
6664     return(hmsga(hmxxmse));
6665 
6666 case XXADD:
6667     return(hmsga(hmxxadd));
6668 
6669 case XXMMOVE:
6670     return(hmsg("MMOVE is exactly like MSEND, except each file that is\n\
6671 sent successfully is deleted after it is sent."));
6672 #endif /* NOMSEND */
6673 
6674 #ifndef NOSPL
6675 case XXOPE:
6676     return(hmsga(openhlp));
6677 #endif /* NOSPL */
6678 
6679 case XXNEW:
6680     return(hmsg(
6681 "  Prints news of new features since publication of \"Using C-Kermit\"."));
6682 
6683 case XXUPD:
6684     return(hmsg(
6685 "  New features are described in the online manual,\n\
6686    accessible via the MANUAL command."));
6687 
6688 #ifndef NOSPL
6689 case XXOUT:
6690     return(hmsga(hxxout));
6691 #endif /* NOSPL */
6692 
6693 #ifdef ANYX25
6694 #ifndef IBMX25
6695 case XXPAD:
6696     return(hmsga(hxxpad));
6697 #endif /* IBMX25 */
6698 #endif /* ANYX25 */
6699 
6700 #ifndef NOSPL
6701 case XXPAU:
6702     return(hmsga(hxxpau));
6703 
6704 case XXMSL:
6705     return(hmsga(hxxmsl));
6706 #endif /* NOSPL */
6707 
6708 #ifdef TCPSOCKET
6709 case XXPNG:
6710     return(hmsg("Syntax: PING [ IP-hostname-or-number ]\n\
6711   Checks if the given IP network host is reachable.  Default host is from\n\
6712   most recent SET HOST or TELNET command.  Runs system PING program, if any.")
6713            );
6714 
6715 case XXFTP:
6716 #ifdef SYSFTP
6717     return(hmsg("Syntax: FTP [ IP-hostname-or-number ]\n\
6718   Makes an FTP connection to the given IP host or, if no host specified, to\n\
6719   the current host.  Uses the system's FTP program, if any."));
6720 #else
6721 #ifndef NOFTP
6722     return(doftphlp());
6723 #endif /* NOFTP */
6724 #endif /* SYSFTP */
6725 #endif /* TCPSOCKET */
6726 
6727 #ifndef NOFRILLS
6728 case XXPRI:
6729 #ifdef UNIX
6730     return(hmsg("Syntax: PRINT file [ options ]\n\
6731   Prints the local file on a local printer with the given options.  Also see\n\
6732   HELP SET PRINTER."));
6733 #else
6734 #ifdef VMS
6735     return(hmsg("Syntax: PRINT file [ options ]\n\
6736   Prints the local file on a local printer with the given options.  Also see\n\
6737   HELP SET PRINTER."));
6738 #else
6739     return(hmsg("Syntax: PRINT file\n\
6740   Prints the local file on a local printer.  Also see HELP SET PRINTER."));
6741 #endif /* UNIX */
6742 #endif /* VMS */
6743 #endif /* NOFRILLS */
6744 
6745 case XXPWD:
6746 case XXLPWD:
6747     return(hmsg("Syntax: PWD\n\
6748 Print the name of the current working directory."));
6749 
6750 #ifndef NOSPL
6751 case XXREA:
6752     return(hmsg("Syntax: READ variablename\n\
6753   Reads a line from the currently open READ or !READ file into the variable\n\
6754   (see OPEN)."));
6755 #endif /* NOSPL */
6756 
6757 #ifndef NOXFER
6758 case XXREC:
6759     return(hmsga(hmxxrc));
6760 
6761 case XXREM:
6762     y = cmkey(remcmd,nrmt,"Remote command","",xxstring);
6763     return(dohrmt(y));
6764 #endif /* NOXFER */
6765 
6766 #ifndef NOSPL
6767 case XXRET:
6768     return(hmsg("Syntax: RETURN [ value ]\n\
6769   Return from a macro.  An optional return value can be given for use with\n\
6770   \\fexecute(macro), which allows macros to be used like functions."));
6771 #endif /* NOSPL */
6772 
6773 #ifndef NOXFER
6774 case XXSEN:
6775     return(hmsga(hmxxsen));
6776 #ifdef OLDMOVE
6777 case XXMOVE:
6778     return(hmsg("MOVE is exactly like SEND, except each file that is\n\
6779 sent successfully is deleted after it is sent."));
6780 #endif /* OLDMOVE */
6781 #ifndef NORESEND
6782 case XXRSEN:
6783     return(hmsg(hmxxrsen));
6784 case XXREGET:
6785     return(hmsg(hmxxrget));
6786 case XXPSEN:
6787     return(hmsg(hmxxpsen));
6788 #endif /* NORESEND */
6789 
6790 #ifndef NOSERVER
6791 case XXSER:
6792     return(hmsg(hmxxser));
6793 #endif /* NOSERVER */
6794 #endif /* NOXFER */
6795 
6796 #ifndef NOJC
6797 case XXSUS:
6798     return(hmsg("Syntax: SUSPEND or Z\n\
6799   Suspends Kermit.  Continue Kermit with the appropriate system command,\n\
6800   such as fg."));
6801 #endif /* NOJC */
6802 
6803 case XXSET:
6804     y = cmkey(prmtab,nprm,"Parameter","",xxstring);
6805     debug(F101,"HELP SET y","",y);
6806     return(dohset(y));
6807 
6808 #ifndef NOPUSH
6809 case XXSHE:
6810     if (nopush) {
6811         if ((x = cmcfm()) < 0) return(x);
6812         printf("Sorry, help not available for \"%s\"\n",cmdbuf);
6813         break;
6814     } else
6815        return(hmsga(hxxshe));
6816 #ifdef CK_REDIR
6817 case XXFUN:
6818     return(hmsg("Syntax: REDIRECT command\n\
6819   Runs the given local command with its standard input and output redirected\n\
6820   to the current SET LINE or SET HOST communications path.\n\
6821   Synonym: < (Left angle bracket)."));
6822 #endif /* CK_REDIR */
6823 
6824 #ifdef CK_REXX
6825 case XXREXX:
6826     return(hmsg("Syntax: REXX text\n\
6827   The text is a Rexx command to be executed. The \\v(rexx) variable is set\n\
6828   to the Rexx command's return value.\n\
6829   To execute a rexx program file, use:  REXX call <filename>\n\
6830   Rexx programs may call Kermit functions by placing the Kermit command\n\
6831   in single quotes.  For instance:  'set parity none'."));
6832 #endif /* CK_REXX */
6833 #endif /* NOPUSH */
6834 
6835 #ifndef NOSHOW
6836 case XXSHO:
6837     return(hmsg("\
6838   Display current values of various items (SET parameters, variables, etc).\n\
6839   Type SHOW ? for a list of categories."));
6840 #endif /* NOSHOW */
6841 
6842 case XXSPA:
6843 #ifdef datageneral
6844     return(hmsg("\
6845   Display disk usage in current device, directory,\n\
6846   or return space for a specified device, directory."));
6847 #else
6848     return(hmsg("Syntax: SPACE\n\
6849   Display disk usage in current device and/or directory"));
6850 #endif
6851 
6852 case XXSTA:
6853     return(hmsg("Syntax: STATISTICS [/BRIEF]\n\
6854   Display statistics about most recent file transfer"));
6855 
6856 #ifndef NOSPL
6857 case XXSTO:
6858     return(hmsg("Syntax: STOP [ number [ message ] ]\n\
6859   Stop executing the current macro or TAKE file and return immediately to\n\
6860   the Kermit prompt.  Number is a return code.  Message printed if given."));
6861 #endif /* NOSPL */
6862 
6863 case XXTAK:
6864     return(hmsga(hmxxtak));
6865 
6866 #ifdef TCPSOCKET
6867 #ifdef TNCODE
6868 case XXIKSD:
6869     return(hmsga(hmxxiks));
6870 
6871 case XXTEL:
6872     return(hmsga(hmxxtel));
6873 
6874 case XXTELOP:
6875     return(hmsga(hxtopt));
6876 #endif /* TNCODE */
6877 
6878 #ifdef RLOGCODE
6879 case XXRLOG:
6880     return(hmsg("Syntax: RLOGIN [ switches ] [ host [ username ] ]\n\
6881   Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /RLOGIN,\n\
6882   IF SUCCESS CONNECT.  If host is omitted, the previous connection (if any)\n\
6883   is resumed.  Depending on how Kermit has been built switches may be\n\
6884   available to require Kerberos authentication and DES encryption."));
6885 #endif /* RLOGCODE */
6886 #endif /* TCPSOCKET */
6887 
6888 #ifndef NOXMIT
6889 case XXTRA:
6890     return(hmsga(hxxxmit));
6891 #endif /* NOXMIT */
6892 
6893 #ifndef NOFRILLS
6894 case XXTYP:
6895     return(hmsga(hmxxtyp));
6896 case XXMORE:
6897     return(hmsg("Syntax: MORE [ switches ] filename\n\
6898   Equivalent to TYPE /PAGE filename; see HELP TYPE."));
6899 case XXCAT:
6900     return(hmsg("Syntax: MORE [ switches ] filename\n\
6901   Equivalent to TYPE /NOPAGE filename; see HELP TYPE."));
6902 case XXHEAD:
6903     return(hmsg("Syntax: HEAD [ switches ] filename\n\
6904   Equivalent to TYPE /HEAD filename; see HELP TYPE."));
6905 case XXTAIL:
6906     return(hmsg("Syntax: TAIL [ switches ] filename\n\
6907   Equivalent to TYPE /TAIL filename; see HELP TYPE."));
6908 #endif /* NOFRILLS */
6909 
6910 #ifndef NOSPL
6911 case XXWHI:
6912     return(hmsga(whihlp));
6913 
6914 case XXSWIT:
6915     return(hmsga(swihlp));
6916 #endif /* NOSPL */
6917 
6918 #ifndef NOCSETS
6919 case XXXLA:
6920     return(hmsga(hxxxla));
6921 #endif /* NOCSETS */
6922 
6923 case XXVER:
6924     return(hmsg("Syntax: VERSION\nDisplays the program version number."));
6925 
6926 #ifndef NOSPL
6927 case XXWAI:
6928     return(hmsga(hxxwai));
6929 #endif /* NOSPL */
6930 
6931 #ifndef NOFRILLS
6932 case XXWHO:
6933     return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));
6934 
6935 case XXWRI:
6936     return(hmsga(hxxwri));
6937 
6938 case XXWRL:
6939     return(hmsg(
6940 "WRITE-LINE (WRITELN) is just like WRITE, but includes a line terminator\n\
6941 at the end of text.  See WRITE."));
6942 #endif /* NOFRILLS */
6943 
6944 #ifndef NOSPL
6945 case XXIFX:
6946     return(hmsga(ifxhlp));
6947 
6948 case XXGETC:                            /* GETC */
6949     return(hmsga(hxxgetc));
6950 
6951 case XXFWD:                             /* FORWARD */
6952     return(hmsg(
6953 "Like GOTO, but searches only forward for the label.  See GOTO."));
6954 
6955 case XXLOCAL:                           /* LOCAL */
6956     return(hmsg(
6957 "Declares a variable to be local to the current macro or command file."));
6958 #endif /* NOSPL */
6959 
6960 case XXVIEW:
6961     return(hmsg(
6962 "View the terminal emulation screen even when there is no connection."));
6963 
6964 #ifdef NEWFTP
6965 case XXASC:
6966     return(hmsg(
6967 "Inhibits automatic transfer-mode switching and forces TEXT (ASCII) transfer\n\
6968 mode for all files in both Kermit and FTP protocols."));
6969 case XXBIN:
6970     return(hmsg(
6971 "Inhibits automatic transfer-mode switching and forces BINARY transfer mode\n\
6972 for all files in both Kermit and FTP protocols."));
6973 #else
6974 case XXASC:
6975     return(hmsg(
6976 "Inhibits automatic transfer-mode switching and forces TEXT (ASCII) transfer\n\
6977 mode for all files."));
6978 case XXBIN:
6979     return(hmsg(
6980 "Inhibits automatic transfer-mode switching and forces BINARY transfer mode\n\
6981 for all files."));
6982 #endif	/* NEWFTP */
6983 
6984 case XXDATE:
6985     return(hmsga(hmxxdate));
6986 
6987 case XXRETR:
6988     return(hmsg(
6989 "Just like GET but asks the server to delete each file that has been\n\
6990 sent successfully."));
6991 
6992 case XXEIGHT:
6993     return(hmsg(
6994 "Equivalent to SET PARITY NONE, SET COMMAND BYTE 8, SET TERMINAL BYTE 8."));
6995 
6996 case XXSAVE:
6997     return(hmsga(hmxxsave));
6998 
6999 #ifndef NOFRILLS
7000 #ifndef NOPUSH
7001 case XXEDIT:
7002     return(hmsg("Syntax: EDIT [ <file> ]\n\
7003 Starts your preferred editor on the given file, or if none given, the most\n\
7004 recently edited file, if any.  Also see SET EDITOR."));
7005 #endif /* NOPUSH */
7006 #endif /* NOFRILLS */
7007 
7008 #ifdef BROWSER
7009 case XXBROWS:
7010     return(hmsg("Syntax: BROWSE [ <url> ]\n\
7011 Starts your preferred Web browser on the given URL, or if none given, the\n\
7012 most recently visited URL, if any.  Also see SET BROWSER."));
7013 #endif /* BROWSER */
7014 
7015 #ifdef CK_TAPI
7016 case XXTAPI:
7017     return(hmsga(hxxtapi));
7018 #endif /* CK_TAPI */
7019 
7020 #ifdef PIPESEND
7021 case XXCSEN:
7022     return(hmsg("Syntax: CSEND [ switches ] <command> [ <as-name> ]\n\
7023 Sends from the given <command> rather than from a file.  Equivalent to\n\
7024 SEND /COMMAND; see HELP SEND for details."));
7025 
7026 case XXCREC:
7027     return(hmsg("Syntax: CRECEIVE [ switches ] <command>\n\
7028 Receives to the given <command> rather than to a file.  Equivalent to\n\
7029 RECEIVE /COMMAND; see HELP RECEIVE for details."));
7030 
7031 case XXCGET:
7032     return(hmsg("Syntax: CGET <remote-file-or-command> <local-command>\n\
7033 Equivalent to GET /COMMAND; see HELP GET for details."));
7034 #endif /* PIPESEND */
7035 
7036 #ifndef NOSPL
7037 case XXFUNC:
7038 /*
7039   Tricky parsing.  We want to let them type the function name in any format
7040   at all: \fblah(), \fblah, \\fblah(), fblah, blah, blah(), etc, but of course
7041   only one of these is recognized by cmkey().  So we call cmkeyx() (the "no
7042   complaints" version of cmkey()), and if it fails, we try the other formats
7043   silently, and still allow for <no-name-given>, editing and reparse, etc.
7044 */
7045     y = cmkeyx(fnctab,nfuncs,"Name of function","",NULL);
7046     if (y == -1) {                      /* Reparse needed */
7047         return(y);
7048     } else if (y == -3) {
7049         if ((x = cmcfm()) < 0)          /* For recall buffer... */
7050           return(x);
7051         return(dohfunc(y));             /* -3 gives general message */
7052     }
7053     if (y < 0) {                        /* Something given but didn't match */
7054         int dummy;
7055         char * p;
7056         for (p = atmbuf; *p; p++) {     /* Chop off trailing parens if any */
7057             if (*p == '(') {
7058                 *p = NUL;
7059                 break;
7060             }
7061         }
7062         /* Chop off leading "\\f" or "\f" or "f" */
7063         p = atmbuf;
7064         if (*p == CMDQ)                 /* Allow for \\f... */
7065           p++;
7066         if (*p == CMDQ && (*(p+1) == 'f' || *(p+1) == 'F')) { /* or \f */
7067             p += 2;
7068         } else if (*p == 'f' || *p == 'F') { /* or just f */
7069             p++;
7070         }
7071         y = lookup(fnctab,p,nfuncs,&dummy); /* Look up the result */
7072     }
7073     if (y < 0) {
7074         printf("?No such function - \"%s\"\n",atmbuf);
7075         return(-9);
7076     }
7077     x = cmgbrk();                       /* Find out how user terminated */
7078     if (x == LF || x == CR)             /* if with CR or LF */
7079       cmflgs = 1;                       /* restore cmflgs to say so */
7080     if ((x = cmcfm()) < 0)              /* And THEN confirm so command will */
7081       return(x);                        /* get into recall buffer. */
7082     return(dohfunc(y));
7083 #endif /* NOSPL */
7084 
7085 #ifndef NOCMDL
7086 case XXOPTS:                            /* Command-line options */
7087     return(dohopts());
7088 
7089 case XXXOPTS:                           /* Extended command-line options */
7090     return(doxopts());
7091 #endif /* NOCMDL */
7092 
7093 #ifdef OS2
7094 #ifndef NOKVERBS
7095 case XXKVRB: {
7096     y = cmkeyx(kverbs,nkverbs,"Name of keyboard verb without \\k","",NULL);
7097     if (y == -1) {                      /* Reparse needed */
7098         return(y);
7099     } else if (y == -3) {
7100         if ((x = cmcfm()) < 0)          /* For recall buffer... */
7101           return(x);
7102         return(dohkverb(y));            /* -3 gives general message */
7103     }
7104     if (y < 0) {                        /* Something given but didn't match */
7105         int dummy;
7106         char * p;
7107         for (p = atmbuf; *p; p++) {     /* Chop off trailing parens if any */
7108             if (*p == '(') {
7109                 *p = NUL;
7110                 break;
7111             }
7112         }
7113         /* Chop off leading "\\k" or "\k" or "k" */
7114         p = atmbuf;
7115         if (*p == CMDQ)                 /* Allow for \\k... */
7116           p++;
7117         if (*p == CMDQ && (*(p+1) == 'k' || *(p+1) == 'K')) { /* or \k */
7118             p += 2;
7119         } else if (*p == 'k' || *p == 'K') { /* or just k */
7120             p++;
7121         }
7122         y = lookup(kverbs,p,nkverbs,&dummy); /* Look up the result */
7123     }
7124     if (y < 0) {
7125         printf("?No such function - \"%s\"\n",atmbuf);
7126         return(-9);
7127     }
7128     x = cmgbrk();                       /* Find out how user terminated */
7129     if (x == LF || x == CR)             /* if with CR or LF */
7130       cmflgs = 1;                       /* restore cmflgs to say so */
7131     if ((x = cmcfm()) < 0)              /* And THEN confirm so command will */
7132       return(x);                        /* get into recall buffer. */
7133     return(dohkverb(y));
7134 }
7135 #endif /* NOKVERBS */
7136 #endif /* OS2 */
7137 
7138 case XXKERMI:
7139     return(hmsg("Syntax: KERMIT [command-line-options]\n\
7140   Lets you give command-line options at the prompt or in a script.\n\
7141   HELP OPTIONS for more info."));
7142 
7143 case XXBACK:
7144     return(hmsg("Syntax: BACK\n  Returns to your previous directory."));
7145 
7146 case XXWHERE:
7147     return(hmsg("Syntax: WHERE\n  Tells where your transferred files went."));
7148 
7149 #ifndef NOXFER
7150 case XXREMV:
7151     return(hmsga(hmxxremv));
7152 #endif /* NOXFER */
7153 
7154 #ifdef CK_KERBEROS
7155 case XXAUTH:
7156     return(hmsga(hmxxauth));
7157 #endif /* CK_KERBEROS */
7158 
7159 #ifndef NOHTTP
7160 case XXHTTP:
7161     return(hmsga(hmxxhttp));
7162 #endif /* NOHTTP */
7163 
7164 #ifdef NETCMD
7165 case XXPIPE:
7166     return(hmsg("Syntax: PIPE [ command ]\n\
7167 Makes a connection through the program whose command line is given. Example:\n\
7168 \n pipe rlogin xyzcorp.com"));
7169 #endif /* NETCMD */
7170 
7171 case XXSTATUS:
7172     return(hmsg(
7173 "STATUS is the same as SHOW STATUS; prints SUCCESS or FAILURE for the\n\
7174 previous command."));
7175 
7176 #ifndef NOSPL
7177 case XXASSER:
7178     return(hmsg("Syntax: ASSERT <condition>\n\
7179 Succeeds or fails depending on <condition>; see HELP IF for <condition>s."));
7180 
7181 case XXFAIL:
7182     return(hmsg("Always fails."));
7183 
7184 case XXSUCC:
7185     return(hmsg("Always succeeds."));
7186 #endif /* NOSPL */
7187 
7188 #ifdef CK_LOGIN
7189 case XXLOGOUT:
7190     return(hmsg(
7191 "If you haved logged in to Kermit as an Internet Kermit server, the LOGOUT\n\
7192 command, given at the prompt, logs you out and closes your session."));
7193 #endif /* CK_LOGIN */
7194 
7195 case XXRESET:
7196     return(hmsg("Closes all open files and logs."));
7197 
7198 #ifndef NOCSETS
7199 case XXASSOC:
7200     return(hmsga(hmxxassoc));
7201 #endif /* NOCSETS */
7202 
7203 #ifndef NOSPL
7204 case XXSHIFT:
7205     return(hmsg("Syntax: SHIFT [ n ]\n\
7206   Shifts script command line or macro or TAKE file argument variables\n\
7207   \\%1..9 or \\&_[1..n] n places to the left; default n = 1."));
7208 #endif /* NOSPL */
7209 
7210 #ifndef NOPUSH
7211 case XXMAN:
7212 #ifdef UNIX
7213     return(hmsg("Syntax: MANUAL [ topic ]\n\
7214   Runs the \"man\" command on the given topic (default \"kermit\")."));
7215 #else
7216 #ifdef OS2
7217     return(hmsg("Syntax: MANUAL\n\
7218   Accesses the HTML manual using the current browser."));
7219 #else
7220     return(hmsg("Syntax: MANUAL [ topic ]\n\
7221   Runs the \"help\" command on the given topic (default \"kermit\")."));
7222 #endif /* OS2 */
7223 #endif /* UNIX */
7224 #endif /* NOPUSH */
7225 
7226 case XXWILD:
7227     return(hmsga(hmxxwild));
7228 
7229 #ifdef LOCUS
7230 case XXLOCU:
7231     return(hmsga(hmxylocus));
7232 #endif	/* LOCUS */
7233 
7234 case XXPAT:
7235     return(hmsga(hmxxpat));
7236 
7237 #ifndef NOXFER
7238 case XXFAST:
7239 case XXCAU:
7240 case XXROB:
7241     return(hmsga(hmxxfast));
7242 #endif /* NOXFER */
7243 
7244 #ifdef CKPURGE
7245 case XXPURGE:
7246     return(hmsga(hmxxpurge));
7247 #else
7248 #ifdef VMS
7249 case XXPURGE:
7250     return(hmsga(hmxxpurge));
7251 #endif /* VMS */
7252 #endif /* CKPURGE */
7253 
7254 #ifndef NOXFER
7255   case XXRASG:
7256     return(hmsg("  RASG and RASSIGN are short forms of REMOTE ASSIGN."));
7257   case XXRCWD:
7258     return(hmsg("  RCD and RCWD are short forms of REMOTE CD."));
7259   case XXRCPY:
7260     return(hmsg("  RCOPY is a short form of REMOTE COPY."));
7261   case XXRDEL:
7262     return(hmsg("  RDELETE is a short form of REMOTE RELETE."));
7263   case XXRDIR:
7264     return(hmsg("  RDIRECTORY is a short form of REMOTE DIRECTORY."));
7265   case XXRXIT:
7266     return(hmsg("  REXIT is a short form of REMOTE EXIT."));
7267   case XXRHLP:
7268     return(hmsg("  RHELP is a short form of REMOTE HELP."));
7269   case XXRHOS:
7270     return(hmsg("  RHOST is a short form of REMOTE HOST."));
7271   case XXRKER:
7272     return(hmsg("  RKERMIT is a short form of REMOTE KERMIT."));
7273   case XXRMKD:
7274     return(hmsg("  RMKDIR is a short form of REMOTE MKDIR."));
7275   case XXRMSG:
7276     return(hmsg("  RMESSAGE and RMSG are short forms of REMOTE MESSAGE."));
7277   case XXRPRI:
7278     return(hmsg("  RPRINT is a short form of REMOTE PRINT."));
7279   case XXRPWD:
7280     return(hmsg("  RPWD is a short form of REMOTE PWD."));
7281   case XXRQUE:
7282     return(hmsg("  QUERY and RQUERY are short forms of REMOTE QUERY."));
7283   case XXRREN:
7284     return(hmsg("  RRENAME is a short form of REMOTE RENAME."));
7285   case XXRRMD:
7286     return(hmsg("  RRMDIR is a short form of REMOTE RMDIR."));
7287   case XXRSET:
7288     return(hmsg("  RSET is a short form of REMOTE SET."));
7289   case XXRSPA:
7290     return(hmsg("  RSPACE is a short form of REMOTE SPACE."));
7291   case XXRTYP:
7292     return(hmsg("  RTYPE is a short form of REMOTE TYPE."));
7293   case XXRWHO:
7294     return(hmsg("  RWHO is a short form of REMOTE WHO."));
7295 #endif /* NOXFER */
7296 
7297   case XXSCRN:
7298     return(hmsga(hmxxscrn));
7299 
7300 #ifdef CKEXEC
7301   case XXEXEC:
7302     return(hmsg("Syntax: EXEC <command> [ <arg1> [ <arg2> [ ... ] ]\n\
7303   C-Kermit overlays itself with the given system command and starts it with\n\
7304   the given arguments.  Upon any error, control returns to C-Kermit."));
7305 #endif /* CKEXEC */
7306 
7307 #ifndef NOSPL
7308   case XXTRACE:
7309     return(hmsg(
7310 "Syntax: TRACE { /ON, /OFF } { ASSIGNMENTS, COMMAND-LEVEL, ALL }\n\
7311   Turns tracing of the given object on or off."));
7312 #endif /* NOSPL */
7313 
7314 #ifdef CK_PERMS
7315 #ifdef UNIX
7316   case XXCHMOD:
7317     return(hmsga(hmxxchmod));
7318 #endif /* UNIX */
7319 #endif /* CK_PERMS */
7320 
7321 #ifdef CKROOT
7322   case XXCHRT:
7323     return(hmsga(hmxxchroot));
7324 #endif /* CKROOT */
7325 
7326 #ifndef NOSPL
7327   case XXPROMP:
7328     return(hmsga(hmxxprompt));
7329 #endif /* NOSPL */
7330 
7331   case XXGREP:
7332     return(hmsga(hmxxgrep));
7333 
7334 #ifndef NOSEXP
7335 #ifndef NOSPL
7336   case XXSEXP:
7337     return(hmsga(hmxxsexp));
7338 #endif /* NOSPL */
7339 #endif /* NOSEXP */
7340 
7341 #ifdef CKLEARN
7342   case XXLEARN:
7343     return(hmsga(hmxxlearn));
7344 #endif /* CKLEARN */
7345 
7346 #ifdef ANYSSH
7347   case XXSSH:
7348     return(hmsga(hmxxssh));
7349 #endif /* ANYSSH */
7350 
7351 #ifdef TCPSOCKET
7352   case XXFIREW:
7353     return(hmsga(hmxxfirew));
7354 #endif /* TCPSOCKET */
7355 
7356 #ifdef NEWFTP
7357   case XXUSER:
7358     return(hmsg(" Equivalent to FTP USER."));
7359   case XXACCT:
7360     return(hmsg(" Equivalent to FTP ACCOUNT."));
7361 #endif /* NEWFTP */
7362 
7363   case XXORIE:
7364     return(hmsg(" Shows the directories important to Kermit."));
7365 
7366   case XXCONT:
7367     return(hmsg(" In a FOR or WHILE loop: continue the loop.\n\
7368  At the prompt: continue a script that has \"shelled out\" to the prompt."));
7369 
7370   case XXREDO:
7371     return(hmsg(" Syntax: REDO xxx (or) ^xxx\n\
7372  Re-executes the most recent command starting with xxx."));
7373 
7374 #ifdef UNIX
7375 #ifndef NOPUTENV
7376   case XXPUTE:
7377     return(hmsga(hmxxputenv));
7378 #endif	/* NOPUTENV */
7379 #endif	/* UNIX */
7380 
7381   case XXNOTAV:
7382     return(hmsg(" This command is not configured in this version of Kermit."));
7383 
7384 default: {
7385         char *s;
7386         if ((x = cmcfm()) < 0) return(x);
7387         s = cmdbuf + (int)strlen(cmdbuf) -1;
7388         while (s >= cmdbuf && *s == SP)
7389           *s-- = NUL;
7390         while (s >= cmdbuf && *s != SP)
7391           s--;
7392         while (*s == SP) s++;
7393         printf("Sorry, help not available for \"%s\"\n",s);
7394         break;
7395       }
7396     } /* switch */
7397 #endif /* NOHELP */
7398 
7399     return(success = 0);
7400 }
7401 
7402 /*  H M S G  --  Get confirmation, then print the given message  */
7403 
7404 int
hmsg(s)7405 hmsg(s) char *s; {
7406     int x;
7407     if ((x = cmcfm()) < 0) return(x);
7408     printf("\n%s\n\n",s);
7409     return(0);
7410 }
7411 
7412 #ifdef NOHELP
7413 
7414 int                                     /* Print an array of lines, */
hmsga(s)7415 hmsga(s) char *s[]; {                   /* cheap version. */
7416     int i;
7417     if ((i = cmcfm()) < 0) return(i);
7418     printf("\n");                       /* Start off with a blank line */
7419     for (i = 0; *s[i]; i++) {           /* Print each line. */
7420         printf("%s\n",s[i]);
7421     }
7422     printf("\n");
7423     return(0);
7424 }
7425 
7426 #else /* NOHELP not defined... */
7427 
7428 int                                     /* Print an array of lines, */
hmsga(s)7429 hmsga(s) char *s[]; {                   /* pausing at end of each screen. */
7430     extern int hmtopline;               /* (This should be a parameter...) */
7431     int x, y, i, j, k, n;
7432     if ((x = cmcfm()) < 0) return(x);
7433 
7434 #ifdef CK_TTGWSIZ
7435 #ifdef OS2
7436     ttgcwsz();
7437 #else /* OS2 */
7438     /* Check whether window size changed */
7439     if (ttgwsiz() > 0) {
7440         if (tt_rows > 0 && tt_cols > 0) {
7441             cmd_rows = tt_rows;
7442             cmd_cols = tt_cols;
7443         }
7444     }
7445 #endif /* OS2 */
7446 #endif /* CK_TTGWSIZ */
7447 
7448     printf("\n");                       /* Start off with a blank line */
7449     n = (hmtopline > 0) ? hmtopline : 1; /* Line counter */
7450     for (i = 0; *s[i]; i++) {
7451         printf("%s\n",s[i]);            /* Print a line. */
7452         y = (int)strlen(s[i]);
7453         k = 1;
7454         for (j = 0; j < y; j++)         /* See how many newlines were */
7455           if (s[i][j] == '\n') k++;     /* in the string... */
7456         n += k;
7457         if (n > (cmd_rows - 3) && *s[i+1]) /* After a screenful, give them */
7458           if (!askmore()) return(0);    /* a "more?" prompt. */
7459           else n = 0;
7460     }
7461     printf("\n");
7462     return(0);
7463 }
7464 
7465 #ifndef NOFRILLS
7466 static char * supporttext[] = {
7467 
7468 "Live technical support for Kermit software is no longer available",
7469 "from Columbia University, as it was from mid-1981 until mid-2011 when",
7470 "the Kermit Project was cancelled.  Beginning with version 9.0, C-Kermit",
7471 "is Open Source software.  The Kermit project has been moved to:",
7472 " ",
7473 "  http://www.kermitproject.org/",
7474 " ",
7475 "The C-Kermit home page is here:",
7476 " ",
7477 "  http://www.kermitproject.org/ckermit.html",
7478 " ",
7479 "The documentation for C-Kermit is listed here:",
7480 " ",
7481 "  http://www.kermitproject.org/ckermit.html#doc",
7482 " ",
7483 "Z C-Kermit tutorial is here:",
7484 " ",
7485 "  http://www.kermitproject.org/ckututor.html",
7486 " ",
7487 "The C-Kermit Frequently Asked Questions page is here:",
7488 " ",
7489 "  http://www.kermitproject.org/ckfaq.html",
7490 " ",
7491 "and the Kermit Project Technical Support page is here:",
7492 " ",
7493 "  http://www.kermitproject.org/support.html",
7494 "  ",
7495 "If you have a problem or question that is not addressed on the website",
7496 "you can send email to:",
7497 " ",
7498 "  support@kermitproject.org",
7499 " ",
7500 "and as long as anyone is still at that address, it will be answered",
7501 "on a best-effort basis.",
7502 ""
7503 };
7504 
7505 /* Do the BUG command */
7506 int
dobug()7507 dobug() {
7508     return(hmsga(supporttext));
7509 }
7510 #endif /* NOFRILLS */
7511 
7512 #ifndef NOXMIT
7513 static char *hsetxmit[] = {
7514 "Syntax: SET TRANSMIT parameter value",
7515 " ",
7516 "Controls the behavior of the TRANSMIT command (see HELP TRANSMIT):",
7517 " ",
7518 "SET TRANSMIT ECHO { ON, OFF }",
7519 "  Whether to echo text to your screen as it is being transmitted.",
7520 " ",
7521 "SET TRANSMIT EOF text",
7522 "  Text to send after end of file is reached, e.g. \\4 for Ctrl-D",
7523 " ",
7524 "SET TRANSMIT FILL number",
7525 "  ASCII value of a character to insert into blank lines, 0 for none.",
7526 "  Applies only to text mode.  0 by default.",
7527 " ",
7528 "SET TRANSMIT LINEFEED { ON, OFF }",
7529 "  Transmit Linefeed as well as Carriage Return (CR) at the end of each line.",
7530 "  Normally, only CR  is sent.",
7531 " ",
7532 "SET TRANSMIT LOCKING-SHIFT { ON, OFF }",
7533 "  Whether to use SO/SI for transmitting 8-bit data when PARITY is not NONE.",
7534 " ",
7535 "SET TRANSMIT PAUSE number",
7536 "  How many milliseconds to pause after transmitting each line (text mode),",
7537 "  or each character (binary mode).",
7538 " ",
7539 "SET TRANSMIT PROMPT number",
7540 "  ASCII value of character to look for from host before sending next line",
7541 "  when TRANSMITting in text mode; normally 10 (Linefeed).  0 means none;",
7542 "  don't wait for a prompt.",
7543 " ",
7544 "SET TRANSMIT TIMEOUT number",
7545 "  Number of seconds to wait for each character to echo when TRANSMIT ECHO",
7546 "  is ON or TRANSMIT PROMPT is not 0.  If 0 is specified, this means wait",
7547 "  indefinitely for each echo.",
7548 " ",
7549 "Synonym: SET XMIT.  SHOW TRANSMIT displays current settings.",
7550 "" };
7551 #endif /* NOXMIT */
7552 
7553 static char *hsetbkg[] = {
7554 "Syntax: SET BACKGROUND { OFF, ON }",
7555 " ",
7556 "  SET BACKGROUND OFF forces prompts and messages to appear on your screen",
7557 "  even though Kermit thinks it is running in the background.",
7558 "" };
7559 
7560 #ifdef DYNAMIC
7561 static char *hsetbuf[] = {
7562 "Syntax: SET BUFFERS n1 [ n2 ]",
7563 " ",
7564 "  Changes the overall amount of memory allocated for SEND and RECEIVE packet",
7565 "  buffers, respectively.  Bigger numbers let you have longer packets and",
7566 "  more window slots.  If n2 is omitted, the same value as n1 is used.",
7567 #ifdef BIGBUFOK
7568 " ",
7569 "  NOTE: This command is not needed in this version of Kermit, which is",
7570 "  already configured for maximum-size packet buffers.",
7571 #endif /* BIGBUFOK */
7572 "" };
7573 #endif /* DYNAMIC */
7574 
7575 static char *hsetcmd[] = {
7576 "Syntax: SET COMMAND parameter value",
7577 " ",
7578 
7579 #ifdef CK_AUTODL
7580 "SET COMMAND AUTODOWNLOAD { ON, OFF }",
7581 "  Enables/Disables automatic recognition of Kermit packets while in",
7582 "  command mode.  ON by default.",
7583 " ",
7584 #endif /* CK_AUTODL */
7585 
7586 "SET COMMAND BYTESIZE { 7, 8 }",
7587 "  Informs Kermit of the bytesize of the communication path between itself",
7588 "  and your keyboard and screen.  8 is assumed.  SET COMMAND BYTE 7 only if",
7589 "  8-bit characters cannot pass.",
7590 " ",
7591 
7592 #ifdef OS2
7593 "SET COMMAND COLOR <foreground-color> <background-color>",
7594 "  Lets you choose colors for Command screen.  Use ? in the color fields to",
7595 "  to get lists of available colors.",
7596 " ",
7597 "SET COMMAND CURSOR-POSITION <row> <column>",
7598 "  Moves the command-screen cursor to the given position (1-based).  This",
7599 "  command should be used in scripts instead of relying on ANSI.SYS escape",
7600 "  sequences.",
7601 " ",
7602 #endif /* OS2 */
7603 
7604 "SET COMMAND ERROR { 0,1,2,3 }",
7605 "  Sets the verbosity level of command error messages; the higher the number,",
7606 "  the more verbose the message.  The default is 1.  Higher values are",
7607 "  useful only for debugging scripts.",
7608 " ",
7609 
7610 #ifdef OS2
7611 #ifdef NT
7612 "SET COMMAND HEIGHT <number>",
7613 "  Changes the number of rows (lines) in your command screen, not",
7614 "  counting the status line.  Recommended values are 24, 42, and 49 (or 25,",
7615 "  43, and 50 if SET COMMAND STATUSLINE is OFF.)",
7616 #else
7617 "SET COMMAND HEIGHT <number>"
7618 "  Changes the number of rows (lines) in your command screen, not",
7619 "  counting the status line.  Windowed sessions can use any value from 8 to",
7620 "  101.  Fullscreen sessions are limited to 24, 42, 49, or 59.  Not all"
7621 "  heights are supported by all video adapters.",
7622 #endif /* NT */
7623 #else  /* OS2 */
7624 "SET COMMAND HEIGHT <number>",
7625 "  Informs Kermit of the number of rows in your command screen for the",
7626 "  purposes of More?-prompting.",
7627 #endif /* OS2 */
7628 " ",
7629 "SET COMMAND WIDTH <number>",
7630 "  Informs Kermit of the number of characters across your screen for",
7631 "  purposes of screen formatting.",
7632 " ",
7633 "SET COMMAND MORE-PROMPTING { ON, OFF }",
7634 "  ON (the default) enables More?-prompting when Kermit needs to display",
7635 "  text that does not fit vertically on your screen.  OFF allows the text to",
7636 "  scroll by without intervention.  If your command window has scroll bars,",
7637 "  you might prefer OFF.",
7638 " ",
7639 
7640 #ifdef CK_RECALL
7641 "SET COMMAND RECALL-BUFFER-SIZE number",
7642 "  How big you want Kermit's command recall buffer to be.  By default, it",
7643 "  holds 10 commands.  You can make it any size you like, subject to memory",
7644 "  constraints of the computer.  A size of 0 disables command recall.",
7645 "  Whenever you give this command, previous command history is lost.",
7646 " ",
7647 #endif /* CK_RECALL */
7648 
7649 "SET COMMAND QUOTING { ON, OFF }",
7650 "  Whether to treat backslash and question mark as special characters (ON),",
7651 "  or as ordinary data characters (OFF) in commands.  ON by default.",
7652 " ",
7653 #ifdef DOUBLEQUOTING
7654 "SET COMMAND DOUBLEQUOTING { ON, OFF }",
7655 "  Whether to allow doublequotes (\") to be used to enclose fields,",
7656 "  filenames, directory names, and macro arguments that might contain",
7657 "  spaces.  ON by default; use OFF to force compatibility with older",
7658 "  versions.",
7659 " ",
7660 #endif /* DOUBLEQUOTING */
7661 
7662 #ifdef CK_RECALL
7663 "SET COMMAND RETRY { ON, OFF }",
7664 "  Whether to reprompt you with the correct but incomplete portion of a",
7665 "  syntactically incorrect command.  ON by default.",
7666 " ",
7667 #endif /* CK_RECALL */
7668 
7669 #ifdef OS2
7670 "SET COMMAND SCROLLBACK <lines>",
7671 "  Sets size of virtual Command screen buffer to the given number of lines,",
7672 "  which includes the active Command screen.  The minimum is 256.  The max",
7673 "  is 2 million.  The default is 512.",
7674 " ",
7675 "SET COMMAND STATUSLINE { ON, OFF }",
7676 "  ON (default) enables the Kermit status line in the command screen.",
7677 "  OFF removes it, making the line available for use by the host.",
7678 " ",
7679 #endif /* OS2 */
7680 
7681 "Use SHOW COMMAND to display these settings.",
7682 "" };
7683 
7684 #ifndef NOLOCAL
7685 static char *hsetcar[] = {
7686 "Syntax: SET CARRIER-WATCH { AUTO, OFF, ON }",
7687 " ",
7688 "  Attempts to control treatment of carrier (the Data Carrier Detect signal)",
7689 "  on serial communication (SET LINE or SET PORT) devices.  ON means that",
7690 "  carrier is required at all times.  OFF means carrier is never required.",
7691 "  AUTO (the default) means carrier is required at all times except during",
7692 "  the DIAL command.  Correct operation of carrier-watch depends on the",
7693 "  capabilities of the underlying OS, drivers, devices, and cables.  If you",
7694 "  need to CONNECT to a serial device that is not asserting carrier, and",
7695 "  Kermit won't let you, use SET CARRIER-WATCH OFF.  Use SHOW COMMUNICATIONS",
7696 "  to display the CARRIER-WATCH setting.",
7697 "" };
7698 #endif /* NOLOCAL */
7699 
7700 static char *hsetat[] = {
7701 "Syntax: SET ATTRIBUTES name ON or OFF",
7702 " ",
7703 "  Use this command to enable (ON) or disable (OFF) the transmission of",
7704 "  selected file attributes along with each file, and to handle or ignore",
7705 "  selected incoming file attributes, including:",
7706 " ",
7707 #ifndef NOCSETS
7708 "   CHARACTER-SET:  The transfer character set for text files",
7709 #endif /* NOCSETS */
7710 "   DATE:           The file's creation date",
7711 "   DISPOSITION:    Unusual things to do with the file, like MAIL or PRINT",
7712 "   LENGTH:         The file's length",
7713 "   PROTECTION:     The file's protection (permissions)",
7714 "   SYSTEM-ID:      Machine/Operating system of origin",
7715 "   TYPE:           The file's type (text or binary)",
7716 " ",
7717 "You can also specify ALL to select all of them.  Examples:",
7718 " ",
7719 "   SET ATTR DATE OFF",
7720 "   SET ATTR LENGTH ON",
7721 "   SET ATTR ALL OFF",
7722 " ",
7723 "Also see HELP SET SEND and HELP SET RECEIVE.",
7724 ""
7725 };
7726 
7727 static char *hxytak[] = {
7728 "Syntax: SET TAKE parameter value",
7729 " ",
7730 "  Controls behavior of TAKE command:",
7731 " ",
7732 "SET TAKE ECHO { ON, OFF }",
7733 "  Tells whether commands read from a TAKE file should be displayed on the",
7734 "  screen (if so, each command is shown at the time it is read, and labeled",
7735 "  with a line number).",
7736 " ",
7737 "SET TAKE ERROR { ON, OFF }",
7738 "  Tells whether a TAKE command file should be automatically terminated when",
7739 "  a command fails.  This setting is local to the current command file, and",
7740 "  inherited by subordinate command files.",
7741 "" };
7742 
7743 #ifndef NOLOCAL
7744 #ifdef OS2MOUSE
7745 static char *hxymouse[] = {
7746 "Syntax: SET MOUSE ACTIVATE { ON, OFF }",
7747 "  Enables or disables the mouse in Connect mode.  Default is ON",
7748 " ",
7749 "Syntax: SET MOUSE BUTTON <number> <key-modifier> <action> [ <text> ]",
7750 " where:",
7751 "  <number> is the mouse button number, 1, 2, or 3;",
7752 "  <key-modifier> denotes modifier keys held down during the mouse event:",
7753 "   ALT, ALT-SHIFT, CTRL, CTRL-ALT CTRL-ALT-SHIFT, CTRL-SHIFT, SHIFT, NONE;",
7754 "  <action> is the mouse action, CLICK, DRAG, or DOUBLE-CLICK.",
7755 " ",
7756 " The <text> has exactly the same properties as the <text> from the SET KEY",
7757 " command -- it can be a character, a string, one or more Kverbs, a macro",
7758 " invoked as a Kverb, or any combination of these.  Thus, anything that can",
7759 " be assigned to a key can also be assigned to the mouse -- and vice versa.",
7760 " If the <text> is omitted, the action will be ignored.  Examples:",
7761 " ",
7762 " SET MOUSE BUTTON 1 NONE DOUBLE \\KmouseCurPos",
7763 " SET MOU B 2 SHIFT CLICK help\\13",
7764 " ",
7765 " DRAG operations perform a \"mark mode\" selection of Text. You should",
7766 " assign only the following actions to drag operations:",
7767 " ",
7768 "  \\Kdump         - copy marked text to printer (or file)",
7769 "  \\Kmarkcopyclip - copy marked text to PM Clipboard",
7770 "  \\Kmarkcopyhost - copy marked text direct to Host",
7771 "  \\Kmousemark    - mark text, no copy operation performed",
7772 " ",
7773 " The following Kverb is only for use with the mouse:",
7774 " ",
7775 "  \\KmouseCurPos",
7776 " ",
7777 " which represents the mouse-directed terminal cursor feature.",
7778 " ",
7779 "Syntax: SET MOUSE CLEAR",
7780 " Restores all mouse events to their default definitions",
7781 "   Button 1 Ctrl-Click = Kverb: \\Kmouseurl",
7782 "   Button 1 Double-Click = Kverb: \\Kmousecurpos",
7783 "   Button 1 Drag = Kverb: \\Kmarkcopyclip",
7784 "   Button 1 Alt-Drag = Kverb: \\Kmarkcopyclip_noeol",
7785 "   Button 1 Ctrl-Drag = Kverb: \\Kmarkcopyhost",
7786 "   Button 1 Ctrl-Alt-Drag = Kverb: \\Kmarkcopyhost_noeol",
7787 "   Button 1 Ctrl-Shift-Drag = Kverb: \\Kdump",
7788 "   Button 2 Double-Click = Kverb: \\Kpaste",
7789 "   Button 2 Drag = Kverb: \\Kmarkcopyhost",
7790 "   Button 2 Alt-Drag = Kverb: \\Kmarkcopyhost_noeol     ",
7791 "   Button 3 Double-Click = Kverb: \\Kpaste",
7792 ""};
7793 #endif /* OS2MOUSE */
7794 
7795 static char *hxyterm[] = {
7796 "Syntax: SET TERMINAL parameter value",
7797 " ",
7798 #ifdef OS2
7799 "SET TERMINAL TYPE { ANSI, VT52, VT100, VT102, VT220, VT320, ... }",
7800 "  Selects type type of terminal to emulate.  Type SET TERMINAL TYPE ? to",
7801 "  see a complete list.",
7802 " ",
7803 "SET TERMINAL ANSWERBACK { OFF, ON }",
7804 "  Disables/enables the ENQ/Answerback sequence (Kermit version term-type).",
7805 " ",
7806 "SET TERMINAL ANSWERBACK MESSAGE <extension>",
7807 "  Allows you to specify an extension to the default answerback message.",
7808 " ",
7809 #else
7810 "SET TERMINAL TYPE ...",
7811 "  This command is not available because this version of Kermit does not",
7812 "  include a terminal emulator.  Instead, it is a \"semitransparent pipe\"",
7813 "  (or a totally transparent one, if you configure it that way) to the",
7814 "  computer or service you have made a connection to.  Your console,",
7815 "  workstation window, or the terminal emulator or terminal from which you",
7816 "  are running Kermit provides the emulation.",
7817 " ",
7818 #endif /* OS2 */
7819 
7820 #ifdef CK_APC
7821 "SET TERMINAL APC { ON, OFF, NO-INPUT, NO-INPUT-UNCHECKED, UNCHECKED }",
7822 #ifdef OS2
7823 "  Controls execution of Application Program Commands sent by the host while",
7824 "  Kermit is either in CONNECT mode or processing INPUT commands.  ON allows",
7825 "  execution of \"safe\" commands and disallows potentially dangerous ones",
7826 "  such as DELETE, RENAME, OUTPUT, and RUN.  OFF prevents execution of APCs.",
7827 "  UNCHECKED allows execution of all APCs.  OFF is the default.",
7828 #else /* OS2 */
7829 "  Controls execution of Application Program Commands sent by the host while",
7830 "  C-Kermit is in CONNECT mode.  ON allows execution of \"safe\" commands and",
7831 "  disallows potentially dangerous commands such as DELETE, RENAME, OUTPUT,",
7832 "  and RUN.  OFF prevents execution of APCs.  UNCHECKED allows execution of",
7833 "  all APCs.  OFF is the default.",
7834 #endif /* OS2 */
7835 " ",
7836 #endif /* CK_APC */
7837 
7838 #ifdef OS2
7839 "SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }",
7840 "  Sets the mode for the arrow keys during VT terminal emulation.",
7841 " ",
7842 "SET TERMINAL ATTRIBUTE { BLINK, DIM, PROTECTED, REVERSE, UNDERLINE }",
7843 "  Determines how attributes are displayed in the Terminal window.",
7844 " ",
7845 "SET TERMINAL ATTRIBUTE { BLINK, DIM, REVERSE, UNDERLINE } { ON, OFF }",
7846 "  Determines whether real Blinking, Dim, Reverse, and Underline are used in",
7847 "  the terminal display.  When BLINK is turned OFF, reverse background",
7848 "  intensity is used.  When DIM is turned OFF, dim characters appear BOLD.",
7849 "  When REVERSE and UNDERLINE are OFF, the colors selected with SET",
7850 "  TERMINAL COLOR { REVERSE,UNDERLINE } are used instead.  This command",
7851 "  affects the entire current screen and terminal scrollback buffer.",
7852 " ",
7853 "SET TERMINAL ATTRIBUTE PROTECTED [ -",
7854 "   { BOLD, DIM, INVISIBLE, NORMAL, REVERSE, UNDERLINED } ]",
7855 "  Sets the attributes used to represent Protected text in Wyse and Televideo",
7856 "  terminal emulations.  Any combination of attributes may be used.  The",
7857 "  default is DIM.)",
7858 " ",
7859 #endif /* OS2 */
7860 
7861 #ifdef OS2
7862 #ifdef CK_XYZ
7863 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7864 "  enables/disables automatic switching into file-transfer mode when a Kermit",
7865 "  or ZMODEM file transfer has been detected during CONNECT mode or while",
7866 "  an INPUT command is active.  Default is OFF.",
7867 #else
7868 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7869 "  enables/disables automatic switching into file-transfer mode when a Kermit",
7870 "  file transfer has been detected during CONNECT mode or while an INPUT",
7871 "  command is active.  Default is OFF.",
7872 #endif /* CK_XYZ */
7873 
7874 " ",
7875 "  When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
7876 "  tells what to do if an error occurs during a file transfer or other",
7877 "  protocol operation initiated by the terminal emulator: STOP (the default)",
7878 "  means to remain in command mode so you can see what happened; CONTINUE",
7879 "  means to resume the CONNECT session (e.g. so a far-end script can continue",
7880 "  its work).",
7881 " ",
7882 
7883 #ifdef CK_XYZ
7884 "SET TERM... AUTO... { KERMIT, ZMODEM } C0-CONFLICTS { IGNORED, PROCESSED }",
7885 "  Determines whether the active terminal emulator should process or ignore",
7886 "  C0 control characters which are also used for the specified file transfer",
7887 "  protocol.  Kermit by default uses ^A (SOH) and Zmodem uses ^X (CAN).",
7888 "  Default is PROCESSED.",
7889 " ",
7890 "SET TERM... AUTO... { KERMIT, ZMODEM } DETECTION-METHOD { PACKET, STRING }",
7891 "  Determines whether the specified file transfer protocol should be detected",
7892 "  by looking for valid packets or by identifying a specified text string.",
7893 "  Default is PACKET.",
7894 " ",
7895 "SET TERM... AUTO... { KERMIT, ZMODEM } STRING <text>",
7896 "  Lets you assign an autodownload detection string for use with the",
7897 "  specified file transfer protocol.",
7898 "  Default for Kermit is \"READY TO SEND...\", for Zmodem is \"rz\\{13}\".",
7899 " ",
7900 #else /* CK_XYZ */
7901 "SET TERM... AUTO... KERMIT C0-CONFLICTS { IGNORED, PROCESSED }",
7902 "  Determines whether the active terminal emulator should process or ignore",
7903 "  C0 control characters which are also used for the specified file transfer",
7904 "  protocol.  Kermit by default uses ^A <SOH>.  Default is PROCESSED.",
7905 " ",
7906 "SET TERM... AUTO... KERMIT DETECTION-METHOD { PACKET, STRING }",
7907 "  Determines whether the specified file transfer protocol should be detected",
7908 "  by looking for valid packets or by identifying a specified text string.",
7909 "  Default is PACKET.",
7910 " ",
7911 "SET TERM... AUTO... KERMIT STRING <text>",
7912 "  Lets you assign an autodownload detection string for use with the",
7913 "  specified file transfer protocol.  Default is \"READY TO SEND...\".",
7914 " ",
7915 #endif /* CK_XYZ */
7916 "SET TERMINAL AUTOPAGE { ON, OFF }",
7917 " ",
7918 "SET TERMINAL AUTOSCROLL { ON, OFF }",
7919 " ",
7920 #else /* OS2 */
7921 "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
7922 "  Enables/disables automatic switching into file-transfer mode when a valid",
7923 #ifdef CK_XYZ
7924 "  Kermit or ZMODEM packet of the appropriate type is received during CONNECT",
7925 "  mode.  Default is OFF.",
7926 #else
7927 "  Kermit packet of the appropriate type is received during CONNECT mode.",
7928 "  Default is OFF.",
7929 #endif /* CK_XYZ */
7930 
7931 " ",
7932 "  When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
7933 "  tells what to do if an error occurs during a file transfer or other",
7934 "  protocol operation initiated by the terminal emulator: STOP (the default)",
7935 "  means to remain in command mode so you can see what happened; CONTINUE",
7936 "  means to resume the CONNECT session (e.g. so a far-end script can continue",
7937 "  its work).",
7938 " ",
7939 
7940 #endif /* OS2 */
7941 
7942 #ifdef OS2
7943 "SET TERMINAL BELL { AUDIBLE, VISIBLE, NONE }",
7944 "  Specifies how Control-G (bell) characters are handled.  AUDIBLE means",
7945 "  a beep is sounded; VISIBLE means the screen is flashed momentarily.",
7946 " ",
7947 "  (This command has been superseded by SET BELL.)",
7948 " ",
7949 #endif /* OS2 */
7950 
7951 "SET TERMINAL BYTESIZE { 7, 8 }",
7952 "  Use 7- or 8-bit characters between Kermit and the remote computer during",
7953 "  terminal sessions.  The default is 8.",
7954 " ",
7955 
7956 #ifndef NOCSETS
7957 #ifdef OS2
7958 "SET TERMINAL CHARACTER-SET <remote-cs>",
7959 "  Specifies the character set used by the remote host, <remote-cs>.",
7960 "  Equivalent to SET TERM REMOTE-CHARACTER-SET <remote-cs> ALL.  For more",
7961 "  control over the details, use SET TERM REMOTE-CHARACTER-SET and (in",
7962 "  non-GUI Kermit versions) SET TERM LOCAL-CHARACTER-SET; these are explained",
7963 "  below.  The default TERMINAL CHARACTER-SET is LATIN1 (ISO 8859-1).",
7964 #else  /* not OS2 */
7965 "SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ]",
7966 "  Specifies the character set used by the remote host, <remote-cs>, and the",
7967 "  character set used by C-Kermit locally, <local-cs>.  If you don't specify",
7968 "  the local character set, the current FILE CHARACTER-SET is used.  When",
7969 "  you specify two different character sets, C-Kermit translates between them",
7970 "  during CONNECT.  By default, both character sets are TRANSPARENT, and",
7971 "  no translation is done.",
7972 #endif /* OS2 */
7973 " ",
7974 #endif /* NOCSETS */
7975 
7976 #ifdef OS2
7977 
7978 "SET TERMINAL CODE-PAGE <number>",
7979 "  Lets you change the PC code page.  Only works for code pages that are",
7980 "  successfully prepared in CONFIG.SYS.  Use SHOW TERMINAL to list the",
7981 "  current code page and the available code pages.",
7982 #ifdef OS2ONLY
7983 " ",
7984 "  Also see SET TERMINAL FONT if the desired code page in not available in",
7985 "  your version of OS/2.",
7986 #endif /* OS2ONLY */
7987 " ",
7988 
7989 #ifndef NT
7990 "SET TERMINAL COLOR BORDER <foreground>",
7991 #endif /* NT */
7992 "SET TERMINAL COLOR <screenpart> <foreground> <background>",
7993 " Sets the colors of the terminal emulation screen.",
7994 " <screenpart> may be any of the following:",
7995 "  DEBUG, HELP-TEXT, REVERSE, SELECTION, STATUS-LINE, TERMINAL-SCREEN, or",
7996 "  UNDERLINED-TEXT.",
7997 " <foreground> and <background> may be any of:",
7998 "  BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LGRAY, DGRAY, LBLUE,",
7999 "  LGREEN, LCYAN, LRED, LMAGENTA, YELLOW or WHITE.",
8000 " The L prefix for the color names means Light.",
8001 " ",
8002 
8003 "SET TERMINAL COLOR ERASE { CURRENT-COLOR, DEFAULT-COLOR }",
8004 "  Determines whether the current color as set by the host or the default",
8005 "  color as set by the user (SET TERMINAL COLOR TERMINAL) is used to clear",
8006 "  the screen when erase commands are received from the host.",
8007 " ",
8008 
8009 "SET TERMINAL COLOR RESET-ON-ESC[0m { CURRENT-COLOR, DEFAULT-COLOR }",
8010 "  Determines whether the current color or the default color is used after",
8011 "  <ESC>[0m (\"reset attributes\") command sequence is received from the",
8012 "  host.",
8013 " ",
8014 
8015 "SET TERMINAL CONTROLS { 7, 8 }",
8016 "  Determines whether VT220/320 or Wyse 370 function keys, arrow keys, etc,",
8017 "  that generate ANSI-format escape sequences should send 8-bit control",
8018 "  characters or 7-bit escape sequences.",
8019 " ",
8020 #endif /* OS2 */
8021 
8022 "SET TERMINAL CR-DISPLAY { CRLF, NORMAL }",
8023 "  Specifies how incoming carriage return characters are to be displayed",
8024 "  on your screen.",
8025 " ",
8026 
8027 #ifdef OS2
8028 #ifdef KUI
8029 "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF, NOBLINK}",
8030 "  Selects the cursor style and visibility for the terminal screen.",
8031 #else
8032 "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF}",
8033 "  Selects the cursor style and visibility for the terminal screen.",
8034 #endif /* KUI */
8035 " ",
8036 #endif /* OS2 */
8037 
8038 "SET TERMINAL DEBUG { ON, OFF }",
8039 "  Turns terminal session debugging on and off.  When ON, incoming control",
8040 "  characters are displayed symbolically, rather than be taken as formatting",
8041 "  commands.  SET TERMINAL DEBUG ON implies SET TELNET DEBUG ON.",
8042 " ",
8043 #ifdef OS2
8044 "SET TERMINAL DG-UNIX-MODE { ON, OFF }",
8045 "  Specifies whether the Data General emulations should accept control",
8046 "  sequences in Unix compatible format or in native DG format.  The",
8047 "  default is OFF, DG format.",
8048 " ",
8049 #endif /* OS2 */
8050 
8051 "SET TERMINAL ECHO { LOCAL, REMOTE }",
8052 "  Specifies which side does the echoing during terminal connection.",
8053 " ",
8054 
8055 "SET TERMINAL ESCAPE-CHARACTER { ENABLED, DISABLED }",
8056 "  Turns on/off the ability to escape back from CONNECT mode using the SET",
8057 #ifdef OS2
8058 "  ESCAPE character.  If you disable it you can still get back using Alt-key",
8059 "  combinations as shown in the status line.  Also see HELP SET ESCAPE.",
8060 #else
8061 "  ESCAPE character.  If you disable it, Kermit returns to its prompt only",
8062 "  when the connection is closed by the other end.  USE WITH EXTREME CAUTION.",
8063 "  Also see HELP SET ESCAPE.",
8064 #endif /* OS2 */
8065 " ",
8066 
8067 #ifdef OS2
8068 #ifdef KUI
8069 "SET TERMINAL FONT <facename> <height>",
8070 "  Specifies the font to be used in the C-Kermit terminal window.  The font",
8071 "  is determined by the choice of a facename and a height measured in Points.",
8072 "  The available facenames are those installed in the Font Control Panel.",
8073 " ",
8074 #else /* KUI */
8075 #ifdef OS2ONLY
8076 "SET TERMINAL FONT { CP437, CP850, CP852, CP862, CP866, DEFAULT }",
8077 "  CP437 - Original PC code page",
8078 "  CP850 - \"Multilingual\" (West Europe) code page",
8079 "  CP852 - East Europe Roman Alphabet code page (for Czech, Polish, etc)",
8080 "  CP862 - Hebrew code page",
8081 "  CP866 - Cyrillic (Russian, Belorussian, and Ukrainian) code page",
8082 " ",
8083 "  Loads a soft into the video adapter for use during terminal emulation.",
8084 "  Use this command when your OS/2 system does not have the desired code.",
8085 "  page.  Can be used only in full-screen sessions.  Also see SET TERMINAL",
8086 "  CODE-PAGE and SET TERMINAL REMOTE-CHARACTER-SET.",
8087 " ",
8088 #endif /* OS2ONLY */
8089 #endif /* KUI */
8090 
8091 #ifdef NT
8092 "SET TERMINAL HEIGHT <number>",
8093 "  Changes the number of rows (lines) to use during terminal emulation, not",
8094 "  counting the status line.  Recommended values are 24, 42, and 49 (or 25,",
8095 "  43, and 50 if SET TERMINAL STATUSLINE is OFF.)",
8096 #else
8097 "SET TERMINAL HEIGHT <number>"
8098 "  Changes the number of rows (lines) to use during terminal emulation, not",
8099 "  counting the status line.  Windowed sessions can use any value from 8 to",
8100 "  101.  Fullscreen sessions are limited to 24, 42, 49, or 59.  Not all"
8101 "  heights are supported by all video adapters.",
8102 #endif /* NT */
8103 #else  /* OS2 */
8104 "SET TERMINAL HEIGHT <number>",
8105 "  Tells C-Kermit how many rows (lines) are on your CONNECT-mode screen.",
8106 #endif /* OS2 */
8107 " ",
8108 
8109 #ifdef CKTIDLE
8110 "SET TERMINAL IDLE-TIMEOUT <number>",
8111 "  Sets the limit on idle time in CONNECT mode to the given number of",
8112 "  seconds.  0 (the default) means no limit.",
8113 " ",
8114 "SET TERMINAL IDLE-ACTION { EXIT, HANGUP, OUTPUT [ text ], RETURN }",
8115 "  Specifies the action to be taken when a CONNECT session is idle for the",
8116 "  number of seconds given by SET TERMINAL IDLE-TIMEOUT.  The default action",
8117 "  is to RETURN to command mode.  EXIT exits from Kermit; HANGUP hangs up the",
8118 "  connection, and OUTPUT sends the given text to the host without leaving",
8119 "  CONNECT mode; if no text is given a NUL (0) character is sent.",
8120 #ifdef TNCODE
8121 " ",
8122 "SET TERMINAL IDLE-ACTION { TELNET-NOP, TELNET-AYT }",
8123 "  For TELNET connections only: Sends the indicated Telnet protocol message:",
8124 "  No Operation (NOP) or \"Are You There?\" (AYT).",
8125 #endif /* TNCODE */
8126 " ",
8127 #endif /* CKTIDLE */
8128 
8129 #ifdef OS2
8130 
8131 "SET TERMINAL KDB-FOLLOWS-GL/GR { ON, OFF }",
8132 " Specifies whether or not the keyboard character set should follow the",
8133 "  active GL and GR character sets.  This feature is OFF by default and",
8134 "  should not be used unless it is specificly required by the host",
8135 "  application.",
8136 " ",
8137 
8138 "SET TERMINAL KEY <mode> /LITERAL <keycode> <text>",
8139 "SET TERMINAL KEY <mode> DEFAULT",
8140 "SET TERMINAL KEY <mode> CLEAR",
8141 "  Configures the key whose <keycode> is given to send the given text when",
8142 "  pressed while <mode> is active.  <mode> may be any of the valid terminal",
8143 "  types or the special modes \"EMACS\", \"HEBREW\" or \"RUSSIAN\".  DEFAULT",
8144 "  restores all default key mappings for the specified mode.  CLEAR erases",
8145 "  all the key mappings.  If there is no text, the default key binding is",
8146 #ifndef NOCSETS
8147 "  restored for the key k.  SET TERMINAL KEY mappings take place before",
8148 "  terminal character-set translation.  SET KEY mappings take precedence over",
8149 "  SET TERMINAL KEY <terminal type> settings.",
8150 #else
8151 "  restored for the key.  SET KEY mappings take precedence over SET TERMINAL",
8152 "  KEY <terminal type> settings.",
8153 #endif /* NOCSETS */
8154 "  The /LITERAL switch may be used to instruct Kermit to ignore character-set",
8155 "  translations when sending this definition to the host.",
8156 " ",
8157 "  The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
8158 "  keypad, function, or editing keys, etc.  For a list of available keyboard",
8159 "  verbs, type SHOW KVERBS.",
8160 " ",
8161 "  To find out the keycode and mapping for a particular key, use the SHOW",
8162 "  KEY command.  Use the SAVE KEYS command to save all settings to a file.",
8163 " ",
8164 "SET TERMINAL KEYBOARD-MODE { NORMAL, EMACS, RUSSIAN, HEBREW }",
8165 "  Select a special keyboard mode for use in the terminal screen.",
8166 " ",
8167 
8168 "SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC }",
8169 "  Specifies the \"mode\" of the numeric keypad for VT terminal emulation.",
8170 "  Use this command in case the host or application wants the keypad to be",
8171 "  in a different mode than it's in, but did not send the escape sequence",
8172 "  to put it in the needed mode.",
8173 " ",
8174 
8175 #endif	/* OS2 */
8176 
8177 "SET TERMINAL LF-DISPLAY { CRLF, NORMAL }",
8178 "  Specifies how incoming linefeed characters are to be displayed",
8179 "  on your screen.",
8180 " ",
8181 
8182 #ifdef OS2
8183 
8184 #ifdef KUI
8185 "SET TERMINAL LINE-SPACING <float>",
8186 "  Specifies the line spacing used when displaying text.  The default is 1.0.",
8187 "  Valid values range from 1.0 to 3.0 inclusive.",
8188 " ",
8189 #endif /* KUI */
8190 #endif /* OS2 */
8191 
8192 #ifndef NOCSETS
8193 #ifdef OS2
8194 "SET TERMINAL LOCAL-CHARACTER-SET <local-cs>",
8195 "  Specifies the character set used locally.  If you don't specify",
8196 #ifdef OS2ONLY
8197 "  the local character-set, the current TERMINAL FONT is used if you have",
8198 "  given a SET TERMINAL FONT command; otherwise the current codepage is used.",
8199 #else
8200 "  the local character-set, the current code page is used.",
8201 #endif /* OS2ONLY */
8202 " ",
8203 "  When the local and remote character sets differ, Kermit translates between",
8204 "  them during CONNECT.  By default, the remote character set is Latin1 and",
8205 "  the local one is your current code page.",
8206 #ifdef NT
8207 " ",
8208 "  In Windows NT, Unicode is used as the local character-set regardless of",
8209 "  this setting.",
8210 #endif /* NT */
8211 " ",
8212 "See also SET TERMINAL REMOTE-CHARACTER-SET",
8213 " ",
8214 #endif /* OS2 */
8215 #endif /* NOCSETS */
8216 
8217 #ifdef OS2
8218 "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
8219 "  Tells whether to send Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch",
8220 "  between 7-bit and 8-bit characters sent during terminal emulation over",
8221 "  7-bit connections.  OFF by default.",
8222 #else
8223 "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
8224 "  Tells Kermit whether to use Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to",
8225 "  switch between 7-bit and 8-bit characters during CONNECT.  OFF by default.",
8226 #endif /* OS2 */
8227 " ",
8228 
8229 #ifdef OS2
8230 "SET TERMINAL MARGIN-BELL { ON [column], OFF }",
8231 "  Determines whether the margin-bell is activated and what column it should",
8232 "  ring at.  OFF by default.",
8233 " ",
8234 #endif /* OS2 */
8235 
8236 "SET TERMINAL NEWLINE-MODE { OFF, ON }",
8237 "  Tells whether to send CRLF (Carriage Return and Line Feed) when you type",
8238 "  CR (press the Return or Enter key) in CONNECT mode.",
8239 " ",
8240 
8241 #ifdef OS2
8242 "SET TERMINAL OUTPUT-PACING <milliseconds>",
8243 "  Tells how long to pause between sending each character to the host during",
8244 "  CONNECT mode.  Normally not needed but sometimes required to work around",
8245 "  TRANSMISSION BLOCKED conditions when pasting into the terminal window.",
8246 " ",
8247 
8248 #ifdef PCTERM
8249 "SET TERMINAL PCTERM { ON, OFF }",
8250 "  Activates or deactivates the PCTERM terminal emulation keyboard mode.",
8251 "  When PCTERM is ON all keystrokes in the terminal screen are sent to the",
8252 "  host as make/break (down/up) codes instead of as characters from the",
8253 "  REMOTE-CHARACTER-SET, and all keyboard mappings, including Kverbs and the",
8254 "  escape character are disabled.  To turn off PCTERM keyboard mode while in",
8255 "  CONNECT mode press Control-CapsLock.  PCTERM is OFF by default.",
8256 " ",
8257 #endif /* PCTERM */
8258 #endif /* OS2 */
8259 
8260 #ifdef OS2
8261 "SET TERMINAL PRINT { AUTO, COPY, OFF, USER }",
8262 "  Allows selective control of various types of printing from the Terminal",
8263 "  session.  AUTO prints a line of text from the terminal screen whenever",
8264 "  the cursor is moved off the line.  COPY prints every byte received as",
8265 "  it is received without interpretation.  USER prints every byte after",
8266 "  interpretation by the terminal emulator translates character-sets and",
8267 "  construct escape sequences, ...  The default is OFF.",
8268 " ",
8269 #else
8270 #ifdef XPRINT
8271 "SET TERMINAL PRINT { ON, OFF }",
8272 "  Enables and disables host-initiated transparent printing in CONNECT mode.",
8273 " ",
8274 #endif /* XPRINT */
8275 #endif /* OS2 */
8276 
8277 #ifdef OS2
8278 #ifndef NOCSETS
8279 "SET TERMINAL REMOTE-CHARACTER-SET <remote-cs> [ { G0,G1,G2,G3 }... ]",
8280 "  Specifies the character set used by the remote host, <remote-cs>.",
8281 "  When the local and remote character sets differ, Kermit translates",
8282 "  between them during CONNECT.  By default, the remote character set is",
8283 "  Latin1 and the local one is your current code page.  Optionally, you can",
8284 "  also designate the character set to the G0..G3 graphic tables.",
8285 " ",
8286 #endif /* NOCSETS */
8287 #endif /* OS2 */
8288 
8289 #ifdef OS2
8290 "SET TERMINAL ROLL-MODE { INSERT, OVERWRITE, KEYSTROKES [ option ] }",
8291 "  Tells whether new data when received from the host is entered into the",
8292 "  scrollback buffer at the current rollback position (OVERWRITE) or at the",
8293 "  end of the buffer (INSERT).  The default is INSERT.  Typing is allowed",
8294 "  during rollbacks in either mode, according to SET TERM ROLL KEYSTROKES:",
8295 "  SEND (the default) means to process keystrokes normally; IGNORE means to",
8296 "  ignore them when the screen is scrolled back; RESTORE-AND-SEND is like",
8297 "  SEND but restores the screen to its active position first.",
8298 " ",
8299 
8300 "SET TERMINAL SCREEN-MODE { NORMAL, REVERSE }",
8301 "  When set to REVERSE the foreground and background colors are swapped as",
8302 "  well as the application of the foreground and background intensity bits.",
8303 "  The default is NORMAL.",
8304 " ",
8305 
8306 "SET TERMINAL SCREEN-OPTIMIZE { ON, OFF }",
8307 "  When set to ON, the default, Kermit only paints the screen with characters",
8308 "  that have changed since the last screen paint.  When OFF, the screen is",
8309 "  completely repainted each time there is a change.",
8310 " ",
8311 
8312 "SET TERMINAL SCREEN-UPDATE { FAST, SMOOTH } [ <milliseconds> ]",
8313 "  Chooses the mechanism used for screen updating and the update frequency.",
8314 "  Defaults are FAST scrolling with updates every 100 milliseconds.",
8315 " ",
8316 
8317 "SET TERMINAL SCROLLBACK <lines>",
8318 "  Sets size of CONNECT virtual screen buffer.  <lines> includes the active",
8319 "  terminal screen.  The minimum is 256.  The maximum is 2 million.  The",
8320 "  default is 2000.",
8321 " ",
8322 
8323 "SET TERMINAL SEND-DATA { ON, OFF }",
8324 "  Determines whether ASCII emulations such as WYSE 30,50,60 or TVI 910+,925,",
8325 "  950 may send their screen contents to the host upon request.  Allowing the",
8326 "  screen to be read by the host is a significant security risk.  The default",
8327 "  is OFF and should only be changed after a security evaluation of host",
8328 "  environment.",
8329 " ",
8330 
8331 "SET TERMINAL SEND-END-OF-BLOCK { CRLF_ETX, US_CR }",
8332 "  Determines which set of characters should be used as end of line and end",
8333 "  of transmission indicators when sending screen data to the host",
8334 " ",
8335 
8336 "SET TERMINAL SGR-COLORS { ON, OFF }",
8337 "  ON (default) means allow host control of colors; OFF means ignore host",
8338 "  escape sequences to set color.",
8339 " ",
8340 
8341 "SET TERMINAL SNI-CH.CODE { ON, OFF }",
8342 "  This command controls the state of the CH.CODE key.  It is the equivalent",
8343 "  to the SNI_CH_CODE Keyboard verb.  The SNI terminal uses CH.CODE to",
8344 "  easily switch between the National Language character set and U.S. ASCII.",
8345 "  The default is ON which means to display characters as U.S. ASCII.  When",
8346 "  OFF the lanuage specified by SET TERMINAL SNI-LANUAGE is used to display",
8347 "  characters when 7-bit character sets are in use.",
8348 " ",
8349 "SET TERMINAL SNI-FIRMWARE-VERSIONS <kbd-version> <terminal-version>",
8350 "  Specifies the Firmware Version number that should be reported to the host",
8351 "  when the terminal is queried.  The default is 920031 for the keyboard",
8352 "  and 830851 for the terminal.",
8353 " ",
8354 "SET TERMINAL SNI-LANGUAGE <national-language>",
8355 "  An alias for SET TERMINAL VT-LANUAGE, this command specifies the national",
8356 "  language character-set that should be used when the NRC mode is activated",
8357 "  for VT emulations or when CH.CODE is OFF for SNI emulations.  The default",
8358 "  language for SET TERMINAL TYPE SNI-97801 is \"German\".",
8359 " ",
8360 "SET TERMINAL SNI-PAGEMODE { ON, OFF }",
8361 "  Determines whether or not page mode is active.  OFF by default.",
8362 " ",
8363 "SET TERMINAL SNI-SCROLLMODE { ON, OFF }",
8364 "  Determines whether or not scroll mode is active.  OFF by default.",
8365 " ",
8366 "SET TERMINAL STATUSLINE { ON, OFF }",
8367 "  ON (default) enables the Kermit status line in the terminal screen.",
8368 "  OFF removes it, making the line available for use by the host.",
8369 " ",
8370 
8371 "SET TERMINAL TRANSMIT-TIMEOUT <seconds>",
8372 "  Specifies the maximum amount of time Kermit waits before returning to the",
8373 "  prompt if your keystrokes can't be transmitted for some reason, such as a",
8374 "  flow-control deadlock.",
8375 " ",
8376 #endif /* OS2 */
8377 
8378 #ifdef CK_TRIGGER
8379 "SET TERMINAL TRIGGER <string>",
8380 "  Specifies a string that, when detected during any subsequent CONNECT",
8381 "  session, is to cause automatic return to command mode.  Give this command",
8382 "  without a string to cancel the current trigger.  See HELP CONNECT for",
8383 "  additional information.",
8384 " ",
8385 #endif /* CK_TRIGGER */
8386 
8387 #ifdef OS2
8388 "SET TERMINAL URL-HIGHLIGHT { ON <attribute>, OFF }",
8389 "  Specifies whether URLs should be highlighted and which screen attribute",
8390 "  should be used.  The screen attributes can be one of NORMAL, BLINK, BOLD,",
8391 "  DIM, INVISIBLE, REVERSE, or UNDERLINE.  The default is ON using the",
8392 "  BOLD screen attribute.",
8393 " ",
8394 "SET TERMINAL VIDEO-CHANGE { DISABLED, ENABLED }",
8395 "  Specifies whether video modes should change automatically in response",
8396 #ifdef NT
8397 "  to escape sequences from the other computer.  ENABLED by default.",
8398 #else /* NT */
8399 "  to escape sequences from the other computer.  ENABLED by default.",
8400 #endif /* NT */
8401 " ",
8402 
8403 "SET TERMINAL VT-LANGUAGE <language>",
8404 "  Specifies the National Replacement Character Set (NRC) to be used when",
8405 "  NRC mode is activated.  The default is \"North American\".",
8406 " ",
8407 "SET TERMINAL VT-NRC-MODE { ON, OFF }",
8408 "  OFF (default) chooses VT multinational Character Set mode.  OFF chooses",
8409 "  VT National Replacement Character-set mode.  The NRC is selected with",
8410 "  SET TERMINAL VT-LANGUAGE",
8411 " ",
8412 
8413 #ifdef NT
8414 "SET TERMINAL WIDTH <cols>",
8415 "  Tells the number of columns in the terminal screen.",
8416 " ",
8417 "  The default is 80.  You can also use 132.  Other widths can be chosen but",
8418 "  are usually not supported by host software.",
8419 " ",
8420 #else
8421 "SET TERMINAL WIDTH <cols>",
8422 "  Tells how many columns define the terminal size.",
8423 " ",
8424 "Default is 80.  In Windowed OS/2 2.x sessions, this value may not be changed",
8425 "In Windowed OS/2 WARP 3.x sessions, this value may range from 20 to 255.",
8426 "In Full screen sessions, values of 40, 80, and 132 are valid.  Not all",
8427 "combinations of height and width are supported on all adapters.",
8428 " ",
8429 #endif /* NT */
8430 "SET TERMINAL WRAP { OFF, ON }",
8431 "  Tells whether the terminal emulator should automatically wrap long lines",
8432 "  on your screen.",
8433 " ",
8434 #else
8435 
8436 "SET TERMINAL WIDTH <number>",
8437 " \
8438 Tells Kermit how many columns (characters) are on your CONNECT-mode screen.",
8439 " ",
8440 #endif /* OS2 */
8441 "Type SHOW TERMINAL to see current terminal settings.",
8442 "" };
8443 #endif /* NOLOCAL */
8444 
8445 #ifdef NETCONN
8446 static char *hxyhost[] = {
8447 "SET HOST [ switches ] hostname-or-address [ service ] [ protocol-switch ]",
8448 "  Establishes a connection to the specified network host on the currently",
8449 "  selected network type.  For TCP/IP connections, the default service is",
8450 "  TELNET; specify a different TCP port number or service name to choose a",
8451 "  different service.  The first set of switches can be:",
8452 " ",
8453 " /NETWORK-TYPE:name",
8454 "   Makes the connection on the given type of network.  Equivalent to SET",
8455 "   NETWORK TYPE name prior to SET HOST, except that the selected network",
8456 "   type is used only for this connection.  Type \"set host /net:?\" to see",
8457 #ifdef NETCMD
8458 "   a list.  /NETWORK-TYPE:COMMAND means to make the connection through the",
8459 "   given system command, such as \"rlogin\" or \"cu\".",
8460 #else
8461 "   a list.",
8462 #endif /* NETCMD */
8463 " ",
8464 " /CONNECT",
8465 "   \
8466 Enter CONNECT (terminal) mode automatically if the connection is successful.",
8467 " ",
8468 " /SERVER",
8469 "   Enter server mode automatically if the connection is successful.",
8470 " ",
8471 " /USERID:[<name>]",
8472 "   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
8473 "   ENVIRONMENT USER <name>.  If a string is given, it sent to host during",
8474 "   Telnet negotiations; if this switch is given but the string is omitted,",
8475 "   no user ID is sent to the host.  If this switch is not given, your",
8476 "   current USERID value, \\v(userid), is sent.  When a userid is sent to the",
8477 "   host it is a request to login as the specified user.",
8478 " ",
8479 #ifdef CK_AUTHENTICATION
8480 " /PASSWORD:[<string>]",
8481 "   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,",
8482 "   it is treated as the password to be used (if required) by any Telnet",
8483 "   Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
8484 "   Password, or X.509 certificate private key decryption.)  If no password",
8485 "   switch is specified a prompt is issued to request the password if one",
8486 "   is required for the negotiated authentication method.",
8487 " ",
8488 #endif /* CK_AUTHENTICATION */
8489 "The protocol-switches can be:",
8490 " ",
8491 " /NO-TELNET-INIT",
8492 "   Do not send initial Telnet negotiations even if this is a Telnet port.",
8493 " ",
8494 " /RAW-SOCKET",
8495 "   This is a connection to a raw TCP socket.",
8496 " ",
8497 #ifdef RLOGCODE
8498 " /RLOGIN",
8499 "   Use Rlogin protocol even if this is not an Rlogin port.",
8500 " ",
8501 #endif /* RLOGCODE */
8502 " /TELNET",
8503 "   Send initial Telnet negotiations even if this is not a Telnet port.",
8504 " ",
8505 #ifdef CK_KERBEROS
8506 #ifdef RLOGCODE
8507 #ifdef KRB4
8508 " /K4LOGIN",
8509 "   Use Kerberos IV klogin protocol even if this is not a klogin port.",
8510 " ",
8511 #ifdef CK_ENCRYPTION
8512 " /EK4LOGIN",
8513 "   Use Kerberos IV Encrypted login protocol even if this is not an eklogin",
8514 "   port.",
8515 " ",
8516 #endif /* CK_ENCRYPTION */
8517 #endif /* KRB4 */
8518 #ifdef KRB5
8519 " /K5LOGIN",
8520 "   Use Kerberos V klogin protocol even if this is not a klogin port.",
8521 " ",
8522 #ifdef CK_ENCRYPTION
8523 " /EK5LOGIN",
8524 "   Use Kerberos V Encrypted login protocol even if this is not an eklogin",
8525 "   port.",
8526 " ",
8527 #endif /* CK_ENCRYPTION */
8528 #endif /* KRB5 */
8529 #endif /* RLOGCODE */
8530 #endif /* CK_KERBEROS */
8531 #ifdef CK_SSL
8532 " /SSL",
8533 "   Perform SSL negotiations.",
8534 " ",
8535 " /SSL-TELNET",
8536 "   Perform SSL negotiations and if successful start Telnet negotiations.",
8537 " ",
8538 " /TLS",
8539 "   Perform TLS negotiations.",
8540 " ",
8541 " /TLS-TELNET",
8542 "   Perform TLS negotiations and if successful start Telnet negotiations.",
8543 " ",
8544 #endif /* CK_SSL */
8545 "Examples:",
8546 "  SET HOST kermit.columbia.edu",
8547 "  SET HOST /CONNECT kermit.columbia.edu",
8548 "  SET HOST * 1649",
8549 "  SET HOST /SERVER * 1649",
8550 "  SET HOST 128.59.39.2",
8551 "  SET HOST madlab.sprl.umich.edu 3000",
8552 "  SET HOST xyzcorp.com 2000 /RAW-SOCKET",
8553 #ifdef SSHBUILTIN
8554 "  SET HOST /NET:SSH kermit.columbia.edu /x11-forwarding:on",
8555 #endif /* SSHBUILTIN */
8556 #ifdef NETCMD
8557 "  SET HOST /CONNECT /COMMAND rlogin xyzcorp.com",
8558 #endif /* NETCMD */
8559 " ",
8560 #ifdef SUPERLAT
8561 "Notes:",
8562 " ",
8563 " . The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
8564 "   SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
8565 " ",
8566 " . For SUPERLAT connections, the hostname-or-address may be either a service",
8567 "   name, or a node/port combination, as required by your LAT host.",
8568 #else
8569 "The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
8570 "SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
8571 #endif /* SUPERLAT */
8572 " ",
8573 "Also see SET NETWORK, TELNET, SET TELNET.",
8574 "" };
8575 
8576 static char *hmxyauth[] = {
8577 "Synatx: SET AUTHENTICATION <auth_type> <parameter> <value>",
8578 "  Sets defaults for the AUTHENTICATE command:",
8579 " ",
8580 #ifdef CK_KERBEROS
8581 "SET AUTHENTICATION KERBEROS5 ADDRESSES {list of ip-addresses}",
8582 "  Specifies a list of IP addresses that should be placed in the Ticket",
8583 "  Getting Ticket in addition to the local machine addresses.",
8584 " ",
8585 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTODESTROY",
8586 "  { ON-CLOSE, ON-EXIT, NEVER }",
8587 "  When ON, Kermit will destroy all credentials in the default",
8588 "  credentials cache upon Kermit termination.  Default is NEVER.",
8589 " ",
8590 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTOGET { ON, OFF }",
8591 "  When ON, if the host offers Kerberos 4 or Kerberos 5 authentication",
8592 "  and Kermit is configured to use that authentication method and there",
8593 "  is no TGT, Kermit will automatically attempt to retrieve one by",
8594 "  prompting for the password (and principal if needed.)  Default is ON.",
8595 " ",
8596 "SET AUTHENTICATION KERBEROS5 CREDENTIALS-CACHE <filename>",
8597 "  Allows an alternative credentials cache to be specified.  This is useful",
8598 "  when you need to maintain two or more sets of credentials for different",
8599 "  realms or roles.  The default is specified by the environment variable",
8600 "  KRB5CCNAME or as reported by the Kerberos 5 library.",
8601 " ",
8602 "SET AUTHENTICATION KERBEROS5 FORWARDABLE { ON, OFF }",
8603 "  When ON, specifies that Kerberos 5 credentials should be forwardable to",
8604 "  the host.  If SET TELNET AUTHENTICATION FORWARDING is ON, forwardable",
8605 "  credentials are sent to the host.  The default is OFF.",
8606 " ",
8607 "SET AUTHENTICATION KERBEROS5 GET-K4-TGT { ON, OFF }",
8608 "  When ON, specifies that Kerberos 4 credentials should be requested each",
8609 "  time Kerberos 5 credentials are requested with AUTH KERBEROS5 INIT.",
8610 "  Default is OFF.",
8611 " ",
8612 "SET AUTHENTICATION KERBEROS4 INSTANCE <instance>",
8613 "  Allows a Kerberos 4 instance to be specified as a default (if needed).",
8614 " ",
8615 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } KEYTAB <filename>",
8616 "  Specifies the location of the keytab file used to authenticate incoming",
8617 "  connections.  The default is none, which means to use the default value",
8618 "  configured in the Kerberos installation.",
8619 " ",
8620 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } LIFETIME <minutes>",
8621 "  Specifies the lifetime of the TGTs requested from the KDC.  The default",
8622 "  is 600 minutes (10 hours).",
8623 " ",
8624 "SET AUTHENTICATION KERBEROS5 NO-ADDRESSES { ON, OFF }",
8625 "  Specifies whether or not IP addresses will be inserted into the TGT."
8626 "  Default is OFF.",
8627 " ",
8628 "SET AUTHENTICATION KERBEROS4 PREAUTH { ON, OFF }",
8629 "  Allows Kerberos 4 preauthenticated TGT requests to be turned off.  The",
8630 "  default is ON.  Only use if absolutely necessary.  We recommend that",
8631 "  preauthenticated requests be required for all tickets returned by a KDC",
8632 "  to a requestor.",
8633 " ",
8634 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL <name>",
8635 "  When Kermit starts, it attempts to set the principal name to that stored",
8636 "  in the current credentials cache.  If no credential cache exists, the",
8637 "  current SET LOGIN USERID value is used.  SET LOGIN USERID is set to the",
8638 "  operating system's current username when Kermit is started.  To force",
8639 "  Kermit to prompt the user for the principal name when requesting TGTs,",
8640 "  place:",
8641 " ",
8642 "    SET AUTH K4 PRINCIPAL {}",
8643 "    SET AUTH K5 PRINCIPAL {}",
8644 " ",
8645 "  in the Kermit initialization file or connection script.",
8646 " ",
8647 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PASSWORD <prompt>",
8648 "  Specifies a custom prompt to be used when prompting for a password.",
8649 "  The Kerberos prompt strings may contain two %s replacement fields.",
8650 "  The first %s is replaced by the principal name; the second by the realm.",
8651 " ",
8652 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PRINCIPAL <prompt>",
8653 "  Specifies a custom prompt to be used when prompting for the Kerberos",
8654 "  principal name.  No %s replacement fields may be used.  Kermit prompts",
8655 "  for a principal name when retrieving a TGT if the command:",
8656 " ",
8657 "    SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL {}",
8658 " ",
8659 "  has been issued.",
8660 " ",
8661 "SET AUTHENTICATION KERBEROS5 PROXIABLE { ON, OFF }",
8662 "  When ON, specifies that Kerberos 5 credentials should be proxiable.",
8663 "  Default is OFF.",
8664 " ",
8665 "SET AUTHENTICATION KERBEROS5 RENEWABLE <minutes>",
8666 "  When <minutes> is greater than the ticket lifetime a TGT may be renewed",
8667 "  with AUTH K5 INIT /RENEW instead of getting a new ticket as long as the",
8668 "  ticket is not expired and its within the renewable lifetime.  Default is",
8669 "  0 (zero) minutes.",
8670 " ",
8671 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } REALM <name>",
8672 "  If no default is set, the default realm configured for the Kerberos",
8673 "  libraries is used.  Abbreviations accepted.",
8674 " ",
8675 "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } SERVICE-NAME <name>",
8676 "  This command specifies the service ticket name used to authenticate",
8677 "  to the host when Kermit is used as a client; or the service ticket",
8678 "  name accepted by Kermit when it is acting as the host.",
8679 "  If no default is set, the default service name for Kerberos 4 is",
8680 "  \"rcmd\" and for Kerberos 5 is \"host\".",
8681 " ",
8682 #endif /* CK_KERBEROS */
8683 #ifdef CK_SRP
8684 "SET AUTHENTICATION SRP PROMPT PASSWORD <prompt>",
8685 "  Specifies a custom prompt to be used when prompting for a password.",
8686 "  The SRP prompt string may contain one %s replacement fields which is",
8687 "  replaced by the login userid.",
8688 " ",
8689 #endif /* CK_SRP */
8690 #ifdef CK_SSL
8691 "In all of the following commands \"SSL\" and \"TLS\" are aliases.",
8692 " ",
8693 "SET AUTHENTICATION { SSL, TLS } CIPHER-LIST <list of ciphers>",
8694 "Applies to both SSL and TLS.  A colon separated list of any of the following",
8695 "(case sensitive) options depending on the options chosen when OpenSSL was ",
8696 "compiled: ",
8697 " ",
8698 "  Key Exchange Algorithms:",
8699 "    \"kRSA\"      RSA key exchange",
8700 "    \"kDHr\"      Diffie-Hellman key exchange (key from RSA cert)",
8701 "    \"kDHd\"      Diffie-Hellman key exchange (key from DSA cert)",
8702 "    \"kEDH\"      Ephemeral Diffie-Hellman key exchange (temporary key)",
8703 "    \"kKRB5\"     Kerberos 5",
8704 " ",
8705 "  Authentication Algorithm:",
8706 "    \"aNULL\"     No authentication",
8707 "    \"aRSA\"      RSA authentication",
8708 "    \"aDSS\"      DSS authentication",
8709 "    \"aDH\"       Diffie-Hellman authentication",
8710 "    \"aKRB5\"     Kerberos 5",
8711 " ",
8712 "  Cipher Encoding Algorithm:",
8713 "    \"eNULL\"     No encodiing",
8714 "    \"DES\"       DES encoding",
8715 "    \"3DES\"      Triple DES encoding",
8716 "    \"RC4\"       RC4 encoding",
8717 "    \"RC2\"       RC2 encoding",
8718 "    \"IDEA\"      IDEA encoding",
8719 " ",
8720 "  MAC Digest Algorithm:",
8721 "    \"MD5\"       MD5 hash function",
8722 "    \"SHA1\"      SHA1 hash function",
8723 "    \"SHA\"       SHA hash function (should not be used)",
8724 " ",
8725 "  Aliases:",
8726 "    \"SSLv2\"     all SSL version 2.0 ciphers (should not be used)",
8727 "    \"SSLv3\"     all SSL version 3.0 ciphers",
8728 "    \"EXP\"       all export ciphers (40-bit)",
8729 "    \"EXPORT56\"  all export ciphers (56-bit)",
8730 "    \"LOW\"       all low strength ciphers (no export)",
8731 "    \"MEDIUM\"    all ciphers with 128-bit encryption",
8732 "    \"HIGH\"      all ciphers using greater than 128-bit encryption",
8733 "    \"RSA\"       all ciphers using RSA key exchange",
8734 "    \"DH\"        all ciphers using Diffie-Hellman key exchange",
8735 "    \"EDH\"       all ciphers using Ephemeral Diffie-Hellman key exchange",
8736 "    \"ADH\"       all ciphers using Anonymous Diffie-Hellman key exchange",
8737 "    \"DSS\"       all ciphers using DSS authentication",
8738 "    \"KRB5\"      all ciphers using Kerberos 5 authentication",
8739 "    \"NULL\"      all ciphers using no encryption",
8740 " ",
8741 "Each item in the list may include a prefix modifier:",
8742 " ",
8743 "    \"+\"         move cipher(s) to the current location in the list",
8744 "    \"-\"         remove cipher(s) from the list (may be added again by",
8745 "                a subsequent list entry)",
8746 "    \"!\"         kill cipher from the list (it may not be added again",
8747 "                by a subsequent list entry)",
8748 " ",
8749 "If no modifier is specified the entry is added to the list at the current ",
8750 "position.  \"+\" may also be used to combine tags to specify entries such as "
8751 ,
8752 "\"RSA+RC4\" describes all ciphers that use both RSA and RC4.",
8753 " ",
8754 "For example, all available ciphers not including ADH key exchange:",
8755 " ",
8756 "  ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP",
8757 " ",
8758 "All algorithms including ADH and export but excluding patented algorithms: ",
8759 " ",
8760 "  HIGH:MEDIUM:LOW:EXPORT56:EXP:ADH:!kRSA:!aRSA:!RC4:!RC2:!IDEA",
8761 " ",
8762 "The OpenSSL command ",
8763 " ",
8764 "  openssl.exe ciphers -v <list of ciphers> ",
8765 " ",
8766 "may be used to list all of the ciphers and the order described by a specific",
8767 "<list of ciphers>.",
8768 " ",
8769 "SET AUTHENTICATION { SSL, TLS } CRL-DIR <directory>",
8770 "specifies a directory that contains certificate revocation files where each",
8771 "file is named by the hash of the certificate that has been revoked.",
8772 " ",
8773 "  OpenSSL expects the hash symlinks to be made like this:",
8774 " ",
8775 "    ln -s crl.pem `openssl crl -hash -noout -in crl.pem`.r0",
8776 " ",
8777 "  Since not all file systems have symlinks you can use the following command",
8778 "  in Kermit to copy the crl.pem file to the hash file name.",
8779 " ",
8780 "     copy crl.pem {\\fcommand(openssl.exe crl -hash -noout -in crl.pem).r0}",
8781 " ",
8782 "  This produces a hash based on the issuer field in the CRL such ",
8783 "  that the issuer field of a Cert may be quickly mapped to the ",
8784 "  correct CRL.",
8785 " ",
8786 "SET AUTHENTICATION { SSL, TLS } CRL-FILE <filename>",
8787 "specifies a file that contains a list of certificate revocations.",
8788 " ",
8789 "SET AUTHENTICATION { SSL, TLS } DEBUG { ON, OFF }",
8790 "specifies whether debug information should be displayed about the SSL/TLS",
8791 "connection.  When DEBUG is ON, the VERIFY command does not terminate",
8792 "connections when set to FAIL-IF-NO-PEER-CERT when a certificate is",
8793 "presented that cannot be successfully verified.  Instead each error",
8794 "is displayed but the connection automatically continues.",
8795 " ",
8796 "SET AUTHENTICATION { SSL, TLS } DH-PARAM-FILE <filename>",
8797 "  Specifies a file containing DH parameters which are used to generate",
8798 "  temporary DH keys.  If a DH parameter file is not provided Kermit uses a",
8799 "  fixed set of parameters depending on the negotiated key length.  Kermit",
8800 "  provides DH parameters for key lengths of 512, 768, 1024, 1536, and 2048",
8801 "  bits.",
8802 " ",
8803 "SET AUTHENTICATION { SSL, TLS } DSA-CERT-CHAIN-FILE <filename>",
8804 "  Specifies a file containing a DSA certificate chain to be sent along with",
8805 "  the DSA-CERT to the peer.  This file must only be specified if Kermit is",
8806 "  being used as a server and the DSA certificate was signed by an",
8807 "  intermediary certificate authority.",
8808 " ",
8809 "SET AUTHENTICATION { SSL, TLS } DSA-CERT-FILE <filename>",
8810 "  Specifies a file containing a DSA certificate to be sent to the peer to ",
8811 "  authenticate the host or end user.  The file may contain the matching DH ",
8812 "  private key instead of using the DSA-KEY-FILE command.",
8813 " ",
8814 "SET AUTHENTICATION { SSL, TLS } DSA-KEY-FILE <filename>",
8815 "Specifies a file containing the private DH key that matches the DSA ",
8816 "certificate specified with DSA-CERT-FILE.  This command is only necessary if",
8817 "the private key is not appended to the certificate in the file specified by",
8818 "DSA-CERT-FILE.",
8819 " ",
8820 "  Note: When executing a script in the background or when it is",
8821 "  running as an Internet Kermit Service Daemon, Kermit cannot support ",
8822 "  encrypted private keys.  When attempting to load a private key that is",
8823 "  encrypted, a prompt will be generated requesting the passphrase necessary",
8824 "  to decrypt the keyfile.  To automate access to the private key you must",
8825 "  decrypt the encrypted keyfile and create an unencrypted keyfile for use",
8826 "  by Kermit.  This can be accomplished by using the following command and",
8827 "  the passphrase:",
8828 " ",
8829 "  openssl dsa -in <encrypted-key-file> -out <unencrypted-key-file>",
8830 " ",
8831 "SET AUTHENTICATION { SSL, TLS } RANDOM-FILE <filename>",
8832 "  Specifies a file containing random data to be used as seed for the",
8833 "  Pseudo Random Number Generator.  The contents of the file are",
8834 "  overwritten with new random data on each use.",
8835 " ",
8836 "SET AUTHENTICATION { SSL, TLS } RSA-CERT-CHAIN-FILE <filename>",
8837 "  Specifies a file containing a RSA certificate chain to be sent along with",
8838 "  the RSA-CERT to the peer.  This file must only be specified if Kermit is",
8839 "  being used as a server and the RSA certificate was signed by an",
8840 "  intermediary certificate authority.",
8841 " ",
8842 "SET AUTHENTICATION { SSL, TLS } RSA-CERT-FILE <filename>",
8843 "  Specifies a file containing a RSA certificate to be sent to the peer to ",
8844 "  authenticate the host or end user.  The file may contain the matching RSA ",
8845 "  private key instead of using the RSA-KEY-FILE command.",
8846 " ",
8847 "SET AUTHENTICATION { SSL, TLS } RSA-KEY-FILE <filename>",
8848 "  Specifies a file containing the private RSA key that matches the RSA",
8849 "  certificate specified with RSA-CERT-FILE.  This command is only necessary",
8850 "  if the private key is not appended to the certificate in the file specified"
8851 ,
8852 "  by RSA-CERT-FILE.  ",
8853 " ",
8854 "  Note: When executing a script in the background or when it is",
8855 "  running as an Internet Kermit Service Daemon, Kermit cannot support ",
8856 "  encrypted private keys.  When attempting to load a private key that is",
8857 "  encrypted, a prompt will be generated requesting the passphrase necessary",
8858 "  to decrypt the keyfile.  To automate access to the private key you must",
8859 "  decrypt the encrypted keyfile and create an unencrypted keyfile for use",
8860 "  by Kermit.  This can be accomplished by using the following command and",
8861 "  the passphrase:",
8862 " ",
8863 "  openssl rsa -in <encrypted-key-file> -out <unencrypted-key-file>",
8864 " ",
8865 "SET AUTHENTICATION { SSL, TLS } VERBOSE { ON, OFF }",
8866 "  Specifies whether information about the authentication (ie, the",
8867 "  certificate chain) should be displayed upon making a connection.",
8868 " ",
8869 "SET AUTHENTICATION { SSL, TLS } VERIFY { NO,PEER-CERT,FAIL-IF-NO-PEER-CERT }",
8870 "  Specifies whether certificates should be requested from the peer verified;",
8871 "  whether they should be verified when they are presented; and whether they",
8872 "  should be required.  When set to NO (the default for IKSD), Kermit does",
8873 "  not request that the peer send a certificate; if one is presented it is",
8874 "  ignored.  When set to PEER-CERT (the default when not IKSD), Kermit",
8875 "  requests a certificate be sent by the peer.  If presented, the certificate",
8876 "  is verified.  Any errors during the verification process result in",
8877 "  queries to the end user.  When set to FAIL-IF-NO-PEER-CERT, Kermit",
8878 "  requests a certificate be sent by the peer.  If the certificate is not",
8879 "  presented or fails to verify, the connection is terminated without",
8880 "  querying the user.",
8881 " ",
8882 "  If an anonymous cipher (i.e., ADH) is desired, the NO setting must be",
8883 "  used.  Otherwise, the receipt of the peer certificate request is",
8884 "  interpreted as a protocol error and the negotiation fails.",
8885 " ",
8886 "  If you wish to allow the peer to authenticate using either an X509",
8887 "  certificate to userid mapping function or via use of a ~/.tlslogin file",
8888 "  you must use either PEER-CERT or FAIL-IF-NO-PEER-CERT.  Otherwise, any",
8889 "  certificates that are presented is ignored.  In other words, use NO if you",
8890 "  want to disable the ability to use certificates to authenticate a peer.",
8891 " ",
8892 "SET AUTHENTICATION { SSL, TLS } VERIFY-DIR <directory>",
8893 "  Specifies a directory that contains root CA certificate files used to",
8894 "  verify the certificate chains presented by the peer.  Each file is named",
8895 "  by a hash of the certificate.",
8896 " ",
8897 "  OpenSSL expects the hash symlinks to be made like this:",
8898 " ",
8899 "    ln -s cert.pem `openssl x509 -hash -noout -in cert.pem`.0",
8900 " ",
8901 "  Since not all file systems have symlinks you can use the following command",
8902 "  in Kermit to copy the cert.pem file to the hash file name.",
8903 " ",
8904 "    copy cert.pem {\\fcommand(openssl.exe x509 -hash -noout -in cert.pem).0}",
8905 " ",
8906 "  This produces a hash based on the subject field in the cert such that the",
8907 "  certificate may be quickly found.",
8908 " ",
8909 "SET AUTHENTICATION { SSL, TLS } VERIFY-FILE <file>",
8910 "  Specifies a file that contains root CA certificates to be used for",
8911 "  verifying certificate chains.",
8912 " ",
8913 #endif /* CK_SSL */
8914 ""
8915 };
8916 
8917 static char *hxynet[] = {
8918 "Syntax: SET NETWORK { TYPE network-type, DIRECTORY [ file(s)... ] }",
8919 " ",
8920 "Select the type of network to be used with SET HOST connections:",
8921 " ",
8922 #ifdef NETCMD
8923 "  SET NETWORK TYPE COMMAND   ; Make a connection through an external command",
8924 #endif /* NETCMD */
8925 #ifdef TCPSOCKET
8926 "  SET NETWORK TYPE TCP/IP    ; Internet: Telnet, Rlogin, etc.",
8927 #endif /* TCPSOCKET */
8928 #ifdef ANYX25
8929 "  SET NETWORK TYPE X.25      ; X.25 peer-to-peer connections.",
8930 #endif /* ANYX25 */
8931 #ifdef DECNET
8932 "  SET NETWORK TYPE PATHWORKS { LAT, CTERM } ; DEC LAT or CTERM connections.",
8933 #endif /* DECNET */
8934 #ifdef NPIPE
8935 "  SET NETWORK TYPE NAMED-PIPE <pipename>  ; OS/2 Named Pipe connections.",
8936 #endif /* NPIPE */
8937 #ifdef CK_NETBIOS
8938 "  SET NETWORK TYPE NETBIOS                ; NETBIOS peer-to-peer connections",
8939 #endif /* CK_NETBIOS */
8940 #ifdef SUPERLAT
8941 "  SET NETWORK TYPE SUPERLAT ; LAT connections (Meridian Technology SuperLAT)",
8942 #endif /* SUPERLAT */
8943 " ",
8944 "If only one network type is listed above, that is the default network for",
8945 #ifdef RLOGCODE
8946 "SET HOST commands.  Also see SET HOST, TELNET, RLOGIN.",
8947 #else
8948 #ifdef TNCODE
8949 "SET HOST commands.  Also see SET HOST, TELNET.",
8950 #else
8951 "SET HOST commands.  Also see SET HOST.",
8952 #endif /* TNCODE */
8953 #endif /* RLOGCODE */
8954 " ",
8955 "SET NETWORK DIRECTORY [ file [ file [ ... ] ] ]",
8956 "  Specifies the name(s) of zero or more network directory files, similar to",
8957 "  dialing directories (HELP DIAL for details).  The general format of a",
8958 "  network directory entry is:",
8959 " ",
8960 "    name network-type address [ network-specific-info ] [ ; comment ]",
8961 " ",
8962 "  For TCP/IP, the format is:",
8963 " ",
8964 "    name tcp/ip ip-hostname-or-address [ socket ] [ ; comment ]",
8965 " ",
8966 "You can have multiple network directories and you can have multiple entries",
8967 "with the same name.  SET HOST <name> and TELNET <name> commands look up the",
8968 "given <name> in the directory and, if found, fill in the additional items",
8969 "from the entry, and then try all matching entries until one succeeds.",
8970 ""};
8971 
8972 #ifndef NOTCPOPTS
8973 static char *hxytcp[] = {
8974 #ifdef SOL_SOCKET
8975 "SET TCP ADDRESS <ip-address>",
8976 "  This allows a specific IP Address on a multihomed host to be used",
8977 "  instead of allowing the TCP/IP stack to choose.  This may be necessary",
8978 "  when using authentication or listening for an incoming connection.",
8979 "  Specify no <ip-address> to remove the preference.",
8980 " ",
8981 "SET TCP KEEPALIVE { ON, OFF }",
8982 "  Setting this ON might help to detect broken connections more quickly.",
8983 "  (default is ON.)",
8984 " ",
8985 "SET TCP LINGER { ON [timeout], OFF }",
8986 "  Setting this ON ensures that a connection doesn't close before all",
8987 "  outstanding data has been transferred and acknowledged.  The timeout is",
8988 "  measured in 10ths of milliseconds.  The default is ON with a timeout of 0.",
8989 " ",
8990 "SET TCP NODELAY { ON, OFF }",
8991 "  ON means send short TCP packets immediately rather than waiting",
8992 "  to accumulate a bunch of them before transmitting (Nagle Algorithm).",
8993 "  (default is OFF.)",
8994 " ",
8995 "SET TCP RECVBUF <number>",
8996 "SET TCP SENDBUF <number>",
8997 "   TCP receive and send buffer sizes.  (default is -1, use system defaults.)",
8998 " ",
8999 "These items let you tune TCP networking performance on a per-connection",
9000 "basis by adjusting parameters you normally would not have access to.  You",
9001 "should use these commands only if you feel that the TCP/IP protocol stack",
9002 "that Kermit is using is giving you inadequate performance, and then only if",
9003 "you understand the concepts (see, for example, the Comer TCP/IP books), and",
9004 "then at your own risk.  These settings are displayed by SHOW NETWORK.  Not",
9005 "all options are necessarily available in all Kermit versions; it depends on",
9006 "the underlying TCP/IP services.",
9007 " ",
9008 "The following TCP and/or IP parameter(s) may also be changed:",
9009 " ",
9010 #endif /* SOL_SOCKET */
9011 "SET TCP REVERSE-DNS-LOOKUP { AUTO, ON, OFF }",
9012 "  Tells Kermit whether to perform reverse DNS lookup on TCP/IP connections",
9013 "  so Kermit can determine the actual hostname of the host it is connected",
9014 "  to, which is useful for connections to host pools, and is required for",
9015 "  Kerberos connections to host pools and for incoming connections.  If the",
9016 "  other host does not have a DNS entry, the reverse lookup could take a long",
9017 "  time (minutes) to fail, but the connection will still be made.  Turn this",
9018 "  option OFF for speedier connections if you do not need to know exactly",
9019 "  which host you are connected to and you are not using Kerberos.  AUTO, the",
9020 "  default, means the lookup is done on hostnames, but not on numeric IP",
9021 "  addresses unless Kerberos support is installed.",
9022 #ifdef CK_DNS_SRV
9023 " ",
9024 "SET TCP DNS-SERVICE-RECORDS {ON, OFF}",
9025 "  Tells Kermit whether to try to use DNS SRV records to determine the",
9026 "  host and port number upon which to find an advertised service.  For",
9027 "  example, if a host wants regular Telnet connections redirected to some",
9028 "  port other than 23, this feature allows Kermit to ask the host which",
9029 "  port it should use.  Since not all domain servers are set up to answer",
9030 "  such requests, this feature is OFF by default.",
9031 #endif /* CK_DNS_SRV */
9032 #ifdef NT
9033 #ifdef CK_SOCKS
9034 " ",
9035 "SET TCP SOCKS-SERVER [<hostname or ip-address>]",
9036 "  If a hostname or ip-address is specified, Kermit will use the SOCKS",
9037 "  server when attempting outgoing connections.  If no hostname or",
9038 "  ip-address is specified, any previously specified SOCKS server will",
9039 "  be removed.",
9040 #endif /* CK_SOCKS */
9041 #endif /* NT */
9042 #ifndef NOHTTP
9043 " ",
9044 "SET TCP HTTP-PROXY [<hostname or ip-address>[:<port>]]",
9045 "  If a hostname or ip-address is specified, Kermit will use the Proxy",
9046 "  server when attempting outgoing connections.  If no hostname or",
9047 "  ip-address is specified, any previously specified Proxy server will",
9048 "  be removed.  If no port number is specified, the \"http\" service",
9049 "  will be used.",
9050 #endif /* NOHTTP */
9051 ""};
9052 #endif /* NOTCPOPTS */
9053 #endif /* NETCONN */
9054 
9055 #ifdef TNCODE
9056 static char *hxytopt[] = {
9057 "SET TELOPT [ { /CLIENT, /SERVER } ] <option> -",
9058 "    { ACCEPTED, REFUSED, REQUESTED, REQUIRED } -",
9059 "    [ { ACCEPTED, REFUSED, REQUESTED, REQUIRED } ]",
9060 "  SET TELOPT lets you specify policy requirements for Kermit's handling of",
9061 "  Telnet option negotiations.  Setting an option REQUIRED causes Kermit",
9062 "  to offer the option to the peer and disconnect if the option is refused.",
9063 "  REQUESTED causes Kermit to offer an option to the peer.  ACCEPTED results",
9064 "  in no offer but Kermit will attempt to negotiate the option if it is",
9065 "  requested.  REFUSED instructs Kermit to refuse the option if it is",
9066 "  requested by the peer.",
9067 " ",
9068 "  Some options are negotiated in two directions and accept separate policies",
9069 "  for each direction; the first keyword applies to Kermit itself, the second",
9070 "  applies to Kermit's Telnet partner; if the second keyword is omitted, an",
9071 "  appropriate (option-specific) default is applied.  You can also include a",
9072 "  /CLIENT or /SERVER switch to indicate whether the given policies apply",
9073 "  when Kermit is the Telnet client or the Telnet server; if no switch is",
9074 "  given, the command applies to the client.",
9075 " ",
9076 "  Note that some of Kermit's Telnet partners fail to refuse options that",
9077 "  they do not recognize and instead do not respond at all.  In this case it",
9078 "  is possible to use SET TELOPT to instruct Kermit to REFUSE the option",
9079 "  before connecting to the problem host, thus skipping the problematic",
9080 "  negotiation.",
9081 " ",
9082 "  Use SHOW TELOPT to view current Telnet Option negotiation settings.",
9083 "  SHOW TELNET displays current Telnet settings.",
9084 ""};
9085 
9086 static char *hxytel[] = {
9087 "Syntax: SET TELNET parameter value",
9088 " ",
9089 "For TCP/IP TELNET connections, which are in NVT (ASCII) mode by default:",
9090 " ",
9091 #ifdef CK_AUTHENTICATION
9092 #ifdef COMMENT
9093 "SET TELNET AUTHENICATION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
9094 "  ACCEPT or REFUSE authentication bids, or actively REQUEST authentication.",
9095 "  REQUIRED refuses the connection if authentication is not successfully",
9096 "  negotiated.  ACCEPTED by default.",
9097 " ",
9098 #endif /* COMMENT */
9099 "SET TELNET AUTHENTICATION TYPE { AUTOMATIC, KERBEROS_IV, KERBEROS_V, ...",
9100 #ifdef NT
9101 "  ..., NTLM, SSL, SRP, NONE } [...]",
9102 #else /* NT */
9103 "  ..., SSL, SRP, NONE } [...]",
9104 #endif /* NT */
9105 "  AUTOMATIC is the default.  Available options can vary depending on the",
9106 "  features Kermit was built to support and the operating system",
9107 "  configuration; type SET TELNET AUTHENTICATION TYPE ? for a list.",
9108 " ",
9109 "  When Kermit is the Telnet client:",
9110 "    AUTOMATIC allows the host to choose the preferred type of authentication."
9111 ,
9112 "    NONE instructs Kermit to refuse all authentication methods when the",
9113 "    authentication option is negotiated.  A list of one or more other values",
9114 "    allow a specific subset of the supported authentication methods to be",
9115 "    used.",
9116 " ",
9117 "  When Kermit is the Telnet server:",
9118 "    AUTOMATIC results in available authentication methods being offered",
9119 "    to the telnet client in the following order:",
9120 " ",
9121 #ifdef NT
9122 "      KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
9123 #else /* NT */
9124 "      KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
9125 #endif /* NT */
9126 " ",
9127 "  NONE results in no authentication methods being offered to the Telnet",
9128 "  server when the authentication option is negotiated.  The preferred",
9129 "  method of disabling authentication is:",
9130 " ",
9131 "    SET TELOPT /SERVER AUTHENTICATION REFUSE",
9132 " ",
9133 "  A list of one or more authentication methods specifies the order those",
9134 "  methods are to be offered to the telnet client.",
9135 #ifdef NT
9136 " ",
9137 "  If you wish to allow NTLM authentication to be used with the Microsoft",
9138 "  Windows 2000 or Services for Unix Telnet client you must specify a list",
9139 "  with NTLM as the first item in the list.  By default, NTLM is the last",
9140 "  item in the list because it does not provide any form of data encryption.",
9141 #endif /* NT */
9142 " ",
9143 #ifdef CK_KERBEROS
9144 "SET TELNET AUTHENTICATION FORWARDING { ON, OFF }",
9145 "  Set this to ON to forward Kerberos V ticket-granting-tickets to the host",
9146 "  after authentication is complete.  OFF by default.",
9147 " ",
9148 #endif /* CK_KERBEROS */
9149 "SET TELNET AUTHENTICATION ENCRYPT-FLAG { ANY, NONE, TELOPT }",
9150 "  Use this command to specify which AUTH telopt encryption flags may be",
9151 "  accepted in client mode or offered in server mode.  The default is ANY.",
9152 " ",
9153 "SET TELNET AUTHENTICATION HOW-FLAG { ANY, ONE-WAY, MUTUAL }",
9154 "  Use this command to specify which AUTH telopt how flags may be",
9155 "  accepted in client mode or offered in server mode.  The default is ANY.",
9156 " ",
9157 #endif /* CK_AUTHENTICATION */
9158 #ifdef COMMENT
9159 "SET TELNET BINARY-MODE { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
9160 "  ACCEPT or REFUSE binary-mode bids, or actively REQUEST binary mode.",
9161 "  REQUIRED refuses the connection if binary mode is not successfully",
9162 "  negotiated in both directions.  ACCEPTED by default.",
9163 " ",
9164 #endif /* COMMENT */
9165 "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
9166 "  When ON (OFF by default) and BINARY negotiations are not REFUSED Kermit",
9167 "  will attempt to negotiate BINARY mode in each direction before the start",
9168 "  of each file transfer.  After the transfer is complete BINARY mode will",
9169 "  be restored to the pre-transfer state.",
9170 " ",
9171 "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
9172 "  Set this command to ON if you want to force Kermit to negotiate",
9173 "  Telnet Binary in both directions when performing file transfers.",
9174 "  Default is OFF.  Alias SET TELNET BINARY-XFER-MODE.",
9175 " ",
9176 "SET TELNET BUG AUTH-KRB5-DES { ON, OFF }",
9177 "  Default is ON.  Disable this bug to enable the use of encryption types",
9178 "  other than DES such as 3DES or CAST-128 when the Kerberos 5 session key",
9179 "  is longer than 8 bytes.",
9180 " ",
9181 "SET TELNET BUG BINARY-ME-MEANS-U-TOO { ON, OFF }",
9182 "  Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
9183 "  Kermit's TELNET partner.",
9184 " ",
9185 "SET TELNET BUG BINARY-U-MEANS-ME-TOO { ON, OFF }",
9186 "  Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
9187 "  Kermit's TELNET partner.",
9188 " ",
9189 "SET TELNET BUG INFINITE-LOOP-CHECK { ON, OFF }",
9190 "  Set this to ON to prevent Kermit from responding to a telnet negotiation",
9191 "  sequence that enters an infinite loop.  The default is OFF because this",
9192 "  should never occur.",
9193 " ",
9194 "SET TELNET BUG SB-IMPLIES-WILL-DO { ON, OFF }",
9195 "  Set this to ON to allow Kermit to respond to telnet sub-negotiations if",
9196 "  the peer forgets to respond to WILL with DO or to DO with WILL.",
9197 " ",
9198 "SET TELNET DEBUG { ON, OFF }",
9199 "  Set this to ON to display telnet negotiations as they are sent and",
9200 "  received.",
9201 " ",
9202 "SET TELNET DELAY-SB { ON, OFF }",
9203 "  When ON, telnet subnegotiation responses are delayed until after all",
9204 "  authentication and encryption options are either successfully negotiated",
9205 "  or refused. This ensures that private data is protected.  When OFF, telnet",
9206 "  subnegotiation responses are sent immediately.  The default is ON.",
9207 " ",
9208 "SET TELNET ECHO { LOCAL, REMOTE }",
9209 "  Kermit's initial echoing state for TELNET connections, LOCAL by default.",
9210 "  After the connection is made, TELNET negotiations determine the echoing.",
9211 " ",
9212 #ifdef CK_ENCRYPTION
9213 #ifdef COMMENT
9214 "SET TELNET ENCRYPTION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
9215 "  ACCEPT or REFUSE encryption bids, or actively REQUEST encryption in both.",
9216 "  directions.  REQUIRED refuses the connection if encryption is not",
9217 "  successfully negotiated in both directions.  ACCEPTED by default.",
9218 " ",
9219 #endif /* COMMENT */
9220 "SET TELNET ENCRYPTION TYPE { AUTOMATIC, CAST128_CFB64, CAST128_OFB64, ",
9221 "  CAST5_40_CFB64, CAST5_40_OFB64, DES_CFB64, DES_OFB64, NONE }",
9222 "  AUTOMATIC allows the host to choose the preferred type of encryption.",
9223 "  Other values allow a specific encryption method to be specified.",
9224 "  AUTOMATIC is the default.  The list of options will vary depending",
9225 "  on the encryption types selected at compilation time.",
9226 " ",
9227 #endif /* CK_ENCRYPTION */
9228 #ifdef CK_ENVIRONMENT
9229 #ifdef COMMENT
9230 "SET TELNET ENVIRONMENT { ON, OFF, variable-name [ value ] }",
9231 "  This feature lets Kermit send the values of certain environment variables",
9232 "  to the other computer if it asks for them.  The variable-name can be any",
9233 "  of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
9234 "  \"SYSTEMTYPE\", or \"DISPLAY\".  Some Telnet servers, if given a USER",
9235 "  value in this way, will accept it and therefore not prompt you for user",
9236 "  name when you log in.  The default values are taken from your environment;",
9237 "  use this command to change or remove them.  See RFC1572 for details.  You",
9238 "  may also specify OFF to disable this feature, and ON to re-enable it.",
9239 " ",
9240 #else
9241 "SET TELNET ENVIRONMENT { variable-name [ value ] }",
9242 "  This feature lets Kermit send the values of certain environment variables",
9243 "  to the other computer if it asks for them.  The variable-name can be any",
9244 "  of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
9245 "  \"SYSTEMTYPE\", or \"DISPLAY\".  Some Telnet servers, if given a USER",
9246 "  value in this way, will accept it and therefore not prompt you for user",
9247 "  name when you log in.  The default values are taken from your environment;",
9248 "  use this command to change or remove them.  See RFC1572 for details.",
9249 " ",
9250 #endif /* COMMENT */
9251 #endif /* CK_ENVIRONMENT */
9252 #ifdef CK_FORWARD_X
9253 "SET TELNET FORWARD-X XAUTHORITY-FILE <file>",
9254 "  If your X Server requires X authentication and the location of the",
9255 "  .Xauthority file is not defined by the XAUTHORITY environment variable,",
9256 "  use this command to specify the location of the .Xauthority file."
9257 "  ",
9258 #endif /* CK_FORWARD_X */
9259 #ifdef CK_SNDLOC
9260 "SET TELNET LOCATION [ text ]",
9261 "  Location string to send to the Telnet server if it asks.  By default this",
9262 "  is picked up from the LOCATION environment variable.  Give this command",
9263 "  with no text to disable this feature.",
9264 " ",
9265 #endif /* CK_SNDLOC */
9266 "SET TELNET NEWLINE-MODE { NVT, BINARY-MODE } { OFF, ON, RAW }",
9267 
9268 "  Determines how carriage returns are handled on TELNET connections.  There",
9269 "  are separate settings for NVT (ASCII) mode and binary mode.  ON (default",
9270 "  for NVT mode) means CRLF represents CR.  OFF means CR followed by NUL",
9271 "  represents CR.  RAW (default for BINARY mode) means CR stands for itself.",
9272 " ",
9273 #ifdef TCPSOCKET
9274 "SET TELNET PROMPT-FOR-USERID <prompt>",
9275 "  Specifies a custom prompt to be used when prompting for a userid.  Kermit",
9276 "  prompts for a userid if the command:",
9277 " ",
9278 "    SET LOGIN USERID {}",
9279 " ",
9280 "  has been issued prior to a Telnet authentication negotiation for an",
9281 "  authentication type that requires the transmission of a name, such as",
9282 "  Secure Remote Password.",
9283 " ",
9284 #endif /* TCPSOCKET */
9285 "SET TELNET REMOTE-ECHO { ON, OFF }",
9286 "  Applies only to incoming connections created with:",
9287 "    SET HOST * <port> /TELNET",
9288 "  This command determines whether Kermit will actually echo characters",
9289 "  received from the remote when it has negotiated to do so.  The default",
9290 "  is ON.  Remote echoing may be turned off when it is necessary to read",
9291 "  a password with the INPUT command.",
9292 " ",
9293 "SET TELNET TERMINAL-TYPE name",
9294 "  The terminal type to send to the remote TELNET host.  If none is given,",
9295 #ifdef OS2
9296 "  your current SET TERMINAL TYPE value is sent, e.g. VT220.",
9297 " ",
9298 #else
9299 "  your local terminal type is sent.",
9300 " ",
9301 #endif /* OS2 */
9302 "SET TELNET WAIT-FOR-NEGOTIATIONS { ON, OFF }",
9303 "  Each Telnet option must be fully negotiated either On or Off before the",
9304 "  session can continue.  This is especially true with options that require",
9305 "  subnegotiations such as Authentication, Encryption, and Kermit; for",
9306 "  proper support of these options Kermit must wait for the negotiations to",
9307 "  complete.  Of course, Kermit has no way of knowing whether a reply is",
9308 "  delayed or not coming at all, and so will wait a minute or more for",
9309 "  required replies before continuing the session.  If you know that Kermit's",
9310 "  Telnet partner will not be sending the required replies, you can set this",
9311 "  option of OFF to avoid the long timeouts.  Or you can instruct Kermit to",
9312 "  REFUSE specific options with the SET TELOPT command.",
9313 "",
9314 "Type SHOW TELNET to see the current values of these parameters.",
9315 "" };
9316 #endif /* TNCODE */
9317 
9318 #ifndef NOSPL
9319 static char *hxymacr[] = {
9320 "Syntax: SET MACRO parameter value",
9321 "  Controls the behavior of macros.",
9322 " ",
9323 "SET MACRO ECHO { ON, OFF }",
9324 "  Tells whether commands executed from a macro definition should be",
9325 "  displayed on the screen.  OFF by default; use ON for debugging.",
9326 " ",
9327 "SET MACRO ERROR { ON, OFF }",
9328 "  Tells whether a macro should be automatically terminated upon a command",
9329 "  error.  This setting is local to the current macro, and inherited by",
9330 "  subordinate macros.",
9331 "" };
9332 #endif /* NOSPL */
9333 
9334 static char *hmxyprm[] = {
9335 "Syntax: SET PROMPT [ text ]",
9336 " ",
9337 #ifdef MAC
9338 "Prompt text for this program, normally 'Mac-Kermit>'.  May contain backslash",
9339 #else
9340 "Prompt text for this program, normally 'C-Kermit>'.  May contain backslash",
9341 #endif /* MAC */
9342 "codes for special effects.  Surround by { } to preserve leading or trailing",
9343 #ifdef OS2
9344 "spaces.  If text omitted, prompt reverts to K-95>.  Prompt can include",
9345 #else
9346 #ifdef MAC
9347 "spaces.  If text omitted, prompt reverts to Mac-Kermit>.  Prompt can include",
9348 #else
9349 "spaces.  If text omitted, prompt reverts to C-Kermit>.  Prompt can include",
9350 #endif /* OS2 */
9351 #endif /* MAC */
9352 "variables like \\v(dir) or \\v(time) to show current directory or time.",
9353 "" };
9354 
9355 #ifdef UNIX
9356 static char *hxywild[] = {
9357 "Syntax: SET WILDCARD-EXPANSION { KERMIT [ switch ], SHELL, ON, OFF }",
9358 "  KERMIT (the default) means C-Kermit expands filename wildcards in SEND and",
9359 "  similar commands itself, and in incoming GET commands.  Optional switches",
9360 "  are /NO-MATCH-DOT-FILES (\"*\" and \"?\" should not match an initial",
9361 "  period in a filename; this is the default) and /MATCH-DOT-FILES if you",
9362 "  want files whose names begin with \".\" included.  SET WILDCARD SHELL",
9363 "  means that Kermit asks your preferred shell to expand wildcards (this",
9364 "  should not be necessary in C-Kermit 7.0 and later).  HELP WILDCARD for",
9365 "  further information.",
9366 " ",
9367 "  The ON and OFF choices allow you to disable and renable wildcard",
9368 "  processing independent of the KERMIT / SHELL choice.  Disabling wildcards",
9369 "  allows you to process an array or list of filenames without having to",
9370 "  consider whether the names might contain literal wildcard characters.",
9371 "  WARNING: SET WILD OFF also disables internal filename pattern-matching,",
9372 "  used (for example) in creating backup files.",
9373 "" };
9374 #else
9375 static char *hxywild[] = {
9376 "Syntax: SET WILDCARD-EXPANSION { ON, OFF }",
9377 "  ON (the default) means that filenames given to Kermit commands such as",
9378 "  SEND and DIRECTORY are automatically expanded into lists of filenames if",
9379 "  they contain special 'wildcard characters' such as '*'.  You can reference",
9380 "  files whose names contains such characters literally by preceding each",
9381 "  such character with a backslash '\\'.  When dealing programmatically with",
9382 "  a file list, however, you should SET WILDCARD-EXPANSION OFF to force",
9383 "  treat each name in the list as a literal name.  See HELP WILDCARDS for",
9384 "  details about wildcard syntax.",
9385 "" };
9386 #endif /* UNIX */
9387 
9388 #ifndef NOXFER
9389 static char *hxywind[] = {
9390 "Syntax: SET WINDOW-SIZE number",
9391 "  Specifies number of slots for sliding windows, i.e. the number of packets",
9392 "  that can be transmitted before waiting for acknowledgement.  The default",
9393 #ifdef XYZ_INTERNAL
9394 "  for Kermit protocol is one, the maximum is 32; for ZMODEM, the default",
9395 "  is no windowing (0).  For ZMODEM, the window size is really the packet",
9396 "  length, and is used only when non-windowed (streaming) transfers fail; the",
9397 "  ZMODEM window size should be a largish number, like 1024, and it should be",
9398 "  a multiple of 64.",
9399 #else
9400 "  is one, the maximum is 32.  Increased window size might result in reduced",
9401 "  maximum packet length.  Use sliding windows for improved efficiency on",
9402 "  connections with long delays.  A full duplex connection is required, as",
9403 "  well as a cooperating Kermit on the other end.",
9404 #endif /* XYZ_INTERNAL */
9405 "" };
9406 
9407 static char *hxyrpt[] = {
9408 "Syntax: SET REPEAT { COUNTS { ON, OFF }, PREFIX <code> }",
9409 "  SET REPEAT COUNTS turns the repeat-count compression mechanism ON and OFF.",
9410 "  The default is ON.  SET REPEAT PREFIX <code> sets the repeat-count prefix",
9411 "  character to the given code.  The default is 126 (tilde).",
9412 "" };
9413 
9414 static char *hxyrcv[] = {
9415 "Syntax: SET RECEIVE parameter value",
9416 "  Specifies parameters for inbound packets:",
9417 " ",
9418 #ifndef NOCSETS
9419 "SET RECEIVE CHARACTER-SET { AUTOMATIC, MANUAL }",
9420 "  Whether to automatically switch to an appropriate file-character set based",
9421 "  on the transfer character-set announcer, if any, of an incoming text file.",
9422 "  AUTOMATIC by default.  Also see HELP ASSOCIATE.",
9423 " ",
9424 #endif /* NOCSETS */
9425 "SET RECEIVE CONTROL-PREFIX number",
9426 "  ASCII value of prefix character used for quoting control characters in",
9427 "  packets that Kermit receives, normally 35 (number sign).  Don't change",
9428 "  this unless something is wrong with the other Kermit program.",
9429 " ",
9430 "SET RECEIVE END-OF-PACKET number",
9431 "  ASCII value of control character that terminates incoming packets,",
9432 "  normally 13 (carriage return).",
9433 " ",
9434 #ifdef CKXXCHAR
9435 "SET RECEIVE IGNORE-CHARACTER number",
9436 "  ASCII value of character to be discarded when receiving packets, such as",
9437 "  line folding characters.",
9438 " ",
9439 #endif /* CKXXCHAR */
9440 "SET RECEIVE MOVE-TO [ directory ]",
9441 "  If a directory name is specified, then every file that is received",
9442 "  successfully is moved to the given directory immediately after reception",
9443 "  is complete.  Omit the directory name to remove any previously set move-to",
9444 "  directory.",
9445 " ",
9446 "SET RECEIVE PACKET-LENGTH number",
9447 "  Maximum length packet the other Kermit should send.",
9448 " ",
9449 "SET RECEIVE PADDING number",
9450 "  Number of prepacket padding characters to ask for (normally 0).",
9451 " ",
9452 "SET RECEIVE PAD-CHARACTER number",
9453 "  ASCII value of control character to use for padding (normally 0).",
9454 " ",
9455 "SET RECEIVE PATHNAMES {OFF, ABSOLUTE, RELATIVE, AUTO}",
9456 "  If a recognizable path (directory, device) specification appears in an",
9457 "  incoming filename, strip it OFF before trying to create the output file.",
9458 #ifdef CK_MKDIR
9459 "  Otherwise, then if any of the directories in the path don't exist, Kermit",
9460 "  tries to create them, relative to your current or download directory, or",
9461 "  absolutely, as specified.  RELATIVE means force all incoming names, even",
9462 "  if they are absolute, to be relative to your current or download directory."
9463 ,
9464 "  AUTO, which is the default, means RELATIVE if the file sender indicates in",
9465 "  advance that this is a recursive transfer, otherwise OFF.",
9466 #endif /* CK_MKDIR */
9467 " ",
9468 "SET RECEIVE PAUSE number",
9469 "  Milliseconds to pause between packets, normally 0.",
9470 " ",
9471 
9472 #ifdef CK_PERMS
9473 "SET RECEIVE PERMISSIONS { ON, OFF }",
9474 "  Whether to copy file permissions from inbound Attribute packets.",
9475 " ",
9476 #endif /* CK_PERMS */
9477 
9478 "SET RECEIVE RENAME-TO [ template ]",
9479 "  If a template is specified, then every file that is received successfully",
9480 "  \
9481 is renamed according to the given template immediately after it is received.",
9482 "  \
9483 The template should include variables like \\v(filename) or \\v(filenumber).",
9484 "  Omit the template to remove any template previously set.",
9485 " ",
9486 "SET RECEIVE START-OF-PACKET number",
9487 "  ASCII value of character that marks start of inbound packet.",
9488 " ",
9489 "SET RECEIVE TIMEOUT number",
9490 "  Number of seconds the other Kermit should wait for a packet before sending",
9491 "  a NAK or retransmitting.",
9492 #ifdef VMS
9493 " ",
9494 "SET RECEIVE VERSION-NUMBERS { ON, OFF }",
9495 "  If ON, and in incoming filename includes a VMS version number, use it when",
9496 "  creating the file.  If OFF (which is the default), strip any VMS version",
9497 "  number from incoming filenames before attempting to create the file, \
9498 causing",
9499 "  the new file to receive the next highest version number.",
9500 #endif /* VMS */
9501 "" };
9502 
9503 static char *hxysnd[] = {
9504 "Syntax: SET SEND parameter value",
9505 "  Specifies parameters for outbound files or packets.",
9506 " ",
9507 "SET SEND BACKUP { ON, OFF }",
9508 "  Tells whether to include backup files when sending file groups.  Backup",
9509 "  files are those created by Kermit, EMACS, etc, when creating a new file",
9510 "  that has the same name as an existing file.  A backup file has a version",
9511 "  appended to its name, e.g. oofa.txt.~23~.  ON is the default, meaning",
9512 "  don't exclude backup files.  Use OFF to exclude backup files from group",
9513 "  transfers.",
9514 " ",
9515 #ifndef NOCSETS
9516 "SET SEND CHARACTER-SET { AUTOMATIC, MANUAL }",
9517 "  Whether to automatically switch to an appropriate file-character when a",
9518 "  SET TRANSFER CHARACTER-SET command is given, or vice versa.  AUTOMATIC by",
9519 "  default.  Also see HELP ASSOCIATE.",
9520 " ",
9521 #endif /* NOCSETS */
9522 
9523 "SET SEND CONTROL-PREFIX number",
9524 "  ASCII value of prefix character used for quoting control characters in",
9525 "  packets that Kermit sends, normally 35 (number sign).",
9526 " ",
9527 #ifdef CKXXCHAR
9528 "SET SEND DOUBLE-CHARACTER number",
9529 "  ASCII value of character to be doubled when sending packets, such as an",
9530 "  X.25 PAD escape character.",
9531 " ",
9532 #endif /* CKXXCHAR */
9533 "SET SEND END-OF-PACKET number",
9534 "  ASCII value of control character to terminate an outbound packet,",
9535 "  normally 13 (carriage return).",
9536 " ",
9537 "SET SEND MOVE-TO [ directory ]",
9538 "  \
9539 If a directory name is specified, then every file that is sent successfully",
9540 "  is moved to the given directory immediately after it is sent.",
9541 "  Omit the directory name to remove any previously set move-to directory.",
9542 " ",
9543 "SET SEND PACKET-LENGTH number",
9544 "  Maximum length packet to send, even if other Kermit asks for longer ones.",
9545 "  This command can not be used to force packets to be sent that are longer",
9546 "  than the length requested by the receiver.  Use this command only to",
9547 "  force shorter ones.",
9548 " ",
9549 "SET SEND PADDING number",
9550 "  Number of prepacket padding characters to send.",
9551 " ",
9552 "SET SEND PAD-CHARACTER number",
9553 "  ASCII value of control character to use for padding.",
9554 " ",
9555 "SET SEND PATHNAMES {OFF, ABSOLUTE, RELATIVE}",
9556 "  Include the path (device, directory) portion with the file name when",
9557 "  sending it as specified; ABSOLUTE means to send the whole pathname,",
9558 "  RELATIVE means to include the pathname relative to the current directory.",
9559 "  Applies to the actual filename, not to the \"as-name\".  The default is",
9560 "  OFF.",
9561 " ",
9562 "SET SEND PAUSE number",
9563 "  Milliseconds to pause between packets, normally 0.",
9564 " ",
9565 
9566 #ifdef CK_PERMS
9567 "SET SEND PERMISSIONS { ON, OFF }",
9568 "  Whether to include file permissions in outbound Attribute packets.",
9569 " ",
9570 #endif /* CK_PERMS */
9571 
9572 "SET SEND RENAME-TO [ template ]",
9573 "  If a template is specified, then every file that is sent successfully",
9574 "  is renamed according to the given template immediately after it is sent.",
9575 "  \
9576 The template should include variables like \\v(filename) or \\v(filenumber).",
9577 "  Omit the template to remove any template previously set.",
9578 " ",
9579 "SET SEND START-OF-PACKET number",
9580 "  ASCII value of character to mark start of outbound packet.",
9581 " ",
9582 #ifdef CK_TIMERS
9583 "SET SEND TIMEOUT number [ { DYNAMIC [ min max ] ], FIXED } ]",
9584 #else
9585 "SET SEND TIMEOUT number",
9586 #endif /* CK_TIMERS */
9587 
9588 "  Number of seconds to wait for a packet before sending NAK or",
9589 #ifdef CK_TIMERS
9590 "  retransmitting.  Include the word DYNAMIC after the number in the",
9591 "  SET SEND TIMEOUT command to have Kermit compute the timeouts dynamically",
9592 "  throughout the transfer based on the packet rate.  Include the word FIXED",
9593 "  to use the \"number\" given throughout the transfer.  DYNAMIC is the",
9594 "  default.  After DYNAMIC you may include minimum and maximum values.",
9595 "  SET SEND TIMEOUT -1 FIXED means no timeouts.",
9596 #else
9597 "  retransmitting.",
9598 #endif /* CK_TIMERS */
9599 #ifdef VMS
9600 " ",
9601 "SET SEND VERSION-NUMBERS { ON, OFF }",
9602 "  If ON, include VMS version numbers in outbound filenames.  If OFF (which",
9603 "  is the default), strip version numbers.",
9604 #endif /* VMS */
9605 "" };
9606 
9607 static char *hxyxfer[] = {
9608 "Syntax: SET TRANSFER (or XFER) parameter value",
9609 " ",
9610 "Choices:",
9611 " ",
9612 "SET TRANSFER BELL { OFF, ON }",
9613 "  Whether to ring the terminal bell at the end of a file transfer.",
9614 " ",
9615 #ifdef XFRCAN
9616 "SET TRANSFER CANCELLATION { OFF, ON [ <code> [ <number> ] ] }",
9617 "  OFF disables remote-mode packet-mode cancellation from the keyboard.",
9618 "  ON enables it.  The optional <code> is the control character to use for",
9619 "  cancellation; the optional <number> is how many consecutive occurrences",
9620 "  of the given control character are required for cancellation.",
9621 " ",
9622 #endif /* XFRCAN */
9623 "SET TRANSFER INTERRUPTION { ON, OFF }",
9624 "  TRANSFER INTERRUPTION is normally ON, allowing for interruption of a file",
9625 "  transfer in progress by typing certain characters while the file-transfer",
9626 "  display is active.  SET TRANSFER INTERRUPTION OFF disables interruption",
9627 "  of file transfer from the keyboard in local mode.",
9628 " ",
9629 #ifndef NOSPL
9630 "SET TRANSFER CRC-CALCULATION { OFF, ON }",
9631 "  Tells whether Kermit should accumulate a Cyclic Redundancy Check for ",
9632 "  each file transfer.  Normally ON, in which case the CRC value is available",
9633 "  in the \\v(crc16) variable after the transfer.  Adds some overhead.  Use",
9634 "  SET TRANSFER CRC OFF to disable.",
9635 " ",
9636 #endif /* NOSPL */
9637 #ifndef NOCSETS
9638 "SET TRANSFER CHARACTER-SET name",
9639 "  Selects the character set used to represent textual data in Kermit",
9640 "  packets.  Text characters are translated to/from the FILE CHARACTER-SET.",
9641 "  Choices:",
9642 " ",
9643 "  TRANSPARENT (no translation, the default)",
9644 "  ASCII",
9645 "  LATIN1 (ISO 8859-1 Latin Alphabet 1)",
9646 #ifndef NOLATIN2
9647 "  LATIN2 (ISO 8859-2 Latin Alphabet 2)",
9648 #endif /* NOLATIN2 */
9649 "  LATIN9 (ISO 8859-15 Latin Alphabet 9)",
9650 #ifdef CYRILLIC
9651 "  CYRILLIC-ISO (ISO 8859-5 Latin/Cyrillic)",
9652 #endif /* CYRILLIC */
9653 #ifdef GREEK
9654 "  GREEK-ISO (ISO 8859-7 Latin/Greek)",
9655 #endif /* GREEK */
9656 #ifdef HEBREW
9657 "  HEBREW-ISO (ISO 8859-8 Latin/Hebrew)",
9658 #endif /* HEBREW */
9659 #ifdef KANJI
9660 "  JAPANESE-EUC (JIS X 0208 Kanji + Roman and Katakana)",
9661 #endif /* KANJI */
9662 #ifdef UNICODE
9663 "  UCS-2 (ISO 10646 / Unicode 2-byte form)",
9664 "  UTF-8 (ISO 10646 / Unicode 8-bit serialized transformation format)",
9665 #endif /* UNICODE */
9666 " ",
9667 "SET TRANSFER TRANSLATION { ON, OFF }",
9668 "  Enables and disables file-transfer character-set translation.  It's",
9669 "  enabled by default.",
9670 #endif /* NOCSETS */
9671 " ",
9672 #ifdef CK_CURSES
9673 "SET TRANSFER DISPLAY { BRIEF, CRT, FULLSCREEN, NONE, SERIAL }",
9674 #else
9675 "SET TRANSFER DISPLAY { BRIEF, CRT, NONE, SERIAL }",
9676 #endif  /* CK_CURSES */
9677 "  Choose the desired format for the progress report to be displayed on",
9678 "  your screen during file transfers when Kermit is in local mode.",
9679 #ifdef CK_CURSES
9680 "  FULLSCREEN requires your terminal type be set correctly; the others",
9681 "  are independent of terminal type.",
9682 #else
9683 "  file transfer.",
9684 #endif  /* CK_CURSES */
9685 " ",
9686 "SET TRANSFER LOCKING-SHIFT { OFF, ON, FORCED }",
9687 "  Tell whether locking-shift protocol should be used during file transfer",
9688 "  to achieve 8-bit transparency on a 7-bit connection.  ON means to request",
9689 "  its use if PARITY is not NONE and to use it if the other Kermit agrees,",
9690 "  OFF means not to use it, FORCED means to use it even if the other Kermit",
9691 "  does not agree.",
9692 " ",
9693 "SET TRANSFER MODE { AUTOMATIC, MANUAL }",
9694 "  Automatic (the default) means Kermit should automatically go into binary",
9695 "  file-transfer mode and use literal filenames if the other Kermit says it",
9696 "  has a compatible file system, e.g. UNIX-to-UNIX, but not UNIX-to-DOS.",
9697 #ifdef PATTERNS
9698 "  Also, when sending files, Kermit should switch between binary and text",
9699 "  mode automatically per file based on the SET FILE BINARY-PATTERNS and SET",
9700 "  FILE TEXT-PATTERNS.",
9701 #endif /* PATTERNS */
9702 " ",
9703 #ifdef PIPESEND
9704 "SET TRANSFER PIPES { ON, OFF }",
9705 "  Enables/Disables automatic sending from / reception to command pipes when",
9706 "  the incoming filename starts with '!'.  Also see CSEND, CRECEIVE.",
9707 " ",
9708 #endif /* PIPESEND */
9709 #ifdef CK_XYZ
9710 "SET TRANSFER PROTOCOL { KERMIT, XMODEM, ... }",
9711 "  Synonym for SET PROTOCOL (q.v.).",
9712 " ",
9713 #endif /* CK_XYZ */
9714 "SET TRANSFER REPORT { ON, OFF }",
9715 "  Enables/Disables the automatic post-transfer message telling what files",
9716 "  went where from C-Kermit when it is in remote mode.  ON by default.",
9717 " ",
9718 "SET TRANSFER SLOW-START { OFF, ON }",
9719 "  ON (the default) tells Kermit, when sending files, to gradually build up",
9720 "  the packet length to the maximum negotiated length.  OFF means start",
9721 "  sending the maximum length right away.",
9722 " ",
9723 "Synonym: SET XFER.  Use SHOW TRANSFER (XFER) to see SET TRANSFER values.",
9724 "" };
9725 #endif /* NOXFER */
9726 
9727 #ifdef NT
9728 static char *hxywin95[] = {
9729 "SET WIN95 8.3-FILENAMES { ON, OFF }",
9730 "  Instructs K-95 to report all filenames using 8.3 notation instead of the",
9731 "  normal long filenames.  Default is OFF",
9732 " ",
9733 "SET WIN95 ALT-GR { ON, OFF }",
9734 "  Instructs K-95, when used on MS Windows 95, to interpret the Right Alt key",
9735 "  as the Alt-Gr key.  This is necessary to work around the failure of",
9736 "  Windows 95 to properly translate non-US keyboards.  Default is OFF.",
9737 " ",
9738 "SET WIN95 KEYBOARD-TRANSLATION <character-set>",
9739 "  Specifies the character-set that Windows 95 is using to send keystrokes",
9740 "  to Kermit-95 via the keyboard input functions.  Default is Latin1-ISO.",
9741 " ",
9742 "SET WIN95 OVERLAPPED-IO { ON <requests>, OFF }",
9743 "  Determines whether or not K-95 uses Overlapped-I/O methods for reading",
9744 "  from and writing to serial and TAPI communication devices.  <requests>",
9745 "  specifies the maximum number of simultaneous write requests that may be",
9746 "  overlapped, from 1 to 30.  Default is ON.",
9747 " ",
9748 "SET WIN95 POPUPS { ON, OFF }",
9749 "  Determines whether or not Kermit 95 uses Popups to query the user for",
9750 "  necessary information such as user IDs or passwords.  Default is ON.",
9751 " ",
9752 "SET WIN95 SELECT-BUG { ON, OFF }"
9753 "  Some TCP/IP (Winsock) implementations for Windows have a defective",
9754 "  select() function.  Use this command to avoid the use of select() if",
9755 "  K95 appears to be unable to send data over TCP/IP.  Default is OFF.",
9756 ""};
9757 #endif /* NT */
9758 
9759 static char *hmxybel[] = {
9760 #ifdef OS2
9761 "Syntax: SET BELL { AUDIBLE [ { BEEP, SYSTEM-SOUNDS } ], VISIBLE, NONE }",
9762 "  Specifies how incoming Ctrl-G (bell) characters are handled in CONNECT",
9763 "  mode and how command warnings are presented in command mode.  AUDIBLE",
9764 "  means either a beep or a system-sound is generated; VISIBLE means the",
9765 "  screen is flashed momentarily.",
9766 #else
9767 "Syntax: SET BELL { OFF, ON }",
9768 "  ON (the default) enables ringing of the terminal bell (beep) except where",
9769 "  it is disabled in certain circumstances, e.g. by SET TRANSFER BELL.  OFF",
9770 "  disables ringing of the bell in all circumstances, overriding any specific",
9771 "  SET xxx BELL selections.",
9772 #endif /* OS2 */
9773 ""};
9774 
9775 #ifdef OS2
9776 static char *hmxymsk[] = {
9777 "SET MSKERMIT FILE-RENAMING { ON, OFF }",
9778 "  ON enables the use of MS-DOS Kermit file renaming conventions instead of",
9779 "  C-Kermit conventions.  File renaming occurs during file transfers when",
9780 "  there is a file name collision and either BACKUP or RENAME collision",
9781 "  options are active.  C-Kermit conventions preserve the original file name",
9782 "  while appending .~num~ to the end.  MS-DOS Kermit conventions restrict",
9783 "  filenames to 8.3 notation and preserve the extension.  Unique numeric",
9784 "  values overwrite the right most portion of the file name's left hand side.",
9785 " ",
9786 "SET MSKERMIT KEYCODES { ON, OFF }",
9787 "  ON enables the use of MS-DOS Kermit compatible keycodes to provide script",
9788 "  portability.",
9789 ""};
9790 #endif /* OS2 */
9791 
9792 static char *hmxycd[] = {
9793 "Syntax: SET CD { HOME <path>, PATH <path>, MESSAGE { ON, OFF, FILE <list> } }"
9794 ,
9795 " ",
9796 "SET CD HOME <path>",
9797 "  Specified which directory to change to if CD or KCD is given without a",
9798 "  pathname.  If this command is not given, your login or HOME directory is",
9799 "  used.",
9800 " ",
9801 "SET CD PATH <path>",
9802 "  Overrides normal CDPATH environment variable, which tells the CD command",
9803 "  where to look for directories to CD to if you don't specify them fully.",
9804 "  The format is:",
9805 " ",
9806 #ifdef UNIXOROSK
9807 "    set cd path :directory:directory:...",
9808 " ",
9809 "  in other words, a list of directories separated by colons, with a colon",
9810 "  at the beginning, e.g.:",
9811 " ",
9812 "    set cd path :/usr/olga:/usr/ivan/public:/tmp",
9813 #else
9814 #ifdef OS2
9815 "    set cd path disk:directory;disk:directory;...",
9816 " ",
9817 "  just like the DOS PATH; in other words, a list of disk:directory names",
9818 "  separated by semicolons, e.g.:",
9819 " ",
9820 "    SET CD PATH C:\\K95;C:\\HOME;C:\\LOCAL;C:\\",
9821 #else
9822 #ifdef VMS
9823 "    set cd path directory,directory,...",
9824 " ",
9825 "  in other words, a list of directory specifications or logical names that",
9826 "  represent them, e.g.:",
9827 " ",
9828 "    SET CD PATH SYS$LOGIN:,$DISK1:[OLGA],$DISK2[SCRATCH.IVAN].",
9829 #else
9830 "  (unknown for this platform)",
9831 #endif /* VMS */
9832 #endif /* OS2 */
9833 #endif /* UNIXOROSK */
9834 " ",
9835 "SET CD MESSAGE { ON, OFF }",
9836 "  Default is OFF.  When ON, this tells Kermit to look for a file with a",
9837 "  certain name in any directory that you CD to, and if it finds one, to",
9838 "  display it on your screen when you give the CD command.  The filename,",
9839 "  or list of names, is given in the SET CD MESSAGE FILE command.",
9840 " ",
9841 "SET CD MESSAGE FILE name",
9842 "  or:",
9843 "SET CD MESSAGE FILE {{name1}{name2}...{name8}}",
9844 "  Specify up to 8 filenames to look for when when CDing to a new directory",
9845 "  and CD MESSAGE is ON.  The first one found, if any, in the new directory",
9846 #ifndef DFCDMSG
9847 "  is displayed.",
9848 #else
9849 "  is displayed.  The default list is:",
9850 " ",
9851 #ifdef UNIXOROSK
9852 "   {{./.readme}{README.TXT}{READ.ME}}",
9853 #else
9854 "   {{README.TXT}{READ.ME}}",
9855 #endif /* UNIXOROSK */
9856 " ",
9857 #endif /* DFCDMSG */
9858 #ifndef NOSERVER
9859 "Synonym: SET SERVER CD-MESSAGE FILE.",
9860 #endif /* NOSERVER */
9861 " ",
9862 "Type SHOW CD to view current CD settings.  Also see HELP SET SERVER.",
9863 ""
9864 };
9865 
9866 #ifndef NOIKSD
9867 static char * hsetiks[] = {
9868 #ifdef OS2
9869 "SET IKS ANONYMOUS ACCOUNT <username>",
9870 "  On Windows NT/2000 this is the account that will be used to allow",
9871 "  anonymous access to the system.  This account MUST have no password",
9872 "  and its privileges should be restricted to only allow those operations",
9873 "  which should be permitted to unknown users.  In practice this means",
9874 "  List Directories and Read-Execute privileges only.  If a directory",
9875 "  is configured for Write privileges then Read privileges should be",
9876 "  denied for that directory.  Otherwise, your system will become used",
9877 "  by software pirates.  If this command is not specified in the IKSD.KSC",
9878 "  file the username \"GUEST\" is used by default.  This command has no",
9879 "  effect on Windows 95/98.",
9880 " ",
9881 #endif /* OS2 */
9882 "SET IKS ANONYMOUS INITFILE filename",
9883 #ifdef OS2
9884 "  The initialization file to be executed for anonymous logins.  By default",
9885 "  it is K95.INI in the home directory associated with the ANNONYMOUS account."
9886 ,
9887 "  Any filename that you specify here must be readable by the ANONYMOUS",
9888 "  account and if a SET IKS ANONYMOUS ROOT command was given, exist within",
9889 "  the restricted directory tree.  This option is independent of the SET IKS",
9890 "  INITFILE command which applies only to real users.",
9891 #else
9892 "  The initialization file to be executed for anonymous logins.  By default",
9893 "  it is .kermrc in the anonymous root directory.  This option is independent",
9894 "  of the SET IKS INITFILE command which applies only to real users.",
9895 #endif /* OS2 */
9896 " ",
9897 "SET IKS ANONYMOUS LOGIN { ON, OFF }",
9898 #ifdef OS2
9899 "  Whether anonymous logins are allowed.  By default they are NOT allowed,",
9900 "  so this option need be included only to allow them (or for clarity, to",
9901 "  emphasize that they are not allowed).  Anonymous login occurs when the",
9902 "  username \"anonymous\" is specified with any password (as with ftpd).",
9903 "  In order for anonymous logins to succeed on Windows NT/2000, the",
9904 "  ANONYMOUS account must be enabled.",
9905 " ",
9906 "  On Windows NT and 2000, anonymous users have the same access rights as",
9907 "  the ANONYMOUS account.  In Windows 95/98, anonymous users, just like any",
9908 "  other users, have full access rights to your entire PC, since Windows 95",
9909 "  and 98 include no security features.  For this reason, if you are allowing",
9910 "  anonymous logins, be sure to also SET an IKS ANONYMOUS ROOT directory to",
9911 "  restrict anonymous users' file access.",
9912 " ",
9913 "  Anonymous user permissions may be restricted via the specification of ",
9914 "  DISABLE commands in the ANONYMOUS initfile.  Anonymous users are not ",
9915 "  permitted to execute an ENABLE command.  Anonymous users are also prevented"
9916 ,
9917 "  from SHOWing sensitive data about the operating system or the IKS",
9918 "  configuration.",
9919 #else
9920 "  Whether anonymous logins are allowed. By default they are allowed, so this",
9921 "  option need be included only to disallow them (or for clarity, to emphasize"
9922 ,
9923 "  they are allowed). Anonymous login occurs when the username \"anonymous\"",
9924 "  or \"ftp\" is given, with any password (as with ftpd).",
9925 #endif /* OS2 */
9926 " ",
9927 "SET IKS ANONYMOUS ROOT <directory>",
9928 "  Specifies a directory tree to which anonymous users are restricted after",
9929 "  login.",
9930 " ",
9931 "SET IKS BANNERFILE <filename>",
9932 "  The name of a file containing a message to be printed after the user logs",
9933 "  in, in place of the normal message (copyright notice, \"Type HELP or ? for",
9934 "  help\", etc).",
9935 " ",
9936 "SET IKS CDFILE <filelist>",
9937 "  When cdmessage is on, this is the name of the \"read me\" file to be shown."
9938 ,
9939 "  Normally you would specify a relative (not absolute) name, since the file",
9940 "  is opened using the literal name you specified, after changing to the new",
9941 "  directory.  Example:",
9942 " ",
9943 "    SET IKS CDFILE READ.ME",
9944 " ",
9945 "  You can also give a list of up to 8 filenames by (a) enclosing each",
9946 "  filename in braces, and (b) enclosing the entire list in braces.  Example:",
9947 " ",
9948 "    SET IKS CDFILE {{READ.ME}{aareadme.txt}{README}{read-this-first}}",
9949 " ",
9950 "  When a list is given, it is searched from left to right and the first",
9951 "  file found is displayed.",
9952 " ",
9953 "SET IKS CDMESSAGE {ON, OFF, 0, 1, 2}",
9954 "  For use in the Server-Side Server configuration; whenever the client",
9955 "  tells the server to change directory, the server sends the contents of a",
9956 "  \"read me\" file to the client's screen.  This feature is ON by default,",
9957 "  and operates in client/server mode only when ON or 1.  If set to 2 or",
9958 "  higher, it also operates when the CD command is given at the IKSD> prompt.",
9959 "  Synonym: SET IKS CDMSG.",
9960 " ",
9961 "SET IKS DATABASE { ON, OFF }",
9962 "  This command determines whether entries are inserted into the SET IKS",
9963 "  DBFILE (IKSD active sessions database).",
9964 " ",
9965 "SET IKS DBFILE <filename>",
9966 "  Specifies the file which should be used for storing runtime status",
9967 #ifdef OS2
9968 "  information about active connections.  The default is a file called",
9969 "  \"iksd.db\" in the WINDOWS directory.",
9970 #else
9971 #ifdef UNIX
9972 "  information about active connections.  The default is a file called",
9973 "  \"iksd.db\" in the /var/log directory.",
9974 #else
9975 "  information about active connections.",
9976 #endif /* UNIX */
9977 #endif /* OS2 */
9978 " ",
9979 #ifdef OS2
9980 "SET IKS DEFAULT-DOMAIN <domain-name>",
9981 "  A userid on Windows is of the form DOMAIN\\\\userid.  This command",
9982 "  determines which domain will be searched for the userid if a domain",
9983 "  is not specified by the user.  On Windows 95/98 when User-level",
9984 "  access is activated in the Network Control Panel, the default ",
9985 "  domain will be automatically set.  If the default domain is not",
9986 "  specified, accounts on the local machine will take precedence over",
9987 "  accounts in Domains to which the local machine belongs.",
9988 #endif /* OS2 */
9989 " ",
9990 "SET IKS HELPFILE <filename>",
9991 "  Specifies the name of a file to be displayed if the user types HELP",
9992 "  (not followed by a specific command or topic), in place of the built-in",
9993 "  top-level help text.  The file need not fit on one screen; more-prompting",
9994 "  is used if the file is more than one screen long if COMMAND MORE-PROMPTING",
9995 "  is ON, as it is by default.",
9996 " ",
9997 "SET IKS INITFILE <filename>",
9998 "  Execute <filename> rather than the normal initialization file for real",
9999 "  users; this option does not apply to anonymous users.",
10000 " ",
10001 "SET IKS NO-INITFILE { ON, OFF }",
10002 "  Do not execute an initialization file, even if a real user is logging in.",
10003 " ",
10004 "SET IKS SERVER-ONLY { ON, OFF }",
10005 "  If this option is included on the IKSD command line, the Client Side Server"
10006 ,
10007 "  configuration is disabled, and the user will not get a Username: or",
10008 "  Password: prompt, and will not be able to access the IKSD command prompt.",
10009 "  A FINISH command sent to the IKSD will log it out and close the",
10010 "  connection, rather than returning it to its prompt.",
10011 " ",
10012 "SET IKS TIMEOUT <number>",
10013 "  This sets a limit (in seconds) on the amount of time the client has to log",
10014 "  in once the connection is made.  If successful login does not occur within",
10015 "  the given number of seconds, the connection is closed.  The default timeout"
10016 ,
10017 "  is 300 seconds (5 minutes).  A value of 0 or less indicates there is to be",
10018 "  no limit.",
10019 " ",
10020 "SET IKS USERFILE <filename>",
10021 #ifdef UNIX
10022 "  This file contains a list of local usernames that are to be denied access",
10023 "  to Internet Kermit Service.  The default is /etc/ftpusers.  This can be the"
10024 ,
10025 "  same file that is used by wuftpd, and the syntax is the same: one username",
10026 "  per line; lines starting with \"#\" are ignored.  Use this option to",
10027 "  specify the name of a different forbidden-user file, or use",
10028 "  \"set iks userfile /dev/null\" to disable this feature in case there is a",
10029 "   /etc/ftpusers file but you don't want to use it.",
10030 #else
10031 "  This file contains a list of local usernames that are to be denied access",
10032 "  to Internet Kermit Service.  The syntax is: one username per line; lines",
10033 "  starting with \"#\" are ignored.",
10034 #endif /* UNIX */
10035 " ",
10036 "SET IKS XFERLOG { ON, OFF }",
10037 #ifdef UNIX
10038 "  Whether a file-transfer log should be kept.  Off by default.  If \"on\",",
10039 "  but no SET IKSD XFERFILE command is given, /var/log/iksd.log is used.",
10040 #else
10041 "  Whether a file-transfer log should be kept.  Off by default.",
10042 #endif /* UNIX */
10043 " ",
10044 "SET IKS XFERFILE <filename>",
10045 "  Use this option to specify an iksd log file name.  If you include this",
10046 "  option, it implies SET IKS XFERFILE ON.",
10047 ""
10048 };
10049 #endif /* NOIKSD */
10050 
10051 /*  D O H S E T  --  Give help for SET command  */
10052 
10053 int
dohset(xx)10054 dohset(xx) int xx; {
10055     int x;
10056 
10057     if (xx == -3) return(hmsga(hmhset));
10058     if (xx < 0) return(xx);
10059 
10060 #ifdef NEWFTP
10061     if (xx == XYFTPX)
10062       return(dosetftphlp());
10063     if (xx == XYGPR)
10064       return(hmsga(hmxygpr));
10065 #endif /* NEWFTP */
10066 
10067     if ((x = cmcfm()) < 0) return(x);
10068     switch (xx) {
10069 #ifndef NOIKSD
10070       case XYIKS:
10071         return(hmsga(hsetiks));
10072 #endif /* NOIKSD */
10073 
10074 case XY_REN:
10075   return(hmsg("SET RENAME LIST { ON, OFF }\n\
10076   Tells whether the RENAME command should list its results by default.\n\n\
10077 SET RENAME COLLISION { FAIL, PROCEED, OVERWRITE }\n\
10078   Establishes the default action when renaming a file would destroy an\n\
10079   existing file.  See HELP RENAME."));
10080 
10081 case XYATTR:
10082     return(hmsga(hsetat));
10083 
10084 case XYBACK:
10085     return(hmsga(hsetbkg));
10086 
10087 case XYBELL:
10088     return(hmsga(hmxybel));
10089 
10090 #ifdef OS2
10091 case XYPRTY:
10092     return(hmsg("SET PRIORITY { REGULAR, FOREGROUND-SERVER, TIME-CRITICAL }\n\
10093   Specifies at which priority level the communication and screen update\n\
10094   threads should operate.  The default value is FOREGROUND-SERVER."));
10095 
10096 case XYMSK:
10097     return(hmsga(hmxymsk));
10098 #endif /* OS2 */
10099 
10100 #ifdef DYNAMIC
10101 case XYBUF:
10102     return(hmsga(hsetbuf));
10103 #endif /* DYNAMIC */
10104 
10105 #ifndef NOLOCAL
10106 case XYCARR:
10107     return(hmsga(hsetcar));
10108 #endif /* NOLOCAL */
10109 
10110 #ifndef NOSPL
10111 case XYCASE:
10112     return(hmsg("Syntax: SET CASE { ON, OFF }\n\
10113   Tells whether alphabetic case is significant in string comparisons\n\
10114   done by INPUT, IF, and other commands.  This setting is local to the\n\
10115   current macro or command file, and inherited by subordinates."));
10116 
10117 #endif /* NOSPL */
10118 
10119 case XYCMD:
10120     return(hmsga(hsetcmd));
10121 
10122 case XYIFD:
10123     return(hmsg("Syntax: SET INCOMPLETE { DISCARD, KEEP }\n\
10124   Whether to discard or keep incompletely received files, default is KEEP."));
10125 
10126 #ifndef NOSPL
10127 case XYINPU:
10128     return(hmsga(hxyinp));
10129 #endif /* NOSPL */
10130 
10131 case XYCHKT:
10132     return(hmsga(hmxychkt));
10133 
10134 #ifndef NOSPL
10135 case XYCOUN:
10136     return(hmsg("Syntax:  SET COUNT number\n\
10137  Example: SET COUNT 5\n\
10138   Set up a loop counter, for use with IF COUNT.  Local to current macro\n\
10139   or command file, inherited by subordinate macros and command files."));
10140 #endif /* NOSPL */
10141 
10142 case XYDEBU:
10143     return(hmsga(hmxydeb));
10144 
10145 case XYDFLT:
10146     return(hmsg("Syntax: SET DEFAULT directory\n\
10147   Change directory.  Equivalent to CD command."));
10148 
10149 case XYDELA:
10150     return(hmsg("Syntax: SET DELAY number\n\
10151   Number of seconds to wait before sending first packet after SEND command."));
10152 
10153 #ifndef NODIAL
10154 case XYDIAL:
10155     return(hmsga(hmxydial));
10156 #endif /* NODIAL */
10157 
10158 #ifdef UNIX
10159 case XYSUSP:
10160     return(hmsg("Syntax: SET SUSPEND { OFF, ON }\n\
10161   Disables SUSPEND command, suspend signals, and <esc-char>Z during CONNECT.")
10162            );
10163 #endif
10164 
10165 #ifndef NOSCRIPT
10166 case XYSCRI:
10167     return(hmsg("Syntax: SET SCRIPT ECHO { OFF, ON }\n\
10168   Disables/Enables echoing of SCRIPT command operation."));
10169 #endif /* NOSCRIPT */
10170 
10171 case XYTAKE:
10172     return(hmsga(hxytak));
10173 
10174 #ifndef NOLOCAL
10175 case XYTERM:
10176     return(hmsga(hxyterm));
10177 
10178 case XYDUPL:
10179     return(hmsg("Syntax: SET DUPLEX { FULL, HALF }\n\
10180   During CONNECT: FULL means remote host echoes, HALF means Kermit\n\
10181   does its own echoing."));
10182 
10183 case XYLCLE:
10184     return(hmsg("Syntax: SET LOCAL-ECHO { OFF, ON }\n\
10185   During CONNECT: OFF means remote host echoes, ON means Kermit\n\
10186   does its own echoing.  Synonym for SET DUPLEX { FULL, HALF }."));
10187 
10188 case XYESC:
10189     return(hmsga(hxyesc));              /* SET ESCAPE */
10190 #endif /* NOLOCAL */
10191 
10192 case XYPRTR:                            /* SET PRINTER */
10193     return(hmsga(hxyprtr));
10194 
10195 #ifdef OS2
10196 #ifdef BPRINT
10197 case XYBDCP:                            /* SET BPRINTER */
10198     return(hmsga(hxybprtr));
10199 #endif /* BPRINT */
10200 #endif /* OS2 */
10201 
10202 case XYEXIT:
10203     return(hmsga(hxyexit));
10204 
10205 case XYFILE:
10206     return(hmsga(hmxyf));
10207 
10208 case XYFLOW:
10209     return(hmsga(hmxyflo));
10210 
10211 case XYHAND:
10212    return(hmsga(hmxyhsh));
10213 
10214 #ifdef NETCONN
10215 
10216 case XYHOST:
10217     return(hmsga(hxyhost));
10218 
10219 case XYNET:
10220     return(hmsga(hxynet));
10221 
10222 #ifndef NOTCPOPTS
10223 #ifdef SOL_SOCKET
10224 case XYTCP:
10225     return(hmsga(hxytcp));
10226 #endif /* SOL_SOCKET */
10227 #endif /* NOTCPOPTS */
10228 
10229 #ifdef ANYX25
10230 case XYX25:
10231     return(hmsga(hxyx25));
10232 
10233 #ifndef IBMX25
10234 case XYPAD:
10235     return(hmsg("Syntax: SET PAD name value\n\
10236 Set a PAD X.3 parameter with a desired value."));
10237 #endif /* IBMX25 */
10238 #endif /* ANYX25 */
10239 #endif /* NETCONN */
10240 
10241 #ifndef NOSPL
10242 case XYOUTP:
10243     return(hmsga(hxyout));
10244 #endif /* NOSPL */
10245 
10246 #ifndef NOSETKEY
10247 case XYKEY:                             /* SET KEY */
10248     return(hmsga(hmhskey));
10249 #endif /* NOSETKEY */
10250 
10251 #ifndef NOCSETS
10252 case XYLANG:
10253     return(hmsg("Syntax: SET LANGUAGE name\n\
10254   Selects language-specific translation rules for text-mode file transfers.\n\
10255   Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one\n\
10256   of these is ASCII."));
10257 #endif /* NOCSETS */
10258 
10259 case XYLINE:
10260     printf("\nSyntax: SET LINE (or SET PORT) [ switches ] [ devicename ]\n\
10261   Selects a serial-port device to use for making connections.\n");
10262 #ifdef OS2
10263 #ifdef NT
10264     printf("\n");
10265     printf(
10266 "  You may access communication ports by the traditional \"DOS\" port name\n");
10267     printf(
10268 "  (e.g. SET PORT COM1) or by the Microsoft Telephony modem name from the\n");
10269     printf(
10270 "  Modems folder of the Control Panel (e.g. SET PORT TAPI). If one method\n");
10271     printf("  doesn't work, try the other.\n\n");
10272 #endif /* NT */
10273 #else  /* OS2 */
10274     printf("  Typical device name for this platform: %s.\n",ttgtpn());
10275     printf("  The default device name is %s (i.e. none).\n",dftty);
10276     if (!dfloc) {
10277         printf(
10278 "  If you do not give a SET LINE command or if you give a SET LINE command\n");
10279         printf(
10280 "  with no device name, or if you specify %s as the device name,\n",dftty);
10281         printf(
10282 "  Kermit will be in \"remote mode\", suitable for use on the far end of a\n");
10283         printf(
10284 "  connection, e.g. as the file-transfer partner of your desktop communication\
10285 \n");
10286         printf(
10287 "  software.  If you SET LINE to a specific device other than %s,\n", dftty);
10288         printf(
10289 "  Kermit is in \"local mode\", suitable for making a connection to another\n"
10290               );
10291         printf(
10292 "  computer.  SET LINE alone resets Kermit to remote mode.\n");
10293     }
10294 #endif /* OS2 */
10295         printf(
10296 "  To use a modem to dial out, first SET MODEM TYPE (e.g., to USR), then\n");
10297     printf(
10298 #ifdef OS2
10299 "  SET PORT COMx (or SET PORT TAPI), SET SPEED, then give a DIAL command.\n");
10300 #else
10301 "  SET LINE xxx, then SET SPEED, then give a DIAL command.\n");
10302 #endif /* OS2 */
10303     printf(
10304 #ifdef OS2
10305 "  For direct null-modem connections use SET MODEM TYPE NONE, SET PORT COMx,\n"
10306 #else
10307 "  For direct null-modem connections, use SET MODEM TYPE NONE, SET LINE xxx,\n"
10308 #endif /* OS2 */
10309     );
10310     printf(
10311 "  then SET FLOW, SET SPEED, and CONNECT.\n");
10312     printf(
10313 "\nOptional switches:\n\
10314   /CONNECT - Enter CONNECT mode automatically if SET LINE succeeds.\n");
10315     printf(
10316 "  /SERVER  - Enter server mode automatically if SET LINE succeeds.\n");
10317 #ifdef VMS
10318     printf(
10319 "  /SHARE   - Open the device in shared mode.\n");
10320     printf(
10321 "  /NOSHARE - Open the device in exclusive mode.\n");
10322 #endif /* VMS */
10323     printf("\n");
10324     printf(
10325 "Also see HELP SET MODEM, HELP SET DIAL, HELP SET SPEED, HELP SET FLOW.\n");
10326     return(0);
10327 
10328 #ifndef NOSPL
10329 case XYMACR:
10330     return(hmsga(hxymacr));
10331 #endif /* NOSPL */
10332 
10333 #ifndef NODIAL
10334 case XYMODM:
10335     return(hmsga(hxymodm));
10336 #endif /* NODIAL */
10337 
10338 case XYPARI:
10339     return(hmsga(hxypari));
10340 
10341 case XYPROM:
10342     return(hmsga(hmxyprm));
10343 
10344 case XYQUIE:
10345     return(hmsg("Syntax: SET QUIET {ON, OFF}\n\
10346   Normally OFF.  ON disables most information messages during interactive\n\
10347   operation."));
10348 
10349 #ifdef CK_SPEED
10350 case XYQCTL:
10351     return(hmsga(hmxyqctl));
10352 #endif /* CK_SPEED */
10353 
10354 case XYRETR:
10355     return(hmsg("Syntax: SET RETRY number\n\
10356   In Kermit protocol file transfers: How many times to retransmit a\n\
10357   particular packet before giving up; 0 = no limit."));
10358 
10359 #ifndef NOLOCAL
10360 case XYSESS:
10361 #ifdef UNIX
10362     return(hmsg(
10363 "Syntax:\n\
10364  SET SESSION-LOG { BINARY, DEBUG, NULL-PADDED, TEXT, TIMESTAMPED-TEXT }\n\
10365   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10366   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10367   also includes Telnet negotiations on TCP/IP connections."));
10368 #else
10369 #ifdef datageneral
10370     return(hmsg(
10371 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10372   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10373   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10374   also includes Telnet negotiations on TCP/IP connections."));
10375 #else
10376 #ifdef STRATUS
10377     return(hmsg(
10378 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10379   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10380   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10381   also includes Telnet negotiations on TCP/IP connections."));
10382 #else
10383 #ifdef AMIGA
10384     return(hmsg(
10385 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10386   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10387   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10388   also includes Telnet negotiations on TCP/IP connections."));
10389 #else
10390 #ifdef GEMDOS
10391     return(hmsg(
10392 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10393   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10394   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10395   also includes Telnet negotiations on TCP/IP connections."));
10396 #else
10397 #ifdef OS2
10398     return(hmsg(
10399 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10400   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10401   out NUL and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10402   also includes Telnet negotiations on TCP/IP connections."));
10403 #else
10404 #ifdef VMS
10405     return(hmsg(
10406 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10407   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10408   out CR, NUL, and XON/XOFF characters.  DEBUG is the same as BINARY but\n\
10409   also includes Telnet negotiations on TCP/IP connections."));
10410 #else
10411 #ifdef OSK
10412     return(hmsg(
10413 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10414   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10415   out LF, NUL and XON/XOFF characters."));
10416 #else
10417 #ifdef MAC
10418     return(hmsg(
10419 "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
10420   If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
10421   out LF, NUL and XON/XOFF characters."));
10422 #endif /* MAC */
10423 #endif /* OSK */
10424 #endif /* OS2 */
10425 #endif /* VMS */
10426 #endif /* GEMDOS */
10427 #endif /* AMIGA */
10428 #endif /* STRATUS */
10429 #endif /* datageneral */
10430 #endif /* OS2ORUNIX */
10431 
10432 case XYSPEE:
10433 #ifdef OS2
10434 
10435     return(hmsg("Syntax: SET SPEED number\n\
10436   Speed for serial-port communication device specified in most recent\n\
10437   SET PORT command, in bits per second.  Type SET SPEED ? for a list of\n\
10438   possible speeds."));
10439 #else
10440     return(hmsg("Syntax: SET SPEED number\n\
10441   Speed for serial-port communication device specified in most recent\n\
10442   SET LINE command, in bits per second.  Type SET SPEED ? for a list of\n\
10443   possible speeds.  Has no effect on job's controlling terminal."));
10444 #endif /* OS2 */
10445 #endif /* NOLOCAL */
10446 
10447 #ifndef NOXFER
10448 case XYRECV:
10449     return(hmsga(hxyrcv));
10450 case XYSEND:
10451     return(hmsga(hxysnd));
10452 case XYREPT:
10453     return(hmsga(hxyrpt));
10454 #endif /* NOXFER */
10455 
10456 #ifndef NOSERVER
10457 case XYSERV:
10458     return(hmsga(hsetsrv));
10459 #endif /* NOSERVER */
10460 
10461 #ifdef TNCODE
10462 case XYTEL:
10463     return(hmsga(hxytel));
10464 
10465 case XYTELOP:
10466     return(hmsga(hxytopt));
10467 #endif /* TNCODE */
10468 
10469 #ifndef NOXMIT
10470 case XYXMIT:
10471     return(hmsga(hsetxmit));
10472 #endif /* NOXMIT */
10473 
10474 #ifndef NOCSETS
10475 case XYUNCS:
10476     return(hmsg("Syntax: SET UNKNOWN-CHAR-SET action\n\
10477   DISCARD (default) means reject any arriving files encoded in unknown\n\
10478   character sets.  KEEP means to accept them anyway."));
10479 #endif /* NOCSETS */
10480 
10481 #ifdef UNIX
10482 case XYWILD:
10483     return(hmsga(hxywild));
10484 #endif /* UNIX */
10485 
10486 #ifndef NOXFER
10487 case XYWIND:
10488     return(hmsga(hxywind));
10489 case XYXFER:
10490     return(hmsga(hxyxfer));
10491 #endif /* NOXFER */
10492 
10493 #ifndef NOLOCAL
10494 #ifdef OS2MOUSE
10495 case XYMOUSE:
10496     return(hmsga(hxymouse));
10497 #endif /* OS2MOUSE */
10498 #endif /* NOLOCAL */
10499 
10500 case XYALRM:
10501     return(hmsg("Syntax: SET ALARM [ { seconds, hh:mm:ss } ]\n\
10502   Number of seconds from now, or time of day, after which IF ALARM\n\
10503   will succeed.  0, or no time at all, means no alarm."));
10504 
10505 case XYPROTO:
10506     return(hmsga(hxyxyz));
10507 
10508 #ifdef CK_SPEED
10509 case XYPREFIX:
10510     return(hmsg("Syntax: SET PREFIXING { ALL, CAUTIOUS, MINIMAL }\n\
10511   \
10512 Selects the degree of control-character prefixing.  Also see HELP SET CONTROL."
10513 ));
10514 #endif /* CK_SPEED */
10515 
10516 #ifdef OS2
10517 case XYLOGIN:
10518     return(hmsg("Syntax: SET LOGIN { USERID, PASSWORD, PROMPT } <text>\n\
10519   Provides access information for use by login scripts."));
10520 #endif /* OS2 */
10521 
10522 #ifndef NOSPL
10523 case XYTMPDIR:
10524     return(hmsg("Syntax: SET TEMP-DIRECTORY [ <directory-name> ]\n\
10525   Tells Kermit to use the given directory for creating temporary files.\n\
10526   These are used (for example) in FTP downloads and by the CHANGE command.\n\
10527   If you don't issue this command, C-Kermit picks a directory automatically\n\
10528   based on the operating system and any environment variables you might have\n\
10529   set.  Use SHOW TEMP-DIRECTORY or SHOW VARIABLE \\v(tmpdir) to see Kermit's\n\
10530   current temporary directory setting.  Synonym: SET TMP-DIRECTORY."));
10531 #endif /* NOSPL */
10532 
10533 #ifdef OS2
10534 case XYTITLE:
10535     return(hmsg("Syntax: SET TITLE <text>\n\
10536   Sets window title to text instead of using current host/port name."));
10537 #endif /* OS2 */
10538 
10539 #ifndef NOPUSH
10540 #ifndef NOFRILLS
10541 case XYEDIT:
10542     return(hmsg("Syntax: SET EDITOR pathname [ options ]\n\
10543   Specifies the name of your preferred editor, plus any command-line\n\
10544   options.  SHOW EDITOR displays it."));
10545 #endif /* NOFRILLS */
10546 #endif /* NOPUSH */
10547 
10548 #ifdef BROWSER
10549 case XYBROWSE:
10550 #ifdef NT
10551     return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
10552   Specifies the name of your preferred browser plus any command-line\n\
10553   options.  SHOW BROWSER displays it.  Omit pathname and options to use\n\
10554   ShellExecute."));
10555 #else
10556     return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
10557   Specifies the name of your preferred browser plus any command-line\n\
10558   options.  SHOW BROWSER displays it."));
10559 #endif /* NT */
10560 #endif /* BROWSER */
10561 
10562 #ifdef CK_TAPI
10563 case XYTAPI:
10564     return(hmsga(hxytapi));
10565 #endif /* CK_TAPI */
10566 
10567 #ifdef NT
10568 case XYWIN95:
10569     return(hmsga(hxywin95));
10570 #endif /* NT */
10571 
10572 #ifndef NOSPL
10573 case XYFUNC:
10574     return(hmsga(hxyfunc));
10575 #endif /* NOSPL */
10576 
10577 #ifdef CK_AUTHENTICATION
10578 case XYAUTH:
10579     return(hmsga(hmxyauth));
10580 #else /* CK_AUTHENTICATION */
10581 #ifdef CK_SSL
10582 case XYAUTH:
10583     return(hmsga(hmxyauth));
10584 #endif /* CK_SSL */
10585 #endif /* CK_AUTHENTICATION */
10586 
10587 #ifdef BROWSER
10588 case XYFTP:
10589     return(hmsg("Syntax: SET FTP [ pathname [ options ] ]\n\
10590   Specifies the name of your ftp client, plus any command-line options.\n\
10591   SHOW FTP displays it."));
10592 #endif /* BROWSER */
10593 
10594 case XYSLEEP:
10595     return(hmsg("Syntax: SET SLEEP CANCELLATION { ON, OFF }\n\
10596   Tells whether SLEEP (PAUSE) or WAIT commands can be interrupted from the\n\
10597   keyboard; ON by default."));
10598 
10599 case XYCD:
10600     return(hmsga(hmxycd));
10601 
10602 case XYSERIAL:
10603     return(hmsg("Syntax: SET SERIAL dps\n\
10604   d is data length in bits, 7 or 8; p is first letter of parity; s is stop\n\
10605   bits, 1 or 2.  Examples: \"set serial 7e1\", \"set serial 8n1\"."));
10606 
10607 #ifdef HWPARITY
10608 case XYSTOP:
10609     return(hmsg("Syntax: SET STOP-BITS { 1, 2 }\n\
10610   Number of stop bits to use on SET LINE connections, normally 1."));
10611 #endif /* HWPARITY */
10612 
10613 #ifndef NOLOCAL
10614 case XYDISC:
10615     return(hmsg("Syntax: SET DISCONNECT { ON, OFF }\n\
10616   Whether to close and release a SET LINE device automatically upon\n\
10617   disconnection; OFF = keep device open (default); ON = close and release."));
10618 #endif /* NOLOCAL */
10619 
10620 #ifdef STREAMING
10621 case XYSTREAM:
10622     return(hmsg("Syntax: SET STREAMING { ON, OFF, AUTO }\n\
10623   Tells Kermit whether streaming protocol can be used during Kermit file\n\
10624   transfers.  Default is AUTO, meaning use it if connection is reliable."));
10625 #endif /* STREAMING */
10626 
10627 case XYRELY:
10628     return(hmsg("Syntax: SET RELIABLE { ON, OFF, AUTO }\n\
10629   Tells Kermit whether its connection is reliable.  Default is AUTO,\n\
10630   meaning Kermit should figure it out for itself."));
10631 
10632 case XYCLEAR:
10633     return(hmsg("Syntax: SET CLEAR-CHANNEL { ON, OFF, AUTO }\n\
10634   Tells Kermit whether its connection is transparent to all 8-bit bytes.\n\
10635   Default is AUTO, meaning Kermit figures it out from the connection type.\n\
10636   When both sender and receiver agree channel is clear, SET PREFIXING NONE\n\
10637   is used automatically."));
10638 
10639 #ifdef TLOG
10640 case XYTLOG:
10641     return(hmsg("Syntax: SET TRANSACTION-LOG { BRIEF, FTP, VERBOSE }\n\
10642   Selects the transaction-log format; BRIEF and FTP have one line per file;\n\
10643   FTP is compatible with FTP log.  VERBOSE (the default) has more info."));
10644 #endif /* TLOG */
10645 
10646 case XYOPTS:
10647     return(hmsg("Syntax: SET OPTIONS command [ switches... ]\n\
10648   For use with commands that have switches; sets the default switches for\n\
10649   the given command.  Type SET OPTIONS ? for a list of amenable commands."));
10650 
10651 #ifndef NOSPL
10652 case XYTIMER:
10653     return(hmsga(hmxytimer));
10654 #endif /* NOSPL */
10655 
10656 #ifdef CKROOT
10657   case XYROOT:
10658     return(hmsga(hmxxchroot));
10659 #endif /* XYROOT */
10660 
10661 #ifdef ANYSSH
10662   case XYSSH:
10663     return(hmsga(hmxyssh));
10664 #endif /* ANYCMD */
10665 
10666 #ifdef LOCUS
10667   case XYLOCUS:
10668     return(hmsga(hmxylocus));
10669 #endif /* LOCUS */
10670 
10671 #ifdef OS2
10672 #ifdef KUI
10673   case XYGUI:
10674     return(hmsga(hmxygui));
10675 #endif /* KUI */
10676 #endif /* OS2 */
10677 
10678   case XYMATCH:
10679     return(hmsga(hmxymatch));
10680 
10681 #ifndef NOSEXP
10682   case XYSEXP:
10683     return(hmsga(hmxysexp));
10684 #endif	/* NOSEXP */
10685 
10686 #ifndef NOSPL
10687   case XYVAREV:
10688     return(hmsg("Syntax: SET VARIABLE-EVALUATION { RECURSIVE, SIMPLE }\n\
10689   Tells Kermit weather to evaluate \\%x and \\&x[] variables recursively\n\
10690   (which is the default for historical reasons) or by simple string\n\
10691   replacement, which lets you use these variables safely to store strings\n\
10692   (such as Windows pathnames) that might contain backslashes."));
10693 #endif	/* NOSPL */
10694 
10695 #ifdef HAVE_LOCALE
10696   case XYLOCALE:
10697     return(hmsg("Syntax: SET LOCALE [ locale-string ]\n\
10698   Changes the locale for language and character-set to the one given.  The\n\
10699   local-string is in the format required by your computer, such as\n\
10700   en_US.US-ASCII or es_VE.ISO8859-1.  C-Kermit's SET LOCALE command affects\n\
10701   C-Kermit itself and any subprocesses, but does not affect the environment\n\
10702   from which C-Kermit was invoked."));
10703 #endif /* HAVE_LOCALE */
10704 
10705 default:
10706     printf("Not available - \"%s\"\n",cmdbuf);
10707     return(0);
10708     }
10709 }
10710 
10711 #ifndef NOSPL
10712 static char * hfsplit[] = {
10713 "Function \\fsplit(s1,&a,s2,s3,n2,n3) - Assigns string words to an array.",
10714 "  s1 = source string.",
10715 "  &a = array designator.",
10716 "  s2 = optional break set.",
10717 "  s3 = optional include set (or ALL, CSV, or TSV).",
10718 "  n2 = optional grouping mask.",
10719 "  n3 = optional separator flag:",
10720 "   0 = collapse adjacent separators;",
10721 "   1 = don't collapse adjacent separators.",
10722 " ",
10723 "  \\fsplit() breaks the string s1 into \"words\" as indicated by the other",
10724 "  parameters, assigning them to given array, if any.  If the specified",
10725 "  already exists, it is recycled; if no array is specified, the count is",
10726 "  returned but no array is created.  All arguments are optional",
10727 "  (\\fsplit() with no arguments returns 0).",
10728 " ",
10729 "  The BREAK SET is the set of all characters that separate words. The",
10730 "  default break set is all characters except ASCII letters and digits.",
10731 "  ASCII (C0) control characters are treated as break characters by default,",
10732 "  as are spacing and punctuation characters, brackets, and so on, and",
10733 "  all 8-bit characters.",
10734 " ",
10735 "  The INCLUDE SET is the set of characters that are to be treated as ",
10736 "  parts of words even though they normally would be separators.  The",
10737 "  default include set is empty.  Three special symbolic include sets are",
10738 "  also allowed:",
10739 " ",
10740 "    ALL (meaning include all bytes that are not in the break set)",
10741 "    CSV (special treatment for Comma-Separated-Value records)",
10742 "    TSV (special treatment for Tab-Separated-Value records)",
10743 " ",
10744 "  For operating on 8-bit character sets, the include set should be ALL.",
10745 " ",
10746 "  If the grouping mask is given and is nonzero, words can be grouped by",
10747 "  quotes or brackets selected by the sum of the following:",
10748 " ",
10749 "     1 = doublequotes:    \"a b c\"",
10750 "     2 = braces:          {a b c}",
10751 "     4 = apostrophes:     'a b c'",
10752 "     8 = parentheses:     (a b c)",
10753 "    16 = square brackets: [a b c]",
10754 "    32 = angle brackets:  <a b c>",
10755 " ",
10756 "  Nesting is possible with {}()[]<> but not with quotes or apostrophes.",
10757 " ",
10758 "Returns integer:",
10759 "  Number of words in source string.",
10760 " ",
10761 "Also see:",
10762 "  HELP FUNCTION WORD",
10763 ""
10764 };
10765 
10766 /*  D O H F U N C  --  Give help for a function  */
10767 
10768 int
dohfunc(xx)10769 dohfunc(xx) int xx; {
10770     /* int x; */
10771     if (xx == -3) {
10772         return(hmsga(hmxxfunc));
10773     }
10774     if (xx == FN_WORD)                  /* Long help message */
10775         return(hmsga(hmfword));
10776 
10777     printf("\n");
10778     switch (xx) {
10779       case FN_IND:                      /* Index (of string 1 in string 2) */
10780       case FN_RIX:                      /* Rindex (index from right) */
10781         printf("\\f%sindex(s1,s2,n1,n2)\n\
10782   s1 = string to look for.\n\
10783   s2 = string to look in.\n\
10784   n1 = optional 1-based starting position, default = 1.\n\
10785   n2 = optional desired occurrence number, default = 1.\n",
10786                xx == FN_RIX ? "r" : ""
10787                );
10788         printf("Returns integer:\n\
10789   1-based position of %smost occurrence of s1 in s2, ignoring the %smost\n\
10790   (n1-1) characters in s2; returns 0 if s1 not found in s2.\n",
10791                xx == FN_IND ? "left" : "right",
10792                xx == FN_IND ? "left" : "right"
10793         );
10794         break;
10795       case FN_COUNT:			/* Count occurrences of s1 in s2 */
10796 	printf("\\fcount(s1,s2,n1)\n\
10797   s1 = string or character to look for.\n\
10798   s2 = string to look in.\n\
10799   n1 = optional 1-based starting position, default = 1.\n");
10800 	printf("Returns integer:\n\
10801   Number of occurrences of s1 in s2, 0 or more.\n");
10802         break;
10803 
10804       case FN_SEARCH:                   /* Search for pattern */
10805       case FN_RSEARCH:                  /* Search for pattern from right */
10806         printf("\\f%ssearch(s1,s2,n1,n2)\n\
10807   s1 = pattern to look for.\n\
10808   s2 = string to look in.\n\
10809   n1 = optional 1-based offset, default = 1.\n\
10810   n2 = optional desired occurrence of match, default = 1.\n",
10811                xx == FN_RSEARCH ? "r" : ""
10812                );
10813         printf("Returns integer:\n\
10814   1-based position of %smost match for s1 in s2, ignoring the %smost\n\
10815   (n1-1) characters in s2; returns 0 if no match.\n",
10816                xx == FN_SEARCH ? "left" : "right",
10817                xx == FN_SEARCH ? "left" : "right"
10818         );
10819         printf(
10820 "  s1 is a \"floating pattern\"; see HELP PATTERNS for details.\n");
10821         break;
10822       case FN_LEN:                      /* Length (of string) */
10823         printf("\\flength(s1)\n\
10824   s1 = string.\n");
10825         printf("Returns integer:\n\
10826   Length of string s1.\n");
10827         break;
10828       case FN_LIT:                      /* Literal (don't expand the string) */
10829         printf("\\fliteral(s1)\n\
10830   s1 = string.\n");
10831         printf("Returns string:\n\
10832   s1 literally without evaluation.\n");
10833         break;
10834       case FN_LOW:                      /* Lower (convert to lowercase) */
10835         printf("\\flower(s1)\n\
10836   s1 = string.\n");
10837         printf("Returns string:\n\
10838   s1 with uppercase letters converted to lowercase.\n");
10839         break;
10840       case FN_MAX:                      /* Max (maximum) */
10841         printf("\\fmaximum(n1,n2)\n\
10842   n1 = integer.\n\
10843   n2 = integer.\n");
10844         printf("Returns integer:\n\
10845   The greater of n1 and n2.\n");
10846         break;
10847       case FN_MIN:                      /* Min (minimum) */
10848         printf("\\fminimum(n1,n2)\n\
10849   n1 = integer.\n\
10850   n2 = integer.\n");
10851         printf("Returns integer:\n\
10852   The lesser of n1 and n2.\n");
10853         break;
10854       case FN_MOD:                      /* Mod (modulus) */
10855         printf("\\fmodulus(n1,n2)\n\
10856   n1 = integer.\n\
10857   n2 = integer.\n");
10858         printf("Returns integer:\n\
10859   The remainder after dividing n1 by n2.\n");
10860         break;
10861       case FN_EVA:                      /* Eval (evaluate arith expression) */
10862         printf("\\fevaluate(e)\n\
10863   e = arithmetic expression.\n");
10864         printf("Returns integer:\n\
10865   The result of evaluating the expression.\n");
10866         break;
10867       case FN_SUB:                      /* Substr (substring) */
10868         printf("\\fsubstring(s1,n1,n2)\n\
10869   s1 = string.\n\
10870   n1 = integer, 1-based starting position, default = 1.\n\
10871   n2 = integer, length, default = length(s1) - n1 + 1.\n");
10872         printf("Returns string:\n\
10873   Substring of s1 starting at n1, length n2.\n");
10874         break;
10875       case FN_UPP:                      /* Upper (convert to uppercase) */
10876         printf("\\fupper(s1)\n\
10877   s1 = string.\n");
10878         printf("Returns string:\n\
10879   s1 with lowercase letters converted to uppercase.\n");
10880         break;
10881       case FN_REV:                      /* Reverse (a string) */
10882         printf("\\freverse(s1)\n\
10883   s1 = string.\n");
10884         printf("Returns string:\n\
10885   s1 with its characters in reverse order.\n");
10886         break;
10887       case FN_REP:                      /* Repeat (a string) */
10888         printf("\\frepeat(s1,n1)\n\
10889   s1 = string.\n\
10890   n1 = integer.\n");
10891         printf("Returns string:\n\
10892   s1 repeated n1 times.\n");
10893         break;
10894       case FN_EXE:                      /* Execute (a macro) */
10895         printf("\\fexecute(m1,a1,a2,a3,...)\n\
10896   m1 = macro name.\n\
10897   a1 = argument 1.\n\
10898   a2 = argument 2, etc\n");
10899         printf("Returns string:\n\
10900   The return value of the macro (HELP RETURN for further info).\n");
10901         break;
10902       case FN_LPA:                      /* LPAD (left pad) */
10903       case FN_RPA:                      /* RPAD (right pad) */
10904         printf("\\f%cpad(s1,n1,c1)\n\
10905   s1 = string.\n\
10906   n1 = integer.\n\
10907   c1 = character, default = space.\n",
10908                 xx == FN_LPA ? 'l' : 'r');
10909         printf("Returns string:\n\
10910   s1 %s-padded with character c1 to length n1.\n",
10911                xx == FN_LPA ? "left" : "right");
10912         break;
10913       case FN_DEF:                      /* Definition of a macro, unexpanded */
10914         printf("\\fdefinition(m1)\n\
10915   m1 = macro name.\n");
10916         printf("Returns string:\n\
10917   Literal definition of macro m1.\n");
10918         break;
10919       case FN_CON:                      /* Contents of a variable, ditto */
10920         printf("\\fcontents(v1)\n\
10921   v1 = variable name such as \\%%a.\n");
10922         printf("Returns string:\n\
10923   Literal definition of variable v1, evaluated one level only.\n");
10924         break;
10925       case FN_FIL:                      /* Next file */
10926         printf("\\fnextfile()\n");
10927         printf("Returns string:\n\
10928   Name of next file from list created by most recent \\f[r]files() or\n\
10929   \\f[r]dir()invocation, or an empty string if there are no more files in\n\
10930   the list.\n");
10931         break;
10932       case FN_FC:                       /* File count */
10933         printf("\\ffiles(f1[,&a]) - File list.\n\
10934   f1 = file specification, possibly containing wildcards.\n\
10935   &a = optional name of array to assign file list to.\n");
10936         printf("Returns integer:\n\
10937   The number of regular files that match f1.  Use with \\fnextfile().\n");
10938         break;
10939       case FN_CHR:                      /* Character (like BASIC CHR$()) */
10940         printf("\\fcharacter(n1)\n\
10941   n1 = integer.\n");
10942         printf("Returns character:\n\
10943   The character whose numeric code is n1.\n");
10944         break;
10945       case FN_RIG:                      /* Right (like BASIC RIGHT$()) */
10946         printf("\\fright(s1,n1)\n\
10947   s1 = string.\n\
10948   n1 = integer, default = length(s1).\n");
10949         printf("Returns string:\n\
10950   The rightmost n1 characters of string s1.\n");
10951         break;
10952       case FN_LEF:                      /* Left (like BASIC LEFT$()) */
10953         printf("\\fleft(s1,n1)\n\
10954   s1 = string.\n\
10955   n1 = integer, default = length(s1).\n");
10956         printf("Returns string:\n\
10957   The leftmost n1 characters of string s1.\n");
10958         break;
10959       case FN_COD:                      /* Code value of character */
10960         printf("\\fcode(s1)\n\
10961   c1 = character.\n");
10962         printf("Returns integer:\n\
10963   The numeric code of the first character in string s1, or 0 if s1 empty.\n");
10964         break;
10965       case FN_RPL:                      /* Replace */
10966         printf("\\freplace(s1,s2,[s3[,n1[,n2]]])\n\
10967   s1 = original string.\n\
10968   s2 = match string.\n\
10969   s3 = replacement string (may be empty).\n\
10970   n1 = occurrence (if omitted or 0 does all occurrences).\n");
10971 #ifdef RPLWORDMODE
10972         printf("  n2 = word mode \
10973 (0 = ignore context; 1 = only if target is delimited).\n");
10974 #endif  /* RPLWORDMODE */
10975 
10976         printf("Returns string:\n\
10977   s1 with occurrence number n1 of s2 replaced by s3.\n\
10978   If n1 = 0 or omitted, all occurrences are replaced.\n\
10979   If n1 < 0, occurrences are counted from the right.\n");
10980         break;
10981 
10982       case FN_FD:                       /* File date */
10983         printf("\\fdate(f1)\n\
10984   f1 = filename.\n");
10985 #ifdef VMS
10986         printf("Returns string:\n\
10987   Creation date of file f1, format: yyyymmdd hh:mm:ss.\n");
10988 #else
10989         printf("Returns string:\n\
10990   Modification date of file f1, format: yyyymmdd hh:mm:ss.\n");
10991 #endif /* VMS */
10992         break;
10993       case FN_FS:                       /* File size */
10994         printf("\\fsize(f1)\n\
10995   f1 = filename.\n");
10996         printf("Returns integer:\n\
10997   Size of file f1.\n");
10998         break;
10999       case FN_VER:                      /* Verify */
11000         printf("\\fverify(s1,s2,n1)\n\
11001   s1 = string of characters to look for.\n\
11002   s2 = string to look in.\n\
11003   n1 = starting position in s2.\n");
11004         printf("Returns integer:\n\
11005   1-based position of first character in s2 that is not also in s1,\n\
11006   or -1 if s1 is empty, or 0 if all characters in s2 are also in s1.\n");
11007         break;
11008       case FN_IPA:                      /* Find and return IP address */
11009         printf("\\fipaddress(s1,n1)\n\
11010   s1 = string.\n\
11011   n1 = 1-based integer starting position, default = 1.\n");
11012         printf("Returns string:\n\
11013   First IP address in s1, scanning from left starting at position n1.\n");
11014         break;
11015       case FN_HEX:                      /* Hexify */
11016         printf("\\fhexify(s1)\n\
11017   s1 = string.\n");
11018         printf("Returns string:\n\
11019   The hexadecimal representation of s1.  Also see \\fn2hex().\n");
11020         break;
11021       case FN_UNH:                      /* Unhexify */
11022         printf("\\funhexify(h1)\n\
11023   h1 = Hexadecimal string.\n");
11024         printf("Returns string:\n\
11025   The result of unhexifying s1, or nothing if s1 is not a hex string.\n");
11026         break;
11027       case FN_UNTAB:			/* Untabify */
11028         printf("\\funtabify(s1)\n\
11029   s1 = string.\n");
11030         printf("Returns string:\n\
11031   The result of converting tabs in s1 to spaces assuming tab stops every\n\
11032   8 spaces.\n");
11033         break;
11034       case FN_BRK:                      /* Break */
11035       case FN_SPN:                      /* Span */
11036         printf("\\f%s(s1,s2,n1)\n\
11037   s1 = string to look in.\n\
11038   s2 = string of characters to look for.\n\
11039   n1 = 1-based integer starting position, default = 1.\n",
11040               xx == FN_BRK ? "break" : "span"
11041               );
11042         printf("Returns string:\n\
11043   s1 up to the first occurrence of any character%salso in s2,\n\
11044   scanning from the left starting at position n1.\n",
11045                xx == FN_SPN ? " not " : " ");
11046         break;
11047       case FN_TRM:                      /* Trim */
11048       case FN_LTR:                      /* Left-Trim */
11049         printf("\\f%s(s1,s2)\n\
11050   s1 = string to look in.\n\
11051   s2 = string of characters to look for, default = blanks and tabs.\n",
11052                xx == FN_TRM ? "trim" : "ltrim");
11053         printf("Returns string:\n\
11054   s1 with all characters that are also in s2 trimmed from the %s.\n.",
11055                xx == FN_TRM ? "right" : "left");
11056         break;
11057       case FN_CAP:                      /* Capitalize */
11058         printf("\\fcapitalize(s1)\n\
11059   s1 = string.\n");
11060         printf("Returns string:\n\
11061   s1 with its first letter converted to uppercase and the remaining\n\
11062   letters to lowercase.\n");
11063         printf("Synonym: \\fcaps(s1)\n");
11064         break;
11065       case FN_TOD:                      /* Time-of-day-to-secs-since-midnite */
11066         printf("\\ftod2secs(s1)\n\
11067   s1 = time-of-day string, hh:mm:ss, 24-hour format.\n");
11068         printf("Returns number:\n\
11069   Seconds since midnight.\n");
11070         break;
11071       case FN_FFN:                      /* Full file name */
11072         printf("\\fpathname(f1)\n\
11073   f1 = filename, possibly wild.\n");
11074         printf("Returns string:\n\
11075   Full pathname of f1.\n");
11076         break;
11077       case FN_CHK:                      /* Checksum of text */
11078         printf("\\fchecksum(s1)\n\
11079   s1 = string.\n");
11080         printf("Returns integer:\n\
11081   16-bit checksum of string s1.\n");
11082         break;
11083       case FN_CRC:                      /* CRC-16 of text */
11084         printf("\\fcrc16(s1)\n\
11085   s1 = string.\n");
11086         printf("Returns integer:\n\
11087   16-bit cyclic redundancy check of string s1.\n");
11088         break;
11089       case FN_BSN:                      /* Basename of file */
11090         printf("\\fbasename(f1)\n\
11091   f1 = filename, possibly wild.\n");
11092         printf("Returns string:\n\
11093   Filename f1 stripped of all device and directory information.\n");
11094         break;
11095       case FN_CMD:                      /* Output of a command (cooked) */
11096         printf("\\fcommand(s1)\n\
11097   s1 = string\n");
11098         printf("Returns string:\n\
11099   Output of system command s1, if any, with final line terminator stripped.\n"
11100                );
11101         break;
11102       case FN_RAW:                      /* Output of a command (raw) */
11103         printf("\\frawcommand(s1)\n\
11104   s1 = string\n");
11105         printf("Returns string:\n\
11106   Output of system command s1, if any.\n");
11107         break;
11108       case FN_STX:                      /* Strip from right */
11109         printf("\\fstripx(s1,c1)\n\
11110   s1 = string to look in.\n\
11111   c1 = character to look for, default = \".\".\n");
11112         printf("Returns string:\n\
11113   s1 up to the rightmost occurrence of character c1.\n"
11114         );
11115         break;
11116 
11117       case FN_STL:                      /* Strip from left */
11118         printf("\\flop(s1[,c1[,n1]])\n\
11119   s1 = string to look in.\n\
11120   c1 = character to look for, default = \".\".\n\
11121   n1 = occurrence of c1, default = 1.\n");
11122         printf("Returns string:\n\
11123   The part of s1 after the n1th leftmost occurrence of character c1.\n"
11124         );
11125         break;
11126 
11127       case FN_LOPX:                      /* Strip from right */
11128         printf("\\flopx(s1,c1)\n\
11129   s1 = string to look in.\n\
11130   c1 = character to look for, default = \".\".\n\
11131   n1 = occurrence of c1, default = 1.\n");
11132         printf("Returns string:\n\
11133   The part of s1 after the n1th rightmost occurrence of character c1.\n"
11134         );
11135         break;
11136 
11137       case FN_STN:                      /* Strip n chars */
11138         printf("\\fstripn(s1,n1)\n\
11139   s1 = string to look in.\n\
11140   n1 = integer, default = 0.\n");
11141         printf("Returns string:\n\
11142   s1 with n1 characters removed from the right.\n"
11143         );
11144         break;
11145 
11146       case FN_STB:                      /* Strip enclosing brackets */
11147         printf("\\fstripb(s1[,c1[,c2]])\n\
11148   s1 = original string.\n\
11149   c1 = optional first character\n");
11150         printf("\
11151   c2 = optional final character.\n");
11152         printf("Returns string:\n\
11153   s1 with the indicated enclosing characters removed.  If c1 and c2 not\n\
11154      specified, any matching brackets, braces, parentheses, or quotes are\n");
11155         printf("\
11156      assumed.  If c1 is given but not c2, the appropriate c2 is assumed.\n\
11157      if both c1 and c2 are given, they are used as-is.\n"
11158                );
11159         printf(
11160 "Alternative format:\n\
11161   Include a grouping mask number in place of c1 and omit c2 to specify more\n\
11162   than one possibility at once; see \\fword() for details.\n"
11163                );
11164         break;
11165 
11166 #ifdef OS2
11167       case FN_SCRN_CX:                  /* Screen Cursor X Pos */
11168         printf("\\fscrncurx()\n");
11169         printf("Returns integer:\n\
11170   The 0-based X coordinate (column) of the Terminal screen cursor.\n");
11171         break;
11172       case FN_SCRN_CY:                  /* Screen Cursor Y Pos */
11173         printf("\\fscrncury()\n");
11174         printf("Returns integer:\n\
11175   The 0-based Y coordinate (row) of the Terminal screen cursor.\n");
11176         break;
11177       case FN_SCRN_STR:                 /* Screen String */
11178         printf("\\fscrnstr(ny,nx,n1)\n\
11179   ny = integer.\n\
11180   nx = integer.\n\
11181   n1 = integer.\n");
11182         printf("Returns string:\n\
11183   The string at Terminal-screen coordinates (nx,ny), length n1,\n\
11184   blanks included.  Coordinates start at 0.  Default values are\n\
11185   0 for ny and nx, and line width for n1.\n");
11186         break;
11187 #endif /* OS2 */
11188 
11189       case FN_2HEX:                     /* Num to hex */
11190         printf("\\fn2hex(n1) - Number to hex\n  n1 = integer.\n");
11191         printf("Returns string:\n  The hexadecimal representation of n1.\n");
11192         break;
11193 
11194       case FN_2OCT:                     /* Num to hex */
11195         printf("\\fn2octal(n1) - Number to octal\n  n1 = integer.\n");
11196         printf("Returns string:\n  The octal representation of n1.\n");
11197         break;
11198 
11199 #ifdef RECURSIVE
11200       case FN_DIR:                      /* Recursive directory count */
11201         printf("\\fdirectories(f1) - Directory list.\n\
11202   f1 = directory specification, possibly containing wildcards.\n\
11203   &a = optional name of array to assign directory list to.\n");
11204         printf("Returns integer:\n\
11205   The number of directories that match f1; use with \\fnextfile().\n");
11206         break;
11207 
11208       case FN_RFIL:                     /* Recursive file count */
11209         printf("\\frfiles(f1[,&a]) - Recursive file list.\n\
11210   f1 = file specification, possibly containing wildcards.\n\
11211   &a = optional name of array to assign file list to.\n");
11212         printf("Returns integer:\n\
11213   The number of files whose names match f1 in the current or given\n\
11214   directory tree; use with \\fnextfile().\n");
11215         break;
11216 
11217       case FN_RDIR:                     /* Recursive directory count */
11218         printf("\\frdirectories(f1) - Recursive directory list.\n\
11219   f1 = directory specification, possibly containing wildcards.\n\
11220   &a = optional name of array to assign directory list to.\n");
11221         printf("Returns integer:\n\
11222   The number of directories that match f1 in the current or given directory\n\
11223   tree.  Use with \\fnextfile().\n");
11224         break;
11225 #endif /* RECURSIVE */
11226 
11227       case FN_DNAM:                     /* Directory part of a filename */
11228         printf("\\fdirname(f) - Directory part of a filename.\n\
11229   f = a file specification.\n");
11230         printf("Returns directory name:\n\
11231   The full name of the directory that the file is in, or if the file is a\n\
11232   directory, its full name.\n");
11233         break;
11234 
11235 #ifndef NORANDOM
11236       case FN_RAND:                     /* Random number */
11237         printf("\\frandom(n) - Random number.\n\
11238   n = a positive integer.\n");
11239         printf("Returns integer:\n\
11240   A random number between 0 and n-1.\n");
11241         break;
11242 #endif /* NORANDOM */
11243 
11244       case FN_SPLIT:                    /* Split */
11245 #ifdef COMMENT
11246         printf("\\fsplit(s1,&a,s2,s3,n2,n3) - \
11247 Assign string words to an array.\n\
11248   s1 = source string\n  &a = array designator\n  s2 = optional break set.\n");
11249         printf("  s3 = optional include set.\n");
11250         printf("  n2 = optional grouping mask.\n");
11251         printf("  n3 = optional separator flag.\n");
11252         printf("  s2, s3, n2, n3 are as in \\fword().\n");
11253         printf(
11254 "  All arguments are optional; if \\&a[] already exists, it is recycled;\n\
11255   if array not specified, the count is returned but no array is created.\n");
11256         printf("Returns integer:\n\
11257   Number of words in source string.\n");
11258 #else
11259         hmsga(hfsplit);
11260 #endif	/* COMMENT */
11261         break;
11262 
11263       case FN_DTIM:                     /* CVTDATE */
11264         printf("\\fcvtdate([date-time][,n1]) - Date/time conversion.\n");
11265         printf("  Converts date and/or time to standard format.\n");
11266         printf("  If no date/time given, returns current date/time.\n");
11267         printf("  [date-time], if given, is free-format date and/or time.\n");
11268         printf("  HELP DATE for info about date-time formats.\n");
11269         printf("Returns string:\n\
11270   Standard-format date and time: yyyymmdd hh:mm:ss (numeric)\n");
11271         printf("  If n1 is given:\n\
11272   n1 = 1: yyyy-mmm-dd hh:mm:ss (mmm = English 3-letter month abbreviation)\n\
11273   n1 = 2: dd-mmm-yyyy hh:mm:ss (ditto)\n\
11274   n1 = 3: yyyymmddhhmmss (all numeric)\n\
11275   n1 = 4: Day Mon dd hh:mm:ss yyyy (asctime)\n\
11276   n1 = 5: yyyy:mm:dd:hh:mm:ss (all numeric with all fields delimited)\n\
11277   Other:  yyyymmdd hh:mm:dd");
11278         break;
11279 
11280       case FN_JDATE:                    /* DOY */
11281         printf("\\fdoy([date-time]) - Day of Year.\n");
11282         printf("  Converts date and/or time to day-of-year (DOY) format.\n");
11283         printf("  If no date/time given, returns current date.\n");
11284         printf("  [date-time], if given, is free-format date and/or time.\n");
11285         printf("  HELP DATE for info about date-time formats.\n");
11286         printf("Returns numeric string:\n\
11287   DOY: yyyyddd, where ddd is 1-based day number in year.\n");
11288         break;
11289 
11290       case FN_PNCVT:
11291         printf("\\fdialconvert(phone-number) - Convert phone number.\n");
11292         printf("  Converts the given phone number for dialing according\n");
11293         printf(
11294 "  to the prevailing dialing rules -- country code, area code, etc.\n");
11295         printf("Returns string:\n\
11296   The dial string that would be used if the same phone number had been\n\
11297   given to the DIAL command.\n"
11298               );
11299         break;
11300 
11301       case FN_DATEJ:                    /* DOY2DATE */
11302         printf("\\fdoy2date([doy[ time]]) - Day of Year to Date.\n");
11303         printf("  Converts yyyymmm to yyyymmdd\n");
11304         printf("  If time included, it is converted to 24-hour format.");
11305         printf(
11306             "Returns standard date or date-time string yyyymmdd hh:mm:ss\n");
11307         break;
11308 
11309       case FN_MJD:
11310         printf("\\fmjd([[date][ time]]) - Modified Julian Date (MJD).\n");
11311         printf(
11312 "  Converts date and/or time to MJD, the number of days since 17 Nov 1858.\n");
11313         printf("  HELP DATE for info about date-time formats.\n");
11314         printf("Returns: integer.\n");
11315         break;
11316 
11317       case FN_MJD2:
11318         printf("\\fmjd2date(mjd) - Modified Julian Date (MJD) to Date.\n");
11319         printf("  Converts MJD to standard-format date.\n");
11320         printf("Returns: yyyymmdd.\n");
11321         break;
11322 
11323       case FN_DAY:
11324         printf("\\fday([[date][ time]]) - Day of Week.\n");
11325         printf("Returns day of week of given date as Mon, Tue, etc.\n");
11326         printf("HELP DATE for info about date-time formats.\n");
11327         printf("Also see HELP FUNCTION DAYNAME.\n");
11328         break;
11329 
11330       case FN_NDAY:
11331         printf("\\fnday([[date][ time]]) - Numeric Day of Week.\n");
11332         printf(
11333     "Returns numeric day of week of given date, 0=Sun, 1=Mon, ..., 6=Sat.\n");
11334         printf("HELP DATE for info about date-time formats.\n");
11335         break;
11336 
11337       case FN_TIME:
11338         printf("\\ftime([[date][ time]]) - Time.\n");
11339         printf(
11340 "Returns time portion of given date and/or time in hh:mm:ss format.\n");
11341         printf("If no argument given, returns current time.\n");
11342         printf("HELP DATE for info about date-time formats.\n");
11343         break;
11344 
11345       case FN_NTIM:
11346         printf("\\fntime([[date][ time]]) - Numeric Time.\n");
11347         printf(
11348 "Returns time portion of given date and/or time as seconds since midnight.\n");
11349         printf("If no argument given, returns current time.\n");
11350         printf("HELP DATE for info about date-time formats.\n");
11351         break;
11352 
11353       case FN_N2TIM:
11354         printf("\\fn2time(seconds) - Numeric Time to Time.\n");
11355         printf(
11356 "Returns the given number of seconds in hh:mm:ss format.\n");
11357         break;
11358 
11359       case FN_PERM:
11360         printf("\\fpermissions(file) - Permissions of File.\n");
11361         printf(
11362 #ifdef UNIX
11363 "Returns permissions of given file as they would be shown by \"ls -l\".\n"
11364 #else
11365 #ifdef VMS
11366 "Returns permissions of given file as they would be shown by \"dir /prot\".\n"
11367 #else
11368 "Returns the permissions of the given file.\n"
11369 #endif /* VMS */
11370 #endif /* UNIX */
11371                );
11372         break;
11373 
11374       case FN_ALOOK:
11375         printf("\\farraylook(pattern,&a) - Lookup pattern in array.\n\
11376   pattern = String or pattern\n");
11377         printf("  &a = array designator, can include range specifier.\n");
11378         printf(
11379 "Returns number:\n\
11380   The index of the first matching array element or -1 if none.\n");
11381         printf("More info:\n\
11382   HELP PATTERN for pattern syntax.\n  HELP ARRAY for arrays.\n");
11383         break;
11384 
11385       case FN_TLOOK:
11386         printf(
11387 "\\ftablelook(keyword,&a,[c]) - Lookup keyword in keyword table.\n\
11388   pattern = String\n");
11389         printf("  keyword = keyword to look up (can be abbreviated).\n");
11390         printf("  &a      = array designator, can include range specifier.\n");
11391         printf("            This array must be in alphabetical order.\n");
11392         printf("  c       = Optional field delimiter, colon(:) by default.\n");
11393         printf(
11394 "Returns number:\n\
11395   1 or greater, index of array element that uniquely matches given keyword;\n"
11396                );
11397         printf(
11398 "or -2 if keyword was ambiguous, or -1 if keyword empty or not found.\n"
11399                );
11400         printf("Also see:\n\
11401   HELP FUNC ARRAYLOOK for a similar function.\n  HELP ARRAY for arrays.\n");
11402         break;
11403 
11404       case FN_ABS:                      /* Absolute */
11405         printf("\\fabsolute(n1)\n\
11406   n1 = integer.\n");
11407         printf("Returns integer:\n\
11408   The absolute (unsigned) value of n1.\n");
11409         break;
11410 
11411 #ifdef FNFLOAT
11412       case FN_FPABS:
11413         printf("\\ffpabsolute(f1,d)\n\
11414   f1 = floating-point number or integer.\n\
11415    d = integer.\n");
11416         printf("Returns floating-point number:\n\
11417   The absolute (unsigned) value of f1 to d decimal places.\n");
11418         break;
11419 
11420       case FN_FPADD:
11421         printf("\\ffpadd(f1,f2,d)\n\
11422   f1,f2 = floating-point numbers or integers.\n\
11423       d = integer.\n");
11424         printf("Returns floating-point number:\n\
11425   The sum of f1 and f2 to d decimal places.\n");
11426         break;
11427 
11428       case FN_FPSUB:
11429         printf("\\ffpsubtract(f1,f2,d)\n\
11430   f1,f2 = floating-point numbers or integers.\n\
11431       d = integer.\n");
11432         printf("Returns floating-point number:\n\
11433   f1 minus f2 to d decimal places.\n");
11434         break;
11435 
11436       case FN_FPMUL:
11437         printf("\\ffpmultiply(f1,f2,d)\n\
11438   f1,f2 = floating-point numbers or integers.\n\
11439       d = integer.\n");
11440         printf("Returns floating-point number:\n\
11441   The product of f1 and f2 to d decimal places.\n");
11442         break;
11443 
11444       case FN_FPDIV:
11445         printf("\\ffpdivide(f1,f2,d)\n\
11446   f1,f2 = floating-point numbers or integers.\n\
11447       d = integer.\n");
11448         printf("Returns floating-point number:\n\
11449   f1 divided by f2 to d decimal places.\n");
11450         break;
11451 
11452       case FN_FPMAX:
11453         printf("\\ffpmaximum(f1,f2,d)\n\
11454   f1,f2 = floating-point numbers or integers.\n\
11455       d = integer.\n");
11456         printf("Returns floating-point number:\n\
11457   The maximum of f1 and f2 to d decimal places.\n");
11458         break;
11459 
11460       case FN_FPMIN:
11461         printf("\\ffpminimum(f1,f2,d)\n\
11462   f1,f2 = floating-point numbers or integers.\n\
11463       d = integer.\n");
11464         printf("Returns floating-point number:\n\
11465   The minimum of f1 and f2 to d decimal places.\n");
11466         break;
11467 
11468       case FN_FPMOD:
11469         printf("\\ffpmodulus(f1,f2,d)\n\
11470   f1,f2 = floating-point numbers or integers.\n\
11471       d = integer.\n");
11472         printf("Returns floating-point number:\n\
11473   The modulus of f1 and f2 to d decimal places.\n");
11474         break;
11475 
11476       case FN_FPPOW:
11477         printf("\\ffpraise(f1,f2,d)\n\
11478   f1,f2 = floating-point numbers or integers.\n\
11479       d = integer.\n");
11480         printf("Returns floating-point number:\n\
11481   f1 raised to the power f2, to d decimal places.\n");
11482         break;
11483 
11484       case FN_FPCOS:
11485         printf("\\ffpcosine(f1,d)\n\
11486   f1 = floating-point number or integer.\n\
11487    d = integer.\n");
11488         printf("Returns floating-point number:\n\
11489   The cosine of angle f1 (in radians) to d decimal places.\n");
11490         break;
11491 
11492       case FN_FPSIN:
11493         printf("\\ffpsine(f1,d)\n\
11494   f1 = floating-point number or integer.\n\
11495    d = integer.\n");
11496         printf("Returns floating-point number:\n\
11497   The sine of angle f1 (in radians) to d decimal places.\n");
11498         break;
11499 
11500       case FN_FPTAN:
11501         printf("\\ffptangent(f1,d)\n\
11502   f1 = floating-point number or integer.\n\
11503    d = integer.\n");
11504         printf("Returns floating-point number:\n\
11505   The tangent of angle f1 (in radians) to d decimal places.\n");
11506         break;
11507 
11508       case FN_FPEXP:
11509         printf("\\ffpexp(f1,d)\n\
11510   f1 = floating-point number or integer.\n\
11511    d = integer.\n");
11512         printf("Returns floating-point number:\n\
11513   e (the base of natural logarithms) raised to the f1 power,\n\
11514   to d decimal places.\n");
11515         break;
11516 
11517       case FN_FPINT:
11518         printf("\\ffpint(f1)\n\
11519   f1 = floating-point number or integer.\n");
11520         printf("Returns integer:\n\
11521   The integer part of f1.\n");
11522         break;
11523 
11524       case FN_FPLOG:
11525         printf("\\ffplog10(f1,d)\n\
11526   f1 = floating-point number or integer.\n\
11527    d = integer.\n");
11528         printf("Returns floating-point number:\n\
11529   The logarithm, base 10, of f1 to d decimal places.\n");
11530         break;
11531 
11532       case FN_FPLN:
11533         printf("\\ffplogn(f1,d)\n\
11534   f1 = floating-point number or integer.\n\
11535    d = integer.\n");
11536         printf("Returns floating-point number:\n\
11537   The natural logarithm of f1 to d decimal places.\n");
11538         break;
11539 
11540       case FN_FPROU:
11541         printf("\\ffpround(f1,d)\n\
11542   f1 = floating-point number or integer.\n\
11543    d = integer.\n");
11544         printf("Returns floating-point number:\n\
11545   f1 rounded to d decimal places.\n");
11546         break;
11547 
11548       case FN_FPSQR:
11549         printf("\\ffpsqrt(f1,d)\n\
11550   f1 = floating-point number or integer.\n\
11551    d = integer.\n");
11552         printf("Returns floating-point number:\n\
11553   The square root of f1 to d decimal places.\n");
11554         break;
11555 #endif /* FNFLOAT */
11556 
11557 #ifdef CKCHANNELIO
11558       case FN_FEOF:
11559         printf("\\f_eof(n1)\n\
11560   n1 = channel number.\n");
11561         printf("Returns number:\n\
11562   1 if channel n1 at end of file, 0 otherwise.\n");
11563         break;
11564       case FN_FPOS:
11565         printf("\\f_pos(n1)\n\
11566   n1 = channel number.\n");
11567         printf("Returns number:\n\
11568   Read/write pointer of channel n1 as byte number.\n");
11569         break;
11570       case FN_NLINE:
11571         printf("\\f_line(n1)\n\
11572   n1 = channel number.\n");
11573         printf("Returns number:\n\
11574   Read/write pointer of channel n1 as line number.\n");
11575         break;
11576       case FN_FILNO:
11577         printf("\\f_handle(n1)\n\
11578   n1 = channel number.\n");
11579         printf("Returns number:\n\
11580   File %s of open file on channel n1.\n",
11581 #ifdef OS2
11582                "handle"
11583 #else
11584                "descriptor"
11585 #endif /* OS2 */
11586                );
11587         break;
11588       case FN_FSTAT:
11589         printf("\\f_status(n1)\n\
11590   n1 = channel number.\n");
11591         printf("Returns number:\n\
11592   Sum of open modes of channel n1: 1 = read; 2 = write; 4 = append, or:\n\
11593   0 if not open.\n");
11594         break;
11595       case FN_FGCHAR:
11596         printf("\\f_getchar(n1)\n\
11597   n1 = channel number.\n");
11598         printf("  Reads a character from channel n1 and returns it.\n");
11599         break;
11600       case FN_FGLINE:
11601         printf("\\f_getline(n1)\n\
11602   n1 = channel number.\n");
11603         printf("  Reads a line from channel n1 and returns it.\n");
11604         break;
11605       case FN_FGBLK:
11606         printf("\\f_getblock(n1,n2)\n\
11607   n1 = channel number, n2 = size\n");
11608         printf(
11609 "  Reads a block of n2 characters from channel n1 and returns it.\n");
11610         break;
11611       case FN_FPCHAR:
11612         printf("\\f_putchar(n1,c)\n\
11613   n1 = channel number, c = character\n");
11614         printf("  Writes a character to channel n1.\n\
11615 Returns number:\n\
11616   1 if successful, otherwise a negative error code.\n");
11617         break;
11618       case FN_FPLINE:
11619         printf("\\f_putline(n1,s1)\n\
11620   n1 = channel number, s1 = string\n");
11621         printf(
11622 "  Writes the string s1 to channel n1 and adds a line terminator.\n\
11623 Returns number:\n");
11624         printf("  How many characters written if successful;\n\
11625   Otherwise a negative error code.\n"
11626                );
11627         break;
11628       case FN_FPBLK:
11629         printf("\\f_putblock(n1,s1)\n\
11630   n1 = channel number, s1 = string\n");
11631         printf(
11632 "  Writes the string s1 to channel n1.\n\
11633   Returns number:\n");
11634         printf("  How many characters written if successful;\n\
11635   Otherwise a negative error code.\n"
11636                );
11637         break;
11638       case FN_FERMSG:
11639         printf("\\f_errmsg([n1])\n\
11640   n1 = numeric error code, \\v(f_error) by default.\n");
11641         printf("  Returns the associated error message string.\n");
11642         break;
11643 #endif /* CKCHANNELIO */
11644 
11645       case FN_AADUMP:
11646         printf("\\faaconvert(name,&a[,&b])\n\
11647   name = name of associative array, &a and &b = names of regular arrays.\n");
11648         printf(
11649 "  Converts the given associative array into two regular arrays, &a and &b,\n\
11650   containing the indices and values, respectively:\n");
11651         printf("Returns number:\n\
11652   How many elements were converted.\n");
11653         break;
11654 
11655 #ifdef CK_KERBEROS
11656       case FN_KRB_TK:
11657         printf("\\fkrbtickets(n)\n\
11658   n = Kerberos version number (4 or 5).\n\
11659   Returns string:\n\
11660   The number of active Kerberos 4 or 5 tickets.\n\
11661   Resets the ticket list used by \\fkrbnextticket(n).\n");
11662         break;
11663 
11664       case FN_KRB_NX:
11665         printf("\\fkrbnextticket(n)\n\
11666   n = Kerberos version number (4 or 5).\n\
11667   Returns string:\n\
11668     The next ticket in the Kerberos 4 or 5 ticket list that was set up by\n\
11669     the most recent invocation of \\fkrbtickets(n).\n");
11670         break;
11671 
11672       case FN_KRB_IV:
11673         printf("\\fkrbisvalid(n,name)\n\
11674   n    = Kerberos version number (4 or 5).\n\
11675   name = a ticket name as returned by \\fkrbnextticket(n).\n\
11676   Returns number:\n\
11677     1 if the ticket is valid, 0 if not valid.\n\
11678     A ticket is valid if all the following conditions are true:\n\n");
11679         printf("\n\
11680     (i)   it exists in the current cache file;\n\
11681     (ii)  it is not expired;\n\
11682     (iii) it is not marked invalid (K5 only);\n\
11683     (iv)  it was issued from the current IP address\n");
11684         printf("\n  This value can be used in an IF statement, e.g.:\n\n");
11685         printf("    if \\fkrbisvalid(4,krbtgt.FOO.BAR.EDU@FOO.BAR.EDU) ...\n");
11686         break;
11687 
11688       case FN_KRB_TT:
11689         printf("\\fkrbtimeleft(n,name)\n\
11690   n    = Kerberos version number (4 or 5).\n\
11691   name = a ticket name as returned by \\fkrbnextticket(n).\n\
11692   Returns string:\n\
11693     The number of seconds remaining in the ticket's lifetime.\n");
11694         break;
11695 
11696       case FN_KRB_FG:
11697         printf("\\fkrbflags(n,name)\n\
11698   n    = Kerberos version number (4 or 5).\n\
11699   name = a ticket name as returned by \\fkrbnextticket(n).\n\
11700   Returns string:\n");
11701         printf(
11702 "    The flags string as reported with AUTH K5 LIST /FLAGS.  This string can\n\
11703     be searched for a particular flag using the \\findex() function when\n\
11704     SET CASE is ON (for case sensitive searches).  Flag strings are only\n\
11705     available for K5 tickets.\n");
11706         break;
11707 #endif /* CK_KERBEROS */
11708 
11709       case FN_PATTERN:
11710         printf("\\fpattern(s)\n\
11711   s = string\n\
11712   Returns string: s with any variables, etc, evaluated in the normal manner.\n"
11713                );
11714         printf("\
11715   For use with INPUT, MINPUT, and REINPUT to declare that a search target is\n\
11716   a pattern rather than a literal string.\n");
11717         break;
11718 
11719       case FN_HEX2N:
11720         printf("\\fhex2n(s)\n\
11721   s = hexadecimal number\n\
11722   Returns decimal equivalent.\n");
11723         break;
11724 
11725       case FN_HEX2IP:
11726         printf("\\fhex2ip(s)\n\
11727   s = 8-digit hexadecimal number\n\
11728   Returns the equivalent decimal dotted IP address.\n");
11729         break;
11730 
11731       case FN_IP2HEX:
11732         printf("\\fip2hex(s)\n\
11733   s = decimal dotted IP address\n\
11734   Returns the equivalent 8-digit hexadecimal number.\n");
11735         break;
11736 
11737       case FN_OCT2N:
11738         printf("\\foct2n(s)\n\
11739   s = octal number\n\
11740   Returns decimal equivalent.\n");
11741         break;
11742 
11743       case FN_TOB64:
11744         printf("\\b64encode(s)\n\
11745   s = string containing no NUL bytes\n\
11746   Returns Base-64 encoding of string.\n");
11747         break;
11748 
11749       case FN_FMB64:
11750         printf("\\b64decode(s)\n\
11751   s = string in Base-64 notation\n\
11752   Returns the decoded string or an error code if s not valid.\n");
11753         break;
11754 
11755       case FN_RADIX:
11756         printf("\\fradix(s,n1,n2)\n\
11757   s = number in radix n1\n\
11758   Returns the number's representation in radix n2.\n");
11759         break;
11760 
11761       case FN_JOIN:
11762         printf("\\fjoin(&a[,s[,n1[,n2]]])\n\
11763   &a = array designator, can include range specifier.\n\
11764   s  = optional separator.\n");
11765         printf("\
11766   n1 = nonzero to put grouping around elements that contain spaces;\n\
11767        see \\fword() grouping mask for values of n.\n");
11768         printf("\
11769   n2 = 0 or omitted to put spaces between elements; nonzero to omit them.\n");
11770         printf("\
11771   Returns the (selected) elements of the array joined to together,\n\
11772   separated by the separator.\n");
11773 	printf("\n\
11774   If s is CSV (literally), that means the array is to be transformed into a\n\
11775   comma-separated list.  No other arguments are needed.  If s is TSV, then\n\
11776   a tab-separated list is created.\n");
11777         break;
11778 
11779       case FN_SUBST:
11780         printf("\\fsubstitute(s1,s2,s3)\n\
11781   s1 = Source string.\n\
11782   s2 = List of characters to be translated.\n\
11783   s3 = List of characters to translate them to.\n");
11784         printf(
11785 "  Returns: s1, with each character that is in s2 replaced by the\n\
11786   corresponding character in s3.  s2 and s3 can contain ASCII ranges,\n\
11787   like [a-z].  Any characters in s2 that don't have corresponding\n\
11788   characters in s3 (after range expansion) are removed from the result.\n\
11789   This function works only with single-byte character-sets\n");
11790         break;
11791 
11792 #ifndef NOSEXP
11793       case FN_SEXP:
11794         printf("\\fsexpression(s1)\n\
11795   s1 = S-Expression.\n");
11796         printf("  Returns: The result of evaluating s1.\n");
11797         break;
11798 
11799 #endif /* NOSEXP */
11800 
11801       case FN_CMDSTK:
11802         printf("\\fcmdstack(n1,n2)\n\
11803   n1 = Command-stack level, 0 to \\v(cmdlevel), default \\v(cmdlevel).\n\
11804   n2 = Function code, 0 or 1.\n");
11805         printf("Returns:\n");
11806         printf("  n2 = 0: name of object at stack level n1\n\
11807   n2 = 1: type of object at stack level n1:\n\
11808      0 = interactive prompt\n\
11809      1 = command file\n\
11810      2 = macro\n"
11811                );
11812           break;
11813 
11814 #ifdef CKFLOAT
11815       case FN_DIFDATE:
11816         printf("\\fdiffdates(d1,d2)\n\
11817   d1 = free-format date and/or time (default = NOW).\n\
11818   d2 = ditto.\n");
11819         printf("Returns:\n");
11820         printf("  Difference expressed as delta time:\n");
11821         printf("  Negative if d2 is later than d1, otherwise positive.\n");
11822         break;
11823 #endif /* CKFLOAT */
11824 
11825       case FN_CMPDATE:
11826         printf("\\fcmpdates(d1,d2)\n\
11827   d1 = free-format date and/or time (default = NOW).\n\
11828   d2 = ditto.\n");
11829         printf("Returns:\n");
11830         printf("  0 if d1 is equal to d2;\n\
11831   1 if d1 is later than d2;\n\
11832  -1 if d1 is earlier than d2.\n");
11833         break;
11834 
11835       case FN_TOGMT:
11836         printf("\\futcdate(d1)\n\
11837   d1 = free-format date and/or time (default = NOW).\n");
11838         printf("Returns:\n");
11839         printf("  Date-time converted to UTC (GMT) yyyymmdd hh:mm:ss.\n");
11840         break;
11841 
11842 #ifdef TCPSOCKET
11843       case FN_HSTADD:
11844         printf("\\faddr2name(s)\n\
11845   s = numeric IP address.\n");
11846         printf("Returns:\n");
11847         printf("  Corresponding IP hostname if found, otherwise null.\n");
11848         break;
11849       case FN_HSTNAM:
11850         printf("\\fname2addr(s)\n\
11851   s = IP host name.\n");
11852         printf("Returns:\n");
11853         printf("  Corresponding numeric IP address if found, else null.\n");
11854         break;
11855 #endif /* TCPSOCKET */
11856 
11857       case FN_DELSEC:
11858         printf("\\fdelta2secs(dt)\n\
11859   dt = Delta time, e.g. +3d14:27:52.\n");
11860         printf("Returns:\n");
11861         printf("  The corresponding number of seconds.\n");
11862         break;
11863 
11864       case FN_PC_DU:
11865         printf("\\fdos2unixpath(p)\n\
11866   p = string, DOS pathname.\n");
11867         printf("Returns:\n");
11868         printf("  The argument converted to a Unix pathname.\n");
11869         break;
11870 
11871       case FN_PC_UD:
11872         printf("\\funix2dospath(p)\n\
11873   p = string, Unix pathname.\n");
11874         printf("Returns:\n");
11875         printf("  The argument converted to a DOS pathname.\n");
11876         break;
11877 
11878 #ifdef FN_ERRMSG
11879       case FN_ERRMSG:
11880         printf("\\ferrstring(n)\n\
11881   n = platform-dependent numeric error code.\n");
11882         printf("Returns:\n");
11883         printf("  The corresponding error string.\n");
11884         break;
11885 #endif /* FN_ERRMSG */
11886 
11887       case FN_KWVAL:
11888         printf("\\fkeywordvalue(s1[,s2])\n\
11889   s1 = string of the form \"name=value\"\n\
11890   s2 = one more separator characters (default separator is \"=\")\n");
11891         printf("    Assigns the value, if any, to the named macro and sets\n");
11892         printf("    the \\v(lastkeywordvalue) to the macro name.\n");
11893         printf("    If no value is given, the macro is undefined.\n");
11894         printf("Returns:\n");
11895         printf(" -1 on error\n");
11896         printf("  0 if no keyword or value were found\n");
11897         printf("  1 if a keyword was found but no value\n");
11898         printf("  2 if a keyword and a value were found\n");
11899         printf("Synonym: \\kwvalue(s1[,s2])\n");
11900         break;
11901 
11902 #ifdef COMMENT
11903       case FN_SLEEP:
11904         printf("\\fsleep(n)\n\
11905   n = number of seconds\n");
11906         printf("    Pauses for the given number of seconds.\n");
11907         printf("Returns: the empty string.\n");
11908         break;
11909 
11910       case FN_MSLEEP:
11911         printf("\\fmsleep(n)\n\
11912   n = number of milliseconds\n");
11913         printf("    Pauses for the given number of milliseconds.\n");
11914         printf("Returns: the empty string.\n");
11915         break;
11916 #endif /* COMMENT */
11917 
11918 #ifdef NT
11919       case FN_SNAME:
11920         printf("\\fshortpathname(s)\n\
11921   s = file or directory name string\n");
11922         printf("    Returns the short path form of the given input.\n");
11923         break;
11924 
11925       case FN_LNAME:
11926         printf("\\flongpathname(s)\n\
11927   s = file or directory name string\n");
11928         printf("    Returns the long path form of the given input.\n");
11929         break;
11930 #else
11931       case FN_SNAME:
11932         printf("\\fshortpathname(s)\n\
11933     Synonym for \fpathname()\n");
11934         break;
11935 
11936       case FN_LNAME:
11937         printf("\\flongpathname(s)\n\
11938     Synonym for \fpathname()\n");
11939         break;
11940 #endif /* NT */
11941 
11942       case FN_EMAIL:
11943         printf("\\femailaddress(s)\n\
11944   s = From: or Sender: header from an RFC2822-format email message\n");
11945         printf("    Extracts and returns the email address.\n");
11946         break;
11947 
11948       case FN_PICTURE:
11949         printf("\\fpictureinfo(s[,&a])\n\
11950   s  = File specification of an image file in JPG or GIF format.\n\
11951   &a = Optional array name.\n\n");
11952         printf("Returns integer:\n\
11953   0 if file not found or not recognized;\n\
11954   1 if orientation is landscape;\n\
11955   2 if orientation is portrait;\n\
11956   3 if the image is square.\n");
11957 	printf("\n\
11958 If an array name is included, and if the function's return value is\n\
11959 greater than 0, element 1 of the array is filled in with the image\n\
11960 width in pixels, element 2 the image height, and element 3 is the image's\n\
11961 'date taken' (if present) in 'yyyy:mm:dd hh:mm:ss' format; for example\n\
11962 2013:05:17 21:14:12.\n");
11963 	break;
11964 
11965       case FN_PID:
11966         printf("\\fgetpidinfo(n1)\n\
11967  n1 = Numeric process ID\n");
11968         printf("Returns integer:\n\
11969  -1 on failure to get information;\n\
11970   1 if n1 is the ID of an active process;\n\
11971   0 if the process does not exist.\n");
11972         break;
11973 
11974       case FN_FUNC:
11975 	printf("\\ffunction(s1)\n\
11976  s1 = name of function.\n");
11977         printf("Returns integer:\n\
11978   1 if s1 is the name of an available built-in function;\n\
11979   0 otherwise.\n");
11980         break;
11981 
11982       case FN_RECURSE:
11983 	printf("\\frecurse(s1)\n\
11984  s1 = name of \\&x or \\&x[] type variable\n");
11985         printf("Returns the result of evaluating the variable recursively.\n");
11986         break;
11987 
11988       case FN_SQUEEZE:
11989         printf("\\fsqueeze(s)\n\
11990   s = string\n\
11991     Returns string with leading and trailing whitespace removed, Tabs\n\
11992     converted to Spaces, and multiple spaces converted to single spaces.\n");
11993         break;
11994 
11995 #ifndef NOCSETS
11996       case FN_XLATE:
11997         printf("\\fcvtcset(s,cset1,cset2)\n\
11998   s = string\n\
11999     Returns string converted from character set cset1 to cset2, where cset1\n\
12000     and cset2 are names of File Character-Sets \
12001 ('set file char ?' for a list).\n");
12002         break;
12003 #endif	/* NOCSETS */
12004 
12005       case FN_UNPCT:
12006         printf("\\fdecodehex(s1[,s2])\n\
12007   s1, s2 = strings\n\
12008     Decodes a string s1 that contains prefixed hex bytes.  s2 is the prefix;\n\
12009     the default is %%%%.  You can specify any other prefix one or two bytes\n\
12010     long.  If the prefix contains letters (such as 0x), case is ingored.\n\
12011     Returns string s1 with hex escapes replaced by the bytes they \
12012 represent.\n");
12013         break;
12014 
12015       case FN_STRINGT:
12016         printf("\\fstringtype(s)\n\
12017   s = string\n\
12018     Returns a string representing the type of its string argument s1:\n\
12019     7BIT, 8BIT, UTF8, TEXT, or BINARY.  TEXT means some kind of text\n\
12020     other than 7BIT, 8BIT, or UTF8 (this probably will never appear).\n");
12021         break;
12022 
12023       case FN_STRCMP:
12024         printf("\\fstrcmp(s1,s2[,case[,start[,length]]])\n\
12025   s1, s2 = strings\n\
12026   case, start, length = numbers or arithmetic expressions.\n\
12027     case = 0 [default] means to do a case-independent comparison;\n\
12028     nonzero case requests a case-sensitive comparison.\n\
12029     The optional start and length arguments apply to both s1 and s2\n\
12030     and allow specification of substrings if it is not desired to compare\n\
12031     the whole strings.  Results for non-ASCII strings are implentation-\n\
12032     and locale-dependent.\n\
12033   Returns a number:\n\
12034     -1: s1 is lexically less than s2;\n\
12035      0: s1 and s2 are lexically equal;\n\
12036      2: s1 is lexically greater than s2.\n");
12037         break;
12038 
12039       case FN_FILEINF:
12040         printf("\\ffileinfo(s1,&a)\n\
12041   s1 = file specification string\n\
12042   &a = array designator for results (required)\n\
12043   Returns a number:\n\
12044      0: File not found or not accessible or bad arguments;\n\
12045     >0: The number of attributes returned in the array, normally 7 or 8:\n");
12046         printf(" 1. The file's name\n\
12047  2. The full path of the directory where the file resides\n\
12048  3. The file's modification date-time yyyymmdd hh:mm:ss\n\
12049  4. Platform-specific permissions string, e.g. drwxrwxr-x or RWED,RWE,RE,E\n\
12050  5. Platform-specific permissions code, e.g. an octal number like 40775\n\
12051  6. The file's size in bytes\n\
12052  7. Type: 1=regular file; 2=executable; 3=directory; 4=link; 0=unknown.\n\
12053  8. If link, the name of the file linked to.\n");
12054         break;
12055 
12056       case FN_FILECMP:
12057         printf("\\ffilecompare(s1,s2)\n\
12058   s1 = name of first file\n\
12059   s1 = name of second file\n\
12060   Returns a number:\n\
12061      0: The two files have identical contents and lengths;\n\
12062      1: The two files have different content or lengths;\n\
12063     -1: Error opening or reading either file.\n");
12064         break;
12065 
12066       case FN_DAYNAME:
12067         printf("\\fdayname(s1,n)\n\
12068   s1 = free-format date OR day-of-week number 1-7 OR leave blank.\n\
12069   n  = function code: 0 to return full name; nonzero to return abbreviation.\n\
12070   Returns a string: the name of the weekday for the given date or weekday\n\
12071     number or, if s1 was omitted, of the current date, in the language and\n\
12072     character-set specified by the locale.  If n is nonzero, the result\n\
12073     is abbreviated in the locale-appropriate way.  If given inappropriate\n\
12074     arguments, the result is empty and an error message is printed.\n");
12075         break;
12076 
12077       case FN_MONNAME:
12078         printf("\\fmonthname(s1,n)\n\
12079   s1 = free-format date OR month-of-year number 1-12 OR leave blank.\n\
12080   n  = function code: 0 to return full name; nonzero to return abbreviation.\n\
12081   Returns a string: the name of the month for the given date or month\n\
12082     number or, if s1 was omitted, of the current date, in the language and\n\
12083     character-set specified by the locale.  If n is nonzero, the result\n\
12084     is abbreviated in the locale-appropriate way.  If given inappropriate\n\
12085     arguments, the result is empty and an error message is printed.\n");
12086         break;
12087 
12088       default:
12089         printf("Sorry, help not available for \"%s\"\n",cmdbuf);
12090     }
12091    printf("\n");
12092    return(0);
12093 }
12094 #endif /* NOSPL */
12095 
12096 #ifdef OS2
12097 #ifndef NOKVERBS
12098 
12099 /*  D O H K V E R B  --  Give help for a Kverb  */
12100 
12101 int
dohkverb(xx)12102 dohkverb(xx) int xx; {
12103     int x,i,found,button,event;
12104 
12105     if (xx == -3) {
12106         printf("\n Type SHOW KVERBS to see a list of available Kverbs.\n"
12107                );
12108         printf(
12109 " Type HELP KVERB <name> to see the current definition of a given Kverb.\n\n"
12110               );
12111         return(-9);
12112     }
12113     if (xx < 0) return(xx);
12114     if ((x = cmcfm()) < 0) return(x);
12115     switch ( xx ) {
12116         /* DEC VT keyboard key definitions */
12117 
12118     case  K_COMPOSE :                   /* Compose key */
12119         printf("\\Kcompose           Compose an accented character\n");
12120         break;
12121     case  K_C_UNI16 :                   /* UCS2 key */
12122         printf("\\Kucs2              Enter a Unicode character\n");
12123         break;
12124 
12125 /* DEC arrow keys */
12126 
12127     case  K_UPARR     :                 /* DEC Up Arrow key */
12128         printf("\\Kuparr         Transmit Terminal Up Arrow sequence\n");
12129         break;
12130     case  K_DNARR     :                 /* DEC Down Arrow key */
12131         printf("\\Kdnarr         Transmit Terminal Down Arrow sequence\n");
12132         break;
12133     case  K_RTARR     :                 /* DEC Right Arrow key */
12134         printf("\\Krtarr         Transmit Terminal Right Arrow sequence\n");
12135         break;
12136     case  K_LFARR     :                 /* DEC Left Arrow key */
12137         printf("\\Klfarr         Transmit Terminal Left Arrow sequence\n");
12138         break;
12139 
12140     case  K_PF1       :                 /* DEC PF1 key */
12141         printf("\\Kpf1,\\Kgold    Transmit DEC PF1 sequence\n");
12142         break;
12143     case  K_PF2       :                 /* DEC PF2 key */
12144         printf("\\Kpf2           Transmit DEC PF2 sequence\n");
12145         break;
12146     case  K_PF3       :                 /* DEC PF3 key */
12147         printf("\\Kpf3           Transmit DEC PF3 sequence\n");
12148         break;
12149     case  K_PF4       :                 /* DEC PF4 key */
12150         printf("\\Kpf4           Transmit DEC PF4 sequence\n");
12151         break;
12152 
12153     case  K_KP0       :                 /* DEC Keypad 0 */
12154         printf("\\Kkp0           Transmit DEC Keypad-0 sequence\n");
12155         break;
12156     case  K_KP1       :                 /* DEC Keypad 1 */
12157         printf("\\Kkp1           Transmit DEC Keypad-1 sequence\n");
12158         break;
12159     case  K_KP2       :                 /* etc ... through 9 */
12160         printf("\\Kkp2           Transmit DEC Keypad-2 sequence\n");
12161         break;
12162     case  K_KP3       :
12163         printf("\\Kkp3           Transmit DEC Keypad-3 sequence\n");
12164         break;
12165     case  K_KP4       :
12166         printf("\\Kkp4           Transmit DEC Keypad-4 sequence\n");
12167         break;
12168     case  K_KP5       :
12169         printf("\\Kkp5           Transmit DEC Keypad-5 sequence\n");
12170         break;
12171     case  K_KP6       :
12172         printf("\\Kkp6           Transmit DEC Keypad-6 sequence\n");
12173         break;
12174     case  K_KP7       :
12175         printf("\\Kkp7           Transmit DEC Keypad-7 sequence\n");
12176         break;
12177     case  K_KP8       :
12178         printf("\\Kkp8           Transmit DEC Keypad-8 sequence\n");
12179         break;
12180     case  K_KP9       :
12181         printf("\\Kkp9           Transmit DEC Keypad-9 sequence\n");
12182         break;
12183     case  K_KPCOMA    :                 /* DEC keypad comma */
12184         printf("\\Kkpcoma        Transmit DEC Keypad-Comma sequence\n");
12185         break;
12186     case  K_KPMINUS   :                 /* DEC keypad minus */
12187         printf("\\Kkpminus       Transmit DEC Keypad-Minus sequence\n");
12188         break;
12189     case  K_KPDOT     :                 /* DEC keypad period */
12190         printf("\\Kkpdot         Transmit DEC Keypad-Period sequence\n");
12191         break;
12192     case  K_KPENTER   :                 /* DEC keypad enter */
12193         printf("\\Kkpenter       Transmit DEC Keypad-Enter sequence\n");
12194         break;
12195 
12196 /* DEC Top-Rank F keys */
12197 
12198     case  K_DECF1     :                 /* DEC F1 key */
12199         printf("\\Kdecf1         Transmit DEC F1 sequence for PC keyboard\n");
12200         break;
12201     case  K_DECF2     :                 /* DEC F2 key */
12202         printf("\\Kdecf2         Transmit DEC F2 sequence for PC keyboard\n");
12203         break;
12204     case  K_DECF3     :                 /* DEC F3 key */
12205         printf("\\Kdecf3         Transmit DEC F3 sequence for PC keyboard\n");
12206         break;
12207     case  K_DECF4     :                 /* DEC F4 key */
12208         printf("\\Kdecf4         Transmit DEC F4 sequence for PC keyboard\n");
12209         break;
12210     case  K_DECF5     :                 /* DEC F5 key */
12211         printf("\\Kdecf5         Transmit DEC F5 sequence for PC keyboard\n");
12212         break;
12213     case  K_DECHOME:                    /* DEC HOME key */
12214        printf("\\Kdechome       Transmit DEC HOME sequence for PC keyboard\n");
12215        break;
12216 
12217     case  K_DECF6     :                 /* DEC F6 key */
12218         printf("\\Kdecf6         Transmit DEC F6 sequence\n");
12219         break;
12220     case  K_DECF7     :                 /* etc, through F20 */
12221         printf("\\Kdecf7         Transmit DEC F7 sequence\n");
12222         break;
12223     case  K_DECF8     :
12224         printf("\\Kdecf8         Transmit DEC F8 sequence\n");
12225         break;
12226     case  K_DECF9     :
12227         printf("\\Kdecf9         Transmit DEC F9 sequence\n");
12228         break;
12229     case  K_DECF10    :
12230         printf("\\Kdecf10        Transmit DEC F10 sequence\n");
12231         break;
12232     case  K_DECF11    :
12233         printf("\\Kdecf11        Transmit DEC F11 sequence\n");
12234         break;
12235     case  K_DECF12    :
12236         printf("\\Kdecf12        Transmit DEC F12 sequence\n");
12237         break;
12238     case  K_DECF13    :
12239         printf("\\Kdecf13        Transmit DEC F13 sequence\n");
12240         break;
12241     case  K_DECF14    :
12242         printf("\\Kdecf14        Transmit DEC F14 sequence\n");
12243         break;
12244     case  K_DECHELP   :                 /* DEC Help key */
12245         printf("\\Kdecf15,\\Kdechelp  Transmit DEC HELP sequence\n");
12246         break;
12247     case  K_DECDO     :                 /* DEC Do key */
12248         printf("\\Kdecf16,\\Kdecdo    Transmit DEC DO sequence\n");
12249         break;
12250     case  K_DECF17    :
12251         printf("\\Kdecf17        Transmit DEC F17 sequence\n");
12252         break;
12253     case  K_DECF18    :
12254         printf("\\Kdecf18        Transmit DEC F18 sequence\n");
12255         break;
12256     case  K_DECF19    :
12257         printf("\\Kdecf19        Transmit DEC F19 sequence\n");
12258         break;
12259     case  K_DECF20    :
12260         printf("\\Kdecf20        Transmit DEC F20 sequence\n");
12261         break;
12262 
12263 /* DEC editing keys */
12264 
12265     case  K_DECFIND   :                 /* DEC Find key */
12266         printf("\\Kdecfind       Transmit DEC FIND sequence\n");
12267         break;
12268     case  K_DECINSERT :                 /* DEC Insert key */
12269         printf("\\Kdecinsert     Transmit DEC INSERT HERE sequence\n");
12270         break;
12271     case  K_DECREMOVE :                 /* DEC Remove key */
12272         printf("\\Kdecremove     Transmit DEC REMOVE sequence\n");
12273         break;
12274     case  K_DECSELECT :                 /* DEC Select key */
12275         printf("\\Kdecfselect    Transmit DEC SELECT sequence\n");
12276         break;
12277     case  K_DECPREV   :                 /* DEC Previous Screen key */
12278         printf("\\Kdecprev       Transmit DEC PREV SCREEN sequence\n");
12279         break;
12280     case  K_DECNEXT   :                 /* DEC Next Screen key */
12281         printf("\\Kdecnext       Transmit DEC NEXT SCREEN sequence\n");
12282         break;
12283 
12284 /* DEC User-Defined Keys */
12285 
12286     case  K_UDKF1     :                 /* F1 - F5 are XTERM extensions */
12287       printf("\\Kudkf1         Transmit XTERM F1 User Defined Key sequence\n");
12288       break;
12289     case  K_UDKF2     :
12290       printf("\\Kudkf2         Transmit XTERM F2 User Defined Key sequence\n");
12291       break;
12292     case  K_UDKF3     :
12293       printf("\\Kudkf3         Transmit XTERM F3 User Defined Key sequence\n");
12294       break;
12295     case  K_UDKF4     :
12296       printf("\\Kudkf4         Transmit XTERM F4 User Defined Key sequence\n");
12297       break;
12298     case  K_UDKF5     :
12299       printf("\\Kudkf5         Transmit XTERM F5 User Defined Key sequence\n");
12300       break;
12301     case  K_UDKF6     :                 /* DEC User Defined Key F6 */
12302       printf("\\Kudkf6         Transmit DEC F6 User Defined Key sequence\n");
12303       break;
12304     case  K_UDKF7     :                 /* DEC User Defined Key F7 */
12305       printf("\\Kudkf7         Transmit DEC F7 User Defined Key sequence\n");
12306       break;
12307     case  K_UDKF8     :                 /* etc ... through F20 */
12308       printf("\\Kudkf8         Transmit DEC F8 User Defined Key sequence\n");
12309       break;
12310     case  K_UDKF9     :
12311       printf("\\Kudkf9         Transmit DEC F9 User Defined Key sequence\n");
12312       break;
12313     case  K_UDKF10    :
12314       printf("\\Kudkf10        Transmit DEC F10 User Defined Key sequence\n");
12315       break;
12316     case  K_UDKF11    :
12317       printf("\\Kudkf11        Transmit DEC F11 User Defined Key sequence\n");
12318       break;
12319     case  K_UDKF12    :
12320       printf("\\Kudkf12        Transmit DEC F12 User Defined Key sequence\n");
12321       break;
12322     case  K_UDKF13    :
12323       printf("\\Kudkf13        Transmit DEC F13 User Defined Key sequence\n");
12324       break;
12325     case  K_UDKF14    :
12326       printf("\\Kudkf14        Transmit DEC F14 User Defined Key sequence\n");
12327       break;
12328     case  K_UDKHELP   :
12329       printf(
12330       "\\Kudkhelp,\\Kudkf15  Transmit DEC HELP User Defined Key sequence\n");
12331       break;
12332     case  K_UDKDO     :
12333       printf(
12334       "\\Kudkdo,\\Kudkf16    Transmit DEC DO User Defined Key sequence\n");
12335       break;
12336     case  K_UDKF17    :
12337       printf("\\Kudkf17        Transmit DEC F17 User Defined Key sequence\n");
12338       break;
12339     case  K_UDKF18    :
12340       printf("\\Kudkf18        Transmit DEC F18 User Defined Key sequence\n");
12341       break;
12342     case  K_UDKF19    :
12343       printf("\\Kudkf19        Transmit DEC F19 User Defined Key sequence\n");
12344       break;
12345     case  K_UDKF20    :
12346       printf("\\Kudkf20        Transmit DEC F20 User Defined Key sequence\n");
12347       break;
12348 
12349 /* Emacs Keys */
12350     case  K_EMACS_OVER:
12351       printf(
12352      "\\Kemacs_overwrite  Transmit EMACS Overwrite toggle command sequence\n");
12353       break;
12354 
12355 /* Kermit screen-scrolling keys */
12356 
12357     case  K_DNONE     :                 /* Screen rollback: down one line */
12358       printf("\\Kdnone         Screen rollback: down one line\n");
12359       break;
12360     case  K_DNSCN     :                 /* Screen rollback: down one screen */
12361       printf("\\Kdnscn         Screen rollback: down one screen\n");
12362       break;
12363     case  K_UPONE     :                 /* Screen rollback: Up one line */
12364       printf("\\Kupone         Screen rollback: up one line\n");
12365       break;
12366     case  K_UPSCN     :                 /* Screen rollback: Up one screen */
12367       printf("\\Kupscn         Screen rollback: up one screen\n");
12368       break;
12369     case  K_ENDSCN    :                 /* Screen rollback: latest screen */
12370       printf("\\Kendscn        Screen rollback: latest screen\n");
12371       break;
12372     case  K_HOMSCN    :                 /* Screen rollback: oldest screen */
12373       printf("\\Khomscn        Screen rollback: oldest screen\n");
12374       break;
12375     case  K_GO_BOOK   :         /* Scroll to bookmark */
12376       printf("\\Kgobook        Screen rollback: go to bookmark\n");
12377       break;
12378     case  K_GOTO      :         /* Scroll to line number */
12379       printf("\\Kgoto          Screen rollback: go to line number\n");
12380       break;
12381 
12382     case  K_LFONE     :                 /* Horizontal Scroll: Left one cell */
12383       printf("\\Klfone         Horizontal Scroll: Left one column\n");
12384       break;
12385     case  K_LFPAGE    :                 /* Horizontal Scroll: Left one page */
12386       printf("\\Klfpage        Horizontal Scroll: Left eight columns\n");
12387       break;
12388     case  K_LFALL     :
12389       printf("\\Klfall         Horizontal Scroll: Left to margin\n");
12390       break;
12391     case  K_RTONE     :                 /* Horizontal Scroll: Right one cell */
12392       printf("\\Krtone         Horizontal Scroll: Right one column\n");
12393       break;
12394     case  K_RTPAGE    :                 /* Horizontal Scroll: Right one page */
12395       printf("\\Krtpage        Horizontal Scroll: Right eight columns\n");
12396       break;
12397     case  K_RTALL     :
12398       printf("\\Krtall         Horizontal Scroll: Right to margin\n");
12399       break;
12400 
12401 /* Keyboard language switching verbs */
12402 
12403     case  K_KB_ENG    :                 /* English keyboard mode */
12404       printf("\\Kkbenglish     Switch to Normal (English) keyboard mode\n");
12405       break;
12406     case  K_KB_HEB    :                 /* Hebrew keyboard mode */
12407       printf("\\Kkbhebrew      Switch to Hebrew keyboard mode\n");
12408       break;
12409     case  K_KB_RUS    :                 /* Russian keyboard mode */
12410       printf("\\Kkbrussian     Switch to Russian keyboard mode\n");
12411       break;
12412     case  K_KB_EMA    :                 /* Emacs keyboard mode */
12413       printf("\\Kkbemacs       Switch to EMACS keyboard mode\n");
12414       break;
12415     case  K_KB_WP     :                 /* Word Perfect 5.1 mode */
12416       printf("\\Kkbwp          Switch to Word Perfect 5.1 keyboard mode\n");
12417       break;
12418 
12419 /* Mark Mode actions */
12420 
12421     case  K_MARK_START  :       /* Enter Mark Mode/Start marking */
12422       printf("\\Kmarkstart     Mark Mode: Enter mode or Start marking\n");
12423       break;
12424     case  K_MARK_CANCEL :       /* Exit Mark Mode - Do Nothing */
12425       printf("\\Kmarkcancel    Mark Mode: Cancel mode\n");
12426       break;
12427     case  K_MARK_COPYCLIP:      /* Exit Mark Mode - Copy data to clipboard */
12428       printf("\\Kmarkcopyclip  Mark Mode: Copy marked text to clipboard\n");
12429       break;
12430     case  K_MARK_COPYHOST:      /* Exit Mark Mode - Copy data to host   */
12431       printf("\\Kmarkcopyhost  Mark Mode: Copy marked text to host\n");
12432       break;
12433     case  K_MARK_SELECT :       /* Exit Mark Mode - Select */
12434       printf(
12435       "\\Kmarkselect    Mark Mode: Place marked text into \\v(select)\n");
12436       break;
12437     case  K_BACKSRCH    :            /* Search Backwards for text */
12438       printf("\\Kbacksearch    Search: Begin backward search for text\n");
12439       break;
12440     case  K_FWDSRCH     :            /* Search Forwards for text */
12441       printf("\\Kfwdsearch     Search: Begin forward search for text\n");
12442       break;
12443     case  K_BACKNEXT    :     /* Search Backwards for next instance of text */
12444       printf(
12445       "\\Kbacknext      Search: Find next instance of text backwards\n");
12446       break;
12447     case  K_FWDNEXT     :      /* Search Forwards for next instance of text */
12448       printf("\\Kfwdnext       Search: Find next instance of text forwards\n");
12449       break;
12450 
12451 /* Miscellaneous Kermit actions */
12452 
12453     case  K_EXIT        :               /* Return to command parser */
12454       printf("\\Kexit          Toggle between COMMAND and CONNECT modes\n");
12455       break;
12456     case  K_BREAK       :               /* Send a BREAK */
12457       printf("\\Kbreak         Transmit BREAK signal to host\n");
12458       break;
12459     case  K_RESET       :               /* Reset emulator */
12460       printf("\\Kreset         Reset Terminal Emulator to user defaults\n");
12461       break;
12462     case  K_DOS         :               /* Push to DOS (i.e. OS/2) */
12463       printf("\\Kdos,\\Kos2     Push to Command Shell\n");
12464       break;
12465     case  K_HANGUP      :               /* Hang up the connection */
12466       printf("\\Khangup        Hangup the active connection\n");
12467       break;
12468     case  K_DUMP        :               /* Dump/Print current screen */
12469       printf(
12470      "\\Kdump          Dump/copy current screen to SET PRINTER device/file\n");
12471       break;
12472     case  K_LBREAK      :               /* Send a Long BREAK */
12473       printf("\\Klbreak        Transmit LONG BREAK signal to host\n");
12474       break;
12475     case  K_NULL        :               /* Send a NUL */
12476       printf("\\Knull          Transmit NULL ('\0') character to host\n");
12477       break;
12478     case  K_HELP        :               /* Pop-up help */
12479       printf("\\Khelp          Raise Pop-Up help display\n");
12480       break;
12481     case  K_HOLDSCRN    :               /* Hold screen */
12482       printf("\\Kholdscrn      Pause data input during CONNECT mode\n");
12483       break;
12484     case  K_IGNORE      :               /* Ignore this key, don't even beep */
12485       printf("\\Kignore        Ignore key\n");
12486       break;
12487 
12488     case  K_LOGOFF      :               /* Turn off session logging */
12489       printf("\\Klogoff        Turn off session logging (see \\Ksession)\n");
12490       break;
12491     case  K_LOGON       :               /* Turn on session logging */
12492       printf("\\Klogon         Turn on session logging (see \\Ksession)\n");
12493       break;
12494     case K_SESSION:
12495       printf(
12496          "\\Ksession       Toggle on/off session logging to 'session.log'\n");
12497       break;
12498     case K_AUTODOWN:
12499       printf("\\Kautodown      Toggle on/off terminal autodownload.\n");
12500       break;
12501     case K_BYTESIZE:
12502       printf(
12503         "\\Kbytesize      Toggle terminal bytesize between 7 and 8 bits.\n");
12504       break;
12505 
12506 #ifdef COMMENT
12507     case MODELINE:
12508     case  K_NETHOLD     :               /* Put network connection on hold */
12509     case  K_NEXTSESS    :               /* Toggle to next network session */
12510 #endif /* COMMENT */
12511 
12512     case K_CURSOR_URL:
12513         printf(
12514      "\\Kurl           Treat text under cursor position as a URL\n");
12515         break;
12516     case  K_STATUS      :               /* Show status */
12517       printf(
12518      "\\Kstatus        Toggle statusline (None, Indicator, Host Writeable)\n");
12519       break;
12520     case  K_TERMTYPE    :               /* Toggle term type: text/graphics */
12521       printf("\\Ktermtype      Toggle Terminal Type\n");
12522       break;
12523     case  K_PRTCTRL     :               /* Print Controller mode */
12524       printf("\\Kprtctrl       Toggle Ctrl-Print (transparent) mode\n");
12525       break;
12526     case  K_PRINTFF     :               /* Print formfeed */
12527       printf("\\Kprintff       Output Form Feed to SET PRINTER device\n");
12528       break;
12529     case  K_FLIPSCN     :               /* Flip screen */
12530       printf("\\Kflipscn       Reverse foreground and background colors\n");
12531       break;
12532     case  K_DEBUG       :               /* Toggle debugging */
12533       printf("\\Kdebug         Toggle Terminal Debug mode\n");
12534       break;
12535     case  K_TN_SAK      :               /* TELNET Secure Access Key */
12536       printf("\\Ktn_sak        TELNET: IBM Secure Access Key\n");
12537       printf("                Used to request a Trusted Shell with AIX\n");
12538       break;
12539     case  K_TN_AO       :               /* TELNET Cancel Output */
12540       printf("\\Ktn_ao         TELNET: Transmit Cancel-Output request\n");
12541       break;
12542     case  K_TN_AYT      :               /* TELNET Are You There */
12543       printf("\\Ktnayt         TELNET: Transmit Are You There? request\n");
12544       break;
12545     case  K_TN_EC       :               /* TELNET Erase Character */
12546       printf("\\Ktn_ec         TELNET: Transmit Erase Character request\n");
12547       break;
12548     case  K_TN_EL       :               /* TELNET Erase Line */
12549       printf("\\Ktn_el         TELNET: Transmit Erase Line request\n");
12550       break;
12551     case  K_TN_GA       :               /* TELNET Go Ahead */
12552       printf("\\Ktn_ga         TELNET: Transmit Go Ahead request\n");
12553       break;
12554     case  K_TN_IP       :               /* TELNET Interrupt Process */
12555       printf("\\Ktn_ip         TELNET: Transmit Interrupt Process request\n");
12556       break;
12557     case  K_TN_LOGOUT   :               /* TELNET Logout */
12558       printf("\\Ktn_logout     TELNET: Transmit Do Logout Option\n");
12559       break;
12560     case  K_TN_NAWS   :                 /* TELNET NAWS */
12561       printf(
12562         "\\Ktn_naws       TELNET: Transmit Window Size if NAWS is active\n");
12563       break;
12564     case  K_PASTE       :               /* Paste data from clipboard */
12565       printf("\\Kpaste         Paste data from clipboard to host\n");
12566       break;
12567     case  K_CLRSCRN     :               /* Clear Terminal Screen */
12568       printf("\\Kclearscreen   Clear the Terminal screen\n");
12569       break;
12570     case  K_PRTAUTO     :               /* Print Auto mode */
12571       printf("\\Kprtauto       Toggle Auto-Print mode\n");
12572       break;
12573     case  K_PRTCOPY     :               /* Print Copy mode */
12574       printf("\\Kprtcopy       Toggle Copy-Print mode\n");
12575       break;
12576     case  K_ANSWERBACK  :               /* Transmit Answerback String */
12577       printf("\\Kanswerback    Transmit answerback string to host\n");
12578       break;
12579     case  K_SET_BOOK    :               /* Set Bookmark */
12580       printf("\\Ksetbook       Set bookmark\n");
12581       break;
12582     case  K_QUIT        :               /* Quit Kermit */
12583       printf("\\Kquit          Hangup connection and quit kermit\n");
12584       break;
12585     case  K_KEYCLICK    :               /* Toggle Keyclick */
12586       printf("\\Kkeyclick      Toggle Keyclick mode\n");
12587       break;
12588     case  K_LOGDEBUG    :               /* Toggle Debug Log File */
12589       printf("\\Klogdebug      Toggle Debug Logging to File\n");
12590       break;
12591     case  K_FNKEYS      :               /* Show Function Key Labels */
12592       printf("\\Kfnkeys        Display Function Key Labels\n");
12593       break;
12594 
12595 #ifdef OS2MOUSE
12596 /* Mouse only Kverbs */
12597 
12598     case  K_MOUSE_CURPOS :
12599       printf("\\Kmousecurpos   Mouse: Move host cursor to position\n");
12600       break;
12601     case  K_MOUSE_MARK   :
12602       printf(
12603      "\\Kmousemark     Mouse: Mark text for selection (drag event only)\n");
12604       break;
12605     case  K_MOUSE_URL    :
12606       printf("\\Kmouseurl      Mouse: Start browser with selected URL\n");
12607       break;
12608 #endif /* OS2MOUSE */
12609 
12610 /* ANSI Function Key definitions */
12611     case  K_ANSIF01          :
12612       printf("\\Kansif01       Transmit SCOANSI/AT386: F1 \n");
12613       break;
12614     case  K_ANSIF02          :
12615       printf("\\Kansif02       Transmit SCOANSI/AT386: F2 \n");
12616       break;
12617     case  K_ANSIF03          :
12618       printf("\\Kansif03       Transmit SCOANSI/AT386: F3 \n");
12619       break;
12620     case  K_ANSIF04          :
12621       printf("\\Kansif04       Transmit SCOANSI/AT386: F4 \n");
12622       break;
12623     case  K_ANSIF05          :
12624       printf("\\Kansif05       Transmit SCOANSI/AT386: F5 \n");
12625       break;
12626     case  K_ANSIF06          :
12627       printf("\\Kansif06       Transmit SCOANSI/AT386: F6 \n");
12628       break;
12629     case  K_ANSIF07          :
12630       printf("\\Kansif07       Transmit SCOANSI/AT386: F7 \n");
12631       break;
12632     case  K_ANSIF08          :
12633       printf("\\Kansif08       Transmit SCOANSI/AT386: F8 \n");
12634       break;
12635     case  K_ANSIF09          :
12636       printf("\\Kansif09       Transmit SCOANSI/AT386: F9 \n");
12637       break;
12638     case  K_ANSIF10          :
12639       printf("\\Kansif10       Transmit SCOANSI/AT386: F10\n");
12640       break;
12641     case  K_ANSIF11          :
12642       printf("\\Kansif11       Transmit SCOANSI/AT386: F11\n");
12643       break;
12644     case  K_ANSIF12          :
12645       printf("\\Kansif12       Transmit SCOANSI/AT386: F12\n");
12646       break;
12647     case  K_ANSIF13          :
12648       printf("\\Kansif13       Transmit SCOANSI/AT386: Shift-F1 \n");
12649       break;
12650     case  K_ANSIF14          :
12651       printf("\\Kansif14       Transmit SCOANSI/AT386: Shift-F2 \n");
12652       break;
12653     case  K_ANSIF15          :
12654       printf("\\Kansif15       Transmit SCOANSI/AT386: Shift-F3 \n");
12655       break;
12656     case  K_ANSIF16          :
12657       printf("\\Kansif16       Transmit SCOANSI/AT386: Shift-F4 \n");
12658       break;
12659     case  K_ANSIF17          :
12660       printf("\\Kansif17       Transmit SCOANSI/AT386: Shift-F5 \n");
12661       break;
12662     case  K_ANSIF18          :
12663       printf("\\Kansif18       Transmit SCOANSI/AT386: Shift-F6 \n");
12664       break;
12665     case  K_ANSIF19          :
12666       printf("\\Kansif19       Transmit SCOANSI/AT386: Shift-F7 \n");
12667       break;
12668     case  K_ANSIF20          :
12669       printf("\\Kansif20       Transmit SCOANSI/AT386: Shift-F8 \n");
12670       break;
12671     case  K_ANSIF21          :
12672       printf("\\Kansif21       Transmit SCOANSI/AT386: Shift-F9 \n");
12673       break;
12674     case  K_ANSIF22          :
12675       printf("\\Kansif22       Transmit SCOANSI/AT386: Shift-F10\n");
12676       break;
12677     case  K_ANSIF23          :
12678       printf("\\Kansif23       Transmit SCOANSI/AT386: Shift-F11\n");
12679       break;
12680     case  K_ANSIF24          :
12681       printf("\\Kansif24       Transmit SCOANSI/AT386: Shift-F12\n");
12682       break;
12683     case  K_ANSIF25          :
12684       printf("\\Kansif25       Transmit SCOANSI/AT386: Ctrl-F1 \n");
12685       break;
12686     case  K_ANSIF26          :
12687       printf("\\Kansif26       Transmit SCOANSI/AT386: Ctrl-F2 \n");
12688       break;
12689     case  K_ANSIF27          :
12690       printf("\\Kansif27       Transmit SCOANSI/AT386: Ctrl-F3 \n");
12691       break;
12692     case  K_ANSIF28          :
12693       printf("\\Kansif28       Transmit SCOANSI/AT386: Ctrl-F4 \n");
12694       break;
12695     case  K_ANSIF29          :
12696       printf("\\Kansif29       Transmit SCOANSI/AT386: Ctrl-F5 \n");
12697       break;
12698     case  K_ANSIF30          :
12699       printf("\\Kansif30       Transmit SCOANSI/AT386: Ctrl-F6 \n");
12700       break;
12701     case  K_ANSIF31          :
12702       printf("\\Kansif31       Transmit SCOANSI/AT386: Ctrl-F7 \n");
12703       break;
12704     case  K_ANSIF32          :
12705       printf("\\Kansif32       Transmit SCOANSI/AT386: Ctrl-F8 \n");
12706       break;
12707     case  K_ANSIF33          :
12708       printf("\\Kansif33       Transmit SCOANSI/AT386: Ctrl-F9 \n");
12709       break;
12710     case  K_ANSIF34          :
12711       printf("\\Kansif34       Transmit SCOANSI/AT386: Ctrl-F10\n");
12712       break;
12713     case  K_ANSIF35          :
12714       printf("\\Kansif35       Transmit SCOANSI/AT386: Ctrl-F11\n");
12715       break;
12716     case  K_ANSIF36          :
12717       printf("\\Kansif36       Transmit SCOANSI/AT386: Ctrl-F12\n");
12718       break;
12719     case  K_ANSIF37          :
12720       printf("\\Kansif37       Transmit SCOANSI/AT386: Ctrl-Shift-F1 \n");
12721       break;
12722     case  K_ANSIF38          :
12723       printf("\\Kansif38       Transmit SCOANSI/AT386: Ctrl-Shift-F2 \n");
12724       break;
12725     case  K_ANSIF39          :
12726       printf("\\Kansif39       Transmit SCOANSI/AT386: Ctrl-Shift-F3 \n");
12727       break;
12728     case  K_ANSIF40          :
12729       printf("\\Kansif40       Transmit SCOANSI/AT386: Ctrl-Shift-F4 \n");
12730       break;
12731     case  K_ANSIF41          :
12732       printf("\\Kansif41       Transmit SCOANSI/AT386: Ctrl-Shift-F5 \n");
12733       break;
12734     case  K_ANSIF42          :
12735       printf("\\Kansif42       Transmit SCOANSI/AT386: Ctrl-Shift-F6 \n");
12736       break;
12737     case  K_ANSIF43          :
12738       printf("\\Kansif43       Transmit SCOANSI/AT386: Ctrl-Shift-F7 \n");
12739       break;
12740     case  K_ANSIF44          :
12741       printf("\\Kansif44       Transmit SCOANSI/AT386: Ctrl-Shift-F8 \n");
12742       break;
12743     case  K_ANSIF45          :
12744       printf("\\Kansif45       Transmit SCOANSI/AT386: Ctrl-Shift-F9 \n");
12745       break;
12746     case  K_ANSIF46          :
12747       printf("\\Kansif46       Transmit SCOANSI/AT386: Ctrl-Shift-F10\n");
12748       break;
12749     case  K_ANSIF47          :
12750       printf("\\Kansif47       Transmit SCOANSI/AT386: Ctrl-Shift-F11\n");
12751       break;
12752     case  K_ANSIF48          :
12753       printf("\\Kansif48       Transmit SCOANSI/AT386: Ctrl-Shift-F12\n");
12754       break;
12755     case  K_ANSIF49          :
12756       printf("\\Kansif49       Transmit SCOANSI/AT386: Home\n");
12757       break;
12758     case  K_ANSIF50          :
12759       printf("\\Kansif50       Transmit SCOANSI/AT386: Up Arrow\n");
12760       break;
12761     case  K_ANSIF51          :
12762       printf("\\Kansif51       Transmit SCOANSI/AT386: PgUp\n");
12763       break;
12764     case  K_ANSIF52          :
12765       printf("\\Kansif52       Transmit SCOANSI/AT386: Ctrl-Shift-Subtract\n");
12766       break;
12767     case  K_ANSIF53          :
12768       printf("\\Kansif53       Transmit SCOANSI/AT386: Left Arrow\n");
12769       break;
12770     case  K_ANSIF54          :
12771       printf("\\Kansif54       Transmit SCOANSI/AT386: Clear\n");
12772       break;
12773     case  K_ANSIF55          :
12774       printf("\\Kansif55       Transmit SCOANSI/AT386: Right Arrow\n");
12775       break;
12776     case  K_ANSIF56          :
12777       printf("\\Kansif56       Transmit SCOANSI/AT386: Shift-Add\n");
12778       break;
12779     case  K_ANSIF57          :
12780       printf("\\Kansif57       Transmit SCOANSI/AT386: End\n");
12781       break;
12782     case  K_ANSIF58          :
12783       printf("\\Kansif58       Transmit SCOANSI/AT386: Down Arrow\n");
12784       break;
12785     case  K_ANSIF59          :
12786       printf("\\Kansif59       Transmit SCOANSI/AT386: PgDn\n");
12787       break;
12788     case  K_ANSIF60          :
12789       printf("\\Kansif60       Transmit SCOANSI/AT386: Insert\n");
12790       break;
12791     case  K_ANSIF61          :
12792       printf("\\Kansif61       Transmit SCOANSI/AT386: (not named)\n");
12793       break;
12794 
12795 /* WYSE Function Keys (unshifted) */
12796     case  K_WYF01            :
12797       printf("\\Kwyf01         Transmit WYSE 30/50/60/160: F1\n");
12798       break;
12799     case  K_WYF02            :
12800       printf("\\Kwyf02         Transmit WYSE 30/50/60/160: F2\n");
12801       break;
12802     case  K_WYF03            :
12803       printf("\\Kwyf03         Transmit WYSE 30/50/60/160: F3\n");
12804       break;
12805     case  K_WYF04            :
12806       printf("\\Kwyf04         Transmit WYSE 30/50/60/160: F4\n");
12807       break;
12808     case  K_WYF05            :
12809       printf("\\Kwyf05         Transmit WYSE 30/50/60/160: F5\n");
12810       break;
12811     case  K_WYF06            :
12812       printf("\\Kwyf06         Transmit WYSE 30/50/60/160: F6\n");
12813       break;
12814     case  K_WYF07            :
12815       printf("\\Kwyf07         Transmit WYSE 30/50/60/160: F7\n");
12816       break;
12817     case  K_WYF08            :
12818       printf("\\Kwyf08         Transmit WYSE 30/50/60/160: F8\n");
12819       break;
12820     case  K_WYF09            :
12821       printf("\\Kwyf09         Transmit WYSE 30/50/60/160: F9\n");
12822       break;
12823     case  K_WYF10            :
12824       printf("\\Kwyf10         Transmit WYSE 30/50/60/160: F10\n");
12825       break;
12826     case  K_WYF11            :
12827       printf("\\Kwyf11         Transmit WYSE 30/50/60/160: F11\n");
12828       break;
12829     case  K_WYF12            :
12830       printf("\\Kwyf12         Transmit WYSE 30/50/60/160: F12\n");
12831       break;
12832     case  K_WYF13            :
12833       printf("\\Kwyf13         Transmit WYSE 30/50/60/160: F13\n");
12834       break;
12835     case  K_WYF14            :
12836       printf("\\Kwyf14         Transmit WYSE 30/50/60/160: F14\n");
12837       break;
12838     case  K_WYF15            :
12839       printf("\\Kwyf15         Transmit WYSE 30/50/60/160: F15\n");
12840       break;
12841     case  K_WYF16            :
12842       printf("\\Kwyf16         Transmit WYSE 30/50/60/160: F16\n");
12843       break;
12844     case  K_WYF17            :
12845       printf("\\Kwyf17         Transmit WYSE 30/50/60/160: F17\n");
12846       break;
12847     case  K_WYF18            :
12848       printf("\\Kwyf18         Transmit WYSE 30/50/60/160: F18\n");
12849       break;
12850     case  K_WYF19            :
12851       printf("\\Kwyf19         Transmit WYSE 30/50/60/160: F19\n");
12852       break;
12853     case  K_WYF20            :
12854       printf("\\Kwyf20         Transmit WYSE 30/50/60/160: F20\n");
12855       break;
12856 
12857 /* WYSE Function Keys (shifted) */
12858     case  K_WYSF01           :
12859       printf("\\Kwysf01        Transmit WYSE 30/50/60/160: Shift-F1\n");
12860       break;
12861     case  K_WYSF02           :
12862       printf("\\Kwysf02        Transmit WYSE 30/50/60/160: Shift-F2\n");
12863       break;
12864     case  K_WYSF03            :
12865       printf("\\Kwysf03        Transmit WYSE 30/50/60/160: Shift-F3\n");
12866       break;
12867     case  K_WYSF04            :
12868       printf("\\Kwysf04        Transmit WYSE 30/50/60/160: Shift-F4\n");
12869       break;
12870     case  K_WYSF05            :
12871       printf("\\Kwysf05        Transmit WYSE 30/50/60/160: Shift-F5\n");
12872       break;
12873     case  K_WYSF06            :
12874       printf("\\Kwysf06        Transmit WYSE 30/50/60/160: Shift-F6\n");
12875       break;
12876     case  K_WYSF07            :
12877       printf("\\Kwysf07        Transmit WYSE 30/50/60/160: Shift-F7\n");
12878       break;
12879     case  K_WYSF08            :
12880       printf("\\Kwysf08        Transmit WYSE 30/50/60/160: Shift-F8\n");
12881       break;
12882     case  K_WYSF09            :
12883       printf("\\Kwysf09        Transmit WYSE 30/50/60/160: Shift-F9\n");
12884       break;
12885     case  K_WYSF10            :
12886       printf("\\Kwysf10        Transmit WYSE 30/50/60/160: Shift-F10\n");
12887       break;
12888     case  K_WYSF11            :
12889       printf("\\Kwysf11        Transmit WYSE 30/50/60/160: Shift-F11\n");
12890       break;
12891     case  K_WYSF12            :
12892       printf("\\Kwysf12        Transmit WYSE 30/50/60/160: Shift-F12\n");
12893       break;
12894     case  K_WYSF13            :
12895       printf("\\Kwysf13        Transmit WYSE 30/50/60/160: Shift-F13\n");
12896       break;
12897     case  K_WYSF14            :
12898       printf("\\Kwysf14        Transmit WYSE 30/50/60/160: Shift-F14\n");
12899       break;
12900     case  K_WYSF15            :
12901       printf("\\Kwysf15        Transmit WYSE 30/50/60/160: Shift-F15\n");
12902       break;
12903     case  K_WYSF16            :
12904       printf("\\Kwysf16        Transmit WYSE 30/50/60/160: Shift-F16\n");
12905       break;
12906     case  K_WYSF17           :
12907       printf("\\Kwysf17        Transmit WYSE 30/50/60/160: Shift-F17\n");
12908       break;
12909     case  K_WYSF18           :
12910       printf("\\Kwysf18        Transmit WYSE 30/50/60/160: Shift-F18\n");
12911       break;
12912     case  K_WYSF19           :
12913       printf("\\Kwysf19        Transmit WYSE 30/50/60/160: Shift-F19\n");
12914       break;
12915     case  K_WYSF20           :
12916       printf("\\Kwysf20        Transmit WYSE 30/50/60/160: Shift-F20\n");
12917       break;
12918 
12919 /* WYSE Edit and Special Keys */
12920     case  K_WYBS         :
12921       printf("\\Kwybs          Transmit WYSE 30/50/60/160: Backspace\n");
12922       break;
12923     case  K_WYCLRLN          :
12924       printf("\\Kwyclrln       Transmit WYSE 30/50/60/160: Clear Line\n");
12925       break;
12926     case  K_WYSCLRLN     :
12927      printf("\\Kwysclrln      Transmit WYSE 30/50/60/160: Shift-Clear Line\n");
12928       break;
12929     case  K_WYCLRPG      :
12930       printf("\\Kwyclrpg       Transmit WYSE 30/50/60/160: Clear Page\n");
12931       break;
12932     case  K_WYSCLRPG     :
12933     printf("\\Kwysclrpg      Transmit WYSE 30/50/60/160: Shift-Clear Page\n");
12934       break;
12935     case  K_WYDELCHAR    :
12936       printf("\\Kwydelchar     Transmit WYSE 30/50/60/160: Delete Char\n");
12937       break;
12938     case  K_WYDELLN      :
12939       printf("\\Kwydelln       Transmit WYSE 30/50/60/160: Delete Line\n");
12940       break;
12941     case  K_WYENTER          :
12942       printf("\\Kwyenter       Transmit WYSE 30/50/60/160: Enter\n");
12943       break;
12944     case  K_WYESC            :
12945       printf("\\Kwyesc         Transmit WYSE 30/50/60/160: Esc\n");
12946       break;
12947     case  K_WYHOME           :
12948       printf("\\Kwyhome        Transmit WYSE 30/50/60/160: Home\n");
12949       break;
12950     case  K_WYSHOME          :
12951       printf("\\Kwyshome       Transmit WYSE 30/50/60/160: Shift-Home\n");
12952       break;
12953     case  K_WYINSERT     :
12954       printf("\\Kwyinsert      Transmit WYSE 30/50/60/160: Insert\n");
12955       break;
12956     case  K_WYINSCHAR    :
12957       printf("\\Kwyinschar     Transmit WYSE 30/50/60/160: Insert Char\n");
12958       break;
12959     case  K_WYINSLN          :
12960       printf("\\Kwyinsln       Transmit WYSE 30/50/60/160: Insert Line\n");
12961       break;
12962     case  K_WYPGNEXT     :
12963       printf("\\Kwypgnext      Transmit WYSE 30/50/60/160: Page Next\n");
12964       break;
12965     case  K_WYPGPREV     :
12966       printf("\\Kwypgprev      Transmit WYSE 30/50/60/160: Page Previous\n");
12967       break;
12968     case  K_WYREPLACE    :
12969       printf("\\Kwyreplace     Transmit WYSE 30/50/60/160: Replace      \n");
12970       break;
12971     case  K_WYRETURN     :
12972       printf("\\Kwyreturn      Transmit WYSE 30/50/60/160: Return       \n");
12973       break;
12974     case  K_WYTAB            :
12975       printf("\\Kwytab         Transmit WYSE 30/50/60/160: Tab          \n");
12976       break;
12977     case  K_WYSTAB           :
12978       printf("\\Kwystab        Transmit WYSE 30/50/60/160: Shift-Tab    \n");
12979       break;
12980     case  K_WYPRTSCN     :
12981       printf("\\Kwyprtscn      Transmit WYSE 30/50/60/160: Print Screen \n");
12982       break;
12983     case  K_WYSESC       :
12984       printf("\\Kwysesc        Transmit WYSE 30/50/60/160: Shift-Esc    \n");
12985       break;
12986     case  K_WYSBS        :
12987     printf("\\Kwysbs         Transmit WYSE 30/50/60/160: Shift-Backspace\n");
12988       break;
12989     case  K_WYSENTER     :
12990       printf("\\Kwysenter      Transmit WYSE 30/50/60/160: Shift-Enter\n");
12991       break;
12992     case  K_WYSRETURN    :
12993       printf("\\Kwysreturn     Transmit WYSE 30/50/60/160: Shift-Return\n");
12994       break;
12995     case  K_WYUPARR          :
12996       printf("\\Kwyuparr       Transmit WYSE 30/50/60/160: Up Arrow\n");
12997       break;
12998     case  K_WYDNARR          :
12999       printf("\\Kwydnarr       Transmit WYSE 30/50/60/160: Down Arrow\n");
13000       break;
13001     case  K_WYLFARR          :
13002       printf("\\Kwylfarr       Transmit WYSE 30/50/60/160: Left Arrow\n");
13003       break;
13004     case  K_WYRTARR          :
13005       printf("\\Kwyrtarr       Transmit WYSE 30/50/60/160: Right Arrow\n");
13006       break;
13007     case  K_WYSUPARR     :
13008       printf("\\Kwysuparr      Transmit WYSE 30/50/60/160: Shift-Up Arrow\n");
13009       break;
13010     case  K_WYSDNARR     :
13011     printf("\\Kwysdnarr      Transmit WYSE 30/50/60/160: Shift-Down Arrow\n");
13012       break;
13013     case  K_WYSLFARR     :
13014     printf("\\Kwyslfarr      Transmit WYSE 30/50/60/160: Shift-Left Arrow\n");
13015       break;
13016     case  K_WYSRTARR     :
13017     printf("\\Kwysrtarr      Transmit WYSE 30/50/60/160: Shift-Right Arrow\n");
13018       break;
13019     case  K_WYSEND:
13020       printf("\\Kwysend        Transmit WYSE 30/50/60/160: Send\n");
13021       break;
13022     case  K_WYSSEND:
13023       printf("\\Kwyssend       Transmit WYSE 30/50/60/160: Shift-Send\n");
13024       break;
13025 
13026 /* Data General Function Keys (unshifted) */
13027     case  K_DGF01            :
13028       printf("\\Kdgf01         Transmit Data General: F1                 \n");
13029       break;
13030     case  K_DGF02            :
13031       printf("\\Kdgf01         Transmit Data General: F2                 \n");
13032       break;
13033     case  K_DGF03            :
13034       printf("\\Kdgf01         Transmit Data General: F3                 \n");
13035       break;
13036     case  K_DGF04            :
13037       printf("\\Kdgf01         Transmit Data General: F4                 \n");
13038       break;
13039     case  K_DGF05            :
13040       printf("\\Kdgf01         Transmit Data General: F5                 \n");
13041       break;
13042     case  K_DGF06            :
13043       printf("\\Kdgf01         Transmit Data General: F6                 \n");
13044       break;
13045     case  K_DGF07            :
13046       printf("\\Kdgf01         Transmit Data General: F7                 \n");
13047       break;
13048     case  K_DGF08            :
13049       printf("\\Kdgf01         Transmit Data General: F8                 \n");
13050       break;
13051     case  K_DGF09            :
13052       printf("\\Kdgf01         Transmit Data General: F9                 \n");
13053       break;
13054     case  K_DGF10            :
13055       printf("\\Kdgf01         Transmit Data General: F10                \n");
13056       break;
13057     case  K_DGF11            :
13058       printf("\\Kdgf01         Transmit Data General: F11                \n");
13059       break;
13060     case  K_DGF12            :
13061       printf("\\Kdgf01         Transmit Data General: F12                \n");
13062       break;
13063     case  K_DGF13            :
13064       printf("\\Kdgf01         Transmit Data General: F13                \n");
13065       break;
13066     case  K_DGF14            :
13067       printf("\\Kdgf01         Transmit Data General: F14                \n");
13068       break;
13069     case  K_DGF15            :
13070       printf("\\Kdgf01         Transmit Data General: F15                \n");
13071       break;
13072 
13073 /* Data General Function Keys (shifted) */
13074     case  K_DGSF01           :
13075       printf(
13076       "\\Kdgsf01        Transmit Data General: Shift-F1                 \n");
13077       break;
13078     case  K_DGSF02           :
13079       printf(
13080       "\\Kdgsf02        Transmit Data General: Shift-F2                 \n");
13081       break;
13082     case  K_DGSF03           :
13083       printf(
13084       "\\Kdgsf03        Transmit Data General: Shift-F3                 \n");
13085       break;
13086     case  K_DGSF04           :
13087       printf(
13088       "\\Kdgsf04        Transmit Data General: Shift-F4                 \n");
13089       break;
13090     case  K_DGSF05           :
13091       printf(
13092       "\\Kdgsf05        Transmit Data General: Shift-F5                 \n");
13093       break;
13094     case  K_DGSF06           :
13095       printf(
13096       "\\Kdgsf06        Transmit Data General: Shift-F6                 \n");
13097       break;
13098     case  K_DGSF07           :
13099       printf(
13100       "\\Kdgsf07        Transmit Data General: Shift-F7                 \n");
13101       break;
13102     case  K_DGSF08           :
13103       printf(
13104       "\\Kdgsf08        Transmit Data General: Shift-F8                 \n");
13105       break;
13106     case  K_DGSF09           :
13107       printf(
13108       "\\Kdgsf09        Transmit Data General: Shift-F9                 \n");
13109       break;
13110     case  K_DGSF10           :
13111       printf(
13112       "\\Kdgsf10        Transmit Data General: Shift-F10                \n");
13113       break;
13114     case  K_DGSF11           :
13115       printf(
13116       "\\Kdgsf11        Transmit Data General: Shift-F11                \n");
13117       break;
13118     case  K_DGSF12           :
13119       printf(
13120       "\\Kdgsf12        Transmit Data General: Shift-F12                \n");
13121       break;
13122     case  K_DGSF13           :
13123       printf(
13124       "\\Kdgsf13        Transmit Data General: Shift-F13                \n");
13125       break;
13126     case  K_DGSF14           :
13127       printf(
13128       "\\Kdgsf14        Transmit Data General: Shift-F14                \n");
13129       break;
13130     case  K_DGSF15           :
13131       printf(
13132       "\\Kdgsf15        Transmit Data General: Shift-F15                \n");
13133       break;
13134 
13135 /* Data General Function Keys (control) */
13136     case  K_DGCF01           :
13137       printf(
13138       "\\Kdgcf01        Transmit Data General: Ctrl-F1                 \n");
13139       break;
13140     case  K_DGCF02            :
13141       printf(
13142       "\\Kdgcf02        Transmit Data General: Ctrl-F2                 \n");
13143       break;
13144     case  K_DGCF03            :
13145       printf(
13146       "\\Kdgcf03        Transmit Data General: Ctrl-F3                 \n");
13147       break;
13148     case  K_DGCF04            :
13149       printf(
13150       "\\Kdgcf04        Transmit Data General: Ctrl-F4                 \n");
13151       break;
13152     case  K_DGCF05            :
13153       printf(
13154       "\\Kdgcf05        Transmit Data General: Ctrl-F5                 \n");
13155       break;
13156     case  K_DGCF06            :
13157       printf(
13158       "\\Kdgcf06        Transmit Data General: Ctrl-F6                 \n");
13159       break;
13160     case  K_DGCF07            :
13161       printf(
13162       "\\Kdgcf07        Transmit Data General: Ctrl-F7                 \n");
13163       break;
13164     case  K_DGCF08            :
13165       printf(
13166       "\\Kdgcf08        Transmit Data General: Ctrl-F8                 \n");
13167       break;
13168     case  K_DGCF09            :
13169       printf(
13170       "\\Kdgcf09        Transmit Data General: Ctrl-F9                 \n");
13171       break;
13172     case  K_DGCF10            :
13173       printf(
13174       "\\Kdgcf10        Transmit Data General: Ctrl-F10                \n");
13175       break;
13176     case  K_DGCF11            :
13177       printf(
13178       "\\Kdgcf11        Transmit Data General: Ctrl-F11                \n");
13179       break;
13180     case  K_DGCF12            :
13181       printf(
13182       "\\Kdgcf12        Transmit Data General: Ctrl-F12                \n");
13183       break;
13184     case  K_DGCF13            :
13185       printf(
13186       "\\Kdgcf13        Transmit Data General: Ctrl-F13                \n");
13187       break;
13188     case  K_DGCF14            :
13189       printf(
13190       "\\Kdgcf14        Transmit Data General: Ctrl-F14                \n");
13191       break;
13192     case  K_DGCF15            :
13193       printf(
13194       "\\Kdgcf15        Transmit Data General: Ctrl-F15                \n");
13195       break;
13196 
13197 /* Data General Function Keys (control shifted) */
13198     case  K_DGCSF01          :
13199       printf(
13200     "\\Kdgcsf01       Transmit Data General: Ctrl-Shift-F1                \n");
13201       break;
13202     case  K_DGCSF02          :
13203       printf(
13204     "\\Kdgcsf02       Transmit Data General: Ctrl-Shift-F2                \n");
13205       break;
13206     case  K_DGCSF03          :
13207       printf(
13208     "\\Kdgcsf03       Transmit Data General: Ctrl-Shift-F3                \n");
13209       break;
13210     case  K_DGCSF04          :
13211       printf(
13212     "\\Kdgcsf04       Transmit Data General: Ctrl-Shift-F4                \n");
13213       break;
13214     case  K_DGCSF05          :
13215       printf(
13216     "\\Kdgcsf05       Transmit Data General: Ctrl-Shift-F5                \n");
13217       break;
13218     case  K_DGCSF06          :
13219       printf(
13220     "\\Kdgcsf06       Transmit Data General: Ctrl-Shift-F6                \n");
13221       break;
13222     case  K_DGCSF07          :
13223       printf(
13224     "\\Kdgcsf07       Transmit Data General: Ctrl-Shift-F7                \n");
13225       break;
13226     case  K_DGCSF08          :
13227       printf(
13228     "\\Kdgcsf08       Transmit Data General: Ctrl-Shift-F8                \n");
13229       break;
13230     case  K_DGCSF09          :
13231       printf(
13232     "\\Kdgcsf09       Transmit Data General: Ctrl-Shift-F9                \n");
13233       break;
13234     case  K_DGCSF10          :
13235       printf(
13236     "\\Kdgcsf10       Transmit Data General: Ctrl-Shift-F10               \n");
13237       break;
13238     case  K_DGCSF11          :
13239       printf(
13240     "\\Kdgcsf11       Transmit Data General: Ctrl-Shift-F11               \n");
13241       break;
13242     case  K_DGCSF12          :
13243       printf(
13244     "\\Kdgcsf12       Transmit Data General: Ctrl-Shift-F12               \n");
13245       break;
13246     case  K_DGCSF13          :
13247       printf(
13248     "\\Kdgcsf13       Transmit Data General: Ctrl-Shift-F13               \n");
13249       break;
13250     case  K_DGCSF14          :
13251       printf(
13252     "\\Kdgcsf14       Transmit Data General: Ctrl-Shift-F14               \n");
13253       break;
13254     case  K_DGCSF15          :
13255       printf(
13256     "\\Kdgcsf15       Transmit Data General: Ctrl-Shift-F15               \n");
13257       break;
13258 
13259     case  K_DGUPARR          :
13260       printf("\\Kdguparr       Transmit Data General: Up Arrow          \n");
13261       break;
13262     case  K_DGDNARR          :
13263       printf("\\Kdgdnarr       Transmit Data General: Down Arrow        \n");
13264       break;
13265     case  K_DGLFARR          :
13266       printf("\\Kdglfarr       Transmit Data General: Left Arrow        \n");
13267       break;
13268     case  K_DGRTARR          :
13269       printf("\\Kdgrtarr       Transmit Data General: Right Arrow       \n");
13270       break;
13271     case  K_DGSUPARR     :
13272       printf("\\Kdgsuparr      Transmit Data General: Shift-Up Arrow    \n");
13273       break;
13274     case  K_DGSDNARR     :
13275       printf("\\Kdgsdnarr      Transmit Data General: Shift-Down Arrow  \n");
13276       break;
13277     case  K_DGSLFARR     :
13278       printf("\\Kdgslfarr      Transmit Data General: Shift-Left Arrow  \n");
13279       break;
13280     case  K_DGSRTARR     :
13281       printf("\\Kdgsrtarr      Transmit Data General: Shift-Right Arrow \n");
13282       break;
13283 
13284     case  K_DGERASEPAGE  :
13285       printf("\\Kdgerasepage   Transmit Data General: Erase Page        \n");
13286       break;
13287     case  K_DGC1             :
13288       printf("\\Kdgc1          Transmit Data General: C1                \n");
13289       break;
13290     case  K_DGC2             :
13291       printf("\\Kdgc2          Transmit Data General: C2                \n");
13292       break;
13293     case  K_DGERASEEOL   :
13294       printf("\\Kdgeraseeol    Transmit Data General: Erase EOL         \n");
13295       break;
13296     case  K_DGC3             :
13297       printf("\\Kdgc3          Transmit Data General: C3                \n");
13298       break;
13299     case  K_DGC4             :
13300       printf("\\Kdgc4          Transmit Data General: C4                \n");
13301       break;
13302     case  K_DGCMDPRINT   :
13303       printf("\\Kdgcmdprint    Transmit Data General: Command Print     \n");
13304       break;
13305     case  K_DGHOME       :
13306       printf("\\Kdghome        Transmit Data General: Home              \n");
13307       break;
13308     case  K_DGSERASEPAGE :
13309       printf("\\Kdgserasepage  Transmit Data General: Erase Page        \n");
13310       break;
13311     case  K_DGSC1            :
13312       printf("\\Kdgsc1         Transmit Data General: Shift-C1          \n");
13313       break;
13314     case  K_DGSC2            :
13315       printf("\\Kdgsc2         Transmit Data General: Shift-C2          \n");
13316       break;
13317     case  K_DGSERASEEOL  :
13318       printf("\\Kdgseraseeol   Transmit Data General: Shift-Erase EOL  \n");
13319       break;
13320     case  K_DGSC3            :
13321       printf("\\Kdgsc3         Transmit Data General: Shift-C3          \n");
13322       break;
13323     case  K_DGSC4            :
13324       printf("\\Kdgsc4         Transmit Data General: Shift-C4          \n");
13325       break;
13326     case  K_DGSCMDPRINT  :
13327       printf("\\Kdgscmdprint   Transmit Data General: Shift-Command Print\n");
13328       break;
13329     case  K_DGBS         :
13330       printf("\\Kdgbs          Transmit Data General: Backspace         \n");
13331       break;
13332     case  K_DGSHOME      :
13333       printf("\\Kdshome        Transmit Data General: Shift-Home        \n");
13334       break;
13335 
13336 
13337 /* Televideo Function Keys (unshifted) */
13338     case  K_TVIF01           :
13339       printf("\\Ktvif01        Transmit Televideo: F1       \n");
13340       break;
13341     case  K_TVIF02           :
13342       printf("\\Ktvif02        Transmit Televideo: F2              \n");
13343       break;
13344     case  K_TVIF03           :
13345       printf("\\Ktvif03        Transmit Televideo: F3             \n");
13346       break;
13347     case  K_TVIF04           :
13348       printf("\\Ktvif04        Transmit Televideo: F4              \n");
13349       break;
13350     case  K_TVIF05           :
13351       printf("\\Ktvif05        Transmit Televideo: F5              \n");
13352       break;
13353     case  K_TVIF06           :
13354       printf("\\Ktvif06        Transmit Televideo: F6              \n");
13355       break;
13356     case  K_TVIF07           :
13357       printf("\\Ktvif07        Transmit Televideo: F7              \n");
13358       break;
13359     case  K_TVIF08           :
13360       printf("\\Ktvif08        Transmit Televideo: F8              \n");
13361       break;
13362     case  K_TVIF09           :
13363       printf("\\Ktvif09        Transmit Televideo: F9              \n");
13364       break;
13365     case  K_TVIF10           :
13366       printf("\\Ktvif10        Transmit Televideo: F10             \n");
13367       break;
13368     case  K_TVIF11           :
13369       printf("\\Ktvif11        Transmit Televideo: F11             \n");
13370       break;
13371     case  K_TVIF12           :
13372       printf("\\Ktvif12        Transmit Televideo: F12             \n");
13373       break;
13374     case  K_TVIF13           :
13375       printf("\\Ktvif13        Transmit Televideo: F13             \n");
13376       break;
13377     case  K_TVIF14           :
13378       printf("\\Ktvif14        Transmit Televideo: F14             \n");
13379       break;
13380     case  K_TVIF15           :
13381       printf("\\Ktvif15        Transmit Televideo: F15             \n");
13382       break;
13383     case  K_TVIF16           :
13384       printf("\\Ktvif16        Transmit Televideo: F16             \n");
13385       break;
13386 
13387 /* Televideo Function Keys (shifted) */
13388     case  K_TVISF01          :
13389       printf("\\Ktvisf01       Transmit Televideo: Shift-F1 \n");
13390       break;
13391     case  K_TVISF02          :
13392       printf("\\Ktvisf02       Transmit Televideo: Shift-F2 \n");
13393       break;
13394     case  K_TVISF03            :
13395       printf("\\Ktvisf03       Transmit Televideo: Shift-F3 \n");
13396       break;
13397     case  K_TVISF04            :
13398       printf("\\Ktvisf04       Transmit Televideo: Shift-F4 \n");
13399       break;
13400     case  K_TVISF05            :
13401       printf("\\Ktvisf05       Transmit Televideo: Shift-F5 \n");
13402       break;
13403     case  K_TVISF06            :
13404       printf("\\Ktvisf06       Transmit Televideo: Shift-F6 \n");
13405       break;
13406     case  K_TVISF07            :
13407       printf("\\Ktvisf07       Transmit Televideo: Shift-F7 \n");
13408       break;
13409     case  K_TVISF08            :
13410       printf("\\Ktvisf08       Transmit Televideo: Shift-F8 \n");
13411       break;
13412     case  K_TVISF09            :
13413       printf("\\Ktvisf09       Transmit Televideo: Shift-F9 \n");
13414       break;
13415     case  K_TVISF10            :
13416       printf("\\Ktvisf10       Transmit Televideo: Shift-F10\n");
13417       break;
13418     case  K_TVISF11            :
13419       printf("\\Ktvisf11       Transmit Televideo: Shift-F11\n");
13420       break;
13421     case  K_TVISF12            :
13422       printf("\\Ktvisf12       Transmit Televideo: Shift-F12\n");
13423       break;
13424     case  K_TVISF13            :
13425       printf("\\Ktvisf13       Transmit Televideo: Shift-F13\n");
13426       break;
13427     case  K_TVISF14            :
13428       printf("\\Ktvisf14       Transmit Televideo: Shift-F14\n");
13429       break;
13430     case  K_TVISF15            :
13431       printf("\\Ktvisf15       Transmit Televideo: Shift-F15\n");
13432       break;
13433     case  K_TVISF16            :
13434       printf("\\Ktvisf16       Transmit Televideo: Shift-F16\n");
13435       break;
13436 
13437 /* Televideo Edit and Special Keys */
13438     case  K_TVIBS         :
13439       printf("\\Ktvibs         Transmit Televideo: Backspace       \n");
13440       break;
13441     case  K_TVICLRLN         :
13442       printf("\\Ktviclrln      Transmit Televideo: Clear Line      \n");
13443       break;
13444     case  K_TVISCLRLN     :
13445       printf("\\Ktvisclrln     Transmit Televideo: Shift-Clear Line\n");
13446       break;
13447     case  K_TVICLRPG      :
13448       printf("\\Ktviclrpg      Transmit Televideo: Clear Page      \n");
13449       break;
13450     case  K_TVISCLRPG     :
13451       printf("\\Ktvisclrpg     Transmit Televideo: Shift-Clear Page\n");
13452       break;
13453     case  K_TVIDELCHAR    :
13454       printf("\\Ktvidelchar    Transmit Televideo: Delete Char     \n");
13455       break;
13456     case  K_TVIDELLN      :
13457       printf("\\Ktvidelln      Transmit Televideo: Delete Line     \n");
13458       break;
13459     case  K_TVIENTER         :
13460       printf("\\Ktvienter      Transmit Televideo: Enter           \n");
13461       break;
13462     case  K_TVIESC           :
13463       printf("\\Ktviesc        Transmit Televideo: Esc             \n");
13464       break;
13465     case  K_TVIHOME          :
13466       printf("\\Ktvihome       Transmit Televideo: Home            \n");
13467       break;
13468     case  K_TVISHOME         :
13469       printf("\\Ktvishome      Transmit Televideo: Shift-Home      \n");
13470       break;
13471     case  K_TVIINSERT     :
13472       printf("\\Ktviinsert     Transmit Televideo: Insert          \n");
13473       break;
13474     case  K_TVIINSCHAR    :
13475       printf("\\Ktviinschar    Transmit Televideo: Insert Char     \n");
13476       break;
13477     case  K_TVIINSLN         :
13478       printf("\\Ktviinsln      Transmit Televideo: Insert Line     \n");
13479       break;
13480     case  K_TVIPGNEXT     :
13481       printf("\\Ktvipgnext     Transmit Televideo: Page Next       \n");
13482       break;
13483     case  K_TVIPGPREV     :
13484       printf("\\Ktvipgprev     Transmit Televideo: Page Previous   \n");
13485       break;
13486     case  K_TVIREPLACE    :
13487       printf("\\Ktvireplace    Transmit Televideo: Replace         \n");
13488       break;
13489     case  K_TVIRETURN     :
13490       printf("\\Ktvireturn     Transmit Televideo: Return          \n");
13491       break;
13492     case  K_TVITAB           :
13493       printf("\\Ktvitab        Transmit Televideo: Tab             \n");
13494       break;
13495     case  K_TVISTAB          :
13496       printf("\\Ktvistab       Transmit Televideo: Shift-Tab       \n");
13497       break;
13498     case  K_TVIPRTSCN     :
13499       printf("\\Ktviprtscn     Transmit Televideo: Print Screen    \n");
13500       break;
13501     case  K_TVISESC       :
13502       printf("\\Ktvisesc       Transmit Televideo: Shift-Esc       \n");
13503       break;
13504     case  K_TVISBS        :
13505       printf("\\Ktvisbs        Transmit Televideo: Shift-Backspace \n");
13506       break;
13507     case  K_TVISENTER     :
13508       printf("\\Ktvisenter     Transmit Televideo: Shift-Enter     \n");
13509       break;
13510     case  K_TVISRETURN    :
13511       printf("\\Ktvisreturn    Transmit Televideo: Shift-Return    \n");
13512       break;
13513     case  K_TVIUPARR         :
13514       printf("\\Ktviuparr      Transmit Televideo: Up Arrow        \n");
13515       break;
13516     case  K_TVIDNARR         :
13517       printf("\\Ktvidnarr      Transmit Televideo: Down Arrow      \n");
13518       break;
13519     case  K_TVILFARR         :
13520       printf("\\Ktvilfarr      Transmit Televideo: Left Arrow      \n");
13521       break;
13522     case  K_TVIRTARR         :
13523       printf("\\Ktvirtarr      Transmit Televideo: Right Arrow     \n");
13524       break;
13525     case  K_TVISUPARR     :
13526       printf("\\Ktvisuparr     Transmit Televideo: Shift-Up Arrow  \n");
13527       break;
13528     case  K_TVISDNARR     :
13529       printf("\\Ktvisdnarr     Transmit Televideo: Shift-Down Arrow\n");
13530       break;
13531     case  K_TVISLFARR     :
13532       printf("\\Ktvislfarr     Transmit Televideo: Shift-Left Arrow\n");
13533       break;
13534     case  K_TVISRTARR     :
13535       printf("\\Ktvisrtarr     Transmit Televideo: Shift-Right Arrow\n");
13536       break;
13537     case K_TVISEND:
13538       printf("\\Ktvisend       Transmit Televideo: Send\n");
13539       break;
13540     case K_TVISSEND:
13541       printf("\\Ktvissend      Transmit Televideo: Shift-Send\n");
13542       break;
13543 
13544 /* HP Function and Edit keys */
13545     case  K_HPF01            :
13546       printf("\\Khpf01         Transmit Hewlett-Packard: F1       \n");
13547       break;
13548     case  K_HPF02            :
13549       printf("\\Khpf02         Transmit Hewlett-Packard: F2              \n");
13550       break;
13551     case  K_HPF03            :
13552       printf("\\Khpf03         Transmit Hewlett-Packard: F3             \n");
13553       break;
13554     case  K_HPF04            :
13555       printf("\\Khpf04         Transmit Hewlett-Packard: F4              \n");
13556       break;
13557     case  K_HPF05            :
13558       printf("\\Khpf05         Transmit Hewlett-Packard: F5              \n");
13559       break;
13560     case  K_HPF06            :
13561       printf("\\Khpf06         Transmit Hewlett-Packard: F6              \n");
13562       break;
13563     case  K_HPF07            :
13564       printf("\\Khpf07         Transmit Hewlett-Packard: F7              \n");
13565       break;
13566     case  K_HPF08            :
13567       printf("\\Khpf08         Transmit Hewlett-Packard: F8              \n");
13568       break;
13569     case  K_HPF09            :
13570       printf("\\Khpf09         Transmit Hewlett-Packard: F9              \n");
13571       break;
13572     case  K_HPF10            :
13573       printf("\\Khpf10         Transmit Hewlett-Packard: F10             \n");
13574       break;
13575     case  K_HPF11            :
13576       printf("\\Khpf11         Transmit Hewlett-Packard: F11             \n");
13577       break;
13578     case  K_HPF12            :
13579       printf("\\Khpf12         Transmit Hewlett-Packard: F12             \n");
13580       break;
13581     case  K_HPF13            :
13582       printf("\\Khpf13         Transmit Hewlett-Packard: F13             \n");
13583       break;
13584     case  K_HPF14            :
13585       printf("\\Khpf14         Transmit Hewlett-Packard: F14             \n");
13586       break;
13587     case  K_HPF15            :
13588       printf("\\Khpf15         Transmit Hewlett-Packard: F15             \n");
13589       break;
13590     case  K_HPF16            :
13591       printf("\\Khpf16         Transmit Hewlett-Packard: F16             \n");
13592       break;
13593     case  K_HPRETURN     :
13594       printf("\\Khpreturn      Transmit Hewlett-Packard: Return\n");
13595       break;
13596     case  K_HPENTER          :
13597       printf("\\Khpenter       Transmit Hewlett-Packard: Enter (keypad)\n");
13598       break;
13599     case  K_HPBACKTAB        :
13600       printf("\\Khpbacktab     Transmit Hewlett-Packard: Back Tab\n");
13601       break;
13602         /* Siemens Nixdorf International 97801-5xx kverbs */
13603     case K_SNI_DOUBLE_0      :
13604         printf("\\Ksni_00          Transmit SNI-97801-5xx: Double-Zero\n");
13605         break;
13606     case K_SNI_C_DOUBLE_0    :
13607         printf(
13608 "\\Ksni_c_00        Transmit SNI-97801-5xx: Ctrl-Double-Zero\n");
13609         break;
13610     case K_SNI_C_CE          :
13611         printf("\\Ksni_c_ce        Transmit SNI-97801-5xx: Ctrl-CE\n");
13612         break;
13613     case K_SNI_C_COMPOSE     :
13614         printf("\\Ksni_c_compose   Transmit SNI-97801-5xx: Ctrl-Compose\n");
13615         break;
13616     case K_SNI_C_DELETE_CHAR :
13617         printf(
13618 "\\Ksni_c_del_char  Transmit SNI-97801-5xx: Ctrl-Delete Char\n");
13619         break;
13620     case K_SNI_C_DELETE_LINE :
13621         printf(
13622 "\\Ksni_c_del_line  Transmit SNI-97801-5xx: Ctrl-Delete Line\n");
13623         break;
13624     case K_SNI_C_DELETE_WORD :
13625         printf(
13626 "\\Ksni_c_del_word  Transmit SNI-97801-5xx: Ctrl-Delete Word\n");
13627         break;
13628     case K_SNI_C_CURSOR_DOWN :
13629         printf(
13630 "\\Ksni_c_dnarr     Transmit SNI-97801-5xx: Ctrl-Cursor Down\n");
13631         break;
13632     case K_SNI_C_ENDMARKE    :
13633         printf("\\Ksni_c_endmarke  Transmit SNI-97801-5xx: Ctrl-End Marke\n");
13634         break;
13635     case K_SNI_C_F01         :
13636         printf("\\Ksni_c_f01       Transmit SNI-97801-5xx: Ctrl-F1\n");
13637         break;
13638     case K_SNI_C_F02         :
13639         printf("\\Ksni_c_f02       Transmit SNI-97801-5xx: Ctrl-F2\n");
13640         break;
13641     case K_SNI_C_F03         :
13642         printf("\\Ksni_c_f03       Transmit SNI-97801-5xx: Ctrl-F3\n");
13643         break;
13644     case K_SNI_C_F04         :
13645         printf("\\Ksni_c_f04       Transmit SNI-97801-5xx: Ctrl-F4\n");
13646         break;
13647     case K_SNI_C_F05         :
13648         printf("\\Ksni_c_f05       Transmit SNI-97801-5xx: Ctrl-F5\n");
13649         break;
13650     case K_SNI_C_F06         :
13651         printf("\\Ksni_c_f06       Transmit SNI-97801-5xx: Ctrl-F6\n");
13652         break;
13653     case K_SNI_C_F07         :
13654         printf("\\Ksni_c_f07       Transmit SNI-97801-5xx: Ctrl-F7\n");
13655         break;
13656     case K_SNI_C_F08         :
13657         printf("\\Ksni_c_f08       Transmit SNI-97801-5xx: Ctrl-F8\n");
13658         break;
13659     case K_SNI_C_F09         :
13660         printf("\\Ksni_c_f09       Transmit SNI-97801-5xx: Ctrl-F9\n");
13661         break;
13662     case K_SNI_C_F10         :
13663         printf("\\Ksni_c_f10       Transmit SNI-97801-5xx: Ctrl-F10\n");
13664         break;
13665     case K_SNI_C_F11         :
13666         printf("\\Ksni_c_f11       Transmit SNI-97801-5xx: Ctrl-F11\n");
13667         break;
13668     case K_SNI_C_F12         :
13669         printf("\\Ksni_c_f12       Transmit SNI-97801-5xx: Ctrl-F12\n");
13670         break;
13671     case K_SNI_C_F13         :
13672         printf("\\Ksni_c_f13       Transmit SNI-97801-5xx: Ctrl-F13\n");
13673         break;
13674     case K_SNI_C_F14         :
13675         printf("\\Ksni_c_f14       Transmit SNI-97801-5xx: Ctrl-F14\n");
13676         break;
13677     case K_SNI_C_F15         :
13678         printf("\\Ksni_c_f15       Transmit SNI-97801-5xx: Ctrl-F15\n");
13679         break;
13680     case K_SNI_C_F16         :
13681         printf("\\Ksni_c_f16       Transmit SNI-97801-5xx: Ctrl-F16\n");
13682         break;
13683     case K_SNI_C_F17         :
13684         printf("\\Ksni_c_f17       Transmit SNI-97801-5xx: Ctrl-F17\n");
13685         break;
13686     case K_SNI_C_F18         :
13687         printf("\\Ksni_c_f18       Transmit SNI-97801-5xx: Ctrl-F18\n");
13688         break;
13689     case K_SNI_C_USER1        :
13690         printf(
13691 "\\Ksni_c_user1     Transmit SNI-97801-5xx: Ctrl-Key below F18\n");
13692         break;
13693     case K_SNI_C_F19         :
13694         printf("\\Ksni_c_f19       Transmit SNI-97801-5xx: Ctrl-F19\n");
13695         break;
13696     case K_SNI_C_USER2       :
13697         printf(
13698 "\\Ksni_c_user2     Transmit SNI-97801-5xx: Ctrl-Key below F19\n");
13699         break;
13700     case K_SNI_C_F20         :
13701         printf("\\Ksni_c_f20       Transmit SNI-97801-5xx: Ctrl-F20\n");
13702         break;
13703     case K_SNI_C_USER3       :
13704         printf(
13705 "\\Ksni_c_user3     Transmit SNI-97801-5xx: Ctrl-Key below F20\n");
13706         break;
13707     case K_SNI_C_F21         :
13708         printf("\\Ksni_c_f21       Transmit SNI-97801-5xx: Ctrl-F21\n");
13709         break;
13710     case K_SNI_C_USER4       :
13711         printf(
13712 "\\Ksni_c_user4     Transmit SNI-97801-5xx: Ctrl-Key below F21\n");
13713         break;
13714     case K_SNI_C_F22         :
13715         printf("\\Ksni_c_f22       Transmit SNI-97801-5xx: Ctrl-F22\n");
13716         break;
13717     case K_SNI_C_USER5       :
13718         printf(
13719 "\\Ksni_c_user5     Transmit SNI-97801-5xx: Ctrl-Key below F22\n");
13720         break;
13721     case K_SNI_C_HELP        :
13722         printf("\\Ksni_c_help      Transmit SNI-97801-5xx: Ctrl-Help\n");
13723         break;
13724     case K_SNI_C_HOME        :
13725         printf("\\Ksni_c_home      Transmit SNI-97801-5xx: Ctrl-Home\n");
13726         break;
13727     case K_SNI_C_INSERT_CHAR :
13728         printf(
13729 "\\Ksni_c_ins_char  Transmit SNI-97801-5xx: Ctrl-Insert Char\n");
13730         break;
13731     case K_SNI_C_INSERT_LINE :
13732         printf(
13733 "\\Ksni_c_ins_line  Transmit SNI-97801-5xx: Ctrl-Insert Line\n");
13734         break;
13735     case K_SNI_C_INSERT_WORD :
13736         printf(
13737 "\\Ksni_c_ins_word  Transmit SNI-97801-5xx: Ctrl-Insert Word\n");
13738         break;
13739     case K_SNI_C_LEFT_TAB    :
13740         printf("\\Ksni_c_left_tab  Transmit SNI-97801-5xx: Ctrl-Left Tab\n");
13741         break;
13742     case K_SNI_C_CURSOR_LEFT :
13743         printf(
13744 "\\Ksni_c_lfarr     Transmit SNI-97801-5xx: Ctrl-Cursor Left\n");
13745         break;
13746     case K_SNI_C_MODE        :
13747         printf("\\Ksni_c_mode      Transmit SNI-97801-5xx: Ctrl-Mode\n");
13748         break;
13749     case K_SNI_C_PAGE        :
13750         printf("\\Ksni_c_page      Transmit SNI-97801-5xx: Ctrl-Page\n");
13751         break;
13752     case K_SNI_C_PRINT       :
13753         printf("\\Ksni_c_print     Transmit SNI-97801-5xx: Ctrl-Print\n");
13754         break;
13755     case K_SNI_C_CURSOR_RIGHT:
13756         printf(
13757 "\\Ksni_c_rtarr     Transmit SNI-97801-5xx: Ctrl-Cursor Right\n");
13758         break;
13759     case K_SNI_C_SCROLL_DOWN :
13760         printf(
13761 "\\Ksni_c_scroll_dn Transmit SNI-97801-5xx: Ctrl-Scroll Down\n");
13762         break;
13763     case K_SNI_C_SCROLL_UP   :
13764         printf("\\Ksni_c_scroll_up Transmit SNI-97801-5xx: Ctrl-Scroll Up\n");
13765         break;
13766     case K_SNI_C_START       :
13767         printf("\\Ksni_c_start     Transmit SNI-97801-5xx: Ctrl-Start\n");
13768         break;
13769     case K_SNI_C_CURSOR_UP   :
13770         printf("\\Ksni_c_uparr     Transmit SNI-97801-5xx: Ctrl-Cursor Up\n");
13771         break;
13772     case K_SNI_C_TAB         :
13773         printf("\\Ksni_c_tab       Transmit SNI-97801-5xx: Ctrl-Tab\n");
13774         break;
13775     case K_SNI_CE            :
13776         printf("\\Ksni_ce          Transmit SNI-97801-5xx: CE\n");
13777         break;
13778     case K_SNI_CH_CODE:
13779         printf("\\Ksni_ch_code     Toggle SNI-97801-5xx: CH.CODE function.\n");
13780         break;
13781     case K_SNI_COMPOSE       :
13782         printf("\\Ksni_compose     Transmit SNI-97801-5xx: Compose\n");
13783         break;
13784     case K_SNI_DELETE_CHAR   :
13785         printf("\\Ksni_del_char    Transmit SNI-97801-5xx: Delete Char\n");
13786         break;
13787     case K_SNI_DELETE_LINE   :
13788         printf("\\Ksni_del_line    Transmit SNI-97801-5xx: Delete Line\n");
13789         break;
13790     case K_SNI_DELETE_WORD   :
13791         printf("\\Ksni_del_word    Transmit SNI-97801-5xx: Delete Word\n");
13792         break;
13793     case K_SNI_CURSOR_DOWN   :
13794         printf("\\Ksni_dnarr       Transmit SNI-97801-5xx: Cursor Down\n");
13795         break;
13796     case K_SNI_ENDMARKE      :
13797         printf("\\Ksni_endmarke    Transmit SNI-97801-5xx: End Marke\n");
13798         break;
13799     case K_SNI_F01           :
13800         printf("\\Ksni_f01         Transmit SNI-97801-5xx: F1\n");
13801         break;
13802     case K_SNI_F02           :
13803         printf("\\Ksni_f02         Transmit SNI-97801-5xx: F2\n");
13804         break;
13805     case K_SNI_F03           :
13806         printf("\\Ksni_f03         Transmit SNI-97801-5xx: F3\n");
13807         break;
13808     case K_SNI_F04           :
13809         printf("\\Ksni_f04         Transmit SNI-97801-5xx: F4\n");
13810         break;
13811     case K_SNI_F05           :
13812         printf("\\Ksni_f05         Transmit SNI-97801-5xx: F5\n");
13813         break;
13814     case K_SNI_F06           :
13815         printf("\\Ksni_f06         Transmit SNI-97801-5xx: F6\n");
13816         break;
13817     case K_SNI_F07           :
13818         printf("\\Ksni_f07         Transmit SNI-97801-5xx: F7\n");
13819         break;
13820     case K_SNI_F08           :
13821         printf("\\Ksni_f08         Transmit SNI-97801-5xx: F8\n");
13822         break;
13823     case K_SNI_F09           :
13824         printf("\\Ksni_f09         Transmit SNI-97801-5xx: F9\n");
13825         break;
13826     case K_SNI_F10           :
13827         printf("\\Ksni_f10         Transmit SNI-97801-5xx: F10\n");
13828         break;
13829     case K_SNI_F11           :
13830         printf("\\Ksni_f11         Transmit SNI-97801-5xx: F11\n");
13831         break;
13832     case K_SNI_F12           :
13833         printf("\\Ksni_f12         Transmit SNI-97801-5xx: F12\n");
13834         break;
13835     case K_SNI_F13           :
13836         printf("\\Ksni_f13         Transmit SNI-97801-5xx: F13\n");
13837         break;
13838     case K_SNI_F14           :
13839         printf("\\Ksni_f14         Transmit SNI-97801-5xx: F14\n");
13840         break;
13841     case K_SNI_F15           :
13842         printf("\\Ksni_f15         Transmit SNI-97801-5xx: F15\n");
13843         break;
13844     case K_SNI_F16           :
13845         printf("\\Ksni_f16         Transmit SNI-97801-5xx: F16\n");
13846         break;
13847     case K_SNI_F17           :
13848         printf("\\Ksni_f17         Transmit SNI-97801-5xx: F17\n");
13849         break;
13850     case K_SNI_F18           :
13851         printf("\\Ksni_f18         Transmit SNI-97801-5xx: F18\n");
13852         break;
13853     case K_SNI_USER1          :
13854         printf("\\Ksni_user1       Transmit SNI-97801-5xx: Key below F18\n");
13855         break;
13856     case K_SNI_F19           :
13857         printf("\\Ksni_f19         Transmit SNI-97801-5xx: F19\n");
13858         break;
13859     case K_SNI_USER2          :
13860         printf("\\Ksni_user2       Transmit SNI-97801-5xx: Key below F19\n");
13861         break;
13862     case K_SNI_F20           :
13863         printf("\\Ksni_f20         Transmit SNI-97801-5xx: F20\n");
13864         break;
13865     case K_SNI_USER3          :
13866         printf("\\Ksni_user3       Transmit SNI-97801-5xx: Key below F20\n");
13867         break;
13868     case K_SNI_F21           :
13869         printf("\\Ksni_f21         Transmit SNI-97801-5xx: F21\n");
13870         break;
13871     case K_SNI_USER4          :
13872         printf("\\Ksni_user4       Transmit SNI-97801-5xx: Key below F21\n");
13873         break;
13874     case K_SNI_F22           :
13875         printf("\\Ksni_f22         Transmit SNI-97801-5xx: F22\n");
13876         break;
13877     case K_SNI_USER5          :
13878         printf("\\Ksni_user5       Transmit SNI-97801-5xx: Key below F22\n");
13879         break;
13880     case K_SNI_HELP          :
13881         printf("\\Ksni_help        Transmit SNI-97801-5xx: Help\n");
13882         break;
13883     case K_SNI_HOME          :
13884         printf("\\Ksni_home        Transmit SNI-97801-5xx: Home\n");
13885         break;
13886     case K_SNI_INSERT_CHAR   :
13887         printf("\\Ksni_ins_char    Transmit SNI-97801-5xx: Insert Char\n");
13888         break;
13889     case K_SNI_INSERT_LINE   :
13890         printf("\\Ksni_ins_line    Transmit SNI-97801-5xx: Insert Line\n");
13891         break;
13892     case K_SNI_INSERT_WORD   :
13893         printf("\\Ksni_ins_word    Transmit SNI-97801-5xx: Insert Word\n");
13894         break;
13895     case K_SNI_LEFT_TAB      :
13896         printf("\\Ksni_left_tab    Transmit SNI-97801-5xx: Left Tab\n");
13897         break;
13898     case K_SNI_CURSOR_LEFT   :
13899         printf("\\Ksni_lfarr       Transmit SNI-97801-5xx: Cursor Left\n");
13900         break;
13901     case K_SNI_MODE          :
13902         printf("\\Ksni_mode        Transmit SNI-97801-5xx: Mode\n");
13903         break;
13904     case K_SNI_PAGE          :
13905         printf("\\Ksni_page        Transmit SNI-97801-5xx: Page\n");
13906         break;
13907     case K_SNI_PRINT         :
13908         printf("\\Ksni_print       Transmit SNI-97801-5xx: Print\n");
13909         break;
13910     case K_SNI_CURSOR_RIGHT  :
13911         printf("\\Ksni_rtarr       Transmit SNI-97801-5xx: Cursor Right\n");
13912         break;
13913     case K_SNI_S_DOUBLE_0    :
13914         printf(
13915 "\\Ksni_s_00        Transmit SNI-97801-5xx: Shift-Double-Zero\n");
13916         break;
13917     case K_SNI_S_CE          :
13918         printf("\\Ksni_s_ce        Transmit SNI-97801-5xx: Shift-CE\n");
13919         break;
13920     case K_SNI_S_COMPOSE     :
13921         printf("\\Ksni_s_compose   Transmit SNI-97801-5xx: Shift-Compose\n");
13922         break;
13923     case K_SNI_S_DELETE_CHAR :
13924         printf(
13925 "\\Ksni_s_del_char  Transmit SNI-97801-5xx: Shift-Delete Char\n");
13926         break;
13927     case K_SNI_S_DELETE_LINE :
13928         printf(
13929 "\\Ksni_s_del_line  Transmit SNI-97801-5xx: Shift-Delete Line\n");
13930         break;
13931     case K_SNI_S_DELETE_WORD :
13932         printf(
13933 "\\Ksni_s_del_word  Transmit SNI-97801-5xx: Shift-Delete Word\n");
13934         break;
13935     case K_SNI_S_CURSOR_DOWN :
13936         printf(
13937 "\\Ksni_s_dnarr     Transmit SNI-97801-5xx: Shift-Cursor Down\n");
13938         break;
13939     case K_SNI_S_ENDMARKE    :
13940         printf("\\Ksni_s_endmarke  Transmit SNI-97801-5xx: Shift-End Marke\n");
13941         break;
13942     case K_SNI_S_F01         :
13943         printf("\\Ksni_s_f01       Transmit SNI-97801-5xx: Shift-F1\n");
13944         break;
13945     case K_SNI_S_F02         :
13946         printf("\\Ksni_s_f02       Transmit SNI-97801-5xx: Shift-F2\n");
13947         break;
13948     case K_SNI_S_F03         :
13949         printf("\\Ksni_s_f03       Transmit SNI-97801-5xx: Shift-F3\n");
13950         break;
13951     case K_SNI_S_F04         :
13952         printf("\\Ksni_s_f04       Transmit SNI-97801-5xx: Shift-F4\n");
13953         break;
13954     case K_SNI_S_F05         :
13955         printf("\\Ksni_s_f05       Transmit SNI-97801-5xx: Shift-F5\n");
13956         break;
13957     case K_SNI_S_F06         :
13958         printf("\\Ksni_s_f06       Transmit SNI-97801-5xx: Shift-F6\n");
13959         break;
13960     case K_SNI_S_F07         :
13961         printf("\\Ksni_s_f07       Transmit SNI-97801-5xx: Shift-F7\n");
13962         break;
13963     case K_SNI_S_F08         :
13964         printf("\\Ksni_s_f08       Transmit SNI-97801-5xx: Shift-F8\n");
13965         break;
13966     case K_SNI_S_F09         :
13967         printf("\\Ksni_s_f09       Transmit SNI-97801-5xx: Shift-F9\n");
13968         break;
13969     case K_SNI_S_F10         :
13970         printf("\\Ksni_s_f10       Transmit SNI-97801-5xx: Shift-F10\n");
13971         break;
13972     case K_SNI_S_F11         :
13973         printf("\\Ksni_s_f11       Transmit SNI-97801-5xx: Shift-F11\n");
13974         break;
13975     case K_SNI_S_F12         :
13976         printf("\\Ksni_s_f12       Transmit SNI-97801-5xx: Shift-F12\n");
13977         break;
13978     case K_SNI_S_F13         :
13979         printf("\\Ksni_s_f13       Transmit SNI-97801-5xx: Shift-F13\n");
13980         break;
13981     case K_SNI_S_F14         :
13982         printf("\\Ksni_s_f14       Transmit SNI-97801-5xx: Shift-F14\n");
13983         break;
13984     case K_SNI_S_F15         :
13985         printf("\\Ksni_s_f15       Transmit SNI-97801-5xx: Shift-F15\n");
13986         break;
13987     case K_SNI_S_F16         :
13988         printf("\\Ksni_s_f16       Transmit SNI-97801-5xx: Shift-F16\n");
13989         break;
13990     case K_SNI_S_F17         :
13991         printf("\\Ksni_s_f17       Transmit SNI-97801-5xx: Shift-F17\n");
13992         break;
13993     case K_SNI_S_F18         :
13994         printf("\\Ksni_s_f18       Transmit SNI-97801-5xx: Shift-F18\n");
13995         break;
13996     case K_SNI_S_USER1        :
13997         printf(
13998 "\\Ksni_s_user1     Transmit SNI-97801-5xx: Shift-Key below F18\n");
13999         break;
14000     case K_SNI_S_F19         :
14001         printf("\\Ksni_s_f19       Transmit SNI-97801-5xx: Shift-F19\n");
14002         break;
14003     case K_SNI_S_USER2       :
14004         printf(
14005 "\\Ksni_s_user2     Transmit SNI-97801-5xx: Shift-Key below F19\n");
14006         break;
14007     case K_SNI_S_F20         :
14008         printf("\\Ksni_s_f20       Transmit SNI-97801-5xx: Shift-F20\n");
14009         break;
14010     case K_SNI_S_USER3       :
14011         printf(
14012 "\\Ksni_s_user3     Transmit SNI-97801-5xx: Shift-Key below F20\n");
14013         break;
14014     case K_SNI_S_F21         :
14015         printf("\\Ksni_s_f21       Transmit SNI-97801-5xx: Shift-F21\n");
14016         break;
14017     case K_SNI_S_USER4       :
14018         printf(
14019 "\\Ksni_s_user4     Transmit SNI-97801-5xx: Shift-Key below F21\n");
14020         break;
14021     case K_SNI_S_F22         :
14022         printf("\\Ksni_s_f22       Transmit SNI-97801-5xx: Shift-F22\n");
14023         break;
14024     case K_SNI_S_USER5       :
14025         printf(
14026 "\\Ksni_s_user5     Transmit SNI-97801-5xx: Shift-Key below F22\n");
14027         break;
14028     case K_SNI_S_HELP        :
14029         printf("\\Ksni_s_help      Transmit SNI-97801-5xx: Shift-Help\n");
14030         break;
14031     case K_SNI_S_HOME        :
14032         printf("\\Ksni_s_home      Transmit SNI-97801-5xx: Shift-Home\n");
14033         break;
14034     case K_SNI_S_INSERT_CHAR :
14035         printf(
14036 "\\Ksni_s_ins_char  Transmit SNI-97801-5xx: Shift-Insert Char\n");
14037         break;
14038     case K_SNI_S_INSERT_LINE :
14039         printf(
14040 "\\Ksni_s_ins_line  Transmit SNI-97801-5xx: Shift-Insert Line\n");
14041         break;
14042     case K_SNI_S_INSERT_WORD :
14043         printf(
14044 "\\Ksni_s_ins_word  Transmit SNI-97801-5xx: Shift-Insert Word\n");
14045         break;
14046     case K_SNI_S_LEFT_TAB    :
14047         printf("\\Ksni_s_left_tab  Transmit SNI-97801-5xx: Shift-Left Tab\n");
14048         break;
14049     case K_SNI_S_CURSOR_LEFT :
14050         printf(
14051 "\\Ksni_s_lfarr     Transmit SNI-97801-5xx: Shift-Cursor Left\n");
14052         break;
14053     case K_SNI_S_MODE        :
14054         printf("\\Ksni_s_mode      Transmit SNI-97801-5xx: Shift-Mode\n");
14055         break;
14056     case K_SNI_S_PAGE        :
14057         printf("\\Ksni_s_page      Transmit SNI-97801-5xx: Shift-Page\n");
14058         break;
14059     case K_SNI_S_PRINT       :
14060         printf("\\Ksni_s_print     Transmit SNI-97801-5xx: Shift-Print\n");
14061         break;
14062     case K_SNI_S_CURSOR_RIGHT:
14063         printf(
14064 "\\Ksni_s_rtarr     Transmit SNI-97801-5xx: Shift-Cursor Right\n");
14065         break;
14066     case K_SNI_S_SCROLL_DOWN :
14067         printf(
14068 "\\Ksni_s_scroll_dn Transmit SNI-97801-5xx: Shift-Scroll Down\n");
14069         break;
14070     case K_SNI_S_SCROLL_UP   :
14071         printf("\\Ksni_s_scroll_up Transmit SNI-97801-5xx: Shift-Scroll Up\n");
14072         break;
14073     case K_SNI_S_START       :
14074         printf("\\Ksni_s_start     Transmit SNI-97801-5xx: Shift-Start\n");
14075         break;
14076     case K_SNI_S_CURSOR_UP   :
14077         printf("\\Ksni_s_uparr     Transmit SNI-97801-5xx: Shift-Cursor Up\n");
14078         break;
14079     case K_SNI_S_TAB         :
14080         printf("\\Ksni_s_tab       Transmit SNI-97801-5xx: Shift-Tab\n");
14081         break;
14082     case K_SNI_SCROLL_DOWN   :
14083         printf("\\Ksni_scroll_dn   Transmit SNI-97801-5xx: Scroll Down\n");
14084         break;
14085     case K_SNI_SCROLL_UP     :
14086         printf("\\Ksni_scroll_up   Transmit SNI-97801-5xx: Scroll Up\n");
14087         break;
14088     case K_SNI_START         :
14089         printf("\\Ksni_start       Transmit SNI-97801-5xx: Start\n");
14090         break;
14091     case K_SNI_TAB           :
14092         printf("\\Ksni_tab         Transmit SNI-97801-5xx: Tab\n");
14093         break;
14094     case K_SNI_CURSOR_UP     :
14095         printf("\\Ksni_uparr       Transmit SNI-97801-5xx: Cursor Up\n");
14096         break;
14097 
14098     case K_BA80_ATTR:
14099         printf("\\Kba80_attr       Transmit BA80: Attr\n");
14100         break;
14101     case K_BA80_C_KEY:
14102         printf("\\Kba80_c_key      Transmit BA80: C\n");
14103         break;
14104     case K_BA80_CLEAR:
14105         printf("\\Kba80_clear      Transmit BA80: Clear\n");
14106         break;
14107     case K_BA80_CMD:
14108         printf("\\Kba80_cmd        Transmit BA80: Cmd\n");
14109         break;
14110     case K_BA80_COPY:
14111         printf("\\Kba80_copy       Transmit BA80: Copy\n");
14112         break;
14113     case K_BA80_DEL:
14114         printf("\\Kba80_del        Transmit BA80: Delete\n");
14115         break;
14116     case K_BA80_DEL_B:
14117         printf("\\Kba80_del_b      Transmit BA80: Delete B\n");
14118         break;
14119     case K_BA80_DO:
14120         printf("\\Kba80_do         Transmit BA80: Do\n");
14121         break;
14122     case K_BA80_END:
14123         printf("\\Kba80_end        Transmit BA80: End\n");
14124         break;
14125     case K_BA80_ENV:
14126         printf("\\Kba80_env        Transmit BA80: Env\n");
14127         break;
14128     case K_BA80_EOP:
14129         printf("\\Kba80_eop        Transmit BA80: EOP\n");
14130         break;
14131     case K_BA80_ERASE:
14132         printf("\\Kba80_erase      Transmit BA80: Erase\n");
14133         break;
14134     case K_BA80_FMT:
14135         printf("\\Kba80_fmt        Transmit BA80: Format\n");
14136         break;
14137     case K_BA80_HELP:
14138         printf("\\Kba80_help       Transmit BA80: Help\n");
14139         break;
14140     case K_BA80_HOME:
14141         printf("\\Kba80_home       Transmit BA80: Home\n");
14142         break;
14143     case K_BA80_INS:
14144         printf("\\Kba80_ins        Transmit BA80: Insert\n");
14145         break;
14146     case K_BA80_INS_B:
14147         printf("\\Kba80_ins_b      Transmit BA80: Insert B\n");
14148         break;
14149     case K_BA80_MARK:
14150         printf("\\Kba80_mark       Transmit BA80: Mark\n");
14151         break;
14152     case K_BA80_MOVE:
14153         printf("\\Kba80_move       Transmit BA80: Move\n");
14154         break;
14155     case K_BA80_PA01:
14156         printf("\\Kba80_pa01       Transmit BA80: PA1\n");
14157         break;
14158     case K_BA80_PA02:
14159         printf("\\Kba80_pa02       Transmit BA80: PA2\n");
14160         break;
14161     case K_BA80_PA03:
14162         printf("\\Kba80_pa03       Transmit BA80: PA3\n");
14163         break;
14164     case K_BA80_PA04:
14165         printf("\\Kba80_pa04       Transmit BA80: PA4\n");
14166         break;
14167     case K_BA80_PA05:
14168         printf("\\Kba80_pa05       Transmit BA80: PA5\n");
14169         break;
14170     case K_BA80_PA06:
14171         printf("\\Kba80_pa06       Transmit BA80: PA6\n");
14172         break;
14173     case K_BA80_PA07:
14174         printf("\\Kba80_pa07       Transmit BA80: PA7\n");
14175         break;
14176     case K_BA80_PA08:
14177         printf("\\Kba80_pa08       Transmit BA80: PA8\n");
14178         break;
14179     case K_BA80_PA09:
14180         printf("\\Kba80_pa09       Transmit BA80: PA9\n");
14181         break;
14182     case K_BA80_PA10:
14183         printf("\\Kba80_pa10       Transmit BA80: PA10\n");
14184         break;
14185     case K_BA80_PA11:
14186         printf("\\Kba80_pa11       Transmit BA80: PA11\n");
14187         break;
14188     case K_BA80_PA12:
14189         printf("\\Kba80_pa12       Transmit BA80: PA12\n");
14190         break;
14191     case K_BA80_PA13:
14192         printf("\\Kba80_pa13       Transmit BA80: PA13\n");
14193         break;
14194     case K_BA80_PA14:
14195         printf("\\Kba80_pa14       Transmit BA80: PA14\n");
14196         break;
14197     case K_BA80_PA15:
14198         printf("\\Kba80_pa15       Transmit BA80: PA15\n");
14199         break;
14200     case K_BA80_PA16:
14201         printf("\\Kba80_pa16       Transmit BA80: PA16\n");
14202         break;
14203     case K_BA80_PA17:
14204         printf("\\Kba80_pa17       Transmit BA80: PA17\n");
14205         break;
14206     case K_BA80_PA18:
14207         printf("\\Kba80_pa18       Transmit BA80: PA18\n");
14208         break;
14209     case K_BA80_PA19:
14210         printf("\\Kba80_pa19       Transmit BA80: PA19\n");
14211         break;
14212     case K_BA80_PA20:
14213         printf("\\Kba80_pa20       Transmit BA80: PA20\n");
14214         break;
14215     case K_BA80_PA21:
14216         printf("\\Kba80_pa21       Transmit BA80: PA21\n");
14217         break;
14218     case K_BA80_PA22:
14219         printf("\\Kba80_pa22       Transmit BA80: PA22\n");
14220         break;
14221     case K_BA80_PA23:
14222         printf("\\Kba80_pa23       Transmit BA80: PA23\n");
14223         break;
14224     case K_BA80_PA24:
14225         printf("\\Kba80_pa24       Transmit BA80: PA24\n");
14226         break;
14227     case K_BA80_PGDN:
14228         printf("\\Kba80_pgdn       Transmit BA80: Page Down\n");
14229         break;
14230     case K_BA80_PGUP:
14231         printf("\\Kba80_pgup       Transmit BA80: Page Up\n");
14232         break;
14233     case K_BA80_PICK:
14234         printf("\\Kba80_pick       Transmit BA80: Pick\n");
14235         break;
14236     case K_BA80_PRINT:
14237         printf("\\Kba80_print      Transmit BA80: Print\n");
14238         break;
14239     case K_BA80_PUT:
14240         printf("\\Kba80_put        Transmit BA80: Put\n");
14241         break;
14242     case K_BA80_REFRESH:
14243         printf("\\Kba80_refresh    Transmit BA80: Refresh \n");
14244         break;
14245     case K_BA80_RESET:
14246         printf("\\Kba80_reset      Transmit BA80: Reset\n");
14247         break;
14248     case K_BA80_RUBOUT:
14249         printf("\\Kba80_rubout     Transmit BA80: Rubout\n");
14250         break;
14251     case K_BA80_SAVE:
14252         printf("\\Kba80_save       Transmit BA80: Save\n");
14253         break;
14254     case K_BA80_SOFTKEY1:
14255         printf("\\Kba80_softkey1   Transmit BA80: Softkey 1\n");
14256         break;
14257     case K_BA80_SOFTKEY2:
14258         printf("\\Kba80_softkey2   Transmit BA80: Softkey 2\n");
14259         break;
14260     case K_BA80_SOFTKEY3:
14261         printf("\\Kba80_softkey3   Transmit BA80: Softkey 3\n");
14262         break;
14263     case K_BA80_SOFTKEY4:
14264         printf("\\Kba80_softkey4   Transmit BA80: Softkey 4\n");
14265         break;
14266     case K_BA80_SOFTKEY5:
14267         printf("\\Kba80_softkey5   Transmit BA80: Softkey 5\n");
14268         break;
14269     case K_BA80_SOFTKEY6:
14270         printf("\\Kba80_softkey6   Transmit BA80: Softkey 6\n");
14271         break;
14272     case K_BA80_SOFTKEY7:
14273         printf("\\Kba80_softkey7   Transmit BA80: Softkey 7\n");
14274         break;
14275     case K_BA80_SOFTKEY8:
14276         printf("\\Kba80_softkey8   Transmit BA80: Softkey 8\n");
14277         break;
14278     case K_BA80_SOFTKEY9:
14279         printf("\\Kba80_softkey9   Transmit BA80: Softkey 9\n");
14280         break;
14281     case K_BA80_UNDO:
14282         printf("\\Kba80_undo       Transmit BA80: Undo\n");
14283         break;
14284 
14285         case  K_I31_F01:
14286         printf("\\Ki31_f01         Transmit IBM 31xx: F1\n");
14287         break;
14288        case  K_I31_F02:
14289         printf("\\Ki31_f02         Transmit IBM 31xx: F2\n");
14290         break;
14291        case  K_I31_F03:
14292         printf("\\Ki31_f03         Transmit IBM 31xx: F3\n");
14293         break;
14294        case  K_I31_F04:
14295         printf("\\Ki31_f04         Transmit IBM 31xx: F4\n");
14296         break;
14297        case  K_I31_F05:
14298         printf("\\Ki31_f05         Transmit IBM 31xx: F5\n");
14299         break;
14300        case  K_I31_F06:
14301         printf("\\Ki31_f06         Transmit IBM 31xx: F6\n");
14302         break;
14303        case  K_I31_F07:
14304         printf("\\Ki31_f07         Transmit IBM 31xx: F7\n");
14305         break;
14306        case  K_I31_F08:
14307         printf("\\Ki31_f08         Transmit IBM 31xx: F8\n");
14308         break;
14309        case  K_I31_F09:
14310         printf("\\Ki31_f09         Transmit IBM 31xx: F9\n");
14311         break;
14312        case  K_I31_F10:
14313         printf("\\Ki31_f10         Transmit IBM 31xx: F10\n");
14314         break;
14315        case  K_I31_F11:
14316         printf("\\Ki31_f11         Transmit IBM 31xx: F11\n");
14317         break;
14318        case  K_I31_F12:
14319         printf("\\Ki31_f12         Transmit IBM 31xx: F12\n");
14320         break;
14321        case  K_I31_F13:
14322         printf("\\Ki31_f13         Transmit IBM 31xx: F13\n");
14323         break;
14324        case  K_I31_F14:
14325         printf("\\Ki31_f14         Transmit IBM 31xx: F14\n");
14326         break;
14327        case  K_I31_F15:
14328         printf("\\Ki31_f15         Transmit IBM 31xx: F15\n");
14329         break;
14330        case  K_I31_F16:
14331         printf("\\Ki31_f16         Transmit IBM 31xx: F16\n");
14332         break;
14333        case  K_I31_F17:
14334         printf("\\Ki31_f17         Transmit IBM 31xx: F17\n");
14335         break;
14336        case  K_I31_F18:
14337         printf("\\Ki31_f18         Transmit IBM 31xx: F18\n");
14338         break;
14339        case  K_I31_F19:
14340         printf("\\Ki31_f19         Transmit IBM 31xx: F19\n");
14341         break;
14342        case  K_I31_F20:
14343         printf("\\Ki31_f20         Transmit IBM 31xx: F20\n");
14344         break;
14345        case  K_I31_F21:
14346         printf("\\Ki31_f21         Transmit IBM 31xx: F21\n");
14347         break;
14348        case  K_I31_F22:
14349         printf("\\Ki31_f22         Transmit IBM 31xx: F22\n");
14350         break;
14351        case  K_I31_F23:
14352         printf("\\Ki31_f23         Transmit IBM 31xx: F23\n");
14353         break;
14354        case  K_I31_F24:
14355         printf("\\Ki31_f24         Transmit IBM 31xx: F24\n");
14356         break;
14357        case  K_I31_F25:
14358         printf("\\Ki31_f25         Transmit IBM 31xx: F25\n");
14359         break;
14360        case  K_I31_F26:
14361         printf("\\Ki31_f26         Transmit IBM 31xx: F26\n");
14362         break;
14363        case  K_I31_F27:
14364         printf("\\Ki31_f27         Transmit IBM 31xx: F27\n");
14365         break;
14366        case  K_I31_F28:
14367         printf("\\Ki31_f28         Transmit IBM 31xx: F28\n");
14368         break;
14369        case  K_I31_F29:
14370         printf("\\Ki31_f29         Transmit IBM 31xx: F29\n");
14371         break;
14372        case  K_I31_F30:
14373         printf("\\Ki31_f30         Transmit IBM 31xx: F30\n");
14374         break;
14375        case  K_I31_F31:
14376         printf("\\Ki31_f31         Transmit IBM 31xx: F31\n");
14377         break;
14378        case  K_I31_F32:
14379         printf("\\Ki31_f32         Transmit IBM 31xx: F32\n");
14380         break;
14381        case  K_I31_F33:
14382         printf("\\Ki31_f33         Transmit IBM 31xx: F33\n");
14383         break;
14384        case  K_I31_F34:
14385         printf("\\Ki31_f34         Transmit IBM 31xx: F34\n");
14386         break;
14387        case  K_I31_F35:
14388         printf("\\Ki31_f35         Transmit IBM 31xx: F35\n");
14389         break;
14390        case  K_I31_F36:
14391         printf("\\Ki31_f36         Transmit IBM 31xx: F36\n");
14392         break;
14393        case  K_I31_PA1:
14394         printf("\\Ki31_pa1         Transmit IBM 31xx: PA1\n");
14395         break;
14396        case  K_I31_PA2:
14397         printf("\\Ki31_pa2         Transmit IBM 31xx: PA2\n");
14398         break;
14399        case  K_I31_PA3:
14400         printf("\\Ki31_pa3         Transmit IBM 31xx: PA3\n");
14401         break;
14402        case  K_I31_RESET:
14403         printf("\\Ki31_reset       Transmit IBM 31xx: Reset\n");
14404         break;
14405        case  K_I31_JUMP:
14406         printf("\\Ki31_jump        Transmit IBM 31xx: Jump\n");
14407         break;
14408        case  K_I31_CLEAR:
14409         printf("\\Ki31_clear       Transmit IBM 31xx: Clear\n");
14410         break;
14411        case  K_I31_ERASE_EOF:
14412         printf("\\Ki31_erase_eof   Transmit IBM 31xx: Erase to End of Field\n");
14413         break;
14414        case  K_I31_ERASE_EOP:
14415         printf("\\Ki31_eop         Transmit IBM 31xx: Erase to End of Page\n");
14416         break;
14417        case  K_I31_ERASE_INP:
14418         printf("\\Ki31_inp         Transmit IBM 31xx: Erase Input Operation\n");
14419         break;
14420        case  K_I31_INSERT_CHAR:
14421         printf("\\Ki31_ins_char    Transmit IBM 31xx: Insert Character\n");
14422         break;
14423        case  K_I31_INSERT_SPACE:
14424         printf("\\Ki31_ins_space   Transmit IBM 31xx: Insert Space\n");
14425         break;
14426        case  K_I31_DELETE:
14427         printf("\\Ki31_delete      Transmit IBM 31xx: Delete Character\n");
14428         break;
14429        case  K_I31_INS_LN:
14430         printf("\\Ki31_ins_line    Transmit IBM 31xx: Insert Line\n");
14431         break;
14432        case  K_I31_DEL_LN:
14433         printf("\\Ki31_del_ln      Transmit IBM 31xx: Delete Line\n");
14434         break;
14435        case  K_I31_PRINT_LINE:
14436         printf("\\Ki31_prt_line    Transmit IBM 31xx: Print Line\n");
14437         break;
14438        case  K_I31_PRINT_MSG:
14439         printf("\\Ki31_prt_msg     Transmit IBM 31xx: Print Message\n");
14440         break;
14441        case  K_I31_PRINT_SHIFT:
14442         printf("\\Ki31_prt_shift   Transmit IBM 31xx: Print Shift\n");
14443         break;
14444        case  K_I31_CANCEL:
14445         printf("\\Ki31_cancel      Transmit IBM 31xx: Cancel\n");
14446         break;
14447        case  K_I31_SEND_LINE:
14448         printf("\\Ki31_send_line   Transmit IBM 31xx: Send Line\n");
14449         break;
14450        case  K_I31_SEND_MSG:
14451         printf("\\Ki31_send_msg    Transmit IBM 31xx: Send Message\n");
14452         break;
14453        case  K_I31_SEND_PAGE:
14454         printf("\\Ki31_send_page   Transmit IBM 31xx: Send Page\n");
14455         break;
14456        case  K_I31_HOME:
14457         printf("\\Ki31_home        Transmit IBM 31xx: Home\n");
14458         break;
14459        case  K_I31_BACK_TAB:
14460         printf("\\Ki31_back_tab    Transmit IBM 31xx: Back Tab\n");
14461         break;
14462        case  K_SUN_STOP:
14463         printf("\\Ksunstop         Transmit SUN Console: Stop\n");
14464         break;
14465        case  K_SUN_AGAIN:
14466         printf("\\Ksunagain        Transmit SUN Console: Again\n");
14467         break;
14468        case  K_SUN_PROPS:
14469         printf("\\Ksunprops        Transmit SUN Console: Props\n");
14470         break;
14471        case  K_SUN_UNDO:
14472         printf("\\Ksunundo         Transmit SUN Console: Undo\n");
14473         break;
14474        case  K_SUN_FRONT:
14475         printf("\\Ksunfront        Transmit SUN Console: Front\n");
14476         break;
14477        case  K_SUN_COPY:
14478         printf("\\Ksuncopy         Transmit SUN Console: Copy\n");
14479         break;
14480        case  K_SUN_OPEN:
14481         printf("\\Ksunopen         Transmit SUN Console: Open\n");
14482         break;
14483        case  K_SUN_PASTE:
14484         printf("\\Ksunpaste        Transmit SUN Console: Paste\n");
14485         break;
14486        case  K_SUN_FIND:
14487         printf("\\Ksunfind         Transmit SUN Console: Find\n");
14488         break;
14489        case  K_SUN_CUT:
14490         printf("\\Ksuncut          Transmit SUN Console: Cut\n");
14491         break;
14492        case  K_SUN_HELP:
14493         printf("\\Ksunhelp         Transmit SUN Console: Help\n");
14494         break;
14495 
14496        default:
14497         printf("No additional help available for this kverb\n");
14498   }
14499     printf("\n");
14500 
14501     /* This is not the proper way to do it since it doesn't show  */
14502     /* all emulations, nor does it show the special modes, but it */
14503     /* is better than nothing.                                    */
14504 
14505     printf("Current bindings:\n");
14506     found = 0;
14507     for (i = 256; i < KMSIZE ; i++) {
14508         con_event evt = mapkey(i);
14509         if (evt.type != kverb)
14510           continue;
14511         if ((evt.kverb.id & ~F_KVERB) == xx) {
14512             found = 1;
14513             printf("  \\%-4d - %s\n",i,keyname(i));
14514         }
14515     }
14516 #ifdef OS2MOUSE
14517     for ( button = 0 ; button < MMBUTTONMAX ; button++ )
14518       for ( event = 0 ; event < MMEVENTSIZE ; event++ )
14519         if ( mousemap[button][event].type == kverb ) {
14520             if ( (mousemap[button][event].kverb.id & ~F_KVERB) == xx ) {
14521                 found = 1;
14522                 printf("  Mouse - %s\n",mousename(button,event));
14523             }
14524         }
14525 #endif /* OS2MOUSE */
14526 
14527     if ( !found ) {
14528         printf("  (none)\n");
14529     }
14530     return(0);
14531 }
14532 #endif /* NOKVERBS */
14533 #endif /* OS2 */
14534 
14535 #ifndef NOXFER
14536 /*  D O H R M T  --  Give help about REMOTE command  */
14537 
14538 static char *hrset[] = {
14539 "Syntax:  REMOTE SET parameter value",
14540 "Example: REMOTE SET FILE TYPE BINARY",
14541 "  Asks the Kermit server to set the named parameter to the given value.",
14542 "  Equivalent to typing the corresponding SET command directly to the other",
14543 "  Kermit if it were in interactive mode.", "" };
14544 
14545 int
dohrmt(xx)14546 dohrmt(xx) int xx; {
14547     int x;
14548     if (xx == -3) return(hmsga(hmhrmt));
14549     if (xx < 0) return(xx);
14550     if ((x = cmcfm()) < 0) return(x);
14551     switch (xx) {
14552 
14553 case XZCPY:
14554     return(hmsg("Syntax: REMOTE COPY source destination\n\
14555   Asks the Kermit server to copy the source file to destination.\n\
14556   Synonym: RCOPY."));
14557 
14558 case XZCWD:
14559 #ifdef NEWFTP
14560     return(hmsg("Syntax: REMOTE CD [ name ]\n\
14561   Asks the Kermit or FTP server to change its working directory or device.\n\
14562   If the device or directory name is omitted, restore the default.\n\
14563   Synonym: RCD."));
14564 #else
14565     return(hmsg("Syntax: REMOTE CD [ name ]\n\
14566   Asks the Kermit server to change its working directory or device.\n\
14567   If the device or directory name is omitted, restore the default.\n\
14568   Synonym: RCD."));
14569 #endif /* NEWFTP */
14570 
14571 case XZDEL:
14572 #ifdef NEWFTP
14573     return(hmsg("Syntax: REMOTE DELETE filespec\n\
14574   Asks the Kermit or FTP server to delete the named file(s).\n\
14575   Synonym: RDEL."));
14576 #else
14577     return(hmsg("Syntax: REMOTE DELETE filespec\n\
14578   Asks the Kermit server to delete the named file(s).\n\
14579   Synonym: RDEL."));
14580 #endif /* NEWFTP */
14581 
14582 case XZMKD:
14583 #ifdef NEWFTP
14584     return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
14585   Asks the Kermit or FTP server to create the named directory.\n\
14586   Synonym: RMKDIR."));
14587 #else
14588     return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
14589   Asks the Kermit server to create the named directory.\n\
14590   Synonym: RMKDIR."));
14591 #endif /* NEWFTP */
14592 
14593 case XZRMD:
14594 #ifdef NEWFTP
14595     return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
14596   Asks the Kermit or FTP server to remove the named directory.\n\
14597   Synonym: RRMDIR."));
14598 #else
14599     return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
14600   Asks the Kermit server to remove the named directory.\n\
14601   Synonym: RRMDIR."));
14602 #endif /* NEWFTP */
14603 
14604 case XZDIR:
14605 #ifdef NEWFTP
14606     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
14607   Asks the Kermit or FTP server to provide a directory listing of the named\n\
14608   file(s) or if no file specification is given, of all files in its current\n\
14609   directory.  Synonym: RDIR."));
14610 #else
14611     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
14612   Asks the Kermit server to provide a directory listing of the named\n\
14613   file(s) or if no file specification is given, of all files in its current\n\
14614   directory.  Synonym: RDIR."));
14615 #endif /* NEWFTP */
14616 
14617 case XZHLP:
14618 #ifdef NEWFTP
14619     return(hmsg("Syntax: REMOTE HELP\n\
14620   Asks the Kermit or FTP server to list the services it provides.\n\
14621   Synonym: RHELP."));
14622 #else
14623     return(hmsg("Syntax: REMOTE HELP\n\
14624   Asks the Kermit server to list the services it provides.\n\
14625   Synonym: RHELP."));
14626 #endif /* NEWFTP */
14627 
14628 case XZHOS:
14629     return(hmsg("Syntax: REMOTE HOST command\n\
14630   Sends a command to the other computer in its own command language\n\
14631   through the Kermit server that is running on that host.  Synonym: RHOST."));
14632 
14633 #ifndef NOFRILLS
14634 case XZKER:
14635     return(hmsg("Syntax: REMOTE KERMIT command\n\
14636   Sends a command to the remote Kermit server in its own command language.\n\
14637   Synonym: RKERMIT."));
14638 
14639 case XZLGI:
14640     return(hmsg("Syntax: REMOTE LOGIN user password [ account ]\n\
14641   Logs in to a remote Kermit server that requires you login.  Note: RLOGIN\n\
14642   is NOT a synonym for REMOTE LOGIN."));
14643 
14644 case XZLGO:
14645     return(hmsg("Syntax: REMOTE LOGOUT\n\
14646   Logs out from a remote Kermit server to which you have previously logged in."
14647 ));
14648 
14649 case XZMSG:
14650     return(hmsg("Syntax: REMOTE MESSAGE text\n\
14651   Sends a short text message to the remote Kermit server."));
14652 
14653 case XZPRI:
14654     return(hmsg("Syntax: REMOTE PRINT filespec [ options ]\n\
14655   Sends the specified file(s) to the remote Kermit and ask it to have the\n\
14656   file printed on the remote system's printer, using any specified options.\n\
14657   Synonym: RPRINT."));
14658 #endif /* NOFRILLS */
14659 
14660 case XZREN:
14661 #ifdef NEWFTP
14662     return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
14663   Asks the Kermit or FTP server to rename the file.  Synonym: RRENAME."));
14664 #else
14665     return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
14666   Asks the Kermit server to rename the file.  Synonym: RRENAME."));
14667 #endif /* NEWFTP */
14668 
14669 case XZSET:
14670     return(hmsga(hrset));
14671 
14672 case XZSPA:
14673     return(hmsg("Syntax: REMOTE SPACE [ name ]\n\
14674   Asks the Kermit server to tell you about its disk space on the current\n\
14675   disk or directory, or in the one that you name.  Synonym: RSPACE."));
14676 
14677 #ifndef NOFRILLS
14678 case XZTYP:
14679 #ifdef NEWFTP
14680     return(hmsg("Syntax: REMOTE TYPE file\n\
14681   Asks the Kermit or FTP server to send the named file to your screen.\n\
14682   Synonym: RTYPE."));
14683 #else
14684     return(hmsg("Syntax: REMOTE TYPE file\n\
14685   Asks the Kermit server to send the named file(s) to your screen.\n\
14686   Synonym: RTYPE."));
14687 #endif /* NEWFTP */
14688 
14689 
14690 case XZWHO:
14691     return(hmsg("Syntax: REMOTE WHO [ name ]\n\
14692   Asks the Kermit server to list who's logged in, or to give information\n\
14693   about the named user.  Synonym: RWHO."));
14694 #endif /* NOFRILLS */
14695 
14696 #ifndef NOSPL
14697 case XZQUE:
14698     return(hmsg(
14699 "Syntax: [ REMOTE ] QUERY { KERMIT, SYSTEM, USER } variable-name\n\
14700   Asks the Kermit server to send the value of the named variable of the\n\
14701   given type, and make it available in the \\v(query) variable.  When the\n\
14702   type is KERMIT functions may also be specified as if they were variables."));
14703 
14704 case XZASG:
14705     return(hmsg(
14706 "Syntax: REMOTE ASSIGN variable-name [ value ]\n\
14707   Assigns the given value to the named global variable on the server.\n\
14708   Synonyms: RASG, RASSIGN."));
14709 #endif /* NOSPL */
14710 
14711 case XZPWD:
14712     return(hmsg(
14713 #ifdef NEWFTP
14714 "Syntax: REMOTE PWD\n\
14715   Asks the Kermit server to display its current working directory.\n\
14716   Synonym: RPWD."));
14717 #else
14718 "Syntax: REMOTE PWD\n\
14719   Asks the Kermit or FTP server to display its current working directory.\n\
14720   Synonym: RPWD."));
14721 #endif /* NEWFTP */
14722 
14723 case XZXIT:
14724 #ifdef NEWFTP
14725     return(hmsg("Syntax: REMOTE EXIT\n\
14726    Asks the Kermit server to exit (without disconnecting), or closes an FTP\n\
14727    connection.  Synonym: REXIT, and (for FTP only) BYE, FTP BYE."));
14728 #else
14729     return(hmsg("Syntax: REMOTE EXIT\n\
14730   Asks the Kermit server to exit.  Synonym: REXIT."));
14731 #endif /* NEWFTP */
14732 
14733 default:
14734     if ((x = cmcfm()) < 0) return(x);
14735     printf("?Sorry, no help available - \"%s\"\n",cmdbuf);
14736     return(-9);
14737     }
14738 }
14739 #endif /* NOXFER */
14740 #endif /* NOHELP */
14741 #endif /* NOICP */
14742