From owner-svn-src-head@FreeBSD.ORG Wed Oct 6 07:22:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ACC01065679; Wed, 6 Oct 2010 07:22:57 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D468B8FC08; Wed, 6 Oct 2010 07:22:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o967MuOR086166; Wed, 6 Oct 2010 07:22:56 GMT (envelope-from gordon@svn.freebsd.org) Received: (from gordon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o967MuYa086164; Wed, 6 Oct 2010 07:22:56 GMT (envelope-from gordon@svn.freebsd.org) Message-Id: <201010060722.o967MuYa086164@svn.freebsd.org> From: Gordon Tetlow Date: Wed, 6 Oct 2010 07:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213470 - head/usr.bin/man X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 06 Oct 2010 07:22:57 -0000 Author: gordon Date: Wed Oct 6 07:22:56 2010 New Revision: 213470 URL: http://svn.freebsd.org/changeset/base/213470 Log: If LANG/LC_CTYPE/LC_ALL is set and the localized man page contains a page also in the base set, the man utility when invoked with -a would display pages for each locale in the same tree: $ LANG=en_GB.ISO8859-15 man -wa man /usr/share/man/en.ISO8859-15/man1/man.1.gz /usr/share/man/man1/man.1.gz /usr/share/man/en.ISO8859-15/man7/man.7.gz /usr/share/man/man7/man.7.gz Use continue to break out of the loop for the current locale. This results in behavior more closely matching the old GNU man implementation: $ LANG=en_GB.ISO8859-15 man -wa man /usr/share/man/en.ISO8859-15/man1/man.1.gz /usr/share/man/en.ISO8859-15/man7/man.7.gz This will still search for a copy of the file in other manual path locations. If there was a /usr/local/man/man1/man.1.gz file, it would still be displayed. This is also consistent with the GNU man implementation. Submitted by: arundel Approved by: wes (mentor implicit) Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Wed Oct 6 04:30:40 2010 (r213469) +++ head/usr.bin/man/man.sh Wed Oct 6 07:22:56 2010 (r213470) @@ -368,7 +368,9 @@ man_find_and_display() { if find_file $p $sect $MACHINE "$1"; then found_page=yes man_display_page - if [ -z "$aflag" ]; then + if [ -n "$aflag" ]; then + continue 2 + else return fi fi @@ -378,7 +380,9 @@ man_find_and_display() { if find_file $p $sect $MACHINE_ARCH "$1"; then found_page=yes man_display_page - if [ -z "$aflag" ]; then + if [ -n "$aflag" ]; then + continue 2 + else return fi fi @@ -387,7 +391,9 @@ man_find_and_display() { if find_file $p $sect '' "$1"; then found_page=yes man_display_page - if [ -z "$aflag" ]; then + if [ -n "$aflag" ]; then + continue 2 + else return fi fi