.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "TEXTSEARCH_PREPARE" "9" "09 October 2005" "" ""
.SH NAME
textsearch_prepare \- Prepare a search
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
struct ts_config * textsearch_prepare (const char * \fIalgo\fB, const void * \fIpattern\fB, unsigned int \fIlen\fB, int \fIgfp_mask\fB, int \fIflags\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIalgo\fB\fR
name of search algorithm
.TP
\fB\fIpattern\fB\fR
pattern data
.TP
\fB\fIlen\fB\fR
length of pattern
.TP
\fB\fIgfp_mask\fB\fR
allocation mask
.TP
\fB\fIflags\fB\fR
search flags
.SH "DESCRIPTION"
.PP
Looks up the search algorithm module and creates a new textsearch
configuration for the specified pattern. Upon completion all
necessary refcnts are held and the configuration must be put back
using \fBtextsearch_put\fR after usage.
.SH "NOTE"
.PP
The format of the pattern may not be compatible between
the various search algorithms.
.PP
Returns a new textsearch configuration according to the specified
parameters or a \fBERR_PTR\fR\&.