Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/cat Some KNF, via patch by Petri Koistinen in private mail.
details: https://anonhg.NetBSD.org/src/rev/b45331423446
branches: trunk
changeset: 515080:b45331423446
user: wiz <wiz%NetBSD.org@localhost>
date: Sun Sep 16 12:12:13 2001 +0000
description:
Some KNF, via patch by Petri Koistinen in private mail.
diffstat:
bin/cat/cat.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 2c1b41639938 -r b45331423446 bin/cat/cat.c
--- a/bin/cat/cat.c Sun Sep 16 10:39:10 2001 +0000
+++ b/bin/cat/cat.c Sun Sep 16 12:12:13 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cat.c,v 1.27 2001/07/29 22:40:57 wiz Exp $ */
+/* $NetBSD: cat.c,v 1.28 2001/09/16 12:12:13 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
#else
-__RCSID("$NetBSD: cat.c,v 1.27 2001/07/29 22:40:57 wiz Exp $");
+__RCSID("$NetBSD: cat.c,v 1.28 2001/09/16 12:12:13 wiz Exp $");
#endif
#endif /* not lint */
@@ -79,6 +79,7 @@
{
int ch;
+ setprogname(argv[0]);
(void)setlocale(LC_ALL, "");
while ((ch = getopt(argc, argv, "befnstuv")) != -1)
@@ -268,12 +269,13 @@
void
raw_cat(int rfd)
{
- int wfd;
static char *buf;
static char fb_buf[BUFSIZ];
+ static size_t bsize;
+
struct stat sbuf;
- static size_t bsize;
ssize_t nr, nw, off;
+ int wfd;
wfd = fileno(stdout);
if (buf == NULL) {
Home |
Main Index |
Thread Index |
Old Index