lq-text: LQT_WriteWordPlaces

API unsigned long LQT_WriteWordPlaces ( db, WordPlaces, WID, LastStart, Block, DataStart, BlockLength, NextOffset, NextSize, NumberToWrite ) t_LQTEXT_Database *db; t_WordPlace *WordPlaces; t_WID WID; unsigned long LastStart; unsigned char *Block; unsigned char *DataStart; unsigned int BlockLength; unsigned long NextOffset; unsigned long NextSize; unsigned long NumberToWrite;

Purpose

Writes the given WordPlaces to disk.

The given LastStart argument should be zero if the given Block pointer refers to data that is not to be stored in the overflow file (`data'). This will be the case when the first few matches are to be written into the widindex entry. If the LastStart argument is non-zero, it is the block number that will be passed as an argument to LQT_Write­Block to save the block when it is full.

The given NextOffset can either be zero or it can be the block offset in the data overflow file of a block that has been allocated using LQT_Find­Free­Block; in the latter case, the NextLength argument is also passed on to LQT_Write­Word­Places.

Returns

Errors

Warns if the file can't be opened.

Notes

This routine is fairly low-level, and is made available in the API for efficiency. You should not attempt to use it without looking at examples in the lq-text clients that update the database, and also reading the source of the function itself.