Purpose
This function is called to Initialise the lq-text libraries. It sets the global variable progname from argv[0], but does not remove any leading directories; if you want just the command name to appear in error messages and other output, you should set progname in main() before calling LQT_InitFromArgv.
After setting progname, LQT_InitFromArgv handles any lq-text command-line options. Currently, each option is turned into either -z if it does not take an argument, or -Z if it take an argument. As a result, you should ignore -z and -Z options if they appear, together with the argument to -Z, and you should not give your program a -z or -Z option. This behaviour will change completely in a future release of lq-text, when improved command-line argument handling is introduced.
The command line options currently understood include:
- -d dir, to specify a database directory
- -m p|h|a, to specify whether to match phrases precisely, heuristically, or approximately;
- -t flags, to turn on tracing; the given flags should be a string of debugging flag names separated by the vertical bar (|). An example would be -t Trace|Debug, but you will usually need to quote the argument to protect it from the shell. The value List will print a list of available values.
Restrictions
Must be called before any other liblqtext functions.Returns
A pointer to an object used to represent options; this object should be passed to LQT_OpenDatabase().
See Also: