summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/diff/diff.c9
-rw-r--r--usr.bin/diff/diff.h3
-rw-r--r--usr.bin/diff/diffreg.c13
3 files changed, 8 insertions, 17 deletions
diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c
index 8eba550652c..65df89d0fc7 100644
--- a/usr.bin/diff/diff.c
+++ b/usr.bin/diff/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.4 2003/06/25 03:37:32 deraadt Exp $ */
+/* $OpenBSD: diff.c,v 1.5 2003/06/25 07:26:59 tedu Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -217,13 +217,6 @@ done(int sig)
exit(status);
}
-void
-catchsig(int sigraised)
-{
- /* print something? */
- done(0);
-}
-
void *
talloc(size_t n)
{
diff --git a/usr.bin/diff/diff.h b/usr.bin/diff/diff.h
index 642d8278b38..f8a373a88c8 100644
--- a/usr.bin/diff/diff.h
+++ b/usr.bin/diff/diff.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.h,v 1.4 2003/06/25 03:37:32 deraadt Exp $ */
+/* $OpenBSD: diff.h,v 1.5 2003/06/25 07:26:59 tedu Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -117,7 +117,6 @@ void *talloc(size_t);
void *ralloc(void *, size_t);
char *splice(char *, char *);
char *copytemp(void);
-void catchsig(int);
void done(int);
void diffdir(char **);
void diffreg(void);
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
index b1076b26da1..332033afead 100644
--- a/usr.bin/diff/diffreg.c
+++ b/usr.bin/diff/diffreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffreg.c,v 1.13 2003/06/25 03:55:45 deraadt Exp $ */
+/* $OpenBSD: diffreg.c,v 1.14 2003/06/25 07:26:59 tedu Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -354,10 +354,10 @@ copytemp(void)
char buf[BUFSIZ];
int i, f;
- signal(SIGHUP, catchsig);
- signal(SIGINT, catchsig);
- signal(SIGPIPE, catchsig);
- signal(SIGTERM, catchsig);
+ signal(SIGHUP, done);
+ signal(SIGINT, done);
+ signal(SIGPIPE, done);
+ signal(SIGTERM, done);
f = mkstemp(tempfile);
if (f < 0) {
fprintf(stderr, "diff: ");
@@ -921,8 +921,7 @@ fetch(long *f, int a, int b, FILE *lb, char *s, int oldfile)
if (c == '\t' && tflag)
do
putchar(' ');
- while (++col & 7)
- ;
+ while (++col & 7);
else {
putchar(c);
col++;