From 403f5844d16c63a63b8ce33a354e4871cb93df4c Mon Sep 17 00:00:00 2001 From: aaron <> Date: Tue, 29 Jun 1999 18:01:34 +0000 Subject: repairs --- src/lib/libc/string/strcpy.3 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/lib/libc/string/strcpy.3') diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3 index 36434ca04b..aab10f9ba8 100644 --- a/src/lib/libc/string/strcpy.3 +++ b/src/lib/libc/string/strcpy.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strcpy.3,v 1.8 1999/06/06 15:17:32 aaron Exp $ +.\" $OpenBSD: strcpy.3,v 1.9 1999/06/29 18:01:33 aaron Exp $ .\" .Dd June 29, 1991 .Dt STRCPY 3 @@ -92,20 +92,22 @@ return .Fa dst . .Sh EXAMPLES The following sets -.Dq Li chararray +.Va chararray to -.Dq Li abc\e0\e0\e0 : +.Dq abc\e0\e0\e0 : .Bd -literal -offset indent (void)strncpy(chararray, "abc", 6); .Ed .Pp The following sets -.Dq Li chararray +.Va chararray to -.Dq Li abcdef +.Dq abcdef and does .Em not -null terminate chararray because the source string is >= the length parameter. +null terminate +.Va chararray +because the source string is >= the length parameter. .Fn strncpy .Em only null terminates the destination string when then length of the source @@ -115,9 +117,9 @@ string is less than the length parameter. .Ed .Pp The following copies as many characters from -.Dq Li input +.Va input to -.Dq Li buf +.Va buf as will fit and null terminates the result. Because .Fn strncpy does @@ -143,7 +145,7 @@ is simply: .Xr memccpy 3 , .Xr memcpy 3 , .Xr memmove 3 , -.Xr strlcpy 3 +.Xr strlcpy 3 .Sh STANDARDS The .Fn strcpy -- cgit v1.2.3-55-g6feb