📄 ckuusy.c
字号:
#endif /* OS2 */#ifndef NOSPL { "user", XA_USER, CM_ARG },#endif /* NOSPL */#endif /* NOLOCAL */ { "userfile", XA_USFI, CM_ARG|CM_PRE }, { "version", XA_VERS, 0 },#ifndef NOLOCAL#ifdef OS2 { "width", XA_COLS, CM_ARG|CM_PRE },#endif /* OS2 */#endif /* NOLOCAL */#ifdef CKWTMP { "wtmpfile", XA_WTFI, CM_ARG|CM_PRE }, { "wtmplog", XA_WTMP, CM_ARG|CM_PRE },#endif /* CKWTMP */#endif /* CK_LOGIN */ { "xferfile", XA_IKFI, CM_ARG|CM_PRE }, { "xferlog", XA_IKLG, CM_ARG|CM_PRE },#ifndef NOLOCAL#ifdef KUI { "xpos", XA_XPOS, CM_ARG|CM_PRE }, { "ypos", XA_YPOS, CM_ARG|CM_PRE },#endif /* KUI */#endif /* NOLOCAL */ {"", 0, 0 }};int nxargs = sizeof(xargtab)/sizeof(struct keytab) - 1;static struct keytab oktab[] = { { "0", 0, 0 }, { "1", 1, 0 }, { "2", 2, 0 }, { "3", 3, 0 }, { "4", 4, 0 }, { "5", 5, 0 }, { "6", 6, 0 }, { "7", 7, 0 }, { "8", 8, 0 }, { "9", 9, 0 }, { "false", 0, 0 }, { "no", 0, 0 }, { "off", 0, 0 }, { "ok", 1, 0 }, { "on", 1, 0 }, { "true", 1, 0 }, { "yes", 1, 0 }};static int noktab = sizeof(oktab)/sizeof(struct keytab);#define XARGBUFL 32char * xopthlp[XA_MAX+1]; /* Extended option help */char * xarghlp[XA_MAX+1]; /* Extended argument for option */static VOIDinixopthlp() { int i, j; for (i = 0; i <= XA_MAX; i++) { /* Initialize all to null */ xopthlp[i] = NULL; xarghlp[i] = NULL; } for (i = 0; i < nxargs; i++) { /* Then for each defined keyword */ j = xargtab[i].kwval; /* index by associated value */ if (j < 0 || j > XA_MAX) continue; switch (j) {#ifdef CK_LOGIN case XA_ANON: /* "--anonymous" */ xopthlp[j] = "--anonymous:{on,off} [IKSD only]"; xarghlp[j] = "Whether to allow anonymous IKSD logins"; break;#ifdef UNIX case XA_PRIV: xopthlp[j] = "--privid:{on,off} [IKSD only]"; xarghlp[j] = "Whether to allow privileged IDs to login to IKSD"; break;#endif /* UNIX */#endif /* CK_LOGIN */ case XA_BAFI: /* "--bannerfile" */ xopthlp[j] = "--bannerfile:<filename>"; xarghlp[j] = "File to display upon startup or IKSD login"; break; case XA_CDFI: /* "--cdfile" */ xopthlp[j] = "--cdfile:<filename>"; xarghlp[j] = "File to display when server changes directory"; break; case XA_CDMS: /* "--cdmessage" */ xopthlp[j] = "--cdmessage:{on,off}"; xarghlp[j] = "Whether to display CD message file"; break; case XA_HELP: /* "--help" */ xopthlp[j] = "--help"; xarghlp[j] = "Print this help text about extended options"; break; case XA_HEFI: /* "--help" */ xopthlp[j] = "--helpfile:<filename>"; xarghlp[j] = "File containing custom info for HELP command"; break; case XA_IKFI: /* "--xferfile" */ xopthlp[j] = "--xferfile:<filename> [IKSD only]"; xarghlp[j] = "Name of ftpd-like logfile."; break; case XA_IKLG: /* "--xferlog" */ xopthlp[j] = "--xferlog:{on,off} [IKSD only]"; xarghlp[j] = "Whether to keep an ftpd-like logfile."; break;#ifdef CK_LOGIN case XA_ANFI: /* "--initfile" */ xopthlp[j] = "--initfile:<filename> [IKSD only]"; xarghlp[j] = "Initialization file for anonymous users."; break;#ifdef CK_PERM case XA_PERM: /* "--permissions" */ xopthlp[j] = "--permissions:<octalnum> [IKSD only]"; xarghlp[j] = "Permissions for files uploaded by anonymous users."; break;#endif /* CK_PERM */#ifdef UNIX case XA_ROOT: /* "--root" */ xopthlp[j] = "--root:<directory> [IKSD only]"; xarghlp[j] = "File-system root for anonymous users."; break;#else /* UNIX */#ifdef CKROOT case XA_ROOT: /* "--root" */ xopthlp[j] = "--root:<directory> [IKSD only]"; xarghlp[j] = "File-system root for anonymous users."; break;#endif /* CKROOT */#endif /* UNIX */#endif /* CK_LOGIN */#ifdef CKSYSLOG case XA_SYSL: /* "--syslog" */ xopthlp[j] = "--syslog:<digit> [IKSD only]"; xarghlp[j] = "Syslog recording level, 0-6."; break;#endif /* CKSYSLOG */ case XA_USFI: /* "--userfile" */ xopthlp[j] = "--userfile:<filename> [IKSD only]"; xarghlp[j] = "Forbidden user file."; break;#ifdef CKWTMP case XA_WTFI: /* "--wtmpfile" */ xopthlp[j] = "--wtmpfile:<filename> [IKSD only]"; xarghlp[j] = "Name of wtmp logfile."; break; case XA_WTMP: /* "--wtmplog" */ xopthlp[j] = "--wtmplog:{on,off} [IKSD only]"; xarghlp[j] = "Whether to keep a wtmp logfile."; break;#endif /* CKWTMP */#ifdef CK_LOGIN case XA_TIMO: /* "--timeout" */ xopthlp[j] = "--timeout:<seconds> [IKSD only]"; xarghlp[j] = "How long to wait for login before closing the connection."; break;#endif /* CK_LOGIN */ case XA_NOIN: xopthlp[j] = "--nointerrupts"; xarghlp[j] = "Disable keyboard interrupts."; break;#ifdef IKSDB case XA_DBAS: xopthlp[j] = "--database:{on,off}"; xarghlp[j] = "Enable/Disable IKSD database (IKSD only)"; break; case XA_DBFI: xopthlp[j] = "--dbfile:<filename>"; xarghlp[j] = "Specify IKSD database file (IKSD only)"; break;#endif /* IKSDB */#ifdef CK_PERMS case XA_NPRM: xopthlp[j] = "--noperms"; xarghlp[j] = "Disable file-transfer Permissions attribute."; break;#endif /* CK_PERMS */#ifdef KUI case XA_CHGD: xopthlp[j] = "--changedim"; xarghlp[j] = "Change Dimension on Window Resize"; case XA_SCALE: xopthlp[j] = "--scalefont"; xarghlp[j] = "Scale Font on Window Resize"; case XA_WMAX: xopthlp[j] = "--maximize"; xarghlp[j] = "start K95G window maximized."; break; case XA_WMIN: xopthlp[j] = "--minimize"; xarghlp[j] = "start K95G window minimized."; break; case XA_XPOS: xopthlp[j] = "--xpos:n"; xarghlp[j] = "X-coordinate of window position (number)."; break; case XA_YPOS: xopthlp[j] = "--ypos:n"; xarghlp[j] = "Y-coordinate of window position (number)."; break; case XA_FNAM: xopthlp[j] = "--fontname:s (or --facename:s)"; xarghlp[j] = "Font/typeface name: string with _ replacing blank."; break; case XA_FSIZ: xopthlp[j] = "--fontsize:n"; xarghlp[j] = "Font point size (number)."; break; case XA_NOMN: xopthlp[j] = "--nomenubar"; xarghlp[j] = "No Menu Bar"; break; case XA_NOTB: xopthlp[j] = "--notoolbar"; xarghlp[j] = "No Tool Bar"; break; case XA_NOSB: xopthlp[j] = "--nostatusbar"; xarghlp[j] = "No Status Bar"; break; case XA_NOBAR: xopthlp[j] = "--nobars"; xarghlp[j] = "No Menu, Status, or Tool Bars"; break;#endif /* KUI */#ifndef NOPUSH case XA_NOPUSH: xopthlp[j] = "--nopush"; xarghlp[j] = "Disable external command execution."; break;#endif /* NOPUSH */#ifdef OS2 case XA_LOCK: xopthlp[j] = "--lockdown"; xarghlp[j] = "Enable all lockdown options."; break; case XA_NOSCROLL: xopthlp[j] = "--noscroll"; xarghlp[j] = "Disable scrollback operations."; break; case XA_NOESCAPE: xopthlp[j] = "--noescape"; xarghlp[j] = "Disable escape from connect mode."; break; case XA_ROWS: xopthlp[j] = "--height:n"; xarghlp[j] = "Screen height (number of rows)."; break; case XA_COLS: xopthlp[j] = "--width:n"; xarghlp[j] = "Screen width (number of columns)."; break; case XA_TITL: xopthlp[j] = "--title:string"; xarghlp[j] = "Window Title."; break;#endif /* OS2 */ case XA_CSET: xopthlp[j] = "--rcharset:name"; xarghlp[j] = "Name of remote terminal character set."; break; case XA_TERM: xopthlp[j] = "--termtype:name";#ifdef OS2 xarghlp[j] = "Choose terminal emulation.";#else xarghlp[j] = "Choose terminal type.";#endif /* OS2 */ break; case XA_USER: xopthlp[j] = "--user:name";#ifndef NETCONN xarghlp[j] = "Username (for network login)";#else xarghlp[j] = "Username.";#endif /* NETCONN */ break; } }}VOIDiniopthlp() { int i; for (i = 0; i < 128; i++) { optact[i] = 0; switch(i) {#ifdef OS2 case '#': /* K95 Startup Flags */ opthlp[i] = "Kermit 95 Startup Flags"; arghlp[i] = "\n"\ " 1 - turn off Win95 special fixes\n"\ " 2 - do not load optional network dlls\n"\ " 4 - do not load optional tapi dlls\n"\ " 8 - do not load optional kerberos dlls\n"\ " 16 - do not load optional zmodem dlls\n"\ " 32 - use stdin for input instead of the console\n"\ " 64 - use stdout for output instead of the console\n"\ " 128 - do not terminate process in response to Session Logoff"; break;#endif /* OS2 */ case '0': /* In the middle */ opthlp[i] = "100% transparent CONNECT mode for \"in-the-middle\" operation"; arghlp[i] = NULL; break; case '8': opthlp[i] = "Connection is 8-bit clean"; arghlp[i] = NULL; break;#ifdef NEWFTP case '9': opthlp[i] = "Make a connection to an FTP server"; arghlp[i] = "IP-address-or-hostname[:optional-TCP-port]"; break;#endif /* NEWFTP */#ifdef IKSD case 'A': opthlp[i] = "Kermit is to be started as an Internet service";#ifdef NT arghlp[i] = " socket handle of incoming connection";#else /* NT */ arghlp[i] = NULL;#endif /* NT */ break;#endif /* IKSD */ case 'B': opthlp[i] = "Kermit is running in Batch or Background (no controlling terminal)"; break;#ifndef NOSPL case 'C': opthlp[i] = "Interactive-mode Commands to be executed"; arghlp[i] = "Commands separated by commas, list in doublequotes"; break;#endif /* NOSPL */ case 'D': opthlp[i] = "Delay before starting to send"; arghlp[i] = "Number of seconds"; break; case 'E': opthlp[i] = "Exit automatically when connection closes"; arghlp[i] = NULL; break;#ifdef TCPSOCKET case 'F': opthlp[i] = "Make a TCP connection"; arghlp[i] = "Numeric file descriptor of open TCP connection"; break;#endif /* TCPSOCKET */ case 'G': opthlp[i] = "GET from server, send to standard output"; arghlp[i] = "Remote file specification"; optact[i] = 1; break; case 'H': opthlp[i] = "Suppress program startup Herald and greeting"; arghlp[i] = NULL; break; case 'I': opthlp[i] = "Connection is reliable, streaming is allowed"; arghlp[i] = NULL; break;#ifdef TCPSOCKET case 'J': opthlp[i] = "'Be like Telnet'"; arghlp[i] = "IP hostname/address optionally followed by service"; break;#endif /* TCPSOCKET */ case 'L': opthlp[i] = "Recursive directory descent for files in -s option"; arghlp[i] = NULL; break; case 'M': opthlp[i] = "My user name (for use with Telnet, Rlogin, etc)"; arghlp[i] = "Username string"; break;#ifdef NETBIOS case 'N': opthlp[i] = "NETBIOS adapter number"; arghlp[i] = "Number"; break;#endif /* NETBIOS */ case 'O': /* Be a server for One command only */ opthlp[i] = "Be a server for One command only"; arghlp[i] = NULL; optact[i] = 1; break; case 'P': opthlp[i] = "Don't convert file (Path) names"; arghlp[i] = NULL; break; case 'Q': opthlp[i] = "Quick (FAST) Kermit protocol settings"; arghlp[i] = NULL; break; case 'R': /* Remote-Only */ opthlp[i] = "Remote-only (makes IF REMOTE true)"; arghlp[i] = NULL; break; case 'S': /* "Stay" - enter interactive */ opthlp[i] = "Stay (enter command parser after action options)"; arghlp[i] = NULL; break; case 'T': /* Text file transfer mode */ opthlp[i] = "Transfer files in Text mode"; arghlp[i] = NULL; break;#ifdef ANYX25 case 'U': /* X.25 call user data */ opthlp[i] = "X.25 call User data"; arghlp[i] = "Call-user-data string"; break;#endif /* ANYX25 */ case 'V': /* No automatic filetype switching */ opthlp[i] = "Disable automatic per-file text/binary switching"; arghlp[i] = NULL; break;#ifdef COMMENT#ifdef OS2 case 'W': /* Win32 Window Handle */ opthlp[i] = ""; arghlp[i] = NULL; break;#endif /* OS2 */#endif /* COMMENT */#ifd
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -