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

📄 ckuus4.c

📁 C-Kermit源码。是使用串口/Modem和网络通讯的程序
💻 C
📖 第 1 页 / 共 5 页
字号:
extern char modemmsg[];extern MDMINF *modemp[];                /* Pointers to modem info structs */extern int nmdm, dialhng, dialtmo, dialksp, dialdpy, dialsrt, dialmhu, dialsta;extern int dialrtr, dialint, dialrstr, dialcon, dialcq, dialfld;extern int mdmspd, dialec, dialdc, dialmth, dialmauto, dialesc;extern char *dialnum,   *dialini,  *dialdir[], *dialcmd,  *dialnpr, *dialdcon, *dialdcoff, *dialecon, *dialecoff, *dialhcmd, *diallac, *dialhwfc, *dialswfc,  *dialnofc, *dialpulse, *dialtone, *dialname, *dialaaon, *dialaaoff, *dialmac;extern char *diallcc,   *dialixp,  *dialixs,   *dialldp,  *diallds, *dialpxi,  *dialpxo,   *dialsfx,  *dialtfp;extern char *diallcp,   *diallcs;extern int ntollfree, ndialpxx, nlocalac;extern char *dialtfc[], *diallcac[], *dialpxx[], *matchpxx;extern int ndialpucc, ndialtocc;extern char *dialtocc[], *dialpucc[];extern int ndialdir, dialcnf, dialcvt, dialidt, dialpace;extern long dialmax, dialcapas;extern struct keytab mdmtab[];#ifdef BIGBUFOK#define ARGBUFSIZ 8191#else#define ARGBUFSIZ 1023#endif /* BIGBUFOK */#ifdef BIGBUFOKextern char * dialmsg[];#endif /* BIGBUFOK */#endif /* NODIAL */#ifndef NOCSETS/* Translation stuff */extern int fcharset, tcharset, tslevel, language, nlng, tcsr, tcsl;extern struct keytab lngtab[];extern struct csinfo fcsinfo[], tcsinfo[];extern struct langinfo langs[];#ifdef CK_ANSICextern CHAR (*xls[MAXTCSETS+1][MAXFCSETS+1])(CHAR); /* Character set */extern CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])(CHAR); /* translation functions */#elseextern CHAR (*xls[MAXTCSETS+1][MAXFCSETS+1])(); /* Character set */extern CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])(); /* translation functions. */#endif /* CK_ANSIC */#ifdef UNICODE    extern int ucsbom, ucsorder;#endif /* UNICODE */#endif /* NOCSETS */#ifndef NOSPL/* Built-in variable names, maximum length VNAML (20 characters) */struct keytab vartab[] = {    "_line",     VN_TFLN,  CM_INV,      /* 192 */#ifdef OS2    "_regname",  VN_REGN,  CM_INV,      /* 1.1.12 */    "_regorg",   VN_REGO,  CM_INV,      /* 1.1.12 */    "_regnum",   VN_REGS,  CM_INV,      /* 1.1.12 */#endif /* OS2 */    "apcactive", VN_APC,   CM_INV,      /* 192 */    "argc",      VN_ARGC,  0,    "args",      VN_ARGS,  0,    "authname",  VN_AUTHN, 0,           /* 196 */    "authstate", VN_AUTHS, 0,           /* 195 */    "authtype",  VN_AUTHT, 0,           /* 195 */    "blockcheck",VN_BLK,   0,           /* 195 */#ifdef BROWSER    "browser",   VN_BROWSR,0,           /* 193 */    "browsopts", VN_BROPT, 0,           /* 193 */    "browsurl",  VN_URL,   0,           /* 193 */#endif /* BROWSER */    "byteorder", VN_BYTE,  0,           /* 195 */#ifndef NOCSETS    "charset",   VN_CSET,  0,           /* 192 */#endif /* NOCSETS */    "cmdbufsize",VN_CMDBL, 0,           /* 195 */    "cmdfile",   VN_CMDF,  0,    "cmdlevel",  VN_CMDL,  0,    "cmdsource", VN_CMDS,  0,    "cols",      VN_COLS,  0,           /* 190 */    "connection",VN_CONN,  0,           /* 190 */    "count",     VN_COUN,  0,#ifndef NOXFER    "cps",       VN_CPS,   0,           /* 190 */#endif /* NOXFER */    "cpu",       VN_CPU,   0,#ifndef NOXFER    "crc16",     VN_CRC16, 0,           /* 192 */    "ctty",      VN_TTYNAM,0,           /* 196 */#endif /* NOXFER */    "cx_time",   VN_CXTIME,0,           /* 195 */#ifndef NODIAL    "d$ac",      VN_D_AC,  0,           /* 192 */    "d$cc",      VN_D_CC,  0,           /* 192 */    "d$ip",      VN_D_IP,  0,           /* 192 */    "d$lc",      VN_D_LCP, 0,           /* 193 */    "d$lcp",     VN_D_LCP, CM_INV,      /* 193 */    "d$lp",      VN_D_LP,  0,           /* 192 */    "d$px",      VN_D_PXX, 0,           /* 195 */    "d$pxx",     VN_D_PXX, CM_INV,      /* 195 */#endif /* NODIAL */    "date",      VN_DATE,  0,    "day",       VN_DAY,   0,#ifndef NODIAL    "dialcount", VN_DRTR,  0,           /* 195 */    "dialnumber",VN_DNUM,  0,           /* 192 */    "dialresult",VN_MDMSG, 0,           /* 192 */    "dialstatus",VN_DIAL,  0,           /* 190 */    "dialsuffix",VN_PDSFX, 0,           /* 193 */    "dialtype",  VN_DTYPE, 0,           /* 193 */#endif /* NODIAL */    "directory", VN_DIRE,  0,#ifndef NODIAL    "dm_lp",     VN_DM_LP, 0,           /* 195 */    "dm_sp",     VN_DM_SP, 0,           /* 195 */    "dm_pd",     VN_DM_PD, 0,           /* 195 */    "dm_td",     VN_DM_TD, 0,           /* 195 */    "dm_wa",     VN_DM_WA, 0,           /* 195 */    "dm_wd",     VN_DM_WD, 0,           /* 195 */    "dm_rc",     VN_DM_RC, 0,           /* 195 */#endif /* NODIAL */#ifndef NOXFER    "download",  VN_DLDIR, 0,           /* 192 */#endif /* NOXFER */    "editor",    VN_EDITOR,0,    "editfile",  VN_EDFILE,0,    "editopts",  VN_EDOPT, 0,    "errno",     VN_ERRNO, 0,           /* 192 */    "errstring", VN_ERSTR, 0,           /* 192 */    "escape",    VN_ESC,   0,           /* 193 */    "evaluate",  VN_EVAL,  0,           /* 190 */#ifdef OS2    "exedir",    VN_EXEDIR,0,           /* 192 */#endif /* OS2 */    "exitstatus",VN_EXIT,  0,#ifdef CKCHANNELIO    "f_count",   VN_FCOU,  0,           /* 195 */    "f_error",   VN_FERR,  0,           /* 195 */    "f_max",     VN_FMAX,  0,           /* 195 */    "fileerror", VN_FERR,  CM_INV,      /* 195 */    "filemax",   VN_FERR,  CM_INV,      /* 195 */#endif /* CKCHANNELIO */    "filename",  VN_FNAM,  0,           /* 193 */    "filenumber",VN_FNUM,  0,           /* 193 */    "filespec",  VN_FILE,  0,    "fsize",     VN_FFC,   0,           /* 190 */    "ftype",     VN_MODE,  0,           /* 190 */    "herald",    VN_HERALD,0,    "home",      VN_HOME,  0,    "host",      VN_HOST,  0,    "hwparity",  VN_HWPAR, 0,           /* 195 */    "input",     VN_IBUF,  0,    "inchar",    VN_ICHR,  0,    "incount",   VN_ICNT,  0,    "inidir",    VN_INI,   0,           /* 192 */    "inmatch",   VN_MATCH, 0,           /* 196 */    "instatus",  VN_ISTAT, 0,           /* 192 */    "intime",    VN_INTIME,0,           /* 193 */    "inwait",    VN_INTMO, 0,           /* 195 */    "ipaddress", VN_IPADDR,0,           /* 192 */    "kbchar",    VN_KBCHAR,0,           /* 196 */#ifdef OS2    "keyboard",  VN_KEYB,  0,#endif /* OS2 */#ifdef CK_KERBEROS    "krb4errmsg",    VN_K4EMSG,0,    "krb4errno",     VN_K4ENO, 0,    "krb4principal", VN_K4PRN, 0,    "krb4realm",     VN_K4RLM, 0,    "krb4service",   VN_K4SRV, 0,    "krb5cc",        VN_K5CC,  0,    "krb5errmsg",    VN_K5EMSG,0,    "krb5errno",     VN_K5ENO, 0,    "krb5principal", VN_K5PRN, 0,    "krb5realm",     VN_K5RLM, 0,    "krb5service",   VN_K5SRV, 0,#endif /* CK_KERBEROS */    "line",      VN_LINE,  0,    "local",     VN_LCL,   0,#ifdef UNIX    "lockdir",   VN_LCKDIR,0,           /* 195 */    "lockpid",   VN_LCKPID,0,           /* 195 */#endif /* UNIX */    "maclevel",  VN_MACLVL,0,           /* 195 */    "macro",     VN_MAC,   0,#ifdef FNFLOAT    "math_e",    VN_MA_E,  0,           /* 195 */    "math_pi",   VN_MA_PI, 0,           /* 195 */    "math_precision", VN_MA_PR, 0,      /* 195 */#endif /* FNFLOAT */    "minput",    VN_MINP,  0,           /* 192 */    "model",     VN_MODL,  0,           /* 193 */    "modem",     VN_MDM,   0,#ifdef OS2    "mousecurx", VN_MOU_X, 0,           /* K95 1.1.14 */    "mousecury", VN_MOU_Y, 0,           /* K95 1.1.14 */#endif /* OS2 */#ifndef NODIAL    "m_aa_off",  VN_M_ECX, 0,           /* all 192... */    "m_aa_on",   VN_M_AAO, 0,    "m_dc_off",  VN_M_DCX, 0,    "m_dc_on",   VN_M_DCO, 0,    "m_dial",    VN_M_DCM, 0,    "m_ec_off",  VN_M_ECX, 0,    "m_ec_on",   VN_M_ECO, 0,    "m_fc_hw",   VN_M_HWF, 0,    "m_fc_no",   VN_M_NFC, 0,    "m_fc_sw",   VN_M_SWF, 0,    "m_hup",     VN_M_HUP, 0,    "m_init",    VN_M_INI, 0,    "m_name",    VN_M_NAM, 0,           /* 195 */    "m_pulse",   VN_M_PDM, 0,    "m_sig_cd",  VN_MS_CD, 0,           /* 195 */    "m_sig_cts", VN_MS_CTS,0,           /* 195 */    "m_sig_dsr", VN_MS_DSR,0,           /* 195 */    "m_sig_dtr", VN_MS_DTR,0,           /* 195 */    "m_sig_ri",  VN_MS_RI, 0,           /* 195 */    "m_sig_rts", VN_MS_RTS,0,           /* 195 */    "m_tone",    VN_M_TDM, 0,#endif /* NODIAL */    "name",      VN_NAME,  0,    "ndate",     VN_NDAT,  0,    "nday",      VN_NDAY,  0,    "newline",   VN_NEWL,  0,    "ntime",     VN_NTIM,  0,    "osname",    VN_OSNAM, 0,           /* 193 */    "osrelease", VN_OSREL, 0,           /* 193 */    "osversion", VN_OSVER, 0,           /* 193 */#ifndef NOXFER    "packetlen", VN_RPSIZ, 0,           /* 192 */#endif /* NOXFER */    "parity",    VN_PRTY,  0,           /* 190 */    "password",  VN_PWD,   CM_INV,      /* 192 */#ifdef PEXITSTAT    "pexitstat", VN_PEXIT, 0,           /* 193 */#endif /* PEXITSTAT */#ifdef CK_PID    "pid",       VN_PID,   0,           /* 193 */#endif /* CK_PID */    "platform",  VN_SYSV,  0,    "printer",   VN_PRINT, 0,           /* 193 */    "program",   VN_PROG,  0,    "prompt",    VN_PRM,   CM_INV,      /* 192 */#ifndef NOXFER    "protocol",  VN_PROTO, 0,           /* 192 */    "p_8bit",    VN_P_8BIT,0,           /* 193 */    "p_ctl",     VN_P_CTL, 0,           /* 193 */    "p_rpt",     VN_P_RPT, 0,           /* 193 */    "query",     VN_QUE,   0,           /* 190 */#endif /* NOXFER */    "return",    VN_RET,   0,#ifdef CK_REXX    "rexx",      VN_REXX,  0,           /* 190 */#endif /* CK_REXX */    "rows",      VN_ROWS,  0,           /* 190 */#ifdef OS2    "select",    VN_SELCT, 0,           /* 192 */#endif /* OS2 */    "sendlist",  VN_SNDL,  0,    "serial",    VN_SERIAL,0,           /* 195 */    "setlinemsg",VN_SLMSG, 0,           /* 195 */    "speed",     VN_SPEE,  0,#ifdef OS2    "space",     VN_SPA,   0,    "startup",   VN_STAR,  0,           /* 190 */#else#ifdef UNIX    "startup",   VN_STAR,  0,           /* 193 */#else#ifdef VMS    "startup",   VN_STAR,  0,           /* 193 */#endif /* VMS */#endif /* UNIX */#endif /* OS2 */    "status",    VN_SUCC,  0,#ifndef NOXFER    "sysid",     VN_SYSI,  0,#endif /* NOXFER */    "system",    VN_SYST,  0,    "terminal",  VN_TTYP,  0,#ifdef OS2    "termkey",   VN_TRMK,  CM_INV,      /* 192 */#endif /* OS2 */    "test",      VN_TEST,  0,           /* 193 */    "textdir",   VN_TXTDIR,0,           /* 195 */#ifndef NOXFER    "tfsize",    VN_TFC,   0,    "tftime",    VN_TFTIM, 0,           /* 195 */#endif /* NOXFER */    "time",      VN_TIME,  0,    "tmpdir",    VN_TEMP,  0,           /* 192 */#ifdef CK_TRIGGER    "trigger",   VN_TRIG,  0,           /* 193 */#endif /* CK_TRIGGER */#ifdef CK_TTYFD    "ttyfd",     VN_TTYF,  0,#endif /* CK_TTYFD */    "ty_ln",     VN_TY_LN, 0,           /* 195 */    "ty_lc",     VN_TY_LC, 0,           /* 195 */    "ty_lm",     VN_TY_LM, 0,           /* 195 */#ifdef BROWSER    "url",       VN_URL,   CM_INV,      /* 193 */#endif /* BROWSER */    "userid",    VN_UID,   0,           /* 192 */    "version",   VN_VERS,  0,#ifndef NOXFER    "window",    VN_WINDO, 0,           /* 192 */#endif /* NOXFER */#ifdef IBMX25    "x25local_nua", VN_X25LA, 0,        /* 193 */    "x25remote_nua", VN_X25RA, 0,       /* 193 */#endif /* IBMX25 */#ifdef CK_SSL    "x509_issuer",  VN_X509_I, 0,    "x509_subject", VN_X509_S, 0,#endif /* CK_SSL */#ifndef NOXFER    "xferstatus",VN_XFSTAT,0,           /* 193 */    "xfermsg",   VN_XFMSG, 0,           /* 193 */    "xfer_badpacket", VN_XF_BC, 0,      /* 195 */    "xfer_timeout",   VN_XF_TM, 0,      /* 195 */    "xfer_retransmit",VN_XF_RX, 0,      /* 195 */#endif /* NOXFER */    "xprogram",  VN_XPROG, 0,           /* 193 */    "xversion",  VN_XVNUM, 0            /* 192 */};int nvars = (sizeof(vartab) / sizeof(struct keytab));#endif /* NOSPL */#ifndef NOSPLstruct keytab fnctab[] = {              /* Function names */#ifdef OS2    ".oox",       FN_OOX, CM_INV,       /* ... */#endif /* OS2 */#ifdef CKCHANNELIO    "_eof",       FN_FEOF,   0,    "_errmsg",    FN_FERMSG, 0,    "_getblock",  FN_FGBLK,  0,    "_getchar",   FN_FGCHAR, 0,    "_getline",   FN_FGLINE, 0,    "_handle",    FN_FILNO,  0,    "_line",      FN_NLINE,  0,    "_pos",       FN_FPOS,   0,    "_putblock",  FN_FPBLK,  0,    "_putchar",   FN_FPCHAR, 0,    "_putline",   FN_FPLINE, 0,    "_status",    FN_FSTAT,  0,#endif /* CKCHANNELIO */    "aaconvert",  FN_AADUMP, 0,         /* Associative Array conversion */    "absolute",   FN_ABS,  0,           /* Absolute value */    "arraylook",  FN_ALOOK,0,           /* Array lookup */    "b64decode",  FN_FMB64,0,           /* Base-64 conversion */    "b64encode",  FN_TOB64,0,           /* ... */    "basename",   FN_BSN,  0,           /* Basename */    "break",      FN_BRK,  0,           /* Break (as in Snobol) */    "ca",         FN_CAP,  CM_INV|CM_ABR, /* Abbreviation for capitablize */    "cap",        FN_CAP,  CM_INV|CM_ABR, /* Abbreviation for capitablize */    "capitalize", FN_CAP,  0,           /* First Letter -> uppercase */    "caps",       FN_CAP,  CM_INV,      /* ditto */    "character",  FN_CHR,  0,           /* Character from code */    "checksum",   FN_CHK,  0,           /* Checksum */    "code",       FN_COD,  0,           /* Code from character */#ifndef NOPUSH    "command",    FN_CMD,  0,           /* Output from a command */#endif /* NOPUSH */    "contents",   FN_CON,  0,           /* Definition (contents) of variable */    "crc16",      FN_CRC,  0,           /* CRC-16 */#ifdef OS2    "crypt",      FN_CRY, CM_INV,#endif /* OS2 */    "cvtdate",    FN_DTIM, 0,           /* Convert free date/time to std */#ifdef ZFCDAT    "date",       FN_FD,   0,           /* File modification/creation date */#endif /* ZFCDAT */    "day",        FN_DAY,  0,           /* Day of week */    "dayofyear",  FN_JDATE,0,           /* Date to Day of Year */    "definition", FN_DEF,  0,           /* Return definition of given macro */#ifndef NODIAL    "dialconvert",FN_PNCVT,0,           /* Convert portable phone number */#endif /* NODIAL */    "dimension",  FN_DIM,  0,           /* Dimension of array */    "directories",FN_DIR,  0,           /* List of directories */    "dirname",    FN_DNAM, 0,           /* Directory part of filename */    "doy",        FN_JDATE,CM_INV,      /* Date to Day of Year */    "doy2date",   FN_DATEJ,0,           /* Day of Year to date */#ifdef FN_ERRMSG    "errstring",  FN_ERRMSG,0,          /* Error code to message */#endif /* FN_ERRMSG */    "evaluate",   FN_EVA,  0,           /* Evaluate given arith expression */    "execute",    FN_EXE,  0,           /* Execute given macro */    "files",      FN_FC,   0,           /* File count */#ifdef FNFLOAT    "fpabsolute", FN_FPABS, 0,          /* Floating-point absolute value */    "fpadd",      FN_FPADD, 0,          /* FP add */

⌨️ 快捷键说明

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