1
.\" This manpage has been automatically generated by docbook2man
2
.\" from a DocBook document. This tool can be found at:
3
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4
.\" Please send any bug reports, improvements, comments, patches,
5
.\" etc. to Steve Cheng <steve@ggi-project.org>.
6
.TH "COMEDI_STRERROR" "3" "02 October 2004" "" ""
9
comedi_strerror \- return string describing Comedilib error code
12
\fB#include <comedilib.h>
14
char * comedi_strerror (int \fIerrnum\fB);
18
When a Comedilib function fails, it usually returns -1 or
19
NULL, depending on the return type. An internal library
20
variable stores an error number, which can be retrieved with
21
comedi_errno(). This error number can be converted to a
22
human-readable form by the functions comedi_perror()
23
and comedi_strerror().
25
These functions are intended to mimic the behavior of the
26
standard C library functions perror(), strerror(), and errno.
27
In particular, Comedilib functions sometimes return an error
28
that is generated inside the C library; the comedi error
29
message in this case is the same as the C library.
31
The function comedi_strerror() returns a pointer to a
33
describing the Comedilib error errnum. The persistence
34
of the returned pointer is undefined, and should not be trusted
35
after the next Comedilib call. An unrecognized error number will
36
return a pointer to the string "undefined error", or similar.