OSDN Git Service

7ed0b5bad73c6e63957f03c2b98ff3640301fb88
[linuxjm/LDP_man-pages.git] / release / man3 / stpcpy.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1995 James R. Van Zandt <jrv@vanzandt.mv.com>
4 .\"
5 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
6 .\"     all rights reserved.
7 .\" Translated Fri Dec 26 13:14:47 JST 1997
8 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
9 .\"
10 .\" Permission is granted to make and distribute verbatim copies of this
11 .\" manual provided the copyright notice and this permission notice are
12 .\" preserved on all copies.
13 .\"
14 .\" Permission is granted to copy and distribute modified versions of this
15 .\" manual under the conditions for verbatim copying, provided that the
16 .\" entire resulting derived work is distributed under the terms of a
17 .\" permission notice identical to this one.
18 .\"
19 .\" Since the Linux kernel and libraries are constantly changing, this
20 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
21 .\" responsibility for errors or omissions, or for damages resulting from
22 .\" the use of the information contained herein.  The author(s) may not
23 .\" have taken the same level of care in the production of this manual,
24 .\" which is licensed free of charge, as they might when working
25 .\" professionally.
26 .\"
27 .\" Formatted or processed versions of this manual, if unaccompanied by
28 .\" the source, must acknowledge the copyright and authors of this work.
29 .\"
30 .TH STPCPY 3  2010-09-15 "GNU" "Linux Programmer's Manual"
31 .SH Ì¾Á°
32 stpcpy \- Ê¸»úÎó¤ò¥³¥Ô¡¼¤·¡¢¥³¥Ô¡¼¤·¤¿Ê¸»úÎó¤Î½ª¤ê¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹
33 .SH ½ñ¼°
34 .nf
35 .B #include <string.h>
36 .sp
37 .BI "char *stpcpy(char *" dest ", const char *" src );
38 .fi
39 .sp
40 .in -4n
41 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
42 .RB ( feature_test_macros (7)
43 »²¾È):
44 .in
45 .sp
46 .BR stpcpy ():
47 .PD 0
48 .ad l
49 .RS 4
50 .TP 4
51 glibc 2.10 °Ê¹ß:
52 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
53 .TP
54 glibc 2.10 ¤è¤êÁ°:
55 _GNU_SOURCE
56 .RE
57 .ad
58 .PD
59 .SH ÀâÌÀ
60 .BR stpcpy ()
61 ´Ø¿ô¤Ï¡¢\fIsrc\fP ¤Ç»Ø¤µ¤ì¤¿Ê¸»úÎó¤ò (ʸ»úÎó¤ò½ªÃ¼¤¹¤ë \(aq\\0\(aq
62 ¤ò´Þ¤á¤Æ) \fIdest\fP ¤Ç»Ø¤µ¤ì¤¿ÇÛÎó¤Ë¥³¥Ô¡¼¤¹¤ë¡£
63 ʸ»úÎó¤Ï½ÅÊ£¤·¤Æ¤Ï¤Ê¤é¤º¡¢¥³¥Ô¡¼Àè¤Îʸ»úÎó \fIdest\fP ¤Ï¥³¥Ô¡¼¤ò¼õ¤±¼è¤ë
64 ¤Î¤Ë½½Ê¬Â礭¤¯¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
65 .SH ÊÖ¤êÃÍ
66 .BR stpcpy ()
67 ¤Ï¡¢Ê¸»úÎó \fIdest\fP ¤Î»Ï¤Þ¤ê¤Ç¤Ï¤Ê¤¯
68 \fB½ª¤ê\fP¤ò»Ø¤¹¥Ý¥¤¥ó¥¿ (¤¹¤Ê¤ï¤Á¡¢Ê¸»úÎó¤ò½ªÃ¼¤¹¤ë NULL ¥Ð¥¤¥È) ¤òÊÖ¤¹¡£
69 .SH ½àµò
70 ¤³¤Î´Ø¿ô¤Ï¡¢C ¤ä POSIX.1 É¸½à¤Î°ìÉô¤Ç¤Ï¤Ê¤¯¡¢UNIX ¥·¥¹¥Æ¥à¤Î´·½¬Åª¤Ê
71 ¤â¤Î¤Ç¤â¤Ê¤¤¤¬¡¢GNU ¤ÎȯÌÀ¤È¤¤¤¦¤ï¤±¤Ç¤â¤Ê¤¤¡£
72 ¤Ò¤ç¤Ã¤È¤·¤¿¤é MS-DOS Í³Íè¤Î¤â¤Î¤«¤â¤·¤ì¤Ê¤¤¡£
73 ¸½ºß¤Ç¤Ï¡¢BSD ·Ï¤Ë¤â¸ºß¤¹¤ë¡£
74 .SH Îã
75 Îã¤È¤·¤Æ¡¢¤³¤Î¥×¥í¥°¥é¥à¤Ï \fBfoo\fP ¤È \fBbar\fP ¤òÏ¢·ë¤·¤Æ \fBfoobar\fP
76 ¤òºî¤ë¤¿¤á¤Ë
77 .BR stpcpy ()
78 ¤ò»ÈÍѤ·¡¢¤½¤Î¸åɽ¼¨¤¹¤ë¡£
79 .in +4n
80 .nf
81
82 #define _GNU_SOURCE
83 #include <string.h>
84 #include <stdio.h>
85
86 int
87 main(void)
88 {
89     char buffer[20];
90     char *to = buffer;
91
92     to = stpcpy(to, "foo");
93     to = stpcpy(to, "bar");
94     printf("%s\\n", buffer);
95 }
96 .fi
97 .in
98 .SH ¥Ð¥°
99 ¤³¤Î´Ø¿ô¤Ï¥Ð¥Ã¥Õ¥¡
100 .I dest
101 ¤ÎÈϰϤò¹Ô¤­²á¤®¤Æ¤·¤Þ¤¦²ÄǽÀ­¤¬¤¢¤ë¡£
102 .SH ´ØÏ¢¹àÌÜ
103 .BR bcopy (3),
104 .BR memccpy (3),
105 .BR memcpy (3),
106 .BR memmove (3),
107 .BR strcpy (3),
108 .BR string (3),
109 .BR wcpcpy (3)