OSDN Git Service

c386ffbfeaf060cdb32c6c8ec1d39fece55d0acd
[linuxjm/LDP_man-pages.git] / release / man3 / stpncpy.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"
13 .\" Corrected, aeb, 990824
14 .\"*******************************************************************
15 .\"
16 .\" This file was generated with po4a. Translate the source file.
17 .\"
18 .\"*******************************************************************
19 .\"
20 .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
21 .\"         all rights reserved.
22 .\" Translated Tue Jan 11 00:55:50 JST 2000
23 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
24 .\"
25 .TH STPNCPY 3 2014\-01\-13 GNU "Linux Programmer's Manual"
26 .SH 名前
27 stpncpy \- 固定長の文字列をコピーして、その最後へのポインターを返す
28 .SH 書式
29 .nf
30 \fB#include <string.h>\fP
31 .sp
32 \fBchar *stpncpy(char *\fP\fIdest\fP\fB, const char *\fP\fIsrc\fP\fB, size_t \fP\fIn\fP\fB);\fP
33 .fi
34 .sp
35 .in -4n
36 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
37 .in
38 .sp
39 \fBstpncpy\fP():
40 .PD 0
41 .ad l
42 .RS 4
43 .TP  4
44 glibc 2.10 以降:
45 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
46 .TP 
47 glibc 2.10 より前:
48 _GNU_SOURCE
49 .RE
50 .ad
51 .PD
52 .SH 説明
53 \fBstpncpy\fP()  関数は \fIsrc\fP が指している文字列から終端のヌルバイト (\(aq\e0\(aq)  を含めて最大 \fIn\fP バイトを
54 \fIdest\fP にコピーする。長さ \fIstrlen(src)\fP が \fIn\fP より小さい場合には \fIdest\fP の残りの 部分にはヌルバイト
55 (\(aq\e0\(aq) 文字が埋められる。 長さ \fIstrlen(src)\fP が \fIn\fP 以上ならば、 \fIdest\fP
56 が指す文字列はヌルで終端されていない。
57 .PP
58 二つの文字列は重なってはならない。
59 .PP
60 プログラマーは \fIdest\fP に少なくとも \fIn\fP バイトの空きがあることを 保証しなければならない。
61 .SH 返り値
62 \fBstpncpy\fP()  は \fIdest\fP の終端のヌルバイトを指すポインターを返すか、 \fIdest\fP がヌルバイトで終端されていない場合には
63 \fIdest\fP+\fIn\fP を返す。
64 .SH 属性
65 .SS "マルチスレッディング (pthreads(7) 参照)"
66 \fBstpncpy\fP() 関数はスレッドセーフである。
67 .SH 準拠
68 この関数は POSIX.1\-2008 に追加された。 それ以前は GNU による拡張であった。
69 .SH 関連項目
70 \fBstrncpy\fP(3), \fBwcpncpy\fP(3)
71 .SH この文書について
72 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部
73 である。プロジェクトの説明とバグ報告に関する情報は
74 http://www.kernel.org/doc/man\-pages/ に書かれている。