diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/atoll.3 (renamed from src/lib/libc/stdlib/calloc.3) | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/src/lib/libc/stdlib/calloc.3 b/src/lib/libc/stdlib/atoll.3 index d0754b46a0..608a61f4ce 100644 --- a/src/lib/libc/stdlib/calloc.3 +++ b/src/lib/libc/stdlib/atoll.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" Copyright (c) 1991 The Regents of the University of California. | 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
| 2 | .\" All rights reserved. | 2 | .\" All rights reserved. |
| 3 | .\" | 3 | .\" |
| 4 | .\" This code is derived from software contributed to Berkeley by | 4 | .\" This code is derived from software contributed to Berkeley by |
| @@ -13,11 +13,7 @@ | |||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 14 | .\" notice, this list of conditions and the following disclaimer in the | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| 15 | .\" documentation and/or other materials provided with the distribution. | 15 | .\" documentation and/or other materials provided with the distribution. |
| 16 | .\" 3. All advertising materials mentioning features or use of this software | 16 | .\" 3. Neither the name of the University nor the names of its contributors |
| 17 | .\" must display the following acknowledgement: | ||
| 18 | .\" This product includes software developed by the University of | ||
| 19 | .\" California, Berkeley and its contributors. | ||
| 20 | .\" 4. Neither the name of the University nor the names of its contributors | ||
| 21 | .\" may be used to endorse or promote products derived from this software | 17 | .\" may be used to endorse or promote products derived from this software |
| 22 | .\" without specific prior written permission. | 18 | .\" without specific prior written permission. |
| 23 | .\" | 19 | .\" |
| @@ -33,39 +29,42 @@ | |||
| 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 34 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 35 | .\" | 31 | .\" |
| 36 | .\" from: @(#)calloc.3 5.2 (Berkeley) 6/29/91 | 32 | .\" $OpenBSD: atoll.3,v 1.5 2007/05/31 19:19:31 jmc Exp $ |
| 37 | .\" $Id: calloc.3,v 1.1.1.1 1995/10/18 08:42:17 deraadt Exp $ | ||
| 38 | .\" | 33 | .\" |
| 39 | .Dd June 29, 1991 | 34 | .Dd $Mdocdate: May 31 2007 $ |
| 40 | .Dt CALLOC 3 | 35 | .Dt ATOLL 3 |
| 41 | .Os | 36 | .Os |
| 42 | .Sh NAME | 37 | .Sh NAME |
| 43 | .Nm calloc | 38 | .Nm atoll |
| 44 | .Nd allocate clean memory (zero initialized space) | 39 | .Nd convert |
| 40 | .Tn ASCII | ||
| 41 | string to long long integer | ||
| 45 | .Sh SYNOPSIS | 42 | .Sh SYNOPSIS |
| 46 | .Fd #include <stdlib.h> | 43 | .Fd #include <stdlib.h> |
| 47 | .Ft void * | 44 | .Ft long long |
| 48 | .Fn calloc "size_t nmemb" "size_t size" | 45 | .Fn atoll "const char *nptr" |
| 49 | .Sh DESCRIPTION | 46 | .Sh DESCRIPTION |
| 50 | The | 47 | The |
| 51 | .Fn calloc | 48 | .Fn atoll |
| 52 | function allocates space for an array of | 49 | function converts the initial portion of the string pointed to by |
| 53 | .Fa nmemb | 50 | .Fa nptr |
| 54 | objects, each of whose size is | 51 | to |
| 55 | .Fa size . | 52 | .Li long long integer |
| 56 | The space is initialized to all bits zero. | 53 | representation. |
| 57 | .Sh RETURN VALUES | 54 | .Pp |
| 58 | The | 55 | It is equivalent to: |
| 59 | .Fn calloc | 56 | .Bd -literal -offset indent |
| 60 | function returns | 57 | strtoll(nptr, (char **)NULL, 10); |
| 61 | a pointer to the | 58 | .Ed |
| 62 | the allocated space if successful; otherwise a null pointer is returned. | ||
| 63 | .Sh SEE ALSO | 59 | .Sh SEE ALSO |
| 64 | .Xr malloc 3 , | 60 | .Xr atof 3 , |
| 65 | .Xr realloc 3 , | 61 | .Xr atoi 3 , |
| 66 | .Xr free 3 | 62 | .Xr atol 3 , |
| 63 | .Xr strtod 3 , | ||
| 64 | .Xr strtol 3 , | ||
| 65 | .Xr strtoul 3 | ||
| 67 | .Sh STANDARDS | 66 | .Sh STANDARDS |
| 68 | The | 67 | The |
| 69 | .Fn calloc | 68 | .Fn atoll |
| 70 | function conforms to | 69 | function conforms to |
| 71 | .St -ansiC . | 70 | .St -ansiC-99 . |
