From 1036376e7394d3d64654eaf71806818007d2014f Mon Sep 17 00:00:00 2001 From: asmodai Date: Wed, 26 Sep 2001 20:22:44 +0000 Subject: Add ERRORS section. Mention thread safety and async-cancel safety status [not]. Add standards compliancy references. Note strtol() is preferred over atoi(). MFC after: 2 weeks --- lib/libc/stdlib/atoi.3 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/atoi.3 b/lib/libc/stdlib/atoi.3 index f8a2cc1..7061ecd 100644 --- a/lib/libc/stdlib/atoi.3 +++ b/lib/libc/stdlib/atoi.3 @@ -63,6 +63,20 @@ It is equivalent to: .Bd -literal -offset indent (int)strtol(nptr, (char **)NULL, 10); .Ed +.Sh IMPLEMENTATION NOTES +The +.Fn atoi +function is not thread-safe and also not async-cancel safe. +.Pp +The +.Fn atof +function has been deprecated by +.Fn strtol +and should not be used in new code. +.Sh ERRORS +The +.Fn atoi +function does not detect errors. .Sh SEE ALSO .Xr atof 3 , .Xr atol 3 , @@ -73,4 +87,7 @@ It is equivalent to: The .Fn atoi function conforms to -.St -isoC . +.St -p1003.1-90 , +.St -isoC , +and +.St -isoC-99 . -- cgit v1.1