📄 ckuus3.c
字号:
#ifdef NT "ntlm", AUTH_NTLM, 0,#endif /* NT */#ifdef CK_SRP "srp", AUTH_SRP, 0,#endif /* CK_SRP */#ifdef CK_SSL "ssl", AUTH_SSL, 0,#endif /* CK_SSL */ "", 0, 0};int nautyp = sizeof(autyptab)/sizeof(struct keytab) - 1;struct keytab auhowtab[] = { /* TELNET AUTHENTICATION HOW table */ "any", TN_AUTH_HOW_ANY, 0, "mutual", TN_AUTH_HOW_MUTUAL, 0, "one-way", TN_AUTH_HOW_ONE_WAY, 0, "", 0, 0};int nauhow = sizeof(auhowtab)/sizeof(struct keytab) - 1;struct keytab auenctab[] = { /* TELNET AUTHENTICATION ENCRYPT table */ "any", TN_AUTH_ENC_ANY, 0, "none", TN_AUTH_ENC_NONE, 0, "telopt", TN_AUTH_ENC_TELOPT, 0, "", 0, 0};int nauenc = sizeof(auenctab)/sizeof(struct keytab) - 1;#endif /* CK_AUTHENTICATION */#define TN_NL_BIN 3#define TN_NL_NVT 4static struct keytab tn_nlmtab[] = { /* TELNET NEWLINE-MODE table */ "binary-mode", TN_NL_BIN, 0, /* Binary mode */ "nvt", TN_NL_NVT, 0, /* NVT mode */ "off", TNL_CRNUL, CM_INV, /* CR-NUL (TELNET spec) */ "on", TNL_CRLF, CM_INV, /* CR-LF (TELNET spec) */ "raw", TNL_CR, CM_INV /* CR only (out of spec) */};static int ntn_nlm = (sizeof(tn_nlmtab) / sizeof(struct keytab));static struct keytab tnlmtab[] = { /* TELNET NEWLINE-MODE table */ "cr", TNL_CR, CM_INV, /* CR only (out of spec) */ "cr-lf", TNL_CRLF, CM_INV, /* CR-LF (TELNET spec) */ "cr-nul", TNL_CRNUL, CM_INV, /* CR-NUL (TELNET spec) */ "lf", TNL_LF, CM_INV, /* LF instead of CR-LF */ "off", TNL_CRNUL, 0, /* CR-NUL (TELNET spec) */ "on", TNL_CRLF, 0, /* CR-LF (TELNET spec) */ "raw", TNL_CR, 0 /* CR only (out of spec) */};static int ntnlm = (sizeof(tnlmtab) / sizeof(struct keytab));struct keytab tntab[] = {#ifdef CK_AUTHENTICATION "authentication", CK_TN_AU, 0,#endif /* CK_AUTHENTICATION */ "b", CK_TN_BM, CM_INV|CM_ABR, "bi", CK_TN_BM, CM_INV|CM_ABR, "bin", CK_TN_BM, CM_INV|CM_ABR, "bina", CK_TN_BM, CM_INV|CM_ABR, "binar", CK_TN_BM, CM_INV|CM_ABR, "binary", CK_TN_BM, CM_INV|CM_ABR, "binary-", CK_TN_BM, CM_INV|CM_ABR, "binary-mode", CK_TN_BM, CM_INV, "binary-transfer-mode", CK_TN_XF, 0, "binary-xfer-mode", CK_TN_XF, CM_INV, "bug", CK_TN_BUG, 0, "debug", CK_TN_DB, 0, "echo", CK_TN_EC, 0,#ifdef CK_ENCRYPTION "encryption", CK_TN_ENC, 0,#endif /* CK_ENCRYPTION */#ifdef CK_ENVIRONMENT "environment", CK_TN_ENV, 0,#endif /* CK_ENVIRONMENT */#ifdef IKS_OPTION "kermit", CK_TN_IKS, CM_INV,#endif /* IKS_OPTION */#ifdef CK_SNDLOC "location", CK_TN_LOC, 0,#endif /* CK_SNDLOC */#ifdef CK_NAWS "naws", CK_TN_NAWS, CM_INV,#endif /* CK_NAWS */ "newline-mode", CK_TN_NL, 0, "no-encrypt-during-xfer", CK_TN_NE, CM_INV, "prompt-for-userid",CK_TN_PUID,0, "remote-echo", CK_TN_RE, 0,#ifdef CK_SSL "start-tls", CK_TN_TLS, CM_INV,#endif /* CK_SSL */ "terminal-type", CK_TN_TT, 0, "wait-for-negotiations", CK_TN_WAIT, 0,#ifdef CK_ENVIRONMENT "xdisplay-location",CK_TN_XD, CM_INV,#endif /* CK_ENVIRONMENT */ "", 0, 0};int ntn = (sizeof(tntab) / sizeof(struct keytab)) - 1;struct keytab tnopttab[] = {#ifdef CK_AUTHENTICATION "authentication", CK_TN_AU, 0,#else "authentication", CK_TN_AU, CM_INV,#endif /* CK_AUTHENTICATION */ "binary-mode", CK_TN_BM, 0, "com-port-control",CK_TN_CPC, CM_INV, "echo", CK_TN_EC, 0,#ifdef CK_ENCRYPTION "encryption", CK_TN_ENC, 0,#else "encryption", CK_TN_ENC, CM_INV,#endif /* CK_ENCRYPTION */#ifdef CK_FORWARD_X "forward_x", CK_TN_FX, 0,#else /* CK_FORWARD_X */ "forward_x", CK_TN_FX, CM_INV,#endif /* CK_FORWARD_X */ "ibm-sak", CK_TN_SAK, CM_INV,#ifdef IKS_OPTION "kermit", CK_TN_IKS, 0,#else "kermit", CK_TN_IKS, CM_INV,#endif /* IKS_OPTION */ "lflow", CK_TN_FLW, CM_INV,#ifdef CK_NAWS "naws", CK_TN_NAWS, 0,#else "naws", CK_TN_NAWS, CM_INV,#endif /* CK_NAWS */#ifdef CK_ENVIRONMENT "new-environment", CK_TN_ENV, 0,#else "new-environment", CK_TN_ENV, CM_INV,#endif /* CK_ENVIRONMENT */ "pragma-heartbeat",CK_TN_PHR, CM_INV, "pragma-logon", CK_TN_PLG, CM_INV, "pragma-sspi", CK_TN_PSP, CM_INV, "sak", CK_TN_SAK, CM_INV,#ifdef CK_SNDLOC "send-location", CK_TN_LOC, 0,#else "send-location", CK_TN_LOC, CM_INV,#endif /* CK_SNDLOC */ "sga", CK_TN_SGA, CM_INV|CM_ABR,#ifdef CK_SSL "start-tls", CK_TN_TLS, 0,#else "start-tls", CK_TN_TLS, CM_INV,#endif /* CK_SSL */ "suppress-go-aheads", CK_TN_SGA, 0, "terminal-type", CK_TN_TT, 0, "ttype", CK_TN_TT, CM_INV|CM_ABR,#ifdef CK_ENVIRONMENT "xdisplay-location", CK_TN_XD, 0,#else "xdisplay-location", CK_TN_XD, CM_INV,#endif /* CK_ENVIRONMENT */ "", 0, 0};int ntnopt = (sizeof(tnopttab) / sizeof(struct keytab)) - 1;struct keytab tnoptsw[] = { "/client", CK_TN_CLIENT, 0, "/server", CK_TN_SERVER, 0};int ntnoptsw = (sizeof(tnoptsw) / sizeof(struct keytab));#endif /* TNCODE */struct keytab ftrtab[] = { /* Feature table */#ifndef NOCSETS /* 0 = we have it, 1 = we don't */"character-sets", 0, 0,#else"character-sets", 1, 0,#endif /* NOCSETS */#ifndef NOCYRIL"cyrillic", 0, 0,#else"cyrillic", 1, 0,#endif /* NOCYRIL */#ifndef NOLOGDIAL"cx-log", 0, 0,#else"cx-log", 1, 0,#endif /* NOLOGDIAL */#ifndef NODEBUG"debug", 0, 0,#else"debug", 1, 0,#endif /* NODEBUG */#ifndef NODIAL"dial", 0, 0,#else"dial", 1, 0,#endif /* NODIAL */#ifdef DYNAMIC"dynamic-memory", 0, 0,#else"dynamic-memory", 1, 0,#endif /* DYNAMIC */#ifndef NOXFER"file-transfer", 0, 0,#else"file-transfer", 1, 0,#endif /* NOXFER */#ifdef XXFWD"forward", 0, 0,#else"forward", 1, 0,#endif /* XXFWD */#ifdef CK_CURSES"fullscreen-display", 0, 0,#else"fullscreen-display", 1, 0,#endif /* CK_CURSES */#ifdef GREEK"greek", 0, 0,#else"greek", 1, 0,#endif /* GREEK */#ifdef HEBREW"hebrew", 0, 0,#else"hebrew", 1, 0,#endif /* HEBREW */#ifndef NOHELP"help", 0, 0,#else"help", 1, 0,#endif /* NOHELP */#ifndef NOIKSD"iksd", 0, 0,#else"iksd", 1, 0,#endif /* NOIKSD */#ifndef NOSPL"if-command", 0, 0,#else"if-command", 1, 0,#endif /* NOSPL */#ifndef NOJC#ifdef UNIX"job-control", 0, 0,#else"job-control", 1, 0,#endif /* UNIX */#else"job-control", 1, 0,#endif /* NOJC */#ifdef KANJI"kanji", 0, 0,#else"kanji", 1, 0,#endif /* KANJI */#ifndef NOXFER"kermit", 0, 0,#else"kermit", 1, 0,#endif /* NOXFER */#ifdef CK_KERBEROS"kerberos", 0, 0,#else"kerberos", 1, 0,#endif /* CK_KERBEROS */#ifndef NOCSETS"latin1", 0, 0,#else"latin1", 1, 0,#endif /* NOCSETS */#ifdef LATIN2"latin2", 0, 0,#else"latin2", 1, 0,#endif /* LATIN2 */#ifndef NOLOCAL"making-connections", 0, 0,#else"making-connections", 1, 0,#endif /* NOLOCAL */#ifdef NETCONN"network", 0, 0,#else"network", 1, 0,#endif /* NETCONN */#ifdef NT#ifdef CK_AUTHENTICATION"ntlm", 1, 0,#else /* CK_AUTHENTICATION */"ntlm", 0, 0,#endif /* CK_AUTHENTICATION */#else /* NT */"ntlm", 0, 0,#endif /* NT */#ifdef PIPESEND"pipes", 0, 0,#else#ifdef NETCMD"pipes", 0, 0,#endif /* NETCMD */#endif /* PIPESEND */#ifndef PIPESEND#ifndef NETCMD"pipes", 1, 0,#endif /* PIPESEND */#endif /* NETCMD */#ifdef NETPTY"pty", 0, 0,#else"pty", 1, 0,#endif /* NETPTY */#ifndef NOPUSH"push", 0, 0,#else"push", 1, 0,#endif /* PUSH */#ifdef CK_REDIR"redirect", 0, 0,#else"redirect", 1, 0,#endif /* CK_REDIR */#ifdef CK_RTSCTS"rts/cts", 0, 0,#else"rts/cts", 1, 0,#endif /* RTS/CTS */#ifndef NOSCRIPT"script-command", 0, 0,#else"script-command", 1, 0,#endif /* NOSCRIPT */#ifndef NOSERVER"server-mode", 0, 0,#else"server-mode", 1, 0,#endif /* NOSERVER */#ifndef NOSHOW"show-command", 0, 0,#else"show-command", 1, 0,#endif /* NOSHOW */#ifdef CK_SRP"srp", 0, 0,#else"srp", 1, 0,#endif /* CK_SRP */#ifdef CK_SSL"ssl/tls", 0, 0,#else"ssl/tls", 1, 0,#endif /* CK_SSL */#ifndef NOXMIT"transmit", 0, 0,#else"transmit", 1, 0,#endif /* NOXMIT */#ifdef UNICODE"unicode", 0, 0,#else"unicode", 1, 0,#endif /* UNICODE */#ifdef CK_XYZ"xyzmodem", 0, 0,#else"xyzmodem", 1, 0,#endif /* NOXMIT */"", 0, 0};int nftr = (sizeof(ftrtab) / sizeof(struct keytab)) - 1;struct keytab desttab[] = { /* SET DESTINATION */#ifdef CALIBRATE "calibrate", DEST_N, CM_INV,#endif /* CALIBRATE */ "disk", DEST_D, 0,#ifdef CALIBRATE "nowhere", DEST_N, 0,#endif /* CALIBRATE */ "printer", DEST_P, 0, "screen", DEST_S, 0};int ndests = (sizeof(desttab) / sizeof(struct keytab));#ifndef NOSPL /* Used only with script programming items... */#ifndef NOSERVER /* This is just to avoid some */#define CK_PARSDIR /* "statement not reached" */#else /* complaints... */#ifndef NODIAL#define CK_PARSDIR#endif /* NODIAL */#endif /* NOSERVER *//* cx == 0 means dial directory cx == 1 means network directory cx == 2 means a directory path list*/static intparsdir(cx) int cx; { int i, x, y, dd; /* Workers */ int nxdir; char *s; char ** xdir; char *pp[MAXGETPATH]; /* Temporary name pointers */#ifdef ZFNQFP struct zfnfp * fnp;#ifdef OS2 char * env; char dirpath[4096];#else /* OS2 */ char dirpath[1024]; /* For fully qualified filenames */#endif /* OS2 */#endif /* ZFNQFP */ int max = 0; /* Maximum number of things to parse */ char c;#ifndef NODIAL if (cx == 0) { /* Dialing */ nxdir = ndialdir; xdir = dialdir; max = MAXDDIR; } else#ifdef NETCONN if (cx == 1) { /* Network */ nxdir = nnetdir; xdir = netdir; max = MAXDDIR; } else#endif /* NETCONN */#endif /* NODIAL */#ifndef NOSERVER if (cx == 2) { /* GET path */ nxdir = ngetpath; xdir = getpath; max = MAXGETPATH; } else /* Called with invalid function code */#endif /* NOSERVER */ return(-2);#ifdef CK_PARSDIR dd = 0; /* Temporary name counter */ while (1) { if (cx != 2) { /* Dialing or Network Directory */#ifdef OS2 int len;#ifdef NT env = getenv("K95PHONES");#else /* NT */ env = getenv("K2PHONES");#endif /* NT */ if (!env) env = getenv("K95PHONES"); if (!env) env = ""; dirpath[0] = '\0'; len = strlen(env) + 2*strlen(startupdir) + 2*strlen(inidir)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -