version 1.1, 2014/08/05 05:48:56 |
version 1.2, 2016/07/07 19:19:01 |
|
|
.Nm mandoc_strndup , |
.Nm mandoc_strndup , |
.Nm mandoc_asprintf |
.Nm mandoc_asprintf |
.Nd memory allocation function wrappers used in the mandoc library |
.Nd memory allocation function wrappers used in the mandoc library |
.Sh LIBRARY |
|
.Lb libmandoc |
|
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.In sys/types.h |
.In sys/types.h |
.In mandoc_aux.h |
.In mandoc_aux.h |
|
|
.Fa "..." |
.Fa "..." |
.Fc |
.Fc |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
These functions call the |
These functions call the libc functions of the same names, passing |
.Lb libc |
through their return values when successful. |
functions of the same names, passing through their return values when |
|
successful. |
|
In case of failure, they do not return, but instead call |
In case of failure, they do not return, but instead call |
.Xr perror 3 |
.Xr err 3 . |
and |
They can be used both internally by any code in the mandoc libraries |
.Xr exit 3 . |
|
They can be used both internally by any code in the |
|
.Lb libmandoc |
|
and externally by programs using that library, for example |
and externally by programs using that library, for example |
.Xr mandoc 1 , |
.Xr mandoc 1 , |
|
.Xr man 1 , |
.Xr apropos 1 , |
.Xr apropos 1 , |
|
.Xr makewhatis 8 , |
and |
and |
.Xr makewhatis 8 . |
.Xr man.cgi 8 . |
.Pp |
.Pp |
The function |
The function |
.Fn mandoc_malloc |
.Fn mandoc_malloc |
Line 149 These functions are implemented in |
|
Line 144 These functions are implemented in |
|
.Pa mandoc_aux.c . |
.Pa mandoc_aux.c . |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr asprintf 3 , |
.Xr asprintf 3 , |
.Xr exit 3 , |
.Xr err 3 , |
.Xr malloc 3 , |
.Xr malloc 3 , |
.Xr perror 3 , |
|
.Xr strdup 3 |
.Xr strdup 3 |
.Sh STANDARDS |
.Sh STANDARDS |
The functions |
The functions |