summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/strtol.3
diff options
context:
space:
mode:
authormillert <>2007-06-29 18:54:37 +0000
committermillert <>2007-06-29 18:54:37 +0000
commitac1bccf636517190eaf1cc13a79548688a38c6ea (patch)
treede9954f9d4bd2681aef331c50fc46ba688ac0390 /src/lib/libc/stdlib/strtol.3
parent84283cef03fc33c8bf96c1e48567804c12b9b670 (diff)
downloadopenbsd-ac1bccf636517190eaf1cc13a79548688a38c6ea.tar.gz
openbsd-ac1bccf636517190eaf1cc13a79548688a38c6ea.tar.bz2
openbsd-ac1bccf636517190eaf1cc13a79548688a38c6ea.zip
Document behavior when no conversion could be performed. Adapted
from FreeBSD. With help from jmc@.
Diffstat (limited to 'src/lib/libc/stdlib/strtol.3')
-rw-r--r--src/lib/libc/stdlib/strtol.312
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/strtol.3 b/src/lib/libc/stdlib/strtol.3
index 74361671ff..4eb767885b 100644
--- a/src/lib/libc/stdlib/strtol.3
+++ b/src/lib/libc/stdlib/strtol.3
@@ -29,9 +29,9 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: strtol.3,v 1.17 2007/05/31 19:19:31 jmc Exp $ 32.\" $OpenBSD: strtol.3,v 1.18 2007/06/29 18:54:37 millert Exp $
33.\" 33.\"
34.Dd $Mdocdate: May 31 2007 $ 34.Dd $Mdocdate: June 29 2007 $
35.Dt STRTOL 3 35.Dt STRTOL 3
36.Os 36.Os
37.Sh NAME 37.Sh NAME
@@ -151,8 +151,14 @@ The
151.Fn strtoimax , 151.Fn strtoimax ,
152and 152and
153.Fn strtoq 153.Fn strtoq
154functions returns the result of the conversion, 154functions return the result of the conversion,
155unless the value would underflow or overflow. 155unless the value would underflow or overflow.
156If no conversion could be performed, 0 is returned;
157the global variable
158.Va errno
159is also set to
160.Er EINVAL,
161though this is not portable across all platforms.
156If overflow or underflow occurs, 162If overflow or underflow occurs,
157.Va errno 163.Va errno
158is set to 164is set to