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

« back to all changes in this revision

Viewing changes to doc/man/comedi_strerror.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_STRERROR" "3" "02 October 2004" "" ""
 
7
 
 
8
.SH NAME
 
9
comedi_strerror \- return string describing Comedilib error code
 
10
.SH SYNOPSIS
 
11
.sp
 
12
\fB#include <comedilib.h>
 
13
.sp
 
14
char * comedi_strerror (int \fIerrnum\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_strerror() returns a pointer to a
 
32
character string
 
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.
 
37
.PP