📄 ckuus2.c
字号:
(see OPEN)."));#endif /* NOSPL */case XXREC: return(hmsga(hmxxrc)); case XXREM: y = cmkey(remcmd,nrmt,"Remote command","",xxstring); return(dohrmt(y)); #ifndef NOSPLcase XXRET: return(hmsg("Syntax: RETURN [ value ]\n\Return from a macro. An optional return value can be given for use with\n\with \\fexecute(macro), which allows macros to be used like functions."));case XXSEN: return(hmsg(hmxxsen));#endif /* NOSPL */ #ifndef NOSERVERcase XXSER: return(hmsg(hmxxser));#endif /* NOSERVER */ #ifndef NOJCcase XXSUS: return(hmsg("Syntax: SUSPEND or Z\n\Suspend Kermit. Continue Kermit with the appropriate system command,\n\such as fg."));#endif /* NOJC */case XXSET: y = cmkey(prmtab,nprm,"Parameter","",xxstring); debug(F101,"HELP SET y","",y); return(dohset(y)); #ifndef NOPUSHcase XXSHE: return(hmsga(hxxshe));#endif /* NOPUSH */ #ifndef NOSHOWcase XXSHO: return(hmsg("\Display current values of various items (SET parameters, variables, etc).\n\Type SHOW ? for a list of categories."));#endif /* NOSHOW */ case XXSPA:#ifdef datageneral return(hmsg("\Display disk usage in current device, directory,\n\or return space for a specified device, directory."));#else return(hmsg("Syntax: SPACE\n\Display disk usage in current device and/or directory"));#endif case XXSTA: return(hmsg("Syntax: STATISTICS\n\Display statistics about most recent file transfer")); #ifndef NOSPLcase XXSTO: return(hmsg("Syntax: STOP [ number [ message ] ]\n\Stop executing the current macro or TAKE file and return immediately to\n\the C-Kermit prompt. Number is a return code. Message printed if given."));#endif /* NOSPL */case XXTAK: return(hmsg("Syntax: TAKE filename\n\Take Kermit commands from the named file. Kermit command files may\n\themselves contain TAKE commands, up to a reasonable depth of nesting.")); #ifdef NETCONNcase XXTEL: return(hmsg("Syntax: TELNET [ host ]\n\Equivalent to SET HOST host, followed by CONNECT. If hostname omitted,\n\previous connection (if any) is resumed."));#endif /* NETCONN */#ifndef NOXMITcase XXTRA: return(hmsga(hxxxmit));#endif /* NOXMIT */#ifndef NOFRILLScase XXTYP: return(hmsg("Syntax: TYPE file\n\Display a file on the screen. Pauses if you type Ctrl-S, resumes if you\n\type Ctrl-Q, returns immediately to C-Kermit prompt if you type Ctrl-C."));#endif /* NOFRILLS */#ifndef NOSPLcase XXWHI: return(hmsga(whihlp));#endif /* NOSPL */#ifndef NOCSETScase XXXLA: return(hmsga(hxxxla));#endif /* NOCSETS */case XXVER: return(hmsg("Syntax: VERSION\nDisplays the program version number."));#ifndef NOSPLcase XXWAI: return(hmsga(hxxwai));#endif /* NOSPL */#ifndef NOFRILLScase XXWHO: return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));case XXWRI: return(hmsga(hxxwri));#endif /* NOFRILLS */#ifndef NOSPLcase XXIFX: return(hmsga(ifxhlp));#endif /* NOSPL */#endif /* NOHELP */default: if ((x = cmcfm()) < 0) return(x); printf("Help not available - %s\n",cmdbuf); break; } return(success = 0);}#ifdef NOHELP int /* Print an array of lines, */hmsga(s) char *s[]; { /* cheap version. */ int i; if ((i = cmcfm()) < 0) return(i); printf("\n"); /* Start off with a blank line */ for (i = 0; *s[i]; i++) { /* Print each line. */ printf("%s\n",s[i]); } printf("\n"); return(0);}#elseint /* Print an array of lines, */hmsga(s) char *s[]; { /* pausing at end of each screen. */ int x, y, i, j, k, n; if ((x = cmcfm()) < 0) return(x); printf("\n"); /* Start off with a blank line */ n = 1; /* Line counter */ for (i = 0; *s[i]; i++) { printf("%s\n",s[i]); /* Print a line. */ y = (int)strlen(s[i]); k = 1; for (j = 0; j < y; j++) /* See how many newlines were */ if (s[i][j] == '\n') k++; /* in the string... */ n += k; if (n > 21) /* After a screenful, give them */ if (!askmore()) return(-9); else n = 0; } printf("\n"); return(0);}/* H M S G -- Get confirmation, then print the given message */ inthmsg(s) char *s; { int x; if ((x = cmcfm()) < 0) return(x); printf("\n%s\n\n",s); return(0);} #ifndef NOXMITstatic char *hsetxmit[] = {"Syntax: SET TRANSMIT parameter value\n","Controls the behavior of the TRANSMIT command, used for uploading files","to computers that don't have Kermit programs. Parameters are:\n","ECHO ON/OFF: Whether to echo text as it is being transmitted.","EOF text: Text to send after end of file is reached.","FILL number: ASCII value of character to insert into blank lines.","LINEFEED ON/OFF: Transmit LF as well as CR at the end of each line."," Normally, only CR is sent.","LOCKING-SHIFT ON/OFF: Whether to use SO/SI for transmitting 8-bit data"," when PARITY is not NONE.","PAUSE number: How many milliseconds to pause after transmitting each line"," (text mode), or each character (binary mode).","PROMPT number: ASCII value of character to look for from host before"," sending next line, normally LF (10).","Synonym: SET XMIT.","" };#endif /* NOXMIT */static char *hsetbkg[] = {"Syntax: SET BACKGROUND { OFF, ON }\n","SET BACKGROUND OFF forces prompts and messages to appear on your screen","even though Kermit thinks it is running in the background.", "" };#ifdef DYNAMICstatic char *hsetbuf[] = {"Syntax: SET BUFFERS n1 n2\n","Change the overall amount of memory allocated for SEND and RECEIVE packet","buffers, respectively. Bigger numbers let you have longer packets and more","window slots", "" };#endif /* DYNAMIC */static char *hsetcmd[] = {"Syntax: SET COMMAND BYTESIZE { 7, 8 }\n","SET COMMAND BYTE 8 allows you to use an 8-bit (international) character set","in the commands you type at the C-Kermit> prompt. 7 is the default.", "" };static char *hsetcar[] = {"Syntax: SET CARRIER ON, AUTO, or OFF\n","Attempts to control treatment of carrier on the communication device.","ON means that carrier is required at all times except during the DIAL","command. OFF means that carrier is never required. AUTO (the default)","means that carrier is required only during CONNECT.", "" };static char *hsetat[] = {"Syntax: SET ATTRIBUTES name ON or OFF\n","Use this command to enable (ON) or disable (OFF) the transmission of","selected file attributes along with each file, and to handle or ignore","selected incoming file attributes, including:\n"," CHARACTER-SET: The transfer character set for text files"," DATE: The file's creation date"," DISPOSITION: Unusual things to do with the file, like MAIL or PRINT"," LENGTH: The file's length"," SYSTEM-ID: Machine/Operating system of origin"," TYPE: The file's type (text or binary)\n","You can also specify ALL to select all of them. Examples:\n"," SET ATTR DATE OFF\n SET ATTR SIZE ON\n SET ATTR ALL OFF", ""};#ifndef NOSPLstatic char *hxxinp[] = {"Syntax: SET INPUT parameter value\n","The SET INPUT command controls the behavior of the INPUT command:\n","SET INPUT CASE { IGNORE, OBSERVE }","Tells whether alphabetic case is to be significant in string comparisons.\n","SET INPUT ECHO { ON, OFF }","Tells whether to display arriving characters read by INPUT on the screen.\n","SET INPUT SILENCE <number>","The maximum number to seconds of silence (no input at all) before the INPUT","command times out, 0 for no maximum.\n","SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }","Tells whether to proceed or quit from a script program if an INPUT command","fails. PROCEED (default) allows use of IF SUCCESS and IF FAILURE commands.","" };#endif /* NOSPL */static char *hxytak[] = {"Syntax: SET TAKE parameter value\n","Controls behavior of TAKE command.\n","SET TAKE ECHO { ON, OFF } tells whether commands read from a TAKE file","should be displayed on the screen.\n","SET TAKE ERROR { ON, OFF } tells whether a TAKE command file should be","automatically terminated when a command fails.", "" };static char *hxyterm[] = {"Syntax: SET TERMINAL parameter value\n",#ifdef OS2"SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }","sets the mode for the arrow keys during VT terminal emulation.\n", #endif /* OS2 */"SET TERMINAL BYTESIZE 7 or 8, to use 7- or 8-bit terminal characters","between C-Kermit and the remote host during CONNECT.\n","SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ] to specify the","character set used by the remote host, <remote-cs>, and the character","set used by C-Kermit locally, <local-cs>. If you don't specify the","local character set, the current FILE CHARACTER-SET is used. When you","specify two different character sets, C-Kermit translates between them","during CONNECT. By default, both character sets are TRANSPARENT.\n",#ifdef OS2"SET TERMINAL COLOR <screenpart> <foreground> <background>, to set","the colors of the terminal emulation screen. <screenpart> may be one","of NORMAL, REVERSE, UNDERLINED, STATUS and HELP. <foreground> and","<background> may be one of BLACK, BLUE, GREEN, CYAN, RED, MAGENTA,","BROWN, LGRAY, DGRAY, LBLUE, LGREEN, LCYAN, LRED, LMAGENTA, YELLOW","or WHITE. The L prefix for the color names means Light.\n",#endif /* OS2 */"SET TERMINAL CR-DISPLAY { CRLF, NORMAL } to specify how incoming","carriage return characters are to be displayed on your screen.\n","SET TERMINAL ECHO { LOCAL, REMOTE } to specify which side does the","echoing during terminal connection.\n",#ifdef OS2"SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC } to specify the keypad","mode for VT terminal emulation.\n",#endif /* OS2 */"SET TERMINAL LOCKING-SHIFT { OFF, ON } tells C-Kermit whether to use","Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch between 7-bit and 8-bit","characters during CONNECT. OFF by default.\n","SET TERMINAL NEWLINE-MODE { OFF, ON } tells whether to send CRLF when you","type CR during CONNECT mode.\n",#ifdef OS2"SET TERMINAL TYPE { VT102, VT52 } to select which terminal to emulate.\n","SET TERMINAL WRAP { OFF, ON } to tell whether the VT terminal emulator","should automatically wrap long lines on your screen.\n",#endif /* OS2 */"Type SHOW TERMINAL to see current terminal settings.","" };#ifdef NETCONNstatic char *hxyhost[] = {"Syntax: SET HOST hostname-or-number\n","Select a network host. Use this command instead of SET LINE.","After SET HOST give the host name or number. TCP/IP Examples:\n"," SET HOST watsun.cc.columbia.edu"," SET HOST 128.59.39.2","" };#ifdef TNCODEstatic char *hxytel[] = {"Syntax: SET TELNET parameter value\n","For TCP/IP SET HOST and TELNET connections:\n","SET TELNET ECHO { LOCAL, REMOTE }"," C-Kermit's initial echoing state for TELNET connections, LOCAL by default."," After the connection is made, TELNET negotiations determine the echoing"," state.","SET TELNET NEWLINE-MODE { OFF, ON }"," ON (the default) means send CRLF when user types CR."," OFF means send CR alone.","SET TELNET TERMINAL-TYPE name"," The terminal type to send to the remote TELNET host. If none is given,"," your local terminal type is sent.\n","Type SHOW NETWORK to see the current values of these parameters.","" };#endif /* TNCODE */static char *hxynet[] = {"Syntax: SET NETWORK network-type\n","Select the type of network to be used with SET HOST connections:\n",#ifdef TCPSOCKET" SET NETWORK TCP/IP",#endif /* TCPSOCKET */#ifdef SUNX25" SET NETWORK X.25",#endif /* SUNX25 */#ifdef DECNET" SET NETWORK DECNET",#endif /* DECNET */""};#endif /* NETCONN */ #ifndef NOSPLstatic char *hxymacr[] = {"Syntax: SET MACRO parameter value\n","Controls the behavior of macros.\n","SET MACRO ECHO { ON, OFF } tells whether commands executed from a macro","definition should be displayed on the screen.\n","SET MACRO ERROR { ON, OFF } tells whether a macro should be automatically","terminated upon a command error.", "" };#endif /* NOSPL */#ifndef NODIALstatic char *hxymodm[] = {"Syntax: SET MODEM-DIALER name\n","Type of modem for dialing remote connections. Selects the dialing protocol,",#ifdef MINIDIAL"such as HAYES, to be used by the DIAL command. Several dialing protocols",#else"such as HAYES, to be used by the DIAL command. Many modem dialing protocols",#endif /* MINIDIAL */"are supported; type SET MODEM ? for a list. DIRECT or NONE means a direct","connection, with no modem at all. Also see HELP DIAL, HELP SET CARRIER.","" };#endif /* NODIAL */static char *hmxyprm[] = {"Syntax: SET PROMPT [ text ]\n",#ifdef MAC"Prompt text for this program, normally 'C-Kermit>'. May contain backslash",#else"Prompt text for this program, normally 'Mac-Kermit>'. May contain backslash",#endif /* MAC */"codes for special effects. Surround by { } to preserve leading or trailing",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -