diff options
author | millert <> | 2005-03-26 22:02:15 +0000 |
---|---|---|
committer | millert <> | 2005-03-26 22:02:15 +0000 |
commit | d78c5b47b1ae8f1ee633026e9f1129fca7caa006 (patch) | |
tree | 6cc9b0bf36197bb6a60b0ebc06930fd6989776eb /src/lib | |
parent | 2f490723a2e673b2457f65c4b06cacb7d700a3e8 (diff) | |
download | openbsd-d78c5b47b1ae8f1ee633026e9f1129fca7caa006.tar.gz openbsd-d78c5b47b1ae8f1ee633026e9f1129fca7caa006.tar.bz2 openbsd-d78c5b47b1ae8f1ee633026e9f1129fca7caa006.zip |
Document that historic BSD getopt(3) set optopt for each char, not just
on error.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/stdlib/getopt.3 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3 index 831d35c0ba..e0dc3701f9 100644 --- a/src/lib/libc/stdlib/getopt.3 +++ b/src/lib/libc/stdlib/getopt.3 | |||
@@ -25,7 +25,7 @@ | |||
25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 | .\" SUCH DAMAGE. | 26 | .\" SUCH DAMAGE. |
27 | .\" | 27 | .\" |
28 | .\" $OpenBSD: getopt.3,v 1.30 2004/12/22 16:24:53 jmc Exp $ | 28 | .\" $OpenBSD: getopt.3,v 1.31 2005/03/26 22:02:15 millert Exp $ |
29 | .\" | 29 | .\" |
30 | .Dd December 17, 2002 | 30 | .Dd December 17, 2002 |
31 | .Dt GETOPT 3 | 31 | .Dt GETOPT 3 |
@@ -311,6 +311,19 @@ the | |||
311 | .Ox | 311 | .Ox |
312 | .Fn getopt | 312 | .Fn getopt |
313 | supports optional arguments separated by whitespace. | 313 | supports optional arguments separated by whitespace. |
314 | .Pp | ||
315 | Historic | ||
316 | .Bx | ||
317 | versions of | ||
318 | .Fn getopt | ||
319 | set | ||
320 | .Fa optopt | ||
321 | to the last option character processed. | ||
322 | However, this conflicts with | ||
323 | .St -p1003.1 | ||
324 | which stipulates that | ||
325 | .Fa optopt | ||
326 | be set to the last character that caused an error. | ||
314 | .Sh HISTORY | 327 | .Sh HISTORY |
315 | The | 328 | The |
316 | .Fn getopt | 329 | .Fn getopt |