diff options
author | jmc <> | 2003-06-01 19:27:27 +0000 |
---|---|---|
committer | jmc <> | 2003-06-01 19:27:27 +0000 |
commit | 5796457847338c884c1863d78addddafce4fc02f (patch) | |
tree | 5977475523d1ea29b76fe3415cdb1d3a83522e71 /src/lib/libc/stdlib/atoi.3 | |
parent | 986591b4f6cea288e444153e4adc77d36f27fa67 (diff) | |
download | openbsd-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.3 | 26 |
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 | ||
65 | does no overflow checking, handles unsigned numbers poorly, | ||
66 | and handles strings containing trailing extra characters | ||
67 | (like | ||
68 | .Dq "123abc" Ns ) | ||
69 | poorly. | ||
70 | Careful use of | ||
71 | .Xr strtol 3 | ||
72 | and | ||
73 | .Xr strtoul 3 | ||
74 | can 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 |
84 | function conforms to | 72 | function conforms to |
85 | .St -ansiC . | 73 | .St -ansiC . |
74 | .Sh CAVEATS | ||
75 | .Nm | ||
76 | does no overflow checking, handles unsigned numbers poorly, | ||
77 | and handles strings containing trailing extra characters | ||
78 | (like | ||
79 | .Dq "123abc" ) | ||
80 | poorly. | ||
81 | Careful use of | ||
82 | .Xr strtol 3 | ||
83 | and | ||
84 | .Xr strtoul 3 | ||
85 | can alleviate these problems. | ||