CL_ERRORS - check for command line parsing errors.

Usage:

#include <stdio.h>
#include <cl.h>
status = cl_errors(fp, cl, header)

Where:

FILE *fp;
indicates an output file stream where "cl_errors" should output any error diagnostics.
CL_PARSED *cl;
points to a parsed command line structure, as returned by "cl_parse" or a related routine.
char *header;
is a string that you want to output before "cl_errors" outputs its error diagnostics. This string serves as a heading line before the diagnostics.
int status;
is zero if there were no errors encountered in parsing the command line. Otherwise, "cl_errors" returns a non-zero value.

Description:

The "cl_errors" function checks a data structure containing a parsed command line to see if any errors were encountered in the parsing process.

If there were no errors, "cl_errors" simply returns zero. Otherwise, "cl_errors" outputs the "header" string followed by one or more diagnostic messages describing the errors that were encountered. Once "cl_errors" has output this information, it returns a non-zero value to the caller.

See Also:

expl c internal parser
for an overview of the parser routines.
expl c internal parser macros
for macros used in creating an Options Table.
expl c internal parser cl_parse
to parse a command line.

Copyright © 1996, Thinkage Ltd.