From 3bc42fd0774321efb5c68f2428d8747626d1061d Mon Sep 17 00:00:00 2001 From: okan <> Date: Sun, 12 Apr 2009 23:13:36 +0000 Subject: [PATCH] document that no leading whitespace is permitted between the option and argument if the argument is deemed to be optional ('::'). feedback and ok jmc@ and millert@ --- src/lib/libc/stdlib/getopt.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3 index 06167cb7..82f74c2c 100644 --- a/src/lib/libc/stdlib/getopt.3 +++ b/src/lib/libc/stdlib/getopt.3 @@ -25,9 +25,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: getopt.3,v 1.40 2007/05/31 19:19:31 jmc Exp $ +.\" $OpenBSD: getopt.3,v 1.41 2009/04/12 23:13:36 okan Exp $ .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: April 12 2009 $ .Dt GETOPT 3 .Os .Sh NAME @@ -73,7 +73,9 @@ recognizes an option and argument .Fl x Ar argument . It does not matter to .Fn getopt -if a following argument has leading whitespace. +if a following argument has leading whitespace; except in the case where +the argument is optional, denoted with two colons, no leading whitespace +is permitted. .Pp On return from .Fn getopt ,