lq-text: LQT_PutWordInfoIntoIndex

API int LQT_PutWordInfoIntoIndex (db, theWordInfo, Offset) t_LQTEXT_Database *db; t_WordInfo *theWordInfo; unsigned long Offset;

Purpose

Each WordInfo structure contains a pointer to a single data block, which is used to store the widindex header. This speeds up indexing, since the header is needed at both the start of writing out WordPlaces and at the end. LQT_Put­Word­Info­Into­Index arranges that index block be written out to the widindex index file, using LQT_WriteWordInfoIndexBlock.

A WID must have been allocated for this word with LQT_Write­Word­And­WID for this word already, on this or some other program run.

This routine is generally called after LQT_Writepblock.

Returns

zero

Errors

Warns if the WordInfo has a datablock but no offset. If ASCIITRACE was defined when the library was compiled, and if the LQTRACE_READAFTERWRITE trace flag is set, LQT_PutWordInfoIntoIndex checks that theWordinfo->WID corresponds to theWordInfo->Word, using LQT_WordToWID, and produces a fatal (E_BUG) error if not.