summaryrefslogtreecommitdiff
path: root/usr.bin/vis/vis.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-08-21 19:00:51 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-08-21 19:00:51 +0000
commit5044f1e98f79891c7f32b935aa073a751116b7fc (patch)
tree767208587d02fd45df1f4ea51f48ca9fdca4ff59 /usr.bin/vis/vis.c
parent20b28aebdc9d72f6cff9b47e4a228afbd3d67834 (diff)
mirror new flags to vis(3): -a to encode all characters, -h to use
hex encoding. feedback jmc@ ok millert@
Diffstat (limited to 'usr.bin/vis/vis.c')
-rw-r--r--usr.bin/vis/vis.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/vis/vis.c b/usr.bin/vis/vis.c
index e6ad55f64a4..e5c11265985 100644
--- a/usr.bin/vis/vis.c
+++ b/usr.bin/vis/vis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vis.c,v 1.12 2009/10/27 23:59:49 deraadt Exp $ */
+/* $OpenBSD: vis.c,v 1.13 2010/08/21 19:00:50 djm Exp $ */
/* $NetBSD: vis.c,v 1.4 1994/12/20 16:13:03 jtc Exp $ */
/*-
@@ -53,8 +53,11 @@ main(int argc, char *argv[])
FILE *fp;
int ch;
- while ((ch = getopt(argc, argv, "nwctsobfF:ld")) != -1)
+ while ((ch = getopt(argc, argv, "anwctshobfF:ld")) != -1)
switch((char)ch) {
+ case 'a':
+ eflags |= VIS_ALL;
+ break;
case 'n':
none++;
break;
@@ -70,6 +73,9 @@ main(int argc, char *argv[])
case 's':
eflags |= VIS_SAFE;
break;
+ case 'h':
+ eflags |= VIS_HEX;
+ break;
case 'o':
eflags |= VIS_OCTAL;
break;
@@ -169,7 +175,7 @@ usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-bcflnostw] [-F foldwidth] [file ...]\n",
+ fprintf(stderr, "usage: %s [-abcfhlnostw] [-F foldwidth] [file ...]\n",
__progname);
exit(1);
}