~ubuntu-branches/ubuntu/intrepid/comedilib/intrepid

« back to all changes in this revision

Viewing changes to doc/man/comedi_errno.3

  • Committer: Bazaar Package Importer
  • Author(s): David Schleef
  • Date: 2004-11-04 11:43:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041104114351-a50kaei5yamka8r6
Tags: 0.7.22-2
It helps if the shared library is actually in the package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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" "" ""
 
7
 
 
8
.SH NAME
 
9
comedi_errno \- number of last Comedilib error
 
10
.SH SYNOPSIS
 
11
.sp
 
12
\fB#include <comedilib.h>
 
13
.sp
 
14
int comedi_errno (void \fI\fB);
 
15
\fR
 
16
.SH "DESCRIPTION"
 
17
.PP
 
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().
 
24
.PP
 
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.
 
30
.PP
 
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().
 
34
.PP
 
35
Note that comedi_errno() is deliberately different than the
 
36
variable errno.  This is to overcome difficulties in making
 
37
errno thread-safe.
 
38
.PP