home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckuus2.c < prev    next >
C/C++ Source or Header  |  1994-10-06  |  92KB  |  2,568 lines

  1. /*  C K U U S 2  --  User interface strings & help text module for C-Kermit  */
  2.  
  3. /*
  4.   Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),
  5.   Columbia University Academic Information Systems, New York City.
  6.  
  7.   Copyright (C) 1985, 1994, Trustees of Columbia University in the City of New
  8.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  9.   sold for profit as a software product itself, nor may it be included in or
  10.   distributed with commercial products or otherwise distributed by commercial
  11.   concerns to their clients or customers without written permission of the
  12.   Office of Kermit Development and Distribution, Columbia University.  This
  13.   copyright notice must not be removed, altered, or obscured.
  14. */
  15.  
  16. /*
  17.  This module separates long strings from the body of the other ckuus* modules.
  18. */
  19.  
  20. #include "ckcsym.h"
  21. #include "ckcdeb.h"
  22. #include "ckcnet.h"
  23. #include "ckcasc.h"
  24. #include "ckcker.h"
  25. #include "ckuusr.h"
  26. #include "ckcxla.h"
  27.  
  28. extern xx_strp xxstring;
  29. extern char *ccntab[];
  30.  
  31. #ifndef NOICP
  32. #ifdef DCMDBUF
  33. extern char *cmdbuf;
  34. #else
  35. extern char cmdbuf[];
  36. #endif /* DCMDBUF */
  37. #endif /* NOICP */
  38.  
  39. #ifdef DEBUG
  40. extern char debfil[];
  41. #endif /* DEBUG */
  42. #ifdef TLOG
  43. extern char trafil[];
  44. #endif
  45.  
  46. extern char *xarg0;
  47. extern int nrmt, nprm, dfloc, local, parity, escape;
  48. extern int turn, flow;
  49. extern int binary, warn, quiet, keep;
  50. extern int success;
  51. extern int tt_rows, tt_cols, cmd_rows, cmd_cols;
  52.  
  53. extern long speed;
  54. extern char *dftty, *versio, *ckxsys;
  55. extern struct keytab prmtab[];
  56. extern struct keytab remcmd[];
  57.  
  58. /* Command-Line help (Unix command-line arguments) */
  59.  
  60. #ifndef NOCMDL
  61. static
  62. char *hlp1[] = {
  63. #ifndef NOICP
  64. " [cmdfile] [-x arg [-x arg]...[-yyy]..] [ = text ] ]\n",
  65. #else
  66. "[-x arg [-x arg]...[-yyy]..]\n",
  67. #endif /* NOICP */
  68. "  -x is an option requiring an argument, -y an option with no argument.\n",
  69. #ifdef COMMENT /* No room for this any more */
  70. #ifndef NOICP
  71. #ifndef NOSPL
  72. "     = means ignore following words, but place them in array \\&@[].\n",
  73. #else
  74. "     = means ignore following material.\n",
  75. #endif /* NOSPL */
  76. #else
  77. "     = means ignore following material.\n",
  78. #endif /* NOICP */
  79. #endif /* COMMENT */
  80. "actions:\n",
  81. "  -s files  send files                    -r  receive files\n",
  82. "  -s -      send from stdin               -k  receive files to stdout\n",
  83. #ifndef NOSERVER
  84. "  -x        enter server mode             -f  finish remote server\n",
  85. #else
  86. "  -f        finish remote server\n",
  87. #endif /* NOSERVER */
  88. "  -g files  get remote files from server (quote wildcards)\n",
  89. "  -a name   alternate file name, used with -s, -r, -g\n",
  90. #ifndef NOLOCAL
  91. "  -c        connect (before file transfer), used with -l and -b\n",
  92. "  -n        connect (after file transfer), used with -l and -b\n",
  93. #endif /* NOLOCAL */
  94. "settings:\n",
  95. #ifndef NOLOCAL
  96. "  -l dev    communication line device     -q  quiet during file transfer\n",
  97. #ifdef NETCONN
  98. "  -j host   network host name             -i  binary file transfer\n",
  99. #else
  100. "  -i        binary file transfer\n",
  101. #endif /* NETCONN */
  102. "  -b bps    line speed, e.g. 19200        -t  half duplex, xon handshake\n",
  103. #else
  104. "  -i        binary file transfer\n",
  105. #endif /* NOLOCAL */
  106. #ifdef DEBUG
  107. "  -p x      parity, x = e,o,m,s, or n     -d  log debug info to debug.log\n",
  108. #else
  109. "  -p x      parity, x = e,o,m,s, or n\n",
  110. #endif /* DEBUG */
  111. #ifndef NOICP
  112. "  -y name   alternate init file name      -Y  no init file\n",
  113. #else
  114. #endif /* NOICP */
  115. "  -e n      receive packet length         -w  write over files\n",
  116. #ifdef UNIX
  117. "  -v n      sliding window slots          -z  force foreground\n",
  118. #else
  119. "  -v n      sliding window slots\n",
  120. #endif /* UNIX */
  121. #ifndef NODIAL
  122. "  -m name   modem type                    -R  remote-only advisory\n",
  123. #endif /* NODIAL */
  124. /*
  125.   If all this stuff is defined, we run off the screen...
  126. */
  127. #ifdef CK_NETBIOS
  128. "  -N n      NetBIOS adapter number\n",
  129. #endif /* CK_NETBIOS */
  130. #ifdef ANYX25
  131. " -o index   X.25 closed user group call   -X  X.25 address\n",
  132. " -U string  X.25 call user data           -u  X.25 reverse charge call\n",
  133. " -Z n       X.25 connection open file descriptor\n",
  134. #endif /* ANYX25 */
  135. #ifndef NOSPL
  136. "other:\n",
  137. "  -C \"command, command, ...\"  (interactive-mode commands to execute)\n",
  138. "   =  means ignore following words, but place them in array \\&@[].\n",
  139. #else
  140. "   =  means ignore following text.\n",
  141. #endif /* NOSPL */
  142. #ifdef NOICP
  143. "Operation by command-line options only.\n",
  144. #else
  145. "If no action command is included, or -S is, enter interactive dialog.\n",
  146. #endif /* NOICP */
  147. ""
  148. };
  149.  
  150. /*  U S A G E */
  151.  
  152. VOID
  153. usage() {
  154. #ifndef MINIX
  155.     conol("Usage: ");
  156.     conol(xarg0);
  157.     conola(hlp1);
  158. #else
  159.     conol("Usage: ");
  160.     conol(xarg0);
  161.     conol(" [-x arg [-x arg]...[-yyy]..] ]\n");
  162. #endif /* MINIX */
  163. }
  164. #endif /* NOCMDL */
  165.  
  166. #ifndef NOICP
  167.  
  168. /*  Interactive help strings  */
  169.  
  170. static char *tophlp[] = { 
  171. "Trustees of Columbia University in the City of New York.\n",
  172.  
  173. #ifndef NOHELP
  174. "  Type INTRO   for a brief introduction to C-Kermit.",
  175. "  Type VERSION for version and copyright information.",
  176. "  Type HELP    followed by a command name for help about a specific command.",
  177. "  Type NEWS    for news about new features.",
  178. "  Type BUG     to learn how to report bugs.",
  179. "  Press ?      (question mark) at the prompt, or anywhere within a command,",
  180. "               for a menu (context-sensitive help, menu on demand).",
  181. #else
  182. "Press ? for a list of commands; see documentation for detailed descriptions.",
  183. #endif /* NOHELP */
  184.  
  185. #ifndef NOCMDL
  186. #ifdef OS2
  187. "\n\
  188.   From system level, type \"ckermit -h\" for help about command-line options.",
  189. #else
  190. "\n\
  191.   From system level, type \"kermit -h\" for help about command-line options.",
  192. #endif /* OS2 */
  193. #endif /* NOCMDL */
  194. " ",
  195. #ifdef MAC
  196. "Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and",
  197. "Christine M. Gianone, Digital Press, 1993, ISBN: 1-55558-108-0.  To order,",
  198. "call +1 212 854-3703 or +1 800 366-2665.",
  199. #else
  200. "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
  201. "Digital Press / Butterworth-Heinemann, 1993, ISBN 1-55558-108-0.  To order,",
  202. "call +1 212 854-3703 or +1 800 366-2665.  Please purchase the documentation.",
  203. "It teaches you how to use C-Kermit and answers your questions; sales are a",
  204. "primary source of funding for the Kermit effort.",
  205. #endif /* MAC */
  206. " ",
  207. #ifdef OS2
  208. "Also view the CKERMIT.INF file for updates on the new features in",
  209. "versions 5A(189) and 5A(190).  Use the OS/2 VIEW program for this, or", 
  210. "type UPDATES at the C-Kermit> prompt.",
  211. #else
  212. #ifdef MAC
  213. "Also see the Mac Kermit Doc and Bwr files on the Mac Kermit diskette.\n",
  214. #else
  215. #ifdef HPUX10
  216. "See /usr/share/lib/kermit/ckcker.upd for new features in edits 189 and 190.", 
  217. #else
  218. "Also see the file CKCKER.UPD for new features in edits 189 and 190.",
  219. #endif /* HPUX10 */
  220. #endif /* MAC */
  221. #endif /* OS2 */
  222. ""
  223. };
  224.  
  225. #ifndef NOHELP 
  226. char *newstxt[] = {
  227. #ifdef OS2
  228. "Numerous features have been added to OS/2 C-Kermit since \"Using C-Kermit\"",
  229. "was published.  These include:\n",
  230. #ifdef CK_NETBIOS
  231. " . New networking support: TCP/IP, NETBIOS, and Named Pipes",
  232. #else
  233. " . New networking support: TCP/IP and Named Pipes",
  234. #endif /* CK_NETBIOS */
  235. " . VT220 and ANSI terminal emulation",
  236. " . A completely new and more flexible method of key mapping",
  237. " . A compose key for entering accented characters",
  238. #ifdef OS2MOUSE
  239. " . Mouse actions in the terminal screeen: cursor motion, copy & paste",
  240. #endif /* OS2MOUSE */
  241. " . Hebrew terminal emulation",
  242. " . Binary-mode file transfer recovery from point of failure",
  243. " . Auto download and upload capability",
  244. " . Control-character unprefixing for faster file transfer",
  245. " . OS/2 Extended Attribute and Longname support",
  246. " . REXX programming support",
  247. " . Command retry and recall",
  248. " . New functions and variables, new IF conditions\n",
  249. "and much more.  All the changes and new features are fully documented in the",
  250. "CKERMIT.INF file which you can click on or browse with the OS/2 VIEW \
  251. command.",
  252. #else
  253. #ifdef HPUX
  254. "Numerous features have been added to C-Kermit since \"Using C-Kermit\" was",
  255. "published.  These include file transfer recovery, control-character",
  256. "unprefixing for faster file transfer, HP-Roman8 and Hebrew character-set",
  257. "support, new functions and variables, new IF conditions, command retry and",
  258. "recall, a new interface to external protocols, and much more.  All the",
  259. "changes and new features are fully documented in the C-Kermit Update file,",
  260. #ifdef HPUX10
  261. "/usr/share/lib/kermit/ckcker.upd.",
  262. #else
  263. "ckcker.upd, that is distributed with C-Kermit.",
  264. #endif /* HPUX10 */
  265. #else
  266. "Numerous features have been added to C-Kermit since \"Using C-Kermit\" was",
  267. "published.  These include file transfer recovery, control-character",
  268. "unprefixing for faster file transfer, Hebrew character-set support, new",
  269. "functions and variables, new IF conditions, command retry and recall, a new",
  270. "interface to external protocols, and much more.  All the changes and new",
  271. "features are fully documented in the file CKCKER.UPD (C-Kermit Update) that",
  272. "is distributed along with C-Kermit.",
  273. #endif /* HPUX */
  274. #endif /* OS2 */
  275. ""
  276. };
  277. #endif /* NOHELP */
  278.  
  279. #ifndef NOHELP
  280. char *introtxt[] = {
  281. #ifdef OS2
  282. "Welcome to OS/2 C-Kermit communications software for:",
  283. #else
  284. #ifdef UNIX
  285. #ifdef HPUX
  286. "Welcome to HP-UX C-Kermit communications software for:",
  287. #else
  288. "Welcome to UNIX C-Kermit communications software for:",
  289. #endif /* HPUX */
  290. #else
  291. #ifdef VMS
  292. "Welcome to VMS C-Kermit communications software for:",
  293. #else
  294. #ifdef VOS
  295. "Welcome to VOS C-Kermit communications software for:",
  296. #else
  297. #ifdef MAC
  298. "Welcome to Mac Kermit communications software for:",
  299. #else
  300. "Welcome to C-Kermit communications software for:",
  301. #endif /* MAC */
  302. #endif /* VOS */
  303. #endif /* VMS */
  304. #endif /* UNIX */
  305. #endif /* OS2 */
  306. " . Error-free and efficient file transfer",
  307. #ifdef OS2
  308. " . VT220, VT102, VT100, VT52, and ANSI terminal emulation",
  309. #else
  310. #ifdef MAC
  311. " . VT220 terminal emulation",
  312. #else
  313. " . Terminal connection",
  314. #endif /* MAC */
  315. #endif /* OS2 */
  316. #ifndef NOSPL
  317. " . Script programming",
  318. #endif /* NOSPL */
  319. #ifndef NOICS
  320. " . International character set conversion",
  321. #endif /* NOICS */
  322. #ifndef NOLOCAL
  323. "\nSupporting:",
  324. " . Serial connections, direct or dialed.",
  325. #ifndef NODIAL
  326. " . Automatic modem dialing",
  327. #endif /* NODIAL */
  328. #ifdef TCPSOCKET
  329. " . TCP/IP network connections",
  330. #endif /* TCPSOCKET */
  331. #ifdef ANYX25
  332. " . X.25 network connections",
  333. #endif /* ANYX25 */
  334. #ifdef OS2
  335. #ifdef DECNET
  336. " . DECnet/PATHWORKS LAT Ethernet connections",
  337. #endif /* DECNET */
  338. #ifdef NPIPE
  339. " . LAN Manager named-pipe network connections",
  340. #endif /* NPIPE */
  341. #ifdef CK_NETBIOS
  342. " . NETBIOS connections",
  343. #endif /* CK_NETBIOS */
  344. #endif /* OS2 */
  345. #endif /* NOLOCAL */
  346.  
  347. "\nWhile typing commands, you may use the following special characters:",
  348. " . DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
  349. " . CTRL-W:  Delete the most recent word typed.",
  350. " . CTRL-U:  Delete the current line.",
  351. " . CTRL-R:  Redisplay the current line.",
  352. #ifdef CK_RECALL
  353. #ifdef OS2
  354. " . \030 or CTRL-B: Command recall - go backwards in command recall buffer.",
  355. " . \031 or CTRL-N: Command recall - go forward in command recall buffer.",
  356. #else
  357. " . CTRL-P:  Command recall - go backwards in command recall buffer.",
  358. " . CTRL-B:  Command recall - same as Ctrl-P.",
  359. " . CTRL-N:  Command recall - go forward in command recall buffer.",
  360. #endif /* OS2 */
  361. #endif /* CK_RECALL */
  362. " . ?        (question mark) Display a menu for the current command field.",
  363. " . ESC      (or TAB) Attempt to complete the current field.",
  364. " . \\        (backslash) include the following character literally",
  365. #ifndef NOSPL
  366. "            or introduce a backslash code, variable, or function.",
  367. #else
  368. "            or introduce a numeric backslash code.",
  369. #endif /* NOSPL */
  370. "  Command words other than filenames can be abbreviated in most contexts.",
  371.  
  372. "\nBasic C-Kermit commands:",
  373. "  EXIT          exit from C-Kermit",
  374. "  HELP          request general help",
  375. "  HELP command  request help about the given command",
  376. "  TAKE          execute commands from a file",
  377.  
  378. "\nCommands for file transfer:",
  379. "  SEND          send files",
  380. #ifdef CK_RESEND
  381. "  RESEND        recover an interrupted file transfer",
  382. #endif /* CK_RESEND */
  383. "  RECEIVE       receive files",
  384. #ifndef NOSERVER
  385. "  SERVER        be a file transfer server",
  386. #endif /* NOSERVER */
  387.  
  388. "\nImportant settings:",
  389. "  SET PARITY    communications parity",
  390. #ifdef CK_RTSCTS
  391. "  SET FLOW      communications flow control, such as RTS/CTS",
  392. #else
  393. "  SET FLOW      communications flow control, such as XON/XOFF",
  394. #endif /* CK_RTSCTS */
  395. "  SET FILE      file settings, for example TYPE TEXT or TYPE BINARY",
  396.  
  397. #ifndef NOLOCAL
  398. "\nTo make a direct serial connection:",
  399. #ifdef OS2
  400. "  SET PORT      select serial communication port or server",
  401. #else
  402. "  SET LINE      select serial communication device",
  403. #endif /* OS2 */
  404. "  SET SPEED     select communication speed",
  405. "  CONNECT       begin terminal connection",
  406.  
  407. #ifndef NODIAL
  408. "\nTo dial out with a modem:",
  409. "  SET MODEM     select modem type",
  410. #ifdef OS2
  411. "  SET PORT      select serial communication port or server",
  412. #else
  413. "  SET LINE      select serial communication device",
  414. #endif /* OS2 */
  415. "  SET SPEED     select communication speed",
  416. "  DIAL          dial the phone number",
  417. "  CONNECT       begin terminal connection",
  418. #endif /* NODIAL */
  419.  
  420. #ifdef NETCONN
  421. "\nTo make a network connection:",
  422. "  SET NETWORK   select network type",
  423. "  SET HOST      select network host",
  424. "  CONNECT       begin terminal connection",
  425. #ifdef TNCODE
  426. "  TELNET        select a TCP/IP host and CONNECT to it",
  427. #endif /* TNCODE */
  428. #endif /* NETCONN */
  429.  
  430. "\nTo return from a terminal connection to the C-Kermit prompt:",
  431. #ifdef OS2
  432. "  \
  433. Press the key or key-combination shown after \"Prompt:\" in the status line",
  434. "  (such as Alt-x) or type your escape character followed by the letter C.",
  435. #else
  436. "  Type your escape character followed by the letter C.",
  437. #endif /* OS2 */
  438.  
  439. "\nTo display your escape character:",
  440. "  SHOW ESCAPE",
  441. "\nTo display other settings:",
  442. "  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
  443. #else  /* !NOLOCAL */
  444. "\nTo display settings:",
  445. "  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
  446. #endif /* NOLOCAL */
  447. "\nTo speed up file transfers:",
  448. "  SET RECEIVE PACKET-LENGTH  (use bigger packets)",
  449. "  SET WINDOW                 (use sliding windows)",
  450. "  SET CONTROL UNPREFIX       (reduce prefixing overhead)",
  451.  
  452. "\nFor further information about a particular command, type HELP xxx,",
  453. "where xxx is the name of the command.  For documentation, news of new",
  454. "releases, and information about other Kermit software, contact:\n",
  455. "  Kermit Distribution        E-mail:",
  456. "  Columbia University        kermit@columbia.edu (Internet)",
  457. "  612 West 115th Street      KERMIT@CUVMA (BITNET/EARN/CREN)",
  458. "  New York, NY  10025  USA",
  459. "  Phone: +1 212 854-3703     Fax: +1 212 663-8202",
  460. ""
  461. };
  462.  
  463. static char *hmxxbye = "Syntax: BYE\n\
  464. Shut down and log out a remote Kermit server";
  465.  
  466. static char *hmxxclo[] = {
  467. "Syntax:  CLOSE name",
  468. "Example: CLOSE PACKET\n",
  469. "Close one of the following logs or files:",
  470. #ifndef NOLOCAL
  471. "  SESSION",
  472. #endif /* NOLOCAL */
  473. #ifdef TLOG
  474. "  TRANSACTION",
  475. #endif /* TLOG */
  476. "  PACKET",
  477. #ifdef DEBUG
  478. "  DEBUGGING",
  479. #endif /* DEBUG */
  480. #ifndef NOSPL
  481. "  READ",
  482. "  WRITE",
  483. #endif /* NOSPL */
  484. "Type HELP LOG and HELP OPEN for further info.", "" };
  485.  
  486. #ifdef CK_MINPUT
  487. static char *hmxxminp[] = {
  488. "Syntax:  MINPUT n [ string1 [ string2 [ ... ] ] ]",
  489. "Example: MINPUT 5 Login: {Username: } {NO CARRIER} BUSY RING\n",
  490. "For use in script programs.  Waits up to n seconds for any one of the",
  491. "strings to arrive on the communication device.  If no strings are given, the",
  492. "command waits for any character at all to arrive.  Strings are separated by",
  493. "spaces; use { braces } for grouping.  If any of the strings is encountered",
  494. "within the timeout interval, the command succeeds and the \\v(minput)",
  495. "variable is set to the number of the string that was matched: 1, 2, 3, etc.",
  496. "If none of the strings arrives, the command times out, fails, and",
  497. "\\v(minput) is set to 0.\n",
  498. "Also see: INPUT, REINPUT, SET INPUT.",
  499. "" };
  500. #endif /* CK_MINPUT */
  501.  
  502. #ifndef NOLOCAL
  503. static char *hmxxcon[] = { "Syntax: CONNECT (or C) [/QUIETLY]\n",
  504. "Connect to a remote computer via the serial communications device given in",
  505. "the most recent SET LINE command, or to the network host named in the most",
  506. "recent SET HOST command.  Type the escape character followed by C to get",
  507. "back to the C-Kermit prompt, or followed by ? for a list of CONNECT-mode",
  508. #ifdef OS2
  509. "escape commands.  In OS/2 C-Kermit, you can also assign the \\Kexit verb",
  510. "to the key or key-combination of your choice; by default it is assigned",
  511. "to Alt-x.",
  512. #else
  513. "escape commands.",
  514. "\nInclude the /QUIETLY switch to suppress the informational message that",
  515. "tells you how to escape back, etc.",
  516. #endif /* OS2 */
  517. "" };
  518. #endif /* NOLOCAL */
  519.  
  520. static char *hmxxget = "Syntax: GET filespec\n\
  521. Tell the remote Kermit server to send the named file or files.\n\
  522. If the filespec is omitted, then you are prompted for the remote and\n\
  523. local filenames separately.";
  524.  
  525. static char *hmxxlg[] = { "Syntax: LOG (or L) name [ { NEW, APPEND } ]",
  526. "Record information in a log file:\n",
  527. #ifdef DEBUG
  528. "DEBUGGING     Debugging information, to help track down bugs in the C-Kermit",
  529. "              program (default log name is debug.log).\n",
  530. #endif /* DEBUG */
  531. "PACKETS       Kermit packets, to help with protocol problems (packet.log)",
  532. #ifndef NOLOCAL
  533. "SESSION       Terminal session, during CONNECT command (session.log)",
  534. #endif /* NOLOCAL */
  535. #ifdef TLOG
  536. "TRANSACTIONS  Names and statistics about files transferred (transact.log)\n",
  537. #endif /* TLOG */
  538. "If you include the APPEND keyword after the filename, the existing log file,",
  539. "if any, is appended to; otherwise a new file is created.",
  540. "" } ;
  541.  
  542. #ifndef NOSCRIPT
  543. static char *hmxxlogi[] = { "\
  544. Syntax: SCRIPT text\n",
  545. "Login to a remote system using the text provided.  The login script",
  546. "is intended to operate similarly to uucp \"L.sys\" entries.",
  547. "A login script is a sequence of the form:\n",
  548. "  expect send [expect send] . . .\n",
  549. "where 'expect' is a prompt or message to be issued by the remote site, and",
  550. "'send' is the names, numbers, etc, to return.  The send may also be the",
  551. "keyword EOT, to send control-d, or BREAK (or \\\\b), to send a break signal.",
  552. "Letters in send may be prefixed by ~ to send special characters.  These are:",
  553. "~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t",
  554. "append a return, and ~o[o[o]] for octal of a character.  As with some",
  555. "uucp systems, sent strings are followed by ~r unless they end with ~c.\n",
  556. "Only the last 7 characters in each expect are matched.  A null expect,",
  557. "e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect",
  558. "that a sequence might not arrive, as with uucp, conditional sequences",
  559. "may be expressed in the form:\n",
  560. "  -send-expect[-send-expect[...]]\n",
  561. "where dashed sequences are followed as long as previous expects fail.",
  562. "" };
  563. #endif
  564.  
  565. static char *hmxxrc[] = { "Syntax: RECEIVE (or R) [filespec]\n",
  566. "Wait for a file to arrive from the other Kermit, which must be given a",
  567. "SEND command.  If the optional filespec is given, the (first) incoming",
  568. "file will be stored under that name, otherwise it will be stored under",
  569. #ifndef CK_TMPDIR
  570. "the name it arrives with.",
  571. #else
  572. #ifdef OS2
  573. "the name it arrives with.  If the filespec denotes a disk and/or directory,",
  574. "the incoming file or files will be stored there.",
  575. #else
  576. "the name it arrives with.  If the filespec denotes a directory, the",
  577. "incoming file or files will be placed in that directory.",
  578. #endif /* OS2 */
  579. #endif /* CK_TMPDIR */
  580. "" } ;
  581.  
  582. static char *hmxxsen = "\
  583. Syntax: SEND (or S) filespec [name]\n\n\
  584. Send the file or files specified by filespec.\n\
  585. filespec may contain wildcard characters '*' or '?'.  If no wildcards,\n\
  586. then 'name' may be used to specify the name 'filespec' is sent under; if\n\
  587. 'name' is omitted, the file is sent under its own name.";
  588.  
  589. #ifndef NORESEND
  590. static char *hmxxrsen = "\
  591. Syntax: RESEND filespec [name]\n\n\
  592. Resend the file or files, whose previous transfer was interrupted.\n\
  593. Picks up from where previous transfer left off, IF the receiver was told\n\
  594. to SET FILE INCOMPLETE KEEP.  Only works for binary-mode transfers.\n\
  595. Requires the other Kermit to have RESEND capability.";
  596.  
  597. static char *hmxxpsen = "\
  598. Syntax: PSEND filespec position [name]\n\n\
  599. Just like SEND, except sends the file starting at the given byte position.";
  600. #endif /* NORESEND */
  601.  
  602. #ifndef NOMSEND
  603. static char *hmssmse = "\
  604. Syntax: MSEND filespec [ filespec [ ... ] ]\n\n\
  605. Send the files specified by the filespecs.  One or more filespecs may be\n\
  606. listed, separated by spaces.  Any or all filespecs may contain wildcards\n\
  607. and they may be in different directories.  An alternate name cannot be given.";
  608. #endif /* NOMSEND */
  609.  
  610. #ifndef NOSERVER
  611. static char *hmxxser = "Syntax: SERVER\n\n\
  612. Enter server mode on the currently selected line.  All further commands\n\
  613. will be taken in packet form from the other Kermit program.  Use FINISH\n\
  614. or BYE to get C-Kermit out of server mode.";
  615. #endif /* NOSERVER */
  616.  
  617. static char *hmhset[] = { "\
  618. The SET command is used to establish various communication or file",
  619. "parameters.  The SHOW command can be used to display the values of",
  620. "SET parameters.  Help is available for each individual parameter;",
  621. "type HELP SET ? to see what's available.",
  622. "" } ;
  623.  
  624. #ifndef NOSETKEY
  625. static char *hmhskey[] = {
  626. "Syntax: SET KEY k text",
  627. "Or:     SET KEY CLEAR\n",
  628. "Configure the key whose \"scan code\" is k to send the given text when",
  629. "pressed during CONNECT mode.  SET KEY CLEAR restores all the default",
  630. "key mappings.  If there is no text, the default key binding is restored for",
  631. #ifndef NOCSETS
  632. "the key k.  SET KEY mappings take place before terminal character-set",
  633. "translation.",
  634. #else
  635. "the key k.",
  636. #endif /* NOCSETS */
  637. #ifdef OS2
  638. "\nThe text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
  639. "keypad, function, or editing keys, etc.  For a list of available keyboard",
  640. "verbs, type SHOW KVERBS.",
  641. #endif /* OS2 */
  642. "\nTo find out the scan code and mapping for a particular key, use the",
  643. "SHOW KEY command.",
  644. ""};
  645. #endif /* NOSETKEY */
  646.  
  647. static char *hmxychkt[] = { "Syntax: SET BLOCK-CHECK type\n",
  648. "Type of packet block check to be used for error detection, 1, 2, 3, or",
  649. "BLANK-FREE-2.  Type 1 is standard, and catches most errors.  Types 2 and 3",
  650. "specify more rigorous checking at the cost of higher overhead.  The",
  651. "BLANK-FREE-2 type is the same as Type 2, but is guaranteed to contain no",
  652. "blanks.",
  653. "" } ;
  654.  
  655. #ifdef CK_SPEED
  656. static char *hmxyqctl[] = {
  657. "Syntax: SET CONTROL-CHARACTER { PREFIXED, UNPREFIXED } { <code>..., ALL }\n",
  658. "<code> is the numeric ASCII code for a control character 1-31, 127-159, 255.",
  659. "The word \"ALL\" means the command applies to all characters in this range.",
  660. "\nPREFIXED <code> means the given control character must be converted to a",
  661. " printable character and prefixed, the default for all control characters.",
  662. "\nUNPREFIXED <code> means you think it is safe to send the given control",
  663. " character as-is, without a prefix.  USE THIS OPTION AT YOUR OWN RISK!",
  664. "\nSHOW CONTROL to see current settings.  SET CONTROL PREFIXED ALL is",
  665. "recommended for safety.  You can include multiple <code> values in one",
  666. "command, separated by spaces.",
  667. "" };
  668. #endif /* CK_SPEED */
  669.  
  670. #ifndef NODIAL
  671. static char *hmxydial[] = {
  672. "SET DIAL DIAL-COMMAND [ text ]",
  673. "The 'text' replaces C-Kermit's built-in modem dialing command.  It must",
  674. "include '%s' (percent s) as a place-holder for the telephone numbers",
  675. "given in your DIAL commands.  If the 'text' is omitted, C-Kermit uses its",
  676. "built-in modem-specific dialing command.\n",
  677. "SET DIAL DIRECTORY filename",
  678. "Name of dialing directory file.  Type HELP DIAL for further info.\n",
  679. "SET DIAL DISPLAY {ON, OFF}",
  680. "Whether to display dialing progress on the screen.\n",
  681. "SET DIAL HANGUP {ON, OFF}",
  682. "Whether the DIAL command should hang up the phone before dialing.\n",
  683. "SET DIAL INIT-STRING [ text ]",
  684. "The 'text' is a replacement for C-Kermit's built-in initialization command",
  685. "for the modem.  If 'text' omitted, use built-in initialization command.\n",
  686. "SET DIAL KERMIT-SPOOF {ON, OFF}",
  687. "If the selected modem type supports the Kermit protocol directly,",
  688. "use this command to turn its Kermit protocol function on or off.\n",
  689. "SET DIAL MODEM-HANGUP {ON, OFF}",
  690. "Governs how the HANGUP, <esc>H, and similar operations work when you have",
  691. "a dialed connection (in local mode, and a specific modem type is set).",
  692. "ON means to use modem commands to hang up the phone, e.g. ATH0.",
  693. "OFF means to hang up by attempting to turn off the DTR signal.",
  694. "ON is not necessarily supported for all modem types.\n",
  695. "SET DIAL MNP-ENABLE {ON, OFF}",
  696. "Enable or disable MNP negotiation by the modem.\n",
  697. "SET DIAL PREFIX [ text ]",
  698. "Establish a prefix to be applied to the phone numbers given in the DIAL",
  699. "command or read from the dialing directory.\n",
  700. "SET DIAL SPEED-MATCHING {ON, OFF}",
  701. "ON (the default) means that C-Kermit changes its serial interface speed to",
  702. "agree with the speed reported by the modem's CONNECT message, if any.  OFF",
  703. "means that C-Kermit should not change its interface speed.\n",
  704. "SET DIAL TIMEOUT number",
  705. "How many seconds to wait for a dialed call to complete.  Use this command",
  706. "to override the DIAL command's automatic timeout calculation.  A value",
  707. "of 0 turns off this feature and returns to Kermit's automatic dial",
  708. "timeout calculation.\n",
  709. "Also see DIAL and SET MODEM.  Use SHOW DIAL to display dial-related",
  710. "settings.\n",
  711. "" } ;
  712. #endif /* NODIAL */
  713.  
  714. static char *hmxyflo[] = { "Syntax: SET FLOW value\n",
  715. #ifndef NOLOCAL
  716. "Type of flow control to use during file transfer and CONNECT mode.",
  717. #else
  718. "Type of flow control to use during file transfer.",
  719. #endif /* NOLOCAL */
  720. "Choices: KEEP (don't change device's current setting), XON/XOFF (software",
  721. "flow control, the default), NONE (no flow control at all), and possibly",
  722. "others including RTS/CTS (hardware) depending on the capabilities of your",
  723. "computer and operating system.  Type SET FLOW ? for a list.",
  724. ""};
  725.  
  726. static char *hmxyf[] = { "Syntax: SET FILE parameter value",
  727. "Parameters:\n",
  728.  
  729. "BYTESIZE { 7, 8 }: normally 8.  If 7, truncate the 8th bit of all file \
  730. bytes.\n",
  731.  
  732. #ifndef NOCSETS
  733. "CHARACTER-SET: tells the encoding of the local file, ASCII by default.",
  734. "The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646",
  735. "national character sets.  LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1",
  736. "for Western European languages.",
  737. "NEXT is the 8-bit character set of the NeXT workstation.",
  738. "The CPnnn sets are for IBM PCs.  MACINTOSH-LATIN is for the Macintosh.",
  739. #ifndef NOLATIN2
  740. "LATIN2 is ISO 8859-2 for Eastern European languages that are written with",
  741. "Roman letters.",
  742. #endif /* NOLATIN2 */
  743. #ifdef CYRILLIC
  744. "KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.",
  745. "SHORT-KOI is a 7-bit ASCII coding for Cyrillic.",
  746. #endif /* CYRILLIC */
  747. #ifdef HEBREW
  748. "HEBREW-ISO is ISO 8859-8 Latin/Cyrillic.  CP862 is the Hebrew PC code page.",
  749. "HEBREW-7 is like ASCII with the lowercase letters replaced by Hebrew.",
  750. #endif /* HEBREW */
  751. #ifdef KANJI
  752. "JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI are Japanese",
  753. "Kanji character sets.",
  754. #endif /* KANJI */
  755. "Type SET FILE CHAR ? for a complete list of file character sets.\n",
  756. #endif /* NOCSETS */
  757.  
  758. "COLLISION tells what to do when a file arrives that has the same name as",
  759. "an existing file.  The options are:",
  760. "  BACKUP (default) - Rename the old file to a new, unique name and store",
  761. "    the incoming file under the name it was sent with.",
  762. "  OVERWRITE - Overwrite (replace) the existing file.",
  763. "  APPEND - Append the incoming file to the end of the existing file.",
  764. "  DISCARD - Refuse and/or discard the incoming file.",
  765. "  RENAME - Give the incoming file a unique name.",
  766. "  UPDATE - Accept the incoming file only if it is newer than the existing",
  767. "    file.",
  768. "Example: SET FILE COLLISION UPDATE\n",
  769.  
  770. "SET FILE DISPLAY selects the format of the file transfer display for",
  771. "local-mode file transfer.  The choices are:",
  772. "  SERIAL (the default).  One dot is printed for every K bytes transferred.",
  773. "    This format works on any kind of terminal, even a hardcopy.",
  774. "  CRT.  Numbers are continuously updated on a single screen line.  This",
  775. "    format can be used on any video display terminal.",
  776. #ifdef CK_CURSES
  777. "  FULLSCREEN.  A fully formatted 24x80 screen showing lots of information.",
  778. "    This requires a video display terminal whose control sequences are",
  779. "    understood by Kermit.",
  780. #endif /* CK_CURSES */
  781. "  NONE.  No file transfer display at all.\n",
  782.  
  783. "INCOMPLETE - what to do with an incompletely received file: DISCARD",
  784. "(default), or KEEP.\n",
  785.  
  786. #ifdef VMS
  787. "LABEL { ACL, BACKUP-DATE, NAME, OWNER, PATH } { ON, OFF } - Tells which",
  788. "items to include (ON) or exclude (OFF) in labeled file transfer.",
  789. #else
  790. #ifdef OS2
  791. "LABEL { ARCHIVE, READ-ONLY, HIDDEN, SYSTEM, EXTENDED } { ON, OFF }",
  792. "Tells which items to include (ON) or exclude (OFF) in labeled file transfer.",
  793. #endif /* OS2 */
  794. #endif /* VMS */
  795.  
  796. "NAMES are normally CONVERTED to 'common form' during transmission; LITERAL",
  797. "means use filenames literally (useful between like systems).  Also see",
  798. "SET SEND PATHNAMES and SET RECEIVE PATHNAMES.\n",
  799.  
  800. #ifdef VMS
  801. "RECORD-LENGTH sets the record length for received files of type BINARY. Use",
  802. "this to receive VMS BACKUP savesets or other fixed-format files. The default",
  803. "of 512 is suitable for executable (.EXE) files, etc.\n",
  804. "Example: SET FILE REC 8192\n",
  805. #endif /* VMS */
  806.  
  807. "TYPE: How file contents are to be treated during file transfer.",
  808. "TYPE is normally TEXT, with conversion of record format and character set.",
  809. "BINARY means to do no conversion.  Use BINARY for executable programs or",
  810. "binary data.  Example: SET FILE TYPE BINARY.\n",
  811.  
  812. #ifdef VMS
  813. "For VMS, you may include an optional record-format after the word",
  814. "BINARY.  This may be FIXED (the default) or UNDEFINED.",
  815. "Two additional VMS file types are also supported: IMAGE and LABELED.  IMAGE",
  816. "means raw block i/o, no interference from RMS, and applies to file transmis-",
  817. "sion only.  LABELED means to send or interpret RMS attributes with the file.",
  818. "\n",
  819. #endif /* VMS */
  820.  
  821. "WARNING.  SET FILE WARNING is superseded by the newer command, SET FILE",
  822. "COLLISION.  SET FILE WARNING ON is equivalent to SET FILE COLLISION RENAME",
  823. "and SET FILE WARNING OFF is equivalent to SET FILE COLLISION OVERWRITE.\n",
  824.  
  825. "" };
  826.  
  827. static char *hmxyhsh[] = { "Syntax: SET HANDSHAKE value\n",
  828. "Character to use for half duplex line turnaround handshake during file",
  829. "transfer.  C-Kermit waits for this character from the other computer before",
  830. "sending its next packet.  Default is NONE, others are XON, LF, BELL, ESC,",
  831. "etc.  SET HANDSHAKE CODE <n> lets you specify the numeric ASCII value of the",
  832. "handshake character.  Type SET HANDSH ? for a list.",
  833. "" };
  834.  
  835. #ifndef NOSERVER
  836. static char *hsetsrv[] = {"\
  837. SET SERVER DISPLAY {ON,OFF}",
  838. "Tell whether local-mode C-Kermit during server operation should put a",
  839. "file transfer display on the screen.  Default is OFF.\n",
  840. "SET SERVER TIMEOUT n",
  841. "Server command wait timeout interval, how often the C-Kermit server issues",
  842. "a NAK while waiting for a command packet.  Specify 0 for no NAKs at all.",
  843. "Default is 0.",
  844. "" };
  845. #endif /* NOSERVER */
  846.  
  847. static char *hmhrmt[] = { "\
  848. The REMOTE command is used to send file management instructions to a",
  849. "remote Kermit server.  There should already be a Kermit running in server",
  850. "mode on the other end of the currently selected line.  Type REMOTE ? to",
  851. "see a list of available remote commands.  Type HELP REMOTE x to get",
  852. "further information about a particular remote command 'x'.",
  853. "" } ;
  854.  
  855. #ifndef NOSPL
  856. static char *ifhlp[] = { "Syntax: IF [NOT] condition command\n",
  857. "If the condition is (is not) true, do the command.  Only one command may",
  858. "be given, and it must appear on the same line as the IF.  Conditions are:\n",
  859. "  SUCCESS     - the previous command succeeded",
  860. "  FAILURE     - the previous command failed",
  861. "  BACKGROUND  - C-Kermit is running in the background",
  862. #ifdef CK_IFRO
  863. "  FOREGROUND  - C-Kermit is running in the foreground",
  864. "  REMOTE-ONLY - C-Kermit was started with the -R command-line option\n",
  865. #else
  866. "  FOREGROUND  - C-Kermit is running in the foreground\n",
  867. #endif /* CK_IFRO */
  868. "  DEFINED variablename or macroname - The named variable or macro is defined",
  869. #ifdef CK_TMPDIR
  870. "  DIRECTORY string                  - The string is the name of a directory",
  871. #endif /* CK_TMPDIR */
  872. #ifdef ZFCDAT
  873. "  NEWER file1 file2                 - The 1st file is newer than the 2nd one",
  874. #endif /* ZFCDAT */
  875. "  NUMERIC variable or constant      - The variable or constant is numeric",
  876. "  EXIST filename                    - The named file exists\n",
  877. "  COUNT   - subtract one from COUNT, execute the command if the result is",
  878. "            greater than zero (see SET COUNT)\n",
  879. "  EQUAL s1 s2 - s1 and s2 (character strings or variables) are equal",
  880. "  LLT s1 s2   - s1 is lexically (alphabetically) less than s2",
  881. "  LGT s1 s1   - s1 is lexically (alphabetically) greater than s2\n",
  882. "  = n1 n1 - n1 and n2 (numbers or variables containing numbers) are equal",
  883. "  < n1 n2 - n1 is arithmetically less than n2",
  884. "  > n1 n2 - n1 is arithmetically greater than n2\n",
  885. "The IF command may be followed on the next line by an ELSE command. Example:",
  886. "  IF < \\%x 10 ECHO It's less",
  887. "  ELSE echo It's not less\n",
  888. "See also XIF.",
  889. "" };
  890.  
  891. static char *hmxxeval[] = {"Syntax: EVALUATE expression\n",
  892. "Evaluate an integer arithmetic expression and print its value.  The",
  893. "expression can contain numbers and/or numeric-valued variables or functions.",
  894. "Operators include +-/*(), etc.  Example: EVAL (1+1) * (\\%a / 3).",
  895. "" };
  896. #endif /* NOSPL */
  897.  
  898. #ifndef NOSPL
  899. static char *ifxhlp[] = { "\
  900. Syntax: XIF condition { commandlist } [ ELSE { commandlist } ]\n",
  901. "Extended IF command.  The conditions are the same as for IF (type HELP IF)",
  902. "but multiple comma-separated commands may be grouped within braces in both", 
  903. "the IF and ELSE parts.  The ELSE part, if any, must be on the same line as",
  904. "the XIF (or use dash for line continuation).  Example:\n",
  905. "  XIF equal \\%a YES { echo OK, goto begin } ELSE { echo Not OK, stop }",
  906. "" };
  907. #endif /* NOSPL */
  908.  
  909. #ifndef NOSPL
  910. static char *forhlp[] = { "\
  911. Syntax: FOR variablename initial-value final-value increment { commandlist }",
  912. "\nFOR loop.  Execute the comma-separated commands in the commandlist the",
  913. "number of times given by the initial value, final value and increment.",
  914. "Example:  FOR \\%i 10 1 -1 { pause 1, echo \\%i }", "" };
  915.  
  916. static char *whihlp[] = { "\
  917. Syntax: WHILE condition { commandlist }",
  918. "\nWHILE loop.  Execute the comma-separated commands in the bracketed",
  919. "commandlist while the condition is true.  Conditions are the same as for",
  920. "IF commands.",
  921. "" };
  922. #endif /* NOSPL */
  923.  
  924. #ifndef NOSPL
  925. static char *openhlp[] = {
  926. "Syntax:  OPEN mode filename\n",
  927. "For use with READ and WRITE commands.  Open the local file in the specified",
  928. "mode: READ, WRITE, or APPEND.  !READ and !WRITE mean to read from or write",
  929. "to a system command rather than a file.  Examples:\n",
  930. "  OPEN READ oofa.txt",
  931. "  OPEN !READ sort foo.bar",
  932. "" };
  933. #endif /* NOSPL */
  934.  
  935. #ifndef NOSPL
  936. static char *hxxaskq[] = {
  937. "Syntax:  ASKQ variablename [ prompt ]",
  938. "Example: ASKQ \\%p { Password:}\n",
  939. "Issues the prompt and defines the variable to be whatever you type in.",
  940. "The characters that you type do not echo on the screen.",
  941. "Use braces to preserve leading and/or trailing spaces in the prompt.",
  942. "To include a question mark, precede it by backslash (\\).",""
  943. };
  944.  
  945. static char *hxxask[] = {
  946. "Syntax:  ASK variablename [ prompt ]",
  947. "Example: ASK \\%n { What is your name\\? }\n",
  948. "Issues the prompt and defines the variable to be whatever you type in.",
  949. "Use braces to preserve leading and/or trailing spaces in the prompt.",
  950. "To include a question mark, precede it by backslash (\\).",""
  951. };
  952.  
  953. static char *hxxgetc[] = {
  954. "Syntax:  GETC variablename [ prompt ]",
  955. "Example: GETC \\%c { Type any character to continue...}\n",
  956. "Issues the prompt and sets the variable to the first character you type.",
  957. "Use braces to preserve leading and/or trailing spaces in the prompt.", ""
  958. };
  959. #endif /* NOSPL */
  960.  
  961. #ifndef NOSPL
  962. static char *hxxdef[] = {
  963. "Syntax: DEFINE name [ definition ]\n",
  964. "Defines a macro or variable.  Its value is the definition, taken literally.",
  965. "No expansion or evaluation of the definition is done.  Thus if the", 
  966. "definition includes any variable or function references, their names are",
  967. "included, rather than their values (compare with ASSIGN).  If the definition",
  968. "is omitted, then the named variable or macro is undefined.\n",
  969. "A typical macro definition looks like this:\n",
  970. "  DEFINE name command, command, command, ...\n",
  971. "for example:\n",
  972. "  DEFINE vax set parity even, set duplex full, set flow xon/xoff\n",
  973. "which defines a Kermit command macro called 'vax'.  The definition is a",
  974. "comma-separated list of Kermit commands.  Use the DO command to execute",
  975. "the macro, or just type its name, followed optionally by arguments.\n",
  976. "The definition of a variable can be anything at all, for example:\n",
  977. "  DEFINE \\%a Monday",
  978. "  DEFINE \\%b 3\n",
  979. "These variables can be used almost anywhere, for example:\n",
  980. "  ECHO Today is \\%a",
  981. "  SET BLOCK-CHECK \\%b",
  982. "" };
  983. #endif /* NOSPL */
  984.  
  985. #ifndef NOSPL
  986. static char *hxxass[] = {
  987. "Syntax:  ASSIGN variablename string.",
  988. "Example: ASSIGN \\%a My name is \\%b.\n",
  989. "Assigns the current value of the string to the variable (or macro).",
  990. "The definition string is fully evaluated before it is assigned, so that",
  991. "the values of any variables are contained are used, rather than their",
  992. "names.  Compare with DEFINE.  To illustrate the difference, try this:\n",
  993. "  DEFINE \\%a hello",
  994. "  DEFINE \\%x \\%a",
  995. "  ASSIGN \\%y \\%a",
  996. "  DEFINE \\%a goodbye",
  997. "  ECHO \\%x \\%y\n",
  998. "This will print 'goodbye hello'.", "" };
  999. #endif /* NOSPL */
  1000.  
  1001. #ifndef NOSPL
  1002. static char *hxxdec[] = {
  1003. "Syntax: DECREMENT variablename [ number ]\n",
  1004. "Decrement (subtract one from) the value of a variable if the current value",
  1005. "is numeric.  If the number argument is given, subtract that number instead.",
  1006. "\nExamples: DECR \\%a, DECR \\%a 7, DECR \\%a \\%n", "" };
  1007. #endif /* NOSPL */
  1008.  
  1009. #ifndef NOSPL
  1010. static char *hxxinc[] = {
  1011. "Syntax: INCREMENT variablename [ number ]\n",
  1012. "Increment (add one to) the value of a variable if the current value is",
  1013. "numeric.  If the number argument is given, add that number instead.\n",
  1014. "Examples: INCR \\%a, INCR \\%a 7, INCR \\%a \\%n", "" };
  1015. #endif /* NOSPL */
  1016.  
  1017. #ifdef ANYX25
  1018. static char *hxxpad[] = {
  1019. "Syntax: PAD command",
  1020. "X.25 PAD commands:\n",
  1021. "    PAD CLEAR     - Clear the virtual call",
  1022. "    PAD STATUS    - Return the status of virtual call",
  1023. "    PAD RESET     - Send a reset packet",
  1024. "    PAD INTERRUPT - Send an interrupt packet",
  1025. ""};
  1026.  
  1027. static char *hxyx25[] = {
  1028. "Syntax: SET X.25 option { ON [ data ], OFF }\n",
  1029. "X.25 call options:",
  1030. "  CLOSED-USER-GROUP { ON index, OFF }",
  1031. "    Enable or disable closed user group call, where index is the group",
  1032. "    index, 0 to 99.",
  1033. "  REVERSE-CHARGE { ON, OFF }",
  1034. "    Tell whether you want to reverse the charges for the call.",
  1035. "  CALL-USER-DATA { ON string, OFF }",
  1036. "    Specify call user-data for the X.25 call.",
  1037. ""};
  1038. #endif /* ANYX25 */
  1039.  
  1040. #ifdef OS2
  1041. static char *hxyprtr[] = {
  1042. "Syntax: SET PRINTER filename\n",
  1043. "Where to send transparent-print and screen-dump material during CONNECT.",
  1044. "Default is PRN.  You can also specify a disk file name, in which case the",
  1045. "given file is created if it does not exist, or is appended to if it already",
  1046. "exists.  Use SET PRINTER NUL to discard transparent print and screen-dump",
  1047. "material.  SHOW PRINTER displays the current setting.  Note: SET PRINTER",
  1048. "does not affect the PRINT command.",
  1049. ""};
  1050. #endif /* OS2 */
  1051.  
  1052. static char *hxyexit[] = {
  1053. "Syntax: SET EXIT STATUS number",
  1054. #ifdef NOSPL
  1055. "  Set C-Kermit's program return code to the given number.",
  1056. #else
  1057. "  Set C-Kermit's program return code to the given number, which can be a",
  1058. "  constant, variable, or an \\feval() expression.",
  1059. #endif /* NOSPL */
  1060. "\nSyntax: SET EXIT WARNING { ON, OFF }", 
  1061. "  When EXIT WARNING is ON, issue a warning message and ask for confirmation",
  1062. "  before EXITing if a connection to another computer might still be open.",
  1063. "  Default is OFF.",
  1064. "" };
  1065.  
  1066. #ifndef NOSPL
  1067. static char *hxxpau[] = {
  1068. "Syntax:  PAUSE [ number ]",
  1069. "Example: PAUSE 3\n",
  1070. "Do nothing for the specified number of seconds; if no number given, one",
  1071. "second.  If interrupted from the keyboard, set FAILURE, otherwise SUCCESS.",
  1072. "" };
  1073.  
  1074. static char *hxxmsl[] = {
  1075. "Syntax:  MSLEEP [ number ]",
  1076. "Example: MSLEEP 500\n",
  1077. "Do nothing for the specified number of milliseconds; if no number given,",
  1078. "100 milliseconds.","" };
  1079. #endif /* NOSPL */
  1080.  
  1081. #ifndef NOPUSH
  1082. static char *hxxshe[] = {
  1083. "Syntax: ! [ command ] or RUN [ command ] or PUSH [ command ]\n",
  1084. "Give a command to the local operating system's command processor, and",
  1085. "display the results on the screen.\n",
  1086. "If the command is omitted, enter interactive mode; return to Kermit",
  1087. "by exiting from the system's command parser.  The command is usually",
  1088. "EXIT or QUIT or LOGOUT.",  "" };
  1089. #endif /* NOPUSH */
  1090.  
  1091. #ifndef NOXMIT
  1092. static char *hxxxmit[] = {
  1093. "Syntax: TRANSMIT file\n",
  1094. "The TRANSMIT command is used for sending single files to other computers",
  1095. "that don't have Kermit.  Text files are sent a line at a time; binary files",
  1096. "are sent a character at a time.  There is no guarantee that the other",
  1097. "computer will receive the file correctly and completely.  Before you start",
  1098. "the TRANSMIT command, you must put the other computer in data collection",
  1099. "mode, for example by starting a text editor.  TRANSMIT may be interrupted by",
  1100. "Ctrl-C.  Synonym: XMIT.",
  1101. "" };
  1102. #endif /* NOXMIT */
  1103.  
  1104. #ifndef NOCSETS
  1105. static char *hxxxla[] = {
  1106. "Syntax: TRANSLATE file1 cs1 cs2 [ file2 ]\n",
  1107. "Translates file1 from the character set cs1 into the character set cs2",
  1108. "and stores the result in file2.  The character sets can be any of",
  1109. "C-Kermit's file character sets.  If file2 is omitted, the translation",
  1110. "is displayed on the screen.  An appropriate intermediate character-set",
  1111. "is chosen automatically, if necessary.",
  1112. "Synonym: XLATE.  Example:\n",
  1113. "TRANSLATE lasagna.lat latin1 italian lasagna.nrc",
  1114. "" };
  1115. #endif /* NOCSETS */
  1116.  
  1117. #ifndef NOSPL
  1118. static char *hxxwai[] = {
  1119. "Syntax:  WAIT number [modem-signal(s)]",
  1120. "Example: WAIT 5 \\cd\\cts\n",
  1121. "Waits up to the given number of seconds for all of the specified signals.",
  1122. "Sets FAILURE if signals do not appear in given time or if interrupted by",
  1123. "typing anything at the keyboard during the waiting period.\n",
  1124. "Signals: \\cd = Carrier Detect, \\dsr = Dataset Ready, \\cts = Clear To Send",
  1125. "" };
  1126. #endif /* NOSPL */
  1127.  
  1128. static char *hxxwri[] = {
  1129. "Syntax: WRITE name text\n",
  1130. "Writes the given text to the named log or file.  The text text may include",
  1131. "backslash codes, and is not terminated by a newline unless you include the",
  1132. "appropriate code.  The name parameter can be any of the following:\n",
  1133. "  DEBUG-LOG",
  1134. "  ERROR (standard error)",
  1135. #ifndef NOSPL
  1136. "  FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)",
  1137. #endif /* NOSPL */
  1138. "  PACKET-LOG",
  1139. "  SCREEN (compare with ECHO)",
  1140. #ifndef NOLOCAL
  1141. "  SESSION-LOG",
  1142. #endif /* NOLOCAL */
  1143. "  TRANSACTION-LOG", "" };
  1144.  
  1145. #ifndef NODIAL
  1146. static char *hxxdial[] = { "Syntax:  DIAL phonenumber",
  1147. "Example: DIAL 7654321\n",
  1148. "Dial a number using an autodial modem.  First you must SET MODEM, then",
  1149. "SET LINE, then SET SPEED.  Then give the DIAL command, including the phone",
  1150. "number, for example:\n",
  1151. "  DIAL 7654321\n",
  1152. #ifdef NETCONN
  1153. "If the modem is on a network modem server, SET HOST first, then SET MODEM,",
  1154. "then DIAL.  See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED,",
  1155. "and REDIAL.\n",
  1156. #else
  1157. "See also SET DIAL, SET MODEM, SET LINE, SET SPEED, REDIAL.\n",
  1158. #endif /* NETCONN */
  1159. "The 'phonenumber' can also the name of an entry from your dialing directory,",
  1160. "which is a plain text file, one entry per line:\n",
  1161. "  name  phonenumber  speed   parity   comments\n",
  1162. "for example:\n",
  1163. "  e-mail  765-4321   2400    even     My electronic mailbox\n",
  1164. "The fields are separated by spaces, and all fields after the 'phonenumber'",
  1165. "are optional.  If the speed or parity are present, they replace your current",
  1166. "SET SPEED and SET PARITY settings.  Specify your dialing directory file with",
  1167. "the SET DIAL DIRECTORY command.",
  1168.  "" };
  1169. #endif /* NODIAL */
  1170.  
  1171. #endif /* NOHELP */
  1172.  
  1173. /*  D O H L P  --  Give a help message  */
  1174.  
  1175. _PROTOTYP( int dohset, (int) );
  1176.  
  1177. int
  1178. dohlp(xx) int xx; {
  1179.     int x,y;
  1180.  
  1181.     debug(F101,"DOHELP xx","",xx);
  1182.     if (xx < 0) return(xx);
  1183.  
  1184.     switch (xx) {
  1185.  
  1186. #ifdef NOHELP
  1187.  
  1188. case XXHLP:
  1189.     if ((x = cmcfm()) < 0)
  1190.       return(x);
  1191.     printf("\n%s, Copyright (C) 1985, 1994,",versio);
  1192.     return(hmsga(tophlp));
  1193.  
  1194. #else /* help is available */
  1195.  
  1196. #ifndef NOSPL
  1197. case XXASS:                /* assign */
  1198.     return(hmsga(hxxass));
  1199.  
  1200. case XXASK:                /* ask */
  1201.     return(hmsga(hxxask));
  1202.  
  1203. case XXASKQ:
  1204.     return(hmsga(hxxaskq));
  1205. #endif /* NOSPL */
  1206.  
  1207. case XXAPC:
  1208.     return(hmsg("Syntax: APC text\n\
  1209. Echoes the text in the form of a VT220/320/420 Application Program Command.\n\
  1210. Use the APC command to send commands to MS-DOS Kermit 3.13 or later."));
  1211.  
  1212. #ifndef NOFRILLS
  1213. case XXBUG:
  1214.     return(hmsg("Describes how to report C-Kermit bugs."));
  1215. #endif /* NOFRILLS */
  1216.  
  1217. case XXBYE:                /* bye */
  1218.     return(hmsg(hmxxbye));
  1219.  
  1220. case XXCHK:                /* check */
  1221.     return(hmsg("\
  1222. Syntax: CHECK name\n\
  1223. Checks to see if the named feature is included in this version of C-Kermit.\n\
  1224. To list the features you can check, type \"check ?\"."));
  1225.  
  1226. #ifndef NOFRILLS
  1227. case XXCLE:                /* clear */
  1228.     return(hmsg("\
  1229. Syntax: CLEAR [ { DEVICE, INPUT, BOTH } ]\n\
  1230. Clears the communications device input buffer, the INPUT command buffer,\n\
  1231. or both.  The default is BOTH."));
  1232. #endif /* NOFRILLS */
  1233.  
  1234. case XXCLO:                /* close */
  1235.     return(hmsga(hmxxclo));
  1236.  
  1237. case XXCOM:                /* comment */
  1238. #ifndef STRATUS /* Can't use # for comments in Stratus VOS */
  1239.     return(hmsg("\
  1240. Syntax: COMMENT text\n\
  1241. Example: COMMENT - this is a comment.\n\n\
  1242. Introduces a comment.  Beginning of command line only.  Commands may also\n\
  1243. have trailing comments, introduced by ; or #."));
  1244. #else
  1245.     return(hmsg("\
  1246. Syntax: COMMENT text\n\
  1247. Example: COMMENT - this is a comment.\n\n\
  1248. Introduces a comment.  Beginning of command line only.  Commands may also\n\
  1249. have trailing comments, introduced by ; (semicolon)."));
  1250. #endif /* STRATUS */
  1251.  
  1252. #ifndef NOLOCAL
  1253. case XXCON:                /* connect */
  1254.     hmsga(hmxxcon);
  1255.     printf("Your escape character is Ctrl-%c (ASCII %d, %s)\r\n",
  1256.        ctl(escape), escape, (escape == 127 ? "DEL" : ccntab[escape]));
  1257.     return(0);
  1258. #endif /* NOLOCAL */
  1259.  
  1260. case XXCWD:                /* cd / cwd */
  1261. #ifdef vms
  1262.     return(hmsg("Syntax: CD [ directory or device:directory ]\n\
  1263. Change Working Directory, equivalent to VMS SET DEFAULT command"));
  1264. #else
  1265. #ifdef datageneral
  1266.     return(hmsg("Change Working Directory, equivalent to DG 'dir' command"));
  1267. #else
  1268. #ifdef OS2
  1269.   return(hmsg("Change Working Directory, equivalent to OS/2 'chdir' command"));
  1270. #else
  1271.     return(hmsg("Syntax: CD [ directoryname ]\n\n\
  1272. Change Working Directory, equivalent to UNIX cd command."));
  1273. #endif /* OS2 */
  1274. #endif /* datageneral */
  1275. #endif /* vms */
  1276.  
  1277. #ifndef NOSPL
  1278. case XXDCL:
  1279.     return(hmsg("Syntax:  DECLARE arrayname[size]\n\
  1280. Example: DECLARE \\&a[20]\n\n\
  1281. Declares an array of the given size.  Array elements can be used just like\n\
  1282. any other variables."));
  1283.  
  1284. case XXDEF:                /* define */
  1285.     return(hmsga(hxxdef));
  1286. #endif /* NOSPL */
  1287.  
  1288. #ifndef NOFRILLS
  1289. case XXDEL:                /* delete */
  1290.     return(hmsg("Syntax: DELETE filespec\n\n\
  1291. Delete a local file or files.  RM is a synonym for DELETE."));
  1292. #endif /* NOFRILLS */
  1293.  
  1294. #ifndef NODIAL
  1295. case XXDIAL:                /* dial */
  1296.     return(hmsga(hxxdial));
  1297. #endif
  1298.  
  1299. case XXDIR:                /* directory */
  1300.     return(hmsg("Syntax: DIRECTORY [ filespec ]\n\
  1301. Display a directory listing of local files."));
  1302.  
  1303. #ifndef NOSERVER
  1304. #ifndef NOFRILLS
  1305. case XXDIS:
  1306.     return(hmsg("Syntax: DISABLE command\n\n\
  1307. Security for the C-Kermit server.  Prevent the client Kermit program from\n\
  1308. executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc."));
  1309. #endif /* NOFRILLS */
  1310. #endif /* NOSERVER */
  1311.  
  1312. #ifndef NOSPL
  1313. case XXDO:                /* do */
  1314.     return(hmsg("Syntax: [ DO ] macroname [ arguments ]\n\n\
  1315. Execute a macro that was defined by the DEFINE command.  The word DO\n\
  1316. can be omitted.  Trailing argument words, if any, are automatically\n\
  1317. assigned to the macro argument variables \\%1, \\%2, etc."));
  1318. #endif /* NOSPL */
  1319.  
  1320. #ifndef NOSPL
  1321. case XXDEC:
  1322.     return(hmsga(hxxdec));
  1323. #endif /* NOSPL */
  1324.  
  1325. case XXECH:                /* echo */
  1326.     return(hmsg("Syntax: ECHO text\n\
  1327. Display the text on the screen, followed by a newline.  The ECHO text may\n\
  1328. contain backslash codes.  Example: ECHO \\7Wake up!\\7")); 
  1329.  
  1330. #ifndef NOSERVER
  1331. #ifndef NOFRILLS
  1332. case XXENA:
  1333.     return(hmsg("Syntax: ENABLE capability\n\n\
  1334. For use with server mode.  Allow the client Kermit program access to the\n\
  1335. named capability, such as CD, DELETE, RECEIVE, etc.  Opposite of DISABLE."));
  1336. #endif /* NOFRILLS */
  1337. #endif /* NOSERVER */
  1338.  
  1339. #ifndef NOSPL
  1340. case XXEND:                /* end */
  1341.     return(hmsg("Syntax: END [ number [ message ] ]\n\
  1342. Exit from the current macro or TAKE file, back to wherever invoked from.\n\
  1343. Number is return code.  Message, if given, is printed."));
  1344.  
  1345. case XXEVAL:                /* evaluate */
  1346.     return(hmsga(hmxxeval));
  1347. #endif /* NOSPL */
  1348.  
  1349. #ifndef NOFRILLS
  1350. case XXERR:                /* error */
  1351.     return(hmsg("Syntax: ERROR\n\
  1352. Send an Error packet to the other Kermit to get it out of packet mode."));
  1353. #endif /* NOFRILLS */
  1354.  
  1355. case XXEXI:                /* exit */
  1356. case XXQUI:
  1357.     return(hmsg("Syntax: QUIT (or EXIT)\n\
  1358. Exit from the Kermit program, closing all open files and devices."));
  1359.  
  1360. case XXFIN:
  1361.     return(hmsg("Syntax: FINISH\n\
  1362. Tell the remote Kermit server to shut down without logging out."));
  1363.  
  1364. #ifndef NOSPL
  1365. case XXFOR:
  1366.     return(hmsga(forhlp));
  1367. #endif /* NOSPL */
  1368.  
  1369. case XXGET:
  1370.     return(hmsg(hmxxget));
  1371.  
  1372. #ifndef NOSPL
  1373. #ifndef NOFRILLS
  1374.   case XXGOK:
  1375.     return(hmsg("Syntax: GETOK prompt\n\
  1376. Print the prompt, make user type 'yes', 'no', or 'ok', and set SUCCESS or\n\
  1377. FAILURE accordingly."));
  1378. #endif /* NOFRILLS */
  1379. #endif /* NOSPL */
  1380.  
  1381. #ifndef NOSPL
  1382. case XXGOTO:
  1383.     return(hmsg("Syntax: GOTO label\n\
  1384. In a TAKE file or macro, go to the given label.  A label is a word on the\n\
  1385. left margin that starts with a colon (:).  Example:\n\n\
  1386. :oofa\n\
  1387. echo Hello!\n\
  1388. goto oofa"));
  1389. #endif /* NOSPL */
  1390.  
  1391. case XXHAN:
  1392.     return(hmsg("Syntax: HANGUP\n\
  1393. Hang up the phone or network connection."));    
  1394.  
  1395. case XXHLP:
  1396. /*
  1397.   We get confirmation here, even though we do it again in hmsga(), to prevent
  1398.   the Copyright message from being printed prematurely.  This doesn't do any
  1399.   harm, because the first call to cmcfm() sets cmflgs to 1, making the second
  1400.   call return immediately.
  1401. */
  1402.     if ((x = cmcfm()) < 0)
  1403.       return(x);
  1404.     printf("\n%s, Copyright (C) 1985, 1994,",versio);
  1405.     return(hmsga(tophlp));
  1406.  
  1407. case XXINT:
  1408.     return(hmsg("Give a brief introduction to C-Kermit."));    
  1409.  
  1410. #ifndef NOSPL
  1411. case XXIF:
  1412.     return(hmsga(ifhlp));
  1413.  
  1414. case XXINC:
  1415.     return(hmsga(hxxinc));
  1416.  
  1417. case XXINP:
  1418.    return(hmsg("\
  1419. Syntax:  INPUT n [ text ]\n\
  1420. Example: INPUT 5 Login:\n\n\
  1421. Wait up to n seconds for the given text to arrive on the communication line.\n\
  1422. If no text, waits for any character.  For use in script programs with\n\
  1423. IF FAILURE and IF SUCCESS.  Also see MINPUT, REINPUT, SET INPUT."));
  1424. #endif /* NOSPL */
  1425.  
  1426. #ifdef CK_MINPUT
  1427. case XXMINP:
  1428.     return(hmsga(hmxxminp));
  1429. #endif /* CK_MINPUT */
  1430.  
  1431. #ifndef NODIAL
  1432. case XXRED:
  1433.     return(hmsg("Redial the number given in the most recent DIAL commnd."));
  1434. #endif /* NODIAL */
  1435.  
  1436. #ifndef NOSPL
  1437. case XXREI:
  1438.     return(hmsg("Syntax: REINPUT n string\n\n\
  1439. Look for the string in the text that has recently been INPUT, set SUCCESS\n\
  1440. or FAILURE accordingly.  Timeout, n, must be specified but is ignored."));
  1441. #endif /* NOSPL */
  1442.  
  1443. #ifndef NOFRILLS
  1444. case XXREN:
  1445.     return(hmsg("Syntax: RENAME oldname newname\n\n\
  1446. Change the name of file 'oldname' to 'newname'."));
  1447. #endif /* NOFRILLS */
  1448.  
  1449. #ifndef NOSPL
  1450. case XXLBL:
  1451.     return(hmsg("\
  1452. Introduce a label, like :loop, for use with GOTO in TAKE files or macros.\n\
  1453. See GOTO."));
  1454. #endif /* NOSPL */
  1455.  
  1456. case XXLOG:
  1457.     return(hmsga(hmxxlg));
  1458.  
  1459. #ifndef NOSCRIPT
  1460. case XXLOGI:
  1461.     return(hmsga(hmxxlogi));
  1462. #endif
  1463.  
  1464. #ifndef NOFRILLS
  1465. case XXMAI:
  1466.     return(hmsg("Syntax: MAIL filename address\n\n\
  1467. Send the file to the remote Kermit, which must be in RECEIVE or SERVER mode,\n\
  1468. and request that the remote host deliver the file as electronic mail to the\n\
  1469. given address.  Example: MAIL BUG.TXT KERMIT@CUVMA"));
  1470. #endif /* NOFRILLS */
  1471.  
  1472. #ifndef NOMSEND
  1473. case XXMSE:
  1474.     return(hmsg(hmssmse));
  1475. #endif /* NOMSEND */
  1476.  
  1477. #ifndef NOSPL
  1478. case XXOPE:
  1479.     return(hmsga(openhlp));
  1480. #endif /* NOSPL */
  1481.  
  1482. case XXNEW:
  1483.     return(hmsg(
  1484. " Print news of new features since publication of \"Using C-Kermit\"."));
  1485.  
  1486. #ifndef NOSPL
  1487. case XXOUT:
  1488.     return(hmsg("Syntax: OUTPUT text\n\n\
  1489. Send the text out the currently selected line, as if you had typed it\n\
  1490. during CONNECT mode.  The text may contain backslash codes.  Example:\n\n\
  1491.   OUTPUT help\\13"));
  1492. #endif /* NOSPL */
  1493.  
  1494. #ifdef ANYX25
  1495. case XXPAD:
  1496.     return(hmsga(hxxpad));
  1497. #endif /* ANYX25 */
  1498.  
  1499. #ifndef NOSPL
  1500. case XXPAU:
  1501.     return(hmsga(hxxpau));
  1502.  
  1503. case XXMSL:
  1504.     return(hmsga(hxxmsl));
  1505. #endif /* NOSPL */
  1506.  
  1507. #ifdef TCPSOCKET
  1508. case XXPNG:
  1509.     return(hmsg("Syntax: PING [ IP-hostname-or-number ]\n\n\
  1510. Check if given IP network host is reachable.  Default host from most\n\
  1511. recent SET HOST or TELNET command.  Runs system PING program, if any."));
  1512. #endif /* TCPSOCKET */
  1513.  
  1514. #ifndef NOFRILLS
  1515. case XXPRI:
  1516.     return(hmsg("Syntax: PRINT file [ options ]\n\n\
  1517. Print the local file on a local printer with the given options."));
  1518. #endif /* NOFRILLS */
  1519.  
  1520. case XXPWD:
  1521.     return(hmsg("Syntax: PWD\n\
  1522. Print the name of the current working directory."));
  1523.  
  1524. #ifndef NOSPL
  1525. case XXREA:
  1526.     return(hmsg("Syntax: READ variablename\n\
  1527. Read a line from the currently open READ or !READ file into the variable\n\
  1528. (see OPEN)."));
  1529. #endif /* NOSPL */
  1530.  
  1531. case XXREC:
  1532.     return(hmsga(hmxxrc));
  1533.  
  1534. case XXREM:
  1535.     y = cmkey(remcmd,nrmt,"Remote command","",xxstring);
  1536.     return(dohrmt(y));
  1537.  
  1538. #ifndef NOSPL
  1539. case XXRET:
  1540.     return(hmsg("Syntax: RETURN [ value ]\n\
  1541. Return from a macro.  An optional return value can be given for use with\n\
  1542. with \\fexecute(macro), which allows macros to be used like functions."));
  1543. #endif /* NOSPL */
  1544. case XXSEN:
  1545.     return(hmsg(hmxxsen));
  1546. #ifndef NORESEND
  1547. case XXRSEN:
  1548.     return(hmsg(hmxxrsen));
  1549. case XXPSEN:
  1550.     return(hmsg(hmxxpsen));
  1551. #endif /* NORESEND */
  1552.  
  1553. #ifndef NOSERVER
  1554. case XXSER:
  1555.     return(hmsg(hmxxser));
  1556. #endif /* NOSERVER */
  1557.  
  1558. #ifndef NOJC
  1559. case XXSUS:
  1560.     return(hmsg("Syntax: SUSPEND or Z\n\
  1561. Suspend Kermit.  Continue Kermit with the appropriate system command,\n\
  1562. such as fg."));
  1563. #endif /* NOJC */
  1564.  
  1565. case XXSET:
  1566.     y = cmkey(prmtab,nprm,"Parameter","",xxstring);
  1567.     debug(F101,"HELP SET y","",y);
  1568.     return(dohset(y));
  1569.  
  1570. #ifndef NOPUSH
  1571. case XXSHE:
  1572.     return(hmsga(hxxshe));
  1573. #ifdef CK_REDIR
  1574. case XXFUN:
  1575.     return(hmsg("Syntax: REDIRECT command\n\
  1576. Run the given local command with its standard input and output redirected\n\
  1577. to the current SET LINE or SET HOST communications path.\n\
  1578. Synonym: < (Left angle bracket)."));
  1579. #endif /* CK_REDIR */
  1580.  
  1581. #ifdef CK_REXX
  1582. case XXREXX:
  1583.     return(hmsg("Syntax: REXX text\n\
  1584. The text is a Rexx command to be executed. The \\v(rexx) variable is set to\n\
  1585. the Rexx command's return value.\n\
  1586. To execute a rexx program file, use:  REXX call <filename>\n\
  1587. Rexx programs may call C-Kermit functions by placing the C-Kermit command in\n\
  1588. single quotes.  For instance:  'set parity none'."));
  1589. #endif /* CK_REXX */
  1590. #endif /* NOPUSH */
  1591.  
  1592. #ifndef NOSHOW
  1593. case XXSHO:
  1594.     return(hmsg("\
  1595. Display current values of various items (SET parameters, variables, etc).\n\
  1596. Type SHOW ? for a list of categories."));
  1597. #endif /* NOSHOW */
  1598.  
  1599. case XXSPA:
  1600. #ifdef datageneral
  1601.     return(hmsg("\
  1602. Display disk usage in current device, directory,\n\
  1603. or return space for a specified device, directory."));
  1604. #else
  1605.     return(hmsg("Syntax: SPACE\n\
  1606. Display disk usage in current device and/or directory"));
  1607. #endif
  1608.  
  1609. case XXSTA:
  1610.     return(hmsg("Syntax: STATISTICS\n\
  1611. Display statistics about most recent file transfer"));
  1612.  
  1613. #ifndef NOSPL
  1614. case XXSTO:
  1615.     return(hmsg("Syntax: STOP [ number [ message ] ]\n\
  1616. Stop executing the current macro or TAKE file and return immediately to\n\
  1617. the C-Kermit prompt.  Number is a return code.  Message printed if given."));
  1618. #endif /* NOSPL */
  1619.  
  1620. case XXTAK:
  1621.     return(hmsg("Syntax: TAKE filename\n\
  1622. Take Kermit commands from the named file.  Kermit command files may\n\
  1623. themselves contain TAKE commands, up to a reasonable depth of nesting."));
  1624.  
  1625. #ifdef TCPSOCKET
  1626. case XXTEL:
  1627.     return(hmsg("Syntax: TELNET [ host [ service ] ]\n\
  1628. Equivalent to SET NETWORK TCP/IP, SET HOST host [ service ], followed by\n\
  1629. CONNECT.  If host is omitted, previous connection (if any) is resumed."));
  1630. #endif /* TCPSOCKET */
  1631.  
  1632. #ifndef NOXMIT
  1633. case XXTRA:
  1634.     return(hmsga(hxxxmit));
  1635. #endif /* NOXMIT */
  1636.  
  1637. #ifndef NOFRILLS
  1638. case XXTYP:
  1639.     return(hmsg("Syntax: TYPE file\n\
  1640. Display a file on the screen.  Pauses if you type Ctrl-S, resumes if you\n\
  1641. type Ctrl-Q, returns immediately to C-Kermit prompt if you type Ctrl-C."
  1642. ));
  1643. #endif /* NOFRILLS */
  1644.  
  1645. #ifndef NOSPL
  1646. case XXWHI:
  1647.     return(hmsga(whihlp));
  1648. #endif /* NOSPL */
  1649.  
  1650. #ifndef NOCSETS
  1651. case XXXLA:
  1652.     return(hmsga(hxxxla));
  1653. #endif /* NOCSETS */
  1654.  
  1655. case XXVER:
  1656.     return(hmsg("Syntax: VERSION\nDisplays the program version number."));
  1657.  
  1658. #ifndef NOSPL
  1659. case XXWAI:
  1660.     return(hmsga(hxxwai));
  1661. #endif /* NOSPL */
  1662.  
  1663. #ifndef NOFRILLS
  1664. case XXWHO:
  1665.     return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));
  1666.  
  1667. case XXWRI:
  1668.     return(hmsga(hxxwri));
  1669.  
  1670. case XXWRL:
  1671.     return(hmsg(
  1672. "WRITE-LINE (WRITELN) is just like WRITE, but includes a line terminator\n\
  1673. at the end of text.  See WRITE."));
  1674. #endif /* NOFRILLS */
  1675.  
  1676. #ifndef NOSPL
  1677. case XXIFX:
  1678.     return(hmsga(ifxhlp));
  1679.  
  1680. case XXGETC:                /* GETC */
  1681.     return(hmsga(hxxgetc));
  1682.  
  1683. case XXFWD:                /* FORWARD */
  1684.     return(hmsg(
  1685. "Like GOTO, but searches only forward for the label.  See GOTO."));
  1686. #endif /* NOSPL */
  1687.  
  1688. #endif /* NOHELP */
  1689.  
  1690. default:
  1691.     if ((x = cmcfm()) < 0) return(x);
  1692.     printf("Sorry, help not available for \"%s\"\n",cmdbuf);
  1693.     break;
  1694.     }
  1695.     return(success = 0);
  1696. }
  1697.  
  1698. #ifdef NOHELP 
  1699.  
  1700. int                    /* Print an array of lines, */
  1701. hmsga(s) char *s[]; {            /* cheap version. */
  1702.     int i;
  1703.     if ((i = cmcfm()) < 0) return(i);
  1704.     printf("\n");            /* Start off with a blank line */
  1705.     for (i = 0; *s[i]; i++) {        /* Print each line. */
  1706.     printf("%s\n",s[i]);
  1707.     }
  1708.     printf("\n");
  1709.     return(0);
  1710. }
  1711.  
  1712. #else /* NOHELP not defined... */
  1713.  
  1714. int                    /* Print an array of lines, */
  1715. hmsga(s) char *s[]; {            /* pausing at end of each screen. */
  1716.     int x, y, i, j, k, n;
  1717.     if ((x = cmcfm()) < 0) return(x);
  1718.  
  1719. #ifdef CK_NAWS    
  1720.     /* Check whether window size changed */
  1721.     if (ttgwsiz() > 0) {
  1722.         if (tt_rows > 0 && tt_cols > 0) {
  1723.             cmd_rows = tt_rows;
  1724.             cmd_cols = tt_rows;
  1725.         }
  1726.     }
  1727. #endif /* CK_NAWS */
  1728.  
  1729.  
  1730.     printf("\n");            /* Start off with a blank line */
  1731.     n = 1;                /* Line counter */
  1732.     for (i = 0; *s[i]; i++) {
  1733.     printf("%s\n",s[i]);        /* Print a line. */
  1734.         y = (int)strlen(s[i]);
  1735.         k = 1;
  1736.         for (j = 0; j < y; j++)        /* See how many newlines were */
  1737.           if (s[i][j] == '\n') k++;    /* in the string... */
  1738.         n += k;
  1739.     if (n > (cmd_rows - 3) && *s[i+1]) /* After a screenful, give them */
  1740.           if (!askmore()) return(0);    /* a "more?" prompt. */
  1741.           else n = 0;
  1742.     }
  1743.     printf("\n");
  1744.     return(0);
  1745. }
  1746.  
  1747. /*  H M S G  --  Get confirmation, then print the given message  */
  1748.  
  1749. int
  1750. hmsg(s) char *s; {
  1751.     int x;
  1752.     if ((x = cmcfm()) < 0) return(x);
  1753.     printf("\n%s\n\n",s);
  1754.     return(0);
  1755. }
  1756.  
  1757. #ifndef NOXMIT
  1758. static char *hsetxmit[] = {
  1759. "Syntax: SET TRANSMIT parameter value\n",
  1760. "Controls the behavior of the TRANSMIT command, used for uploading files",
  1761. "to computers that don't have Kermit programs.  Parameters are:\n",
  1762. "ECHO ON/OFF:     Whether to echo text as it is being transmitted.",
  1763. "EOF text:        Text to send after end of file is reached.",
  1764. "FILL number:     ASCII value of character to insert into blank lines.",
  1765. "LINEFEED ON/OFF: Transmit LF as well as CR at the end of each line.",
  1766. "                 Normally, only CR is sent.",
  1767. "LOCKING-SHIFT ON/OFF: Whether to use SO/SI for transmitting 8-bit data",
  1768. "                 when PARITY is not NONE.",
  1769. "PAUSE number:    How many milliseconds to pause after transmitting each line",
  1770. "                 (text mode), or each character (binary mode).",
  1771. "PROMPT number:   ASCII value of character to look for from host before",
  1772. "                 sending next line, normally LF (10).",
  1773. "Synonym: SET XMIT.",
  1774. "" };
  1775. #endif /* NOXMIT */
  1776.  
  1777. static char *hsetbkg[] = {
  1778. "Syntax: SET BACKGROUND { OFF, ON }\n",
  1779. "SET BACKGROUND OFF forces prompts and messages to appear on your screen",
  1780. "even though Kermit thinks it is running in the background.", "" };
  1781.  
  1782. #ifdef DYNAMIC
  1783. static char *hsetbuf[] = {
  1784. "Syntax: SET BUFFERS n1 [ n2 ]\n",
  1785. "Change the overall amount of memory allocated for SEND and RECEIVE packet",
  1786. "buffers, respectively.  Bigger numbers let you have longer packets and more",
  1787. "window slots.  If n2 is omitted, the same value as n1 is used.",
  1788. "" };
  1789. #endif /* DYNAMIC */
  1790.  
  1791. static char *hsetcmd[] = {
  1792. "Syntax: SET COMMAND parameter value\n",
  1793. "SET COMMAND BYTESIZE { 7, 8 }",
  1794. "  Informs C-Kermit of the bytesize of the communication path between itself",
  1795. "  and your keyboard and screen.  7 is assumed.  SET COMMAND BYTE 8 to allow",
  1796. "  entry and display of 8-bit characters.",
  1797. #ifdef CK_RECALL
  1798. "\nSET COMMAND RECALL-BUFFER-SIZE number",
  1799. "  How big you want C-Kermit's command recall buffer to be.  By default, it",
  1800. "  holds 10 commands.  You can make it any size you like, subject to memory",
  1801. "  constraints of the computer.  A size of 0 disables command recall.",
  1802. "  Whenever you give this command, previous command history is lost.",
  1803. #endif /* CK_RECALL */
  1804. "\nSET COMMAND QUOTING { ON, OFF }",
  1805. "  Whether to treat backslash and question mark as special characters (ON),",
  1806. "  or as ordinary data characters (OFF) in commands.  ON by default.",
  1807. #ifdef CM_RETRY
  1808. "\nSET COMMAND RETRY { ON, OFF }",
  1809. "  Whether to reprompt you with the correct but incomplete portion of a",
  1810. "  syntactically incorrect command.  ON by default.",
  1811. #endif /* CM_RETRY */
  1812. "" };
  1813.  
  1814. #ifndef NOLOCAL
  1815. static char *hsetcar[] = {
  1816. "Syntax: SET CARRIER ON, AUTO, or OFF\n",
  1817. "Attempts to control treatment of carrier on the communication device.",
  1818. "ON means that carrier is required at all times except during the DIAL",
  1819. "command.  OFF means that carrier is never required.  AUTO (the default)",
  1820. "means that carrier is required only during CONNECT.", "" };
  1821. #endif /* NOLOCAL */
  1822.  
  1823. static char *hsetat[] = {
  1824. "Syntax: SET ATTRIBUTES name ON or OFF\n",
  1825. "Use this command to enable (ON) or disable (OFF) the transmission of",
  1826. "selected file attributes along with each file, and to handle or ignore",
  1827. "selected incoming file attributes, including:\n",
  1828. #ifndef NOCSETS
  1829. "  CHARACTER-SET:  The transfer character set for text files",
  1830. #endif /* NOCSETS */
  1831. "  DATE:           The file's creation date",
  1832. "  DISPOSITION:    Unusual things to do with the file, like MAIL or PRINT",
  1833. "  LENGTH:         The file's length",
  1834. "  SYSTEM-ID:      Machine/Operating system of origin",
  1835. "  TYPE:           The file's type (text or binary)\n",
  1836. "You can also specify ALL to select all of them.  Examples:\n",
  1837. "  SET ATTR DATE OFF\n  SET ATTR LENGTH ON\n  SET ATTR ALL OFF", ""
  1838. };
  1839.  
  1840. #ifndef NOSPL
  1841. static char *hxxinp[] = {
  1842. "Syntax: SET INPUT parameter value\n",
  1843. "The SET INPUT command controls the behavior of the INPUT command:\n",
  1844. "SET INPUT CASE { IGNORE, OBSERVE }",
  1845. "Tells whether alphabetic case is to be significant in string comparisons.",
  1846. "This setting is local to the current macro or command file, and is inherited",
  1847. "by subordinate macros and take files.\n",
  1848. "SET INPUT ECHO { ON, OFF }",
  1849. "Tells whether to display arriving characters read by INPUT on the screen.\n",
  1850. "SET INPUT SILENCE <number>",
  1851. "The maximum number to seconds of silence (no input at all) before the INPUT",
  1852. "command times out, 0 for no maximum.\n",
  1853. "SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }",
  1854. "Tells whether to proceed or quit from a script program if an INPUT command",
  1855. "fails.  PROCEED (default) allows use of IF SUCCESS and IF FAILURE commands.",
  1856. "This setting is local to the current macro or command file, and is inherited",
  1857. "by subordinate macros and take files.",
  1858. "" };
  1859. #endif /* NOSPL */
  1860.  
  1861. static char *hxytak[] = {
  1862. "Syntax: SET TAKE parameter value\n",
  1863. "Controls behavior of TAKE command.\n",
  1864. "SET TAKE ECHO { ON, OFF } tells whether commands read from a TAKE file",
  1865. "should be displayed on the screen.\n",
  1866. "SET TAKE ERROR { ON, OFF } tells whether a TAKE command file should be",
  1867. "automatically terminated when a command fails.  This setting is local to",
  1868. "the current command file, and inherited by subordinate command files.",
  1869.  "" };
  1870.  
  1871. #ifndef NOLOCAL
  1872. static char *hxyterm[] = {
  1873. "Syntax: SET TERMINAL parameter value\n",
  1874. #ifdef OS2
  1875. "SET TERMINAL TYPE { ANSI, VT52, VT100, VT102, VT220 } to select emulation.\n",
  1876. "SET TERMINAL ANSWERBACK { OFF, ON }",
  1877. "disables/enables the ENQ/Answerback sequence (\"OS/2 C-Kermit version type\
  1878. \").\n",
  1879. #endif /* OS2 */
  1880. #ifdef CK_APC
  1881. "SET TERMINAL APC { ON, OFF, UNCHECKED }",
  1882. "controls execution of Application Program Commands sent by the host while",
  1883. "C-Kermit is in CONNECT mode.  ON allows execution of \"safe\" commands and",
  1884. "disallows potentially dangerous commands such as DELETE, RENAME, OUTPUT, and",
  1885. "RUN.  OFF prevents execution of APCs.  UNCHECKED allows execution of all",
  1886. "APCs.  OFF is the default.\n",
  1887. #endif /* CK_APC */
  1888. #ifdef OS2
  1889. "SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }",
  1890. "sets the mode for the arrow keys during VT terminal emulation.\n", 
  1891. "SET TERMINAL BELL { AUDIBLE, VISIBLE, NONE }",
  1892. "specifies how Control-G (bell) characters are handled.  AUDIBLE means",
  1893. "a beep is sounded; VISIBLE means the screen is flashed momentarily.\n",
  1894. #endif /* OS2 */
  1895. "SET TERMINAL BYTESIZE 7 or 8, to use 7- or 8-bit terminal characters",
  1896. "between C-Kermit and the remote computer or service during CONNECT.\n",
  1897. #ifdef OS2
  1898. "SET TERMINAL CODE-PAGE lets you change the PC code page.  Use SHOW TERMINAL",
  1899. "to display the current code page and the available code pages.\n",
  1900. #endif /* OS2 */
  1901. #ifndef NOCSETS
  1902. "SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ] to specify the",
  1903. "character set used by the remote host, <remote-cs>, and the character",
  1904. "set used by C-Kermit locally, <local-cs>.  If you don't specify the",
  1905. "local character set, the current FILE CHARACTER-SET is used.  When you",
  1906. "specify two different character sets, C-Kermit translates between them",
  1907. "during CONNECT.  By default, both character sets are TRANSPARENT.\n",
  1908. #endif /* NOCSETS */
  1909. #ifdef OS2
  1910. "SET TERMINAL COLOR <screenpart> <foreground> <background>, to set",
  1911. "the colors of the terminal emulation screen.  <screenpart> may be one of:",
  1912. "TERMINAL-SCREEN, UNDERLINED-TEXT, STATUS-LINE and HELP-TEXT.  <foreground>",
  1913. "and <background> may be one of: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA,",
  1914. "BROWN, LGRAY, DGRAY, LBLUE, LGREEN, LCYAN, LRED, LMAGENTA, YELLOW, or WHITE.",
  1915. "The L prefix for the color names means Light.\n",
  1916. #endif /* OS2 */
  1917. "SET TERMINAL CR-DISPLAY { CRLF, NORMAL } to specify how incoming",
  1918. "carriage return characters are to be displayed on your screen.\n",
  1919. #ifdef OS2
  1920. "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } selects cursor style.\n",
  1921. #endif /* OS2 */
  1922. "SET TERMINAL DEBUG { ON, OFF } controls terminal session debugging.\n",
  1923. "SET TERMINAL ECHO { LOCAL, REMOTE } specifies which side does the echoing",
  1924. "during terminal connection.\n",
  1925. #ifdef OS2
  1926. "SET TERMINAL HIDE-CURSOR { ON, OFF } to tell whether cursor-hiding can be",
  1927. "used to make screen updates faster, in which case the cursor might vanish",
  1928. "momentarily from time to time.  ON by default.\n",
  1929. "SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC } to specify the keypad",
  1930. "mode for VT terminal emulation.\n",
  1931. #endif /* OS2 */
  1932. "SET TERMINAL LOCKING-SHIFT { OFF, ON } tells C-Kermit whether to use",
  1933. "Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch between 7-bit and 8-bit",
  1934. "characters during CONNECT.  OFF by default.\n",
  1935. #ifdef OS2MOUSE
  1936. "SET TERMINAL MOUSE { OFF, ON } enables/disables the mouse during CONNECT.",
  1937. "OFF by default.  When ON, the mouse can be used as follows:",
  1938. " Left button: double click sends arrow keys to move cursor to mouse position",
  1939. " Right button: drag and release to select text.",
  1940. " Right button: double click to send selected text to host.",
  1941. " To select and send in one move, hold down left button, drag, click right.\n",
  1942. #endif /* OS2MOUSE */
  1943. "SET TERMINAL NEWLINE-MODE { OFF, ON } tells whether to send CRLF when you",
  1944. "type CR during CONNECT mode.\n",
  1945. #ifdef OS2
  1946. "SET TERMINAL OUTPUT-PACING <milliseconds> tells how long to pause between",
  1947. "sending each character to the host during CONNECT mode.  Normally not needed",
  1948. "but sometimes required to work around TRANSMISSION BLOCKED conditions when",
  1949. "pasting into the terminal window.\n",
  1950. "SET TERMINAL ROLL {ON,OFF} tells whether typing is allowed during \
  1951. rollback.\n",
  1952. "SET TERMINAL SCROLLBACK <lines> sets size of CONNECT scrollback buffer.\n",
  1953. "SET TERMINAL TRANSMIT-TIMEOUT <seconds> specifies the maximum amount of time",
  1954. "C-Kermit waits before returning to the prompt if your keystrokes can't be",
  1955. "transmitted for some reason, such as a flow-control deadlock.\n",
  1956. "SET TERMINAL WRAP { OFF, ON } to tell whether the terminal emulator should",
  1957. "automatically wrap long lines on your screen.\n",
  1958. #endif /* OS2 */
  1959. "Type SHOW TERMINAL to see current terminal settings.",
  1960. "" };
  1961. #endif /* NOLOCAL */
  1962.  
  1963. #ifdef NETCONN
  1964. static char *hxyhost[] = {
  1965. "Syntax:  SET HOST hostname-or-address [ service ]\n",
  1966. "Establish a connection to the specified network host on the currently",
  1967. "selected network type.  For TCP/IP connections, the default service is",
  1968. "TELNET; specify a different TCP port number or service name to choose a",
  1969. "different service.  TCP/IP Examples:\n",
  1970. "  SET HOST kermit.columbia.edu",
  1971. "  SET HOST 128.59.39.2",
  1972. "  SET HOST madlab.sprl.umich.edu 3000\n",
  1973. "Also see SET NETWORK, TELNET.",
  1974. "" };
  1975.  
  1976. #ifdef TNCODE
  1977. static char *hxytel[] = {
  1978. "Syntax: SET TELNET parameter value\n",
  1979. "For TCP/IP SET HOST and TELNET connections:\n",
  1980. "SET TELNET ECHO { LOCAL, REMOTE }",
  1981. "  C-Kermit's initial echoing state for TELNET connections, LOCAL by default.",
  1982. "  After the connection is made, TELNET negotiations determine the echoing",
  1983. "  state.",
  1984. "SET TELNET NEWLINE-MODE { OFF, ON, RAW }",
  1985. "  ON (the default) means send CRLF when user types CR.",
  1986. "  OFF means send CR and NUL.",
  1987. "  RAW means send CR alone.",
  1988. "SET TELNET TERMINAL-TYPE name",
  1989. "  The terminal type to send to the remote TELNET host.  If none is given,",
  1990. "  your local terminal type is sent.\n",
  1991. "Type SHOW NETWORK to see the current values of these parameters.",
  1992. "" };
  1993. #endif /* TNCODE */
  1994.  
  1995. static char *hxynet[] = {
  1996. "Syntax: SET NETWORK network-type\n",
  1997. "Select the type of network to be used with SET HOST connections:\n",
  1998. #ifdef TCPSOCKET
  1999. "  SET NETWORK TCP/IP",
  2000. #endif /* TCPSOCKET */
  2001. #ifdef ANYX25
  2002. "  SET NETWORK X.25",
  2003. #endif /* ANYX25 */
  2004. #ifdef DECNET
  2005. "  SET NETWORK DECNET",
  2006. #endif /* DECNET */
  2007. #ifdef NPIPE
  2008. "  SET NETWORK NAMED-PIPE <pipename>",
  2009. #endif /* NPIPE */
  2010. #ifdef CK_NETBIOS
  2011. "  SET NETWORK NETBIOS",
  2012. #endif /* CK_NETBIOS */
  2013. "\nIf only one network type is listed, that is the default network for",
  2014. "SET HOST commands.  Also see SET HOST, TELNET.",
  2015. ""};
  2016. #endif /* NETCONN */
  2017.  
  2018. #ifndef NOSPL
  2019. static char *hxymacr[] = {
  2020. "Syntax: SET MACRO parameter value\n",
  2021. "Controls the behavior of macros.\n",
  2022. "SET MACRO ECHO { ON, OFF } tells whether commands executed from a macro",
  2023. "definition should be displayed on the screen.\n",
  2024. "SET MACRO ERROR { ON, OFF } tells whether a macro should be automatically",
  2025. "terminated upon a command error.  This setting is local to the current",
  2026. "macro, and inherited by subordinate macros.",
  2027. "" };
  2028. #endif /* NOSPL */
  2029.  
  2030. #ifndef NODIAL
  2031. static char *hxymodm[] = {
  2032. "Syntax: SET MODEM-DIALER name\n",
  2033. "Type of modem for dialing remote connections.  Selects the dialing protocol,",
  2034. #ifdef MINIDIAL
  2035. "such as HAYES, to be used by the DIAL command.  Several dialing protocols",
  2036. #else
  2037. "such as HAYES, to be used by the DIAL command.  Many modem dialing protocols",
  2038. #endif /* MINIDIAL */
  2039. "are supported; type SET MODEM ? for a list.  DIRECT or NONE means a direct",
  2040. "connection, with no modem at all.  Also see HELP DIAL, HELP SET CARRIER.",
  2041. "" };
  2042. #endif /* NODIAL */
  2043.  
  2044. static char *hmxyprm[] = {
  2045. "Syntax: SET PROMPT [ text ]\n",
  2046. #ifdef MAC
  2047. "Prompt text for this program, normally 'Mac-Kermit>'.  May contain backslash",
  2048. #else
  2049. "Prompt text for this program, normally 'C-Kermit>'.  May contain backslash",
  2050. #endif /* MAC */
  2051. "codes for special effects.  Surround by { } to preserve leading or trailing",
  2052. #ifdef MAC
  2053. "spaces.  If text omitted, prompt reverts to Mac-Kermit>.  Prompt can include",
  2054. #else
  2055. "spaces.  If text omitted, prompt reverts to C-Kermit>.  Prompt can include",
  2056. #endif /* MAC */
  2057. "variables like \\v(dir) or \\v(time) to show current directory or time.",
  2058. "" };
  2059.  
  2060. static char *hxywind[] = {
  2061. "Syntax: SET WINDOW-SIZE number\n",
  2062. "Specify number of window slots for sliding windows, the number of packets",
  2063. "that can be transmitted before pausing for acknowledgement.  The default",
  2064. "is one, the maximum is 31.  Increased window size may result in reduced",
  2065. "maximum packet length.  Use sliding windows for improved efficiency on",
  2066. "connections with long delays.  A full duplex connection is required.",
  2067. "" };
  2068.  
  2069. static char *hxyrpt[] = {
  2070. "Syntax: SET REPEAT { COUNTS { ON, OFF }, PREFIX <code> }\n",
  2071. "SET REPEAT COUNTS turns the repeat-count compression mechanism ON and OFF.",
  2072. " The default is ON.",
  2073. "SET REPEAT PREFIX <code> sets the repeat-count prefix character to the",
  2074. " given code.  The default is 126 (tilde).",
  2075. "" };
  2076.  
  2077. static char *hxyrcv[] = { 
  2078. "Syntax: SET RECEIVE parameter value\n",
  2079. "Specify parameters for inbound packets:\n",
  2080. "CONTROL-PREFIX number",
  2081. " ASCII value of prefix character used for quoting control characters in",
  2082. " packets that C-Kermit receives, normally 35 (number sign).  Don't change",
  2083. " this unless something is wrong with the other Kermit program.",
  2084. "END-OF-PACKET number",
  2085. " ASCII value of control character that terminates incoming packets,",
  2086. " normally 13 (carriage return).",
  2087. "PACKET-LENGTH number",
  2088. " Maximum length packet the other Kermit should send.",
  2089. "PADDING number",
  2090. " Number of prepacket padding characters to ask for (normally 0).",
  2091. "PAD-CHARACTER number",
  2092. " ASCII value of control character to use for padding (normally 0).",
  2093. "PATHNAMES ON or OFF",
  2094. " If a recognizable path (directory, device, etc) specification appears in",
  2095. " an incoming filename, leave it ON and try to use it, or strip it OFF before",
  2096. #ifdef CK_MKDIR
  2097. " trying to create the output file.  When ON (the default), then if any of",
  2098. " the directories in the path don't exist, C-Kermit tries to create them.",
  2099. #else
  2100. " trying to create the output file.  The default is to leave it ON.",
  2101. #endif /* CK_MKDIR */
  2102. "PAUSE number",
  2103. " Milliseconds to pause in between packets, normally 0.",
  2104. "START-OF-PACKET number",
  2105. " ASCII value of character that marks start of inbound packet.",
  2106. "TIMEOUT number",
  2107. " Number of seconds other Kermit should wait for a packet before sending",
  2108. " NAK or retransmitting.",
  2109. "" };
  2110.  
  2111. static char *hxysnd[] = {
  2112. "Syntax: SET SEND parameter value\n",
  2113. "Specify parameters for outbound packets.  This command should be used only",
  2114. "to override the normal negotiated parameters and is rarely needed:\n",
  2115. "CONTROL-PREFIX number",
  2116. " ASCII value of prefix character used for quoting control characters in",
  2117. " packets that C-Kermit sends, normally 35 (number sign).",
  2118. "END-OF-PACKET number",
  2119. " ASCII value of control character to terminate an outbound packet,",
  2120. " normally 13 (carriage return).",
  2121. "PACKET-LENGTH number",
  2122. " Maximum length packet to send, even if other Kermit asks for longer ones.",
  2123. "PADDING number",
  2124. " Number of prepacket padding characters to send.",
  2125. "PAD-CHARACTER number",
  2126. " ASCII value of control character to use for padding.",
  2127. "PATHNAMES ON or OFF",
  2128. " When FILE NAMES is set to LITERAL, leave the path (device, directory, etc)",
  2129. " portion ON or OFF the file name when sending it.  Applies to the actual",
  2130. " filename, not the \"as-name\".  The default is ON.",
  2131. "PAUSE number",
  2132. " Milliseconds to pause in between packets, normally 0.",
  2133. "START-OF-PACKET number",
  2134. " ASCII value of character to mark start of outbound packet.",
  2135. "TIMEOUT number",
  2136. " Number of seconds to wait for a packet before sending NAK or",
  2137. " retransmitting.",
  2138. "" };
  2139.  
  2140. static char *hxyxfer[] = {
  2141. "Synonym: SET XFER\n",
  2142. #ifdef XFRCAN
  2143. "Syntax: SET TRANSFER CANCELLATION { OFF, ON [ <code> [ <number> ] ]\n",
  2144. "OFF disables remote-mode packet-mode cancellation from the keyboard.",
  2145. "ON enables it.  The optional <code> is the control character to use for",
  2146. "cancellation; the optional <number> is how many consecutive occurrences",
  2147. "of the given control character are required for cancellation.",
  2148. #endif /* XFRCAN */
  2149. #ifndef NOCSETS
  2150. "\nSyntax: SET TRANSFER CHARACTER-SET name\n",
  2151. "Select the character set used to represent textual data in Kermit packets.",
  2152. "Text characters are translated to/from the FILE CHARACTER-SET.  Choices:\n",
  2153. " TRANSPARENT (no translation, the default)",
  2154. " ASCII",
  2155. " LATIN1 (ISO 8859-1 Latin Alphabet 1)",
  2156. #ifndef NOLATIN2
  2157. " LATIN2 (ISO 8859-2 Latin Alphabet 2)",
  2158. #endif /* NOLATIN2 */
  2159. #ifdef CYRILLIC
  2160. " CYRILLIC-ISO (ISO 8859-5 Latin/Cyrillic)",
  2161. #endif /* CYRILLIC */
  2162. #ifdef HEBREW
  2163. " HEBREW-ISO (ISO 8859-8 Latin/Hebrew)",
  2164. #endif /* HEBREW */
  2165. #ifdef KANJI
  2166. " JAPANESE-EUC (JIS X 0208 Kanji + Roman and Katakana)\n",
  2167. #endif /* KANJI */
  2168. #endif /* NOCSETS */
  2169. "\nSyntax: SET TRANSFER LOCKING-SHIFT { OFF, ON, FORCED }\n",
  2170. "Tell whether locking-shift protocol should be used during file transfer",
  2171. "to achieve 8-bit transparency on a 7-bit connection.  ON means to request",
  2172. "its use if PARITY is not NONE and to use it if the other Kermit agrees,",
  2173. "OFF means not to use it, FORCED means to use it even if the other Kermit",
  2174. "does not agree.",
  2175. "" };
  2176.  
  2177. /*  D O H S E T  --  Give help for SET command  */
  2178.  
  2179. int
  2180. dohset(xx) int xx; {
  2181.     int x;
  2182.  
  2183.     if (xx == -3) return(hmsga(hmhset));
  2184.     if (xx < 0) return(xx);
  2185.     if ((x = cmcfm()) < 0) return(x);
  2186.     switch (xx) {
  2187.  
  2188. case XYATTR:
  2189.     return(hmsga(hsetat));
  2190.  
  2191. case XYBACK:
  2192.     return(hmsga(hsetbkg));
  2193.  
  2194. #ifdef DYNAMIC
  2195. case XYBUF:
  2196.     return(hmsga(hsetbuf));
  2197. #endif /* DYNAMIC */
  2198.  
  2199. #ifndef NOLOCAL
  2200. case XYCARR:
  2201.     return(hmsga(hsetcar));
  2202. #endif /* NOLOCAL */
  2203.  
  2204. #ifndef NOSPL
  2205. case XYCASE:
  2206.     return(hmsg("Syntax: SET CASE { ON, OFF }\n\
  2207. Tells whether alphabetic case is significant in string comparisons\n\
  2208. done by INPUT, IF, and other commands.  This setting is local to the\n\
  2209. current macro or command file, and inherited by subordinates."));
  2210.  
  2211. #endif /* NOSPL */
  2212.  
  2213. case XYCMD:
  2214.     return(hmsga(hsetcmd));
  2215.  
  2216. case XYIFD:
  2217.     return(hmsg("Syntax: SET INCOMPLETE { DISCARD, KEEP }\n\
  2218. Discard or Keep incompletely received files, default is DISCARD."));
  2219.  
  2220. #ifndef NOSPL
  2221. case XYINPU:
  2222.     return(hmsga(hxxinp));
  2223. #endif /* NOSPL */
  2224.  
  2225. case XYCHKT:
  2226.     return(hmsga(hmxychkt));
  2227.  
  2228. #ifndef NOSPL
  2229. case XYCOUN:
  2230.     return(hmsg("Syntax:  SET COUNT number\n\
  2231. Example: SET COUNT 5\n\
  2232. Set up a loop counter, for use with IF COUNT.  Local to current macro\n\
  2233. or command file, inherited by subordinate macros and command files."));
  2234. #endif /* NOSPL */
  2235.  
  2236. #ifndef NOLOCAL
  2237. case XYDEBU:
  2238. #ifdef DEBUG    
  2239.     return(hmsg("Syntax: SET DEBUG { SESSION, ON, OFF }\n\
  2240. SESSION means display control and 8-bit characters symbolically during\n\
  2241. CONNECT mode.  ON means log debugging information to file debug.log."));
  2242. #else
  2243.     return(hmsg("Syntax: SET DEBUG { SESSION, OFF }\n\
  2244. SESSION means display control and 8-bit characters symbolically during\n\
  2245. CONNECT mode."));
  2246. #endif /* DEBUG */
  2247. #else
  2248. #ifdef DEBUG
  2249. case XYDEBU:
  2250.     return(hmsg("Syntax: SET DEBUG { ON, OFF }\n\
  2251. ON means log debugging information to file debug.log."));
  2252. #endif /* DEBUG */
  2253. #endif /* NOLOCAL */
  2254.  
  2255. case XYDFLT:
  2256.     return(hmsg("Syntax: SET DEFAULT directory\n\
  2257. Change directory.  Equivalent to CD command."));
  2258.  
  2259. case XYDELA: 
  2260.     return(hmsg("Syntax: SET DELAY number\n\
  2261. Number of seconds to wait before sending first packet after SEND command."));
  2262.  
  2263. #ifndef NODIAL
  2264. case XYDIAL:
  2265.     return(hmsga(hmxydial));
  2266. #endif /* NODIAL */
  2267.  
  2268. #ifdef UNIX
  2269. case XYSUSP:
  2270.     return(hmsg("Syntax: SET SUSPEND { OFF, ON }\n\n\
  2271. Disables SUSPEND command, suspend signals, and <esc-char>Z during CONNECT."));
  2272. #endif
  2273.  
  2274. #ifndef NOSCRIPT
  2275. case XYSCRI:
  2276.     return(hmsg("Syntax: SET SCRIPT ECHO { OFF, ON }\n\n\
  2277. Disables/Enables echoing of SCRIPT command operation."));
  2278. #endif /* NOSCRIPT */
  2279.  
  2280. case XYTAKE:
  2281.     return(hmsga(hxytak));
  2282.  
  2283. #ifndef NOLOCAL
  2284. case XYTERM:
  2285.     return(hmsga(hxyterm));
  2286.  
  2287. case XYDUPL:
  2288.     return(hmsg("Syntax: SET DUPLEX { FULL, HALF }\n\n\
  2289. During CONNECT: FULL means remote host echoes, HALF means C-Kermit\n\
  2290. does its own echoing."));
  2291.  
  2292. case XYLCLE:
  2293.     return(hmsg("Syntax: SET LOCAL-ECHO { OFF, ON }\n\n\
  2294. During CONNECT: OFF means remote host echoes, ON means C-Kermit\n\
  2295. does its own echoing.  Synonym for SET DUPLEX { FULL, HALF }."));
  2296.  
  2297. case XYESC:
  2298.     return(hmsg("Syntax: SET ESCAPE number\n\n\
  2299. Decimal ASCII value for escape character during CONNECT, normally 28\n\
  2300. (Control-\\).  Type the escape character followed by C to get back to the\n\
  2301. C-Kermit prompt."));
  2302. #endif /* NOLOCAL */
  2303.  
  2304. #ifdef OS2
  2305. case XYPRTR:
  2306.     return(hmsga(hxyprtr));
  2307. #endif /* OS2 */
  2308.  
  2309. case XYEXIT:
  2310.     return(hmsga(hxyexit));
  2311.  
  2312. case XYFILE:
  2313.     return(hmsga(hmxyf));
  2314.  
  2315. case XYFLOW:
  2316.     return(hmsga(hmxyflo));
  2317.  
  2318. case XYHAND:
  2319.    return(hmsga(hmxyhsh));
  2320.  
  2321. #ifdef NETCONN
  2322. case XYHOST:
  2323. return(hmsga(hxyhost));
  2324. case XYNET:
  2325. return(hmsga(hxynet));
  2326.  
  2327. #ifdef ANYX25
  2328. case XYX25:
  2329.     return(hmsga(hxyx25));
  2330.  
  2331. case XYPAD:
  2332.     return(hmsg("Syntax: SET PAD name value\n\
  2333. Set a PAD X.3 parameter with a desired value."));
  2334. #endif /* ANYX25 */ 
  2335. #endif /* NETCONN */
  2336.  
  2337. #ifndef NOSPL
  2338. case XYOUTP:
  2339.     return(hmsg("Syntax: SET OUTPUT PACING <number>\n\
  2340. How many milliseconds to pause after sending each OUTPUT character."));
  2341. #endif /* NOSPL */
  2342.  
  2343. #ifndef NOSETKEY
  2344. case XYKEY:                /* SET KEY */
  2345.     return(hmsga(hmhskey));
  2346. #endif /* NOSETKEY */
  2347.  
  2348. #ifndef NOCSETS
  2349. case XYLANG:
  2350.     return(hmsg("Syntax: SET LANGUAGE name\n\
  2351. Selects language-specific translation rules for text-mode file transfers.\n\
  2352. Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one\n\
  2353. of these is ASCII."));
  2354. #endif /* NOCSETS */
  2355.  
  2356. case XYLINE:
  2357.     printf("\nSyntax: SET LINE devicename\n\
  2358. or:     SET PORT devicename\n\n\
  2359. Select communication device to use.  Normally %s.\n",dftty);
  2360.     if (!dfloc) {
  2361.     printf("\
  2362. If you SET LINE to other than %s, then Kermit\n",dftty);
  2363.     printf("\
  2364. will be in 'local' mode; SET LINE alone will reset Kermit to remote mode.\n\
  2365. To use the modem to dial out, first SET MODEM-DIALER (e.g., to HAYES), then");
  2366.     printf("\
  2367. \nSET LINE xxx, next issue the DIAL command, and finally CONNECT.\n\n");
  2368.     }
  2369.     return(0);
  2370.  
  2371. #ifndef NOSPL
  2372. case XYMACR:
  2373.     return(hmsga(hxymacr));
  2374. #endif /* NOSPL */
  2375.  
  2376. #ifndef NODIAL
  2377. case XYMODM:
  2378.     return(hmsga(hxymodm));
  2379. #endif /* NODIAL */
  2380.  
  2381. case XYPARI:
  2382.     return(hmsg("Syntax: SET PARITY name\n\n\
  2383. Parity to use during terminal connection and file transfer: EVEN, ODD, MARK,\n\
  2384. SPACE, or NONE.  Normally NONE."));
  2385.  
  2386. case XYPROM:
  2387.     return(hmsga(hmxyprm));
  2388.  
  2389. case XYQUIE:
  2390.     return(hmsg("Syntax: SET QUIET {ON, OFF}\n\n\
  2391. Normally OFF.  ON disables most information messages during interactive\n\
  2392. operation."));
  2393.  
  2394. #ifdef CK_SPEED
  2395. case XYQCTL:
  2396.     return(hmsga(hmxyqctl));
  2397. #endif /* CK_SPEED */
  2398.  
  2399. case XYRETR:
  2400.     return(hmsg("Syntax: SET RETRY number\n\n\
  2401. How many times to retransmit a particular packet before giving up."));
  2402.  
  2403. #ifndef NOLOCAL
  2404. #ifdef UNIX
  2405. case XYSESS:
  2406.     return(hmsg("Syntax: SET SESSION-LOG { BINARY, TEXT }\n\n\
  2407. If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
  2408. out carriage returns."));
  2409. #endif /* UNIX */
  2410.  
  2411. case XYSPEE:
  2412.     return(hmsg("Syntax: SET SPEED number\n\n\
  2413. Communication line speed for external tty line specified in most recent\n\
  2414. SET LINE command, in bits per second.  Type SET SPEED ? for a list of\n\
  2415. possible speeds."));
  2416. #endif /* NOLOCAL */
  2417.  
  2418. case XYRECV:
  2419.     return(hmsga(hxyrcv));
  2420. case XYSEND:
  2421.     return(hmsga(hxysnd));
  2422. case XYREPT:
  2423.     return(hmsga(hxyrpt));
  2424.  
  2425. #ifndef NOSERVER
  2426. case XYSERV:
  2427.     return(hmsga(hsetsrv));
  2428. #endif /* NOSERVER */
  2429.  
  2430. #ifdef TNCODE
  2431. case XYTEL:
  2432.     return(hmsga(hxytel));
  2433. #endif /* TNCODE */
  2434.  
  2435. #ifndef NOXMIT
  2436. case XYXMIT:
  2437.     return(hmsga(hsetxmit));
  2438. #endif /* NOXMIT */
  2439.  
  2440. #ifndef NOCSETS
  2441. case XYUNCS:
  2442.     return(hmsg("Syntax: SET UNKNOWN-CHAR-SET action\n\n\
  2443. DISCARD (default) means reject any arriving files encoded in unknown\n\
  2444. character sets.  KEEP means to accept them anyway."));
  2445. #endif /* NOCSETS */
  2446.  
  2447. #ifdef UNIX
  2448. case XYWILD:
  2449.     return(hmsg("Syntax: SET WILDCARD-EXPANSION { KERMIT, SHELL }\n\n\
  2450. KERMIT (the default) means C-Kermit expands filename wildcards in SEND\n\
  2451. and MSEND commands and incoming GET commands.  SHELL means your shell does \
  2452. it."));
  2453. #endif /* UNIX */
  2454.  
  2455. case XYWIND:
  2456.     return(hmsga(hxywind));
  2457.  
  2458. case XYXFER:
  2459.     return(hmsga(hxyxfer));
  2460.  
  2461. default:
  2462.     printf("Not available yet - %s\n",cmdbuf);
  2463.     return(0);
  2464.     }
  2465. }
  2466.  
  2467.  
  2468. /*  D O H R M T  --  Give help about REMOTE command  */
  2469.  
  2470. static char *hrset[] = {
  2471. "Syntax:  REMOTE SET parameter value",
  2472. "Example: REMOTE SET FILE TYPE BINARY\n",
  2473. "Ask the remote Kermit server to set the named parameter to the given value.",
  2474. "Equivalent to typing the corresponding SET command directly to the other",
  2475. "Kermit if it were in interactive mode.", "" };
  2476.  
  2477. int
  2478. dohrmt(xx) int xx; {
  2479.     int x;
  2480.     if (xx == -3) return(hmsga(hmhrmt));
  2481.     if (xx < 0) return(xx);
  2482.     if ((x = cmcfm()) < 0) return(x);
  2483.     switch (xx) {
  2484.  
  2485. case XZCWD:
  2486.     return(hmsg("Syntax: REMOTE CD [ name ]\n\n\
  2487. Ask remote Kermit server to change its working directory or device.\n\
  2488. If the device or directory name is omitted, restore the default."));
  2489.  
  2490. case XZDEL:
  2491.     return(hmsg("Syntax: REMOTE DELETE filespec\n\n\
  2492. Ask the remote Kermit server to delete the named file(s)."));
  2493.  
  2494. case XZDIR:
  2495.     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\n\
  2496. Ask the remote Kermit server to provide a directory listing of the named\n\
  2497. file(s) or if no file specification is given, of all files in the current\n\
  2498. directory."));
  2499.  
  2500. case XZHLP:
  2501.     return(hmsg("Syntax: REMOTE HELP\n\n\
  2502. Ask the remote Kermit server to list the services it provides."));
  2503.  
  2504. case XZHOS:
  2505.     return(hmsg("Syntax: REMOTE HOST command\n\n\
  2506. Send a command to the remote host computer in its own command language\n\
  2507. through the remote Kermit server."));
  2508.  
  2509. #ifndef NOFRILLS
  2510. case XZKER:
  2511.     return(hmsg("Syntax: REMOTE KERMIT command\n\n\
  2512. Send a command to the remote Kermit server in its own command language."));
  2513.  
  2514. case XZLGI:
  2515.     return(hmsg("Syntax: REMOTE LOGIN user password [ account ]\n\n\
  2516. Log in to a remote Kermit server that requires you login."));
  2517.  
  2518. case XZLGO:
  2519.     return(hmsg("Syntax: REMOTE LOGOUT\n\n\
  2520. Log out from a remote Kermit server to which you have previously logged in."));
  2521.  
  2522. case XZPRI:
  2523.     return(hmsg("Syntax: REMOTE PRINT filespec [ options ]\n\n\
  2524. Send the specified file(s) to the remote Kermit and ask it to have the\n\
  2525. file printed on the remote system's printer, using any specified options."));
  2526. #endif /* NOFRILLS */
  2527.  
  2528. case XZSET:
  2529.     return(hmsga(hrset));
  2530.  
  2531. case XZSPA:
  2532.     return(hmsg("Syntax: REMOTE SPACE [ name ]\n\n\
  2533. Ask the remote Kermit server to tell you about its disk space on the current\n\
  2534. disk or directory, or in the one that you name."));
  2535.  
  2536. #ifndef NOFRILLS
  2537. case XZTYP:
  2538.     return(hmsg("Syntax: REMOTE TYPE file\n\n\
  2539. Ask the remote Kermit server to type the named file(s) on your screen."));
  2540.  
  2541. case XZWHO:
  2542.     return(hmsg("Syntax: REMOTE WHO [ name ]\n\n\
  2543. Ask the remote Kermit server to list who's logged in, or to give information\n\
  2544. about the named user."));
  2545. #endif /* NOFRILLS */
  2546.  
  2547. #ifndef NOSPL
  2548. case XZQUE:
  2549.     return(hmsg(
  2550. "Syntax: REMOTE QUERY { KERMIT, SYSTEM, USER } variable-name\n\n\
  2551. Ask the remote Kermit server to send the value of the named variable of the\n\
  2552. given type, and make it available in the \\v(query) variable."));
  2553.  
  2554. case XZASG:
  2555.     return(hmsg(
  2556. "Syntax: REMOTE ASSIGN variable-name [ value ]\n\n\
  2557. Assign the given value to the named global variable on the server."));
  2558.  
  2559. #endif /* NOSPL */
  2560. default:
  2561.     if ((x = cmcfm()) < 0) return(x);
  2562.     printf("not working yet - %s\n",cmdbuf);
  2563.     return(-2);
  2564.     }
  2565. }
  2566. #endif /* NOHELP */
  2567. #endif /* NOICP */
  2568.