From owner-cvs-all Sun Apr 4 0:11:47 1999 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 0) id 832A0154C3; Sun, 4 Apr 1999 00:07:07 -0800 (PST) Approved: pdiddle Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2CA2E15005; Sat, 3 Apr 1999 14:26:32 -0800 (PST) (envelope-from cracauer@FreeBSD.org) Received: (from cracauer@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id OAA09065; Sat, 3 Apr 1999 14:24:37 -0800 (PST) (envelope-from cracauer@FreeBSD.org) Message-Id: <199904032224.OAA09065@freefall.freebsd.org> From: Martin Cracauer Date: Sat, 3 Apr 1999 14:24:37 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/getopt getopt.1 getopt.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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