summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2009-04-12 23:13:37 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2009-04-12 23:13:37 +0000
commit56e8c1a9fb12d49886b506fbfb9a78a5f831b3ec (patch)
tree93497c0c733c9448b31b0f4df937f9d88f05ea30 /lib
parente966e2ca3cda0d97efe68ed6139a53942a9d45fc (diff)
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@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/getopt.38
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3
index 06167cb7d68..82f74c2c1a5 100644
--- a/lib/libc/stdlib/getopt.3
+++ b/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 ,