Next: rangef_del, Previous: rangef_parse, Up: Ranges
output an error message associated with a RangeERR
#include <suplib/range.h>void range_perror( FILE *fout, RangeErr error, const char *spec, long where );
FILE *fout
- where to print the error message
RangeErr error
- which error to print
Possible values for aRangeErr
are as follows:
RangeErr_OK
- no error
RangeErr_NOMEM
- out of memory
RangeErr_INCOMPLETE
- incomplete range
RangeErr_ERANGE
- number out of bounds
RangeErr_ILLNUM
- not a number
RangeErr_NEGNUM
- negative number
RangeErr_OFLOWSTART
- overflow of start value
RangeErr_NONPOSCOUNT
- non-positive count
RangeErr_OFLOWEND
- overflow of end value
RangeErr_INTERNAL
- internal error
RangeErr_ORDER
- start greater than end
RangeErr_EMPTY
- float range is empty set
RangeErr_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 range
routines via an integer
code of type RangeERR
. This routine acts much like the system
perror
routine. It takes as input the output stream, the error
code, the range specification passed to the range parsing routines, and
the where argument returned by those routines. It prints an
error message to the passed output stream.
Diab Jerius