From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 17:11:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E71D106567D; Wed, 21 Jul 2010 17:11:27 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CEEC8FC08; Wed, 21 Jul 2010 17:11:27 +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 o6LHBR3S080521; Wed, 21 Jul 2010 17:11:27 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LHBRT1080520; Wed, 21 Jul 2010 17:11:27 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007211711.o6LHBRT1080520@svn.freebsd.org> From: Benedict Reuschling Date: Wed, 21 Jul 2010 17:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210354 - stable/8/usr.bin/getopt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 17:11:27 -0000 Author: bcr (doc committer) Date: Wed Jul 21 17:11:26 2010 New Revision: 210354 URL: http://svn.freebsd.org/changeset/base/210354 Log: MFC r209772: Fix an error in the EXAMPLES section of getopt(1), which is based on the same fix present in NetBSD. Note: the getopt man page contains more antique information like this. An overhaul of the man page and/or sync with NetBSD would be the right thing to do. But since this is out of the scope of the PR, I'll leave it as it is for now. PR: docs/133118 Submitted by: Oleg A. Mamontov (oleg at mamontov dot net) Discussed with: jilles@ Modified: stable/8/usr.bin/getopt/getopt.1 Directory Properties: stable/8/usr.bin/getopt/ (props changed) Modified: stable/8/usr.bin/getopt/getopt.1 ============================================================================== --- stable/8/usr.bin/getopt/getopt.1 Wed Jul 21 13:29:00 2010 (r210353) +++ stable/8/usr.bin/getopt/getopt.1 Wed Jul 21 17:11:26 2010 (r210354) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd April 3, 1999 +.Dd July 7, 2010 .Dt GETOPT 1 .Os .Sh NAME @@ -64,9 +64,9 @@ set \-\- $args # You cannot use the set command with a backquoted getopt directly, # since the exit code from getopt would be shadowed by those of set, # which is zero by definition. -for i +while true; do - case "$i" + case "$1" in \-a|\-b) echo flag $i set; sflags="${i#-}$sflags";