the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: agrep
Version: 2.04
Revision: 18
Source: ftp://ftp.cs.arizona.edu/agrep/%n-%v.tar.Z
Source-MD5: abc645404d3926a57c3f5e86a6e89ee9
setCFLAGS: -O3
DocFiles: COPYRIGHT README agrep.algorithms agrep.chronicle contribution.list
#
Patch: %n.patch
CompileScript: <<
#! /bin/sh -ex
export CFLAGS=-O3
make
<<
InstallScript: <<
/usr/bin/install -d -m 755 %i/bin
/usr/bin/install -d -m 755 %i/share/man/man1
/usr/bin/install -c -p -m 755 agrep %i/bin/agrep
/usr/bin/install -c -p -m 644 agrep.1 %i/share/man/man1/agrep.1
<<
Description: Flexible egrep/fregrep replacement
DescDetail: <<
The three most significant features of agrep that are not supported by
the grep family are
1) the ability to search for approximate patterns;
for example, "agrep -2 homogenos foo" will find homogeneous as well
as any other word that can be obtained from homogenos with at most
2 substitutions, insertions, or deletions.
"agrep -B homogenos foo" will generate a message of the form
best match has 2 errors, there are 5 matches, output them? (y/n)
2) agrep is record oriented rather than just line oriented; a record
is by default a line, but it can be user defined;
for example, "agrep -d '^From ' 'pizza' mbox"
outputs all mail messages that contain the keyword "pizza".
Another example: "agrep -d '$$' pattern foo" will output all
paragraphs (separated by an empty line) that contain pattern.
3) multiple patterns with AND (or OR) logic queries.
For example, "agrep -d '^From ' 'burger,pizza' mbox"
outputs all mail messages containing at least one of the
two keywords (, stands for OR).
"agrep -d '^From ' 'good;pizza' mbox" outputs all mail messages
containing both keywords.
<<
DescPort: <<
The license is not 100% clear, yet BSD seems to fit it best
<<
Homepage: ftp://ftp.cs.arizona.edu/agrep/
Maintainer: Darian Lanx
License: BSD
diff -Nru3 agrep-2.04/Makefile agrep-patched/Makefile
--- agrep-2.04/Makefile 1992-01-17 20:15:31.000000000 +0100
+++ agrep-patched/Makefile 2003-11-17 23:34:03.000000000 +0100
@@ -1,4 +1,4 @@
-CFLAGS = -O
+CFLAGS = -O3
PROG = agrep
HDRS = agrep.h checkfile.h re.h
@@ -19,7 +19,7 @@
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS)
-
+ /usr/bin/strip $(PROG)
clean:
-rm -f $(OBJS) core a.out
Binary files agrep-2.04/agrep and agrep-patched/agrep differ
diff -Nru3 agrep-2.04/agrep.h agrep-patched/agrep.h
--- agrep-2.04/agrep.h 1992-01-17 20:15:13.000000000 +0100
+++ agrep-patched/agrep.h 2003-11-17 23:12:15.000000000 +0100
@@ -1,10 +1,10 @@
#include
+#include
+#include
#include
#include
#include "re.h"
-extern unsigned char *strcpy(), *strncpy(), *strcat();
-extern int strlen();
#define CHAR unsigned char
#define MAXPAT 128
#define MAXPATT 256
diff -Nru3 agrep-2.04/follow.c agrep-patched/follow.c
--- agrep-2.04/follow.c 1992-01-17 20:14:42.000000000 +0100
+++ agrep-patched/follow.c 2003-11-17 23:12:21.000000000 +0100
@@ -3,14 +3,12 @@
construction. */
#include
+#include
+#include
#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 -Nru3 agrep-2.04/mgrep.c agrep-patched/mgrep.c
--- agrep-2.04/mgrep.c 1992-04-11 00:12:27.000000000 +0200
+++ agrep-patched/mgrep.c 2003-11-17 23:12:25.000000000 +0100
@@ -1,6 +1,7 @@
/* Copyright (c) 1991 Sun Wu and Udi Manber. All Rights Reserved. */
/* multipattern matcher */
#include
+#include
#include
#define MAXPAT 256
#define MAXLINE 1024
@@ -85,7 +86,7 @@
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;
diff -Nru3 agrep-2.04/parse.c agrep-patched/parse.c
--- agrep-2.04/parse.c 1992-01-17 20:14:43.000000000 +0100
+++ agrep-patched/parse.c 2003-11-17 23:12:29.000000000 +0100
@@ -3,6 +3,7 @@
tree for that regular expression. */
#include
+#include
#include "re.h"
#define FALSE 0
diff -Nru3 agrep-2.04/sgrep.c agrep-patched/sgrep.c
--- agrep-2.04/sgrep.c 1992-04-11 00:12:02.000000000 +0200
+++ agrep-patched/sgrep.c 2003-11-17 23:12:33.000000000 +0100
@@ -1,5 +1,6 @@
/* Copyright (c) 1991 Sun Wu and Udi Manber. All Rights Reserved. */
#include
+#include
#include
#define MAXSYM 256
#define MAXMEMBER 8192
diff -Nru3 agrep-2.04/utilities.c agrep-patched/utilities.c
--- agrep-2.04/utilities.c 1992-01-17 20:14:43.000000000 +0100
+++ agrep-patched/utilities.c 2003-11-17 23:12:36.000000000 +0100
@@ -2,6 +2,7 @@
and manipulating regular expression syntax trees. */
#include
+#include
#include "re.h"
/************************************************************************/
Package: agrep
Version: 2.04
Revision: 18
Source: ftp://ftp.cs.arizona.edu/agrep/%n-%v.tar.Z
Source-MD5: abc645404d3926a57c3f5e86a6e89ee9
setCFLAGS: -O3
DocFiles: COPYRIGHT README agrep.algorithms agrep.chronicle contribution.list
#
Patch: %n.patch
CompileScript: <<
#! /bin/sh -ex
export CFLAGS=-O3
make
<<
InstallScript: <<
/usr/bin/install -d -m 755 %i/bin
/usr/bin/install -d -m 755 %i/share/man/man1
/usr/bin/install -c -p -m 755 agrep %i/bin/agrep
/usr/bin/install -c -p -m 644 agrep.1 %i/share/man/man1/agrep.1
<<
Description: Flexible egrep/fregrep replacement
DescDetail: <<
The three most significant features of agrep that are not supported by
the grep family are
1) the ability to search for approximate patterns;
for example, "agrep -2 homogenos foo" will find homogeneous as well
as any other word that can be obtained from homogenos with at most
2 substitutions, insertions, or deletions.
"agrep -B homogenos foo" will generate a message of the form
best match has 2 errors, there are 5 matches, output them? (y/n)
2) agrep is record oriented rather than just line oriented; a record
is by default a line, but it can be user defined;
for example, "agrep -d '^From ' 'pizza' mbox"
outputs all mail messages that contain the keyword "pizza".
Another example: "agrep -d '$$' pattern foo" will output all
paragraphs (separated by an empty line) that contain pattern.
3) multiple patterns with AND (or OR) logic queries.
For example, "agrep -d '^From ' 'burger,pizza' mbox"
outputs all mail messages containing at least one of the
two keywords (, stands for OR).
"agrep -d '^From ' 'good;pizza' mbox" outputs all mail messages
containing both keywords.
<<
DescPort: <<
The license is not 100% clear, yet BSD seems to fit it best
<<
Homepage: ftp://ftp.cs.arizona.edu/agrep/
Maintainer: Darian Lanx
License: BSD
diff -Nru3 agrep-2.04/Makefile agrep-patched/Makefile
--- agrep-2.04/Makefile 1992-01-17 20:15:31.000000000 +0100
+++ agrep-patched/Makefile 2003-11-17 23:34:03.000000000 +0100
@@ -1,4 +1,4 @@
-CFLAGS = -O
+CFLAGS = -O3
PROG = agrep
HDRS = agrep.h checkfile.h re.h
@@ -19,7 +19,7 @@
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS)
-
+ /usr/bin/strip $(PROG)
clean:
-rm -f $(OBJS) core a.out
Binary files agrep-2.04/agrep and agrep-patched/agrep differ
diff -Nru3 agrep-2.04/agrep.h agrep-patched/agrep.h
--- agrep-2.04/agrep.h 1992-01-17 20:15:13.000000000 +0100
+++ agrep-patched/agrep.h 2003-11-17 23:12:15.000000000 +0100
@@ -1,10 +1,10 @@
#include
+#include
+#include
#include
#include
#include "re.h"
-extern unsigned char *strcpy(), *strncpy(), *strcat();
-extern int strlen();
#define CHAR unsigned char
#define MAXPAT 128
#define MAXPATT 256
diff -Nru3 agrep-2.04/follow.c agrep-patched/follow.c
--- agrep-2.04/follow.c 1992-01-17 20:14:42.000000000 +0100
+++ agrep-patched/follow.c 2003-11-17 23:12:21.000000000 +0100
@@ -3,14 +3,12 @@
construction. */
#include
+#include
+#include
#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 -Nru3 agrep-2.04/mgrep.c agrep-patched/mgrep.c
--- agrep-2.04/mgrep.c 1992-04-11 00:12:27.000000000 +0200
+++ agrep-patched/mgrep.c 2003-11-17 23:12:25.000000000 +0100
@@ -1,6 +1,7 @@
/* Copyright (c) 1991 Sun Wu and Udi Manber. All Rights Reserved. */
/* multipattern matcher */
#include
+#include
#include
#define MAXPAT 256
#define MAXLINE 1024
@@ -85,7 +86,7 @@
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;
diff -Nru3 agrep-2.04/parse.c agrep-patched/parse.c
--- agrep-2.04/parse.c 1992-01-17 20:14:43.000000000 +0100
+++ agrep-patched/parse.c 2003-11-17 23:12:29.000000000 +0100
@@ -3,6 +3,7 @@
tree for that regular expression. */
#include
+#include
#include "re.h"
#define FALSE 0
diff -Nru3 agrep-2.04/sgrep.c agrep-patched/sgrep.c
--- agrep-2.04/sgrep.c 1992-04-11 00:12:02.000000000 +0200
+++ agrep-patched/sgrep.c 2003-11-17 23:12:33.000000000 +0100
@@ -1,5 +1,6 @@
/* Copyright (c) 1991 Sun Wu and Udi Manber. All Rights Reserved. */
#include
+#include
#include
#define MAXSYM 256
#define MAXMEMBER 8192
diff -Nru3 agrep-2.04/utilities.c agrep-patched/utilities.c
--- agrep-2.04/utilities.c 1992-01-17 20:14:43.000000000 +0100
+++ agrep-patched/utilities.c 2003-11-17 23:12:36.000000000 +0100
@@ -2,6 +2,7 @@
and manipulating regular expression syntax trees. */
#include
+#include
#include "re.h"
/************************************************************************/