Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/fmt add -w as an alias to -m
details: https://anonhg.NetBSD.org/src/rev/cdb0d30adf7e
branches: trunk
changeset: 779947:cdb0d30adf7e
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 30 21:31:15 2012 +0000
description:
add -w as an alias to -m
diffstat:
usr.bin/fmt/fmt.1 | 7 +++++--
usr.bin/fmt/fmt.c | 9 +++++----
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (79 lines):
diff -r 739030d9288b -r cdb0d30adf7e usr.bin/fmt/fmt.1
--- a/usr.bin/fmt/fmt.1 Sat Jun 30 15:34:01 2012 +0000
+++ b/usr.bin/fmt/fmt.1 Sat Jun 30 21:31:15 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: fmt.1,v 1.12 2009/03/10 20:23:47 joerg Exp $
+.\" $NetBSD: fmt.1,v 1.13 2012/06/30 21:31:15 christos Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)fmt.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd May 29, 2007
+.Dd June 31, 2012
.Dt FMT 1
.Os
.Sh NAME
@@ -47,6 +47,7 @@
.Op Fl Cr
.Op Fl g Ar goal
.Op Fl m Ar maximum
+.Op Fl w Ar maximum
.Op name ...
.Sh DESCRIPTION
.Nm
@@ -75,6 +76,8 @@
New way to set the goal length.
.It Fl m Ar maximum
New way to set the maximum length.
+.It Fl w Ar maximum
+New way to set the maximum length.
.It Fl r
Raw mode; formats all lines and does not make exceptions for lines
that start with a period or look like mail headers.
diff -r 739030d9288b -r cdb0d30adf7e usr.bin/fmt/fmt.c
--- a/usr.bin/fmt/fmt.c Sat Jun 30 15:34:01 2012 +0000
+++ b/usr.bin/fmt/fmt.c Sat Jun 30 21:31:15 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fmt.c,v 1.31 2008/07/21 14:19:22 lukem Exp $ */
+/* $NetBSD: fmt.c,v 1.32 2012/06/30 21:31:15 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)fmt.c 8.1 (Berkeley) 7/20/93";
#endif
-__RCSID("$NetBSD: fmt.c,v 1.31 2008/07/21 14:19:22 lukem Exp $");
+__RCSID("$NetBSD: fmt.c,v 1.32 2012/06/30 21:31:15 christos Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -113,7 +113,7 @@
setprogname(*argv);
(void)setlocale(LC_ALL, "");
- while ((c = getopt(argc, argv, "Cg:m:r")) != -1)
+ while ((c = getopt(argc, argv, "Cg:m:rw:")) != -1)
switch (c) {
case 'C':
center++;
@@ -123,6 +123,7 @@
compat = 0;
break;
case 'm':
+ case 'w':
(void)getnum(optarg, "max", &max_length, 1);
compat = 0;
break;
@@ -175,7 +176,7 @@
usage(void)
{
(void)fprintf(stderr,
- "Usage: %s [-Cr] [-g <goal>] [-m <max>] [<files>..]\n"
+ "Usage: %s [-Cr] [-g <goal>] [-m|w <max>] [<files>..]\n"
"\t %s [-Cr] [<goal>] [<max>] [<files>]\n",
getprogname(), getprogname());
exit(1);
Home |
Main Index |
Thread Index |
Old Index