⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ckuus2.c

📁 早期freebsd实现
💻 C
📖 第 1 页 / 共 5 页
字号:
/*  C K U U S 2  --  User interface STRINGS & help module for C-Kermit  */ /*  Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),  Columbia University Center for Computing Activities.  First released January 1985.  Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New  York.  Permission is granted to any individual or institution to use this  software as long as it is not sold for profit.  This copyright notice must be  retained.  This software may not be included in commercial products without  written permission of Columbia University.*/ /* This module separates long strings from the body of the other ckuus* modules.*/#include "ckcdeb.h"#include "ckcnet.h"#include "ckcasc.h"#include "ckcker.h"#include "ckuusr.h"#include "ckcxla.h" extern char *ccntab[];#ifndef NOICP#ifdef DCMDBUFextern char *cmdbuf;#elseextern char cmdbuf[];#endif /* DCMDBUF */#endif /* NOICP */#ifdef DEBUGextern char debfil[];#endif /* DEBUG */#ifdef TLOGextern char trafil[];#endifextern char *xarg0;extern int nrmt, nprm, dfloc, local, parity, duplex, escape;extern int turn, flow;extern int binary, warn, quiet, keep;extern int success;extern long speed;extern char *dftty, *versio, *ckxsys;extern struct keytab prmtab[];extern struct keytab remcmd[]; /* Command-Line help (Unix command-line arguments) */#ifndef NOCMDLstaticchar *hlp1[] = {#ifndef NOICP" [cmdfile] [-x arg [-x arg]...[-yyy]..] [ = text ] ]\n",#else"[-x arg [-x arg]...[-yyy]..]\n",#endif"  -x is an option requiring an argument, -y an option with no argument.\n",#ifndef NOICP#ifndef NOSPL"     = means ignore following words, but place in array \\&@[].\n",#else"     = means ignore following material.\n",#endif /* NOSPL */#else"     = means ignore following material.\n",#endif /* NOICP */"actions:\n","  -s files  send files                    -r  receive files\n","  -s -      send files from stdin         -k  receive files to stdout\n",#ifndef NOSERVER"  -x        enter server mode             -f  finish remote server\n\n",#else"  -f        finish remote server\n\n",#endif /* NOSERVER */"  -g files  get remote files from server (quote wildcards)\n","  -a name   alternate file name, used with -s, -r, -g\n","  -c        connect (before file transfer), used with -l and -b\n","  -n        connect (after file transfer), used with -l and -b\n\n","settings:\n","  -l line   communication line device     -q   quiet during file transfer\n",#ifdef NETCONN"  -j host   network host name             -i   binary file transfer\n",#else"  -i        binary file transfer\n",#endif /* NETCONN */"  -b bps    line speed, e.g. 2400         -t   half duplex, xon handshake\n",#ifdef DEBUG"  -p x      parity, x = e,o,m,s, or n     -d   log debug info to debug.log\n",#else"  -p x      parity, x = e,o,m,s, or n\n",#endif /* DEBUG */#ifndef NOICP"  -y name   alternate init file name      -w   write over files\n",#else"  -w        write over files\n",#endif /* NOICP */"  -e n      receive packet length         -v n window size\n",#ifndef NODIAL"  -m name   modem type                    -z   force foreground\n",#else"  -z        force foreground\n",#endif /* NODIAL */#ifdef SUNX25"  -X  X.25 address              -o index  X.25 closed user group call\n","  -u  X.25 reverse charge call  -U string X.25 call user data\n",#endif /* SUNX25 */#ifdef NOICP"Interactive command parser removed.\n",#else"If no action command is included, or -S is, enter interactive dialog.\n",#endif""}; /*  U S A G E */ VOIDusage() {#ifndef MINIX#ifdef NOICP#endif /* NOICP */        conol("Usage: ");    conol(xarg0);    conola(hlp1);#else    conol("Usage: ");    conol(xarg0);    conol(" [-x arg [-x arg]...[-yyy]..] ]\n");#endif /* MINIX */}#endif /* NOCMDL */#ifndef NOICP/*  Interactive help strings  */ static char *tophlp[] = { "Trustees of Columbia University in the City of New York.\n",#ifndef NOHELP"Type INTRO for an introduction to C-Kermit, press ? for a list of commands.","Type HELP followed by a command name for help about a specific command.",#else"Type ? for a list of commands; see documentation for detailed descriptions.",#endif /* NOHELP */"While typing commands, you may use the following special characters:"," DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed."," CTRL-W:  Delete the most recent word typed."," CTRL-U:  Delete the current line."," CTRL-R:  Redisplay the current line."," ?        (question mark) Display a menu for the current command field."," ESC      (or TAB) Attempt to complete the current field."," \\        (backslash) include the following character literally",#ifndef NOSPL"          or introduce a backslash code, variable, or function.\n",#else"          or introduce a numeric backslash code.\n",#endif /* NOSPL */"Command words other than filenames can be abbreviated in most contexts.",#ifndef NOCMDL"From system level, type \"kermit -h\" for help about command-line options.",#endif /* NOCMDL */" ",#ifdef MAC"Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and","Christine M. Gianone. Digital Press ISBN: 1-55558-108-0; Prentice-Hall ISBN:","0-13-037490-3.  DECdirect:+1-800-344-4825, Order # EY-J896E-DP, US $34.95,","January 1993.  Macintosh-specific documentation is in preparation.",#else"DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,","Digital Press.  DP ISBN: 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3.","DECdirect: +1-800-344-4825, Order Number EY-J896E-DP, US $34.95, Jan 1993.",#endif /* MAC */""}; #ifndef NOHELPchar *introtxt[] = {"Welcome to C-Kermit communications software for:"," . Error-free file transfer"," . Terminal connection",#ifndef NOSPL" . Script programming",#endif /* NOSPL */#ifndef NOICS" . International character set conversion",#endif /* NOICS */"\nSupporting:"," . Serial connections, direct or dialed.",#ifndef NODIAL" . Automatic modem dialing",#endif /* NODIAL */#ifdef TCPSOCKET" . TCP/IP network connections",#endif /* TCPSOCKET */#ifdef SUNX25" . X.25 network connections",#endif /* SUNX25 */#ifdef OS2#ifdef DECNET" . DECnet/PATHWORKS LAT Ethernet connections","   (if you have PATHWORKS installed on your OS/2 system)",#endif /* DECNET */#ifdef NPIPE" . Microsoft LAN Manager named-pipe network connections","   (if you have LAN Manager installed on your OS/2 system)",#endif /* NPIPE */#endif /* OS2 */" . UNIX, VAX/VMS, OS/2, AOS/VS, OS-9, Commodore Amiga, Atari ST.","\nBasic C-Kermit commands:","  EXIT          exit from C-Kermit","  HELP          request help about a command","  TAKE          execute commands from a file","\nCommands for file transfer:","  SEND          send files","  RECEIVE       receive files","  SERVER        be a file transfer server","\nEssential settings:","  SET PARITY    communications parity","  SET FLOW      communications flow control, such as XON/XOFF","  SET FILE      file settings, for example TYPE TEXT or TYPE BINARY","\nTo make a direct serial connection:","  SET LINE      select serial communication device","  SET SPEED     select communication speed   ","  CONNECT       begin terminal connection",#ifndef NODIAL"\nTo dial out with a modem:","  SET MODEM     select modem type","  SET LINE      select serial communication device","  SET SPEED     select communication speed   ","  DIAL          dial ","  CONNECT       begin terminal connection",#endif /* NODIAL */#ifdef NETCONN"\nTo make a network connection:","  SET NETWORK   select network type","  SET HOST      select network host","  CONNECT       begin terminal connection",#ifdef TNCODE"  TELNET        select a TCP/IP host and CONNECT to it",#endif /* TNCODE */#endif /* NETCONN */"\nTo return from a terminal connection to the C-Kermit prompt:","  Type your escape character followed by the letter C.","\nTo display your escape character:","  SHOW ESCAPE","\nTo display other settings:","  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.","\nFor further information about a particular command, type HELP xxx,","where xxx is the name of the command.  For documentation, news of new","releases, and information about other Kermit software, contact:\n","  Kermit Distribution        E-mail:","  Columbia University        kermit@columbia.edu (Internet)","  612 West 115th Street      KERMIT@CUVMA (BITNET/EARN)","  New York, NY 10025 USA","  Phone: (212) 854-3703      Fax: (212) 662-6442",""};static char *hmxxbye = "Syntax: BYE\n\Shut down and log out a remote Kermit server"; static char *hmxxclo[] = {"Syntax:  CLOSE name","Example: CLOSE SESSION\n","Close one of the following logs or files:","  SESSION",#ifdef TLOG"  TRANSACTION",#endif /* TLOG */"  PACKET",#ifdef DEBUG"  DEBUGGING",#endif /* DEBUG */#ifndef NOSPL"  READ","  WRITE",#endif /* NOSPL */"Type HELP LOG and HELP OPEN for further info.", "" }; static char *hmxxcon = "Syntax: CONNECT (or C)\n\n\Connect to a remote computer via the tty device given in the most recent\n\SET LINE command, or the network host named in the most recent SET HOST\n\command.  Type the escape character followed by C to get back, or followed\n\by ? for a list of CONNECT-mode escape commands."; static char *hmxxget = "Syntax: GET filespec\n\Tell the remote Kermit server to send the named file or files.\n\If the filespec is omitted, then you are prompted for the remote and\n\local filenames separately."; static char *hmxxlg[] = { "Syntax: LOG (or L) name [ { NEW, APPEND } ]","Record information in a log file:\n",#ifdef DEBUG"DEBUGGING     Debugging information, to help track down bugs in the C-Kermit","              program (default log name is debug.log).\n",#endif /* DEBUG */"PACKETS       Kermit packets, to help with protocol problems (packet.log)","SESSION       Terminal session, during CONNECT command (session.log)",#ifdef TLOG"TRANSACTIONS  Names and statistics about files transferred (transact.log)\n",#endif /* TLOG */"If you include the APPEND keyword after the filename, the existing log file,","if any, is appended to; otherwise a new file is created.","" } ; #ifndef NOSCRIPTstatic char *hmxxlogi[] = { "\Syntax: SCRIPT text\n","Login to a remote system using the text provided.  The login script","is intended to operate similarly to uucp \"L.sys\" entries.","A login script is a sequence of the form:\n","  expect send [expect send] . . .\n","where 'expect' is a prompt or message to be issued by the remote site, and","'send' is the names, numbers, etc, to return.  The send may also be the","keyword EOT, to send control-d, or BREAK (or \\\\b), to send a break signal.","Letters in send may be prefixed by ~ to send special characters.  These are:","~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t","append a return, and ~o[o[o]] for octal of a character.  As with some","uucp systems, sent strings are followed by ~r unless they end with ~c.\n","Only the last 7 characters in each expect are matched.  A null expect,","e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect","that a sequence might not arrive, as with uucp, conditional sequences","may be expressed in the form:\n","  -send-expect[-send-expect[...]]\n","where dashed sequences are followed as long as previous expects fail.","" };#endif static char *hmxxrc[] = { "Syntax: RECEIVE (or R) [filespec]\n","Wait for a file to arrive from the other Kermit, which must be given a","SEND command.  If the optional filespec is given, the (first) incoming","file will be stored under that name, otherwise it will be stored under","the name it arrives with.","" } ; static char *hmxxsen = "\Syntax: SEND (or S) filespec [name]\n\n\Send the file or files specified by filespec.\n\filespec may contain wildcard characters '*' or '?'.  If no wildcards,\n\then 'name' may be used to specify the name 'filespec' is sent under; if\n\'name' is omitted, the file is sent under its own name."; #ifndef NOMSENDstatic char *hmssmse = "\Syntax: MSEND filespec [ filespec [ ... ] ]\n\n\Send the files specified by the filespecs.  One or more filespecs may be\n\listed, separated by spaces.  Any or all filespecs may contain wildcards\n\and they may be in different directories.  An alternate name cannot be given.";#endif /* NOMSEND */#ifndef NOSERVERstatic char *hmxxser = "Syntax: SERVER\n\n\Enter server mode on the currently selected line.  All further commands\n\will be taken in packet form from the other Kermit program.  Use FINISH\n\or BYE to get C-Kermit out of server mode.";#endif /* NOSERVER */ static char *hmhset[] = { "\The SET command is used to establish various communication or file","parameters.  The SHOW command can be used to display the values of","SET parameters.  Help is available for each individual parameter;","type HELP SET ? to see what's available.","" } ; #ifndef NOSETKEYstatic char *hmhskey[] = { "Syntax: SET KEY k text\n","Map the key k to send 'text' when pressed during CONNECT mode.","K can be expressed as decimal number or backslash code, 'text'","can also contain any backslash code.  If 'text' has the length 1",

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -