diff options
author | jmc <> | 2007-07-03 12:06:07 +0000 |
---|---|---|
committer | jmc <> | 2007-07-03 12:06:07 +0000 |
commit | dfd3915e02e7e5745c0698bba0e21917063ffaa4 (patch) | |
tree | d68a902a0473626e560c3b6630ae0162333f705b | |
parent | ac1bccf636517190eaf1cc13a79548688a38c6ea (diff) | |
download | openbsd-dfd3915e02e7e5745c0698bba0e21917063ffaa4.tar.gz openbsd-dfd3915e02e7e5745c0698bba0e21917063ffaa4.tar.bz2 openbsd-dfd3915e02e7e5745c0698bba0e21917063ffaa4.zip |
from ginsbach@netbsd, -r1.18:
Document that getopt_long(3) can and will accept unique abbreviated long
option names. This feature has been present since getopt_long(3) was first
released in NetBSD 1.5. This is also standard GNU getopt_long(3) behavior.
ok millert
-rw-r--r-- | src/lib/libc/stdlib/getopt_long.3 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/getopt_long.3 b/src/lib/libc/stdlib/getopt_long.3 index 78eb8dee65..2bab963734 100644 --- a/src/lib/libc/stdlib/getopt_long.3 +++ b/src/lib/libc/stdlib/getopt_long.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getopt_long.3,v 1.14 2007/05/31 19:19:31 jmc Exp $ | 1 | .\" $OpenBSD: getopt_long.3,v 1.15 2007/07/03 12:06:07 jmc Exp $ |
2 | .\" $NetBSD: getopt_long.3,v 1.11 2002/10/02 10:54:19 wiz Exp $ | 2 | .\" $NetBSD: getopt_long.3,v 1.11 2002/10/02 10:54:19 wiz Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (c) 1988, 1991, 1993 | 4 | .\" Copyright (c) 1988, 1991, 1993 |
@@ -30,7 +30,7 @@ | |||
30 | .\" | 30 | .\" |
31 | .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 | 31 | .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 |
32 | .\" | 32 | .\" |
33 | .Dd $Mdocdate: May 31 2007 $ | 33 | .Dd $Mdocdate: July 3 2007 $ |
34 | .Dt GETOPT_LONG 3 | 34 | .Dt GETOPT_LONG 3 |
35 | .Os | 35 | .Os |
36 | .Sh NAME | 36 | .Sh NAME |
@@ -93,6 +93,11 @@ It is possible to combine these methods, providing for long options | |||
93 | processing with short option equivalents for some options. | 93 | processing with short option equivalents for some options. |
94 | Less frequently used options would be processed as long options only. | 94 | Less frequently used options would be processed as long options only. |
95 | .Pp | 95 | .Pp |
96 | Abbreviated long option names are accepted when | ||
97 | .Fn getopt_long | ||
98 | processes long options if the abbreviation is unique. | ||
99 | An exact match is always preferred for a defined long option. | ||
100 | .Pp | ||
96 | The | 101 | The |
97 | .Fn getopt_long | 102 | .Fn getopt_long |
98 | call requires a structure to be initialized describing the long | 103 | call requires a structure to be initialized describing the long |