From owner-svn-src-head@FreeBSD.ORG Mon Dec 26 03:14:38 2011 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 1082B106566B; Mon, 26 Dec 2011 03:14:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F33A48FC08; Mon, 26 Dec 2011 03:14:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ3EbJg087299; Mon, 26 Dec 2011 03:14:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ3EbUI087296; Mon, 26 Dec 2011 03:14:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201112260314.pBQ3EbUI087296@svn.freebsd.org> From: Glen Barber Date: Mon, 26 Dec 2011 03:14:37 +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: r228885 - head/lib/libc/stdlib 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: Mon, 26 Dec 2011 03:14:38 -0000 Author: gjb (doc committer) Date: Mon Dec 26 03:14:37 2011 New Revision: 228885 URL: http://svn.freebsd.org/changeset/base/228885 Log: Add missing opening and closing brackets in getopt_long.3 and getsubopt.3 to make the examples reflect reality more closely. MFC after: 1 week X-MFC-After: 9.0-RELEASE Modified: head/lib/libc/stdlib/getopt_long.3 head/lib/libc/stdlib/getsubopt.3 Modified: head/lib/libc/stdlib/getopt_long.3 ============================================================================== --- head/lib/libc/stdlib/getopt_long.3 Mon Dec 26 00:10:42 2011 (r228884) +++ head/lib/libc/stdlib/getopt_long.3 Mon Dec 26 03:14:37 2011 (r228885) @@ -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: head/lib/libc/stdlib/getsubopt.3 ============================================================================== --- head/lib/libc/stdlib/getsubopt.3 Mon Dec 26 00:10:42 2011 (r228884) +++ head/lib/libc/stdlib/getsubopt.3 Mon Dec 26 03:14:37 2011 (r228885) @@ -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 ,