API DBM *
LQT_OpenKeyValueDatabase
(db, FilePrefix)
t_LQTEXT_Database *db;
char *FilePrefix;
Purpose
Opens an ndbm-style database of the given name, creating it if
the current database modes allow it.
The result is stored by the caller in either db->WordInfoDB
or db->FileInfoDB and will be closed only when the entire
database is closed.
Returns
A handle (usually a DBM * pointer) to the named Key Value Database.
Errors
If the underlying ndbm-style database couldn't be opened, a fatal
error is produced (E_FATAL|E_SYS) indicating the problem.
One possible cause of this is that $HOME/LQTEXTDIR isn't a directory,
or doesn't exist, and $LQTEXTDIR isn't set to point to a suitable
alternate directory.
Another possible problem is that a previous run of lqaddfile
failed, and left the Key Value Databases locked for writing; the
best thing to do in this case is to run the lqclean program and
start again.