Purpose
Returns pointers to the start and end of the matched text in the given buffer. LQT_FindMatchEnds must be called with at least one block of data (FILEBLOCKSIZE in <globals.h>, usually 64 bytes) either side of the block containing the match. Providing more blocks before the matched block is more likely to result in a correct return value, as there are some special cases involving words spanning block boundaries that are best dealt with by looking a block further back until a block boundary is found that has a space to one side of it, and LQT_FindMatchEnds does this.
The Buffer argument is the text from the file, with StartBlock being a pointer to the first character in the block containing the match. The BIF and WIB arguments are the Block In File and Word In Block fields from the match, and the NumberOfWords argument determines the number of words in the match, for setting the match end pointer.
Returns
- a t_OffsetPair on success, containing pointers to the first matched character and the last matched character.
- zero if the match wasn't found
See Also: