OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / stpncpy.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\"   GNU glibc-2 source code and manual
10 .\"
11 .\" Corrected, aeb, 990824
12 .\"
13 .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
14 .\"         all rights reserved.
15 .\" Translated Tue Jan 11 00:55:50 JST 2000
16 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
17 .\"
18 .TH STPNCPY 3 1999-07-25 "GNU" "Linux Programmer's Manual"
19 .\"O .SH NAME
20 .SH Ì¾Á°
21 .\"O stpncpy \- copy a fixed-size string, returning a pointer to its end
22 stpncpy \- ¸ÇÄêŤÎʸ»úÎó¤ò¥³¥Ô¡¼¤·¤Æ¡¢¤½¤ÎºÇ¸å¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤òÊÖ¤¹
23 .\"O .SH SYNOPSIS
24 .SH ½ñ¼°
25 .nf
26 .B #define _GNU_SOURCE
27 .br
28 .B #include <string.h>
29 .sp
30 .BI "char *stpncpy(char *" dest ", const char *" src ", size_t " n );
31 .fi
32 .\"O .SH DESCRIPTION
33 .SH ÀâÌÀ
34 .\"O The
35 .\"O .BR stpncpy ()
36 .\"O function copies at most \fIn\fP characters from the string
37 .\"O pointed to by \fIsrc\fP, including the terminating \(aq\\0\(aq character,
38 .\"O to the array pointed to by \fIdest\fP.
39 .\"O Exactly \fIn\fP characters are written at
40 .\"O \fIdest\fP.
41 .\"O If the length \fIstrlen(src)\fP is smaller than \fIn\fP, the
42 .\"O remaining characters in the array pointed to by \fIdest\fP are filled
43 .\"O with \(aq\\0\(aq characters.
44 .\"O If the length \fIstrlen(src)\fP is greater or equal to
45 .\"O \fIn\fP, the string pointed to by \fIdest\fP will
46 .\"O not be \(aq\\0\(aq terminated.
47 .BR stpncpy ()
48 ´Ø¿ô¤Ï \fIsrc\fP ¤¬»Ø¤·¤Æ¤¤¤ëʸ»úÎ󤫤齪ü¤Î \(aq\\0\(aq Ê¸»ú¤ò
49 ´Þ¤á¤ÆºÇÂç \fIn\fP ¥Ð¥¤¥È¤ò \fIdest\fP ¤Ë¥³¥Ô¡¼¤¹¤ë¡£Ä¹¤µ
50 \fIstrlen(src)\fP ¤¬ \fIn\fP ¤è¤ê¾®¤µ¤¤¾ì¹ç¤Ë¤Ï \fIdest\fP ¤Î»Ä¤ê¤Î
51 Éôʬ¤Ë¤Ï  \(aq\\0\(aq Ê¸»ú¤¬Ëä¤á¤é¤ì¤ë¡£Ä¹¤µ \fIstrlen(src)\fP ¤¬ \fIn\fP °Ê¾å
52 ¤Ê¤é¤Ð¡¢\fIdest\fP ¤¬»Ø¤¹Ê¸»úÎó¤Ï \(aq\\0\(aq ¤Ç½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
53 .PP
54 .\"O The strings may not overlap.
55 Æó¤Ä¤Îʸ»úÎó¤Ï½Å¤Ê¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
56 .PP
57 .\"O The programmer must ensure that there is room for at least \fIn\fP characters
58 .\"O at \fIdest\fP.
59 ¥×¥í¥°¥é¥Þ¡¼¤Ï \fIdest\fP ¤Ë¾¯¤Ê¤¯¤È¤â \fIn\fP ¥Ð¥¤¥È¤Î¶õ¤­¤¬¤¢¤ë¤³¤È¤ò
60 Êݾڤ·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
61 .\"O .SH "RETURN VALUE"
62 .SH ÊÖ¤êÃÍ
63 .\"O .BR stpncpy ()
64 .\"O returns a pointer to the terminating null
65 .\"O in \fIdest\fP, or, if \fIdest\fP is not null-terminated,
66 .\"O \fIdest + n\fP.
67 .BR stpncpy ()
68 ¤Ï \fIdest\fP ¤Î½ªÃ¼¤Î¥Ê¥ëʸ»ú¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¡¼¤òÊÖ¤¹¤«¡¢
69 \fIdest\fP ¤¬¥Ê¥ëʸ»ú¤Ç½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï \fIdest + n\fP ¤òÊÖ¤¹¡£
70 .\"O .SH "CONFORMING TO"
71 .SH ½àµò
72 .\"O This function is a GNU extension.
73 ¤³¤Î´Ø¿ô¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
74 .\"O .SH "SEE ALSO"
75 .SH ´ØÏ¢¹àÌÜ
76 .BR strncpy (3),
77 .BR wcpncpy (3),
78 .BR feature_test_macros (7)