/* phrreset.c -- Copyright 1989, 1995, 1996 Liam R. Quin. * All Rights Reserved. * This code is NOT in the public domain. * See the file COPYRIGHT for full details. */ /* * Deal with (WID, FID, Offfset) triples * Liam Quin, September 1989 * * $Id: phrreset.c,v 1.2 2001/05/31 03:50:13 liam Exp $ * */ #include "error.h" #include "globals.h" /* defines and declarations for database filenames */ #include /* stderr, also for fileinfo.h */ #include #ifdef HAVE_FCNTL_H # ifdef HAVE_SYSV_FCNTL_H # include # endif # include #endif #ifdef HAVE_STRING_H # include #else # include #endif #include #ifdef HAVE_STDLIB_H # include #else # include #endif #include "fileinfo.h" /* for wordinfo.h */ #include "wordinfo.h" #include "pblock.h" #include "phrase.h" #include "wordrules.h" #include "emalloc.h" #include "lqutil.h" #include "liblqtext.h" #include "lqtrace.h" /** Unix system calls that need to be declared: **/ /** Unix/C Library Functions: **/ /** lqtext functions: **/ /** functions within this file that need forward declarations **/ /** **/ /* * LQT_ResetPhraseMatch * Retrieval/Matching, Retrieval/Phrases * * Resets internal pointers within a phrase so that LQT_MakeMatches * can be called. This is also called by LQT_MakeMatches and * LQT_MakeMatchesWhere, and is provided so that clients can write * their own phrase matching routines compatibly. * * LQT_StringToPhrase * LQT_MakeMatches * */ /*ARGSUSED2*/ API void LQT_ResetPhraseMatch(db, thePhrase) t_LQTEXT_Database *db; t_Phrase *thePhrase; { t_PhraseItem *Word; if (!thePhrase || !thePhrase->Words) return; for (Word = thePhrase->Words; Word; Word = Word->Next) { Word->SearchIndex = 0; } thePhrase->NumberOfMatches = 0; }