git: 38968fa4ef4f - main - textproc/agrep: Update to 3.41.5
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Apr 2024 18:28:56 UTC
The branch main has been updated by dinoex: URL: https://cgit.FreeBSD.org/ports/commit/?id=38968fa4ef4faad856e5863df96c3d6f0c55f028 commit 38968fa4ef4faad856e5863df96c3d6f0c55f028 Author: Dirk Meyer <dinoex@FreeBSD.org> AuthorDate: 2024-04-22 18:28:38 +0000 Commit: Dirk Meyer <dinoex@FreeBSD.org> CommitDate: 2024-04-22 18:28:38 +0000 textproc/agrep: Update to 3.41.5 --- textproc/agrep/Makefile | 38 +++---- textproc/agrep/distinfo | 11 +- textproc/agrep/files/patch-Makefile | 29 +++++ textproc/agrep/files/patch-agrep.h | 53 --------- textproc/agrep/files/patch-asearch.c | 22 ---- textproc/agrep/files/patch-asearch1.c | 11 -- textproc/agrep/files/patch-bitap.c | 29 ----- textproc/agrep/files/patch-checkfile.c | 10 -- textproc/agrep/files/patch-compat.c | 29 ----- textproc/agrep/files/patch-follow.c | 19 ---- textproc/agrep/files/patch-main.c | 126 --------------------- textproc/agrep/files/patch-maskgen.c | 16 --- textproc/agrep/files/patch-mgrep.c | 97 ---------------- textproc/agrep/files/patch-parse.c | 10 -- textproc/agrep/files/patch-preprocess.c | 20 ---- textproc/agrep/files/patch-sgrep.c | 195 -------------------------------- textproc/agrep/files/patch-utilities.c | 10 -- textproc/agrep/pkg-plist | 6 + 18 files changed, 55 insertions(+), 676 deletions(-) diff --git a/textproc/agrep/Makefile b/textproc/agrep/Makefile index a0bac90f0f6e..cf6b889d4133 100644 --- a/textproc/agrep/Makefile +++ b/textproc/agrep/Makefile @@ -1,42 +1,34 @@ PORTNAME= agrep -PORTVERSION= 2.04 -PORTREVISION= 3 +PORTVERSION= 3.41.5 CATEGORIES= textproc -MASTER_SITES= ftp://ftp.dinoex.org/pub/agrep/ \ - ftp://ftp.dinoex.org/pub/agrep/:doc -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ - agrep.ps.1.Z:doc agrep.ps.2.Z:doc -EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +PATCH_SITES= ftp://ftp.dinoex.org/pub/agrep/ +PATCHFILES= agrep-patch-ansi1 MAINTAINER= dinoex@FreeBSD.org COMMENT= Approximate grep (fast approximate pattern-matching tool) -# Converted from NO_CDROM -LICENSE= agrep -LICENSE_NAME= agrep -LICENSE_TEXT= No redistribution for profit -LICENSE_PERMS= dist-mirror pkg-mirror auto-accept - -USES= tar:Z - -CONFLICTS_INSTALL= rubygem-amatch # bin/agrep +LICENSE= ISCL -ALL_TARGET= -MAKE_ARGS= CFLAGS="${CFLAGS}" -PLIST_FILES= bin/agrep share/man/man1/agrep.1.gz -PORTDOCS= COPYRIGHT agrep.algorithms agrep.ps.1.Z agrep.ps.2.Z +USES= gmake +USE_GITHUB= yes +GH_ACCOUNT= Wikinaut +GH_TAGNAME= 7b7f350 +ALL_TARGET= ${PORTNAME} +CFLAGS+= -Wno-pointer-sign +PORTDOCS= CHANGES COPYRIGHT README.md OPTIONS_DEFINE= DOCS post-extract: - ${CP} ${DISTDIR}/agrep.ps.1.Z ${DISTDIR}/agrep.ps.2.Z ${WRKSRC}/ + ${RM} -v ${WRKSRC}/*.orig do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/agrep ${STAGEDIR}${PREFIX}/bin/ - ${INSTALL_MAN} ${WRKSRC}/agrep.1 ${STAGEDIR}${PREFIX}/share/man/man1/ + ${INSTALL_PROGRAM} ${WRKSRC}/agrep ${STAGEDIR}${PREFIX}/bin/agrep do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/ .include <bsd.port.mk> diff --git a/textproc/agrep/distinfo b/textproc/agrep/distinfo index 2cd915d78344..41a6d77aa56e 100644 --- a/textproc/agrep/distinfo +++ b/textproc/agrep/distinfo @@ -1,6 +1,5 @@ -SHA256 (agrep-2.04.tar.Z) = 31275a2fee28fb8966e1978d26fe8113b61ce49b39e68ddf4cad3964db72d5f8 -SIZE (agrep-2.04.tar.Z) = 62351 -SHA256 (agrep.ps.1.Z) = 34c342b546c7609a8e87863d94cb4927ec60e6ccd4b5e5324ac7cca4793b3ce2 -SIZE (agrep.ps.1.Z) = 74055 -SHA256 (agrep.ps.2.Z) = 59f8a9e019e6c1c01c05abd09ce319f9af96b676537039819575f66a60b2e8b0 -SIZE (agrep.ps.2.Z) = 41544 +TIMESTAMP = 1713810375 +SHA256 (Wikinaut-agrep-3.41.5-7b7f350_GH0.tar.gz) = d3d5bfd631359056d47ed2c8c37dc5f661c31074ae525a5386d9a0f455136123 +SIZE (Wikinaut-agrep-3.41.5-7b7f350_GH0.tar.gz) = 3652802 +SHA256 (agrep-patch-ansi1) = a6161b483c144f3791ba66e9fa25c92423570d9d11c576e22e3f221f02d13ce7 +SIZE (agrep-patch-ansi1) = 22304 diff --git a/textproc/agrep/files/patch-Makefile b/textproc/agrep/files/patch-Makefile new file mode 100644 index 000000000000..e03a8b7b2ec8 --- /dev/null +++ b/textproc/agrep/files/patch-Makefile @@ -0,0 +1,29 @@ +--- Makefile.orig 2016-10-22 12:40:44 UTC ++++ Makefile +@@ -14,7 +14,7 @@ + # use + # make CROSS=i686-pc-mingw32- + +-CC=$(CROSS)gcc ++#CC=$(CROSS)gcc + + + # --------------------------------------------------------------------- +@@ -59,7 +59,7 @@ MYDEFINEFLAGS = -DMEASURE_TIMES=0 \ + + # -Werror=no-unprototyped-calls + +-CFLAGS = $(MYDEFINEFLAGS) $(SUBDIRCFLAGS) ++CFLAGS += $(MYDEFINEFLAGS) $(SUBDIRCFLAGS) + OTHERLIBS = + + PROG = agrep +@@ -96,7 +96,7 @@ $(PROG).exe: $(OBJS) $(HDRS) + else + + $(PROG): $(OBJS) $(HDRS) +- $(CC) -o $(PROG) $(OBJS) ++ $(CC) -o $(PROG) ${LDFLAGS} $(OBJS) + + endif + diff --git a/textproc/agrep/files/patch-agrep.h b/textproc/agrep/files/patch-agrep.h deleted file mode 100644 index ad471eb05dac..000000000000 --- a/textproc/agrep/files/patch-agrep.h +++ /dev/null @@ -1,53 +0,0 @@ ---- agrep.h.orig 1992-01-17 19:15:13 UTC -+++ agrep.h -@@ -1,10 +1,10 @@ - #include <stdio.h> -+#include <stdlib.h> -+#include <string.h> - #include <math.h> - #include <ctype.h> - #include "re.h" - --extern unsigned char *strcpy(), *strncpy(), *strcat(); --extern int strlen(); - #define CHAR unsigned char - #define MAXPAT 128 - #define MAXPATT 256 -@@ -52,3 +52,37 @@ extern int strlen(); - #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 deleted file mode 100644 index eedc7b9b94cd..000000000000 --- a/textproc/agrep/files/patch-asearch.c +++ /dev/null @@ -1,22 +0,0 @@ ---- asearch.c.orig 1992-01-24 01:49:08 UTC -+++ asearch.c -@@ -6,7 +6,9 @@ extern int DELIMITER, FILENAMEONLY, INVE - 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 @@ Nextchar1: i=i+1; - 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 deleted file mode 100644 index 6b5e25f8b2a0..000000000000 --- a/textproc/agrep/files/patch-asearch1.c +++ /dev/null @@ -1,11 +0,0 @@ ---- asearch1.c.orig 1992-01-17 21:00:38 UTC -+++ asearch1.c -@@ -8,7 +8,7 @@ extern char CurrentFileName[]; - 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 deleted file mode 100644 index f9f831fe2dda..000000000000 --- a/textproc/agrep/files/patch-bitap.c +++ /dev/null @@ -1,29 +0,0 @@ ---- bitap.c.orig 1992-01-17 21:00:15 UTC -+++ bitap.c -@@ -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 @@ extern int num_of_matched; - - /* 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 @@ char buffer[Max_record+Max_record+BlockS - 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 deleted file mode 100644 index 99f2edf95e11..000000000000 --- a/textproc/agrep/files/patch-checkfile.c +++ /dev/null @@ -1,10 +0,0 @@ ---- checkfile.c.orig 1992-01-17 19:14:42 UTC -+++ checkfile.c -@@ -65,6 +65,7 @@ int ftype; - return ISSOCKET; - } - */ -+ return 0; - } - } - diff --git a/textproc/agrep/files/patch-compat.c b/textproc/agrep/files/patch-compat.c deleted file mode 100644 index d87c299f81db..000000000000 --- a/textproc/agrep/files/patch-compat.c +++ /dev/null @@ -1,29 +0,0 @@ ---- compat.c.orig 1992-01-21 13:36:26 UTC -+++ compat.c -@@ -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-follow.c b/textproc/agrep/files/patch-follow.c deleted file mode 100644 index 64ff83378930..000000000000 --- a/textproc/agrep/files/patch-follow.c +++ /dev/null @@ -1,19 +0,0 @@ ---- follow.c.orig 1992-01-17 19:14:42 UTC -+++ follow.c -@@ -3,14 +3,12 @@ - construction. */ - - #include <stdio.h> -+#include <stdlib.h> -+#include <string.h> - #include "re.h" - --extern char *strncpy(), *strcat(), *strcpy(); --extern int strlen(); -- - #define TRUE 1 - --extern char *malloc(); - extern Pset pset_union(); - extern int pos_cnt; - extern Re_node parse(); diff --git a/textproc/agrep/files/patch-main.c b/textproc/agrep/files/patch-main.c deleted file mode 100644 index 48ec4a749294..000000000000 --- a/textproc/agrep/files/patch-main.c +++ /dev/null @@ -1,126 +0,0 @@ ---- main.c.orig 1992-04-14 20:41:24 UTC -+++ main.c -@@ -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 @@ int NOFILENAME = 0, /* Boolean flag, s - extern int init(); - int table[WORD][WORD]; - --initial_value() -+void initial_value() - { - int i; - -@@ -51,7 +59,7 @@ initial_value() - 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 @@ int M; unsigned *Next, *Next1; - return; - } - --exponen(m) -+int exponen(m) - int m; - { int i, ex; - ex= 1; -@@ -118,7 +126,7 @@ int m; - 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 @@ Nextchar1: i=i+1; - 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 @@ Nextchar1: i++; - } /* re */ - - --r_output (buffer, i, end, j) -+void r_output (buffer, i, end, j) - int i, end, j; - CHAR *buffer; - { -@@ -612,7 +620,7 @@ int bp; - 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 @@ int argc; char *argv[]; - } - 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 @@ CONT: - } /* end of main() */ - - --file_out(fname) -+void file_out(fname) - char *fname; - { - int num_read; -@@ -921,7 +929,7 @@ CHAR buf[4097]; - } - - --usage() -+void usage() - { - fprintf(stderr, "usage: %s [-#cdehiklnpstvwxBDGIS] [-f patternfile] pattern [files]\n", Progname); - printf("\n"); -@@ -942,7 +950,7 @@ usage() - exit(2); - } - --checksg(Pattern, D) -+void checksg(Pattern, D) - CHAR *Pattern; int D; - { - char c; -@@ -999,7 +1007,8 @@ CHAR *Pattern; int D; - 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 deleted file mode 100644 index f6aef650e9c5..000000000000 --- a/textproc/agrep/files/patch-maskgen.c +++ /dev/null @@ -1,16 +0,0 @@ ---- maskgen.c.orig 1992-01-17 19:14:43 UTC -+++ maskgen.c -@@ -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 deleted file mode 100644 index 57aba592defe..000000000000 --- a/textproc/agrep/files/patch-mgrep.c +++ /dev/null @@ -1,97 +0,0 @@ ---- mgrep.c.orig 1992-04-10 22:12:27 UTC -+++ mgrep.c -@@ -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 - #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 *patt[max_num]; - 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 @@ int fp; - if(p!=0 && p < p_size) p_size = p; - } - if(p_size == 0) { -- fprintf(stderr, "%s: the pattern file is empty\n"); -+ fprintf(stderr, "%s: the pattern file is empty\n", Progname); - exit(2); - } - if(length > 400 && p_size > 2) LONG = 1; -@@ -98,7 +106,7 @@ int fp; - } - - --mgrep(fd) -+void mgrep(fd) - int fd; - { - register char r_newline = '\n'; -@@ -136,7 +144,7 @@ int fd; - return; - } /* end mgrep */ - --countline(text, len) -+void countline(text, len) - unsigned char *text; int len; - { - int i; -@@ -144,7 +152,7 @@ int i; - } - - --monkey1( text, start, end ) -+void monkey1( text, start, end ) - int start, end; register unsigned char *text; - { - register unsigned char *textend; -@@ -232,7 +240,7 @@ while (text <= textend) { - 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 @@ while (++text <= textend) { - 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-parse.c b/textproc/agrep/files/patch-parse.c deleted file mode 100644 index 1f44b9c377b6..000000000000 --- a/textproc/agrep/files/patch-parse.c +++ /dev/null @@ -1,10 +0,0 @@ ---- parse.c.orig 1992-01-17 19:14:43 UTC -+++ parse.c -@@ -3,6 +3,7 @@ - tree for that regular expression. */ - - #include <stdio.h> -+#include <stdlib.h> - #include "re.h" - - #define FALSE 0 diff --git a/textproc/agrep/files/patch-preprocess.c b/textproc/agrep/files/patch-preprocess.c deleted file mode 100644 index 39ddd171534d..000000000000 --- a/textproc/agrep/files/patch-preprocess.c +++ /dev/null @@ -1,20 +0,0 @@ ---- preprocess.c.orig 1992-01-17 19:14:43 UTC -+++ preprocess.c -@@ -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 CHAR Progname[]; - 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 deleted file mode 100644 index 545a1a6a7b81..000000000000 --- a/textproc/agrep/files/patch-sgrep.c +++ /dev/null @@ -1,195 +0,0 @@ ---- sgrep.c.orig 1992-04-10 22:12:02 UTC -+++ sgrep.c -@@ -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 BSize; /* l - 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 @@ unsigned Hashmask; - 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 @@ unsigned char temp[MAXPATT]; - } - } - --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 @@ CHARTYPE *pat; int fd, m, D; - /* 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 @@ return; - /* 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 @@ CHARTYPE *pattern; unsigned *Mask; regis - } - } - --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 @@ unsigned hash, b_size = 3; - } - - --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 @@ int M, D ; register CHARTYPE *text, *tex - return; - } - --s_output (text, i) -+void s_output (text, i) - int *i; CHARTYPE *text; - { - int kk, bp; -@@ -375,9 +393,9 @@ int kk, bp; - } - - --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 @@ unsigned char lastc; - - /* 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 @@ register int m1 = m-1-D, j, pos; - - 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 @@ r_newline = '\n'; - } - } - --am_preprocess(Pattern) -+void am_preprocess(Pattern) - CHARTYPE *Pattern; - { - int i, j, m; -@@ -511,7 +529,7 @@ unsigned hash; - } - - --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 @@ CHARTYPE *pat, *text; - - /* preprocessing for monkey() */ - --m_preprocess(Pattern) -+void m_preprocess(Pattern) - CHARTYPE *Pattern; - { - int i, j, m; -@@ -595,7 +613,7 @@ unsigned hash; - - 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 @@ register int m1=m-1-D, j, pos; - } - } - --prep4(Pattern, m) -+void prep4(Pattern, m) - char *Pattern; int m; - { - int i, j, k; -@@ -672,7 +690,7 @@ char_map['n'] = char_map['n'] = 5; - } - } - --blog(base, m ) -+int blog(base, m ) - int base, m; - { - int i, exp; diff --git a/textproc/agrep/files/patch-utilities.c b/textproc/agrep/files/patch-utilities.c deleted file mode 100644 index d9fcf2f1af14..000000000000 --- a/textproc/agrep/files/patch-utilities.c +++ /dev/null @@ -1,10 +0,0 @@ ---- utilities.c.orig 1992-01-17 19:14:43 UTC -+++ utilities.c -@@ -2,6 +2,7 @@ - and manipulating regular expression syntax trees. */ - - #include <stdio.h> -+#include <stdlib.h> - #include "re.h" - - /************************************************************************/ diff --git a/textproc/agrep/pkg-plist b/textproc/agrep/pkg-plist new file mode 100644 index 000000000000..2ee19a007ec8 --- /dev/null +++ b/textproc/agrep/pkg-plist @@ -0,0 +1,6 @@ +bin/agrep +%%PORTDOCS%%%%DOCSDIR%%/AGREP_A_FAST_ APPROXIMATE_PATTERN-MATCHING_TOOL_1992_agrep2.pdf +%%PORTDOCS%%%%DOCSDIR%%/FAST_TEXT_ SEARCHING_WITH ERRORS_199106_ agrep1.pdf +%%PORTDOCS%%%%DOCSDIR%%/GLIMPSE_A_Tool_to_Search_Through_Entire_File_Systems_199310_glimpse.pdf +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/agrep-and-glimpse-docs.zip