From owner-svn-src-head@freebsd.org Fri Jul 8 23:40:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2376B852A3; Fri, 8 Jul 2016 23:40:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56A2A1E04; Fri, 8 Jul 2016 23:40:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68NePpR023409; Fri, 8 Jul 2016 23:40:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68NeP1q023404; Fri, 8 Jul 2016 23:40:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607082340.u68NeP1q023404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 8 Jul 2016 23:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302473 - head/usr.bin/mkcsmapper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 23:40:26 -0000 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@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