diff options
author | cracauer <cracauer@FreeBSD.org> | 1999-04-03 22:24:36 +0000 |
---|---|---|
committer | cracauer <cracauer@FreeBSD.org> | 1999-04-03 22:24:36 +0000 |
commit | cfa91c2e4045fec89ba0346224694d4029ee7697 (patch) | |
tree | 6f4966894f03e36c7db02fffdd48d51010c8bc9b /usr.bin/yacc | |
parent | 60ad9560502beabab095c9441389f5ad42ab0d86 (diff) | |
download | FreeBSD-src-cfa91c2e4045fec89ba0346224694d4029ee7697.zip FreeBSD-src-cfa91c2e4045fec89ba0346224694d4029ee7697.tar.gz |
1) Fix the case where a shellscript using getopt is called with a
parameter that has space in it, both in getopt.c and in the manpage
example.
2) Fix the example in the manpage. The set(1) command is required to
return 0 (POSIX 1003.2, section 3.14.11), so you can't test for
getopt's exit status like the example did:
#! /bin/sh
set -- `getopt abo: $*`
if test $? != 0 # wrong, tests for set's exit status, which is
# always zero, no for getopt(1)'s.
Fixes PR bin/5845, which thought it was getopt's fault, but in fact
the manpage was wrong.
I also updated the example to be more useful and updated the BUGS
section.
PR: bin/5845
Diffstat (limited to 'usr.bin/yacc')
0 files changed, 0 insertions, 0 deletions