=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tic/tic.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/tic/tic.c 1999/03/02 06:23:55 1.7 +++ src/usr.bin/tic/tic.c 1999/03/11 21:08:10 1.8 @@ -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 #include -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 @@ " -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 translate/compile only entries named by comma-separated list", " -o set output directory for compiled entry writes", @@ -386,7 +387,7 @@ 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 @@ * 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 @@ case 'f': formatted = TRUE; break; + case 'G': + numbers = 1; + break; case 'g': - numbers = FALSE; + numbers = -1; break; case 'o': outdir = optarg;