aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man3/stpncpy.310
-rw-r--r--man3/string.311
-rw-r--r--man7/string_copying.73
3 files changed, 10 insertions, 14 deletions
diff --git a/man3/stpncpy.3 b/man3/stpncpy.3
index f86ff8c290..3cf4eb371e 100644
--- a/man3/stpncpy.3
+++ b/man3/stpncpy.3
@@ -7,7 +7,8 @@
.SH NAME
stpncpy, strncpy
\-
-fill a fixed-width null-padded buffer with bytes from a string
+fill a fixed-width buffer with characters from a string
+and pad with null bytes
.SH LIBRARY
Standard C library
.RI ( libc ", " \-lc )
@@ -36,10 +37,11 @@ Feature Test Macro Requirements for glibc (see
_GNU_SOURCE
.fi
.SH DESCRIPTION
-These functions copy bytes from the string pointed to by
+These functions copy characters from the string pointed to by
.I src
-into a null-padded character sequence at the fixed-width buffer pointed to by
-.IR dst .
+into a character sequence at the fixed-width buffer pointed to by
+.IR dst ,
+and pad with null bytes.
If the destination buffer,
limited by its size,
isn't large enough to hold the copy,
diff --git a/man3/string.3 b/man3/string.3
index aba5efd2bc..bd8b342a67 100644
--- a/man3/string.3
+++ b/man3/string.3
@@ -179,21 +179,14 @@ to the current locale and copies the first
.I n
bytes to
.IR dest .
-.SS Obsolete functions
.TP
.nf
.BI "char *strncpy(char " dest "[restrict ." n "], \
const char " src "[restrict ." n ],
.BI " size_t " n );
.fi
-Copy at most
-.I n
-bytes from string
-.I src
-to
-.IR dest ,
-returning a pointer to the start of
-.IR dest .
+Fill a fixed‐width buffer with characters from a string
+and pad with null bytes.
.SH DESCRIPTION
The string functions perform operations on null-terminated
strings.
diff --git a/man7/string_copying.7 b/man7/string_copying.7
index 0e179ba341..865271c6f9 100644
--- a/man7/string_copying.7
+++ b/man7/string_copying.7
@@ -41,7 +41,8 @@ const char *restrict " src ,
.\" ----- SYNOPSIS :: Null-padded character sequences --------/
.SS Null-padded character sequences
.nf
-// Fill a fixed-width null-padded buffer with bytes from a string.
+// Fill a fixed-width buffer with characters from a string
+// and pad with null bytes.
.BI "char *strncpy(char " dst "[restrict ." sz "], \
const char *restrict " src ,
.BI " size_t " sz );