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

📄 ckuusr.c

📁 C-Kermit源码。是使用串口/Modem和网络通讯的程序
💻 C
📖 第 1 页 / 共 5 页
字号:
};int nnetkey = (sizeof(netkey) / sizeof(struct keytab));struct keytab netcmd[] = {/*  These are the network types.*/#ifdef NETCMD    "command",       NET_CMD,  CM_INV,	/* Command */#endif /* NETCMD */#ifdef DECNET				/* DECnet / PATHWORKS */    "decnet",        NET_DEC,  0,#endif /* DECNET */#ifdef NETDLL    "dll",           NET_DLL,  CM_INV,  /* DLL to be loaded */#endif /* NETDLL */#ifdef NETFILE    "file",           NET_FILE, CM_INV,  /* FILE (real crude) */#endif /* NETFILE */#ifdef NPIPE				/* Named Pipes */    "named-pipe",     NET_PIPE,  0,#endif /* NPIPE */#ifdef CK_NETBIOS    "netbios",        NET_BIOS,  0,	/* NETBIOS */#endif /* CK_NETBIOS */#ifdef DECNET				/* DECnet / PATHWORKS (alias) */    "pathworks",     NET_DEC,  CM_INV,#endif /* DECNET */#ifdef NETCMD    "pipe",          NET_CMD,  0,	/* Pipe */#endif /* NETCMD */#ifdef NETPTY    "pseudoterminal", NET_PTY, 0,	/* Pseudoterminal */#endif /* NETPTY */#ifdef NETPTY    "pty",           NET_PTY,  CM_INV,	/* Invisible synonym for pseudoterm */#endif /* NETPTY */#ifdef SSH    "ssh",           NET_SSH,  CM_INV,  /* SSH */#endif /* SSH */#ifdef SUPERLAT   "superlat",        NET_SLAT,  0,	/* Meridian Technologies' SuperLAT */#endif /* SUPERLAT */#ifdef TCPSOCKET			/* TCP/IP sockets library */    "tcp/ip",       NET_TCPB,    0,#endif /* TCPSOCKET */#ifdef SUPERLAT    "tes32",        NET_SLAT,   0,	/* Emulux TES32 */#endif /* SUPERLAT */#ifdef ANYX25				/* X.25 */#ifdef SUNX25    "x",            NET_SX25, CM_INV|CM_ABR,    "x.25",         NET_SX25, 0,    "x25",          NET_SX25, CM_INV,#else#ifdef STRATUSX25    "x",            NET_VX25, CM_INV|CM_ABR,    "x.25",         NET_VX25, 0,    "x25",          NET_VX25, CM_INV,#endif /* STRATUSX25 */#endif /* SUNX25 */#ifdef IBMX25    "x",            NET_IX25, CM_INV|CM_ABR,    "x.25",         NET_IX25, CM_INV,    "x25",          NET_IX25, CM_INV,#endif /* IBMX25 */#ifdef HPX25    "x",            NET_IX25, CM_INV|CM_ABR,    "x.25",         NET_IX25, 0,    "x25",          NET_IX25, CM_INV,#endif /* HPX25 */#endif /* ANYX25 */    "", 0, 0};int nnets = (sizeof(netcmd) / sizeof(struct keytab));#ifndef NOTCPOPTS#ifdef TCPSOCKET/* TCP options */struct keytab tcpopt[] = {   "address",   XYTCP_ADDRESS, 0,#ifdef CK_DNS_SRV   "dns-service-records", XYTCP_DNS_SRV, 0,#endif /* CK_DNS_SRV */#ifdef SO_DONTROUTE    "dontroute",   XYTCP_DONTROUTE, 0,#endif /* SO_DONTROUTE */#ifdef SO_KEEPALIVE   "keepalive", XYTCP_KEEPALIVE, 0,#endif /* SO_KEEPALIVE */#ifdef SO_LINGER   "linger", XYTCP_LINGER, 0,#endif  /* SO_LINGER */#ifdef TCP_NODELAY   "nagle",  XYTCP_NAGLE,    CM_INV,   "nodelay", XYTCP_NODELAY, 0,#endif /* TCP_NODELAY */   "reverse-dns-lookup", XYTCP_RDNS, 0,#ifdef SO_RCVBUF   "recvbuf", XYTCP_RECVBUF, 0,#endif /* SO_RCVBUF */#ifdef SO_SNDBUF   "sendbuf", XYTCP_SENDBUF, 0,#endif /* SO_SNDBUF */#ifdef VMS#ifdef DEC_TCPIP   "ucx-port-bug", XYTCP_UCX, 0,#endif /* DEC_TCPIP */#endif /* VMS */   "",0,0};int ntcpopt = (sizeof(tcpopt) / sizeof(struct keytab));#endif /* TCPSOCKET */#endif /* NOTCPOPTS */#endif /* NETCONN */#ifdef OS2/* K95 Manual Chapter Table -- Keep these two tables in sync! */static char * linktbl[] = {		/* Internal links in k95.htm */    "#top",				/* 00 */    "#what",				/* 01 */    "#install",				/* 02 */    "#start",				/* 03 */    "#dialer",				/* 04 */    "#entries",				/* 05 */    "#command",				/* 06 */    "#terminal",			/* 07 */    "#transfer",			/* 08 */    "#hostmode"				/* 09 */};static struct keytab chaptbl[] = {    "Command-Screen",     6, 0,    "Contents",           0, 0,    "Dialer-Entries",     5, 0,    "File-Transfer",      8, 0,    "Getting-Started",    3, 0,    "Host-Mode",          9, 0,    "Installation",       2, 0,    "Terminal-Emulation", 7, 0,    "Using-The-Dialer",   4, 0,    "What-Is-K95",        1, 0,    "",                   0, 0,};static int nchaptbl = (sizeof(chaptbl) / sizeof(struct keytab));#endif /* OS2 */#ifndef NOXFER/* Remote Command Table */struct keytab remcmd[] = {#ifndef NOSPL    "as",	 XZASG, CM_INV|CM_ABR,	/*  */    "asg",	 XZASG, CM_INV,    "assign",	 XZASG, 0,#endif /* NOSPL */    "cd",        XZCWD, 0,    "copy",      XZCPY, 0,    "cwd",       XZCWD, CM_INV,    "delete",    XZDEL, 0,    "directory", XZDIR, 0,    "exit",      XZXIT, 0,    "help",      XZHLP, 0,#ifndef NOPUSH    "host",      XZHOS, 0,#endif /* NOPUSH */#ifndef NOFRILLS    "kermit",    XZKER, 0,    "l",         XZLGI, CM_ABR|CM_INV,    "lo",        XZLGI, CM_ABR|CM_INV,    "log",       XZLGI, CM_ABR|CM_INV,    "login",     XZLGI, 0,    "logout",    XZLGO, 0,    "mkdir",     XZMKD, 0,    "print",     XZPRI, 0,#endif /* NOFRILLS */    "pwd",       XZPWD, 0,#ifndef NOSPL    "query",	 XZQUE, 0,#endif /* NOSPL */    "rename",    XZREN, 0,    "rmdir",     XZRMD, 0,    "set",       XZSET, 0,    "space",	 XZSPA, 0#ifndef NOFRILLS,   "type", 	 XZTYP, 0,    "who",  	 XZWHO, 0#endif /* NOFRILLS */};int nrmt = (sizeof(remcmd) / sizeof(struct keytab));#endif /* NOXFER */struct keytab logtab[] = {#ifdef CKLOGDIAL    "connections",  LOGM, CM_INV,    "cx",           LOGM, 0,#endif /* CKLOGDIAL */#ifdef DEBUG    "debugging",    LOGD, 0,#endif /* DEBUG */    "packets",	    LOGP, 0,#ifndef NOLOCAL    "session",      LOGS, 0,#endif /* NOLOCAL */#ifdef TLOG    "transactions", LOGT, 0,#endif /* TLOG */    "", 0, 0};int nlog = (sizeof(logtab) / sizeof(struct keytab)) - 1;struct keytab writab[] = {#ifndef NOSPL    "append-file",     LOGW, CM_INV,#endif /* NOSPL */    "debug-log",       LOGD, 0,    "error",           LOGE, 0,#ifndef NOSPL    "file",            LOGW, 0,#endif /* NOSPL */    "packet-log",      LOGP, 0,    "screen",          LOGX, 0,#ifndef NOLOCAL    "session-log",     LOGS, 0,#endif /* NOLOCAL */    "sys$output",      LOGX, CM_INV,    "t",               LOGT, CM_ABR|CM_INV, /* Because of a typo in */    "tr",              LOGT, CM_ABR|CM_INV, /* the book... */    "tra",             LOGT, CM_ABR|CM_INV,    "tran",            LOGT, CM_ABR|CM_INV,    "trans",           LOGT, CM_ABR|CM_INV,    "transa",          LOGT, CM_ABR|CM_INV,    "transac",         LOGT, CM_ABR|CM_INV,    "transact",        LOGT, CM_ABR|CM_INV,    "transacti",       LOGT, CM_ABR|CM_INV,    "transactio",      LOGT, CM_ABR|CM_INV,    "transaction",     LOGT, CM_ABR|CM_INV,    "transaction-log", LOGT, 0,    "transactions",    LOGT, CM_INV};int nwri = (sizeof(writab) / sizeof(struct keytab));#ifdef COMMENT				/* INPUT switches not used yet... */static struct keytab inswtab[] = {#ifdef COMMENT    "/assign",       IN_ASG, CM_ARG,#endif /* COMMENT */    "/autodownload", IN_ADL, CM_ARG,    "/case",         IN_CAS, CM_ARG,    "/echo",         IN_ECH, CM_ARG,    "/interrupts",   IN_NOI, CM_ARG,    "/silence",      IN_SIL, CM_ARG,#ifdef COMMENT    "/pattern",      IN_PAT, CM_ARG,#endif /* COMMENT */    "", 0, 0};static int ninswtab = (sizeof(inswtab) / sizeof(struct keytab)) - 1;#endif /* COMMENT */static struct keytab clrtab[] = {	/* Keywords for CLEAR command */#ifndef NOSPL    "alarm",            CLR_ALR,         0,#ifdef CK_APC    "apc",              CLR_APC,         0,#endif /* CK_APC */#ifdef PATTERNS    "binary-patterns",  CLR_BIN,         0,#endif /* PATTERNS */    "both",             CLR_DEV|CLR_INP, CM_INV,#endif /* NOSPL */#ifdef OS2    "command-screen",   CLR_CMD,         0,#endif /* OS2 */#ifndef NOSPL    "device",           CLR_DEV,         CM_INV|CM_ABR,    "device-and-input", CLR_DEV|CLR_INP, 0,#endif /* NOSPL */    "device-buffer",    CLR_DEV,         0,#ifndef NODIAL    "dial-status",      CLR_DIA,	 0,#endif /* NODIAL */#ifndef NOSPL    "input-buffer",     CLR_INP,         0,#endif /* NOSPL */    "send-list",        CLR_SFL,         0,#ifdef OS2    "scr",              CLR_SCL,         CM_INV|CM_ABR,#endif /* OS2 */    "screen",           CLR_SCR,         0,#ifdef OS2    "scrollback",       CLR_SCL,         CM_INV,    "terminal-screen",  CLR_TRM,         0,#endif /* OS2 */#ifdef PATTERNS    "text-patterns",    CLR_TXT,         0,#endif /* PATTERNS */    "", 0, 0};int nclear = (sizeof(clrtab) / sizeof(struct keytab)) - 1;struct keytab clstab[] = {		/* Keywords for CLOSE command */#ifndef NOSPL    "!read",           LOGR, CM_INV,    "!write",          LOGW, CM_INV,#ifndef NOPUSH#endif /* NOPUSH */#endif /* NOSPL */#ifndef NOSPL    "append-file",     LOGW, CM_INV,#endif /* NOSPL */#ifndef NOLOCAL    "connection",      9999, 0,#endif /* NOLOCAL */#ifdef CKLOGDIAL    "cx-log",          LOGM, 0,#endif /* CKLOGDIAL */#ifdef DEBUG    "debug-log",       LOGD, 0,#endif /* DEBUG */    "host",            9999, CM_INV,	/* Synonym for CLOSE CONNECTION */    "line",            9999, CM_INV,	/* Synonym for CLOSE CONNECTION */    "packet-log",      LOGP, 0,    "port",            9999, CM_INV,	/* Synonym for CLOSE CONNECTION */#ifndef NOSPL    "read-file",       LOGR, 0,#endif /* NOSPL */#ifndef NOLOCAL    "session-log",     LOGS, 0,#endif /* NOLOCAL */#ifdef TLOG    "t",               LOGT, CM_ABR|CM_INV, /* Because of a typo in */    "tr",              LOGT, CM_ABR|CM_INV, /* the book... */    "tra",             LOGT, CM_ABR|CM_INV,    "tran",            LOGT, CM_ABR|CM_INV,    "trans",           LOGT, CM_ABR|CM_INV,    "transa",          LOGT, CM_ABR|CM_INV,    "transac",         LOGT, CM_ABR|CM_INV,    "transact",        LOGT, CM_ABR|CM_INV,    "transacti",       LOGT, CM_ABR|CM_INV,    "transactio",      LOGT, CM_ABR|CM_INV,    "transaction",     LOGT, CM_ABR|CM_INV,    "transaction-log", LOGT, 0,    "transactions",    LOGT, CM_INV,#endif /* TLOG */#ifndef NOSPL    "write-file",      LOGW, 0,#endif /* NOSPL */    "", 0, 0};int ncls = (sizeof(clstab) / sizeof(struct keytab)) - 1;/* SHOW command arguments */#ifndef NOSHOWstruct keytab shotab[] = {#ifndef NOSPL    "alarm", SHALRM, 0,    "arg",  SHARG, CM_INV|CM_ABR,    "arguments", SHARG, 0,    "args", SHARG, CM_INV,    "arrays", SHARR, 0,#endif /* NOSPL */#ifndef NOCSETS    "associations", SHASSOC, 0,#endif /* NOCSETS */#ifndef NOXFER    "attributes", SHATT, 0,#endif /* NOXFER */#ifdef CK_AUTHENTICATION    "authentication", SHOAUTH, CM_INV,#endif /* CK_AUTHENTICATION */#ifndef NOPUSH#ifdef BROWSER    "browser", SHBROWSE, 0,#endif /*  BROWSER */#endif /* NOPUSH */    "cd", SHCD, 0,    "character-sets", SHCSE, 0,    "cmd",  SHCMD, CM_INV,#ifndef NOLOCAL    "com",  SHCOM, CM_INV|CM_ABR,    "comm", SHCOM, CM_INV|CM_ABR,    "communications", SHCOM, 0,#endif /* NOLOCAL */    "command", SHCMD, 0,#ifdef CK_SPEED    "control-prefixing", SHCTL, 0,#endif /* CK_SPEED */#ifdef CKLOGDIAL    "connection", SHCONNX, 0,    "cx", SHCONNX, CM_INV,#endif /* CKLOGDIAL */#ifndef NOSPL    "count", SHCOU, 0,#endif /* NOSPL */    "d",       SHDIA, CM_INV|CM_ABR,#ifdef VMS    "default", SHDFLT, 0,#else    "default", SHDFLT, CM_INV,#endif /* VMS */#ifndef NODIAL    "dial", SHDIA, 0,#endif /* NODIAL */    "double/ignore", SHDBL, 0,#ifndef NOPUSH#ifndef NOFRILLS    "editor",        SHEDIT, 0,#endif /*  NOFRILLS */#endif /* NOPUSH */#ifndef NOLOCAL    "escape", SHESC, 0,#endif /* NOLOCAL */    "exit", SHEXI, 0,    "extended-options", SHXOPT, CM_INV,    "features", SHFEA, 0,    "file", SHFIL, 0,#ifndef NOLOCAL    "flow-control", SHOFLO, 0,#endif /* NOLOCAL */#ifdef BROWSER    "ftp", SHOFTP, 0,#endif /* BROWSER */#ifndef NOSPL    "functions", SHFUN, 0,    "globals", SHVAR, 0,#endif /* NOSPL */    "ignore/double", SHDBL, CM_INV,#ifndef NOSPL    "input", SHINP, 0,#endif /* NOSPL */#ifndef NOSETKEY    "k",   SHKEY, CM_INV|CM_ABR,    "key", SHKEY, 0,#ifndef NOKVERBS    "kverbs", SHKVB, 0,#endif /* NOKVERBS */#endif /* NOSETKEY */#ifdef CK_LABELED    "labeled-file-info", SHLBL, 0,#endif /* CK_LABELED */#ifndef NOCSETS    "languages", SHLNG, 0,#endif /* NOCSETS */    "logs", SHLOG, 0,#ifndef NOSPL    "macros", SHMAC, 0,#endif /* NOSPL */#ifndef NODIAL    "modem", SHMOD, 0,#else    "modem-signals", SHCOM, CM_INV,#endif /* NODIAL */#ifndef NOLOCAL#ifdef OS2MOUSE    "mouse", SHMOU, 0,#endif /* OS2MOUSE */#endif /* NOLOCAL */#ifdef NETCONN    "network", SHNET, 0,#else    "network", SHNET, CM_INV,#endif /* NETCONN */    "options", SHOPTS, 0,#ifndef NOSPL    "output", SHOUTP, CM_INV,#endif /* NOSPL */#ifdef ANYX25#ifndef IBMX25    "pad", SHPAD, 0,#endif

⌨️ 快捷键说明

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