1COMEDI_STRERROR(3) Comedi reference COMEDI_STRERROR(3)
2
3
4
6 comedi_strerror - return string describing Comedilib error code
7
9 #include <comedilib.h>
10
11 const char * comedi_strerror(int errnum);
12
14 When a Comedilib function fails, it usually returns -1 or NULL,
15 depending on the return type. An internal library variable stores an
16 error number, which can be retrieved with comedi_errno. This error
17 number can be converted to a human-readable form by the functions
18 comedi_perror or 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, Comedilib
22 functions sometimes return an error that is generated inside the C
23 library; the comedi error message in this case is the same as the C
24 library.
25
26 The function comedi_strerror returns a pointer to a character string
27 describing the Comedilib error errnum. The returned string may be
28 modified by a subsequent call to a strerr or perror function (either
29 the libc or Comedilib versions). An unrecognized error number will
30 return a pointer to the string “undefined error”, or similar.
31
33 David Schleef <ds@schleef.org>
34 Author.
35
36 Frank Mori Hess <fmhess@users.sourceforge.net>
37 Author.
38
39 Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
40 Author.
41
42 Bernd Porr <tech@linux-usb-daq.co.uk>
43 Author.
44
45 Ian Abbott <abbotti@mev.co.uk>
46 Author.
47
48 Éric Piel <piel@delmic.com>
49 Author.
50
52 Copyright © 1998-2003 David Schleef
53 Copyright © 2001-2003, 2005, 2008 Frank Mori Hess
54 Copyright © 2002-2003 Herman Bruyninckx
55 Copyright © 2012 Bernd Porr
56 Copyright © 2012 Ian Abbott
57 Copyright © 2012, 2015 Éric Piel
58
59 This document is part of Comedilib. In the context of this document,
60 the term "source code" as defined by the license is interpreted as the
61 XML source.
62
63 This library is free software; you can redistribute it and/or modify it
64 under the terms of the GNU Lesser General Public License as published
65 by the Free Software Foundation, version 2.1 of the License.
66
67 This library is distributed in the hope that it will be useful, but
68 WITHOUT ANY WARRANTY; without even the implied warranty of
69 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
70 General Public License for more details.
71
72 You should have received a copy of the GNU Lesser General Public
73 License along with this library; if not, write to the Free Software
74 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
75 USA.
76
77
78
79
80Comedi 05/11/2017 COMEDI_STRERROR(3)