OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man3 / stpncpy.3
index e32a850..383bdab 100644 (file)
@@ -11,7 +11,7 @@
 .\"   GNU glibc-2 source code and manual
 .\"
 .\" Corrected, aeb, 990824
-.TH STPNCPY 3  2011-09-28 "GNU" "Linux Programmer's Manual"
+.TH STPNCPY 3  2014-05-10 "GNU" "Linux Programmer's Manual"
 .SH NAME
 stpncpy \- copy a fixed-size string, returning a pointer to its end
 .SH SYNOPSIS
@@ -42,29 +42,70 @@ _GNU_SOURCE
 .SH DESCRIPTION
 The
 .BR stpncpy ()
-function copies at most \fIn\fP characters from the string
-pointed to by \fIsrc\fP, including the terminating null byte (\(aq\\0\(aq),
-to the array pointed to by \fIdest\fP.
-Exactly \fIn\fP characters are written at
-\fIdest\fP.
-If the length \fIstrlen(src)\fP is smaller than \fIn\fP, the
-remaining characters in the array pointed to by \fIdest\fP are filled
+function copies at most
+.I n
+characters from the string
+pointed to by
+.IR src ,
+including the terminating null byte (\(aq\\0\(aq),
+to the array pointed to by
+.IR dest .
+Exactly
+.I n
+characters are written at
+.IR dest .
+If the length
+.I strlen(src)
+is smaller than
+.IR n ,
+the
+remaining characters in the array pointed to by
+.I dest
+are filled
 with null bytes (\(aq\\0\(aq),
-If the length \fIstrlen(src)\fP is greater or equal to
-\fIn\fP, the string pointed to by \fIdest\fP will
+If the length
+.I strlen(src)
+is greater than or equal to
+.IR n ,
+the string pointed to by
+.I dest
+will
 not be null-terminated.
 .PP
 The strings may not overlap.
 .PP
-The programmer must ensure that there is room for at least \fIn\fP characters
-at \fIdest\fP.
+The programmer must ensure that there is room for at least
+.I n
+characters
+at
+.IR dest .
 .SH RETURN VALUE
 .BR stpncpy ()
 returns a pointer to the terminating null byte
-in \fIdest\fP, or, if \fIdest\fP is not null-terminated,
-\fIdest + n\fP.
+in
+.IR dest ,
+or, if
+.I dest
+is not null-terminated,
+.IR dest + n .
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR stpncpy ()
+function is thread-safe.
 .SH CONFORMING TO
-This function was added to POSIX.1-2008. Before that, it was a GNU extension.
+This function was added to POSIX.1-2008.
+Before that, it was a GNU extension.
+It first appeared in version 1.07 of the GNU C library in 1993.
 .SH SEE ALSO
 .BR strncpy (3),
 .BR wcpncpy (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.