.Overview "Overview"
From the perspective of a programmer,
.I lq-text
is made up of several libraries:
.List
. LI
.I lib\&lq\&text
is the main text retrieval library;
. /LI
. LI
.I lib\&lq\&util
defines a number of useful general routines,
mostly for file and string manuipulation, and
. /LI
. LI
.I lib\&lq\&error
deals with error handling.
. /LI
./List
.P
You'll probably end up using a mixture of these libraries in practice.
If you link against
.I lib\&lq\&text
you will also need to link against the other libraries;
if you link against
.I lib\&lq\&util
you will need to link against \f[I]lib\&lq\&error\fP,
but you can use
.I lib\&lq\&util
without \f[I]lib\&lq\&text\fP.
In the same way,
.I lib\&lq\&error
stands alone and can be used without any of the other libraries.
./P
.P
You will therefore need to link with the options
\*[+var]-llqtext\*[-var]
\*[+var]-llqutil\*[-var]
\*[+var]-llqerror\*[-var]
in that order.
You may also need to use \*[+var]-L\*[-var] to specify the directory
containing the libraries, depending on your installation, and
\*[+var]-I\*[-var] to name the directory with the include files.
The default places are \*[+var]/usr/local/lib/lqtext\*[-var] and
\*[+var]/usr/local/lib/lqtext/include\*[-var] for these, respectively.
./P
.P
The functions in each library all have a common prefix, starting
with \*[+c]LQ\*[-c], as follows:
.List
.LI
\*[+c]LQT\*[-c] is used by text retrieval routines;
./LI
.LI
\*[+c]LQU\*[-c] is used by \f[I]lib\&lq\&util\fP routines;
./LI
.LI
\*[+c]LQM\*[-c] is used for a number of memory-related routines;
./LI
.LI
\*[+c]LQE\*[-c] is used for error handling routines.
./LI
./List
.P
Since efficiency is a major part of text retrieval, some of the routines
documented here are actually implemented as macros.
It is deliberately unspecified as to which these are, so that you can't
rely on the implementation.
You must therefore avoid having side-effects in parameters to function
calls, as any parameter may be evaluated multiple times.
./P
.P
Some of the routines have an \*[+var]_\*[-var] after their prefix, and
some have a \*[+var]p\*[-var] instead; the \*[+var]p\*[-var] is a reminder
that the routine concerned is private to the
.I lq\&text
libraries, and shold not normally be used in client software.
./P
.P
To make them easier to copy and use in other programs, many of the example
clients shipped with
.I lq-text
have function names that begin with \*[+c]LQC_\*[-c] (the C stands for
Client), so that they are unlikely to conflict with anything you're
already using.
The sample clients are located in the lq-text/src/lqtext directory; the
samples in this manual are in the lq-text/doc/samples directory.
./P
./Overview
