diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/stdlib/getopt_long.3 | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/lib/libc/stdlib/getopt_long.3 b/src/lib/libc/stdlib/getopt_long.3 index d6ce03f684..28a17bd8c0 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.3 2002/12/05 21:02:19 millert Exp $ | 1 | .\" $OpenBSD: getopt_long.3,v 1.4 2002/12/10 21:51:38 millert 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 |
@@ -241,6 +241,27 @@ arguments to option '\e1'. | |||
241 | honors POSIXLY_CORRECT and stops at the first non-option. | 241 | honors POSIXLY_CORRECT and stops at the first non-option. |
242 | .El | 242 | .El |
243 | .It Li o | 243 | .It Li o |
244 | handling of - within the option string (not the first character). | ||
245 | .Bl -tag -width "OpenBSD" | ||
246 | .It Li GNU | ||
247 | treats a | ||
248 | .Ql - | ||
249 | on the command line as a non-argument. | ||
250 | .It Li OpenBSD | ||
251 | a | ||
252 | .Ql - | ||
253 | within the option string matches a | ||
254 | .Ql - | ||
255 | (single dash) on the command line. | ||
256 | This functionality is provided for backward compatibility with | ||
257 | programs, such as | ||
258 | .Xr su 1 , | ||
259 | that use | ||
260 | .Ql - | ||
261 | as an option flag. | ||
262 | This practice is wrong, and should not be used in any current development. | ||
263 | .El | ||
264 | .It Li o | ||
244 | handling of :: in options string in presence of POSIXLY_CORRECT: | 265 | handling of :: in options string in presence of POSIXLY_CORRECT: |
245 | .Bl -tag -width "OpenBSD" | 266 | .Bl -tag -width "OpenBSD" |
246 | .It Li Both | 267 | .It Li Both |
@@ -280,10 +301,9 @@ handling of -W with W; in option string in getopt (not getopt_long): | |||
280 | .It Li GNU | 301 | .It Li GNU |
281 | causes a segfault. | 302 | causes a segfault. |
282 | .It Li OpenBSD | 303 | .It Li OpenBSD |
283 | returns \-1, with optind pointing past the argument of -W | 304 | no special handling is done; |
284 | (as if `-W arg' were `--arg', and thus '--' had been found). | 305 | .Dq W; |
285 | .\" How should we treat W; in the option string when called via | 306 | is interpreted as two separate options, neither of which take an argument. |
286 | .\" getopt? Ignore the ';' or treat it as a ':'? Issue a warning? | ||
287 | .El | 307 | .El |
288 | .It Li o | 308 | .It Li o |
289 | setting of optarg for long options without an argument that are | 309 | setting of optarg for long options without an argument that are |