lq-text: LQT_FlushBlockCache

LIBRARY int LQT_FlushBlockCache (db) t_LQTEXT_Database *db;

Purpose

Writes any pending dirty blocks to the disk. Copies of the blocks are retained in memory, however, until LQT_Close­Database is called, and will be found by LQT_Block­Is­Cached and hence by LQT_Read­Block if an attempt is made to read them again.

When a database is opened, LQT_Open­Database adds LQT_Flush­Block­Cache as an action to be performed automatically whenever the database is flushed or closed. It should not be necessary to call this code directly from outside the library, and it is made available primarily to aid in debugging.

Errors

Fatal error (E_BUG) if the cache is dirty in read-only mode.

See Also: