Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 2010 17:44:09 +0000 (UTC)
From:      Benedict Reuschling <bcr@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209772 - head/usr.bin/getopt
Message-ID:  <201007071744.o67Hi9IU059462@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help

Author: bcr (doc committer)
Date: Wed Jul  7 17:44:09 2010
New Revision: 209772
URL: http://svn.freebsd.org/changeset/base/209772

Log:
  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@
  MFC after:      2 weeks

Modified:
  head/usr.bin/getopt/getopt.1

Modified: head/usr.bin/getopt/getopt.1
==============================================================================
--- head/usr.bin/getopt/getopt.1	Wed Jul  7 17:20:16 2010	(r209771)
+++ head/usr.bin/getopt/getopt.1	Wed Jul  7 17:44:09 2010	(r209772)
@@ -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";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007071744.o67Hi9IU059462>