Date: Sat, 3 Apr 1999 14:24:37 -0800 (PST) From: Martin Cracauer <cracauer@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/getopt getopt.1 getopt.c Message-ID: <199904032224.OAA09065@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
cracauer 1999/04/03 14:24:37 PST Modified files: usr.bin/getopt getopt.1 getopt.c Log: 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 Revision Changes Path 1.5 +38 -17 src/usr.bin/getopt/getopt.1 1.3 +1 -1 src/usr.bin/getopt/getopt.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904032224.OAA09065>