summaryrefslogtreecommitdiffstats
path: root/usr.bin/tcopy
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2010-01-05 21:09:59 +0000
committerdwmalone <dwmalone@FreeBSD.org>2010-01-05 21:09:59 +0000
commitfa4a3591591d0365fabb6cf510d007be10d39412 (patch)
tree708a33b306bc1b2ac4b9fa57f9bfe8fe4ef26b2a /usr.bin/tcopy
parenta3da51fe8dfd538fafb93b283d87891b9a73354c (diff)
downloadFreeBSD-src-fa4a3591591d0365fabb6cf510d007be10d39412.zip
FreeBSD-src-fa4a3591591d0365fabb6cf510d007be10d39412.tar.gz
1) Mark usage as dead2.
2) Deregister. 3) New style function definitions. Some WARNS still remain here - some printf format warning on some arches and the compiler can't see that a variable should always be initialised.
Diffstat (limited to 'usr.bin/tcopy')
-rw-r--r--usr.bin/tcopy/tcopy.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c
index 540ac06..4d9d516 100644
--- a/usr.bin/tcopy/tcopy.c
+++ b/usr.bin/tcopy/tcopy.c
@@ -70,17 +70,15 @@ FILE *msg;
void *getspace(int);
void intr(int);
-static void usage(void);
+static void usage(void) __dead2;
void verify(int, int, char *);
void writeop(int, int);
void rewind_tape(int);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
- register int lastnread, nread, nw, inp, outp;
+ int lastnread, nread, nw, inp, outp;
enum {READ, VERIFY, COPY, COPYVERIFY} op = READ;
sig_t oldsig;
int ch, needeof;
@@ -227,12 +225,10 @@ r1: guesslen = 0;
}
void
-verify(inp, outp, outb)
- register int inp, outp;
- register char *outb;
+verify(int inp, int outp, char *outb)
{
- register int eot, inmaxblk, inn, outmaxblk, outn;
- register char *inb;
+ int eot, inmaxblk, inn, outmaxblk, outn;
+ char *inb;
inb = getspace(maxblk);
inmaxblk = outmaxblk = maxblk;
@@ -281,8 +277,7 @@ r2: if (inn != outn) {
}
void
-intr(signo)
- int signo __unused;
+intr(int signo __unused)
{
if (record) {
if (record - lastrec > 1)
@@ -296,8 +291,7 @@ intr(signo)
}
void *
-getspace(blk)
- int blk;
+getspace(int blk)
{
void *bp;
@@ -307,8 +301,7 @@ getspace(blk)
}
void
-writeop(fd, type)
- int fd, type;
+writeop(int fd, int type)
{
struct mtop op;
@@ -319,7 +312,7 @@ writeop(fd, type)
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: tcopy [-cvx] [-s maxblk] [src [dest]]\n");
exit(1);
OpenPOWER on IntegriCloud