📄 ckuus7.c
字号:
#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, "vtnt", TT_VTNT, CM_INV, "wp", TT_KBM_WP, 0, /* Word Perfect mode */ "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 nttkey = (sizeof(ttkeytab) / sizeof(struct keytab));struct keytab kbmodtab[] = { "normal", KBM_EN, 0, "none", KBM_EN, CM_INV, "emacs", KBM_EM, 0, "english", KBM_EN, CM_INV, "hebrew", KBM_HE, 0, "russian", KBM_RU, 0, "wp", KBM_WP, 0};int nkbmodtab = (sizeof(kbmodtab) / 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 */ "8.3-filenames", XYW8_3, 0, "alt-gr", XYWAGR, 0, "keyboard-translation", XYWKEY, 0, "lucida-substitutions", XYWLUC, 0, "overlapped-io", XYWOIO, 0, "popups", XYWPOPUP, 0, "select-bug", XYWSELECT, 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", XYM_CTRL, 0, "ctrl-alt", XYM_CTRL|XYM_ALT, 0, "ctrl-alt-shift", XYM_CTRL|XYM_SHIFT|XYM_ALT, 0, "ctrl-shift", XYM_CTRL|XYM_SHIFT, 0, "none", 0, 0, "shift", XYM_SHIFT, 0};int nmmtab = (sizeof(mousemodtab) / sizeof(struct keytab));struct keytab mclicktab[] = { /* event button click modifier */ "click", XYM_C1, 0, "drag", XYM_DRAG, 0, "double-click", XYM_C2, 0};int nmctab = (sizeof(mclicktab) / sizeof(struct keytab));#ifndef NOKVERBSextern int nkverbs;extern struct keytab kverbs[];#endif /* NOKVERBS */#endif /* OS2MOUSE *//* #ifdef VMS */struct keytab fbtab[] = { /* Binary record types for VMS */ "fixed", XYFT_B, 0, /* Fixed is normal for binary */ "undefined", XYFT_U, 0 /* Undefined if they ask for it */};int nfbtyp = (sizeof(fbtab) / sizeof(struct keytab));/* #endif */#ifdef VMSstruct keytab lbltab[] = { /* Labeled File info */ "acl", LBL_ACL, 0, "backup-date", LBL_BCK, 0, "name", LBL_NAM, 0, "owner", LBL_OWN, 0, "path", LBL_PTH, 0};int nlblp = (sizeof(lbltab) / sizeof(struct keytab));#else#ifdef OS2struct keytab lbltab[] = { /* Labeled File info */ "archive", LBL_ARC, 0, "extended", LBL_EXT, 0, "hidden", LBL_HID, 0, "read-only", LBL_RO, 0, "system", LBL_SYS, 0};int nlblp = (sizeof(lbltab) / sizeof(struct keytab));#endif /* OS2 */#endif /* VMS */#ifdef CK_CURSES#ifdef CK_PCT_BARstatic struct keytab fdftab[] = { /* SET FILE DISPLAY FULL options */ "thermometer", 1, 0, "no-thermometer", 0, 0};extern int thermometer;#endif /* CK_PCT_BAR */#endif /* CK_CURSES */static struct keytab fdtab[] = { /* SET FILE DISPLAY options */#ifdef MAC /* Macintosh */ "fullscreen", XYFD_R, 0, /* Full-screen but not curses */ "none", XYFD_N, 0, "off", XYFD_N, CM_INV, "on", XYFD_R, CM_INV, "quiet", XYFD_N, CM_INV#else /* Not Mac */ "brief", XYFD_B, 0, /* Brief */ "crt", XYFD_S, 0, /* CRT display */#ifdef CK_CURSES#ifdef COMMENT "curses", XYFD_C, CM_INV, /* Full-screen, curses */#endif /* COMMENT */ "fullscreen", XYFD_C, 0, /* Full-screen, whatever the method */#endif /* CK_CURSES */ "none", XYFD_N, 0, /* No display */ "off", XYFD_N, CM_INV, /* Ditto */ "on", XYFD_R, CM_INV, /* On = Serial */ "quiet", XYFD_N, CM_INV, /* No display */ "serial", XYFD_R, 0 /* Serial */#endif /* MAC */};int nfdtab = (sizeof(fdtab) / sizeof(struct keytab));struct keytab rsrtab[] = { /* For REMOTE SET RECEIVE */ "packet-length", XYLEN, 0, "timeout", XYTIMO, 0};int nrsrtab = (sizeof(rsrtab) / sizeof(struct keytab));/* Send/Receive Parameters */struct keytab srtab[] = { "backup", XYBUP, 0,#ifndef NOCSETS "character-set-selection", XYCSET, 0,#endif /* NOCSETS */ "control-prefix", XYQCTL, 0,#ifdef CKXXCHAR "double-character", XYDBL, 0,#endif /* CKXXCHAR */ "end-of-packet", XYEOL, 0,#ifdef PIPESEND "filter", XYFLTR, 0,#endif /* PIPESEND */#ifdef CKXXCHAR "ignore-character", XYIGN, 0,#endif /* CKXXCHAR */ "move-to", XYMOVE, 0, "negotiation-string-max-length", XYINIL, CM_INV, "packet-length", XYLEN, 0, "pad-character", XYPADC, 0, "padding", XYNPAD, 0, "pathnames", XYFPATH, 0, "pause", XYPAUS, 0, "quote", XYQCTL, CM_INV, /* = CONTROL-PREFIX */ "rename-to", XYRENAME, 0, "start-of-packet", XYMARK, 0, "timeout", XYTIMO, 0,#ifdef VMS "version-numbers", 887, 0, /* VMS version numbers */#endif /* VMS */ "", 0, 0};int nsrtab = (sizeof(srtab) / sizeof(struct keytab)) - 1;#ifdef UNICODE#define UCS_BOM 1#define UCS_BYT 2static struct keytab ucstab[] = { "bom", UCS_BOM, 0, "byte-order", UCS_BYT, 0, "", 0, 0};int nucstab = (sizeof(ucstab) / sizeof(struct keytab)) - 1;static struct keytab botab[] = { "big-endian", 0, 0, "little-endian", 1, 0};static int nbotab = 2;#endif /* UNICODE *//* REMOTE SET */struct keytab rmstab[] = { "attributes", XYATTR, 0, "block-check", XYCHKT, 0, "file", XYFILE, 0, "incomplete", XYIFD, CM_INV, /* REMOTE SET FILE INCOMPLETE preferred */ "receive", XYRECV, 0, "retry", XYRETR, 0, "server", XYSERV, 0, "transfer", XYXFER, 0, "window", XYWIND, 0, "xfer", XYXFER, CM_INV};int nrms = (sizeof(rmstab) / sizeof(struct keytab));struct keytab attrtab[] = {#ifdef STRATUS "account", AT_ACCT, 0,#endif /* STRATUS */ "all", AT_XALL, 0,#ifdef COMMENT "blocksize", AT_BLKS, 0, /* (not used) */#endif /* COMMENT */#ifndef NOCSETS "character-set", AT_ENCO, 0,#endif /* NOCSETS */#ifdef STRATUS "creator", AT_CREA, 0,#endif /* STRATUS */ "date", AT_DATE, 0, "disposition", AT_DISP, 0, "encoding", AT_ENCO, CM_INV,#ifdef STRATUS "format", AT_RECF, 0,#endif /* STRATUS */ "length", AT_LENK, 0, "off", AT_ALLN, 0, "on", AT_ALLY, 0,#ifdef COMMENT "os-specific", AT_SYSP, 0, /* (not used by UNIX or VMS) */#endif /* COMMENT */#ifdef CK_PERMS "protection", AT_LPRO, 0, "permissions", AT_LPRO, CM_INV,#endif /* CK_PERMS */ "system-id", AT_SYSI, 0, "type", AT_FTYP, 0};int natr = (sizeof(attrtab) / sizeof(struct keytab)); /* how many attributes */#ifndef NOSPLextern int indef, inecho, insilence, inbufsize, inautodl, inintr;extern char * inpbuf, * inpbp;#ifdef OS2extern int interm;#endif /* OS2 */struct keytab inptab[] = { /* SET INPUT parameters */#ifdef CK_AUTODL "autodownload", IN_ADL, 0,#endif /* CK_AUTODL */ "buffer-length", IN_BUF, 0, "cancellation", IN_CAN, 0, "case", IN_CAS, 0, "default-timeout", IN_DEF, CM_INV, /* There is no default timeout */ "echo", IN_ECH, 0,#ifdef OS2 "pacing", IN_PAC, CM_INV,#endif /* OS2 */ "silence", IN_SIL, 0,#ifdef OS2 "terminal", IN_TRM, 0,#endif /* OS2 */ "timeout-action", IN_TIM, 0};int ninp = (sizeof(inptab) / sizeof(struct keytab));struct keytab intimt[] = { /* SET INPUT TIMEOUT parameters */ "proceed", 0, 0, /* 0 = proceed */ "quit", 1, 0 /* 1 = quit */};struct keytab incast[] = { /* SET INPUT CASE parameters */ "ignore", 0, 0, /* 0 = ignore */ "observe", 1, 0 /* 1 = observe */};#endif /* NOSPL */struct keytab nabltab[] = { /* For any command that needs */ "disabled", 0, 0, "enabled", 1, 0, "off", 0, CM_INV, /* these keywords... */ "on", 1, CM_INV};int nnabltab = sizeof(nabltab) / sizeof(struct keytab);#ifdef OS2struct keytab tvctab[] = { /* SET TERM VIDEO-CHANGE */ "disabled", TVC_DIS, 0, "enabled", TVC_ENA, 0#ifdef NT ,"win95-safe", TVC_W95, 0#endif /* NT */};int ntvctab = sizeof(tvctab) / sizeof(struct keytab);struct keytab msktab[] = { /* SET MS-DOS KERMIT compatibilities */#ifdef COMMENT "color", MSK_COLOR, 0,#endif /* COMMENT */ "keycodes", MSK_KEYS, 0};int nmsk = (sizeof(msktab) / sizeof(struct keytab));struct keytab scrnupd[] = { /* SET TERMINAL SCREEN-UPDATE */ "fast", TTU_FAST, 0, "smooth", TTU_SMOOTH, 0};int nscrnupd = (sizeof(scrnupd) / sizeof(struct keytab));struct keytab termfont[] = { /* SET TERMINAL FONT */#ifdef COMMENT "cp111", TTF_111, 0, "cp112", TTF_112, 0, "cp113", TTF_113, 0,#endif /* COMMENT */ "cp437", TTF_437, 0, "cp850", TTF_850, 0,#ifdef COMMENT "cp851", TTF_851, 0,#endif /* COMMENT */ "cp852", TTF_852, 0,#ifdef COMMENT "cp853", TTF_853, 0, "cp860", TTF_860, 0, "cp861", TTF_861, 0,#endif /* COMMENT */ "cp862", TTF_862, 0,#ifdef COMMENT "cp863", TTF_863, 0, "cp864", TTF_864, 0, "cp865", TTF_865, 0,#endif /* COMMENT */ "cp866", TTF_866, 0,#ifdef COMMENT "cp880", TTF_880, 0, "cp881", TTF_881, 0, "cp882", TTF_882, 0, "cp883", TTF_883, 0, "cp884", TTF_884, 0, "cp885", TTF_885, 0,#endif /* COMMENT */ "default", TTF_ROM, 0};int ntermfont = (sizeof(termfont) / sizeof(struct keytab));struct keytab anbktab[] = { /* For any command that needs */ "message", 2, 0, /* these keywords... */ "off", 0, 0, "on", 1, 0, "unsafe-messag0", 99, CM_INV, "unsafe-message", 3, CM_INV};int nansbk = (sizeof(anbktab) / sizeof(struct keytab));int win95_popup = 1;#ifdef NTint win95altgr = 0;#ifdef KUIint win95lucida = 0;#else /* KUI */int win95lucida = 1;#endif /* KUI */extern int win95selectbug;extern int win95_8_3;#ifdef COMMENTextern CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])(CHAR);extern struct keytab tcstab[];extern int ntcs;#endif /* COMMENT */extern int maxow, maxow_usr; owwait; /* Overlapped I/O variables */#endif /* NT */#endif /* OS2 *//* The following routines broken out of doprm() to give compilers a break. *//* S E T O N -- Parse on/off (default on), set parameter to result */intseton(prm) int *prm; { int x, y; if ((y = cmkey(onoff,2,"","on",xxstring)) < 0) return(y); if ((x = cmcfm()) < 0) return(x); *prm = y; return(1);}/* S E T O N A U T O -- Parse on/off/auto (default auto) & set result */struct keytab onoffaut[] = { "auto", SET_AUTO, 0, /* 2 */ "off", SET_OFF, 0, /* 0 */ "on", SET_ON, 0 /* 1 */};intsetonaut(prm) int *prm; { int x, y; if ((y = cmkey(onoffaut,3,"","auto",xxstring)) < 0) return(y); if ((x = cmcfm()) < 0) return(x); *prm = y; return(1);}/* S E T N U M -- Set parameter to result of cmnum() parse. *//* Call with pointer to integer variable to be set, x = number from cnum parse, y = return code from cmnum, max = maximum value to accept, -1 if no maximum. Returns -9 on failure, after printing a message, or 1 on success.*/intsetnum(prm,x,y,max) int x, y, *prm, max; { debug(F101,"setnum","",y); if (y == -3) { printf("\n?Value required\n"); return(-9); } if (y == -2) { printf("%s?Not a number: %s\n",cmflgs == 1 ? "" : "\n", atxbuf); return(-9); } if (y < 0) return(y); if (max > -1 && x > max) { printf("?Sorry, %d is the maximum\n",max); return(-9); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -