<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqtext">
<Function File="../../src/liblqtext/gettitle.c">
<Name>LQT_FIDToDocumentTitle</Name>
<Class>Database/Retrieval, Database/Documents
<Purpose>
Returns a document title (from the database <var>titles</var> file)
for a given FID.  A binary search is used to locate a line in the
titles file which starts with the given FID, as a decimal ASCII number,
followed by a tab; the remainder of that line up to a newline or
EOF is returnd.  The second (Name) argument is only used on error.
<Returns>
<LIST>
<LI>the title on success, in a static buffer
<LI>The given Name pointer on error.
</LIST>
<Errors>
Warns if the title file can't be opened.
<Notes>
The `lqkwic' client uses this function to expand ${Title}.
</Function>
<Decl>
API char *
LQT_FIDToDocumentTitle(db, FID, Name)
    t_LQTEXT_Database *db;
    t_FID FID;
    char *Name;
</Decl>
</Entry>
