OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man3 / stpncpy.3
index ef26095..40e3833 100644 (file)
@@ -1,78 +1,65 @@
 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"   GNU glibc-2 source code and manual
 .\"
 .\" Corrected, aeb, 990824
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
-.\"         all rights reserved.
-.\" Translated Tue Jan 11 00:55:50 JST 2000
-.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH STPNCPY 3 1999-07-25 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O stpncpy \- copy a fixed-size string, returning a pointer to its end
-stpncpy \- ¸ÇÄêŤÎʸ»úÎó¤ò¥³¥Ô¡¼¤·¤Æ¡¢¤½¤ÎºÇ¸å¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤òÊÖ¤¹
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH STPNCPY 3 2011\-09\-28 GNU "Linux Programmer's Manual"
+.SH 名前
+stpncpy \- 固定長の文字列をコピーして、その最後へのポインターを返す
+.SH 書式
 .nf
-.B #define _GNU_SOURCE
-.br
-.B #include <string.h>
+\fB#include <string.h>\fP
 .sp
-.BI "char *stpncpy(char *" dest ", const char *" src ", size_t " n );
+\fBchar *stpncpy(char *\fP\fIdest\fP\fB, const char *\fP\fIsrc\fP\fB, size_t \fP\fIn\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The
-.\"O .BR stpncpy ()
-.\"O function copies at most \fIn\fP characters from the string
-.\"O pointed to by \fIsrc\fP, including the terminating \(aq\\0\(aq character,
-.\"O to the array pointed to by \fIdest\fP.
-.\"O Exactly \fIn\fP characters are written at
-.\"O \fIdest\fP.
-.\"O If the length \fIstrlen(src)\fP is smaller than \fIn\fP, the
-.\"O remaining characters in the array pointed to by \fIdest\fP are filled
-.\"O with \(aq\\0\(aq characters.
-.\"O If the length \fIstrlen(src)\fP is greater or equal to
-.\"O \fIn\fP, the string pointed to by \fIdest\fP will
-.\"O not be \(aq\\0\(aq terminated.
-.BR stpncpy ()
-´Ø¿ô¤Ï \fIsrc\fP ¤¬»Ø¤·¤Æ¤¤¤ëʸ»úÎ󤫤齪ü¤Î \(aq\\0\(aq Ê¸»ú¤ò
-´Þ¤á¤ÆºÇÂç \fIn\fP ¥Ð¥¤¥È¤ò \fIdest\fP ¤Ë¥³¥Ô¡¼¤¹¤ë¡£Ä¹¤µ
-\fIstrlen(src)\fP ¤¬ \fIn\fP ¤è¤ê¾®¤µ¤¤¾ì¹ç¤Ë¤Ï \fIdest\fP ¤Î»Ä¤ê¤Î
-Éôʬ¤Ë¤Ï  \(aq\\0\(aq Ê¸»ú¤¬Ëä¤á¤é¤ì¤ë¡£Ä¹¤µ \fIstrlen(src)\fP ¤¬ \fIn\fP °Ê¾å
-¤Ê¤é¤Ð¡¢\fIdest\fP ¤¬»Ø¤¹Ê¸»úÎó¤Ï \(aq\\0\(aq ¤Ç½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+.sp
+.in -4n
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.in
+.sp
+\fBstpncpy\fP():
+.PD 0
+.ad l
+.RS 4
+.TP  4
+glibc 2.10 以降:
+_XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
+.TP 
+glibc 2.10 より前:
+_GNU_SOURCE
+.RE
+.ad
+.PD
+.SH 説明
+\fBstpncpy\fP()  関数は \fIsrc\fP が指している文字列から終端の NULL バイト (\(aq\e0\(aq)  を含めて最大 \fIn\fP
+バイトを \fIdest\fP にコピーする。長さ \fIstrlen(src)\fP が \fIn\fP より小さい場合には \fIdest\fP の残りの 部分には
+NULL バイト (\(aq\e0\(aq) 文字が埋められる。 長さ \fIstrlen(src)\fP が \fIn\fP 以上ならば、 \fIdest\fP
+が指す文字列は NULL で終端されていない。
 .PP
-.\"O The strings may not overlap.
-Æó¤Ä¤Îʸ»úÎó¤Ï½Å¤Ê¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
+二つの文字列は重なってはならない。
 .PP
-.\"O The programmer must ensure that there is room for at least \fIn\fP characters
-.\"O at \fIdest\fP.
-¥×¥í¥°¥é¥Þ¡¼¤Ï \fIdest\fP ¤Ë¾¯¤Ê¤¯¤È¤â \fIn\fP ¥Ð¥¤¥È¤Î¶õ¤­¤¬¤¢¤ë¤³¤È¤ò
-Êݾڤ·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O .BR stpncpy ()
-.\"O returns a pointer to the terminating null
-.\"O in \fIdest\fP, or, if \fIdest\fP is not null-terminated,
-.\"O \fIdest + n\fP.
-.BR stpncpy ()
-¤Ï \fIdest\fP ¤Î½ªÃ¼¤Î¥Ê¥ëʸ»ú¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¡¼¤òÊÖ¤¹¤«¡¢
-\fIdest\fP ¤¬¥Ê¥ëʸ»ú¤Ç½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï \fIdest + n\fP ¤òÊÖ¤¹¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O This function is a GNU extension.
-¤³¤Î´Ø¿ô¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR strncpy (3),
-.BR wcpncpy (3),
-.BR feature_test_macros (7)
+プログラマーは \fIdest\fP に少なくとも \fIn\fP バイトの空きがあることを 保証しなければならない。
+.SH 返り値
+\fBstpncpy\fP()  は \fIdest\fP の終端の NULL バイトを指すポインターを返すか、 \fIdest\fP が NULL
+バイトで終端されていない場合には \fIdest + n\fP を返す。
+.SH 準拠
+この関数は POSIX.1\-2008 に追加された。 それ以前は GNU による拡張であった。
+.SH 関連項目
+\fBstrncpy\fP(3), \fBwcpncpy\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。