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

📄 ckuus2.c

📁 C语言核心协议的C语言源代码,用于早期网络通信
💻 C
📖 第 1 页 / 共 2 页
字号:
case XXREM:    if ((y = cmkey(remcmd,nrmt,"Remote command","")) == -2) return(y);    if (y == -1) return(y);    if (x = (cmcfm()) < 0) return(x);    return(dohrmt(y));case XXSEN:    return(hmsg(hmxxsen));case XXSER:    return(hmsg(hmxxser));case XXSET:    if ((y = cmkey(prmtab,nprm,"Parameter","")) == -2) return(y);    if (y == -2) return(y);    if (x = (cmcfm()) < 0) return(x);    return(dohset(y));case XXSHE:#ifdef vms    return(hmsg("\Issue a command to VMS (space required after '!')"));#else    return(hmsg("\Issue a command to the Unix shell (space required after '!')"));#endifcase XXSHO:    return(hmsg("\Display current values of 'set' parameters; 'show version' will display\n\program version information for each of the C-Kermit modules."));case XXSPA:    return(hmsg("Display disk usage in current device, directory"));case XXSTA:    return(hmsg("Display statistics about most recent file transfer"));case XXTAK:    return(hmsg("\Take Kermit commands from the named file.  Kermit command files may\n\themselves contain 'take' commands, up to a reasonable depth of nesting."));default:    if (x = (cmcfm()) < 0) return(x);    printf2("Not available yet - %s\n",cmdbuf);    break;    }    return(0);}/*  H M S G  --  Get confirmation, then print the given message  */hmsg(s) char *s; {    int x;    if (x = (cmcfm()) < 0) return(x);    puts(s);    return(0);}#ifdef AMIGAhmsga(s) char *s[]; {                   /* Same function, but for arrays */    int x, i;    if ( x = (cmcfm()) < 0) return(x);    for ( i = 0; *s[i] ; i++ ) conol(s[i]);    putchar('\n');    return(0);}#elsehmsga(s) char *s[]; {                   /* Same function, but for arrays */    int x, i;    if ( x = (cmcfm()) < 0) return(x);    for ( i = 0; *s[i] ; i++ ) fputs(s[i], stdout);    fputc( '\n', stdout);    return(0);}#endif/*  D O H S E T  --  Give help for SET command  */dohset(xx) int xx; {    if (xx == -3) return(hmsga(hmhset));    if (xx < 0) return(xx);    switch (xx) {case XYCHKT:    return(hmsga(hmxychkt));case XYDELA:    puts("\Number of seconds to wait before sending first packet after 'send' command.");    return(0);case XYDUPL:    puts("\During 'connect': 'full' means remote host echoes, 'half' means this program");    puts("does its own echoing.");    return(0);case XYESC:    printf2("%s","\Decimal ASCII value for escape character during 'connect', normally 28\n\(Control-\\)\n");    return(0);case XYFILE:    return(hmsga(hmxyf));case XYFLOW:    puts("\Type of flow control to be used.  Choices are 'xon/xoff' and 'none'.");    puts("normally xon/xoff.");    return(0);case XYHAND:    puts("\Decimal ASCII value for character to use for half duplex line turnaround");    puts("handshake.  Normally, handshaking is not done.");    return(0);case XYLINE:    printf2("\Device name of communication line to use.  Normally %s.\n",dftty);    if (!dfloc) {        printf2("\If you set the line to other than %s, then Kermit\n",dftty);        printf("\will be in 'local' mode; 'set line' will reset Kermit to remote mode.\n");    puts("\If the line has a modem, and if the modem-dialer is set to direct, this");    puts("\command causes waiting for a carrier detect (e.g. on a hayes type modem).");    puts("\This can be used to wait for incoming calls.");    puts("\To use the modem to dial out, first set modem-dialer (e.g., to hayes), then");    puts("set line, next issue the dial command, and finally connect.");    }    return(0);case XYMODM:    puts("\Type of modem for dialing remote connections.  Needed to indicate modem can");    puts("\be commanded to dial without 'carrier detect' from modem.  Many recently");    puts("\manufactured modems use 'hayes' protocol.  Type 'set modem ?' to see what");    puts("\types of modems are supported by this program.");    return(0);case XYPARI:    puts("Parity to use during terminal connection and file transfer:");    puts("even, odd, mark, space, or none.  Normally none.");    return(0);case XYPROM:    puts("Prompt string for this program, normally 'C-Kermit>'.");    return(0);case XYSPEE:    puts("\Communication line speed for external tty line specified in most recent");    puts("\'set line' command.  Any of the common baud rates:");#ifdef AMIGA    puts(" 0, 300, 1200, 2400, 4800, 9600, 19200.");#else    puts(" 0, 110, 150, 300, 600, 1200, 1800, 2400, 4800, 9600.");#endif    return(0);case XYRECV:    puts("\Specify parameters for inbound packets:");    puts("\End-Of-Packet (ASCII value), Packet-Length (94 or less),");    puts("\Padding (amount, 94 or less), Pad-Character (ASCII value),");    puts("\Start-Of-Packet (ASCII value), and Timeout (94 seconds or less),");    puts("\all specified as decimal numbers.");    return(0);case XYSEND:    puts("\Specify parameters for outbound packets:");    puts("\End-Of-Packet (ASCII value), Packet-Length (94 or less),");    puts("\Padding (amount, 94 or less), Pad-Character (ASCII value),");    puts("\Start-Of-Packet (ASCII value), and Timeout (94 seconds or less),");    puts("\all specified as decimal numbers.");    return(0);default:    printf3("%s","Not available yet - %s\n",cmdbuf);    return(0);    }}/*  D O H R M T  --  Give help about REMOTE command  */dohrmt(xx) int xx; {    int x;    if (xx == -3) return(hmsga(hmhrmt));    if (xx < 0) return(xx);    switch (xx) {case XZCWD:    return(hmsg("\Ask remote Kermit server to change its working directory."));case XZDEL:    return(hmsg("\Ask remote Kermit server to delete the named file(s)."));case XZDIR:    return(hmsg("\Ask remote Kermit server to provide directory listing of the named file(s)."));case XZHLP:    return(hmsg("\Ask remote Kermit server to tell you what services it provides."));case XZHOS:    return(hmsg("\Send a command to the remote system in its own command language\n\through the remote Kermit server."));case XZSPA:    return(hmsg("\Ask the remote Kermit server to tell you about its disk space."));case XZTYP:    return(hmsg("\Ask the remote Kermit server to type the named file(s) on your screen."));case XZWHO:    return(hmsg("\Ask the remote Kermit server to list who's logged in, or to give information\n\about the specified user."));default:    if (x = (cmcfm()) < 0) return(x);    printf3("%s","not working yet - %s\n",cmdbuf);    return(-2);    }}

⌨️ 快捷键说明

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