summaryrefslogtreecommitdiff
path: root/usr.bin
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
parenteab8b0ecfb1469caaf357d26cbe3e5ec524de182 (diff)
Add -G flag; ncurses-4.2-990306
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/infocmp/infocmp.1tbl13
-rw-r--r--usr.bin/infocmp/infocmp.c15
-rw-r--r--usr.bin/tic/dump_entry.c8
-rw-r--r--usr.bin/tic/dump_entry.h6
-rw-r--r--usr.bin/tic/tic.19
-rw-r--r--usr.bin/tic/tic.c14
6 files changed, 43 insertions, 22 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':
diff --git a/usr.bin/tic/dump_entry.c b/usr.bin/tic/dump_entry.c
index 84a61b1cfaa..7d3e1090d6a 100644
--- a/usr.bin/tic/dump_entry.c
+++ b/usr.bin/tic/dump_entry.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump_entry.c,v 1.4 1999/03/02 06:23:55 millert Exp $ */
+/* $OpenBSD: dump_entry.c,v 1.5 1999/03/11 21:08:08 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999 Free Software Foundation, Inc. *
@@ -40,7 +40,7 @@
#include <termsort.c> /* this C file is generated */
#include <parametrized.h> /* so is this */
-MODULE_ID("$From: dump_entry.c,v 1.35 1999/03/02 01:23:01 tom Exp $")
+MODULE_ID("$From: dump_entry.c,v 1.36 1999/03/06 23:37:55 tom Exp $")
#define INDENT 8
@@ -466,7 +466,7 @@ int fmt_entry(TERMTYPE *tterm,
int (*pred)(int type, int idx),
bool suppress_untranslatable,
bool infodump,
- bool numbers)
+ int numbers)
{
int i, j;
char buffer[MAX_TERMINFO_LENGTH];
@@ -730,7 +730,7 @@ bool outcount = 0;
return(infodump ? len : termcap_length(outbuf));
}
-int dump_entry(TERMTYPE *tterm, bool limited, bool numbers, int (*pred)(int type, int idx))
+int dump_entry(TERMTYPE *tterm, bool limited, int numbers, int (*pred)(int type, int idx))
/* dump a single entry */
{
int len, critlen;
diff --git a/usr.bin/tic/dump_entry.h b/usr.bin/tic/dump_entry.h
index dffea03745e..b49634d248f 100644
--- a/usr.bin/tic/dump_entry.h
+++ b/usr.bin/tic/dump_entry.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump_entry.h,v 1.3 1999/03/02 06:23:55 millert Exp $ */
+/* $OpenBSD: dump_entry.h,v 1.4 1999/03/11 21:08:09 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999 Free Software Foundation, Inc. *
@@ -54,8 +54,8 @@
extern NCURSES_CONST char *nametrans(const char *);
extern void dump_init(const char *, int, int, int, int, bool);
-extern int fmt_entry(TERMTYPE *, int (*)(int, int), bool, bool, bool);
-extern int dump_entry(TERMTYPE *, bool, bool, int (*)(int, int));
+extern int fmt_entry(TERMTYPE *, int (*)(int, int), bool, bool, int);
+extern int dump_entry(TERMTYPE *, bool, int, int (*)(int, int));
extern int dump_uses(const char *, bool);
extern void compare_entry(void (*)(int, int, const char *), TERMTYPE *);
diff --git a/usr.bin/tic/tic.1 b/usr.bin/tic/tic.1
index 1559a0771d8..06000fdaa39 100644
--- a/usr.bin/tic/tic.1
+++ b/usr.bin/tic/tic.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tic.1,v 1.5 1999/03/03 00:42:16 millert Exp $
+.\" $OpenBSD: tic.1,v 1.6 1999/03/11 21:08:09 millert Exp $
.\"
.\"***************************************************************************
.\" Copyright (c) 1998,1999 Free Software Foundation, Inc. *
@@ -28,7 +28,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $From: tic.1m,v 1.24 1999/02/23 02:18:15 tom Exp $
+.\" $From: tic.1m,v 1.25 1999/03/07 02:07:06 tom Exp $
.TH tic 1 ""
.ds n 5
.ds d /usr/share/terminfo
@@ -106,6 +106,10 @@ names, but also translates terminfo strings to termcap format. Capabilities
that are not translatable are left in the entry under their terminfo names
but commented out with two preceding dots.
.TP
+\fB-G\fR
+Display constant literals in decimal form
+rather than their character equivalents.
+.TP
\fB-I\fR
Force source translation to terminfo format.
.TP
@@ -246,6 +250,7 @@ error messages, and can be parsed by GNU Emacs's compile facility.
The
\fB-o\fR,
+\fB-G\fR,
\fB-I\fR,
\fB-C\fR,
\fB-N\fR,
diff --git a/usr.bin/tic/tic.c b/usr.bin/tic/tic.c
index 5ae08f3d565..9fb56ae65a8 100644
--- a/usr.bin/tic/tic.c
+++ b/usr.bin/tic/tic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tic.c,v 1.7 1999/03/02 06:23:55 millert Exp $ */
+/* $OpenBSD: tic.c,v 1.8 1999/03/11 21:08:10 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999 Free Software Foundation, Inc. *
@@ -44,7 +44,7 @@
#include <dump_entry.h>
#include <term_entry.h>
-MODULE_ID("$From: tic.c,v 1.48 1999/03/01 00:26:51 tom Exp $")
+MODULE_ID("$From: tic.c,v 1.49 1999/03/07 01:21:14 tom Exp $")
const char *_nc_progname = "tic";
@@ -86,6 +86,7 @@ static void usage(void)
" -T remove size-restrictions on compiled description",
" -c check only, validate input without compiling or translating",
" -f format complex strings for readability",
+ " -G format %{number} to %'char'",
" -g format %'char' to %{number}",
" -e<names> translate/compile only entries named by comma-separated list",
" -o<dir> set output directory for compiled entry writes",
@@ -386,7 +387,7 @@ int sortmode = S_TERMINFO; /* sort_mode */
int fd;
int width = 60;
bool formatted = FALSE; /* reformat complex strings? */
-bool numbers = TRUE; /* format "%'char'" to "%{number}" */
+bool numbers = 0; /* format "%'char'" to/from "%{number}" */
bool infodump = FALSE; /* running as captoinfo? */
bool capdump = FALSE; /* running as infotocap? */
bool forceresolve = FALSE; /* force resolution */
@@ -415,7 +416,7 @@ bool check_only = FALSE;
* design decision to allow the numeric values for -w, -v options to
* be optional.
*/
- while ((this_opt = getopt(argc, argv, "0123456789CILNR:TVce:fgo:rsvwx")) != EOF) {
+ while ((this_opt = getopt(argc, argv, "0123456789CILNR:TVce:fGgo:rsvwx")) != -1) {
if (isdigit(this_opt)) {
switch (last_opt) {
case 'v':
@@ -469,8 +470,11 @@ bool check_only = FALSE;
case 'f':
formatted = TRUE;
break;
+ case 'G':
+ numbers = 1;
+ break;
case 'g':
- numbers = FALSE;
+ numbers = -1;
break;
case 'o':
outdir = optarg;