From owner-cvs-bin Sat Sep 28 14:44:50 1996 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA04718 for cvs-bin-outgoing; Sat, 28 Sep 1996 14:44:50 -0700 (PDT) Received: from lestat.nas.nasa.gov (lestat.nas.nasa.gov [129.99.50.29]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA04473; Sat, 28 Sep 1996 14:44:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lestat.nas.nasa.gov (8.7.5/8.6.12) with SMTP id OAA19028; Sat, 28 Sep 1996 14:34:11 -0700 (PDT) Message-Id: <199609282134.OAA19028@lestat.nas.nasa.gov> X-Authentication-Warning: lestat.nas.nasa.gov: Host localhost [127.0.0.1] didn't use HELO protocol To: Warner Losh Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-bin@freefall.freebsd.org Subject: Re: cvs commit: src/bin/cat cat.c Reply-To: Jason Thorpe From: Jason Thorpe Date: Sat, 28 Sep 1996 14:34:11 -0700 Sender: owner-cvs-bin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sat, 28 Sep 1996 14:19:35 -0700 (PDT) Warner Losh wrote: > Merge in the NetBSD changes to cat.c. These appear to have come from > the 4.4 lite 2 tape as well. There are now only two diffs between > NetBSD's cat and FreeBSD's cat: > getopt return value is -1 on NetBSD and EOF on FreeBSD. >From NetBSD's getopt(3): The getopt() function returns -1 when the argument list is exhausted, or a non-recognized option is encountered. The interpretation of options in the argument list may be cancelled by the option `--' (double dash) which causes getopt() to signal the end of argument processing and returns -1. When all options have been processed (i.e., up to the first non-option argument), getopt() returns -1. [ . . . ] The getopt() function was once specified to return EOF instead of -1. This was changed by IEEE Std1003.2-1992 (``POSIX.2'') to decouple getopt() from . FreeBSD should probably fix their getopt(3). Jason R. Thorpe thorpej@nas.nasa.gov NASA Ames Research Center Home: 408.866.1912 NAS: M/S 258-6 Work: 415.604.0935 Moffett Field, CA 94035 Pager: 415.428.6939