lq-text: LQT_InitFromArgv

API t_lqdbOptions * LQT_InitFromArgv (argc, argv) int argc; char **argv;

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_Init­From­Argv.

After setting progname, LQT_Init­From­Argv 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:

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_Open­Database().