<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqtext">
<Function File="../../src/liblqtext/wordinfo.c">
<Name>LQT_MakeWordInfoBlockHeader</Name>
<Class>Database/Update, Database/Words
<Purpose>
Writes a database header block (a WIDindex entry) into the
given WordInfo.  This is split into a separate routine so that
the library can write a word block header tentatively, using a
different format for the header if the header and the data all
fit into the index block.  LQT_MakeWordInfoBlockHeader determines
the format to use by whether WordInfo->Offset is non-zero.
The difference is whether a fixed four bytes are used for the
total number of word places for this word, or whether a variable
number of bytes, using LQT_sWriteNumber, are written.  In the
latter case, update in place is not possible, and this format is
therefore only used when WordInfo->Offset is zero, and any update
would in any case have to read and rewrite the word index block.
</Function>
<Decl>
LIBRARY void
LQT_MakeWordInfoBlockHeader(db, WordInfo, pblock)
    t_LQTEXT_Database *db;
    t_WordInfo *WordInfo;
    t_pblock *pblock;
</Decl>
</Entry>
