Blob Blame History Raw
.fp 5 CW
.de Af
.ds ;G \\*(;G\\f\\$1\\$3\\f\\$2
.if !\\$4 .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
..
.de aF
.ie \\$3 .ft \\$1
.el \{\
.ds ;G \&
.nr ;G \\n(.f
.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
\\*(;G
.ft \\n(;G \}
..
.de L
.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.de LR
.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.de RL
.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.de EX		\" start example
.ta 1i 2i 3i 4i 5i 6i
.PP
.RS 
.PD 0
.ft 5
.nf
..
.de EE		\" end example
.fi
.ft
.PD
.RE
.PP
..
.TH FIND 3
.SH NAME
find \- fastfind algorithm interface
.SH SYNOPSIS
.EX
#include <find.h>

void* findopen(const char* \fIpattern\fP);
char* findnext(void* \fIhandle\fP);
void findclose(void* \fIhandle\fP);
.EE
.SH DESCRIPTION
These routines access the data generated by the
.I fastfind
algorithm.
The data itself is generated by a standalone program that is run daily
via
.I cron
or
.IR at .
.PP
.L findopen 
returns a handle to a 
.I fastfind
stream for the 
.I ksh 
file pattern
.IR pattern .
.L findnext
returns the next pathname that matches the pattern specified by
.IR handle .
.L findnext
returns 
.L 0
when no more pathnames match the pattern.
Finally,
.L findclose
closes the
.I fastfind
stream for
.IR handle .
.SH BUGS
These rotuines are only as good as the
.I fastfind
information which is in the system administration domain.
.SH "SEE ALSO"
tw(1),
find(1),
strmatch(3)
.br
James A. Woods, \fIFast Find Algorithm\fP, Usenix ;login:, February/March, 1983, p. 8