OSDN Git Service

[JM:01064] Fix sysconf.3 return value
[linuxjm/LDP_man-pages.git] / release / man3 / asprintf.3
index 9100945..b84bd82 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" Text fragments inspired by Martin Schulze <joey@infodrom.org>.
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved.
 .\" Translated Mon 14 Jan 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
 .\"
-.TH ASPRINTF 3 2001-12-18 "GNU" "Linux Programmer's Manual"
-.SH Ì¾Á°
-asprintf, vasprintf \- Ê¸»úÎó¤ò³ä¤êÅö¤Æ¤Æ¤½¤ì¤Ë½ÐÎϤ¹¤ë
-.SH ½ñ¼°
-.B #define _GNU_SOURCE
+.TH ASPRINTF 3 2013\-06\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+asprintf, vasprintf \- 文字列を割り当ててそれに出力する
+.SH 書式
+\fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */
 .br
-.B #include <stdio.h>
+\fB#include <stdio.h>\fP
 .sp
-.BI "int asprintf(char **" strp ", const char *" fmt ", ...);"
+\fBint asprintf(char **\fP\fIstrp\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP
 .sp
-.BI "int vasprintf(char **" strp ", const char *" fmt ", va_list " ap );
-.SH ÀâÌÀ
-.BR asprintf ()
-´Ø¿ô¤È
-.BR vasprintf ()
-´Ø¿ô¤È¤Ï¡¢¤½¤ì¤¾¤ì
-.BR sprintf (3)
-´Ø¿ô¤È
-.BR vsprintf (3)
-´Ø¿ô¤È¤Ë»÷¤Æ¤¤¤ë¤¬¡¢
-½ÐÎÏʸ»úÎó¤ò (½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤â´Þ¤á¤Æ)
-ÊÝ»ý¤¹¤ë¤Î¤Ë½½Ê¬¤ÊÂ礭¤µ¤Î¥á¥â¥ê¤ò³ÎÊݤ·¡¢
-ºÇ½é¤Î°ú¿ô¤Ë¤½¤Îʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
-¤³¤Î¥Ý¥¤¥ó¥¿¤Ï¡¢ÉÔÍפˤʤ俤é
-.BR free (3)
-¤ËÅϤ·¡¢³ä¤êÅö¤Æ¤é¤ì¤¿µ­²±Îΰè¤ò²òÊü¤¹¤Ù¤­¤Ç¤¢¤ë¡£
-.SH ÊÖ¤êÃÍ
-À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï½ÐÎϤµ¤ì¤¿¥Ð¥¤¥È¿ô¤ò
-.RB ( sprintf (3)
-¤Î¤è¤¦¤Ë) ÊÖ¤¹¡£
-¥á¥â¥ê¤Î³ä¤êÅö¤Æ¤¬¤Ç¤­¤Ê¤«¤Ã¤¿¤ê¡¢
-¤½¤Î¾¥¨¥é¡¼¤¬À¸¤¸¤ë¤È¡¢
-¤³¤ì¤é¤Î´Ø¿ô¤Ï \-1 ¤òÊÖ¤·¡¢
-.I strp
-¤ÎÆâÍƤÏ̤ÄêµÁ¤È¤Ê¤ë¡£
-.SH ½àµò
-¤³¤ì¤é¤Î´Ø¿ô¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ê¡¢C ¤ä POSIX ¤Î¤â¤Î¤Ç¤Ï¤Ê¤¤¡£
-¤³¤ì¤é¤Ï *BSD ¤Ç¤âÍøÍѤǤ­¤ë¡£
-FreeBSD ¤Î¼ÂÁõ¤Ç¤Ï¡¢¥¨¥é¡¼¤ÎºÝ¤Ë¤Ï
-.I strp
-¤ò NULL ¤Ë¥»¥Ã¥È¤¹¤ë¡£
-.SH ´ØÏ¢¹àÌÜ
-.BR free (3),
-.BR malloc (3),
-.BR printf (3),
-.BR feature_test_macros (7)
+\fBint vasprintf(char **\fP\fIstrp\fP\fB, const char *\fP\fIfmt\fP\fB, va_list
+\fP\fIap\fP\fB);\fP
+.SH 説明
+\fBasprintf\fP()  関数と \fBvasprintf\fP()  関数とは、それぞれ \fBsprintf\fP(3)  関数と
+\fBvsprintf\fP(3)  関数とに似ているが、 出力文字列を (終端のヌルバイト (\(aq\e0\(aq) も含めて)
+保持するのに十分な大きさのメモリを確保し、 最初の引数にその文字列へのポインタを返す。 このポインタは、不要になったら \fBfree\fP(3)
+に渡し、割り当てられた記憶領域を解放すべきである。
+.SH 返り値
+成功すると、これらの関数は出力されたバイト数を (\fBsprintf\fP(3)  のように) 返す。 メモリの割り当てができなかったり、
+その他エラーが生じると、 これらの関数は \-1 を返し、 \fIstrp\fP の内容は未定義となる。
+.SH 準拠
+これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD でも利用できる。 FreeBSD
+の実装では、エラーの際には \fIstrp\fP を NULL にセットする。
+.SH 関連項目
+\fBfree\fP(3), \fBmalloc\fP(3), \fBprintf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.76 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。