lq-text: LQT_ExtendBlock

API void LQT_ExtendBlock (db, Offset, BlockCountp, BytesWanted) t_LQTEXT_Database *db; unsigned long Offset; unsigned int *BlockCountp; unsigned long BytesWanted;

Purpose

LQT_Extend­Block marks as many blocks as possible following the given byte Offset as being used, and increments the unsigned int pointed to by BlockCountp by the number of blocks added. The number of blocks added is such that a single contiguous stretch of data starting at the given Offset, and continuing for the number of blocks in *BlockCountp, does not cross an LQT_Read­Block cache boundary.

If the BytesWanted argument is non-zero, the total number of blocks in BlockCountp when LQT_Extend­Block returns will not be more than one block greater than BytesWanted bytes.

Returns

The total number of blocks in *BlockCountp

See Also:

Notes

BlockCountp must be greater than zero on entry to LQT_Extend­Block.