<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqtext">
<Function File="../../src/liblqtext/phrase.c">
<Name>LQT_MakeMatchesWhere</Name>
<Class>Retrieval/Matching, Retrieval/Phrases
<Purpose>
<P>Matches the given phrase, and returns the number of successful
matches.  The given AcceptFunction is called for each match; it
must return one of the following flags as defined in
<h>phrase.h</h>: either LQMATCH_ACCEPT, which adds the match to the
result, or LQMATCH_REJECT, which does not add the match to the result.
In addition, either of these flags may be combined (using bitwise or)
with LQMATCH_QUIT, in which case LQT_MakeMatchesWhere will return
the result collected so far and abandon further processing, or
LQMATCH_NEXT_FILE, in which case LQT_MakeMatchesWhere will not
call the AcceptFunction again until a match is found in a document
with a different File Identifier (FID).</P>
<P>A NULL AcceptFunction pointer is equivalent to one that always
returns LQMATCH_ACCEPT, except much more efficient.</P>
<Returns>
The number of matches accepted.
All matches that are accepted are stored in the given Phrase object.
<SeeAlso>
LQT_StringToPhrase
</Function>
<Decl>
API long
LQT_MakeMatchesWhere(db, Phrase, AcceptFunction)
    t_LQTEXT_Database *db;
    t_Phrase *Phrase;
    int (*AcceptFunction)(
#ifdef HAVE_PROTO
	t_LQTEXT_Database *,
	t_Phrase *,
	t_Match *
#endif
    );
</Decl>
</Entry>
