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

📄 ckuus7.c

📁 linux终端仿真程序
💻 C
📖 第 1 页 / 共 5 页
字号:
    /* not needed anymore -- 5a(191) new screen handler mechanism */    "hide-cursor",   XYTHCU, 0,#endif /* COMMENT */    "key",           XYTKEY, 0,    "keypad-mode",   XYTKPD, 0,#endif /* OS2 */#ifndef NOCSETS#ifdef OS2    "local-character-set", XYTLCS,  0,#else    "local-character-set", XYTLCS,  CM_INV,#endif /* OS2 */#endif /* NOCSETS */    "locking-shift", XYTSO,  0,#ifdef OS2MOUSE    "mouse",         XYTMOU, CM_INV,#endif /* OS2MOUSE */    "newline-mode",  XYTNL,  0,#ifdef OS2    "output-pacing", XYTPAC, 0,#ifndef NOCSETS#ifdef OS2    "remote-character-set", XYTRCS,  0,#else    "remote-character-set", XYTRCS,  CM_INV,#endif /* OS2 */#endif /* NOCSETS */    "roll-mode",     XYTROL, 0,    "screen-update", XYTUPD, 0,    "scrollback",    XYSCRS, 0,    "send-data",     XYTSEND, 0,    "send-end-of-block", XYTSEOB, 0,    "sgr-colors",    XYTSGRC, 0,    "statusline",    XYTSTAT, 0,    "transmit-timeout", XYTCTS, 0,    "type",          XYTTYP, 0,#else    "type",          XYTTYP, CM_INV,#endif /* OS2 */#ifdef OS2#ifndef NOCSETS#ifdef CKOUNI    "unicode",       XYTUNI, CM_INV,#endif /* CKOUNI */#endif /* NOCSETS */#ifdef NT    "video-change",  XYTVCH, 0,#endif /* NT */#endif /* OS2 */    "width",         XYTWID, 0,#ifdef OS2    "wrap",          XYTWRP, 0,#endif /* OS2 */    "", 0, 0};int ntrm = (sizeof(trmtab) / sizeof(struct keytab)) - 1;#ifdef OS2struct keytab termctrl[] = { 	/* SET TERM CONTROLS */    "7", 	7, 0,    "8", 	8, 0};int ntermctrl = (sizeof(termctrl) / sizeof(struct keytab));struct keytab rolltab[] = {   /* Set TERM Roll Options */    "insert",    TTR_INSERT, 0,    "off",       TTR_OVER,   CM_INV,    "on",        TTR_INSERT, CM_INV,    "overwrite", TTR_OVER,   0};int nroll = (sizeof(rolltab) / sizeof(struct keytab));#define TT_GR_ALL 4#define TT_GR_G0  0#define TT_GR_G1  1#define TT_GR_G2  2#define TT_GR_G3  3struct 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};int ngraphset = (sizeof(graphsettab) / 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;#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,    "slipcom3", 3, 0,          /* shared access            */    "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,    "pppcom3", 3, 0,          /* shared access            */    "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,    "ppp3", 3, 0,          /* shared access            */    "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_answer = 0;			/* Terminal answerback (disabled) */int tt_scrsize[VNUM] = {512,512,512,1};	/* Terminal scrollback buffer size */int tt_bell = XYB_AUD | XYB_SYS;	/* Bell (system sounds) */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) */#ifdef COMMENT int tt_hide = 0;			/* Terminal hide-cursor (off) */#endif /* COMMENT */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 */int tt_status = 0;			/* Terminal status line displayed */int tt_status_usr = 0;#endif /* KUI */#ifdef CKOUNIint tt_unicode = 1;			/* Use Unicode if possible */#endif /* CKOUNI */int tt_senddata = 0;			/* Let host read terminal data */extern int wy_blockend;			/* Terminal Send Data EOB type */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 beltab[] = {		/* Terminal bell mode */    "audible", XYB_AUD, 0,    "none",    XYB_NONE, 0,    "visible", XYB_VIS, 0};int nbeltab = sizeof(beltab)/sizeof(struct keytab);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 TTATTBLI 0#define TTATTREV 1#define TTATTUND 2struct keytab ttyattrtab[] = {    "blink", 	TTATTBLI, 0,    "reverse",	TTATTREV, 0,    "underline",TTATTUND, 0};int nattrib = (sizeof(ttyattrtab) / 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[] = {    "ansi-bbs", TT_ANSI,    0,		/* ANSI.SYS (BBS) */    "at386",    TT_AT386,   0,		/* Unixware ANSI */    "avatar/0+", TT_ANSI,   0,          /* AVATAR/0+ */    "dg200",    TT_DG200,   0,		/* Data General DASHER 200 */    "dg210",    TT_DG200,   0,          /* Data General DASHER 210 */    "h19",      TT_H19,     CM_INV,	/* Heath-19 */    "heath19",  TT_H19,     0,		/* Heath-19 */    "hp2621",   TT_HP2621,  0,		/* HP 2621A */    "hz1500",   TT_HZL1500, 0,    	/* Hazeltine 1500 */#ifdef COMMENT    "ibm",      TT_IBM,     CM_INV,     /* IBM 3101-xx,3161 */#endif /* COMMENT */    "scoansi",  TT_SCOANSI, 0,		/* SCO ANSI *//*  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,    "vt100",   TT_VT100, 0,    "vt102",   TT_VT102, 0,    "vt220",   TT_VT220, 0,    "vt320",   TT_VT320, 0,    "vt52",    TT_VT52,  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[] = {    "ansi-bbs",  TT_ANSI,    0,		/* ANSI.SYS (BBS) */    "at386",     TT_AT386,   0,		/* Unixware ANSI */    "avatar/0+", TT_ANSI,   0,          /* AVATAR/0+ */    "dg200",     TT_DG200,   0,		/* Data General DASHER 200 */    "dg210",     TT_DG200,   0,         /* Data General DASHER 210 */    "emacs",     TT_MAX+1,   0,         /* Emacs mode */     "h19",       TT_H19,     CM_INV,	/* Heath-19 */    "heath19",   TT_H19,     0,		/* Heath-19 */    "hebrew",    TT_MAX+2,   0,         /* Hebrew mode */    "hp2621",    TT_HP2621,  0,		/* HP 2621A */    "hz1500",    TT_HZL1500, 0,    	/* Hazeltine 1500 */#ifdef COMMENT    "ibm",       TT_IBM,     CM_INV,    /* IBM 3101-xx,3161 */#endif /* COMMENT */    "russian",   TT_MAX+3,   0,         /* Russian mode */    "scoansi",   TT_SCOANSI, 0,		/* SCO ANSI */#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,    "vt100",   TT_VT100, 0,    "vt102",   TT_VT102, 0,    "vt220",   TT_VT220, 0,    "vt320",   TT_VT320, 0,    "vt52",    TT_VT52,  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 nttkey = (sizeof(ttkeytab) / sizeof(struct keytab));struct keytab prtytab[] = { /* OS/2 Priority Levels */    "foreground-server", XYP_SRV, 0,    "idle",              XYP_IDLE, CM_INV,    "regular",           XYP_REG, 0,    "time-critical",     XYP_RTP, 0};int nprty = (sizeof(prtytab) / sizeof(struct keytab));#endif /* OS2 */#ifdef NTstruct keytab win95tab[] = { /* Win95 work-arounds */    "alt-gr", 		     XYWAGR, 0,    "keyboard-translation",  XYWKEY, 0,    "overlapped-io",         XYWOIO, 0};int nwin95 = (sizeof(win95tab) / sizeof(struct keytab));#endif /* NT */#ifdef OS2MOUSEextern int wideresult;int tt_mouse = 1;			/* Terminal mouse on/off */struct keytab mousetab[] = {		/* Mouse items */    "activate", XYM_ON,    0,    "button",   XYM_BUTTON, 0,    "clear",    XYM_CLEAR, 0};int nmtab = (sizeof(mousetab)/sizeof(struct keytab));struct keytab mousebuttontab[] = {	/* event button */    "one",           XYM_B1, CM_INV,    "three",         XYM_B3, CM_INV,    "two",           XYM_B2, CM_INV,    "1",             XYM_B1, 0,    "2",             XYM_B2, 0,    "3",             XYM_B3, 0};int nmbtab = (sizeof(mousebuttontab) / sizeof(struct keytab));struct keytab mousemodtab[] = {		/* event button key modifier */    "alt",		XYM_ALT,   0,    "alt-shift",	XYM_SHIFT|XYM_ALT, 0,

⌨️ 快捷键说明

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