Logo Search packages:      
Sourcecode: t1utils version File versions  Download package

int Clp_OptionError ( Clp_Parser clp,
const char *  format,
  ... 
)

Report a parser error.

Parameters:
clp the parser
format error format
Format an error message from format and any additional arguments in the ellipsis. The resulting error string by printing it to standard error or passing it to Clp_SetErrorHandler.

The following format characters are accepted:

%c
A character (type int). Control characters are printed in caret notation. If the parser is in UTF-8 mode, the character is formatted in UTF-8. Otherwise, special characters are printed with backslashes and octal notation.
%s
A string (type const char *).
%C
The argument is a string (type const char *). The first character in this string is printed. If the parser is in UTF-8 mode, this may involve multiple bytes.
%d
An integer (type int). Printed in decimal.
%O
The current option. No values are read from the argument list; the current option is defined in the Clp_Parser object itself.
%%
Prints a percent character.
%<
Prints an open quote string. In UTF-8 mode, prints a left single quote. Otherwise prints a single quote.
%>
Prints a closing quote string. In UTF-8 mode, prints a right single quote. Otherwise prints a single quote.
%,
Prints an apostrophe. In UTF-8 mode, prints a right single quote. Otherwise prints a single quote.

Note that no flag characters, precision, or field width characters are currently supported.

See also:
Clp_SetErrorHandler

Definition at line 2213 of file clp.c.

{
    Clp_BuildString *bs;
    va_list val;
    va_start(val, format);
    bs = Clp_VaOptionError(clp, 0, format, val);
    va_end(val);
    do_error(clp, bs);
    free_build_string(bs);
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index