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

📄 ckuus7.c

📁 C-Kermit源码。是使用串口/Modem和网络通讯的程序
💻 C
📖 第 1 页 / 共 5 页
字号:
#define TT_GR_KBD 4struct keytab graphsettab[] = {  /* DEC VT Graphic Sets */    "all",   TT_GR_ALL, 0,    "g0",    TT_GR_G0,  0,    "g1",    TT_GR_G1,  0,    "g2",    TT_GR_G2,  0,    "g3",    TT_GR_G3,  0,    "keyboard", TT_GR_KBD, 0,    "", 0, 0};int ngraphset = (sizeof(graphsettab) / sizeof(struct keytab)) - 1;struct keytab adltab[] = {		/* Autodownload Options */    "kermit", 		TAD_K,  	0,    "off",		TAD_OFF, 	0,    "on",		TAD_ON,		0,    "zmodem",	 	TAD_Z,  	0};int nadltab = (sizeof(adltab) / sizeof(struct keytab));struct keytab adlxtab[] = {		/* Autodownload Options */    "c0-conflicts",     TAD_X_C0,       0,    "detection-method", TAD_X_DETECT, 	0,    "string", 		TAD_X_STR,  	0};int nadlxtab = (sizeof(adlxtab) / sizeof(struct keytab));struct keytab adldtab[] = {		/* Auto-dl Detection Methods */    "packet",	ADL_PACK,	0,    "string",	ADL_STR,	0};int nadldtab = (sizeof(adldtab) / sizeof(struct keytab));struct keytab adlc0tab[] = {		/* Auto-dl Detection Methods */    "ignored-by-emulator",	0,	0,    "processed-by-emulator",	1,	0};int nadlc0tab = (sizeof(adlc0tab) / sizeof(struct keytab));struct keytab vtlangtab[] = {    "belgian",        VTL_BELGIAN , 0,    "british",        VTL_BRITISH , 0,    "canadian",       VTL_CANADIAN, 0,    "czech",          VTL_CZECH   , 0,    "danish",         VTL_DANISH  , 0,    "dutch",          VTL_DUTCH   , 0,    "finnish",        VTL_FINNISH , 0,    "french",         VTL_FRENCH  , 0,    "french-canadian",VTL_FR_CAN  , 0,    "german",         VTL_GERMAN  , 0,    "greek",          VTL_GREEK   , 0,    "hebrew",         VTL_HEBREW  , 0,    "hungarian",      VTL_HUNGARIA, 0,    "italian",        VTL_ITALIAN , 0,    "latin-american", VTL_LATIN_AM, 0,    "north-american", VTL_NORTH_AM, 0,    "norwegian",      VTL_NORWEGIA, 0,    "polish",         VTL_POLISH  , 0,    "portugese",      VTL_PORTUGES, 0,    "romanian",       VTL_ROMANIAN, 0,    "russian",        VTL_RUSSIAN , 0,    "scs",            VTL_SCS     , CM_INV,    "slovak",         VTL_SLOVAK  , 0,    "spanish",        VTL_SPANISH , 0,    "swedish",        VTL_SWEDISH , 0,    "swiss-french",   VTL_SW_FR   , 0,    "swiss-german",   VTL_SW_GR   , 0,    "turkish-f",      VTL_TURK_F  , CM_INV,    "turkish-q",      VTL_TURK_Q  , CM_INV};int nvtlangtab = (sizeof(vtlangtab) / sizeof(struct keytab));#endif /* OS2 */struct keytab crdtab[] = {		/* Carriage-return display */    "crlf",        1, 0,    "normal",      0, 0};extern int tt_crd;			/* Carriage-return display variable */#ifdef CK_APCextern int apcstatus, apcactive;static struct keytab apctab[] = {	/* Terminal APC parameters */    "off",	 APC_OFF,  0,    "on",	 APC_ON,   0,    "unchecked", APC_UNCH, 0};#endif /* CK_APC */#endif /* NOLOCAL */extern int autodl;struct keytab beltab[] = {		/* Terminal bell mode */#ifdef OS2    "audible", XYB_AUD,  0,    "none",    XYB_NONE, 0,#else    "audible", XYB_AUD,  CM_INV,    "none",    XYB_NONE, CM_INV,#endif /* OS2 */#ifdef OS2    "off",     XYB_NONE, CM_INV,    "on",      XYB_AUD,  CM_INV,#else    "off",     XYB_NONE, 0,    "on",      XYB_AUD,  0,#endif /* OS2 */#ifdef OS2    "visible", XYB_VIS,  0,#endif /* OS2 */    "", 0, 0};int nbeltab = sizeof(beltab)/sizeof(struct keytab) - 1;int tt_unicode = 1;			/* Use Unicode if possible */#ifdef OS2/*  OS/2 serial communication devices.*/struct keytab os2devtab[] = {    "1",    1, CM_INV,			/* Invisible synonyms, like */    "2",    2, CM_INV,			/* "set port 1" */    "3",    3, CM_INV,    "4",    4, CM_INV,    "5",    5, CM_INV,    "6",    6, CM_INV,    "7",    7, CM_INV,    "8",    8, CM_INV,    "com1", 1, 0,			/* Real device names */    "com2", 2, 0,    "com3", 3, 0,    "com4", 4, 0,    "com5", 5, 0,    "com6", 6, 0,    "com7", 7, 0,    "com8", 8, 0#ifdef OS2ONLY   ,"slipcom1", 1, 0,			/* For use with SLIP driver */    "slipcom2", 2, 0,			/* shared access */    "slipcom3", 3, 0,    "slipcom4", 4, 0,    "slipcom5", 5, 0,    "slipcom6", 6, 0,    "slipcom7", 7, 0,    "slipcom8", 8, 0,    "pppcom1", 1, 0,			/* For use with PPP driver */    "pppcom2", 2, 0,			/* shared access */    "pppcom3", 3, 0,    "pppcom4", 4, 0,    "pppcom5", 5, 0,    "pppcom6", 6, 0,    "pppcom7", 7, 0,    "pppcom8", 8, 0#endif /* OS2ONLY */};int nos2dev = (sizeof(os2devtab) / sizeof(struct keytab));#ifdef OS2ONLYstruct keytab os2ppptab[] = {    "0",    0, CM_INV,    "1",    1, CM_INV,			/* Invisible synonyms, like */    "2",    2, CM_INV,			/* "set port 1" */    "3",    3, CM_INV,    "4",    4, CM_INV,    "5",    5, CM_INV,    "6",    6, CM_INV,    "7",    7, CM_INV,    "8",    8, CM_INV,    "9",    9, CM_INV,    "ppp0", 0, 0,    "ppp1", 1, 0,			/* For use with PPP driver */    "ppp2", 2, 0,			/* shared access */    "ppp3", 3, 0,    "ppp4", 4, 0,    "ppp5", 5, 0,    "ppp6", 6, 0,    "ppp7", 7, 0,    "ppp8", 8, 0,    "ppp9", 9, 0};int nos2ppp = (sizeof(os2ppptab) / sizeof(struct keytab));#endif /* OS2ONLY *//*  Terminal parameters that can be set by SET commands.  Used by the ck?con.c terminal emulator code.  For now, only used for #ifdef OS2.  Should add these for Macintosh.*/int tt_arrow = TTK_NORM;		/* Arrow key mode: normal (cursor) */int tt_keypad = TTK_NORM;		/* Keypad mode: normal (numeric) */int tt_shift_keypad = 0; 	        /* Keypad Shift mode: Off */int tt_wrap = 1;			/* Terminal wrap, 1 = On */int tt_type = TT_VT320;			/* Terminal type, initially VT320 */int tt_type_mode = TT_VT320;    	/* Terminal type set by host command */int tt_cursor = 0;			/* Terminal cursor, 0 = Underline */int tt_cursor_usr = 0;			/* Users Terminal cursor type */int tt_cursorena_usr = 1;		/* Users Terminal cursor enabled */int tt_answer = 0;			/* Terminal answerback (disabled) */int tt_scrsize[VNUM] = {512,512,512,1};	/* Terminal scrollback buffer size */int tt_roll[VNUM] = {1,1,1,1};		/* Terminal roll (on) */int tt_pacing = 0;			/* Terminal output-pacing (none) */int tt_inpacing = 0;			/* Terminal input-pacing (none) */int tt_ctstmo = 15;			/* Terminal transmit-timeout */int tt_codepage = -1;			/* Terminal code-page */int tt_update = 100;			/* Terminal screen-update interval */int tt_updmode = TTU_FAST;		/* Terminal screen-update mode FAST */extern int updmode;int tt_font = TTF_ROM;			/* Terminal screen font */#ifndef KUIint tt_status = 1;			/* Terminal status line displayed */int tt_status_usr = 1;#else  /* KUI */#ifdef K95Gint tt_status = 1;			/* Terminal status line displayed */int tt_status_usr = 1;#else /* K95G */int tt_status = 0;			/* Terminal status line displayed */int tt_status_usr = 0;#endif /* K95G */#endif /* KUI */int tt_senddata = 0;			/* Let host read terminal data */extern int wy_blockend;			/* Terminal Send Data EOB type */int tt_hidattr = 1;			/* Attributes are hidden */int tt_idlesnd_tmo = 0;			/* Idle Send Timeout, disabled */char * tt_idlesnd_str = NULL;		/* Idle Send String, none */extern unsigned char colornormal, colorselect,colorunderline, colorstatus, colorhelp, colorborder,colorgraphic, colordebug, colorreverse;extern int trueblink, trueunderline, truereverse;extern int bgi, fgi;extern int scrninitialized[];struct keytab audibletab[] = {		/* Terminal Bell Audible mode */    "beep",          XYB_BEEP, 0,	/* Values ORd with bell mode */    "system-sounds", XYB_SYS, 0};int naudibletab = sizeof(audibletab)/sizeof(struct keytab);struct keytab akmtab[] = {		/* Arrow key mode */    "application", TTK_APPL, 0,    "cursor",      TTK_NORM, 0};struct keytab kpmtab[] = {		/* Keypad mode */    "application", TTK_APPL, 0,    "numeric",     TTK_NORM, 0};struct keytab ttcolmodetab[] = {    "current-color", 0, 0,    "default-color",  1, 0};int ncolmode = sizeof(ttcolmodetab)/sizeof(struct keytab);#define TTCOLNOR  0#define TTCOLREV  1#define TTCOLUND  2#define TTCOLSTA  3#define TTCOLHLP  4#define TTCOLBOR  5#define TTCOLSEL  6#define TTCOLDEB  7#define TTCOLGRP  8#define TTCOLRES  10#define TTCOLERA  11struct keytab ttycoltab[] = {			/* Terminal Screen coloring */    "border",             TTCOLBOR, 0,		/* Screen border color */    "debug-terminal",     TTCOLDEB, 0,		/* Debug color */    "erase",              TTCOLERA, 0,          /* Erase mode */    "graphic",            TTCOLGRP, 0,          /* Graphic Color */    "help-text",          TTCOLHLP, 0,		/* Help screens */    "normal",             TTCOLNOR, CM_INV,	/* Normal screen text */    "reset-on-esc[0m",    TTCOLRES, 0,          /* Reset on ESC [ 0 m */    "reverse-video",      TTCOLREV, 0,          /* Reverse video */    "status-line",        TTCOLSTA, 0,		/* Status line */    "selection",          TTCOLSEL, 0,		/* Selection color */    "terminal-screen",    TTCOLNOR, 0,		/* Better name than "normal" */    "underlined-text",    TTCOLUND, 0    	/* Underlined text */};int ncolors = (sizeof(ttycoltab) / sizeof(struct keytab));#define TTATTNOR  0#define TTATTBLI  1#define TTATTREV  2#define TTATTUND  3#define TTATTPRO  4#define TTATTBLD  5#define TTATTDIM  6#define TTATTINV  7#define TTATTDONE 8struct keytab ttyattrtab[] = {    "blink", 	TTATTBLI, 0,    "protected",TTATTPRO, 0,    "reverse",	TTATTREV, 0,    "underline",TTATTUND, 0};int nattrib = (sizeof(ttyattrtab) / sizeof(struct keytab));struct keytab ttyprotab[] = {    "bold",        TTATTBLD, 0,    "dim",	   TTATTDIM, 0,    "done",	   TTATTDONE, CM_INV,    "invisible",   TTATTINV, 0,    "normal",	   TTATTNOR, 0,    "reverse",	   TTATTREV, 0,    "underlined",  TTATTUND, 0};int nprotect = (sizeof(ttyprotab) / sizeof(struct keytab));struct keytab ttyseobtab[] = {    "crlf_etx",	 1, 0,    "us_cr",	 0, 0};struct keytab ttyclrtab[] = {		/* Colors */    "black",       0, 0,    "blue",        1, 0,    "brown",       6, 0,    "cyan",        3, 0,    "darkgray",    8, CM_INV,    "dgray",       8, 0,    "green",       2, 0,    "lblue",       9, CM_INV,    "lcyan",      11, CM_INV,    "lgray",       7, CM_INV,    "lgreen",     10, CM_INV,    "lightblue",   9, 0,    "lightcyan",  11, 0,    "lightgray",   7, 0,    "lightgreen", 10, 0,    "lightmagenta",13,0,    "lightred",   12, 0,    "lmagenta",   13, CM_INV,    "lred",       12, CM_INV,    "magenta",     5, 0,    "red",         4, 0,    "white",      15, 0,    "yellow",     14, 0};int nclrs = (sizeof (ttyclrtab) / sizeof (struct keytab));struct keytab ttycurtab[] = {    "full",        TTC_BLOCK, 0,    "half",        TTC_HALF,  0,    "underline",   TTC_ULINE, 0};int ncursors = 3;struct keytab ttyptab[] = {    "aixterm",  TT_AIXTERM, 0,          /* IBM AIXterm */    "ansi-bbs", TT_ANSI,    0,		/* ANSI.SYS (BBS) */    "at386",    TT_AT386,   0,		/* Unixware ANSI */    "avatar/0+",TT_ANSI,    0,          /* AVATAR/0+ */    "ba80",     TT_BA80,    0,          /* Nixdorf BA80 */    "be",       TT_BEOS,    CM_INV|CM_ABR,    "beos-ansi",TT_BEOS,    CM_INV,     /* BeOS ANSI */    "beterm",   TT_BEOS,    0,          /* BeOS Terminal (as of PR2 ) */    "d200",     TT_DG200,   CM_INV|CM_ABR, /* Data General DASHER 200 */    "d210",     TT_DG210,   CM_INV|CM_ABR, /* Data General DASHER 210 */    "d217",     TT_DG217,   CM_INV|CM_ABR, /* Data General DASHER 217 */    "dg200",    TT_DG200,   0,		/* Data General DASHER 200 */    "dg210",    TT_DG210,   0,          /* Data General DASHER 210 */    "dg217",    TT_DG217,   0,          /* Data General DASHER 217 */    "h1500",    TT_HZL1500, CM_INV,    	/* Hazeltine 1500 */    "h19",      TT_H19,     CM_INV,	/* Heath-19 */    "heath19",  TT_H19,     0,		/* Heath-19 */    "hft",      TT_HFT,     0,          /* IBM High Function Terminal */    "hp2621a",  TT_HP2621,  0,		/* HP 2621A */    "hpterm",   TT_HPTERM,  0,		/* HP TERM */    "hz1500",   TT_HZL1500, 0,    	/* Hazeltine 1500 */    "ibm3151",  TT_IBM31,   CM_INV,	/* IBM 3101-xx,3161 */    "linux",    TT_LINUX,   0,          /* Linux */    "qansi",    TT_QANSI,   0,		/* QNX ANSI */    "qnx",      TT_QNX,     0,		/* QNX Console */    "scoansi",  TT_SCOANSI, 0,		/* SCO ANSI */    "sni-97801",TT_97801, 0,		/* SNI 97801 *//*  The idea of NONE is to let the console driver handle the escape sequences,  which, in theory at least, would give not only ANSI emulation, but also any  other kind of emulation that might be provided by alternative console  drivers, if any existed.  For this to work, ckocon.c would need to be modified to make higher-level  calls, like VioWrtTTY(), DosWrite(), or (simply) write(), rather than  VioWrt*Cell() and similar, and it would also have to give up its rollback  feature, and its status line and help screens would also have to be  forgotten or else done in an ANSI way.  As matters stand, we already have perfectly good ANSI emulation built in,  and there are no alternative console drivers available, so there is no point  in having a terminal type of NONE, so it is commented out.  However, should  you uncomment it, it will work like a "glass tty" -- no escape sequence  interpretation at all; somewhat similar to debug mode, except without the  debugging (no highlighting of control chars or escape sequences); help  screens, status line, and rollback will still work.*/#ifdef OS2PM#ifdef COMMENT    "tek4014", TT_TEK40, 0,#endif /* COMMENT */#endif /* OS2PM */    "tty",     TT_NONE,  0,    "tvi910+", TT_TVI910, 0,    "tvi925",  TT_TVI925, 0,    "tvi950",  TT_TVI950, 0,    "vc404",   TT_VC4404, 0,    "vc4404",  TT_VC4404, CM_INV,    "vip7809", TT_VIP7809, 0,    "vt100",   TT_VT100, 0,    "vt102",   TT_VT102, 0,    "vt220",   TT_VT220, 0,    "vt220pc", TT_VT220PC, 0,    "vt320",   TT_VT320, 0,    "vt320pc", TT_VT320PC, 0,    "vt52",    TT_VT52,  0,#ifdef NT    "vtnt",    TT_VTNT,  0,#else /* NT */    "vtnt",    TT_VTNT,  CM_INV,#endif /* NT */    "wy160",   TT_WY160, 0,    "wy30",    TT_WY30,  0,    "wy370",   TT_WY370, 0,    "wy50",    TT_WY50,  0,    "wy60",    TT_WY60,  0,    "wyse30",  TT_WY30,  CM_INV,    "wyse370", TT_WY370, CM_INV,    "wyse50",  TT_WY50,  CM_INV,    "wyse60",  TT_WY60,  CM_INV};int nttyp = (sizeof(ttyptab) / sizeof(struct keytab));struct keytab ttkeytab[] = {    "aixterm",  TT_AIXTERM, 0,          /* IBM AIXterm */    "ansi-bbs",  TT_ANSI,    0,		/* ANSI.SYS (BBS) */    "at386",     TT_AT386,   0,		/* Unixware ANSI */    "avatar/0+", TT_ANSI,    0,         /* AVATAR/0+ */    "ba80",      TT_BA80,    0,         /* Nixdorf BA80 */    "be",        TT_BEOS,    CM_INV|CM_ABR,    "beos-ansi", TT_BEOS,    CM_INV,    /* BeOS ANSI */    "beterm",    TT_BEOS,    0,         /* BeOS Terminal (as of PR2) */    "d200",      TT_DG200,   CM_INV|CM_ABR, /* Data General DASHER 200 */    "d210",      TT_DG210,   CM_INV|CM_ABR, /* Data General DASHER 210 */    "d217",      TT_DG217,   CM_INV|CM_ABR, /* Data General DASHER 217 */    "dg200",     TT_DG200,   0,		/* Data General DASHER 200 */    "dg210",     TT_DG210,   0,    	/* Data General DASHER 210 */    "dg217",     TT_DG217,   0,    	/* Data General DASHER 217 */    "emacs",     TT_KBM_EMACS,   0,     /* Emacs mode */    "h19",       TT_H19,     CM_INV,	/* Heath-19 */    "heath19",   TT_H19,     0,		/* Heath-19 */    "hebrew",    TT_KBM_HEBREW,   0,    /* Hebrew mode */    "hft",       TT_HFT,     0,         /* IBM High Function Terminal */    "hp2621a",   TT_HP2621,  0,		/* HP 2621A */    "hpterm",    TT_HPTERM,  0,		/* HP TERM */    "hz1500",    TT_HZL1500, 0,    	/* Hazeltine 1500 */    "ibm3151",   TT_IBM31,   CM_INV,	/* IBM 3101-xx,3161 */    "linux",     TT_LINUX,   0,         /* Linux */    "qansi",     TT_QANSI,         0,   /* QNX ANSI */    "qnx",       TT_QNX,           0,   /* QNX */    "russian",   TT_KBM_RUSSIAN,   0,   /* Russian mode */    "scoansi",   TT_SCOANSI, 0,		/* SCO ANSI */    "sni-97801", TT_97801, 0,           /* SNI 97801 */#ifdef OS2PM#ifdef COMMENT    "tek4014", TT_TEK40, 0,#endif /* COMMENT */

⌨️ 快捷键说明

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