summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/atoi.3
diff options
context:
space:
mode:
authorjmc <>2003-06-01 19:27:27 +0000
committerjmc <>2003-06-01 19:27:27 +0000
commit5796457847338c884c1863d78addddafce4fc02f (patch)
tree5977475523d1ea29b76fe3415cdb1d3a83522e71 /src/lib/libc/stdlib/atoi.3
parent986591b4f6cea288e444153e4adc77d36f27fa67 (diff)
downloadopenbsd-5796457847338c884c1863d78addddafce4fc02f.tar.gz
openbsd-5796457847338c884c1863d78addddafce4fc02f.tar.bz2
openbsd-5796457847338c884c1863d78addddafce4fc02f.zip
- section reorder
- merge COMPATIBILITY - kill whitespace at EOL
Diffstat (limited to 'src/lib/libc/stdlib/atoi.3')
-rw-r--r--src/lib/libc/stdlib/atoi.326
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libc/stdlib/atoi.3 b/src/lib/libc/stdlib/atoi.3
index 69b94be70c..6ba304cf46 100644
--- a/src/lib/libc/stdlib/atoi.3
+++ b/src/lib/libc/stdlib/atoi.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: atoi.3,v 1.5 2000/04/20 13:50:01 aaron Exp $ 36.\" $OpenBSD: atoi.3,v 1.6 2003/06/01 19:27:27 jmc Exp $
37.\" 37.\"
38.Dd June 4, 1993 38.Dd June 4, 1993
39.Dt ATOI 3 39.Dt ATOI 3
@@ -60,18 +60,6 @@ It is equivalent to:
60.Bd -literal -offset indent 60.Bd -literal -offset indent
61(int)strtol(nptr, (char **)NULL, 10); 61(int)strtol(nptr, (char **)NULL, 10);
62.Ed 62.Ed
63.Sh CAVEATS
64.Nm
65does no overflow checking, handles unsigned numbers poorly,
66and handles strings containing trailing extra characters
67(like
68.Dq "123abc" Ns )
69poorly.
70Careful use of
71.Xr strtol 3
72and
73.Xr strtoul 3
74can alleviate these problems.
75.Sh SEE ALSO 63.Sh SEE ALSO
76.Xr atof 3 , 64.Xr atof 3 ,
77.Xr atol 3 , 65.Xr atol 3 ,
@@ -83,3 +71,15 @@ The
83.Fn atoi 71.Fn atoi
84function conforms to 72function conforms to
85.St -ansiC . 73.St -ansiC .
74.Sh CAVEATS
75.Nm
76does no overflow checking, handles unsigned numbers poorly,
77and handles strings containing trailing extra characters
78(like
79.Dq "123abc" )
80poorly.
81Careful use of
82.Xr strtol 3
83and
84.Xr strtoul 3
85can alleviate these problems.