SCCS-vsn: local/local.cmd/showtc.c 1.6
-static char *sccsid="@(#)showtc.c 1.5 (Berkeley) %G%";
+static char *sccsid="@(#)showtc.c 1.6 (Berkeley) %G%";
** -D look for duplicate names and print termcap file
** -S sort entries before display
** -T trace (-DDEBUG only)
** -D look for duplicate names and print termcap file
** -S sort entries before display
** -T trace (-DDEBUG only)
+** -U print unknown capabilities
** -b show bare entries
** -d -D and stop
** -f following arg is FULL PATHNAME of termcap file
** -b show bare entries
** -d -D and stop
** -f following arg is FULL PATHNAME of termcap file
long file_pos;
} tcNames[NOENTRIES];
long file_pos;
} tcNames[NOENTRIES];
"am", "Has automatic margins",
"as", "Start alternate character set",
"bc", "Backspace if not ^H",
"am", "Has automatic margins",
"as", "Start alternate character set",
"bc", "Backspace if not ^H",
"bs", "Can backspace with ^H",
"bt", "Back tab",
"bw", "Backspace wraps from col 0 to last col",
"bs", "Can backspace with ^H",
"bt", "Back tab",
"bw", "Backspace wraps from col 0 to last col",
"kr", "Sent by right arrow key",
"ks", "Put in \"keypad transmit\" mode",
"ku", "Sent by up arrow key",
"kr", "Sent by right arrow key",
"ks", "Put in \"keypad transmit\" mode",
"ku", "Sent by up arrow key",
"li", "Number of lines on screen or page",
"ll", "Last line, first column (if no cm)",
"ma", "Arrow key map, used by vi V2 only",
"li", "Number of lines on screen or page",
"ll", "Last line, first column (if no cm)",
"ma", "Arrow key map, used by vi V2 only",
+ "mb", "Enter blinking mode",
+ "md", "Enter bold mode",
+ "me", "Reset video attributes",
+ "mh", "Enter halfbright mode",
"mi", "Safe to move while in insert mode",
"mi", "Safe to move while in insert mode",
+ "mk", "Enter protected mode",
"ml", "Memory lock on above cursor.",
"ml", "Memory lock on above cursor.",
+ "mr", "Enter reverse video mode",
"ms", "Ok to move while in standout/underline mode",
"mu", "Memory unlock (turn off memory lock).",
"nc", "No working CR (DM2500,H2000)",
"ms", "Ok to move while in standout/underline mode",
"mu", "Memory unlock (turn off memory lock).",
"nc", "No working CR (DM2500,H2000)",
int nflag = NO;
int gflag = NO;
int bflag = NO;
int nflag = NO;
int gflag = NO;
int bflag = NO;
int tc_loopc; /* loop counter */
char *tcfile; /* termcap database pathname */
char tcbuf[1024]; /* buffer for termcap description */
int tc_loopc; /* loop counter */
char *tcfile; /* termcap database pathname */
char tcbuf[1024]; /* buffer for termcap description */
+ case 'U':
+ Uflag = YES;
+ continue;
+
/* strip the two name off */
case 's':
sflag = YES;
/* strip the two name off */
case 's':
sflag = YES;
printf("%s\n", name);
for (cp = caps; *cp; cp++)
printf("%s\n", name);
for (cp = caps; *cp; cp++)
+ if (Uflag) {
+ if (unknowncap(*cp)) {
+ printf("%3.3s\n", *cp);
+ }
+ } else if (sflag) {
printf("%-45s %s\n", getdesc(*cp), *cp);
printf("%-45s %s\n", getdesc(*cp), *cp);
printf("%2.2s %-45s %s\n", name, getdesc(*cp), *cp);
}
(void) putchar('\n');
printf("%2.2s %-45s %s\n", name, getdesc(*cp), *cp);
}
(void) putchar('\n');
return (capList[i].desc);
return("");
}
return (capList[i].desc);
return("");
}
+
+unknowncap(key)
+ char *key;
+{
+ register int i;
+
+ for (i = 0; i <= NOCAPS; i++)
+ if (strncmp(key, capList[i].cap, 2) == 0)
+ return (0);
+ return(1);
+}