summaryrefslogtreecommitdiff
path: root/textproc/2bsd-diff/files/patch-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/2bsd-diff/files/patch-diff.c')
-rw-r--r--textproc/2bsd-diff/files/patch-diff.c49
1 files changed, 45 insertions, 4 deletions
diff --git a/textproc/2bsd-diff/files/patch-diff.c b/textproc/2bsd-diff/files/patch-diff.c
index 6be748081b3d..75101455b3f4 100644
--- a/textproc/2bsd-diff/files/patch-diff.c
+++ b/textproc/2bsd-diff/files/patch-diff.c
@@ -1,6 +1,31 @@
---- diff.c.orig Wed Nov 13 05:31:26 1991
-+++ diff.c Wed Mar 19 01:31:23 2003
-@@ -176,9 +176,10 @@
+--- 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);
}
@@ -12,7 +37,15 @@
unlink(tempfile);
exit(status);
}
-@@ -198,7 +199,6 @@
+@@ -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;
@@ -20,3 +53,11 @@
if ((q = realloc(p, (unsigned)n)) == NULL)
noroom();
+ return(q);
+ }
+
+-noroom()
++void noroom()
+ {
+ fprintf(stderr, "diff: files too big, try -h\n");
+ done();