diff options
author | imp <imp@FreeBSD.org> | 1996-09-28 21:19:27 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1996-09-28 21:19:27 +0000 |
commit | 87f4f38d8e45be24c9187dbe5174bd7fe2416c17 (patch) | |
tree | 7abfc3310d58e8242f325585d8e485daeef6190b | |
parent | 29184d94d72cabbfa04feb11242d6e84160ab0d7 (diff) | |
download | FreeBSD-src-87f4f38d8e45be24c9187dbe5174bd7fe2416c17.zip FreeBSD-src-87f4f38d8e45be24c9187dbe5174bd7fe2416c17.tar.gz |
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.
NetBSD has added setlocale calls before anything else.
-rw-r--r-- | bin/cat/cat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 276b787..1e8be46 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cat.c,v 1.2 1994/09/24 02:53:26 davidg Exp $ + * $Id: cat.c,v 1.3 1995/10/03 12:46:37 bde Exp $ */ #ifndef lint @@ -43,7 +43,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)cat.c 8.1 (Berkeley) 7/19/93"; +static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95"; #endif /* not lint */ #include <sys/param.h> @@ -98,7 +98,7 @@ main(argc, argv) case 'v': vflag = 1; break; - case '?': + default: (void)fprintf(stderr, "usage: cat [-benstuv] [-] [file ...]\n"); exit(1); @@ -245,7 +245,7 @@ raw_cat(rfd) err(1, "%s", filename); bsize = MAX(sbuf.st_blksize, 1024); if ((buf = malloc((u_int)bsize)) == NULL) - err(1, ""); + err(1, NULL); } while ((nr = read(rfd, buf, bsize)) > 0) for (off = 0; nr; nr -= nw, off += nw) |