diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2010-08-24 23:49:07 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2010-08-24 23:49:07 +0000 |
commit | e087583e1d5fc4be76015df58e5e66aab8552843 (patch) | |
tree | a1ba733e3d946ecd529ceb35c0e3295ee1064e73 /usr.bin/vis | |
parent | a5d341f248d1f222cade9d5ecff95f3f7b2d065b (diff) |
backout VIS_HEX. guenther@ points out that the C89 \xff encoding
idiotically accepts more then two hex digits following the \x, even
on platforms where a char has 8 bits. It is therefore dangerous to have
an almost-bit-not-quite compatible format in vis(3).
The VIS_ALL (encode all characters) option introduced in the same commit
remains.
Diffstat (limited to 'usr.bin/vis')
-rw-r--r-- | usr.bin/vis/vis.1 | 9 | ||||
-rw-r--r-- | usr.bin/vis/vis.c | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/usr.bin/vis/vis.1 b/usr.bin/vis/vis.1 index 9a0f223957e..1083d47b454 100644 --- a/usr.bin/vis/vis.1 +++ b/usr.bin/vis/vis.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: vis.1,v 1.14 2010/08/21 19:00:50 djm Exp $ +.\" $OpenBSD: vis.1,v 1.15 2010/08/24 23:49:06 djm Exp $ .\" $NetBSD: vis.1,v 1.5 1994/11/17 07:56:00 jtc Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 @@ -30,7 +30,7 @@ .\" .\" @(#)vis.1 8.4 (Berkeley) 4/19/94 .\" -.Dd $Mdocdate: August 21 2010 $ +.Dd $Mdocdate: August 24 2010 $ .Dt VIS 1 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd display non-printable characters in a visual format .Sh SYNOPSIS .Nm vis -.Op Fl abcfhlnostw +.Op Fl abcflnostw .Op Fl F Ar foldwidth .Op Ar .Sh DESCRIPTION @@ -91,9 +91,6 @@ typically don't work with partial lines. Like .Fl F , except output is always folded to 80 columns. -.It Fl h -Request a format which displays non-printable characters as -a hexadecimal number, \exdd. .It Fl l Mark newlines with the visible sequence .Ql \e$ , diff --git a/usr.bin/vis/vis.c b/usr.bin/vis/vis.c index e5c11265985..6e20ec9e6af 100644 --- a/usr.bin/vis/vis.c +++ b/usr.bin/vis/vis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vis.c,v 1.13 2010/08/21 19:00:50 djm Exp $ */ +/* $OpenBSD: vis.c,v 1.14 2010/08/24 23:49:06 djm Exp $ */ /* $NetBSD: vis.c,v 1.4 1994/12/20 16:13:03 jtc Exp $ */ /*- @@ -53,7 +53,7 @@ main(int argc, char *argv[]) FILE *fp; int ch; - while ((ch = getopt(argc, argv, "anwctshobfF:ld")) != -1) + while ((ch = getopt(argc, argv, "anwctsobfF:ld")) != -1) switch((char)ch) { case 'a': eflags |= VIS_ALL; @@ -73,9 +73,6 @@ main(int argc, char *argv[]) case 's': eflags |= VIS_SAFE; break; - case 'h': - eflags |= VIS_HEX; - break; case 'o': eflags |= VIS_OCTAL; break; @@ -175,7 +172,7 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s [-abcfhlnostw] [-F foldwidth] [file ...]\n", + fprintf(stderr, "usage: %s [-abcflnostw] [-F foldwidth] [file ...]\n", __progname); exit(1); } |