Annotation of coherent/e/bin/cku179/ckuus2.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.