Loading...
string/strdup.3 Libc-763.11 Libc-262
--- Libc/Libc-763.11/string/strdup.3
+++ Libc/Libc-262/string/strdup.3
@@ -9,6 +9,10 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"	This product includes software developed by the University of
+.\"	California, Berkeley and its contributors.
 .\" 4. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
@@ -26,35 +30,27 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strdup.3	8.1 (Berkeley) 6/9/93
-.\" $FreeBSD: src/lib/libc/string/strdup.3,v 1.15 2009/04/07 13:42:53 trasz Exp $
+.\" $FreeBSD: src/lib/libc/string/strdup.3,v 1.10 2001/10/01 16:09:00 ru Exp $
 .\"
-.Dd December 5, 2008
+.Dd June 9, 1993
 .Dt STRDUP 3
 .Os
 .Sh NAME
-.Nm strdup ,
-.Nm strndup
+.Nm strdup
 .Nd save a copy of a string
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In string.h
 .Ft char *
-.Fo strdup
-.Fa "const char *s1"
-.Fc
-.Ft char *
-.Fo strndup
-.Fa "const char *s1"
-.Fa "size_t n"
-.Fc
+.Fn strdup "const char *str"
 .Sh DESCRIPTION
 The
 .Fn strdup
 function
 allocates sufficient memory for a copy
 of the string
-.Fa s1 ,
+.Fa str ,
 does the copy, and returns a pointer to it.
 The pointer may subsequently be used as an
 argument to the function
@@ -64,16 +60,6 @@
 .Va errno
 is set to
 .Er ENOMEM .
-.Pp
-The
-.Fn strndup
-function copies at most
-.Fa n
-characters from the string
-.Fa s1
-always
-.Dv NUL
-terminating the copied string.
 .Sh SEE ALSO
 .Xr free 3 ,
 .Xr malloc 3
@@ -82,7 +68,3 @@
 .Fn strdup
 function first appeared in
 .Bx 4.4 .
-The
-.Fn strndup
-function was added in
-.Fx 7.2 .