Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/tcopy ANSIfy + static + __dead
details: https://anonhg.NetBSD.org/src/rev/06dc8e80f8e9
branches: trunk
changeset: 769333:06dc8e80f8e9
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Sep 06 18:32:26 2011 +0000
description:
ANSIfy + static + __dead
diffstat:
usr.bin/tcopy/tcopy.c | 52 +++++++++++++++++++++-----------------------------
1 files changed, 22 insertions(+), 30 deletions(-)
diffs (111 lines):
diff -r 69a711eebd05 -r 06dc8e80f8e9 usr.bin/tcopy/tcopy.c
--- a/usr.bin/tcopy/tcopy.c Tue Sep 06 18:32:03 2011 +0000
+++ b/usr.bin/tcopy/tcopy.c Tue Sep 06 18:32:26 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcopy.c,v 1.16 2009/04/13 23:44:49 lukem Exp $ */
+/* $NetBSD: tcopy.c,v 1.17 2011/09/06 18:32:26 joerg Exp $ */
/*
* Copyright (c) 1985, 1987, 1993, 1995
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)tcopy.c 8.3 (Berkeley) 1/23/95";
#endif
-__RCSID("$NetBSD: tcopy.c,v 1.16 2009/04/13 23:44:49 lukem Exp $");
+__RCSID("$NetBSD: tcopy.c,v 1.17 2011/09/06 18:32:26 joerg Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -61,22 +61,19 @@
#define MAXREC (64 * 1024)
#define NOCOUNT (-2)
-int filen, guesslen, maxblk = MAXREC;
-long lastrec, record;
-off_t size, tsize;
-FILE *msg = stdout;
+static int filen, guesslen, maxblk = MAXREC;
+static long lastrec, record;
+static off_t size, tsize;
+static FILE *msg = stdout;
-void *getspace __P((int));
-void intr __P((int));
-int main __P((int, char **));
-void usage __P((void));
-void verify __P((int, int, char *));
-void writeop __P((int, int));
+static void *getspace(int);
+__dead static void intr(int);
+__dead static void usage(void);
+static void verify(int, int, char *);
+static void writeop(int, int);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch, needeof, nw, inp, outp;
ssize_t lastnread, nread;
@@ -233,10 +230,8 @@
exit(0);
}
-void
-verify(inp, outp, outb)
- int inp, outp;
- char *outb;
+static void
+verify(int inp, int outp, char *outb)
{
int eot, inmaxblk, inn, outmaxblk, outn;
char *inb;
@@ -291,9 +286,8 @@
exit(1);
}
-void
-intr(signo)
- int signo;
+static void
+intr(int signo)
{
if (record) {
if (record - lastrec > 1)
@@ -307,9 +301,8 @@
exit(1);
}
-void *
-getspace(blk)
- int blk;
+static void *
+getspace(int blk)
{
void *bp;
@@ -319,9 +312,8 @@
return (bp);
}
-void
-writeop(fd, type)
- int fd, type;
+static void
+writeop(int fd, int type)
{
struct mtop op;
@@ -331,8 +323,8 @@
err(6, "tape op");
}
-void
-usage()
+static void
+usage(void)
{
fprintf(stderr, "usage: tcopy [-cvx] [-s maxblk] src [dest]\n");
Home |
Main Index |
Thread Index |
Old Index