1COMEDI_PERROR(3) COMEDI_PERROR(3)
2
3
4
6 comedi_perror - print a Comedilib error message
7
9 #include <comedilib.h>
10
11 void comedi_perror (const char * s);
12
14 When a Comedilib function fails, it usually returns -1 or NULL, depend‐
15 ing on the return type. An internal library variable stores an error
16 number, which can be retrieved with comedi_errno(). This error number
17 can be converted to a human-readable form by the functions comedi_per‐
18 ror() and comedi_strerror().
19
20 These functions are intended to mimic the behavior of the standard C
21 library functions perror(), strerror(), and errno. In particular,
22 Comedilib functions sometimes return an error that is generated inside
23 the C library; the comedi error message in this case is the same as the
24 C library.
25
26 The function comedi_perror() prints an error message to stderr. The
27 error message consists of the argument string, a colon, a space, a
28 description of the error condition, and a new line.
29
30 28 October 2007 COMEDI_PERROR(3)