<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqtext">
<Function File="../../src/liblqtext/pbcache.c">
<Name>LQT_ExtendBlock</Name>
<Class>Database/Physical
<Purpose>
<P>LQT_ExtendBlock 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_ReadBlock
cache boundary.</P>
<P>If the BytesWanted argument is non-zero, the total number of
blocks in BlockCountp when LQT_ExtendBlock returns will not be
more than one block greater than BytesWanted bytes.</P>
<Notes>
BlockCountp must be greater than zero on entry to LQT_ExtendBlock.
<Returns>
The total number of blocks in *BlockCountp
<SeeAlso>
LQT_FindFreeBlock
LQT_SetBlockStatus
</Function>
<Decl>
API void
LQT_ExtendBlock(db, Offset, BlockCountp, BytesWanted)
    t_LQTEXT_Database *db;
    unsigned long Offset;
    unsigned int *BlockCountp;
    unsigned long BytesWanted;
</Decl>
</Entry>
