Next: keyval_cmp, Previous: keyval_st, Up: KeyVal [Contents]
output an error message associated with a KeyValErr
#include <suplib/keyval.h> void keyval_perror( FILE *fout, KeyValErr error, const char *spec, long where );
FILE *fout
where to print the error message
KeyValErr error
which error to print
Possible values for a
KeyValErr
are as follows:
KeyValErr_OK
no error
KeyValErr_NOMEM
out of memory
KeyValErr_NOKEY
no such keyword
KeyValErr_UNBAL
unbalanced quote or escape character
KeyValErr_INVAL
invalid value specification
KeyValErr_RANGE
the value is out of range
KeyValErr_MAXERR
const char *spec
the specification which caused the error
long where
where in the spec the error ocurred
Error messages are returned by the keyval
routines via an integer
code of type KeyValErr
. This routine acts much like the system
perror
routine. It takes as input the output stream, the error
code, the keyval specification passed to the keyval parsing routines, and
the where argument returned by those routines. It prints an
error message to the passed output stream.
Diab Jerius