OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man3 / stpcpy.3
index 4aaac4f..7290b62 100644 (file)
@@ -1,7 +1,6 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright 1995 James R. Van Zandt <jrv@vanzandt.mv.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -21,8 +20,9 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.TH STPCPY 3  2010-09-15 "GNU" "Linux Programmer's Manual"
+.TH STPCPY 3  2014-05-10 "GNU" "Linux Programmer's Manual"
 .SH NAME
 stpcpy \- copy a string returning a pointer to its end
 .SH SYNOPSIS
@@ -53,27 +53,48 @@ _GNU_SOURCE
 .SH DESCRIPTION
 The
 .BR stpcpy ()
-function copies the string pointed to by \fIsrc\fP
-(including the terminating \(aq\\0\(aq character) to the array pointed to by
-\fIdest\fP.
+function copies the string pointed to by
+.I src
+(including the terminating null byte (\(aq\\0\(aq)) to the array pointed to by
+.IR dest .
 The strings may not overlap, and the destination string
-\fIdest\fP must be large enough to receive the copy.
-.SH "RETURN VALUE"
+.I dest
+must be large enough to receive the copy.
+.SH RETURN VALUE
 .BR stpcpy ()
-returns a pointer to the \fBend\fP of the string
-\fIdest\fP (that is, the address of the terminating null byte)
+returns a pointer to the
+.B end
+of the string
+.I dest
+(that is, the address of the terminating null byte)
 rather than the beginning.
-.SH "CONFORMING TO"
-This function is not part of the C or POSIX.1 standards, and is
-not customary on UNIX systems, but is not a GNU invention either.
-Perhaps it comes from MS-DOS.
-Nowadays, it is also present on the BSDs.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR stpcpy ()
+function is thread-safe.
+.SH CONFORMING TO
+This function was added to POSIX.1-2008.
+Before that, it was not part of
+the C or POSIX.1 standards, nor customary on UNIX systems.
+It first appeared at least as early as 1986,
+in the Lattice C AmigaDOS compiler,
+then in the GNU fileutils and GNU textutils in 1989,
+and in the GNU C library by 1992.
+It is also present on the BSDs.
+.SH BUGS
+This function may overrun the buffer
+.IR dest .
 .SH EXAMPLE
 For example, this program uses
 .BR stpcpy ()
-to concatenate \fBfoo\fP and
-\fBbar\fP to produce \fBfoobar\fP, which it then prints.
-.in +4n
+to concatenate
+.B foo
+and
+.B bar
+to produce
+.BR foobar ,
+which it then prints.
 .nf
 
 #define _GNU_SOURCE
@@ -91,16 +112,21 @@ main(void)
     printf("%s\\n", buffer);
 }
 .fi
-.in
-.SH BUGS
-This function may overrun the buffer
-.IR dest .
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR bcopy (3),
 .BR memccpy (3),
 .BR memcpy (3),
 .BR memmove (3),
+.BR stpncpy (3),
 .BR strcpy (3),
 .BR string (3),
-.BR wcpcpy (3),
-.BR feature_test_macros (7)
+.BR wcpcpy (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/.