svn commit: r302473 - head/usr.bin/mkcsmapper

Baptiste Daroussin bapt at FreeBSD.org
Fri Jul 8 23:40:26 UTC 2016


Author: bapt
Date: Fri Jul  8 23:40:25 2016
New Revision: 302473
URL: https://svnweb.freebsd.org/changeset/base/302473

Log:
  Sync usage between program and man page. Increase column width. [1]
  Simplifay the usage() function
  Replace errx/strerror with errc
  
  Submitted by:	wiz at NetBSD.org [1]
  Obtained from:	NetBSD

Modified:
  head/usr.bin/mkcsmapper/mkcsmapper.1
  head/usr.bin/mkcsmapper/yacc.y

Modified: head/usr.bin/mkcsmapper/mkcsmapper.1
==============================================================================
--- head/usr.bin/mkcsmapper/mkcsmapper.1	Fri Jul  8 23:38:25 2016	(r302472)
+++ head/usr.bin/mkcsmapper/mkcsmapper.1	Fri Jul  8 23:40:25 2016	(r302473)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 6, 2009
+.Dd July 9, 2016
 .Dt MKCSMAPPER 1
 .Os
 .Sh NAME
@@ -43,9 +43,10 @@
 .Xr iconv 3
 .Sh SYNOPSIS
 .Nm
-.Op Fl dmp
-.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
@@ -59,7 +60,7 @@ A pivot file, which the possible source 
 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

Modified: head/usr.bin/mkcsmapper/yacc.y
==============================================================================
--- head/usr.bin/mkcsmapper/yacc.y	Fri Jul  8 23:38:25 2016	(r302472)
+++ head/usr.bin/mkcsmapper/yacc.y	Fri Jul  8 23:40:25 2016	(r302473)
@@ -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


More information about the svn-src-head mailing list