From 0b62d14c50a7723838a4df23c58f342dfcd3a37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Apestegu=C3=ADa?= Date: Mon, 7 Jan 2019 11:16:54 +0000 Subject: textproc/2bsd-diff: fix breakage on current On FreeBSD 13 - current, the build failed with: cc: error: unknown argument: '-i' PR: 234362 Submitted by: risner@stdio.com (maintainer) --- textproc/2bsd-diff/files/patch-diffh.c | 184 +++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 textproc/2bsd-diff/files/patch-diffh.c (limited to 'textproc/2bsd-diff/files/patch-diffh.c') diff --git a/textproc/2bsd-diff/files/patch-diffh.c b/textproc/2bsd-diff/files/patch-diffh.c new file mode 100644 index 000000000000..ca5edcc8864d --- /dev/null +++ b/textproc/2bsd-diff/files/patch-diffh.c @@ -0,0 +1,184 @@ +--- diffh.c.orig 1991-11-12 20:31:33 UTC ++++ diffh.c +@@ -6,6 +6,7 @@ static char sccsid[] = "@(#)diffh.c 4.4 11/27/85"; + #include + #include + #include ++#include + + #define C 3 + #define RANGE 30 +@@ -20,13 +21,24 @@ int bflag; + int debug = 0; + FILE *file[2]; + ++/* declarations */ ++void error(char *, char *); ++char cmp(char *, char *); ++void range(long, int); ++void change(long, int, long, int, char *); ++int output(int, int); ++void progerr(char *); ++int hardsynch(); ++int easysynch(); ++void movstr(char *, char *t); ++void clrl(int, long); ++ + /* return pointer to line n of file f*/ + char *getl(f,n) + long n; + { + register char *t; +- char *malloc(); +- register delta, nt; ++ register int delta, nt; + again: + delta = n - lineno[f]; + nt = ntext[f]; +@@ -43,11 +55,12 @@ again: + t = text[f][nt]; + if(t==0) { + t = text[f][nt] = malloc(LEN+1); +- if(t==NULL) ++ if(t==NULL) { + if(hardsynch()) + goto again; + else + progerr("5"); ++ } + } + t = fgets(t,LEN,file[f]); + if(t!=NULL) +@@ -56,10 +69,10 @@ again: + } + + /*remove thru line n of file f from storage*/ +-clrl(f,n) ++void clrl(f,n) + long n; + { +- register i,j; ++ register int i,j; + j = n-lineno[f]+1; + for(i=0;i+j