Chapter 2 91
Programming Examples
LAN Programming Examples
* any command with a '?' followed by a ')' character.
* This kind of command is not a query from our point of view.
* The signal generator 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 signal generator.
Send query results to stdout. $
*
* $Return: (int) . . . non-zero if an error occurs
*
***************************************************************************/
int main(int argc, char *argv[])