diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2001-02-27 13:33:07 +0000 | 
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2001-02-27 13:33:07 +0000 | 
| commit | 4c0440cb8652801c1c3750a474f7ddbb17897cdf (patch) | |
| tree | eb116378d50e15fc35d1602c0784e9b8bd920e36 /lib/libc/stdlib/strtol.3 | |
| parent | 1b0dabf0c01e7ada145b752392609ed5438971df (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib/strtol.3')
| -rw-r--r-- | lib/libc/stdlib/strtol.3 | 37 | 
1 files changed, 34 insertions, 3 deletions
| diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3 index 3f28713235b6..eef3031c1e6d 100644 --- a/lib/libc/stdlib/strtol.3 +++ b/lib/libc/stdlib/strtol.3 @@ -40,8 +40,8 @@  .Dt STRTOL 3  .Os  .Sh NAME -.Nm strtol , strtoq -.Nd convert string value to a long or quad_t integer +.Nm strtol , strtoll , strtoq +.Nd convert string value to a long , long long , or quad_t integer  .Sh LIBRARY  .Lb libc  .Sh SYNOPSIS @@ -49,6 +49,8 @@  .Fd #include <limits.h>  .Ft long  .Fn strtol "const char *nptr" "char **endptr" "int base" +.Ft long long +.Fn strtoll "const char *nptr" "char **endptr" "int base"  .Fd #include <sys/types.h>  .Fd #include <stdlib.h>  .Fd #include <limits.h> @@ -64,6 +66,14 @@ to a  .Em long  value.  The +.Fn strtoll +function +converts the string in +.Fa nptr +to a +.Em long long +value. +The  .Fn strtoq  function  converts the string in @@ -145,7 +155,20 @@ If an overflow occurs,  .Fn strtol  returns  .Dv LONG_MAX . -In both cases, +The +.Fn strtoll +function +returns the result of the conversion, +unless the value would underflow or overflow. +If an underflow occurs, +.Fn strtoll +returns +.Dv LLONG_MIN . +If an overflow occurs, +.Fn strtoll +returns +.Dv LLONG_MAX . +In all cases,  .Va errno  is set to  .Er ERANGE . @@ -166,5 +189,13 @@ The  function  conforms to  .St -isoC . +The +.Fn strtoll +function +conforms to +.St -isoC-99 . +The BSD +.Fn strtoq +function is deprecated.  .Sh BUGS  Ignores the current locale. | 
