OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[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 .TH STPNCPY 3 2011\-09\-28 GNU "Linux Programmer's Manual"
20 .SH 名前
21 stpncpy \- 固定長の文字列をコピーして、その最後へのポインターを返す
22 .SH 書式
23 .nf
24 \fB#include <string.h>\fP
25 .sp
26 \fBchar *stpncpy(char *\fP\fIdest\fP\fB, const char *\fP\fIsrc\fP\fB, size_t \fP\fIn\fP\fB);\fP
27 .fi
28 .sp
29 .in -4n
30 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
31 .in
32 .sp
33 \fBstpncpy\fP():
34 .PD 0
35 .ad l
36 .RS 4
37 .TP  4
38 glibc 2.10 以降:
39 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
40 .TP 
41 glibc 2.10 より前:
42 _GNU_SOURCE
43 .RE
44 .ad
45 .PD
46 .SH 説明
47 \fBstpncpy\fP()  関数は \fIsrc\fP が指している文字列から終端の NULL バイト (\(aq\e0\(aq)  を含めて最大 \fIn\fP
48 バイトを \fIdest\fP にコピーする。長さ \fIstrlen(src)\fP が \fIn\fP より小さい場合には \fIdest\fP の残りの 部分には
49 NULL バイト (\(aq\e0\(aq) 文字が埋められる。 長さ \fIstrlen(src)\fP が \fIn\fP 以上ならば、 \fIdest\fP
50 が指す文字列は NULL で終端されていない。
51 .PP
52 二つの文字列は重なってはならない。
53 .PP
54 プログラマーは \fIdest\fP に少なくとも \fIn\fP バイトの空きがあることを 保証しなければならない。
55 .SH 返り値
56 \fBstpncpy\fP()  は \fIdest\fP の終端の NULL バイトを指すポインターを返すか、 \fIdest\fP が NULL
57 バイトで終端されていない場合には \fIdest + n\fP を返す。
58 .SH 準拠
59 この関数は POSIX.1\-2008 に追加された。 それ以前は GNU による拡張であった。
60 .SH 関連項目
61 \fBstrncpy\fP(3), \fBwcpncpy\fP(3)
62 .SH この文書について
63 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
64 である。プロジェクトの説明とバグ報告に関する情報は
65 http://www.kernel.org/doc/man\-pages/ に書かれている。