API void
#ifdef ASCIITRACE
LQTp_WriteBlock
(db, theFile, theLine, Block, Data, Length, theWID)
t_LQTEXT_Database *db;
char *theFile;
int theLine;
#else
LQT_WriteBlock
(db, Block, Data, Length, theWID)
t_LQTEXT_Database *db;
#endif
unsigned long Block;
unsigned char *Data;
int Length;
t_WID theWID;
Purpose
Writes the given block to the database. Actually the block is saved in the cache, and if it was originally obtained with LQT_ReadBlock it's already in the cache, so LQT_WriteBlock simply marks it as dirty, needing to be saved. If you change data in a block without calling LQT_WriteBlock, the changes usually won't be written to disk (unless an adjacent block in the cache is written).
The block must have a valid header; if the block's length field is larger than the Length argument, the extra blocks are marked as free. The header is described in <blkheader.h>.