NAME
stablk - string table lookup

SYNOPSIS
int stablk (string,table,quiet);
char *string,**table;
int quiet;

DESCRIPTION
Stablk searches in the string table table, looking for a string
whose initial characters match string. If exactly one such string
is found, then the index of that string is returned. If no such
strings are found, or if more than one string matches, then an
error indication is returned.

If no strings match string, then -1 will be returned. Before
returning, if quiet is FALSE, then the user will be asked if he
wants a list of the strings in the table; if he says "yes", then a
list is printed.

If several strings match but one is an exact match while the others
are prefix matches, the index of the exact match is returned.
Otherwise, when several strings match, -2 will be returned. Before
returning, if quiet is FALSE, then the user will be asked if he
wants a list of matching strings; if he says "yes", then a list is
printed.

The string table may be declared like this:

char *stable[] = {
"first string",
"second string",
...
"n-th string",
0};

Note that the last entry of the table must be a zero.

SEE ALSO
stlmatch(3)

DIAGNOSTICS
If nothing matches, -1 is returned; if more than one string
matches, then -2 is returned.

BUGS
A maximum of 500 strings are allowed in the table.