Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/vis Add -h to enable VIS_HTTPSTYLE.



details:   https://anonhg.NetBSD.org/src/rev/057ea75c5f14
branches:  trunk
changeset: 565871:057ea75c5f14
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Apr 22 06:35:02 2004 +0000

description:
Add -h to enable VIS_HTTPSTYLE.
Reorder getopt & usage strings to be alphabetical to match man page.

diffstat:

 usr.bin/vis/vis.1 |   9 ++++++---
 usr.bin/vis/vis.c |  11 +++++++----
 2 files changed, 13 insertions(+), 7 deletions(-)

diffs (83 lines):

diff -r 7ec576467f7f -r 057ea75c5f14 usr.bin/vis/vis.1
--- a/usr.bin/vis/vis.1 Thu Apr 22 06:11:38 2004 +0000
+++ b/usr.bin/vis/vis.1 Thu Apr 22 06:35:02 2004 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: vis.1,v 1.11 2003/08/07 11:17:09 agc Exp $
+.\"    $NetBSD: vis.1,v 1.12 2004/04/22 06:35:02 lukem Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)vis.1      8.4 (Berkeley) 4/19/94
 .\"
-.Dd December 23, 2002
+.Dd April 22, 2004
 .Dt VIS 1
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd display non-printable characters in a visual format
 .Sh SYNOPSIS
 .Nm
-.Op Fl cbflnostw
+.Op Fl bcfhlnostw
 .Op Fl e Ar extra
 .Op Fl F Ar foldwidth
 .Op Ar file ...
@@ -92,6 +92,9 @@
 .It Fl f
 Same as
 .Fl F .
+.It Fl h
+Encode using the URI encoding from RFC 1808.
+.Pq Dv VIS_WHITE
 .It Fl l
 Mark newlines with the visible sequence
 .Ql \e$ ,
diff -r 7ec576467f7f -r 057ea75c5f14 usr.bin/vis/vis.c
--- a/usr.bin/vis/vis.c Thu Apr 22 06:11:38 2004 +0000
+++ b/usr.bin/vis/vis.c Thu Apr 22 06:35:02 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vis.c,v 1.9 2004/01/05 23:23:37 jmmv Exp $     */
+/*     $NetBSD: vis.c,v 1.10 2004/04/22 06:35:02 lukem Exp $   */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)vis.c      8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: vis.c,v 1.9 2004/01/05 23:23:37 jmmv Exp $");
+__RCSID("$NetBSD: vis.c,v 1.10 2004/04/22 06:35:02 lukem Exp $");
 #endif /* not lint */
 
 #include <stdio.h>
@@ -65,7 +65,7 @@
        int ch;
        int rval;
 
-       while ((ch = getopt(argc, argv, "nwctsobe:fF:ld")) != -1)
+       while ((ch = getopt(argc, argv, "bcfhlnostwe:F:d")) != -1)
                switch((char)ch) {
                case 'n':
                        none++;
@@ -85,6 +85,9 @@
                case 'o':
                        eflags |= VIS_OCTAL;
                        break;
+               case 'h':
+                       eflags |= VIS_HTTPSTYLE;
+                       break;
                case 'b':
                        eflags |= VIS_NOSLASH;
                        break;
@@ -111,7 +114,7 @@
                case '?':
                default:
                        fprintf(stderr, 
-                   "usage: vis [-nwctsobf] [-e extra] [-F foldwidth]\n");
+                   "usage: vis [-bcfhlnostw] [-e extra] [-F foldwidth]\n");
                        exit(1);
                }
        argc -= optind;



Home | Main Index | Thread Index | Old Index