Files
oldlinux-files/study/Ref-docs/C/errno.html
2024-02-19 00:25:23 -05:00

80 lines
2.6 KiB
HTML

<HTML><HEAD><TITLE>&lt;errno.h&gt;</TITLE></HEAD><BODY BGCOLOR="#FFFFFF">
<H1><A NAME="&lt;errno.h&gt;"><CODE>&lt;errno.h&gt;</CODE></A></H1><HR>
<P><CODE>
#define <A HREF="#EDOM"><B>EDOM</B></A>
<I>&lt;#if expression&gt;</I><BR>
#define <A HREF="#EILSEQ"><B>EILSEQ</B></A>
<I>&lt;#if expression&gt;</I><BR>
#define <A HREF="#ERANGE"><B>ERANGE</B></A>
<I>&lt;#if expression&gt;</I><BR>
#define <A HREF="#errno"><B>errno</B></A>
<I>&lt;int modifiable lvalue&gt;</I>
</CODE></P>
<P>Include the standard header <B><CODE>&lt;errno.h&gt;</CODE></B>
to test the value stored in
<A HREF="#errno"><CODE>errno</CODE></A>
by certain library functions. At program startup, the value stored
is zero. Library functions store only values greater than zero.
Any library function can alter the value stored, but
only those cases where a library function is explicitly
required to store a value are documented here.</P>
<P>To test whether a library function stores a value in
<A HREF="#errno"><CODE>errno</CODE></A>,
the program should store the value zero there immediately before
it calls the library function. An implementation can define additional
macros in this standard header that you can test for equality with
the value stored. All these additional macros have
names that begin with <CODE>E</CODE>.</P>
<H2><A NAME="EDOM"><CODE>EDOM</CODE></A></H2>
<P><CODE>
#define <B>EDOM</B> <I>&lt;#if expression&gt;</I>
</CODE></P>
<P>The macro yields the value stored in
<A HREF="#errno"><CODE>errno</CODE></A> on a domain error.</P>
<H2><A NAME="EILSEQ"><CODE>EILSEQ</CODE></A></H2>
<P><CODE>
#define <B>EILSEQ</B> <I>&lt;#if expression&gt;</I>
</CODE></P>
<P>The macro yields the value stored in
<A HREF="#errno"><CODE>errno</CODE></A> on an invalid
multibyte sequence.</P>
<H2><A NAME="ERANGE"><CODE>ERANGE</CODE></A></H2>
<P><CODE>
#define <B>ERANGE</B> <I>&lt;#if expression&gt;</I>
</CODE></P>
<P>The macro yields the value stored in
<A HREF="#errno"><CODE>errno</CODE></A> on a range error.</P>
<H2><A NAME="errno"><CODE>errno</CODE></A></H2>
<P><CODE>
#define <B>errno</B> <I>&lt;int modifiable lvalue&gt;</I>
</CODE></P>
<P>The macro designates an object that is assigned a value greater
than zero on certain library errors.</P>
<HR>
<P>See also the
<B><A HREF="index.html#Table of Contents" tppabs="http://ccs.ucsd.edu/c/index.html#Table of Contents">Table of Contents</A></B> and the
<B><A HREF="_index.html" tppabs="http://ccs.ucsd.edu/c/_index.html">Index</A></B>.</P>
<P><I>
<A HREF="crit_pb.html" tppabs="http://ccs.ucsd.edu/c/crit_pb.html">Copyright</A> &#169; 1989-1996
by P.J. Plauger and Jim Brodie. All rights reserved.</I></P>
</BODY></HTML>