Loading...
stdlib/atol.3 Libc-262 Libc-498
--- Libc/Libc-262/stdlib/atol.3
+++ Libc/Libc-498/stdlib/atol.3
@@ -34,44 +34,96 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)atol.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdlib/atol.3,v 1.6 2001/09/07 14:46:35 asmodai Exp $
+.\" $FreeBSD: src/lib/libc/stdlib/atol.3,v 1.13 2002/01/09 14:03:54 ru Exp $
 .\"
-.Dd June 4, 1993
+.Dd November 28, 2001
 .Dt ATOL 3
 .Os
 .Sh NAME
-.Nm atol
+.Nm atol , atoll ,
+.Nm atol_l , atoll_l
 .Nd convert
 .Tn ASCII
-string to long integer
+string to
+.Vt long
+or
+.Vt "long long"
+integer
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In stdlib.h
 .Ft long
-.Fn atol "const char *nptr"
+.Fn atol "const char *str"
+.Ft "long long"
+.Fn atoll "const char *str"
+.In xlocale.h
+.Ft long
+.Fn atol_l "const char *str" "locale_t loc"
+.Ft "long long"
+.Fn atoll_l "const char *str" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn atol
 function converts the initial portion of the string pointed to by
-.Ar nptr
+.Fa str
 to
-.Em long integer
+.Vt long
+integer
 representation.
 .Pp
 It is equivalent to:
-.Bd -literal -offset indent
-strtol(nptr, (char **)NULL, 10);
-.Ed
+.Pp
+.Dl "strtol(str, (char **)NULL, 10);"
+.Pp
+The
+.Fn atoll
+function converts the initial portion of the string pointed to by
+.Fa str
+to
+.Vt "long long"
+integer
+representation.
+.Pp
+It is equivalent to:
+.Pp
+.Dl "strtoll(str, (char **)NULL, 10);"
+.Pp
+While the
+.Fn atol
+and
+.Fn atoll
+functions use the current locale, the
+.Fn atol_l
+and
+.Fn atoll_l
+functions may be passed locales directly. See
+.Xr xlocale 3
+for more information.
+.Sh ERRORS
+The functions
+.Fn atol
+and
+.Fn atoll
+need not
+affect the value of
+.Va errno
+on an error.
 .Sh SEE ALSO
 .Xr atof 3 ,
 .Xr atoi 3 ,
 .Xr strtod 3 ,
 .Xr strtol 3 ,
-.Xr strtoul 3
+.Xr strtoul 3 ,
+.Xr xlocale 3
 .Sh STANDARDS
 The
 .Fn atol
 function
 conforms to
 .St -isoC .
+The
+.Fn atoll
+function
+conforms to
+.St -isoC-99 .