summaryrefslogtreecommitdiff
path: root/usr.bin/infocmp
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-03-11 21:08:11 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-03-11 21:08:11 +0000
commit640b9f688de759128da89029f54f793d30d6223c (patch)
tree18bcd910c121a9687562684c32cc1cd3ff639059 /usr.bin/infocmp
parenteab8b0ecfb1469caaf357d26cbe3e5ec524de182 (diff)
Add -G flag; ncurses-4.2-990306
Diffstat (limited to 'usr.bin/infocmp')
-rw-r--r--usr.bin/infocmp/infocmp.1tbl13
-rw-r--r--usr.bin/infocmp/infocmp.c15
2 files changed, 20 insertions, 8 deletions
diff --git a/usr.bin/infocmp/infocmp.1tbl b/usr.bin/infocmp/infocmp.1tbl
index 71a0fc577a9..26019b3ad85 100644
--- a/usr.bin/infocmp/infocmp.1tbl
+++ b/usr.bin/infocmp/infocmp.1tbl
@@ -1,5 +1,5 @@
'\" t
-.\" $OpenBSD: infocmp.1tbl,v 1.2 1999/01/22 04:56:00 millert Exp $
+.\" $OpenBSD: infocmp.1tbl,v 1.3 1999/03/11 21:08:07 millert Exp $
.\"
.\"***************************************************************************
.\" Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -29,14 +29,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $From: infocmp.1m,v 1.18 1998/11/29 01:13:31 Rick.Ohnemus Exp $
+.\" $From: infocmp.1m,v 1.20 1999/03/07 02:07:48 tom Exp $
.TH infocmp 1 ""
.ds n 5
.ds d /usr/share/terminfo
.SH NAME
\fBinfocmp\fR - compare or print out \fIterminfo\fR descriptions
.SH SYNOPSIS
-\fBinfocmp\fR [\fB-dcnpILCuV1\fR] [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR]
+\fBinfocmp\fR [\fB-dcGgnpILCuV1\fR] [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR]
.br
[\fB-w\fR \fIwidth\fR] [\fB-A\fR \fIdirectory\fR] [\fB-B\fR \fIdirectory\fR] [\fItermname\fR...]
.SH DESCRIPTION
@@ -214,6 +214,10 @@ entries, with two entries considered to match if any of their names do.
The report printed to standard output lists entries with no matches in
the other file, and entries with more than one match. For entries
with exactly one match it includes a difference report.
+.TP
+\fB-G\fR
+Display constant literals in decimal form
+rather than their character equivalents.
.TP 5
\fB-R\fR\fIsubset\fR
Restrict output to a given subset. This option is for use with archaic
@@ -315,6 +319,7 @@ Compiled terminal description database.
.SH EXTENSIONS
The
\fB-F\fR,
+\fB-G\fR,
\fB-R\fR,
\fB-T\fR,
\fB-e\fR,
@@ -332,6 +337,8 @@ Actual BSD curses versions will have a more restricted set. To see only the
\fBcurses\fR(3), \fBterminfo\fR(\*n).
.SH AUTHOR
Eric S. Raymond <esr@snark.thyrsus.com>
+and
+Thomas E. Dickey <dickey@clark.net>
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
diff --git a/usr.bin/infocmp/infocmp.c b/usr.bin/infocmp/infocmp.c
index cb5bf4b3034..074aaf3803b 100644
--- a/usr.bin/infocmp/infocmp.c
+++ b/usr.bin/infocmp/infocmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: infocmp.c,v 1.2 1999/03/02 06:23:56 millert Exp $ */
+/* $OpenBSD: infocmp.c,v 1.3 1999/03/11 21:08:07 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999 Free Software Foundation, Inc. *
@@ -44,7 +44,7 @@
#include <term_entry.h>
#include <dump_entry.h>
-MODULE_ID("$From: infocmp.c,v 1.40 1999/03/01 00:40:17 tom Exp $")
+MODULE_ID("$From: infocmp.c,v 1.41 1999/03/07 00:52:02 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
@@ -67,7 +67,7 @@ static TERMTYPE term[MAXTERMS]; /* terminfo entries */
static int termcount; /* count of terminal entries */
static const char *tversion; /* terminfo version selected */
-static bool numbers = TRUE; /* format "%'char'" to "%{number}" */
+static int numbers = 0; /* format "%'char'" to/from "%{number}" */
static int outform; /* output format */
static int sortmode; /* sort_mode */
static int itrace; /* trace flag for debugging */
@@ -804,6 +804,7 @@ static void usage(void)
," -d list different capabilities"
," -e format output as C initializer"
," -f with -1, format complex strings"
+ ," -G format %{number} to %'char'"
," -g format %'char' to %{number}"
," -i analyze initialization/reset"
," -l output terminfo names"
@@ -859,7 +860,7 @@ int main(int argc, char *argv[])
/* where is the terminfo database location going to default to? */
restdir = firstdir = 0;
- while ((c = getopt(argc, argv, "decCfFgIinlLprR:s:uv:Vw:A:B:1T")) != EOF)
+ while ((c = getopt(argc, argv, "decCfFGgIinlLprR:s:uv:Vw:A:B:1T")) != EOF)
switch (c)
{
case 'd':
@@ -885,8 +886,12 @@ int main(int argc, char *argv[])
formatted = TRUE;
break;
+ case 'G':
+ numbers = 1;
+ break;
+
case 'g':
- numbers = FALSE;
+ numbers = -1;
break;
case 'F':