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_ERRNO" "3" "02 October 2004" "" ""
9
comedi_errno \- number of last Comedilib error
12
\fB#include <comedilib.h>
14
int comedi_errno (void \fI\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_errno() returns an integer describing
32
the most recent comedilib error. This integer may be used
33
as the errnum parameter for comedi_strerror().
35
Note that comedi_errno() is deliberately different than the
36
variable errno. This is to overcome difficulties in making