xref: /csrg-svn/lib/libc/stdlib/atol.3 (revision 61180)
1*61180Sbostic.\" Copyright (c) 1990, 1991, 1993
2*61180Sbostic.\"	The Regents of the University of California.  All rights reserved.
342106Sbostic.\"
450285Sbostic.\" This code is derived from software contributed to Berkeley by
550285Sbostic.\" the American National Standards Committee X3, on Information
650285Sbostic.\" Processing Systems.
750285Sbostic.\"
842106Sbostic.\" %sccs.include.redist.man%
942106Sbostic.\"
10*61180Sbostic.\"     @(#)atol.3	8.1 (Berkeley) 06/04/93
1142106Sbostic.\"
1248349Scael.Dd
1348349Scael.Dt ATOL 3
1448349Scael.Os
1548349Scael.Sh NAME
1648349Scael.Nm atol
1748349Scael.Nd convert
1848349Scael.Tn ASCII
1948349Scaelstring to long integer
2048349Scael.Sh SYNOPSIS
2148349Scael.Fd #include <stdlib.h>
2248349Scael.Ft long
2348349Scael.Fn atol "const char *nptr"
2448349Scael.Sh DESCRIPTION
2542106SbosticThe
2648349Scael.Fn atol
2742106Sbosticfunction converts the initial portion of the string pointed to by
2848349Scael.Ar nptr
2942106Sbosticto
3048349Scael.Em long integer
3142106Sbosticrepresentation.
3248349Scael.Pp
3342106SbosticIt is equivalent to:
3448349Scael.Bd -literal -offset indent
3542106Sbosticstrtol(nptr, (char **)NULL, 10);
3648349Scael.Ed
3748349Scael.Sh SEE ALSO
3848349Scael.Xr atof 3 ,
3948349Scael.Xr atoi 3 ,
4048349Scael.Xr strtod 3 ,
4148349Scael.Xr strtol 3 ,
4248349Scael.Xr strtoul 3
4348349Scael.Sh STANDARDS
4448349ScaelThe
4548349Scael.Fn atol
4648349Scaelfunction
4748349Scaelconforms to
4848349Scael.St -ansiC .
49