From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 16:16:30 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26DFF105; Sat, 17 Nov 2012 16:16:30 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE4A8FC13; Sat, 17 Nov 2012 16:16:29 +0000 (UTC) Received: from meatwad.mouf.net (cpe-024-162-230-236.nc.res.rr.com [24.162.230.236]) (authenticated bits=0) by mouf.net (8.14.5/8.14.5) with ESMTP id qAHGGJ5f040629 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Sat, 17 Nov 2012 11:16:24 -0500 (EST) (envelope-from swills@FreeBSD.org) Message-ID: <50A7B84B.5080909@FreeBSD.org> Date: Sat, 17 Nov 2012 11:16:11 -0500 From: Steve Wills User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121110 Thunderbird/16.0.2 MIME-Version: 1.0 To: Greg Lehey Subject: Re: svn commit: r242743 - head/usr.bin/locale References: <201211080255.qA82tUQc088806@svn.freebsd.org> In-Reply-To: <201211080255.qA82tUQc088806@svn.freebsd.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mouf.net [199.48.129.64]); Sat, 17 Nov 2012 11:16:25 -0500 (EST) X-Spam-Status: No, score=0.0 required=4.5 tests=none autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mouf.net X-Virus-Scanned: clamav-milter 0.97.5 at mouf.net X-Virus-Status: Clean Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 17 Nov 2012 16:16:30 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I think this commit may have broken building the print/system-config-printer port. It uses xmlto to generate it's documentation, which calls "locale charmap". On at least 8.3 (only place I've tested), this returns simply "US-ASCII", which works fine. But now it returns the full list: # locale charmap LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= # which is fine, but this gets put into an xml file and then fails to parse. I guess we need to patch xmlto to call something else? Any advice you can offer would be appreciated. Thanks, Steve On 11/07/12 21:55, Greg Lehey wrote: > Author: grog Date: Thu Nov 8 02:55:30 2012 New Revision: 242743 > URL: http://svnweb.freebsd.org/changeset/base/242743 > > Log: Make parameters to -c and -k options optional. If no > parameters are supplied, print information for all keywords. > > Improve output of -c option, in particular in conjunction with -k > option. > > MFC after: 14 days > > Modified: head/usr.bin/locale/locale.1 > head/usr.bin/locale/locale.c > > Modified: head/usr.bin/locale/locale.1 > ============================================================================== > > - --- head/usr.bin/locale/locale.1 Thu Nov 8 02:29:16 2012 (r242742) > +++ head/usr.bin/locale/locale.1 Thu Nov 8 02:55:30 2012 > (r242743) @@ -40,7 +40,7 @@ .Op Ar prefix .Nm .Op Fl ck -.Ar > keyword ... +.Op Ar keyword ... .Sh DESCRIPTION The .Nm @@ -74,8 > +74,12 @@ directory. Print names of all available charmaps. .It Fl > k Print the names and values of all selected keywords. +If no > keywords are selected, print the names and values of all defined > +keywords. .It Fl c Print the category name for all selected > keywords. +If no keywords are selected, print the category name for > all defined +keywords. .El .Sh IMPLEMENTATION NOTES The special > > Modified: head/usr.bin/locale/locale.c > ============================================================================== > > - --- head/usr.bin/locale/locale.c Thu Nov 8 02:29:16 2012 (r242742) > +++ head/usr.bin/locale/locale.c Thu Nov 8 02:55:30 2012 > (r242743) @@ -253,12 +253,10 @@ main(int argc, char *argv[]) /* > validate arguments */ if (all_locales && all_charmaps) usage(); - > if ((all_locales || all_charmaps) && argc > 0) + if ((all_locales > || all_charmaps) && argc > 0) usage(); if ((all_locales || > all_charmaps) && (prt_categories || prt_keywords)) usage(); - if > ((prt_categories || prt_keywords) && argc <= 0) - usage(); > > /* process '-a' */ if (all_locales) { @@ -282,13 +280,19 @@ > main(int argc, char *argv[]) } > > /* process '-c' and/or '-k' */ - if (prt_categories || prt_keywords > || argc > 0) { - setlocale(LC_ALL, ""); - while (argc > 0) { - > showdetails(*argv); - argv++; - argc--; - } + if > (prt_categories || prt_keywords) { + if (argc > 0) { + > setlocale(LC_ALL, ""); + while (argc > 0) { > + showdetails(*argv); + argv++; + > argc--; + } + } else { + > uint i; + for (i = 0; i < sizeof (kwinfo) / > sizeof (struct _kwinfo); i++) + showdetails ((char *)kwinfo > [i].name); + } exit(0); } > > @@ -303,7 +307,7 @@ usage(void) { printf("Usage: locale [ -a | -m > ]\n" " locale -k list [prefix]\n" - " > locale [ -ck ] keyword ...\n"); + " locale [ > -ck ] [keyword ...]\n"); exit(1); } > > @@ -612,7 +616,10 @@ showdetails(char *kw) } > > if (prt_categories) { - printf("%s\n", lookup_localecat(cat)); + > if (prt_keywords) + printf("%-20s ", lookup_localecat(cat)); + > else + printf("%-20s\t%s\n", kw, > lookup_localecat(cat)); } > > if (prt_keywords) { > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head To > unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org" > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJQp7hLAAoJEPXPYrMgexuhYyAIAI480Lksvd9w8zD4JkaOr9+g 01qann/a3pIyOofEThfrlK4aiNm6yAvsy+i58dAbuUFxEjr/QWr1gHuoyUQOAuXz nh6VeGIQLOHbR7SyQPPkKI2+6o76QtLsruixAtNxcOM7AjqWaksqLS022MPG3Wmr VxSEdva6YVTxcLQyq0C0XGWl5yLJGF/6MpkJP5CxZfLxqBQXUWg14Ei386PtmbOk v1aEVo2l2mubOC2V5to0OwvuHg4TQNQX3EMcYkm5FHKE6qZG1Mork38Wu63J3eb6 I5mjTMIgLdXbLdxHamSsb7gt2+9SsZ6oLOJUsLstWi/ce6GCxmGKf76OSVcA4qk= =9BY2 -----END PGP SIGNATURE-----