?? ckuus3.c
字號:
/* Note, the values are encoded in cps rather than bps because 19200 and higher are too big for some ints. All but 75bps are multiples of ten. Result of lookup in this table must be multiplied by 10 to get actual speed in bps. If this number is 70, it must be changed to 75. If it is 888, this means 75/1200 split speed. The values are generic, rather than specific to UNIX. We can't use B75, B1200, B9600, etc, because non-UNIX versions of C-Kermit will not necessarily have these symbols defined. The BPS_xxx symbols are Kermit-specific, and are defined in ckcdeb.h or on the CC command line. Like all other keytabs, this one must be in "alphabetical" order, rather than numeric order.*/struct keytab spdtab[] = { "0", 0, CM_INV, "110", 11, 0,#ifdef BPS_115K "115200",11520, 0,#endif /* BPS_115K */ "1200", 120, 0,#ifdef BPS_134 "134.5", 134, 0,#endif /* BPS_134 */#ifdef BPS_14K "14400", 1440, 0,#endif /* BPS_14K */#ifdef BPS_150 "150", 15, 0,#endif /* BPS_150 */#ifdef BPS_1800 "1800", 180, 0,#endif /* BPS_150 */#ifdef BPS_19K "19200", 1920, 0,#endif /* BPS_19K */#ifdef BPS_200 "200", 20, 0,#endif /* BPS_200 */#ifdef BPS_230K "230400", 23040, 0,#endif /* BPS_230K */ "2400", 240, 0,#ifdef BPS_28K "28800", 2880, 0,#endif /* BPS_28K */ "300", 30, 0,#ifdef BPS_3600 "3600", 360, 0,#endif /* BPS_3600 */#ifdef BPS_38K "38400", 3840, 0,#endif /* BPS_38K */#ifdef BPS_460K "460800", 46080, 0, /* Need 32 bits for this... */#endif /* BPS_460K */ "4800", 480, 0,#ifdef BPS_50 "50", 5, 0,#endif /* BPS_50 */#ifdef BPS_57K "57600", 5760, 0,#endif /* BPS_57K */ "600", 60, 0,#ifdef BPS_7200 "7200", 720, 0,#endif /* BPS_7200 */#ifdef BPS_75 "75", 7, 0,#endif /* BPS_75 */#ifdef BPS_7512 "75/1200",888, 0, /* Code "888" for split speed */#endif /* BPS_7512 */#ifdef BPS_76K "76800", 7680, 0,#endif /* BPS_76K */#ifdef BPS_921K "921600", 92160,0, /* Need 32 bits for this... */#endif /* BPS_921K */ "9600", 960, 0};int nspd = (sizeof(spdtab) / sizeof(struct keytab)); /* How many speeds */#endif /* TTSPDLIST */#ifdef TN_COMPORTstruct keytab tnspdtab[] = { /* RFC 2217 TELNET COMPORT Option */ "115200", 11520, 0, /* (add any other defined speeds) */ "1200", 120, 0, "14400", 1440, 0, "19200", 1920, 0, "230400", 23040, 0, "2400", 240, 0, "28800", 2880, 0, "300", 30, 0, "38400", 3840, 0, "460800", 46080, 0, "4800", 480, 0, "57600", 5760, 0, "600", 60, 0, "9600", 960, 0};int ntnspd = (sizeof(tnspdtab) / sizeof(struct keytab)); /* How many speeds */#endif /* TN_COMPORT */#endif /* NOLOCAL */#ifndef NOCSETSextern struct keytab lngtab[]; /* Languages for SET LANGUAGE */extern int nlng;#endif /* NOCSETS */#ifndef NOLOCAL/* Duplex keyword table */struct keytab dpxtab[] = { "full", 0, 0, "half", 1, 0};#endif /* NOLOCAL *//* Flow Control */struct keytab cxtypesw[] = {#ifdef DECNET "/decnet", CXT_DECNET, 0,#endif /* DECNET */ "/direct-serial", CXT_DIRECT, 0,#ifdef DECNET "/lat", CXT_LAT, 0,#else#ifdef SUPERLAT "/lat", CXT_LAT, 0,#endif /* SUPERLAT */#endif /* DECNET */ "/modem", CXT_MODEM, 0,#ifdef NPIPE "/named-pipe", CXT_NPIPE, 0,#endif /* NPIPE */#ifdef NETBIOS "/netbios", CXT_NETBIOS, 0,#endif /* NETBIOS */ "/remote", CXT_REMOTE, 0,#ifdef TCPSOCKET "/tcpip", CXT_TCPIP, 0,#endif /* TCPSOCKET */#ifdef ANYX25 "/x.25", CXT_X25, 0,#endif /* ANYX25 */ "", 0, 0};int ncxtypesw = (sizeof(cxtypesw) / sizeof(struct keytab));#ifdef TN_COMPORTstruct keytab tnflotab[] = { /* SET FLOW-CONTROL keyword table */ "dtr/cd", FLO_DTRC, 0, /* for RFC 2217 Telnet COMPORT */ "dtr/cts", FLO_DTRT, 0, "keep", FLO_KEEP, 0, "none", FLO_NONE, 0, "rts/cts", FLO_RTSC, 0, "xon/xoff", FLO_XONX, 0};int ntnflo = (sizeof(tnflotab) / sizeof(struct keytab));#endif /* TN_COMPORT */struct keytab flotab[] = { /* SET FLOW-CONTROL keyword table */ "automatic", FLO_AUTO, CM_INV, /* Not needed any more */#ifdef CK_DTRCD "dtr/cd", FLO_DTRC, 0,#endif /* CK_DTRCD */#ifdef CK_DTRCTS "dtr/cts", FLO_DTRT, 0,#endif /* CK_DTRCTS */ "keep", FLO_KEEP, 0, "none", FLO_NONE, 0,#ifdef CK_RTSCTS "rts/cts", FLO_RTSC, 0,#endif /* CK_RTSCTS */#ifndef Plan9 "xon/xoff", FLO_XONX, 0,#endif /* Plan9 */ "", 0, 0};int nflo = (sizeof(flotab) / sizeof(struct keytab)) - 1;/* Handshake characters */struct keytab hshtab[] = { "bell", 007, 0, "code", 998, 0, "cr", 015, 0, "esc", 033, 0, "lf", 012, 0, "none", 999, 0, /* (can't use negative numbers) */ "xoff", 023, 0, "xon", 021, 0};int nhsh = (sizeof(hshtab) / sizeof(struct keytab));#ifndef NOLOCALstatic struct keytab sfttab[] = { /* File types for SET SESSION-LOG */ "ascii", XYFT_T, CM_INV, "binary", XYFT_B, 0, "debug", XYFT_D, 0, "text", XYFT_T, 0, "timestamped-text", 999, 0};static int nsfttab = (sizeof(sfttab) / sizeof(struct keytab));#endif /* NOLOCAL */#ifndef NODIAL#ifdef NETCONN /* Networks directory depends */int nnetdir = 0; /* on DIAL code -- fix later... */char *netdir[MAXDDIR+2];#endif /* NETCONN */_PROTOTYP( static int setdial, (int) );_PROTOTYP( static int setdcd, (void) );_PROTOTYP( static int cklogin, (void) );#ifndef MINIDIAL#ifdef OLDTBCODEextern int tbmodel; /* Telebit model ID */#endif /* OLDTBCODE */#endif /* MINIDIAL */extern MDMINF *modemp[]; /* Pointers to modem info structs */extern struct keytab mdmtab[]; /* Modem types (in module ckudia.c) */extern int nmdm; /* Number of them */_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, dialfld, dialidt, dialpace;extern int mdmspk, mdmvol, dialtest;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, *dialx3, *dialhwfc, *dialswfc, *dialnofc, *dialtone, *dialpulse, *dialname, *diallac;extern char *diallcc, *dialixp, *dialixs, *dialldp, *diallds, *dialtfp, *dialpxi, *dialpxo, *dialsfx, *dialaaon, *dialaaoff;extern char *diallcp, *diallcs, *dialini2, *dialmac;extern char *dialspoff, *dialspon, *dialvol1, *dialvol2, *dialvol3;char *dialtocc[MAXTPCC] = { NULL, NULL };int ndialtocc = 0;char *dialpucc[MAXTPCC] = { NULL, NULL };int ndialpucc = 0;char *dialtfc[MAXTOLLFREE] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};int ntollfree = 0;char *dialpxx[MAXPBXEXCH] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};int ndialpxx = 0;char *diallcac[MAXLOCALAC] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};int nlocalac = 0;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, CM_INV, "data-compression", XYDDC, 0, "dial-command", XYDDIA, 0, "error-correction", XYDEC, 0, "escape-character", XYDESC, 0, "flow-control", XYDFC, 0, "hangup-method", XYDMHU, 0,#ifndef NOXFER "kermit-spoof", XYDKSP, 0,#endif /* NOXFER */ "maximum-speed", XYDMAX, 0, "name", XYDNAM, 0, "speaker", XYDSPK, 0, "speed-matching", XYDSPD, 0, "type", XYDTYP, 0, "volume", XYDVOL, 0};int nsetmdm = (sizeof(setmdm) / sizeof(struct keytab));struct keytab voltab[] = { "high", 3, 0, "low", 1, 0, "medium", 2, 0};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));#ifdef COMMENT /* SET ANSWER not implemented yet */static struct keytab answertab[] = { { "caller-id", XYA_CID, 0 }; { "rings", XYA_RNG, 0 }; { "", 0, 0 }};static int nanswertab = (sizeof(answertab) / sizeof(struct keytab)) - 1;#endif /* COMMENT */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, "force-long-distance", XYDFLD, 0, "hangup", XYDHUP, 0, "ignore-dialtone", XYDIDT, 0, "interval", XYDINT, 0, "in", XYDINI, CM_INV|CM_ABR, "init-string", XYDINI, CM_INV, "intl-prefix", XYDIXP, 0, "intl-suffix", XYDIXS, 0,#ifndef NOXFER "kermit-spoof", XYDKSP, CM_INV,#endif /* NOXFER */ "lc-area-codes", XYDLLAC, 0, "lc-prefix", XYDLCP, 0, "lc-suffix", XYDLCS, 0, "ld-prefix", XYDLDP, 0, "ld-suffix", XYDLDS, 0, "local-area-code", XYDLAC, CM_INV, "local-prefix", XYDLCP, CM_INV, "local-suffix", XYDLCS, CM_INV, "m", XYDMTH, CM_INV|CM_ABR,#ifndef NOSPL "macro", XYDMAC, 0, /* 195 */#endif /* NOSPL */#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 */ "pacing", XYDPAC, 0, "pbx-exchange", XYDPXX, 0, "pbx-inside-prefix",XYDPXI, 0, "pbx-outside-prefix",XYDPXO, 0, "prefix", XYDNPR, 0, "pulse-countries", XYDPUCC, 0, "restrict", XYDRSTR, 0, "retries", XYDRTM, 0, "sort", XYDSRT, 0, "speed-matching", XYDSPD, CM_INV, "string", XYDSTR, CM_INV, "suffix", XYDSFX, 0, "test", XYDTEST, 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, "tone-countries", XYDTOCC, 0};int ndial = (sizeof(dialtab) / sizeof(struct keytab));#ifdef MDMHUPstruct keytab mdmhang[] = { "dtr", 0, 0, "modem-command", 1, 0, "rs232-signal", 0, 0, "v24-signal", 0, CM_INV};#endif /* MDMHUP */static struct keytab mdmcmd[] = { "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 */ "ignore-dialtone", XYDS_ID, 0, /* ignore dialtone */ "init-string", XYDS_IN, 0, /* init string */ "no-flow-control", XYDS_NF, 0, /* no flow control */ "predial-init", XYDS_I2, 0, /* last-minute setup commands */ "pulse", XYDS_DP, 0, /* pulse */ "software-flow", XYDS_SW, 0, /* swfc */ "speaker", XYDS_SP, 0, /* Speaker */ "tone", XYDS_DT, 0, /* tone */ "volume", XYDS_VO, 0 /* Volume */};static int nmdmcmd = (sizeof(mdmcmd) / 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 */ "auto", XYDM_A, 0, "default", XYDM_D, 0, "pulse", XYDM_P, 0, "tone", XYDM_T, 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -