aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2011-11-27 20:47:41 +0800
committerdinoex <dinoex@FreeBSD.org>2011-11-27 20:47:41 +0800
commit10495c09f6d6da45032d170eb5e2774b821283a5 (patch)
tree27e4544773f20ad270ad65a45b6f51be8fb1b176 /textproc
parentbe1f8ad69a32440d61450ed1ce5e1f5e31bdaf7e (diff)
downloadfreebsd-ports-gnome-10495c09f6d6da45032d170eb5e2774b821283a5.tar.gz
freebsd-ports-gnome-10495c09f6d6da45032d170eb5e2774b821283a5.tar.zst
freebsd-ports-gnome-10495c09f6d6da45032d170eb5e2774b821283a5.zip
- add missing prototypes
- add missing includes - fix build with clang Feature safe: yes
Diffstat (limited to 'textproc')
-rw-r--r--textproc/agrep/files/patch-agrep.h45
-rw-r--r--textproc/agrep/files/patch-asearch.c22
-rw-r--r--textproc/agrep/files/patch-asearch1.c11
-rw-r--r--textproc/agrep/files/patch-bitap.c29
-rw-r--r--textproc/agrep/files/patch-checkfile.c10
-rw-r--r--textproc/agrep/files/patch-compat.c29
-rw-r--r--textproc/agrep/files/patch-main.c126
-rw-r--r--textproc/agrep/files/patch-maskgen.c16
-rw-r--r--textproc/agrep/files/patch-mgrep.c86
-rw-r--r--textproc/agrep/files/patch-preprocess.c20
-rw-r--r--textproc/agrep/files/patch-sgrep.c195
-rw-r--r--textproc/agrep/files/patch-strncpy11
12 files changed, 574 insertions, 26 deletions
diff --git a/textproc/agrep/files/patch-agrep.h b/textproc/agrep/files/patch-agrep.h
index 7d6299ce4387..b32f8972c9e6 100644
--- a/textproc/agrep/files/patch-agrep.h
+++ b/textproc/agrep/files/patch-agrep.h
@@ -1,8 +1,5 @@
-
-$FreeBSD$
-
---- agrep.h.orig Fri Jan 17 20:15:13 1992
-+++ agrep.h Sun Jul 21 03:50:47 2002
+--- agrep.h.orig 1992-01-17 20:15:13.000000000 +0100
++++ agrep.h 2011-11-27 13:35:40.000000000 +0100
@@ -1,10 +1,10 @@
#include <stdio.h>
+#include <stdlib.h>
@@ -16,3 +13,41 @@ $FreeBSD$
#define CHAR unsigned char
#define MAXPAT 128
#define MAXPATT 256
+@@ -52,3 +52,37 @@
+ #define NNLINE 239 /* special symbol for newline in begin of pattern*/
+ /* matches '\n' and NNLINE */
+
++/* asearch.c */
++void asearch(CHAR old_D_pat[], int text, register unsigned D);
++
++/* asearch1.c */
++void asearch1(char old_D_pat[], int text, register unsigned D);
++
++/* bitap.c */
++void bitap(char old_D_pat[], char *Pattern, int fd, int M, int D);
++int fill_buf(int fd, unsigned char *buf, int record_size);
++
++/* checkfile.c */
++int check_file(char *fname);
++
++/* compat.c */
++void compat(void);
++
++/* main.c */
++void output (register CHAR *buffer, int i1, int i2, int j);
++void re1(int Text, int M, int D);
++void re(int Text, int M, int D);
++
++/* maskgen.c */
++int maskgen(unsigned char *Pattern, int D);
++
++/* mgrep.c */
++void prepf(int fp);
++void mgrep(int fp);
++
++/* preprocess.c */
++void preprocess(CHAR *D_pattern, CHAR *Pattern);
++
++/* sgrep.c */
++void sgrep(CHAR *pat, int m, int fd, int D);
++
diff --git a/textproc/agrep/files/patch-asearch.c b/textproc/agrep/files/patch-asearch.c
new file mode 100644
index 000000000000..8dbc657ef494
--- /dev/null
+++ b/textproc/agrep/files/patch-asearch.c
@@ -0,0 +1,22 @@
+--- asearch.c.orig 1992-01-24 02:49:08.000000000 +0100
++++ asearch.c 2011-11-27 12:05:20.000000000 +0100
+@@ -6,7 +6,9 @@
+ extern CHAR CurrentFileName[];
+ extern int I, num_of_matched, TRUNCATE;
+
+-asearch(old_D_pat, text, D)
++void asearch0(CHAR old_D_pat[], int text, register unsigned D);
++
++void asearch(old_D_pat, text, D)
+ CHAR old_D_pat[]; int text; register unsigned D;
+ {
+ register unsigned i, c, r1, r2, CMask, r_NO_ERR, r_Init1;
+@@ -178,7 +180,7 @@
+ return;
+ }
+
+-asearch0(old_D_pat, text, D)
++void asearch0(old_D_pat, text, D)
+ CHAR old_D_pat[]; int text; register unsigned D;
+ {
+ register unsigned i, c, r1, r2, r3, CMask, r_NO_ERR, r_Init1, end, endpos;
diff --git a/textproc/agrep/files/patch-asearch1.c b/textproc/agrep/files/patch-asearch1.c
new file mode 100644
index 000000000000..48981794e721
--- /dev/null
+++ b/textproc/agrep/files/patch-asearch1.c
@@ -0,0 +1,11 @@
+--- asearch1.c.orig 1992-01-17 22:00:38.000000000 +0100
++++ asearch1.c 2011-11-27 12:07:32.000000000 +0100
+@@ -8,7 +8,7 @@
+ extern int num_of_matched;
+
+
+-asearch1(old_D_pat, Text, D)
++void asearch1(old_D_pat, Text, D)
+ char old_D_pat[]; int Text; register unsigned D;
+ {
+ register unsigned end, i, r1, r2, r3, r4, r5, CMask, D_Mask, Init0, k, endpos;
diff --git a/textproc/agrep/files/patch-bitap.c b/textproc/agrep/files/patch-bitap.c
new file mode 100644
index 000000000000..f6ee4b81f618
--- /dev/null
+++ b/textproc/agrep/files/patch-bitap.c
@@ -0,0 +1,29 @@
+--- bitap.c.orig 1992-01-17 22:00:15.000000000 +0100
++++ bitap.c 2011-11-27 13:33:41.000000000 +0100
+@@ -13,6 +13,8 @@
+
+ #include "agrep.h"
+
++#include <unistd.h>
++
+ extern unsigned Init1, D_endpos, endposition, Init[], Mask[], Bit[];
+ extern int DELIMITER, FILENAMEONLY, D_length, I, AND, REGEX, JUMP, INVERSE;
+ extern char D_pattern[];
+@@ -22,7 +24,7 @@
+
+ /* bitap dispatches job */
+
+-bitap(old_D_pat, Pattern, fd, M, D)
++void bitap(old_D_pat, Pattern, fd, M, D)
+ char old_D_pat[], *Pattern; int fd, M, D;
+ {
+ char c;
+@@ -143,7 +145,7 @@
+ return;
+ }
+
+-fill_buf(fd, buf, record_size)
++int fill_buf(fd, buf, record_size)
+ int fd, record_size; unsigned char *buf;
+ {
+ int num_read=1;
diff --git a/textproc/agrep/files/patch-checkfile.c b/textproc/agrep/files/patch-checkfile.c
new file mode 100644
index 000000000000..3255d658550c
--- /dev/null
+++ b/textproc/agrep/files/patch-checkfile.c
@@ -0,0 +1,10 @@
+--- checkfile.c.orig 1992-01-17 20:14:42.000000000 +0100
++++ checkfile.c 2011-11-27 13:19:28.000000000 +0100
+@@ -65,6 +65,7 @@
+ return ISSOCKET;
+ }
+ */
++ return 0;
+ }
+ }
+
diff --git a/textproc/agrep/files/patch-compat.c b/textproc/agrep/files/patch-compat.c
new file mode 100644
index 000000000000..92a28e671dcb
--- /dev/null
+++ b/textproc/agrep/files/patch-compat.c
@@ -0,0 +1,29 @@
+--- compat.c.orig 1992-01-21 14:36:26.000000000 +0100
++++ compat.c 2011-11-27 13:25:35.000000000 +0100
+@@ -1,17 +1,18 @@
+ /* test the conflicts between options */
+ #include <stdio.h>
++#include <stdlib.h>
+
+ extern int FILENAMEONLY, APPROX, PAT_FILE, COUNT, INVERSE, BESTMATCH;
+-extern FILEOUT;
+-extern REGEX;
+-extern DELIMITER;
+-extern WHOLELINE;
+-extern LINENUM;
+-extern I, S, DD;
+-extern JUMP;
++extern int FILEOUT;
++extern int REGEX;
++extern int DELIMITER;
++extern int WHOLELINE;
++extern int LINENUM;
++extern int I, S, DD;
++extern int JUMP;
+ extern char Progname[32];
+
+-compat()
++void compat()
+ {
+ int i, j, k;
+ if(BESTMATCH) if(COUNT || FILENAMEONLY || APPROX || PAT_FILE) {
diff --git a/textproc/agrep/files/patch-main.c b/textproc/agrep/files/patch-main.c
new file mode 100644
index 000000000000..7c32b3b415b9
--- /dev/null
+++ b/textproc/agrep/files/patch-main.c
@@ -0,0 +1,126 @@
+--- main.c.orig 1992-04-14 22:41:24.000000000 +0200
++++ main.c 2011-11-27 13:36:45.000000000 +0100
+@@ -1,6 +1,14 @@
+ /* Copyright (c) 1991 Sun Wu and Udi Manber. All Rights Reserved. */
+ #include "agrep.h"
+ #include "checkfile.h"
++#include <unistd.h>
++#include <fcntl.h>
++
++int exponen(int m);
++void r_output (CHAR *buffer, int i, int end, int j);
++void file_out(char *fname);
++void usage(void);
++void checksg(CHAR *Pattern, int D);
+
+ unsigned Mask[MAXSYM];
+ unsigned Init1, NO_ERR_MASK, Init[MaxError];
+@@ -33,7 +41,7 @@
+ extern int init();
+ int table[WORD][WORD];
+
+-initial_value()
++void initial_value()
+ {
+ int i;
+
+@@ -51,7 +59,7 @@
+ for (i=0; i< MAXSYM; i++) Mask[i] = 0;
+ }
+
+-compute_next(M, Next, Next1)
++void compute_next(M, Next, Next1)
+ int M; unsigned *Next, *Next1;
+ {
+ int i, j=0, n, k, temp;
+@@ -110,7 +118,7 @@
+ return;
+ }
+
+-exponen(m)
++int exponen(m)
+ int m;
+ { int i, ex;
+ ex= 1;
+@@ -118,7 +126,7 @@
+ return(ex);
+ }
+
+-re1(Text, M, D)
++void re1(Text, M, D)
+ int Text, M, D;
+ {
+ register unsigned i, c, r0, r1, r2, r3, CMask, Newline, Init0, r_NO_ERR;
+@@ -393,7 +401,7 @@
+ return;
+ } /* re1 */
+
+-re(Text, M, D)
++void re(Text, M, D)
+ int Text, M, D;
+ {
+ register unsigned i, c, r1, r2, r3, CMask, k, Newline, Init0, Init1, end;
+@@ -595,7 +603,7 @@
+ } /* re */
+
+
+-r_output (buffer, i, end, j)
++void r_output (buffer, i, end, j)
+ int i, end, j;
+ CHAR *buffer;
+ {
+@@ -612,7 +620,7 @@
+ while (bp <= i ) putchar(buffer[bp++]);
+ }
+
+-main(argc, argv)
++int main(argc, argv)
+ int argc; char *argv[];
+ {
+ int N, M, D=0, fp, fd, i, j;
+@@ -751,7 +759,7 @@
+ }
+ if (!(PAT_FILE) && Pattern[0] == '\0') { /* Pattern not set with -e option */
+ if (argc == 0) usage();
+- strcpy(Pattern, *argv);
++ strncpy(Pattern, *argv, sizeof(Pattern));
+ argc--;
+ argv++;
+ }
+@@ -897,7 +905,7 @@
+ } /* end of main() */
+
+
+-file_out(fname)
++void file_out(fname)
+ char *fname;
+ {
+ int num_read;
+@@ -921,7 +929,7 @@
+ }
+
+
+-usage()
++void usage()
+ {
+ fprintf(stderr, "usage: %s [-#cdehiklnpstvwxBDGIS] [-f patternfile] pattern [files]\n", Progname);
+ printf("\n");
+@@ -942,7 +950,7 @@
+ exit(2);
+ }
+
+-checksg(Pattern, D)
++void checksg(Pattern, D)
+ CHAR *Pattern; int D;
+ {
+ char c;
+@@ -999,7 +1007,8 @@
+ return;
+ }
+
+-output (buffer, i1, i2, j)
++void output (register CHAR *buffer, int i1, int i2, int j);
++void output (buffer, i1, i2, j)
+ register CHAR *buffer; int i1, i2, j;
+ {
+ register CHAR *bp, *outend;
diff --git a/textproc/agrep/files/patch-maskgen.c b/textproc/agrep/files/patch-maskgen.c
new file mode 100644
index 000000000000..188abdff93c5
--- /dev/null
+++ b/textproc/agrep/files/patch-maskgen.c
@@ -0,0 +1,16 @@
+--- maskgen.c.orig 1992-01-17 20:14:43.000000000 +0100
++++ maskgen.c 2011-11-27 12:56:20.000000000 +0100
+@@ -2,11 +2,11 @@
+ #include "agrep.h"
+
+ extern unsigned D_endpos, endposition, Init1, wildmask;
+-extern Mask[], Bit[], Init[], NO_ERR_MASK;
++extern int Mask[], Bit[], Init[], NO_ERR_MASK;
+ extern int AND, SIMPLEPATTERN, REGEX, NOUPPER, D_length;
+ extern unsigned char Progname[];
+
+-maskgen(Pattern, D)
++int maskgen(Pattern, D)
+ unsigned char *Pattern; int D;
+ {
+ struct term { int flag; unsigned char class[WORD];
diff --git a/textproc/agrep/files/patch-mgrep.c b/textproc/agrep/files/patch-mgrep.c
index d7ac5b9730c8..367e33ac8474 100644
--- a/textproc/agrep/files/patch-mgrep.c
+++ b/textproc/agrep/files/patch-mgrep.c
@@ -1,14 +1,47 @@
---- mgrep.c.orig Thu Jun 26 21:03:50 2003
-+++ mgrep.c Thu Jun 26 21:03:53 2003
-@@ -1,6 +1,7 @@
+--- mgrep.c.orig 1992-04-11 00:12:27.000000000 +0200
++++ mgrep.c 2011-11-27 13:42:10.000000000 +0100
+@@ -1,7 +1,10 @@
/* Copyright (c) 1991 Sun Wu and Udi Manber. All Rights Reserved. */
/* multipattern matcher */
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
++#include <string.h>
++#include <unistd.h>
#define MAXPAT 256
#define MAXLINE 1024
-@@ -85,7 +86,7 @@
+ #define MAXSYM 256
+@@ -14,11 +17,16 @@
+ #define W_DELIM 128
+ #define L_DELIM 10
+
+-extern COUNT, FNAME, SILENT, FILENAMEONLY, num_of_matched;
+-extern INVERSE;
+-extern WORDBOUND, WHOLELINE, NOUPPER;
++void countline(unsigned char *text, int len);
++void monkey1( register unsigned char *text, int start, int end );
++void m_short( register unsigned char *text, int start, int end );
++void f_prep(int pat_index, unsigned char *Pattern);
++
++extern int COUNT, FNAME, SILENT, FILENAMEONLY, num_of_matched;
++extern int INVERSE;
++extern int WORDBOUND, WHOLELINE, NOUPPER;
+ extern unsigned char CurrentFileName[], Progname[];
+-extern total_line;
++extern int total_line;
+
+ int LONG = 0;
+ int SHORT = 0;
+@@ -37,7 +45,7 @@
+ unsigned char pat_len[max_num];
+
+
+-prepf(fp)
++void prepf(fp)
+ int fp;
+ {
+ int length=0, i, p=1, pdx=0, num_pat;
+@@ -85,7 +93,7 @@
if(p!=0 && p < p_size) p_size = p;
}
if(p_size == 0) {
@@ -17,3 +50,48 @@
exit(2);
}
if(length > 400 && p_size > 2) LONG = 1;
+@@ -98,7 +106,7 @@
+ }
+
+
+-mgrep(fd)
++void mgrep(fd)
+ int fd;
+ {
+ register char r_newline = '\n';
+@@ -136,7 +144,7 @@
+ return;
+ } /* end mgrep */
+
+-countline(text, len)
++void countline(text, len)
+ unsigned char *text; int len;
+ {
+ int i;
+@@ -144,7 +152,7 @@
+ }
+
+
+-monkey1( text, start, end )
++void monkey1( text, start, end )
+ int start, end; register unsigned char *text;
+ {
+ register unsigned char *textend;
+@@ -232,7 +240,7 @@
+ if(INVERSE && !COUNT) while(lastout <= textend) putchar(*lastout++);
+ }
+
+-m_short( text, start, end )
++void m_short( text, start, end )
+ int start, end; register unsigned char *text;
+ {
+ register unsigned char *textend;
+@@ -292,7 +300,7 @@
+ if(INVERSE && !COUNT) while(lastout <= textend) putchar(*lastout++);
+ }
+
+-f_prep(pat_index, Pattern)
++void f_prep(pat_index, Pattern)
+ unsigned char *Pattern ; int pat_index;
+ {
+ int i, j, m;
diff --git a/textproc/agrep/files/patch-preprocess.c b/textproc/agrep/files/patch-preprocess.c
new file mode 100644
index 000000000000..e663b3bb06ff
--- /dev/null
+++ b/textproc/agrep/files/patch-preprocess.c
@@ -0,0 +1,20 @@
+--- preprocess.c.orig 1992-01-17 20:14:43.000000000 +0100
++++ preprocess.c 2011-11-27 12:47:32.000000000 +0100
+@@ -14,6 +14,8 @@
+ /* D_pattern contains transformed D_pattern */
+
+ #include "agrep.h"
++
++extern int init(char *s, int table[32][32]);
+
+ extern int SIMPLEPATTERN, WHOLELINE, REGEX, RE_ERR, DELIMITER, TAIL, WORDBOUND;
+ extern int HEAD;
+@@ -21,7 +23,7 @@
+ extern int D_length;
+ extern int table[WORD][WORD];
+
+-preprocess(D_pattern, Pattern) /* need two parameters */
++void preprocess(D_pattern, Pattern) /* need two parameters */
+ CHAR *D_pattern, *Pattern;
+ {
+ CHAR temp[Maxline], *r_pat, *old_pat; /* r_pat for r.e. */
diff --git a/textproc/agrep/files/patch-sgrep.c b/textproc/agrep/files/patch-sgrep.c
index bd2f06baad7b..d03663c5e1d9 100644
--- a/textproc/agrep/files/patch-sgrep.c
+++ b/textproc/agrep/files/patch-sgrep.c
@@ -1,12 +1,195 @@
-
-$FreeBSD$
-
---- sgrep.c.orig Sat Apr 11 00:12:02 1992
-+++ sgrep.c Sun Jul 21 03:50:47 2002
-@@ -1,5 +1,6 @@
+--- sgrep.c.orig 1992-04-11 00:12:02.000000000 +0200
++++ sgrep.c 2011-11-27 12:44:11.000000000 +0100
+@@ -1,6 +1,9 @@
/* Copyright (c) 1991 Sun Wu and Udi Manber. All Rights Reserved. */
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
++#include <string.h>
++#include <unistd.h>
#define MAXSYM 256
#define MAXMEMBER 8192
+ #define CHARTYPE unsigned char
+@@ -18,10 +21,10 @@
+ #define LONG_APPX 24
+ #define W_DELIM 128
+
+-extern COUNT, FNAME, SILENT, FILENAMEONLY, num_of_matched;
+-extern DNA ; /* DNA flag is set in checksg when pattern is DNA pattern and
++extern int COUNT, FNAME, SILENT, FILENAMEONLY, num_of_matched;
++extern int DNA ; /* DNA flag is set in checksg when pattern is DNA pattern and
+ p_size > 16 */
+-extern WORDBOUND, WHOLELINE, NOUPPER;
++extern int WORDBOUND, WHOLELINE, NOUPPER;
+ extern unsigned char CurrentFileName[], Progname[];
+ extern unsigned Mask[];
+ extern unsigned endposition;
+@@ -30,6 +33,21 @@
+ unsigned char char_map[MAXSYM];
+
+
++void bm(CHARTYPE *pat, int m, CHARTYPE *text, CHARTYPE *textend);
++void initmask(CHARTYPE *pattern, unsigned *Mask, register int m, register int D, unsigned *endposition);
++void prep(CHARTYPE *Pattern, register int M, register int D);
++void agrep( register CHARTYPE *pat, int M, register CHARTYPE *text, register CHARTYPE *textend, int D );
++void s_output (CHARTYPE *text, int *i);
++void prep_bm(unsigned char *Pattern, register int m);
++void a_monkey( register unsigned char *pat, register int m, register unsigned char *text, register unsigned char *textend, register int D );
++void am_preprocess(CHARTYPE *Pattern);
++int verify(register int m, register int n, register int D, CHARTYPE *pat, CHARTYPE *text);
++void monkey( register unsigned char *pat, register int m, register unsigned char *text, register unsigned char *textend );
++void monkey4( register unsigned char *pat, int m, register unsigned char *text, register unsigned char *textend, int D );
++void m_preprocess(CHARTYPE *Pattern);
++void prep4(char *Pattern, int m);
++int blog(int base, int m );
++
+ /* data area */
+ int shift_1;
+ CHARTYPE SHIFT[MAXSYM];
+@@ -39,7 +57,7 @@
+ char MEMBER_1[MAXMEMBER_1];
+ CHARTYPE TR[MAXSYM];
+
+-char_tr(pat, m)
++void char_tr(pat, m)
+ unsigned char *pat;
+ int *m;
+ {
+@@ -64,7 +82,7 @@
+ }
+ }
+
+-sgrep(pat, m, fd, D)
++void sgrep(pat, m, fd, D)
+ CHARTYPE *pat; int fd, m, D;
+ {
+ CHARTYPE text[BLOCKSIZE+2*MAXLINE+MAXPATT]; /* input text stream */
+@@ -126,7 +144,7 @@
+ /* SUN: bm assumes that the content of text[n]...text[n+m-1] is
+ pat[m-1] such that the skip loop is guaranteed to terminated */
+
+-bm(pat, m, text, textend)
++void bm(pat, m, text, textend)
+ CHARTYPE *text, *textend, *pat; int m;
+ {
+ register int shift;
+@@ -179,7 +197,7 @@
+ /* initmask() initializes the mask table for the pattern */
+ /* endposition is a mask for the endposition of the pattern */
+ /* endposition will contain k mask bits if the pattern contains k fragments */
+-initmask(pattern, Mask, m, D, endposition)
++void initmask(pattern, Mask, m, D, endposition)
+ CHARTYPE *pattern; unsigned *Mask; register int m, D; unsigned *endposition;
+ {
+ register unsigned Bit1, c;
+@@ -202,7 +220,7 @@
+ }
+ }
+
+-prep(Pattern, M, D) /* preprocessing for partitioning_bm */
++void prep(Pattern, M, D) /* preprocessing for partitioning_bm */
+ CHARTYPE *Pattern; /* can be fine-tuned to choose a better partition */
+ register int M, D;
+ {
+@@ -250,7 +268,7 @@
+ }
+
+
+-agrep( pat, M, text, textend, D )
++void agrep( pat, M, text, textend, D )
+ int M, D ; register CHARTYPE *text, *textend, *pat;
+ {
+ register int i;
+@@ -357,7 +375,7 @@
+ return;
+ }
+
+-s_output (text, i)
++void s_output (text, i)
+ int *i; CHARTYPE *text;
+ {
+ int kk, bp;
+@@ -375,9 +393,9 @@
+ }
+
+
+-prep_bm(Pattern, m)
++void prep_bm(Pattern, m)
+ unsigned char *Pattern;
+- register m;
++ register int m;
+ {
+ int i, j;
+ unsigned hash;
+@@ -404,7 +422,7 @@
+
+ /* a_monkey() the approximate monkey move */
+
+-a_monkey( pat, m, text, textend, D )
++void a_monkey( pat, m, text, textend, D )
+ register int m, D ; register CHARTYPE *text, *textend, *pat;
+ {
+ register CHARTYPE *oldtext;
+@@ -451,7 +469,7 @@
+
+ CHARTYPE SHIFT_2[MAX_SHIFT_2];
+
+-monkey( pat, m, text, textend )
++void monkey( pat, m, text, textend )
+ register int m ; register CHARTYPE *text, *textend, *pat;
+ {
+ register unsigned hash, i;
+@@ -494,7 +512,7 @@
+ }
+ }
+
+-am_preprocess(Pattern)
++void am_preprocess(Pattern)
+ CHARTYPE *Pattern;
+ {
+ int i, j, m;
+@@ -511,7 +529,7 @@
+ }
+
+
+-verify(m, n, D, pat, text)
++int verify(m, n, D, pat, text)
+ register int m, n, D;
+ CHARTYPE *pat, *text;
+ {
+@@ -566,7 +584,7 @@
+
+ /* preprocessing for monkey() */
+
+-m_preprocess(Pattern)
++void m_preprocess(Pattern)
+ CHARTYPE *Pattern;
+ {
+ int i, j, m;
+@@ -595,7 +613,7 @@
+
+ char *MEMBER_D;
+
+-monkey4( pat, m, text, textend, D )
++void monkey4( pat, m, text, textend, D )
+ register int m, D ; register unsigned char *text, *pat, *textend;
+ {
+ register unsigned char *oldtext;
+@@ -639,7 +657,7 @@
+ }
+ }
+
+-prep4(Pattern, m)
++void prep4(Pattern, m)
+ char *Pattern; int m;
+ {
+ int i, j, k;
+@@ -672,7 +690,7 @@
+ }
+ }
+
+-blog(base, m )
++int blog(base, m )
+ int base, m;
+ {
+ int i, exp;
diff --git a/textproc/agrep/files/patch-strncpy b/textproc/agrep/files/patch-strncpy
deleted file mode 100644
index 258f9af23f62..000000000000
--- a/textproc/agrep/files/patch-strncpy
+++ /dev/null
@@ -1,11 +0,0 @@
---- main.c 2003/11/12 14:09:11 1.1
-+++ main.c 2003/11/12 14:09:31
-@@ -751,7 +751,7 @@
- }
- if (!(PAT_FILE) && Pattern[0] == '\0') { /* Pattern not set with -e option */
- if (argc == 0) usage();
-- strcpy(Pattern, *argv);
-+ strncpy(Pattern, *argv, sizeof(Pattern));
- argc--;
- argv++;
- }