Module Name: src
Committed By: joerg
Date: Tue Sep 6 18:32:26 UTC 2011
Modified Files:
src/usr.bin/tcopy: tcopy.c
Log Message:
ANSIfy + static + __dead
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tcopy/tcopy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/tcopy/tcopy.c
diff -u src/usr.bin/tcopy/tcopy.c:1.16 src/usr.bin/tcopy/tcopy.c:1.17
--- src/usr.bin/tcopy/tcopy.c:1.16 Mon Apr 13 23:44:49 2009
+++ src/usr.bin/tcopy/tcopy.c Tue Sep 6 18:32:26 2011
@@ -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;
-
-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 int filen, guesslen, maxblk = MAXREC;
+static long lastrec, record;
+static off_t size, tsize;
+static FILE *msg = stdout;
+
+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");