162 Chapter 3
Programming Examples
Using C Programming Over Socket LAN
/* Make sure we don’t have a marker value query, or
* any command with a ’?’ followed by a ’)’ character.
* This kind of command is not a query from our point of view.
* The analyzer does the query internally, and uses the result.
*/
query++ ; /* bump past ’?’ */
while (*query)
{
if (*query == ’ ’) /* attempt to ignore white spc */
query++ ;
else break ;
}
if ( *query != ’)’ )
{
q = 1 ;
}
}
return q ;
}
/***************************************************************************
*
> $Function: main$
*
* $Description: Read command line arguments, and talk to analyzer.
Send query results to stdout. $
*
* $Return: (int) . . . non-zero if an error occurs
*
***************************************************************************/
int main(int argc, char *argv[])
{