home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume4
/
match1.2
/
README
< prev
next >
Wrap
Text File
|
1986-11-30
|
2KB
|
40 lines
Match is a fast pattern matching utility, intended to be almost
identical in functionality to fgrep (ugh!) but much faster. It uses
MATCHC instruction on VAX computers. Apparently, it is faster than
BM only on the VAX 780 - on the Microvax it is much slower than bm.
*** NOTE *** There are certain system dependencies in the code.
Some systems use "index", others "strchr" to find a character in a
string: this affects MkDescVec.c. A #ifdef checks this.
Please check whether your system uses <strings.h> or <string.h>.
If it uses strings.h, delete "-DSTRINGS" from the line
CFLAGS = -O -DSTRINGS -DBCOPY
in the Makefile. This affects match.c/bm.c, MkDescVec.c, and PrintLine.c.
Also check whether your system has "bcopy".
If it uses strings.h, comment out "-DBCOPY" from the line
CFLAGS = -O -DSTRINGS -DBCOPY
in the Makefile. This affects MoveResidue.c
The files are:
Execute.c: search a file for the patterns
Extern.h: declarations of externs
GetPatFile.c: read in patterns from a file and set up a vector of
pattern descriptors
Global.c: global variables (complement to Extern.h)
MakeDesc.c: create a pattern descriptor for one pattern
Makefile: you can figure this one out for yourself
MatchFound.c: what to do when you actually FIND a pattern - print it,
update flags, etc.
MkDescVec.c: make a vector of pattern descriptors, given a string
of newline-separated patterns
MoveResidue.c: when you come to the end of the buffer, move the
unsearched "residue" to the beginning and start again
PrintLine.c: print the appropriate stuff after finding a match
PutUsage.c: mini-man page.
README: this file
Search.s: the guts. Calls MATCH
match.c: mainline. mostly interpreting the command line and tidying
up at the end. Calls Execute for each file.
match.h: constants
match.1: man page