OSDN Git Service

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