1: /*  C K U U S 2  --  User interface STRINGS & help module for C-Kermit  */
   2: 
   3: /*
   4:   Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),
   5:   Columbia University Center for Computing Activities.
   6:   First released January 1985.
   7:   Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New
   8:   York.  Permission is granted to any individual or institution to use this
   9:   software as long as it is not sold for profit.  This copyright notice must be
  10:   retained.  This software may not be included in commercial products without
  11:   written permission of Columbia University.
  12: */
  13: 
  14: /*
  15:  This module separates long strings from the body of the other ckuus* modules.
  16: */
  17: 
  18: #include "ckcdeb.h"
  19: #include "ckcnet.h"
  20: #include "ckcasc.h"
  21: #include "ckcker.h"
  22: #include "ckuusr.h"
  23: #include "ckcxla.h"
  24: 
  25: extern char *ccntab[];
  26: 
  27: #ifndef NOICP
  28: #ifdef DCMDBUF
  29: extern char *cmdbuf;
  30: #else
  31: extern char cmdbuf[];
  32: #endif /* DCMDBUF */
  33: #endif /* NOICP */
  34: 
  35: #ifdef DEBUG
  36: extern char debfil[];
  37: #endif /* DEBUG */
  38: #ifdef TLOG
  39: extern char trafil[];
  40: #endif
  41: 
  42: extern char *xarg0;
  43: extern int nrmt, nprm, dfloc, local, parity, duplex, escape;
  44: extern int turn, flow;
  45: extern int binary, warn, quiet, keep;
  46: extern int success;
  47: 
  48: extern long speed;
  49: extern char *dftty, *versio, *ckxsys;
  50: extern struct keytab prmtab[];
  51: extern struct keytab remcmd[];
  52: 
  53: /* Command-Line help (Unix command-line arguments) */
  54: 
  55: #ifndef NOCMDL
  56: static
  57: char *hlp1[] = {
  58: #ifndef NOICP
  59: " [cmdfile] [-x arg [-x arg]...[-yyy]..] [ = text ] ]\n",
  60: #else
  61: "[-x arg [-x arg]...[-yyy]..]\n",
  62: #endif
  63: "  -x is an option requiring an argument, -y an option with no argument.\n",
  64: #ifndef NOICP
  65: #ifndef NOSPL
  66: "     = means ignore following words, but place in array \\&@[].\n",
  67: #else
  68: "     = means ignore following material.\n",
  69: #endif /* NOSPL */
  70: #else
  71: "     = means ignore following material.\n",
  72: #endif /* NOICP */
  73: "actions:\n",
  74: "  -s files  send files                    -r  receive files\n",
  75: "  -s -      send files from stdin         -k  receive files to stdout\n",
  76: #ifndef NOSERVER
  77: "  -x        enter server mode             -f  finish remote server\n\n",
  78: #else
  79: "  -f        finish remote server\n\n",
  80: #endif /* NOSERVER */
  81: "  -g files  get remote files from server (quote wildcards)\n",
  82: "  -a name   alternate file name, used with -s, -r, -g\n",
  83: "  -c        connect (before file transfer), used with -l and -b\n",
  84: "  -n        connect (after file transfer), used with -l and -b\n\n",
  85: "settings:\n",
  86: "  -l line   communication line device     -q   quiet during file transfer\n",
  87: #ifdef NETCONN
  88: "  -j host   network host name             -i   binary file transfer\n",
  89: #else
  90: "  -i        binary file transfer\n",
  91: #endif /* NETCONN */
  92: "  -b bps    line speed, e.g. 2400         -t   half duplex, xon handshake\n",
  93: #ifdef DEBUG
  94: "  -p x      parity, x = e,o,m,s, or n     -d   log debug info to debug.log\n",
  95: #else
  96: "  -p x      parity, x = e,o,m,s, or n\n",
  97: #endif /* DEBUG */
  98: #ifndef NOICP
  99: "  -y name   alternate init file name      -w   write over files\n",
 100: #else
 101: "  -w        write over files\n",
 102: #endif /* NOICP */
 103: "  -e n      receive packet length         -v n window size\n",
 104: #ifndef NODIAL
 105: "  -m name   modem type                    -z   force foreground\n",
 106: #else
 107: "  -z        force foreground\n",
 108: #endif /* NODIAL */
 109: #ifdef SUNX25
 110: "  -X  X.25 address              -o index  X.25 closed user group call\n",
 111: "  -u  X.25 reverse charge call  -U string X.25 call user data\n",
 112: #endif /* SUNX25 */
 113: #ifdef NOICP
 114: "Interactive command parser removed.\n",
 115: #else
 116: "If no action command is included, or -S is, enter interactive dialog.\n",
 117: #endif
 118: ""
 119: };
 120: 
 121: /*  U S A G E */
 122: 
 123: VOID
 124: usage() {
 125: #ifndef MINIX
 126: #ifdef NOICP
 127: #endif /* NOICP */
 128:     conol("Usage: ");
 129:     conol(xarg0);
 130:     conola(hlp1);
 131: #else
 132:     conol("Usage: ");
 133:     conol(xarg0);
 134:     conol(" [-x arg [-x arg]...[-yyy]..] ]\n");
 135: #endif /* MINIX */
 136: }
 137: #endif /* NOCMDL */
 138: 
 139: #ifndef NOICP
 140: 
 141: /*  Interactive help strings  */
 142: 
 143: static char *tophlp[] = {
 144: "Trustees of Columbia University in the City of New York.\n",
 145: 
 146: #ifndef NOHELP
 147: "Type INTRO for an introduction to C-Kermit, press ? for a list of commands.",
 148: "Type HELP followed by a command name for help about a specific command.",
 149: #else
 150: "Type ? for a list of commands; see documentation for detailed descriptions.",
 151: #endif /* NOHELP */
 152: "While typing commands, you may use the following special characters:",
 153: " DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
 154: " CTRL-W:  Delete the most recent word typed.",
 155: " CTRL-U:  Delete the current line.",
 156: " CTRL-R:  Redisplay the current line.",
 157: " ?        (question mark) Display a menu for the current command field.",
 158: " ESC      (or TAB) Attempt to complete the current field.",
 159: " \\        (backslash) include the following character literally",
 160: #ifndef NOSPL
 161: "          or introduce a backslash code, variable, or function.\n",
 162: #else
 163: "          or introduce a numeric backslash code.\n",
 164: #endif /* NOSPL */
 165: 
 166: "Command words other than filenames can be abbreviated in most contexts.",
 167: #ifndef NOCMDL
 168: "From system level, type \"kermit -h\" for help about command-line options.",
 169: #endif /* NOCMDL */
 170: " ",
 171: #ifdef MAC
 172: "Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and",
 173: "Christine M. Gianone. Digital Press ISBN: 1-55558-108-0; Prentice-Hall ISBN:",
 174: "0-13-037490-3.  DECdirect:+1-800-344-4825, Order # EY-J896E-DP, US $34.95,",
 175: "January 1993.  Macintosh-specific documentation is in preparation.",
 176: #else
 177: "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
 178: "Digital Press.  DP ISBN: 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3.",
 179: "DECdirect: +1-800-344-4825, Order Number EY-J896E-DP, US $34.95, Jan 1993.",
 180: #endif /* MAC */
 181: ""
 182: };
 183: 
 184: #ifndef NOHELP
 185: char *introtxt[] = {
 186: "Welcome to C-Kermit communications software for:",
 187: " . Error-free file transfer",
 188: " . Terminal connection",
 189: #ifndef NOSPL
 190: " . Script programming",
 191: #endif /* NOSPL */
 192: #ifndef NOICS
 193: " . International character set conversion",
 194: #endif /* NOICS */
 195: "\nSupporting:",
 196: " . Serial connections, direct or dialed.",
 197: #ifndef NODIAL
 198: " . Automatic modem dialing",
 199: #endif /* NODIAL */
 200: #ifdef TCPSOCKET
 201: " . TCP/IP network connections",
 202: #endif /* TCPSOCKET */
 203: #ifdef SUNX25
 204: " . X.25 network connections",
 205: #endif /* SUNX25 */
 206: #ifdef OS2
 207: #ifdef DECNET
 208: " . DECnet/PATHWORKS LAT Ethernet connections",
 209: "   (if you have PATHWORKS installed on your OS/2 system)",
 210: #endif /* DECNET */
 211: #ifdef NPIPE
 212: " . Microsoft LAN Manager named-pipe network connections",
 213: "   (if you have LAN Manager installed on your OS/2 system)",
 214: #endif /* NPIPE */
 215: #endif /* OS2 */
 216: " . UNIX, VAX/VMS, OS/2, AOS/VS, OS-9, Commodore Amiga, Atari ST.",
 217: "\nBasic C-Kermit commands:",
 218: "  EXIT          exit from C-Kermit",
 219: "  HELP          request help about a command",
 220: "  TAKE          execute commands from a file",
 221: 
 222: "\nCommands for file transfer:",
 223: "  SEND          send files",
 224: "  RECEIVE       receive files",
 225: "  SERVER        be a file transfer server",
 226: 
 227: "\nEssential settings:",
 228: "  SET PARITY    communications parity",
 229: "  SET FLOW      communications flow control, such as XON/XOFF",
 230: "  SET FILE      file settings, for example TYPE TEXT or TYPE BINARY",
 231: 
 232: "\nTo make a direct serial connection:",
 233: "  SET LINE      select serial communication device",
 234: "  SET SPEED     select communication speed   ",
 235: "  CONNECT       begin terminal connection",
 236: 
 237: #ifndef NODIAL
 238: "\nTo dial out with a modem:",
 239: "  SET MODEM     select modem type",
 240: "  SET LINE      select serial communication device",
 241: "  SET SPEED     select communication speed   ",
 242: "  DIAL          dial ",
 243: "  CONNECT       begin terminal connection",
 244: #endif /* NODIAL */
 245: 
 246: #ifdef NETCONN
 247: "\nTo make a network connection:",
 248: "  SET NETWORK   select network type",
 249: "  SET HOST      select network host",
 250: "  CONNECT       begin terminal connection",
 251: #ifdef TNCODE
 252: "  TELNET        select a TCP/IP host and CONNECT to it",
 253: #endif /* TNCODE */
 254: #endif /* NETCONN */
 255: 
 256: "\nTo return from a terminal connection to the C-Kermit prompt:",
 257: "  Type your escape character followed by the letter C.",
 258: 
 259: "\nTo display your escape character:",
 260: "  SHOW ESCAPE",
 261: 
 262: "\nTo display other settings:",
 263: "  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
 264: 
 265: "\nFor further information about a particular command, type HELP xxx,",
 266: "where xxx is the name of the command.  For documentation, news of new",
 267: "releases, and information about other Kermit software, contact:\n",
 268: "  Kermit Distribution        E-mail:",
 269: "  Columbia University        kermit@columbia.edu (Internet)",
 270: "  612 West 115th Street      KERMIT@CUVMA (BITNET/EARN)",
 271: "  New York, NY 10025 USA",
 272: "  Phone: (212) 854-3703      Fax: (212) 662-6442",
 273: ""
 274: };
 275: 
 276: static char *hmxxbye = "Syntax: BYE\n\
 277: Shut down and log out a remote Kermit server";
 278: 
 279: static char *hmxxclo[] = {
 280: "Syntax:  CLOSE name",
 281: "Example: CLOSE SESSION\n",
 282: "Close one of the following logs or files:",
 283: "  SESSION",
 284: #ifdef TLOG
 285: "  TRANSACTION",
 286: #endif /* TLOG */
 287: "  PACKET",
 288: #ifdef DEBUG
 289: "  DEBUGGING",
 290: #endif /* DEBUG */
 291: #ifndef NOSPL
 292: "  READ",
 293: "  WRITE",
 294: #endif /* NOSPL */
 295: "Type HELP LOG and HELP OPEN for further info.", "" };
 296: 
 297: static char *hmxxcon = "Syntax: CONNECT (or C)\n\n\
 298: Connect to a remote computer via the tty device given in the most recent\n\
 299: SET LINE command, or the network host named in the most recent SET HOST\n\
 300: command.  Type the escape character followed by C to get back, or followed\n\
 301: by ? for a list of CONNECT-mode escape commands.";
 302: 
 303: static char *hmxxget = "Syntax: GET filespec\n\
 304: Tell the remote Kermit server to send the named file or files.\n\
 305: If the filespec is omitted, then you are prompted for the remote and\n\
 306: local filenames separately.";
 307: 
 308: static char *hmxxlg[] = { "Syntax: LOG (or L) name [ { NEW, APPEND } ]",
 309: "Record information in a log file:\n",
 310: #ifdef DEBUG
 311: "DEBUGGING     Debugging information, to help track down bugs in the C-Kermit",
 312: "              program (default log name is debug.log).\n",
 313: #endif /* DEBUG */
 314: "PACKETS       Kermit packets, to help with protocol problems (packet.log)",
 315: "SESSION       Terminal session, during CONNECT command (session.log)",
 316: #ifdef TLOG
 317: "TRANSACTIONS  Names and statistics about files transferred (transact.log)\n",
 318: #endif /* TLOG */
 319: "If you include the APPEND keyword after the filename, the existing log file,",
 320: "if any, is appended to; otherwise a new file is created.",
 321: "" } ;
 322: 
 323: #ifndef NOSCRIPT
 324: static char *hmxxlogi[] = { "\
 325: Syntax: SCRIPT text\n",
 326: "Login to a remote system using the text provided.  The login script",
 327: "is intended to operate similarly to uucp \"L.sys\" entries.",
 328: "A login script is a sequence of the form:\n",
 329: "  expect send [expect send] . . .\n",
 330: "where 'expect' is a prompt or message to be issued by the remote site, and",
 331: "'send' is the names, numbers, etc, to return.  The send may also be the",
 332: "keyword EOT, to send control-d, or BREAK (or \\\\b), to send a break signal.",
 333: "Letters in send may be prefixed by ~ to send special characters.  These are:",
 334: "~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t",
 335: "append a return, and ~o[o[o]] for octal of a character.  As with some",
 336: "uucp systems, sent strings are followed by ~r unless they end with ~c.\n",
 337: "Only the last 7 characters in each expect are matched.  A null expect,",
 338: "e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect",
 339: "that a sequence might not arrive, as with uucp, conditional sequences",
 340: "may be expressed in the form:\n",
 341: "  -send-expect[-send-expect[...]]\n",
 342: "where dashed sequences are followed as long as previous expects fail.",
 343: "" };
 344: #endif
 345: 
 346: static char *hmxxrc[] = { "Syntax: RECEIVE (or R) [filespec]\n",
 347: "Wait for a file to arrive from the other Kermit, which must be given a",
 348: "SEND command.  If the optional filespec is given, the (first) incoming",
 349: "file will be stored under that name, otherwise it will be stored under",
 350: "the name it arrives with.",
 351: "" } ;
 352: 
 353: static char *hmxxsen = "\
 354: Syntax: SEND (or S) filespec [name]\n\n\
 355: Send the file or files specified by filespec.\n\
 356: filespec may contain wildcard characters '*' or '?'.  If no wildcards,\n\
 357: then 'name' may be used to specify the name 'filespec' is sent under; if\n\
 358: 'name' is omitted, the file is sent under its own name.";
 359: 
 360: #ifndef NOMSEND
 361: static char *hmssmse = "\
 362: Syntax: MSEND filespec [ filespec [ ... ] ]\n\n\
 363: Send the files specified by the filespecs.  One or more filespecs may be\n\
 364: listed, separated by spaces.  Any or all filespecs may contain wildcards\n\
 365: and they may be in different directories.  An alternate name cannot be given.";
 366: #endif /* NOMSEND */
 367: 
 368: #ifndef NOSERVER
 369: static char *hmxxser = "Syntax: SERVER\n\n\
 370: Enter server mode on the currently selected line.  All further commands\n\
 371: will be taken in packet form from the other Kermit program.  Use FINISH\n\
 372: or BYE to get C-Kermit out of server mode.";
 373: #endif /* NOSERVER */
 374: 
 375: static char *hmhset[] = { "\
 376: The SET command is used to establish various communication or file",
 377: "parameters.  The SHOW command can be used to display the values of",
 378: "SET parameters.  Help is available for each individual parameter;",
 379: "type HELP SET ? to see what's available.",
 380: "" } ;
 381: 
 382: #ifndef NOSETKEY
 383: static char *hmhskey[] = { "Syntax: SET KEY k text\n",
 384: "Map the key k to send 'text' when pressed during CONNECT mode.",
 385: "K can be expressed as decimal number or backslash code, 'text'",
 386: "can also contain any backslash code.  If 'text' has the length 1",
 387: "it is treated specially.  In some environments (OS/2, for example)",
 388: "that single character may be wider than 8 bits, if specified in",
 389: "backslash notation.  In this case, a scan code mapping takes place,",
 390: "i.e. key k takes over the function of the key whose scan code is",
 391: "assigned to k.  This may even be a controlling key for the CONNECT",
 392: "mode.  If 'text' is empty, the default key binding is restored for",
 393: "the key k.  SET KEY mappings take place before terminal character-set",
 394: "translation.",
 395: ""};
 396: #endif /* NOSETKEY */
 397: 
 398: static char *hmxychkt[] = { "Syntax: SET BLOCK-CHECK type\n",
 399: "Type of packet block check to be used for error detection, 1, 2, 3, or",
 400: "BLANK-FREE-2.  Type 1 is standard, and catches most errors.  Types 2 and 3",
 401: "specify more rigorous checking at the cost of higher overhead.  The",
 402: "BLANK-FREE-2 type is the same as Type 2, but is guaranteed to contain no",
 403: "blanks.",
 404: "" } ;
 405: 
 406: #ifndef NODIAL
 407: static char *hmxydial[] = {
 408: "SET DIAL DIAL-COMMAND [ text ]",
 409: "The 'text' replaces C-Kermit's built-in modem dialing command.  It must",
 410: "include '%s' (percent s) as a place-holder for the telephone numbers",
 411: "given in your DIAL commands.  If the 'text' is omitted, C-Kermit uses its",
 412: "built-in modem-specific dialing command.\n",
 413: "SET DIAL DIRECTORY filename",
 414: "Name of dialing directory file.  Type HELP DIAL for further info.\n",
 415: "SET DIAL DISPLAY {ON, OFF}",
 416: "Whether to display dialing progress on the screen.\n",
 417: "SET DIAL HANGUP {ON, OFF}",
 418: "Whether the DIAL command should hang up the phone before dialing.\n",
 419: "SET DIAL INIT-STRING [ text ]",
 420: "The 'text' is a replacement for C-Kermit's built-in initialization command",
 421: "for the modem.  If 'text' omitted, use built-in initialization command.\n",
 422: "SET DIAL KERMIT-SPOOF {ON, OFF}",
 423: "If the selected modem type supports the Kermit protocol directly,",
 424: "use this command to turn its Kermit protocol function on or off.\n",
 425: "SET DIAL MODEM-HANGUP {ON, OFF}",
 426: "Governs how the HANGUP, <esc>H, and similar operations work when you have",
 427: "a dialed connection (in local mode, and a specific modem type is set).",
 428: "ON means to use modem commands to hang up the phone, e.g. ATH0.",
 429: "OFF means to hang up by attempting to turn off the DTR signal.",
 430: "ON is not necessarily supported for all modem types.\n",
 431: "SET DIAL MNP-ENABLE {ON, OFF}",
 432: "Enable or disable MNP negotiation by the modem.\n",
 433: "SET DIAL PREFIX [ text ]",
 434: "Establish a prefix to be applied to the phone numbers given in the DIAL",
 435: "command or read from the dialing directory.\n",
 436: "SET DIAL SPEED-MATCHING {ON, OFF}",
 437: "ON (the default) means that C-Kermit changes its serial interface speed to",
 438: "agree with the speed reported by the modem's CONNECT message, if any.  OFF",
 439: "means that C-Kermit should not change its interface speed.\n",
 440: "SET DIAL TIMEOUT number",
 441: "How many seconds to wait for a dialed call to complete.  Use this command",
 442: "to override the DIAL command's automatic timeout calculation.  A value",
 443: "of 0 turns off this feature and returns to Kermit's automatic dial",
 444: "timeout calculation.\n",
 445: "Also see DIAL and SET MODEM.  Use SHOW DIAL to display dial-related",
 446: "settings.\n",
 447: "" } ;
 448: #endif /* NODIAL */
 449: 
 450: static char *hmxyflo[] = { "Syntax: SET FLOW value\n",
 451: "Type of flow control to use during file transfer and CONNECT mode.",
 452: "Choices: KEEP (don't change device's current setting), XON/XOFF (software",
 453: "flow control, the default), NONE (no flow control at all), and possibly",
 454: "others including RTS/CTS (hardware) depending on the capabilities of your",
 455: "system.  Type SET FLOW ? for a list.",
 456: ""};
 457: 
 458: static char *hmxyf[] = { "Syntax: SET FILE parameter value",
 459: "Parameters:\n",
 460: "TYPE: How file contents are to be treated during file transfer.",
 461: "TYPE is normally TEXT, with conversion of record format and character set.",
 462: "BINARY means to do no conversion.  Use BINARY for executable programs or",
 463: "binary data.  Example: SET FILE TYPE BINARY.\n",
 464: 
 465: #ifdef VMS
 466: "For VAX/VMS, you may include an optional record-format after the word",
 467: "BINARY.  This may be FIXED (the default) or UNDEFINED.",
 468: "Two additional VMS file types are also supported: IMAGE and LABELED.  IMAGE",
 469: "means raw block i/o, no interference from RMS, and applies to file transmis-",
 470: "sion only.  LABELED means to send or interpret RMS attributes with the file.",
 471: "\n",
 472: #endif /* VMS */
 473: 
 474: "BYTESIZE { 7, 8 }: normally 8.  If 7, truncate the 8th bit of all file \
 475: bytes.\n",
 476: 
 477: #ifndef NOCSETS
 478: "CHARACTER-SET: tells the encoding of the local file, ASCII by default.",
 479: "The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646",
 480: "national character sets.  LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1",
 481: "for Western European languages.",
 482: "NEXT is the 8-bit character set of the NeXT workstation.",
 483: "The CPnnn sets are for IBM PCs.  MACINTOSH-LATIN is for the Macintosh.",
 484: #ifndef NOLATIN2
 485: "LATIN2 is ISO 8859-2 for Eastern European languages that are written with",
 486: "Roman letters.",
 487: #endif /* NOLATIN2 */
 488: #ifdef CYRILLIC
 489: "KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.",
 490: "SHORT-KOI is a 7-bit ASCII coding for Cyrillic.",
 491: #endif /* CYRILLIC */
 492: #ifdef KANJI
 493: "JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI are Japanese",
 494: "Kanji character sets.",
 495: #endif /* KANJI */
 496: "Type SET FILE CHAR ? for a complete list of file character sets.\n",
 497: #endif /* NOCSETS */
 498: 
 499: "INCOMPLETE - what to do with an incompletely received file: DISCARD",
 500: "(default), or KEEP.\n",
 501: 
 502: "NAMES are normally CONVERTED to 'common form' during transmission; LITERAL",
 503: "means use filenames literally (useful between like systems).\n",
 504: 
 505: "COLLISION tells what to do when a file arrives that has the same name as",
 506: "an existing file.  The options are:",
 507: "  BACKUP (default) - Rename the old file to a new, unique name and store",
 508: "    the incoming file under the name it was sent with.",
 509: "  OVERWRITE - Overwrite (replace) the existing file.",
 510: "  APPEND - Append the incoming file to the end of the existing file.",
 511: "  DISCARD - Refuse and/or discard the incoming file.",
 512: "  RENAME - Give the incoming file a unique name.",
 513: "  UPDATE - Accept the incoming file only if it is newer than the existing",
 514: "    file.",
 515: "Example: SET FILE COLLISION UPDATE\n",
 516: 
 517: #ifdef VMS
 518: "RECORD-LENGTH sets the record length for received files of type BINARY. Use",
 519: "this to receive VMS BACKUP savesets or other fixed-format files. The default",
 520: "of 512 is suitable for executable (.EXE) files, etc.\n",
 521: "Example: SET FILE REC 8192\n",
 522: #endif /* VMS */
 523: 
 524: "SET FILE DISPLAY selects the format of the file transfer display for",
 525: "local-mode file transfer.  The choices are:",
 526: "  SERIAL (the default).  One dot is printed for every K bytes transferred.",
 527: "    This format works on any kind of terminal, even a hardcopy.",
 528: "  CRT.  Numbers are continuously updated on a single screen line.  This",
 529: "    format can be used on any video display terminal.",
 530: #ifdef CK_CURSES
 531: "  FULLSCREEN.  A fully formatted 24x80 screen showing lots of information.",
 532: "    This requires a video display terminal whose control sequences are",
 533: "    understood by Kermit.",
 534: #endif /* CK_CURSES */
 535: "  NONE.  No file transfer display at all.\n",
 536: 
 537: "WARNING.  SET FILE WARNING is superseded by the newer command, SET FILE",
 538: "COLLISION.  SET FILE WARNING ON is equivalent to SET FILE COLLISION RENAME",
 539: "and SET FILE WARNING OFF is equivalent to SET FILE COLLISION OVERWRITE.\n",
 540: 
 541: "" };
 542: 
 543: static char *hmxyhsh[] = { "Syntax: SET HANDSHAKE value\n",
 544: "Character to use for half duplex line turnaround handshake during file",
 545: "transfer.  C-Kermit waits for this character from the other computer before",
 546: "sending its next packet.  Default is NONE, others are XON, LF, BELL, ESC,",
 547: "etc.  SET HANDSHAKE CODE <n> lets you specify the numeric ASCII value of the",
 548: "handshake character.  Type SET HANDSH ? for a list.",
 549: "" };
 550: 
 551: #ifndef NOSERVER
 552: static char *hsetsrv[] = {"\
 553: SET SERVER DISPLAY {ON,OFF}",
 554: "Tell whether local-mode C-Kermit during server operation should put a",
 555: "file transfer display on the screen.  Default is OFF.\n",
 556: "SET SERVER TIMEOUT n",
 557: "Server command wait timeout interval, how often the C-Kermit server issues",
 558: "a NAK while waiting for a command packet.  Specify 0 for no NAKs at all.",
 559: "Default is 0.",
 560: "" };
 561: #endif /* NOSERVER */
 562: 
 563: static char *hmhrmt[] = { "\
 564: The REMOTE command is used to send file management instructions to a",
 565: "remote Kermit server.  There should already be a Kermit running in server",
 566: "mode on the other end of the currently selected line.  Type REMOTE ? to",
 567: "see a list of available remote commands.  Type HELP REMOTE x to get",
 568: "further information about a particular remote command 'x'.",
 569: "" } ;
 570: 
 571: #ifndef NOSPL
 572: static char *ifhlp[] = { "Syntax: IF [NOT] condition command\n",
 573: "If the condition is (is not) true, do the command.  Only one command may",
 574: "be given, and it must appear on the same line as the IF.  Conditions are:\n",
 575: "  SUCCESS    - the previous command succeeded",
 576: "  FAILURE    - the previous command failed",
 577: "  BACKGROUND - C-Kermit is running in the background",
 578: "  FOREGROUND - C-Kermit is running in the foreground\n",
 579: "  DEFINED variablename or macroname - The named variable or macro is defined",
 580: "  NUMERIC variable or constant      - The variable or constant is numeric",
 581: "  EXIST filename                    - The named file exists\n",
 582: "  COUNT   - subtract one from COUNT, execute the command if the result is",
 583: "            greater than zero (see SET COUNT)\n",
 584: "  EQUAL s1 s2 - s1 and s2 (character strings or variables) are equal",
 585: "  LLT s1 s2   - s1 is lexically (alphabetically) less than s2",
 586: "  LGT s1 s1   - s1 is lexically (alphabetically) greater than s2\n",
 587: "  = n1 n1 - n1 and n2 (numbers or variables containing numbers) are equal",
 588: "  < n1 n2 - n1 is arithmetically less than n2",
 589: "  > n1 n2 - n1 is arithmetically greater than n2\n",
 590: "The IF command may be followed on the next line by an ELSE command. Example:",
 591: "  IF < \\%x 10 ECHO It's less",
 592: "  ELSE echo It's not less\n",
 593: "See also XIF.",
 594: "" };
 595: #endif /* NOSPL */
 596: 
 597: #ifndef NOSPL
 598: static char *ifxhlp[] = { "\
 599: Syntax: XIF condition { commandlist } [ ELSE { commandlist } ]\n",
 600: "Extended IF command.  The conditions are the same as for IF (type HELP IF)",
 601: "but multiple comma-separated commands may be grouped within braces in both",
 602: "the IF and ELSE parts.  The ELSE part, if any, must be on the same line as",
 603: "the XIF (or use dash for line continuation).  Example:\n",
 604: "  XIF equal \\%a YES { echo OK, goto begin } ELSE { echo Not OK, stop }",
 605: "" };
 606: #endif /* NOSPL */
 607: 
 608: #ifndef NOSPL
 609: static char *forhlp[] = { "\
 610: Syntax: FOR variablename initial-value final-value increment { commandlist }",
 611: "\nFOR loop.  Execute the comma-separated commands in the commandlist the",
 612: "number of times given by the initial value, final value and increment.",
 613: "Example:  FOR \\%i 10 1 -1 { pause 1, echo \\%i }", "" };
 614: 
 615: static char *whihlp[] = { "\
 616: Syntax: WHILE condition { commandlist }",
 617: "\nWHILE loop.  Execute the comma-separated commands in the commandlist while",
 618: "the condition is true.  Conditions are the same as for IF commands.", "" };
 619: #endif /* NOSPL */
 620: 
 621: #ifndef NOSPL
 622: static char *openhlp[] = {
 623: "Syntax:  OPEN mode filename\n",
 624: "For use with READ and WRITE commands.  Open the local file in the specified",
 625: "mode: READ, WRITE, or APPEND.  !READ and !WRITE mean to read from or write",
 626: "to a system command rather than a file.  Examples:\n",
 627: "  OPEN READ oofa.txt",
 628: "  OPEN !READ sort foo.bar",
 629: "" };
 630: #endif /* NOSPL */
 631: 
 632: #ifndef NOSPL
 633: static char *hxxaskq[] = {
 634: "Syntax:  ASKQ variablename prompt",
 635: "Example: ASKQ %p { Password:}\n",
 636: "Issues the prompt and defines the variable to be whatever you type in.",
 637: "The characters that you type do not echo on the screen.",
 638: "Use braces to preserve leading and/or trailing spaces in the prompt.",
 639: "To include a question mark, precede it by backslash (\\).","" };
 640: #endif /* NOSPL */
 641: 
 642: #ifndef NOSPL
 643: static char *hxxask[] = {
 644: "Syntax:  ASK variablename prompt",
 645: "Example: ASK %n { What is your name\\? }\n",
 646: "Issues the prompt and defines the variable to be whatever you type in.",
 647: "Use braces to preserve leading and/or trailing spaces in the prompt.",
 648: "To include a question mark, precede it by backslash (\\).","" };
 649: #endif /* NOSPL */
 650: 
 651: #ifndef NOSPL
 652: static char *hxxdef[] = {
 653: "Syntax: DEFINE name [ definition ]\n",
 654: "Defines a macro or variable.  Its value is the definition, taken literally.",
 655: "No expansion or evaluation of the definition is done.  Thus if the",
 656: "definition includes any variable or function references, their names are",
 657: "included, rather than their values (compare with ASSIGN).  If the definition",
 658: "is omitted, then the named variable or macro is undefined.\n",
 659: "A typical macro definition looks like this:\n",
 660: "  DEFINE name command, command, command, ...\n",
 661: "for example:\n",
 662: "  DEFINE vax set parity even, set duplex full, set flow xon/xoff\n",
 663: "which defines a Kermit command macro called 'vax'.  The definition is a",
 664: "comma-separated list of Kermit commands.  Use the DO command to execute",
 665: "the macro, or just type its name, followed optionally by arguments.\n",
 666: "The definition of a variable can be anything at all, for example:\n",
 667: "  DEFINE \\%a Monday",
 668: "  DEFINE \\%b 3\n",
 669: "These variables can be used almost anywhere, for example:\n",
 670: "  ECHO Today is \\%a",
 671: "  SET BLOCK-CHECK \\%b",
 672: "" };
 673: #endif /* NOSPL */
 674: 
 675: #ifndef NOSPL
 676: static char *hxxass[] = {
 677: "Syntax:  ASSIGN variablename string.",
 678: "Example: ASSIGN \\%a My name is \\%b.\n",
 679: "Assigns the current value of the string to the variable (or macro).",
 680: "The definition string is fully evaluated before it is assigned, so that",
 681: "the values of any variables are contained are used, rather than their",
 682: "names.  Compare with DEFINE.  To illustrate the difference, try this:\n",
 683: "  DEFINE \\%a hello",
 684: "  DEFINE \\%x \\%a",
 685: "  ASSIGN \\%y \\%a",
 686: "  DEFINE \\%a goodbye",
 687: "  ECHO \\%x \\%y\n",
 688: "This will print 'goodbye hello'.", "" };
 689: #endif /* NOSPL */
 690: 
 691: #ifndef NOSPL
 692: static char *hxxdec[] = {
 693: "Syntax: DECREMENT variablename [ number ]\n",
 694: "Decrement (subtract one from) the value of a variable if the current value",
 695: "is numeric.  If the number argument is given, subtract that number instead.",
 696: "\nExamples: DECR \\%a, DECR \\%a 7, DECR \\%a \\%n", "" };
 697: #endif /* NOSPL */
 698: 
 699: #ifndef NOSPL
 700: static char *hxxinc[] = {
 701: "Syntax: INCREMENT variablename [ number ]\n",
 702: "Increment (add one to) the value of a variable if the current value is",
 703: "numeric.  If the number argument is given, add that number instead.\n",
 704: "Examples: INCR \\%a, INCR \\%a 7, INCR \\%a \\%n", "" };
 705: #endif /* NOSPL */
 706: 
 707: #ifdef SUNX25
 708: static char *hxxpad[] = {
 709: "Syntax: PAD command",
 710: "X.25 PAD commands:\n",
 711: "    PAD CLEAR     - Clear the virtual call",
 712: "    PAD STATUS    - Return the status of virtual call",
 713: "    PAD RESET     - Send a reset packet",
 714: "    PAD INTERRUPT - Send an interrupt packet",
 715: ""};
 716: 
 717: static char *hxyx25[] = {
 718: "Syntax: SET X.25 option { ON [ data ], OFF }\n",
 719: "X.25 call options:",
 720: "  CLOSED-USER-GROUP { ON index, OFF }",
 721: "    Enable or disable closed user group call, where index is the group",
 722: "    index, 0 to 99.",
 723: "  REVERSE-CHARGE { ON, OFF }",
 724: "    Tell whether you want to reverse the charges for the call.",
 725: "  CALL-USER-DATA { ON string, OFF }",
 726: "    Specify call user-data for the X.25 call.",
 727: ""};
 728: #endif /* SUNX25 */
 729: 
 730: static char *hxxpau[] = {
 731: "Syntax:  PAUSE [ number ]",
 732: "Example: PAUSE 3\n",
 733: "Do nothing for the specified number of seconds; if no number given, one",
 734: "second.  If interrupted from the keyboard, set FAILURE, otherwise SUCCESS.",
 735: "" };
 736: 
 737: static char *hxxmsl[] = {
 738: "Syntax:  MSLEEP [ number ]",
 739: "Example: MSLEEP 500\n",
 740: "Do nothing for the specified number of milliseconds; if no number given,",
 741: "100 milliseconds.","" };
 742: 
 743: #ifndef NOPUSH
 744: static char *hxxshe[] = {
 745: "Syntax: ! [ command ] or RUN [ command ] or PUSH [ command ]\n",
 746: "Give a command to the local operating system's command processor, and",
 747: "display the results on the screen.\n",
 748: "If the command is omitted, enter interactive mode; return to Kermit",
 749: "by exiting from the system's command parser.  The command is usually",
 750: "EXIT or QUIT or LOGOUT.",  "" };
 751: #endif /* NOPUSH */
 752: 
 753: #ifndef NOXMIT
 754: static char *hxxxmit[] = {
 755: "Syntax: TRANSMIT file\n",
 756: "The TRANSMIT command is used for sending single files to other computers",
 757: "that don't have Kermit.  Text files are sent a line at a time; binary files",
 758: "are sent a character at a time.  There is no guarantee that the other",
 759: "computer will receive the file correctly and completely.  Before you start",
 760: "the TRANSMIT command, you must put the other computer in data collection",
 761: "mode, for example by starting a text editor.  TRANSMIT may be interrupted by",
 762: "Ctrl-C.  Synonym: XMIT.",
 763: "" };
 764: #endif /* NOXMIT */
 765: 
 766: #ifndef NOCSETS
 767: static char *hxxxla[] = {
 768: "Syntax: TRANSLATE file1 cs1 cs2 [ file2 ]\n",
 769: "Translates file1 from the character set cs1 into the character set cs2",
 770: "and stores the result in file2.  The character sets can be any of",
 771: "C-Kermit's file character sets.  If file2 is omitted, the translation",
 772: "is displayed on the screen.  Uses Latin-1 as intermediate character set",
 773: "unless LANGUAGE is set to RUSSIAN, in which case it uses Latin-Cyrillic.",
 774: "Synonym: XLATE.  Example:\n",
 775: "TRANSLATE lasagna.lat latin1 italian lasagna.nrc",
 776: "" };
 777: #endif /* NOCSETS */
 778: 
 779: #ifndef NOSPL
 780: static char *hxxwai[] = {
 781: "Syntax:  WAIT number [modem-signal(s)]",
 782: "Example: WAIT 5 \\cd\\cts\n",
 783: "Waits up to the given number of seconds for all of the specified signals.",
 784: "Sets FAILURE if signals do not appear in given time or if interrupted by",
 785: "typing anything at the keyboard during the waiting period.\n",
 786: "Signals: \\cd = Carrier Detect, \\dsr = Dataset Ready, \\cts = Clear To Send",
 787: "Warning: This command does not work yet, signals are ignored.", "" };
 788: #endif /* NOSPL */
 789: 
 790: static char *hxxwri[] = {
 791: "Syntax: WRITE name text\n",
 792: "Writes the given text to the named log or file.  The text text may include",
 793: "backslash codes, and is not terminated by a newline unless you include the",
 794: "appropriate code.  The name parameter can be any of the following:\n",
 795: "  DEBUG-LOG",
 796: "  ERROR (standard error)",
 797: #ifndef NOSPL
 798: "  FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)",
 799: #endif /* NOSPL */
 800: "  PACKET-LOG",
 801: "  SCREEN (compare with ECHO)",
 802: "  SESSION-LOG",
 803: "  TRANSACTION-LOG", "" };
 804: 
 805: #ifndef NODIAL
 806: static char *hxxdial[] = { "Syntax:  DIAL phonenumber",
 807: "Example: DIAL 7654321\n",
 808: "Dial a number using an autodial modem.  First you must SET MODEM, then",
 809: "SET LINE, then SET SPEED.  Then give the DIAL command, including the phone",
 810: "number, for example:\n",
 811: "  DIAL 7654321\n",
 812: #ifdef NETCONN
 813: "If the modem is on a network modem server, SET HOST first, then SET MODEM,",
 814: "then DIAL.  See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED,",
 815: "and REDIAL.\n",
 816: #else
 817: "See also SET DIAL, SET MODEM, SET LINE, SET SPEED, REDIAL.\n",
 818: #endif /* NETCONN */
 819: "The 'phonenumber' can also the name of an entry from your dialing directory,",
 820: "which is a plain text file, one entry per line:\n",
 821: "  name  phonenumber  speed   parity   comments\n",
 822: "for example:\n",
 823: "  e-mail  765-4321   2400    even     My electronic mailbox\n",
 824: "The fields are separated by spaces, and all fields after the 'phonenumber'",
 825: "are optional.  If the speed or parity are present, they replace your current",
 826: "SET SPEED and SET PARITY settings.  Specify your dialing directory file with",
 827: "the SET DIAL DIRECTORY command.",
 828:  "" };
 829: #endif /* NODIAL */
 830: 
 831: #endif /* NOHELP */
 832: 
 833: /*  D O H L P  --  Give a help message  */
 834: 
 835: _PROTOTYP( int dohset, (int) );
 836: 
 837: int
 838: dohlp(xx) int xx; {
 839:     int x,y;
 840: 
 841:     debug(F101,"DOHELP xx","",xx);
 842:     if (xx < 0) return(xx);
 843:     switch (xx) {
 844: 
 845: #ifdef NOHELP
 846: 
 847: case XXHLP:
 848:     if ((x = cmcfm()) < 0)
 849:       return(x);
 850:     printf("%s, Copyright (C) 1985, 1992,",versio);
 851:     return(hmsga(tophlp));
 852: 
 853: #else /* help is available */
 854: 
 855: #ifndef NOSPL
 856: case XXASS:             /* assign */
 857:     return(hmsga(hxxass));
 858: 
 859: case XXASK:             /* ask */
 860:     return(hmsga(hxxask));
 861: 
 862: case XXASKQ:
 863:     return(hmsga(hxxaskq));
 864: #endif /* NOSPL */
 865: 
 866: #ifndef NOFRILLS
 867: case XXBUG:
 868:     return(hmsg("Describe how to report C-Kermit bugs."));
 869: #endif /* NOFRILLS */
 870: 
 871: case XXBYE:             /* bye */
 872:     return(hmsg(hmxxbye));
 873: 
 874: case XXCHK:             /* check */
 875:     return(hmsg("\
 876: Syntax: CHECK name\n\
 877: Check to see if the named feature is included in this version of C-Kermit.\n\
 878: To list the features you can check, type \"check ?\"."));
 879: 
 880: #ifndef NOFRILLS
 881: case XXCLE:             /* clear */
 882:     return(hmsg("\
 883: Syntax: CLEAR\n\
 884: Clear the serial port input buffer."));
 885: #endif /* NOFRILLS */
 886: 
 887: case XXCLO:             /* close */
 888:     return(hmsga(hmxxclo));
 889: 
 890: case XXCOM:             /* comment */
 891:     return(hmsg("\
 892: Syntax: COMMENT text\n\
 893: Example: COMMENT - this is a comment.\n\n\
 894: Introduce a comment.  Beginning of command line only.  Commands may also\n\
 895: have trailing comments, introduced by ; (semicolon)."));
 896: 
 897: case XXCON:             /* connect */
 898:     hmsg(hmxxcon);
 899:     printf("Your escape character is Ctrl-%c (ASCII %d, %s)\r\n",
 900:        ctl(escape), escape, (escape == 127 ? "DEL" : ccntab[escape]));
 901:     return(0);
 902: 
 903: case XXCWD:             /* cd / cwd */
 904: #ifdef vms
 905:     return(hmsg("Syntax: CD [ directory or device:directory ]\n\
 906: Change Working Directory, equivalent to VMS SET DEFAULT command"));
 907: #else
 908: #ifdef datageneral
 909:     return(hmsg("Change Working Directory, equivalent to DG 'dir' command"));
 910: #else
 911: #ifdef OS2
 912:   return(hmsg("Change Working Directory, equivalent to OS/2 'chdir' command"));
 913: #else
 914:     return(hmsg("Syntax: CD [ directoryname ]\n\n\
 915: Change Working Directory, equivalent to UNIX cd command."));
 916: #endif /* OS2 */
 917: #endif /* datageneral */
 918: #endif /* vms */
 919: 
 920: #ifndef NOSPL
 921: case XXDCL:
 922:     return(hmsg("Syntax:  DECLARE arrayname[size]\n\
 923: Example: DECLARE \\&a[20]\n\n\
 924: Declares an array of the given size.  Array elements can be used just like\n\
 925: any other variables."));
 926: 
 927: case XXDEF:             /* define */
 928:     return(hmsga(hxxdef));
 929: #endif /* NOSPL */
 930: 
 931: #ifndef NOFRILLS
 932: case XXDEL:             /* delete */
 933:     return(hmsg("Syntax: DELETE filespec\n\n\
 934: Delete a local file or files.  RM is a synonym for DELETE."));
 935: #endif /* NOFRILLS */
 936: 
 937: #ifndef NODIAL
 938: case XXDIAL:                /* dial */
 939:     return(hmsga(hxxdial));
 940: #endif
 941: 
 942: case XXDIR:             /* directory */
 943:     return(hmsg("Syntax: DIRECTORY [ filespec ]\n\
 944: Display a directory listing of local files."));
 945: 
 946: #ifndef NOSERVER
 947: #ifndef NOFRILLS
 948: case XXDIS:
 949:     return(hmsg("Syntax: DISABLE command\n\n\
 950: Security for the C-Kermit server.  Prevent the client Kermit program from\n\
 951: executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc."));
 952: #endif /* NOFRILLS */
 953: #endif /* NOSERVER */
 954: 
 955: #ifndef NOSPL
 956: case XXDO:              /* do */
 957:     return(hmsg("Syntax: [ DO ] macroname [ arguments ]\n\n\
 958: Execute a macro that was defined by the DEFINE command.  The word DO\n\
 959: can be omitted.  Trailing argument words, if any, are automatically\n\
 960: assigned to the macro argument variables \\%1, \\%2, etc."));
 961: #endif /* NOSPL */
 962: 
 963: #ifndef NOSPL
 964: case XXDEC:
 965:     return(hmsga(hxxdec));
 966: #endif /* NOSPL */
 967: 
 968: case XXECH:             /* echo */
 969:     return(hmsg("Syntax: ECHO text\n\
 970: Display the text on the screen, followed by a newline.  The ECHO text may\n\
 971: contain backslash codes.  Example: ECHO \\7Wake up!\\7"));
 972: 
 973: #ifndef NOSERVER
 974: #ifndef NOFRILLS
 975: case XXENA:
 976:     return(hmsg("Syntax: ENABLE capability\n\n\
 977: For use with server mode.  Allow the client Kermit program access to the\n\
 978: named capability, such as CD, DELETE, RECEIVE, etc.  Opposite of DISABLE."));
 979: #endif /* NOFRILLS */
 980: #endif /* NOSERVER */
 981: 
 982: #ifndef NOSPL
 983: case XXEND:             /* end */
 984:     return(hmsg("Syntax: END [ number [ message ] ]\n\
 985: Exit from the current macro or TAKE file, back to wherever invoked from.\n\
 986: Number is return code.  Message, if given, is printed."));
 987: #endif /* NOSPL */
 988: 
 989: #ifndef NOFRILLS
 990: case XXERR:             /* error */
 991:     return(hmsg("Syntax: ERROR\n\
 992: Send an Error packet to the other Kermit to get it out of packet mode."));
 993: #endif /* NOFRILLS */
 994: 
 995: case XXEXI:             /* exit */
 996: case XXQUI:
 997:     return(hmsg("Syntax: QUIT (or EXIT)\n\
 998: Exit from the Kermit program, closing all open files and devices."));
 999: 
1000: case XXFIN:
1001:     return(hmsg("Syntax: FINISH\n\
1002: Tell the remote Kermit server to shut down without logging out."));
1003: 
1004: #ifndef NOSPL
1005: case XXFOR:
1006:     return(hmsga(forhlp));
1007: #endif /* NOSPL */
1008: 
1009: case XXGET:
1010:     return(hmsg(hmxxget));
1011: 
1012: #ifndef NOSPL
1013: #ifndef NOFRILLS
1014:   case XXGOK:
1015:     return(hmsg("Syntax: GETOK prompt\n\
1016: Print the prompt, make user type 'yes', 'no', or 'ok', and set SUCCESS or\n\
1017: FAILURE accordingly."));
1018: #endif /* NOFRILLS */
1019: #endif /* NOSPL */
1020: 
1021: #ifndef NOSPL
1022: case XXGOTO:
1023:     return(hmsg("Syntax: GOTO label\n\
1024: In a TAKE file or macro, go to the given label.  A label is a word on the\n\
1025: left margin that starts with a colon (:).  Example:\n\n\
1026: :oofa\n\
1027: echo Hello!\n\
1028: goto oofa"));
1029: #endif /* NOSPL */
1030: 
1031: case XXHAN:
1032:     return(hmsg("Syntax: HANGUP\n\
1033: Hang up the phone or network connection."));
1034: 
1035: case XXHLP:
1036: /*
1037:   We get confirmation here, even though we do it again in hmsga(), to prevent
1038:   the Copyright message from being printed prematurely.  This doesn't do any
1039:   harm, because the first call to cmcfm() sets cmflgs to 1, making the second
1040:   call return immediately.
1041: */
1042:     if ((x = cmcfm()) < 0)
1043:       return(x);
1044:     printf("%s, Copyright (C) 1985, 1992,",versio);
1045:     return(hmsga(tophlp));
1046: 
1047: case XXINT:
1048:     return(hmsg("Give a brief introduction to C-Kermit."));
1049: 
1050: #ifndef NOSPL
1051: case XXIF:
1052:     return(hmsga(ifhlp));
1053: 
1054: case XXINC:
1055:     return(hmsga(hxxinc));
1056: 
1057: case XXINP:
1058:    return(hmsg("\
1059: Syntax:  INPUT n [ text ]\n\
1060: Example: INPUT 5 Login:\n\n\
1061: Wait up to n seconds for the given text to arrive on the communication line.\n\
1062: If no text, waits for any character.  For use in script programs with\n\
1063: IF FAILURE and IF SUCCESS.  Also see SET INPUT."));
1064: #endif /* NOSPL */
1065: 
1066: #ifndef NODIAL
1067: case XXRED:
1068:     return(hmsg("Redial the number given in the most recent DIAL commnd."));
1069: #endif /* NODIAL */
1070: 
1071: #ifndef NOSPL
1072: case XXREI:
1073:     return(hmsg("Syntax: REINPUT n string\n\n\
1074: Look for the string in the text that has recently been INPUT, set SUCCESS\n\
1075: or FAILURE accordingly.  Timeout, n, must be specified but is ignored."));
1076: #endif /* NOSPL */
1077: 
1078: #ifndef NOFRILLS
1079: case XXREN:
1080:     return(hmsg("Syntax: RENAME oldname newname\n\n\
1081: Change the name of file 'oldname' to 'newname'."));
1082: #endif /* NOFRILLS */
1083: 
1084: #ifndef NOSPL
1085: case XXLBL:
1086:     return(hmsg("\
1087: Introduce a label, like :loop, for use with GOTO in TAKE files or macros.\n\
1088: See GOTO."));
1089: #endif /* NOSPL */
1090: 
1091: case XXLOG:
1092:     return(hmsga(hmxxlg));
1093: 
1094: #ifndef NOSCRIPT
1095: case XXLOGI:
1096:     return(hmsga(hmxxlogi));
1097: #endif
1098: 
1099: #ifndef NOFRILLS
1100: case XXMAI:
1101:     return(hmsg("Syntax: MAIL filename address\n\n\
1102: Send the file to the remote Kermit, which must be in RECEIVE or SERVER mode,\n\
1103: and request that the remote host deliver the file as electronic mail to the\n\
1104: given address.  Example: MAIL BUG.TXT KERMIT@CUVMA"));
1105: #endif /* NOFRILLS */
1106: 
1107: #ifndef NOMSEND
1108: case XXMSE:
1109:     return(hmsg(hmssmse));
1110: #endif /* NOMSEND */
1111: 
1112: #ifndef NOSPL
1113: case XXOPE:
1114:     return(hmsga(openhlp));
1115: #endif /* NOSPL */
1116: 
1117: #ifndef NOSPL
1118: case XXOUT:
1119:     return(hmsg("Syntax: OUTPUT text\n\n\
1120: Send the text out the currently selected line, as if you had typed it\n\
1121: during CONNECT mode.  The text may contain backslash codes.  Example:\n\n\
1122:   OUTPUT help\\13"));
1123: #endif /* NOSPL */
1124: 
1125: #ifdef SUNX25
1126: case XXPAD:
1127:     return(hmsga(hxxpad));
1128: #endif /* SUNX25 */
1129: 
1130: #ifndef NOSPL
1131: case XXPAU:
1132:     return(hmsga(hxxpau));
1133: 
1134: case XXMSL:
1135:     return(hmsga(hxxmsl));
1136: #endif /* NOSPL */
1137: 
1138: #ifdef TCPSOCKET
1139: case XXPNG:
1140:     return(hmsg("Syntax: PING [ IP-hostname-or-number ]\n\n\
1141: Check if given IP network host is reachable.  Default host from most\n\
1142: recent SET HOST or TELNET command.  Runs system PING program, if any."));
1143: #endif /* TCPSOCKET */
1144: 
1145: #ifndef NOFRILLS
1146: case XXPRI:
1147:     return(hmsg("Syntax: PRINT file [ options ]\n\n\
1148: Print the local file on a local printer with the given options."));
1149: #endif /* NOFRILLS */
1150: 
1151: case XXPWD:
1152:     return(hmsg("Syntax: PWD\n\
1153: Print the name of the current working directory."));
1154: 
1155: #ifndef NOSPL
1156: case XXREA:
1157:     return(hmsg("Syntax: READ variablename\n\
1158: Read a line from the currently open READ or !READ file into the variable\n\
1159: (see OPEN)."));
1160: #endif /* NOSPL */
1161: 
1162: case XXREC:
1163:     return(hmsga(hmxxrc));
1164: 
1165: case XXREM:
1166:     y = cmkey(remcmd,nrmt,"Remote command","",xxstring);
1167:     return(dohrmt(y));
1168: 
1169: #ifndef NOSPL
1170: case XXRET:
1171:     return(hmsg("Syntax: RETURN [ value ]\n\
1172: Return from a macro.  An optional return value can be given for use with\n\
1173: with \\fexecute(macro), which allows macros to be used like functions."));
1174: case XXSEN:
1175:     return(hmsg(hmxxsen));
1176: #endif /* NOSPL */
1177: 
1178: #ifndef NOSERVER
1179: case XXSER:
1180:     return(hmsg(hmxxser));
1181: #endif /* NOSERVER */
1182: 
1183: #ifndef NOJC
1184: case XXSUS:
1185:     return(hmsg("Syntax: SUSPEND or Z\n\
1186: Suspend Kermit.  Continue Kermit with the appropriate system command,\n\
1187: such as fg."));
1188: #endif /* NOJC */
1189: 
1190: case XXSET:
1191:     y = cmkey(prmtab,nprm,"Parameter","",xxstring);
1192:     debug(F101,"HELP SET y","",y);
1193:     return(dohset(y));
1194: 
1195: #ifndef NOPUSH
1196: case XXSHE:
1197:     return(hmsga(hxxshe));
1198: #endif /* NOPUSH */
1199: 
1200: #ifndef NOSHOW
1201: case XXSHO:
1202:     return(hmsg("\
1203: Display current values of various items (SET parameters, variables, etc).\n\
1204: Type SHOW ? for a list of categories."));
1205: #endif /* NOSHOW */
1206: 
1207: case XXSPA:
1208: #ifdef datageneral
1209:     return(hmsg("\
1210: Display disk usage in current device, directory,\n\
1211: or return space for a specified device, directory."));
1212: #else
1213:     return(hmsg("Syntax: SPACE\n\
1214: Display disk usage in current device and/or directory"));
1215: #endif
1216: 
1217: case XXSTA:
1218:     return(hmsg("Syntax: STATISTICS\n\
1219: Display statistics about most recent file transfer"));
1220: 
1221: #ifndef NOSPL
1222: case XXSTO:
1223:     return(hmsg("Syntax: STOP [ number [ message ] ]\n\
1224: Stop executing the current macro or TAKE file and return immediately to\n\
1225: the C-Kermit prompt.  Number is a return code.  Message printed if given."));
1226: #endif /* NOSPL */
1227: 
1228: case XXTAK:
1229:     return(hmsg("Syntax: TAKE filename\n\
1230: Take Kermit commands from the named file.  Kermit command files may\n\
1231: themselves contain TAKE commands, up to a reasonable depth of nesting."));
1232: 
1233: #ifdef NETCONN
1234: case XXTEL:
1235:     return(hmsg("Syntax: TELNET [ host ]\n\
1236: Equivalent to SET HOST host, followed by CONNECT.  If hostname omitted,\n\
1237: previous connection (if any) is resumed."));
1238: #endif /* NETCONN */
1239: 
1240: 
1241: #ifndef NOXMIT
1242: case XXTRA:
1243:     return(hmsga(hxxxmit));
1244: #endif /* NOXMIT */
1245: 
1246: #ifndef NOFRILLS
1247: case XXTYP:
1248:     return(hmsg("Syntax: TYPE file\n\
1249: Display a file on the screen.  Pauses if you type Ctrl-S, resumes if you\n\
1250: type Ctrl-Q, returns immediately to C-Kermit prompt if you type Ctrl-C."
1251: ));
1252: #endif /* NOFRILLS */
1253: 
1254: #ifndef NOSPL
1255: case XXWHI:
1256:     return(hmsga(whihlp));
1257: #endif /* NOSPL */
1258: 
1259: #ifndef NOCSETS
1260: case XXXLA:
1261:     return(hmsga(hxxxla));
1262: #endif /* NOCSETS */
1263: 
1264: case XXVER:
1265:     return(hmsg("Syntax: VERSION\nDisplays the program version number."));
1266: 
1267: #ifndef NOSPL
1268: case XXWAI:
1269:     return(hmsga(hxxwai));
1270: #endif /* NOSPL */
1271: 
1272: #ifndef NOFRILLS
1273: case XXWHO:
1274:     return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));
1275: 
1276: case XXWRI:
1277:     return(hmsga(hxxwri));
1278: #endif /* NOFRILLS */
1279: 
1280: #ifndef NOSPL
1281: case XXIFX:
1282:     return(hmsga(ifxhlp));
1283: #endif /* NOSPL */
1284: 
1285: #endif /* NOHELP */
1286: 
1287: default:
1288:     if ((x = cmcfm()) < 0) return(x);
1289:     printf("Help not available - %s\n",cmdbuf);
1290:     break;
1291:     }
1292:     return(success = 0);
1293: }
1294: 
1295: #ifdef NOHELP
1296: 
1297: int                 /* Print an array of lines, */
1298: hmsga(s) char *s[]; {           /* cheap version. */
1299:     int i;
1300:     if ((i = cmcfm()) < 0) return(i);
1301:     printf("\n");           /* Start off with a blank line */
1302:     for (i = 0; *s[i]; i++) {       /* Print each line. */
1303:     printf("%s\n",s[i]);
1304:     }
1305:     printf("\n");
1306:     return(0);
1307: }
1308: 
1309: #else
1310: 
1311: int                 /* Print an array of lines, */
1312: hmsga(s) char *s[]; {           /* pausing at end of each screen. */
1313:     int x, y, i, j, k, n;
1314:     if ((x = cmcfm()) < 0) return(x);
1315: 
1316:     printf("\n");           /* Start off with a blank line */
1317:     n = 1;              /* Line counter */
1318:     for (i = 0; *s[i]; i++) {
1319:     printf("%s\n",s[i]);        /* Print a line. */
1320:         y = (int)strlen(s[i]);
1321:         k = 1;
1322:         for (j = 0; j < y; j++)     /* See how many newlines were */
1323:           if (s[i][j] == '\n') k++; /* in the string... */
1324:         n += k;
1325:     if (n > 21)         /* After a screenful, give them */
1326:           if (!askmore()) return(-9);
1327:           else n = 0;
1328:     }
1329:     printf("\n");
1330:     return(0);
1331: }
1332: 
1333: /*  H M S G  --  Get confirmation, then print the given message  */
1334: 
1335: int
1336: hmsg(s) char *s; {
1337:     int x;
1338:     if ((x = cmcfm()) < 0) return(x);
1339:     printf("\n%s\n\n",s);
1340:     return(0);
1341: }
1342: 
1343: #ifndef NOXMIT
1344: static char *hsetxmit[] = {
1345: "Syntax: SET TRANSMIT parameter value\n",
1346: "Controls the behavior of the TRANSMIT command, used for uploading files",
1347: "to computers that don't have Kermit programs.  Parameters are:\n",
1348: "ECHO ON/OFF:     Whether to echo text as it is being transmitted.",
1349: "EOF text:        Text to send after end of file is reached.",
1350: "FILL number:     ASCII value of character to insert into blank lines.",
1351: "LINEFEED ON/OFF: Transmit LF as well as CR at the end of each line.",
1352: "                 Normally, only CR is sent.",
1353: "LOCKING-SHIFT ON/OFF: Whether to use SO/SI for transmitting 8-bit data",
1354: "                 when PARITY is not NONE.",
1355: "PAUSE number:    How many milliseconds to pause after transmitting each line",
1356: "                 (text mode), or each character (binary mode).",
1357: "PROMPT number:   ASCII value of character to look for from host before",
1358: "                 sending next line, normally LF (10).",
1359: "Synonym: SET XMIT.",
1360: "" };
1361: #endif /* NOXMIT */
1362: 
1363: static char *hsetbkg[] = {
1364: "Syntax: SET BACKGROUND { OFF, ON }\n",
1365: "SET BACKGROUND OFF forces prompts and messages to appear on your screen",
1366: "even though Kermit thinks it is running in the background.", "" };
1367: 
1368: #ifdef DYNAMIC
1369: static char *hsetbuf[] = {
1370: "Syntax: SET BUFFERS n1 n2\n",
1371: "Change the overall amount of memory allocated for SEND and RECEIVE packet",
1372: "buffers, respectively.  Bigger numbers let you have longer packets and more",
1373: "window slots", "" };
1374: #endif /* DYNAMIC */
1375: 
1376: static char *hsetcmd[] = {
1377: "Syntax: SET COMMAND BYTESIZE { 7, 8 }\n",
1378: "SET COMMAND BYTE 8 allows you to use an 8-bit (international) character set",
1379: "in the commands you type at the C-Kermit> prompt.  7 is the default.", "" };
1380: 
1381: static char *hsetcar[] = {
1382: "Syntax: SET CARRIER ON, AUTO, or OFF\n",
1383: "Attempts to control treatment of carrier on the communication device.",
1384: "ON means that carrier is required at all times except during the DIAL",
1385: "command.  OFF means that carrier is never required.  AUTO (the default)",
1386: "means that carrier is required only during CONNECT.", "" };
1387: 
1388: static char *hsetat[] = {
1389: "Syntax: SET ATTRIBUTES name ON or OFF\n",
1390: "Use this command to enable (ON) or disable (OFF) the transmission of",
1391: "selected file attributes along with each file, and to handle or ignore",
1392: "selected incoming file attributes, including:\n",
1393: "  CHARACTER-SET:  The transfer character set for text files",
1394: "  DATE:           The file's creation date",
1395: "  DISPOSITION:    Unusual things to do with the file, like MAIL or PRINT",
1396: "  LENGTH:         The file's length",
1397: "  SYSTEM-ID:      Machine/Operating system of origin",
1398: "  TYPE:           The file's type (text or binary)\n",
1399: "You can also specify ALL to select all of them.  Examples:\n",
1400: "  SET ATTR DATE OFF\n  SET ATTR SIZE ON\n  SET ATTR ALL OFF", ""
1401: };
1402: 
1403: #ifndef NOSPL
1404: static char *hxxinp[] = {
1405: "Syntax: SET INPUT parameter value\n",
1406: "The SET INPUT command controls the behavior of the INPUT command:\n",
1407: "SET INPUT CASE { IGNORE, OBSERVE }",
1408: "Tells whether alphabetic case is to be significant in string comparisons.\n",
1409: "SET INPUT ECHO { ON, OFF }",
1410: "Tells whether to display arriving characters read by INPUT on the screen.\n",
1411: "SET INPUT SILENCE <number>",
1412: "The maximum number to seconds of silence (no input at all) before the INPUT",
1413: "command times out, 0 for no maximum.\n",
1414: "SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }",
1415: "Tells whether to proceed or quit from a script program if an INPUT command",
1416: "fails.  PROCEED (default) allows use of IF SUCCESS and IF FAILURE commands.",
1417: "" };
1418: #endif /* NOSPL */
1419: 
1420: static char *hxytak[] = {
1421: "Syntax: SET TAKE parameter value\n",
1422: "Controls behavior of TAKE command.\n",
1423: "SET TAKE ECHO { ON, OFF } tells whether commands read from a TAKE file",
1424: "should be displayed on the screen.\n",
1425: "SET TAKE ERROR { ON, OFF } tells whether a TAKE command file should be",
1426: "automatically terminated when a command fails.", "" };
1427: 
1428: static char *hxyterm[] = {
1429: "Syntax: SET TERMINAL parameter value\n",
1430: #ifdef OS2
1431: "SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }",
1432: "sets the mode for the arrow keys during VT terminal emulation.\n",
1433: #endif /* OS2 */
1434: "SET TERMINAL BYTESIZE 7 or 8, to use 7- or 8-bit terminal characters",
1435: "between C-Kermit and the remote host during CONNECT.\n",
1436: "SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ] to specify the",
1437: "character set used by the remote host, <remote-cs>, and the character",
1438: "set used by C-Kermit locally, <local-cs>.  If you don't specify the",
1439: "local character set, the current FILE CHARACTER-SET is used.  When you",
1440: "specify two different character sets, C-Kermit translates between them",
1441: "during CONNECT.  By default, both character sets are TRANSPARENT.\n",
1442: #ifdef OS2
1443: "SET TERMINAL COLOR <screenpart> <foreground> <background>, to set",
1444: "the colors of the terminal emulation screen. <screenpart> may be one",
1445: "of NORMAL, REVERSE, UNDERLINED, STATUS and HELP. <foreground> and",
1446: "<background> may be one of BLACK, BLUE, GREEN, CYAN, RED, MAGENTA,",
1447: "BROWN, LGRAY, DGRAY, LBLUE, LGREEN, LCYAN, LRED, LMAGENTA, YELLOW",
1448: "or WHITE.  The L prefix for the color names means Light.\n",
1449: #endif /* OS2 */
1450: "SET TERMINAL CR-DISPLAY { CRLF, NORMAL } to specify how incoming",
1451: "carriage return characters are to be displayed on your screen.\n",
1452: "SET TERMINAL ECHO { LOCAL, REMOTE } to specify which side does the",
1453: "echoing during terminal connection.\n",
1454: #ifdef OS2
1455: "SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC } to specify the keypad",
1456: "mode for VT terminal emulation.\n",
1457: #endif /* OS2 */
1458: "SET TERMINAL LOCKING-SHIFT { OFF, ON } tells C-Kermit whether to use",
1459: "Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch between 7-bit and 8-bit",
1460: "characters during CONNECT.  OFF by default.\n",
1461: "SET TERMINAL NEWLINE-MODE { OFF, ON } tells whether to send CRLF when you",
1462: "type CR during CONNECT mode.\n",
1463: #ifdef OS2
1464: "SET TERMINAL TYPE { VT102, VT52 } to select which terminal to emulate.\n",
1465: "SET TERMINAL WRAP { OFF, ON } to tell whether the VT terminal emulator",
1466: "should automatically wrap long lines on your screen.\n",
1467: #endif /* OS2 */
1468: "Type SHOW TERMINAL to see current terminal settings.",
1469: "" };
1470: 
1471: #ifdef NETCONN
1472: static char *hxyhost[] = {
1473: "Syntax:  SET HOST hostname-or-number\n",
1474: "Select a network host.  Use this command instead of SET LINE.",
1475: "After SET HOST give the host name or number.  TCP/IP Examples:\n",
1476: "  SET HOST watsun.cc.columbia.edu",
1477: "  SET HOST 128.59.39.2",
1478: "" };
1479: 
1480: #ifdef TNCODE
1481: static char *hxytel[] = {
1482: "Syntax: SET TELNET parameter value\n",
1483: "For TCP/IP SET HOST and TELNET connections:\n",
1484: "SET TELNET ECHO { LOCAL, REMOTE }",
1485: "  C-Kermit's initial echoing state for TELNET connections, LOCAL by default.",
1486: "  After the connection is made, TELNET negotiations determine the echoing",
1487: "  state.",
1488: "SET TELNET NEWLINE-MODE { OFF, ON }",
1489: "  ON (the default) means send CRLF when user types CR.",
1490: "  OFF means send CR alone.",
1491: "SET TELNET TERMINAL-TYPE name",
1492: "  The terminal type to send to the remote TELNET host.  If none is given,",
1493: "  your local terminal type is sent.\n",
1494: "Type SHOW NETWORK to see the current values of these parameters.",
1495: "" };
1496: #endif /* TNCODE */
1497: 
1498: static char *hxynet[] = {
1499: "Syntax: SET NETWORK network-type\n",
1500: "Select the type of network to be used with SET HOST connections:\n",
1501: #ifdef TCPSOCKET
1502: "  SET NETWORK TCP/IP",
1503: #endif /* TCPSOCKET */
1504: #ifdef SUNX25
1505: "  SET NETWORK X.25",
1506: #endif /* SUNX25 */
1507: #ifdef DECNET
1508: "  SET NETWORK DECNET",
1509: #endif /* DECNET */
1510: ""};
1511: #endif /* NETCONN */
1512: 
1513: #ifndef NOSPL
1514: static char *hxymacr[] = {
1515: "Syntax: SET MACRO parameter value\n",
1516: "Controls the behavior of macros.\n",
1517: "SET MACRO ECHO { ON, OFF } tells whether commands executed from a macro",
1518: "definition should be displayed on the screen.\n",
1519: "SET MACRO ERROR { ON, OFF } tells whether a macro should be automatically",
1520: "terminated upon a command error.", "" };
1521: #endif /* NOSPL */
1522: 
1523: #ifndef NODIAL
1524: static char *hxymodm[] = {
1525: "Syntax: SET MODEM-DIALER name\n",
1526: "Type of modem for dialing remote connections.  Selects the dialing protocol,",
1527: #ifdef MINIDIAL
1528: "such as HAYES, to be used by the DIAL command.  Several dialing protocols",
1529: #else
1530: "such as HAYES, to be used by the DIAL command.  Many modem dialing protocols",
1531: #endif /* MINIDIAL */
1532: "are supported; type SET MODEM ? for a list.  DIRECT or NONE means a direct",
1533: "connection, with no modem at all.  Also see HELP DIAL, HELP SET CARRIER.",
1534: "" };
1535: #endif /* NODIAL */
1536: 
1537: static char *hmxyprm[] = {
1538: "Syntax: SET PROMPT [ text ]\n",
1539: #ifdef MAC
1540: "Prompt text for this program, normally 'C-Kermit>'.  May contain backslash",
1541: #else
1542: "Prompt text for this program, normally 'Mac-Kermit>'.  May contain backslash",
1543: #endif /* MAC */
1544: "codes for special effects.  Surround by { } to preserve leading or trailing",
1545: #ifdef MAC
1546: "spaces.  If text omitted, prompt reverts to C-Kermit>.",
1547: #else
1548: "spaces.  If text omitted, prompt reverts to Mac-Kermit>.",
1549: #endif /* MAC */
1550: "" };
1551: 
1552: static char *hxywind[] = {
1553: "Syntax: SET WINDOW-SIZE number\n",
1554: "Specify number of window slots for sliding windows, the number of packets",
1555: "that can be transmitted before pausing for acknowledgement.  The default",
1556: "is one, the maximum is 31.  Increased window size may result in reduced",
1557: "maximum packet length.  Use sliding windows for improved efficiency on",
1558: "connections with long delays.  A full duplex connection is required.",
1559: "" };
1560: 
1561: static char *hxyrcv[] = {
1562: "Syntax: SET RECEIVE parameter value\n",
1563: "Specify parameters for inbound packets:\n",
1564: "END-OF-PACKET number",
1565: " ASCII value of control character that terminates incoming packets,",
1566: " normally 13 (carriage return).\n",
1567: "PACKET-LENGTH number",
1568: " Maximum length packet the other Kermit should send.\n",
1569: "PADDING number",
1570: " Number of prepacket padding characters to ask for (normally 0).\n",
1571: "PAD-CHARACTER number",
1572: " ASCII value of control character to use for padding (normally 0).\n",
1573: "START-OF-PACKET number",
1574: " ASCII value of character that marks start of inbound packet.\n",
1575: "TIMEOUT number",
1576: " Number of seconds other Kermit should wait for a packet before sending",
1577: " NAK or retransmitting.",
1578: "" };
1579: 
1580: static char *hxysnd[] = {
1581: "Syntax: SET SEND parameter value\n",
1582: "Specify parameters for outbound packets.  This command should be used only",
1583: "to override the normal negotiated parameters and is rarely needed:\n",
1584: "END-OF-PACKET number",
1585: " ASCII value of control character to terminate an outbound packet,",
1586: " normally 13 (carriage return).\n",
1587: "PACKET-LENGTH number",
1588: " Maximum length packet to send, even if other Kermit asks for longer ones.\n",
1589: "PADDING number",
1590: " Number of prepacket padding characters to send.\n",
1591: "PAD-CHARACTER number",
1592: " ASCII value of control character to use for padding.\n",
1593: "START-OF-PACKET number",
1594: " ASCII value of character to mark start of outbound packet.\n",
1595: "TIMEOUT number",
1596: " Number of seconds to wait for a packet before sending NAK or",
1597: " retransmitting.",
1598: "" };
1599: 
1600: static char *hxyxfer[] = {
1601: "Syntax: SET TRANSFER LOCKING-SHIFT { OFF, ON, FORCED }\n",
1602: "Tell whether locking-shift protocol should be used during file transfer",
1603: "to achieve 8-bit transparency on a 7-bit connection.  ON means to request",
1604: "its use if PARITY is not NONE and to use it if the other Kermit agrees,",
1605: "OFF means not to use it, FORCED means to use it even if the other Kermit",
1606: "does not agree.",
1607: #ifndef NOCSETS
1608: "\nSyntax: SET TRANSFER CHARACTER-SET name\n",
1609: "Select the character set used to represent textual data in Kermit packets.",
1610: "Text characters are translated to/from the FILE CHARACTER-SET.",
1611: "The choices are TRANSPARENT (no translation, the default), ASCII,",
1612: "LATIN1 (ISO Latin Alphabet 1), LATIN2 (ISO Latin Alphabet 2),",
1613: #ifdef CYRILLIC
1614: #ifdef KANJI
1615: "CYRILLIC-ISO (ISO Latin/Cyrillic),",
1616: "and JAPANESE-EUC.",
1617: #else
1618: "and CYRILLIC-ISO (ISO Latin/Cyrillic).",
1619: #endif /* KANJI */
1620: #else /* No CYRILLIC */
1621: #ifdef KANJI
1622: "and JAPANESE-EUC.",
1623: #endif /* KANJI */
1624: #endif /* CYRILLIC */
1625: "Synonym: SET XFER CHARACTER-SET.",
1626: #endif /* NOCSETS */
1627: "" };
1628: 
1629: /*  D O H S E T  --  Give help for SET command  */
1630: 
1631: int
1632: dohset(xx) int xx; {
1633:     int x;
1634: 
1635:     if (xx == -3) return(hmsga(hmhset));
1636:     if (xx < 0) return(xx);
1637:     if ((x = cmcfm()) < 0) return(x);
1638:     switch (xx) {
1639: 
1640: case XYATTR:
1641:     return(hmsga(hsetat));
1642: 
1643: case XYBACK:
1644:     return(hmsga(hsetbkg));
1645: 
1646: #ifdef DYNAMIC
1647: case XYBUF:
1648:     return(hmsga(hsetbuf));
1649: #endif /* DYNAMIC */
1650: 
1651: case XYCARR:
1652:     return(hmsga(hsetcar));
1653: 
1654: #ifndef NOSPL
1655: case XYCASE:
1656:     return(hmsg("Syntax: SET CASE { ON, OFF }\n\
1657: Tells whether alphabetic case is significant in string comparisons\n\
1658: done by INPUT, IF, and other commands."));
1659: #endif /* NOSPL */
1660: 
1661: case XYCMD:
1662:     return(hmsga(hsetcmd));
1663: 
1664: case XYIFD:
1665:     return(hmsg("Syntax: SET INCOMPLETE { DISCARD, KEEP }\n\
1666: Discard or Keep incompletely received files, default is DISCARD."));
1667: 
1668: #ifndef NOSPL
1669: case XYINPU:
1670:     return(hmsga(hxxinp));
1671: #endif /* NOSPL */
1672: 
1673: case XYCHKT:
1674:     return(hmsga(hmxychkt));
1675: 
1676: #ifndef NOSPL
1677: case XYCOUN:
1678:     return(hmsg("Syntax:  SET COUNT number\n\
1679: Example: SET COUNT 5\n\
1680: Set up a loop counter, for use with IF COUNT."));
1681: #endif /* NOSPL */
1682: 
1683: case XYDEBU:
1684: #ifdef DEBUG
1685:     return(hmsg("Syntax: SET DEBUG { SESSION, ON, OFF }\n\
1686: SESSION means display control and 8-bit characters symbolically during\n\
1687: CONNECT mode.  ON means log debugging information to file debug.log."));
1688: #else
1689:     return(hmsg("Syntax: SET DEBUG { SESSION, OFF }\n\
1690: SESSION means display control and 8-bit characters symbolically during\n\
1691: CONNECT mode."));
1692: #endif /* DEBUG */
1693: 
1694: case XYDFLT:
1695:     return(hmsg("Syntax: SET DEFAULT directory\n\
1696: Change directory.  Equivalent to CD command."));
1697: 
1698: case XYDELA:
1699:     return(hmsg("Syntax: SET DELAY number\n\
1700: Number of seconds to wait before sending first packet after SEND command."));
1701: 
1702: #ifndef NODIAL
1703: case XYDIAL:
1704:     return(hmsga(hmxydial));
1705: #endif /* NODIAL */
1706: 
1707: #ifdef UNIX
1708: case XYSUSP:
1709:     return(hmsg("Syntax: SET SUSPEND { OFF, ON }\n\n\
1710: Disables SUSPEND command, suspend signals, and <esc-char>Z during CONNECT."));
1711: #endif
1712: 
1713: #ifndef NOSCRIPT
1714: case XYSCRI:
1715:     return(hmsg("Syntax: SET SCRIPT ECHO { OFF, ON }\n\n\
1716: Disables/Enables echoing of SCRIPT command operation."));
1717: #endif /* NOSCRIPT */
1718: 
1719: case XYTAKE:
1720:     return(hmsga(hxytak));
1721: 
1722: case XYTERM:
1723:     return(hmsga(hxyterm));
1724: 
1725: case XYDUPL:
1726:     return(hmsg("Syntax: SET DUPLEX { FULL, HALF }\n\n\
1727: During CONNECT: FULL means remote host echoes, HALF means C-Kermit\n\
1728: does its own echoing."));
1729: 
1730: case XYESC:
1731:     return(hmsg("Syntax: SET ESCAPE number\n\n\
1732: Decimal ASCII value for escape character during CONNECT, normally 28\n\
1733: (Control-\\).  Type the escape character followed by C to get back to the\n\
1734: C-Kermit prompt."));
1735: 
1736: case XYFILE:
1737:     return(hmsga(hmxyf));
1738: 
1739: case XYFLOW:
1740:     return(hmsga(hmxyflo));
1741: 
1742: case XYHAND:
1743:    return(hmsga(hmxyhsh));
1744: 
1745: #ifdef NETCONN
1746: case XYHOST:
1747: return(hmsga(hxyhost));
1748: case XYNET:
1749: return(hmsga(hxynet));
1750: 
1751: #ifdef SUNX25
1752: case XYX25:
1753:     return(hmsga(hxyx25));
1754: 
1755: case XYPAD:
1756:     return(hmsg("Syntax: SET PAD name value\n\
1757: Set a PAD X.3 parameter with a desired value."));
1758: #endif /* SUNX25 */
1759: #endif /* NETCONN */
1760: 
1761: #ifndef NOSETKEY
1762: case XYKEY:             /* SET KEY */
1763:     return(hmsga(hmhskey));
1764: #endif /* NOSETKEY */
1765: 
1766: #ifndef NOCSETS
1767: case XYLANG:
1768:     return(hmsg("Syntax: SET LANGUAGE name\n\
1769: Selects language-specific translation rules for text-mode file transfers.\n\
1770: Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one\n\
1771: of these is ASCII."));
1772: #endif /* NOCSETS */
1773: 
1774: case XYLINE:
1775:     printf("\nSyntax: SET LINE devicename\n\n\
1776: Select communication device to use.  Normally %s.\n",dftty);
1777:     if (!dfloc) {
1778:     printf("\
1779: If you SET LINE to other than %s, then Kermit\n",dftty);
1780:     printf("\
1781: will be in 'local' mode; SET LINE alone will reset Kermit to remote mode.\n\
1782: To use the modem to dial out, first SET MODEM-DIALER (e.g., to HAYES), then");
1783: puts("\nSET LINE xxx, next issue the DIAL command, and finally CONNECT.\n");
1784:     }
1785:     return(0);
1786: 
1787: #ifndef NOSPL
1788: case XYMACR:
1789:     return(hmsga(hxymacr));
1790: #endif /* NOSPL */
1791: 
1792: #ifndef NODIAL
1793: case XYMODM:
1794:     return(hmsga(hxymodm));
1795: #endif /* NODIAL */
1796: 
1797: case XYPARI:
1798:     return(hmsg("Syntax: SET PARITY name\n\n\
1799: Parity to use during terminal connection and file transfer: EVEN, ODD, MARK,\n\
1800: SPACE, or NONE.  Normally NONE."));
1801: 
1802: case XYPROM:
1803:     return(hmsga(hmxyprm));
1804: 
1805: case XYQUIE:
1806:     return(hmsg("Syntax: SET QUIET {ON, OFF}\n\n\
1807: Normally OFF.  ON disables most information messages during interactive\n\
1808: operation."));
1809: 
1810: case XYRETR:
1811:     return(hmsg("Syntax: SET RETRY number\n\n\
1812: How many times to retransmit a particular packet before giving up."));
1813: 
1814: #ifdef UNIX
1815: case XYSESS:
1816:     return(hmsg("Syntax: SET SESSION-LOG { BINARY, TEXT }\n\n\
1817: If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
1818: out carriage returns."));
1819: #endif /* UNIX */
1820: 
1821: case XYSPEE:
1822:     return(hmsg("Syntax: SET SPEED number\n\n\
1823: Communication line speed for external tty line specified in most recent\n\
1824: SET LINE command, in bits per second.  Type SET SPEED ? for a list of\n\
1825: possible speeds."));
1826: 
1827: case XYRECV:
1828:     return(hmsga(hxyrcv));
1829: case XYSEND:
1830:     return(hmsga(hxysnd));
1831: 
1832: #ifndef NOSERVER
1833: case XYSERV:
1834:     return(hmsga(hsetsrv));
1835: #endif /* NOSERVER */
1836: 
1837: #ifdef TNCODE
1838: case XYTEL:
1839:     return(hmsga(hxytel));
1840: #endif /* TNCODE */
1841: 
1842: #ifndef NOXMIT
1843: case XYXMIT:
1844:     return(hmsga(hsetxmit));
1845: #endif /* NOXMIT */
1846: 
1847: #ifndef NOCSETS
1848: case XYUNCS:
1849:     return(hmsg("Syntax: SET UNKNOWN-CHAR-SET action\n\n\
1850: DISCARD (default) means reject any arriving files encoded in unknown\n\
1851: character sets.  KEEP means to accept them anyway."));
1852: #endif /* NOCSETS */
1853: 
1854: #ifdef UNIX
1855: case XYWILD:
1856:     return(hmsg("Syntax: SET WILDCARD-EXPANSION { KERMIT, SHELL }\n\n\
1857: KERMIT (the default) means C-Kermit expands filename wildcards in SEND\n\
1858: and MSEND commands and incoming GET commands.  SHELL means your shell does \
1859: it."));
1860: #endif /* UNIX */
1861: 
1862: case XYWIND:
1863:     return(hmsga(hxywind));
1864: 
1865: case XYXFER:
1866:     return(hmsga(hxyxfer));
1867: 
1868: default:
1869:     printf("Not available yet - %s\n",cmdbuf);
1870:     return(0);
1871:     }
1872: }
1873: 
1874: 
1875: /*  D O H R M T  --  Give help about REMOTE command  */
1876: 
1877: static char *hrset[] = {
1878: "Syntax:  REMOTE SET parameter value",
1879: "Example: REMOTE SET FILE TYPE BINARY\n",
1880: "Ask the remote Kermit server to set the named parameter to the given value.",
1881: "Equivalent to typing the corresponding SET command directly to the other",
1882: "Kermit if it were in interactive mode.", "" };
1883: 
1884: int
1885: dohrmt(xx) int xx; {
1886:     int x;
1887:     if (xx == -3) return(hmsga(hmhrmt));
1888:     if (xx < 0) return(xx);
1889:     if ((x = cmcfm()) < 0) return(x);
1890:     switch (xx) {
1891: 
1892: case XZCWD:
1893:     return(hmsg("Syntax: REMOTE CD [ name ]\n\n\
1894: Ask remote Kermit server to change its working directory or device.\n\
1895: If the device or directory name is omitted, restore the default."));
1896: 
1897: case XZDEL:
1898:     return(hmsg("Syntax: REMOTE DELETE filespec\n\n\
1899: Ask the remote Kermit server to delete the named file(s)."));
1900: 
1901: case XZDIR:
1902:     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\n\
1903: Ask the remote Kermit server to provide a directory listing of the named\n\
1904: file(s) or if no file specification is given, of all files in the current\n\
1905: directory."));
1906: 
1907: case XZHLP:
1908:     return(hmsg("Syntax: REMOTE HELP\n\n\
1909: Ask the remote Kermit server to list the services it provides."));
1910: 
1911: case XZHOS:
1912:     return(hmsg("Syntax: REMOTE HOST command\n\n\
1913: Send a command to the remote host computer in its own command language\n\
1914: through the remote Kermit server."));
1915: 
1916: #ifndef NOFRILLS
1917: case XZKER:
1918:     return(hmsg("Syntax: REMOTE KERMIT command\n\n\
1919: Send a command to the remote Kermit server in its own command language."));
1920: 
1921: case XZLGI:
1922:     return(hmsg("Syntax: REMOTE LOGIN user password [ account ]\n\n\
1923: Log in to a remote Kermit server that requires you login."));
1924: 
1925: case XZLGO:
1926:     return(hmsg("Syntax: REMOTE LOGOUT\n\n\
1927: Log out from a remote Kermit server to which you have previously logged in."));
1928: 
1929: case XZPRI:
1930:     return(hmsg("Syntax: REMOTE PRINT filespec [ options ]\n\n\
1931: Send the specified file(s) to the remote Kermit and ask it to have the\n\
1932: file printed on the remote system's printer, using any specified options."));
1933: #endif /* NOFRILLS */
1934: 
1935: case XZSET:
1936:     return(hmsga(hrset));
1937: 
1938: case XZSPA:
1939:     return(hmsg("Syntax: REMOTE SPACE [ name ]\n\n\
1940: Ask the remote Kermit server to tell you about its disk space on the current\n\
1941: disk or directory, or in the one that you name."));
1942: 
1943: #ifndef NOFRILLS
1944: case XZTYP:
1945:     return(hmsg("Syntax: REMOTE TYPE file\n\n\
1946: Ask the remote Kermit server to type the named file(s) on your screen."));
1947: 
1948: case XZWHO:
1949:     return(hmsg("Syntax: REMOTE WHO [ name ]\n\n\
1950: Ask the remote Kermit server to list who's logged in, or to give information\n\
1951: about the named user."));
1952: #endif /* NOFRILLS */
1953: 
1954: default:
1955:     if ((x = cmcfm()) < 0) return(x);
1956:     printf("not working yet - %s\n",cmdbuf);
1957:     return(-2);
1958:     }
1959: }
1960: 
1961: #endif /* NOHELP */
1962: #endif /* NOICP */

Defined functions

dohlp defined in line 837; used 2 times
dohrmt defined in line 1884; used 1 times
dohset defined in line 1631; used 2 times
hmsg defined in line 1335; used 84 times
hmsga defined in line 1311; used 57 times

Defined variables

forhlp defined in line 609; used 1 times
hlp1 defined in line 57; used 1 times
hmhrmt defined in line 563; used 1 times
hmhset defined in line 375; used 1 times
hmhskey defined in line 383; used 1 times
hmssmse defined in line 361; used 1 times
hmxxbye defined in line 276; used 1 times
hmxxclo defined in line 279; used 1 times
hmxxcon defined in line 297; used 1 times
hmxxget defined in line 303; used 1 times
hmxxlg defined in line 308; used 1 times
hmxxlogi defined in line 324; used 1 times
hmxxrc defined in line 346; used 1 times
hmxxsen defined in line 353; used 1 times
hmxxser defined in line 369; used 1 times
hmxychkt defined in line 398; used 1 times
hmxydial defined in line 407; used 1 times
hmxyf defined in line 458; used 1 times
hmxyflo defined in line 450; used 1 times
hmxyhsh defined in line 543; used 1 times
hmxyprm defined in line 1537; used 1 times
hrset defined in line 1877; used 1 times
hsetat defined in line 1388; used 1 times
hsetbkg defined in line 1363; used 1 times
hsetbuf defined in line 1369; used 1 times
hsetcar defined in line 1381; used 1 times
hsetcmd defined in line 1376; used 1 times
hsetsrv defined in line 552; used 1 times
hsetxmit defined in line 1344; used 1 times
hxxask defined in line 643; used 1 times
hxxaskq defined in line 633; used 1 times
hxxass defined in line 676; used 1 times
hxxdec defined in line 692; used 1 times
hxxdef defined in line 652; used 1 times
hxxdial defined in line 806; used 1 times
hxxinc defined in line 700; used 1 times
hxxinp defined in line 1404; used 1 times
hxxmsl defined in line 737; used 1 times
hxxpad defined in line 708; used 1 times
hxxpau defined in line 730; used 1 times
hxxshe defined in line 744; used 1 times
hxxwai defined in line 780; used 1 times
hxxwri defined in line 790; used 1 times
hxxxla defined in line 767; used 1 times
hxxxmit defined in line 754; used 1 times
hxyhost defined in line 1472; used 1 times
hxymacr defined in line 1514; used 1 times
hxymodm defined in line 1524; used 1 times
hxynet defined in line 1498; used 1 times
hxyrcv defined in line 1561; used 1 times
hxysnd defined in line 1580; used 1 times
hxytak defined in line 1420; used 1 times
hxytel defined in line 1481; used 1 times
hxyterm defined in line 1428; used 1 times
hxywind defined in line 1552; used 1 times
hxyx25 defined in line 717; used 1 times
hxyxfer defined in line 1600; used 1 times
ifhlp defined in line 572; used 1 times
ifxhlp defined in line 598; used 1 times
introtxt defined in line 185; used 1 times
openhlp defined in line 622; used 1 times
tophlp defined in line 143; used 2 times
whihlp defined in line 615; used 1 times
Last modified: 1992-11-24
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 8253
Valid CSS Valid XHTML 1.0 Strict