macro and text revision (-mdoc version 3)
[unix-history] / usr / src / lib / libc / string / strdup.3
index 3992d5c..f13f473 100644 (file)
@@ -1,32 +1,38 @@
-.\" Copyright (c) 1990 The Regents of the University of California.
+.\" Copyright (c) 1990, 1991 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\" All rights reserved.
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)strdup.3    5.1 (Berkeley) %G%
+.\"     @(#)strdup.3   5.3 (Berkeley) %G%
 .\"
 .\"
-.TH STRDUP 3 ""
-.UC 7
-.SH NAME
-strdup \- save a copy of a string
-.SH SYNOPSIS
-.nf
-.ft B
-#include <string.h>
-
-char *
-strdup(const char *str);
-.ft R
-.fi
-.SH DESCRIPTION
-.I Strdup
-allocates sufficient memory for a copy of the string
-.IR str ,
+.Dd 
+.Dt STRDUP 3
+.Os
+.Sh NAME
+.Nm strdup
+.Nd save a copy of a string
+.Sh SYNOPSIS
+.Fd #include <string.h>
+.Ft char *
+.Fn strdup "const char *str"
+.Sh DESCRIPTION
+The
+.Fn strdup
+function
+allocates sufficient memory for a copy
+of the string
+.Fa str ,
 does the copy, and returns a pointer to it.
 does the copy, and returns a pointer to it.
-The pointer may subsequently be used as an argument to the function
-.IR free (3).
-.PP
-.I Strdup
-returns NULL if unable to allocate the necessary memory.
-.SH SEE ALSO
-malloc(3)
+The pointer may subsequently be used as an
+argument to the function
+.Xr free 3 .
+.Sh SEE ALSO
+.Xr calloc 3
+.Xr malloc 3
+.Xr realloc 3
+.Xr free 3
+.Sh HISTORY
+The
+.Fn strdup
+function
+.Ud .