Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jan 2012 22:26:26 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r229331 - stable/7/lib/libc/stdlib
Message-ID:  <201201022226.q02MQQSQ090901@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb (doc committer)
Date: Mon Jan  2 22:26:26 2012
New Revision: 229331
URL: http://svn.freebsd.org/changeset/base/229331

Log:
  MFC r228885:
  
  r228885:
   - Add missing opening and closing brackets in getopt_long.3 and
     getsubopt.3 to make the examples reflect reality more closely.

Modified:
  stable/7/lib/libc/stdlib/getopt_long.3
  stable/7/lib/libc/stdlib/getsubopt.3
Directory Properties:
  stable/7/lib/libc/   (props changed)

Modified: stable/7/lib/libc/stdlib/getopt_long.3
==============================================================================
--- stable/7/lib/libc/stdlib/getopt_long.3	Mon Jan  2 22:25:54 2012	(r229330)
+++ stable/7/lib/libc/stdlib/getopt_long.3	Mon Jan  2 22:26:26 2012	(r229331)
@@ -31,7 +31,7 @@
 .\"     @(#)getopt.3	8.5 (Berkeley) 4/27/95
 .\" $FreeBSD$
 .\"
-.Dd April 1, 2000
+.Dd December 25, 2011
 .Dt GETOPT_LONG 3
 .Os
 .Sh NAME
@@ -239,7 +239,7 @@ static struct option longopts[] = {
 };
 
 bflag = 0;
-while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1)
+while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1) {
 	switch (ch) {
 	case 'b':
 		bflag = 1;
@@ -256,6 +256,7 @@ while ((ch = getopt_long(argc, argv, "bf
 		break;
 	default:
 		usage();
+	}
 }
 argc -= optind;
 argv += optind;

Modified: stable/7/lib/libc/stdlib/getsubopt.3
==============================================================================
--- stable/7/lib/libc/stdlib/getsubopt.3	Mon Jan  2 22:25:54 2012	(r229330)
+++ stable/7/lib/libc/stdlib/getsubopt.3	Mon Jan  2 22:26:26 2012	(r229331)
@@ -28,7 +28,7 @@
 .\"     @(#)getsubopt.3	8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd June 9, 1993
+.Dd December 25, 2011
 .Dt GETSUBOPT 3
 .Os
 .Sh NAME
@@ -131,9 +131,11 @@ while ((ch = getopt(argc, argv, "ab:")) 
 				else
 					error("missing sub option");
 				break;
+			}
 		}
 		break;
 	}
+}
 .Ed
 .Sh SEE ALSO
 .Xr getopt 3 ,



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