Overview

From the perspective of a programmer, lq-text is made up of several libraries:
You'll probably end up using a mixture of these libraries in practice. If you link against liblqtext you will also need to link against the other libraries; if you link against liblqutil you will need to link against liblqerror, but you can use liblqutil without liblqtext. In the same way, liblqerror stands alone and can be used without any of the other libraries.

You will therefore need to link with the options -llqtext -llqutil -llqerror in that order. You may also need to use -L to specify the directory containing the libraries, depending on your installation, and -I to name the directory with the include files. The default places are /usr/local/lib/lqtext and /usr/local/lib/lqtext/include for these, respectively.

The functions in each library all have a common prefix, starting with LQ, as follows:
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.

Some of the routines have an _ after their prefix, and some have a p instead; the p is a reminder that the routine concerned is private to the lqtext libraries, and shold not normally be used in client software.

To make them easier to copy and use in other programs, many of the example clients shipped with lq-text have function names that begin with LQC_ (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.