summaryrefslogtreecommitdiff
path: root/textproc/2bsd-diff/files/patch-diff.c
blob: 75101455b3f4dd9d0313add18802e3adf6330058 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- diff.c.orig	1991-11-12 20:31:26 UTC
+++ diff.c
@@ -11,7 +11,7 @@ char	diff[] = DIFF;
 char	diffh[] = DIFFH;
 char	pr[] = PR;
 
-main(argc, argv)
+int main(argc, argv)
 	int argc;
 	char **argv;
 {
@@ -162,23 +162,24 @@ savestr(cp)
 	return (dp);
 }
 
-min(a,b)
+int min(a,b)
 	int a,b;
 {
 
 	return (a < b ? a : b);
 }
 
-max(a,b)
+int max(a,b)
 	int a,b;
 {
 
 	return (a > b ? a : b);
 }
 
+sig_t
 done()
 {
-	if (tempfile)
+	if (tempfile[0])
 		unlink(tempfile);
 	exit(status);
 }
@@ -191,6 +192,7 @@ talloc(n)
 	if ((p = malloc((unsigned)n)) != NULL)
 		return(p);
 	noroom();
+	return NULL;
 }
 
 char *
@@ -198,14 +200,13 @@ ralloc(p,n)
 char *p;
 {
 	register char *q;
-	char *realloc();
 
 	if ((q = realloc(p, (unsigned)n)) == NULL)
 		noroom();
 	return(q);
 }
 
-noroom()
+void noroom()
 {
 	fprintf(stderr, "diff: files too big, try -h\n");
 	done();