📄 ckuus5.c
字号:
#endif /* SVR3 */#ifdef SVR4 prtopt(" SVR4");#endif /* SVR4 */#ifdef DELL_SVR4 prtopt(" DELL_SVR4");#endif /* DELL_SVR4 */#ifdef ICL_SVR4 prtopt(" ICL_SVR4");#endif /* ICL_SVR4 */#ifdef OSF prtopt(" OSF");#endif /* OSF */#ifdef PTX prtopt(" PTX");#endif /* PTX */#ifdef POSIX prtopt(" POSIX");#endif /* POSIX */#ifdef SOLARIS prtopt(" SOLARIS");#endif /* SOLARIS */#ifdef SUNOS4 prtopt(" SUNOS4");#endif /* SUNOS4 */#ifdef SUN4S5 prtopt(" SUN4S5");#endif /* SUN4S5 */#ifdef ENCORE prtopt(" ENCORE");#endif /* ENCORE */#ifdef ultrix prtopt(" ultrix");#endif#ifdef sxaE50 prtopt(" sxaE50");#endif#ifdef mips prtopt(" mips");#endif#ifdef MIPS prtopt(" MIPS");#endif#ifdef vax prtopt(" vax");#endif#ifdef VAX prtopt(" VAX");#endif#ifdef sun prtopt(" sun");#endif#ifdef sun3 prtopt(" sun3");#endif#ifdef sun386 prtopt(" sun386");#endif#ifdef _SUN prtopt(" _SUN");#endif#ifdef sun4 prtopt(" sun4");#endif#ifdef sparc prtopt(" sparc");#endif#ifdef NEXT prtopt(" NEXT");#endif#ifdef NeXT prtopt(" NeXT");#endif#ifdef sgi prtopt(" sgi");#endif#ifdef M_SYS5 prtopt(" M_SYS5");#endif#ifdef __SYSTEM_FIVE prtopt(" __SYSTEM_FIVE");#endif#ifdef sysV prtopt(" sysV");#endif#ifdef M_XENIX /* SCO Xenix V and UNIX/386 */ prtopt(" M_XENIX");#endif #ifdef M_UNIX prtopt(" M_UNIX");#endif#ifdef M_I386 prtopt(" M_I386");#endif#ifdef _M_I386 prtopt(" _M_I386");#endif#ifdef i386 prtopt(" i386");#endif#ifdef i286 prtopt(" i286");#endif#ifdef M_I286 prtopt(" M_I286");#endif#ifdef mc68000 prtopt(" mc68000");#endif#ifdef mc68010 prtopt(" mc68010");#endif#ifdef mc68020 prtopt(" mc68020");#endif#ifdef mc68030 prtopt(" mc68030");#endif#ifdef mc68040 prtopt(" mc68040");#endif#ifdef M_68000 prtopt(" M_68000");#endif#ifdef M_68010 prtopt(" M_68010");#endif#ifdef M_68020 prtopt(" M_68020");#endif#ifdef M_68030 prtopt(" M_68030");#endif#ifdef M_68040 prtopt(" M_68040");#endif#ifdef m68k prtopt(" m68k");#endif#ifdef m88k prtopt(" m88k");#endif#ifdef pdp11 prtopt(" pdp11");#endif#ifdef iAPX prtopt(" iAPX");#endif#ifdef __hp9000s800 prtopt(" __hp9000s800");#endif#ifdef __hp9000s500 prtopt(" __hp9000s500");#endif#ifdef __hp9000s300 prtopt(" __hp9000s300");#endif#ifdef __hp9000s200 prtopt(" __hp9000s200");#endif#ifdef AIX prtopt(" AIX");#endif#ifdef _AIXFS prtopt(" _AIXFS");#endif#ifdef u370 prtopt(" u370");#endif#ifdef u3b prtopt(" u3b");#endif#ifdef u3b2 prtopt(" u3b2");#endif#ifdef multimax prtopt(" multimax");#endif#ifdef balance prtopt(" balance");#endif#ifdef ibmrt prtopt(" ibmrt");#endif#ifdef _IBMRT prtopt(" _IBMRT");#endif#ifdef ibmrs6000 prtopt(" ibmrs6000");#endif#ifdef _AIX prtopt(" _AIX");#endif /* _AIX */#ifdef _IBMR2 prtopt(" _IBMR2");#endif#ifdef __STRICT_BSD__ prtopt(" __STRICT_BSD__");#endif#ifdef __STRICT_ANSI__ prtopt(" __STRICT_ANSI__");#endif#ifdef _ANSI_C_SOURCE prtopt(" _ANSI_C_SOURCE");#endif#ifdef __STDC__ prtopt(" __STDC__");#endif#ifdef __GNUC__ /* gcc in ansi mode */ prtopt(" __GNUC__");#endif#ifdef GNUC /* gcc in traditional mode */ prtopt(" GNUC");#endif#ifdef CK_ANSIC prtopt(" CK_ANSIC");#endif#ifdef CK_ANSILIBS prtopt(" CK_ANSILIBS");#endif#ifdef _XOPEN_SOURCE prtopt(" _XOPEN_SOURCE");#endif#ifdef _ALL_SOURCE prtopt(" _ALL_SOURCE");#endif#ifdef _SC_JOB_CONTROL prtopt(" _SC_JOB_CONTROL");#endif#ifdef _POSIX_JOB_CONTROL prtopt(" _POSIX_JOB_CONTROL");#endif#ifdef SVR3JC prtopt(" SVR3JC");#endif#ifdef _386BSD prtopt(" _386BSD");#endif#ifdef _BSD prtopt(" _BSD");#endif#ifdef TERMIOX prtopt(" TERMIOX");#endif /* TERMIOX */#ifdef STERMIOX prtopt(" STERMIOX");#endif /* STERMIOX */#ifdef CK_CURSES prtopt(" CK_CURSES");#endif /* CK_CURSES */#ifdef CK_DTRCD prtopt(" CK_DTRCD");#endif /* CK_DTRCD */#ifdef CK_DTRCTS prtopt(" CK_DTRCTS");#endif /* CK_DTRCTS */#ifdef CK_RTSCTS prtopt(" CK_RTSCTS");#endif /* CK_RTSCTS */ prtopt((char *)0); printf("\n\n");}#endif /* NOFRILLS */#endif /* NOSHOW */#ifdef VMSintsholbl() { printf("VMS Labeled File Features:\n"); printf(" acl %s (ACL info %s)\n", lf_opts & LBL_ACL ? "on " : "off", lf_opts & LBL_ACL ? "preserved" : "discarded"); printf(" backup-date %s (backup date/time %s)\n", lf_opts & LBL_BCK ? "on " : "off", lf_opts & LBL_BCK ? "preserved" : "discarded"); printf(" name %s (original filename %s)\n", lf_opts & LBL_NAM ? "on " : "off", lf_opts & LBL_NAM ? "preserved" : "discarded"); printf(" owner %s (original file owner id %s)\n", lf_opts & LBL_OWN ? "on " : "off", lf_opts & LBL_OWN ? "preserved" : "discarded"); printf(" path %s (original file's disk:[directory] %s)\n", lf_opts & LBL_PTH ? "on " : "off", lf_opts & LBL_PTH ? "preserved" : "discarded");}#endif /* VMS */#ifndef NOSHOWVOIDshotcs(cs1,cs2) int cs1, cs2; { /* Show terminal character set */#ifndef NOCSETS#ifndef MAC int y; char *s;#ifdef CK_ANSIC int gettcs(int, int);#else int gettcs();#endif /* CK_ANSIC */ printf(" Terminal character-set"); if (cs1 == cs2) { printf(": transparent\n"); } else { s = "unknown"; for (y = 0; y <= nfilc; y++) /* Look up name in keyword table */ if (ttcstab[y].kwval == cs2) { if (ttcstab[y].flgs & CM_INV) /* Skip synonyms */ continue; s = ttcstab[y].kwd; break; } printf("s:\n Remote: %s\n Local: ",s); s = "unknown"; for (y = 0; y <= nfilc; y++) if (ttcstab[y].kwval == cs1) { if (ttcstab[y].flgs & CM_INV) /* Skip synonyms */ continue; s = ttcstab[y].kwd; break; } printf("%s",s); if (cs2 != cs1) { switch(gettcs(cs2,cs1)) { case TC_USASCII: s = "ascii"; break; case TC_1LATIN: s = "latin1-iso"; break; case TC_2LATIN: s = "latin2-iso"; break; case TC_CYRILL: s = "cyrillic-iso"; break; case TC_JEUC: s = "japanese-euc"; break; default: s = "transparent"; break; } printf("\n Via: %s\n",s); } }#endif /* MAC */#endif /* NOCSETS */}#endif /* NOSHOW */#ifndef NOSHOWintdoshow(x) int x; { int y, i; long zz; char *s;#ifndef NOSETKEY if (x == SHKEY) { /* SHOW KEY */ int c; KEY ch; CHAR *s; if ((y = cmcfm()) < 0) return(y); #ifdef MAC printf("Not implemented\n"); return(0);#else /* Not MAC */ printf(" Press key: ");#ifdef UNIX#ifdef NOSETBUF fflush(stdout);#endif /* NOSETBUF */#endif /* UNIX */ conbin((char)escape); /* Put terminal in binary mode */ c = congks(0); /* Get character or scan code */ concb((char)escape); /* Restore terminal to cbreak mode */ if (c < 0) { /* Check for error */ printf("?Error reading key\n"); return(0); }#ifndef OS2/* Do NOT mask when it can be a raw scan code, perhaps > 255*/ c &= cmdmsk; /* Apply command mask */#endif /* OS2 */ printf("\n Key code \\%d => ",c); if (macrotab[c]) { /* See if there's a macro */ printf("String: "); /* If so, display its definition */ s = macrotab[c]; while (ch = *s++) if (ch < 32 || ch == 127/* Systems whose native character sets have graphic characters in C1...*/#ifndef NEXT /* NeXT */#ifndef AUX /* Macintosh */#ifndef XENIX /* IBM PC */#ifndef OS2 /* IBM PC */ || (ch > 127 && ch < 160)#endif /* OS2 */#endif /* XENIX */#endif /* AUX */#endif /* NEXT */ ) printf("\\{%d}",ch); /* Display control characters */ else putchar((char) ch); /* in backslash notation */ printf("\n"); } else { /* No macro, show single character */ printf("Character: "); ch = keymap[c]; if (ch < 32 || ch == 127 || ch > 255#ifndef NEXT#ifndef AUX#ifndef XENIX#ifndef OS2 || (ch > 127 && ch < 160)#endif /* OS2 */#endif /* XENIX */#endif /* AUX */#endif /* NEXT */ ) printf("\\%d",(unsigned int) ch); else printf("%c \\%d",ch,(unsigned int) ch); } if (ch == (KEY) c) printf(" (self, no translation)\n"); else printf("\n"); return(1);#endif /* MAC */ }#endif /* NOSETKEY */#ifndef NOSPL if (x == SHMAC) { /* SHOW MACRO */ x = cmfld("Macro name, or carriage return to see them all","",&s, NULL); if (x == -3) /* This means they want see all */ *line = '\0'; else if (x < 0) /* Otherwise negative = parse error */ return(x); else /* 0 or greater */ strcpy(line,s); /* means they typed something */ if ((y = cmcfm()) < 0) return(y); /* Get confirmation */ if (*line) { slc = 0; /* Initial SHO MAC line number */ x = mlook(mactab,s,nmac); /* Look up what they typed */ switch (x) { case -3: /* Nothing to look up */ return(0); case -1: /* Not found */ printf("%s - not found\n",s); return(0); case -2: /* Ambiguous, matches more than one */ y = (int)strlen(line); slc = 1; for (x = 0; x < nmac; x++) if (!strncmp(mactab[x].kwd,line,y)) if (shomac(mactab[x].kwd,mactab[x].mval) < 0) break; return(1); default: /* Matches one exactly */ shomac(mactab[x].kwd,mactab[x].mval); return(1); } } else { /* They want to see them all */ printf("Macros:\n"); slc = 1; for (y = 0; y < nmac; y++) if (shomac(mactab[y].kwd,mactab[y].mval) < 0) break; return(1); } }#endif /* NOSPL *//* Other SHOW commands only have two fields. Get command confirmation here, then handle with big switch() statement.*/ if ((y = cmcfm()) < 0) return(y); switch (x) {#ifdef SUNX25 case SHPAD: shopad(); break;#endif /* SUNX25 */#ifdef NETCONN case SHNET: shonet(); break;#endif /* NETCONN */ case SHPAR: shopar(); break; case SHATT: shoatt(); break; #ifndef NOSPL case SHCOU: printf(" %d\n",count[cmdlvl]); break;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -