summaryrefslogtreecommitdiff
path: root/usr.bin/tic/tic.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tic/tic.c')
-rw-r--r--usr.bin/tic/tic.c14
1 files changed, 9 insertions, 5 deletions
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;