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

📄 ckuus3.c

📁 linux终端仿真程序
💻 C
📖 第 1 页 / 共 5 页
字号:
_PROTOTYP(static int dialstr,(char **, char *));extern int dialhng, dialtmo, dialksp, dialdpy, dialmhu, dialec, dialdc;extern int dialrtr, dialint, dialudt, dialsrt, dialrstr, mdmwaitd;extern int mdmspd, dialfc, dialmth, dialesc;int dialcvt = 2;			/* DIAL CONVERT-DIRECTORY */int dialcnf = 0;			/* DIAL CONFIRMATION */int dialcon = 2;			/* DIAL CONNECT */int dialcq  = 0;			/* DIAL CONNECT AUTO quiet/verbose */extern long dialmax, dialcapas;int usermdm = 0;extern int ndialdir;extern char *dialini,   *dialmstr, *dialmprmt, *dialdir[], *dialcmd,  *dialnpr, *dialdcon, *dialdcoff, *dialecon, *dialecoff, *dialhcmd, *dialhwfc, *dialswfc,  *dialnofc, *dialtone,  *dialpulse, *dialname, *diallac;extern char *diallcc,   *dialixp,  *dialixs,   *dialldp,   *diallds,  *dialtfp, *dialpxx,  *dialpxi,   *dialpxo,  *dialsfx,   *dialaaon,  *dialaaoff;#define MAXTOLLFREE 8int ntollfree = 0;char *dialtfc[MAXTOLLFREE] = {    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};static struct keytab drstrtab[] = {    "international", 5, 0,    "local",         2, 0,    "long-distance", 4, 0,    "none",          6, 0};static struct keytab dcnvtab[] = {    "ask",  2, 0,    "off",  0, 0,    "on",   1, 0};struct keytab setmdm[] = {    "capabilities",	XYDCAP,  0,    "carrier-watch",	XYDMCD,  0,    "command",		XYDSTR,  0,    "compression",	XYDDC,   0,    "dial-command",     XYDDIA,  0,    "error-correction",	XYDEC,   0,    "escape-character",	XYDESC,  0,    "flow-control",	XYDFC,   0,    "hangup-method",	XYDMHU,  0,    "kermit-spoof",	XYDKSP,  0,    "maximum-speed",	XYDMAX,  0,    "name",		XYDNAM,  0,    "speed-matching",	XYDSPD,  0,    "type",		XYDTYP,  0};int nsetmdm = (sizeof(setmdm) / sizeof(struct keytab));struct keytab mdmcap[] = {    "at-commands",	CKD_AT,  0,    "compression",      CKD_DC,  0,    "dc",               CKD_DC,  CM_INV,    "ec",               CKD_EC,  CM_INV,    "error-correction", CKD_EC,  0,    "hardware-flow",    CKD_HW,  0,    "hwfc",             CKD_HW,  CM_INV,    "itu",              CKD_V25, CM_INV,    "kermit-spoof",	CKD_KS,  0,    "ks",               CKD_KS,  CM_INV,    "sb",               CKD_SB,  CM_INV,    "software-flow",    CKD_SW,  0,    "speed-buffering",  CKD_SB,  0,    "swfc",             CKD_SW,  CM_INV,    "tb",               CKD_TB,  CM_INV,    "telebit",          CKD_TB,  0,    "v25bis-commands",	CKD_V25, 0};int nmdmcap = (sizeof(mdmcap) / sizeof(struct keytab));struct keytab dialtab[] = {		/* SET DIAL table */    "area-code",        XYDLAC, 0,	/* Also still includes items     */    "compression",	XYDDC,  CM_INV,	/* that were moved to SET MODEM, */    "confirmation",	XYDCNF, 0,	/* but they are CM_INVisible...  */    "connect",          XYDCON, 0,    "convert-directory",XYDCVT, 0,    "country-code",     XYDLCC, 0,    "dial-command",	XYDDIA, CM_INV,    "directory",	XYDDIR, 0,    "display",		XYDDPY, 0,    "escape-character", XYDESC, CM_INV,    "error-correction",	XYDEC,  CM_INV,    "flow-control",	XYDFC,  CM_INV,    "hangup",		XYDHUP, 0,    "interval",		XYDINT, 0,    "in",		XYDINI, CM_INV|CM_ABR,    "init-string",	XYDINI, CM_INV,    "intl-prefix",	XYDIXP, 0,    "intl-suffix",	XYDIXS, 0,    "kermit-spoof",	XYDKSP, CM_INV,    "local-area-code",  XYDLAC, CM_INV,    "ld-prefix",	XYDLDP, 0,    "ld-suffix",	XYDLDS, 0,    "m",                XYDMTH, CM_INV|CM_ABR,#ifdef MDMHUP    "me",               XYDMTH, CM_INV|CM_ABR,#endif /* MDMHUP */    "method",		XYDMTH, 0,    "mnp-enable",	XYDMNP, CM_INV,	/* obsolete but still accepted */#ifdef MDMHUP    "modem-hangup",	XYDMHU, CM_INV,#endif /* MDMHUP */    "pbx-exchange",     XYDPXX, 0,    "pbx-inside-prefix",XYDPXI, 0,    "pbx-outside-prefix",XYDPXO, 0,    "prefix",		XYDNPR,  0,    "restrict",         XYDRSTR, 0,    "retries",		XYDRTM,  0,    "sort",             XYDSRT,  0,    "speed-matching",	XYDSPD, CM_INV,    "string",		XYDSTR, CM_INV,    "suffix",		XYDSFX, 0,    "timeout",		XYDTMO, 0,    "tf-area-code",     XYDTFC, CM_INV,    "tf-prefix",        XYDTFP, CM_INV,    "toll-free-area-code",XYDTFC, 0,    "toll-free-prefix", XYDTFP, 0};int ndial = (sizeof(dialtab) / sizeof(struct keytab));#ifdef MDMHUPstruct keytab mdmhang[] = {    "modem-command", 1, 0,    "rs232-signal",  0, 0,    "v24-signal",    0, CM_INV};#endif /* MDMHUP */struct keytab dial_str[] = {    "autoanswer",       XYDS_AN, 0,	/* autoanswer */    "compression",	XYDS_DC, 0,	/* data compression */    "dial-mode-prompt", XYDS_MP, 0, /* dial mode prompt */    "dial-mode-string", XYDS_MS, 0, /* dial mode string */    "error-correction",	XYDS_EC, 0,	/* error correction */    "hangup-command",	XYDS_HU, 0,	/* hangup command */    "hardware-flow",	XYDS_HW, 0,	/* hwfc */    "init-string",	XYDS_IN, 0,	/* init string */    "no-flow-control",	XYDS_NF, 0,	/* no flow control */    "pulse",            XYDS_DP, 0,	/* pulse */    "software-flow",	XYDS_SW, 0,	/* swfc */    "tone",             XYDS_DT, 0	/* tone */};int ndstr = (sizeof(dial_str) / sizeof(struct keytab));struct keytab dial_fc[] = {    "auto",     FLO_AUTO, 0,    "none",     FLO_NONE, 0,    "rts/cts",  FLO_RTSC, 0,    "xon/xoff", FLO_XONX, 0};struct keytab dial_m[] = {		/* DIAL METHOD */    "default", XYDM_D, 0,    "pulse",   XYDM_P, 0,    "tone",    XYDM_T, 0};                           #ifdef CK_TAPIstruct keytab tapitab[] = {		/* SET Microsoft TAPI */   "configure-line",     XYTAPI_CFG,  CM_INV,   "dialing-properties", XYTAPI_DIAL, CM_INV,   "line",               XYTAPI_LIN, 0,   "location",           XYTAPI_LOC, 0};int ntapitab = (sizeof(tapitab)/sizeof(struct keytab)) ;struct keytab * tapiloctab = NULL;	/* Microsoft TAPI Locations */int ntapiloc = 0;extern struct keytab * tapilinetab;	/* Microsoft TAPI Line Devices */extern int ntapiline;#endif /* CK_TAPI */#endif /* NODIAL */ #ifndef NOPUSHextern int nopush;#ifdef UNIXstruct keytab wildtab[] = {		/* SET WILDCARD-EXPANSION */    "kermit",  0, 0,    "shell",   1, 0};#endif /* UNIX */#endif /* NOPUSH */#ifdef NETCONNextern struct keytab netcmd[], netkey[];extern int nnets, nnetkey;#ifdef TCPSOCKET#ifdef SOL_SOCKETextern struct keytab tcpopt[];extern int ntcpopt;#ifdef SO_LINGER_PROTOTYP( int linger, (int,int) );#endif /* SO_LINGER */#ifdef TCP_NODELAY_PROTOTYP( int no_delay, (int) );#endif /* TCP_NODELAY */#ifdef SO_SNDBUF_PROTOTYP( int sendbuf, (int) );#endif /* SO_SNDBUF */#ifdef SO_RCVBUF_PROTOTYP( int recvbuf, (int) );#endif /* SO_RCVBUF */#ifdef SO_KEEPALIVE_PROTOTYP( int keepalive, (int) );#endif /* SO_KEEPALIVE */#endif /* SOL_SOCKET */#endif /* TCPSOCKET */#ifdef NPIPEchar pipename[PIPENAML+1] = { NUL, NUL };#endif /* NPIPE */#ifdef CK_NETBIOSextern unsigned char NetBiosName[];#endif /* CK_NETBIOS */#endif /* NETCONN */#ifdef ANYX25struct keytab x25tab[] = {    "call-user-data",    XYUDAT, 0,    "closed-user-group", XYCLOS, 0,    "reverse-charge",    XYREVC, 0  };int nx25 = (sizeof(x25tab) / sizeof(struct keytab));struct keytab padx3tab[] = {    "break-action",         PAD_BREAK_ACTION,           0,    "break-character",      PAD_BREAK_CHARACTER,        0,    "character-delete",     PAD_CHAR_DELETE_CHAR,       0,    "cr-padding",           PAD_PADDING_AFTER_CR,       0,    "discard-output",       PAD_SUPPRESSION_OF_DATA,    0,    "echo",                 PAD_ECHO,                   0,    "editing",              PAD_EDITING,                0,    "escape",               PAD_ESCAPE,                 0,    "forward",              PAD_DATA_FORWARD_CHAR,      0,    "lf-padding",           PAD_PADDING_AFTER_LF,       0,    "lf-insert",            PAD_LF_AFTER_CR,            0,    "line-delete",          PAD_BUFFER_DELETE_CHAR,     0,    "line-display",         PAD_BUFFER_DISPLAY_CHAR,    0,    "line-fold",            PAD_LINE_FOLDING,           0,    "pad-flow-control",     PAD_FLOW_CONTROL_BY_PAD,    0,    "service-signals",      PAD_SUPPRESSION_OF_SIGNALS, 0,    "timeout",              PAD_DATA_FORWARD_TIMEOUT,   0,/* Speed is read-only */    "transmission-rate",    PAD_LINE_SPEED,             0,    "user-flow-control",    PAD_FLOW_CONTROL_BY_USER,   0};int npadx3 = (sizeof(padx3tab) / sizeof(struct keytab));#endif /* ANYX25 *//* Parity keyword table */ struct keytab partbl[] = {    "even",    'e', 0,    "mark",    'm', 0,    "none",     0 , 0,    "odd",     'o', 0,    "space",   's', 0};int npar = (sizeof(partbl) / sizeof(struct keytab)); /* On/Off table */ struct keytab onoff[] = {    "off",       0, 0,    "on",        1, 0}; staticstruct keytab xittab[] = {		/* SET EXIT */    "on-disconnect", 2, 0,		/* ...ON-DISCONNECT */    "status",        0, 0,		/* ...STATUS */    "warning",       1, 0		/* ...WARNING */};int nexit = (sizeof(xittab) / sizeof(struct keytab));struct keytab xitwtab[] = {		/* SET EXIT WARNING */    "always", 2, 0,                     /* even when not connected */    "off",    0, 0,			/* no warning     */    "on",     1, 0			/* when connected */};int nexitw = (sizeof(xitwtab) / sizeof(struct keytab));struct keytab rltab[] = {    "local",     1, 0,    "off",       0, CM_INV,    "on",        1, CM_INV,    "remote",    0, 0};int nrlt = (sizeof(rltab) / sizeof(struct keytab));/* Incomplete File Disposition table */staticstruct keytab ifdtab[] = {    "discard",   0, 0,    "keep",      1, 0};/* SET TAKE parameters table */staticstruct keytab taktab[] = {    "echo",  0, 0,    "error", 1, 0,    "off",   2, CM_INV,			/* For compatibility */    "on",    3, CM_INV			/* with MS-DOS Kermit... */};#ifndef NOSPLstaticstruct keytab suftab[] = {		/* (what to do with) STARTUP-FILE */    "delete", 1, 0,    "keep",   0, 0};/* SET MACRO parameters table */staticstruct keytab smactab[] = {    "echo",  0, 0,    "error", 1, 0};#endif /* NOSPL */#ifndef NOSCRIPTstaticstruct keytab scrtab[] = {    "echo",  0, 0};#endif /* NOSCRIPT *//* SET COMMAND table */struct keytab scmdtab[] = {    "bytesize",  SCMD_BSZ, 0,#ifdef OS2    "color",     SCMD_COL, 0,    "cursor-position", SCMD_CUR, 0,#endif /* OS2 */    "height",    SCMD_HIG, 0,    "more-prompting",  SCMD_MOR, 0,    "quoting",   SCMD_QUO, 0#ifdef CK_RECALL,   "recall-buffer-size", SCMD_RCL, 0#endif /* CK_RECALL */#ifdef CK_RECALL,   "retry", SCMD_RTR, 0#endif /* CK_RECALL */#ifdef OS2#ifdef ONETERMUPD,  "scrollback",  SCMD_SCR, 0#endif /* ONETERMUPD */#endif /* OS2 */,   "width",     SCMD_WID, 0};int nbytt = (sizeof(scmdtab) / sizeof(struct keytab));#ifndef NOSERVER/* Server parameters table */struct keytab srvtab[] = {    "display",  XYSERD, 0,    "get-path", XYSERP, 0,#ifdef OS2    "idle-timeout", XYSERI, 0,#endif /* OS2 */    "login",    XYSERL, 0,    "timeout",  XYSERT, 0};int nsrvt = (sizeof(srvtab) / sizeof(struct keytab));#endif /* NOSERVER *//* SET TRANSFER/XFER table */struct keytab tstab[] = {    "bell",          XYX_BEL,   0,#ifdef XFRCAN    "cancellation",  XYX_CAN,   0,#endif /* XFRCAN */#ifndef NOCSETS    "character-set", XYX_CSE,   0,#endif /* NOCSETS */#ifndef NOSPL    "crc-calculation", XYX_CRC, 0,#endif /* NOSPL */    "display",       XYX_DIS,   0,    "locking-shift", XYX_LSH,   0,    "mode",          XYX_MOD,   0,#ifdef CK_XYZ    "protocol",      XYX_PRO,   0,#endif /* CK_XYZ */    "slow-start",    XYX_SLO,   0,    "", 0, 0};int nts = (sizeof(tstab) / sizeof(struct keytab)) - 1;static struct keytab xfrmtab[] = {    "automatic", XMODE_A, 0,    "manual",    XMODE_M, 0};#ifndef NOCSETS/* SET TRANSFER CHARACTER-SET table */extern struct keytab tcstab[];extern int ntcs;#endif /* NOCSETS *//* SET TRANSFER LOCKING-SHIFT table */struct keytab lstab[] = {    "forced", 2,   0,    "off",    0,   0,    "on",     1,   0};int nls = (sizeof(lstab) / sizeof(struct keytab));/* SET TELNET tables */#ifdef TNCODEextern int tn_duplex, tn_nlm, tn_binary, tn_b_nlm, tn_b_meu, tn_b_ume;extern char *tn_term;static struct keytab tnbmtab[] = {	/* TELNET BINARY-MODE table */    "accepted", TN_BM_AC, 0,    "refused",  TN_BM_RF, 0,    "requested", TN_BM_RQ, 0};static struct keytab tnbugtab[] = {	/* TELNET BUG table */    "binary-me-means-u-too", 0, 0,    "binary-u-means-me-too", 1, 0};#ifdef CK_ENVIRONMENTstatic struct keytab tnenvtab[] = {	/* TELNET ENVIRONMENT table */    "acct",	TN_ENV_ACCT,	0,    "disp",	TN_ENV_DISP,	0,    "job",	TN_ENV_JOB,	0,    "printer",	TN_ENV_PRNT,	0,    "systemtype",TN_ENV_SYS,	0,    "user", 	TN_ENV_USR, 	0,    "uservar",	TN_ENV_UVAR,	CM_INV};static int ntnenv = sizeof(tnenvtab)/sizeof(struct keytab) ;#endif /* CK_ENVIRONMENT */#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[] = {    "binary-mode",     CK_TN_BM,   0,    "bug",             CK_TN_BUG,  0,    "echo",            CK_TN_EC,   0,#ifdef CK_ENVIRONMENT    "environment",     CK_TN_ENV,  0,#endif /* CK_ENVIRONMENT */    "newline-mode",    CK_TN_NL,   0,    "terminal-type",   CK_TN_TT,   0};int ntn = (sizeof(tntab) / sizeof(struct keytab));#endif /* TNCODE */

⌨️ 快捷键说明

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