X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=man3%2Fstrdup.3;fp=man3%2Fstrdup.3;h=28036115251d13c7a1c65d912fa84bac0107da61;hp=8ac67e0a60e04c560fa1281ac589b0c19f641c53;hb=4a3ef8e66ad07656caa1e6a2bc69823926b880e3;hpb=b5b6c4a890795ea76f9b92b817b0a83c6bb4862c diff --git a/man3/strdup.3 b/man3/strdup.3 index 8ac67e0..2803611 100644 --- a/man3/strdup.3 +++ b/man3/strdup.3 @@ -4,11 +4,11 @@ .Dd .Dt strdup 3 .Os - +.\" .Sh NAME .Nm strdup .Nd string duplication - +.\" .Sh SYNOPSIS .Sy #define _XOPEN_SOURCE || _POSIX_C_SOURCE >= 200809L .In string.h @@ -17,7 +17,7 @@ .Sy #define _POSIX_C_SOURCE >= 200809L .In string.h .Fn "char *strndup" "const char *str" "size_t len" - +.\" .Sh DESCRIPTION .Fn strdup allocates a new buffer of sufficient size as to be able to hold the entirety of @@ -25,7 +25,7 @@ allocates a new buffer of sufficient size as to be able to hold the entirety of including the terminating character, and copies the contents of .Va str into it. - +.\" .Pp .Fn strndup allocates a buffer large enough to contain @@ -38,17 +38,17 @@ including the trailing null character, whichever is smaller. The first characters of .Va str are then copied into it, and a null character appended. - +.\" .Pp The buffers returned by these functions must be released by a call to .Fn free . - +.\" .Sh SEE ALSO .Xr free 3 .Xr malloc 3 .Xr strcpy 3 .Xr strncpy 3 - +.\" .Sh STANDARDS .Fn strdup first specified in