summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2016-10-22 20:54:54 +0000
committerbapt <bapt@FreeBSD.org>2016-10-22 20:54:54 +0000
commit0bab3cb8f3a9de92e3773fe74ff183e2884569f4 (patch)
treefe31507fb77248f9b60b1a02a49f083da9827d8d /usr.bin
parent9ebe6424aec04f6aba565e0ce02f659e9029d524 (diff)
downloadFreeBSD-src-0bab3cb8f3a9de92e3773fe74ff183e2884569f4.zip
FreeBSD-src-0bab3cb8f3a9de92e3773fe74ff183e2884569f4.tar.gz
MFC r302471, r302473:
r302471: Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd. Submitted by: wiz@NetBSD.org Obtained from: NetBSD r302473: Sync usage between program and man page. Increase column width. [1] Simplifay the usage() function Replace errx/strerror with errc Submitted by: wiz@NetBSD.org [1] Obtained from: NetBSD
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mkcsmapper/mkcsmapper.115
-rw-r--r--usr.bin/mkcsmapper/yacc.y13
2 files changed, 13 insertions, 15 deletions
diff --git a/usr.bin/mkcsmapper/mkcsmapper.1 b/usr.bin/mkcsmapper/mkcsmapper.1
index 8faf5e6..ede990e 100644
--- a/usr.bin/mkcsmapper/mkcsmapper.1
+++ b/usr.bin/mkcsmapper/mkcsmapper.1
@@ -34,7 +34,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd Sep 6, 2009
+.Dd July 9, 2016
.Dt MKCSMAPPER 1
.Os
.Sh NAME
@@ -43,10 +43,10 @@
.Xr iconv 3
.Sh SYNOPSIS
.Nm
-.Op Fl mpd
-.Fl o
-.Ar outfile
-.Ar infile
+.Op Fl d
+.Op Fl m | Fl p
+.Op Fl o Ar outfile
+.Op Ar infile
.Sh DESCRIPTION
The
.Nm
@@ -60,7 +60,7 @@ A pivot file, which the possible source and destination encoding
pairs or the set of mappings to use for a compound encoding.
.Pp
The following options are available:
-.Bl -tag -width 0123
+.Bl -tag -width XoXoutfileXX
.It Fl d
Turns on debug mode.
.It Fl m
@@ -82,7 +82,8 @@ Generate pivot data from
.Sh HISTORY
.Nm
first appeared in
-.Nx 2.0 , and made its appearance in
+.Nx 2.0 ,
+and made its appearance in
.Fx 9.0 .
.Sh AUTHORS
This manual page was written by
diff --git a/usr.bin/mkcsmapper/yacc.y b/usr.bin/mkcsmapper/yacc.y
index 18497ce..97aade1 100644
--- a/usr.bin/mkcsmapper/yacc.y
+++ b/usr.bin/mkcsmapper/yacc.y
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
-/* $NetBSD: yacc.y,v 1.7 2006/09/09 14:35:17 tnozaki Exp $ */
+/* $NetBSD: yacc.y,v 1.11 2016/06/28 09:22:16 wiz Exp $ */
%{
/*-
@@ -664,18 +664,15 @@ do_mkpv(FILE *in)
if (ret && output)
unlink(output); /* dump failure */
if (ret)
- errx(EXIT_FAILURE, "%s\n", strerror(ret));
+ errc(EXIT_FAILURE, ret, "");
}
static void
usage(void)
{
- warnx("usage: \n"
- "\t%s [-d] [-o outfile] [infile]\n"
- "\t%s -m [-d] [-o outfile] [infile]\n"
- "\t%s -p [-d] [-o outfile] [infile]\n",
- getprogname(), getprogname(), getprogname());
- exit(1);
+ fprintf(stderr, "Usage: %s [-d] [-m|-p] [-o outfile] [infile]\n",
+ getprogname());
+ exit(EXIT_FAILURE);
}
int
OpenPOWER on IntegriCloud