X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=draft%2Fman3%2Fasprintf.3;h=cad53061bba4a0a555824adb548b5986598dc37e;hb=ad24a8da2d0555b45e75db36ccc1b56d01cc68e6;hp=9a6643899925c45ff104c2735f16dcfc648f0287;hpb=ce024239a1d8e74a7a44f7c24cee4375cb13b3ef;p=linuxjm%2FLDP_man-pages.git diff --git a/draft/man3/asprintf.3 b/draft/man3/asprintf.3 index 9a664389..cad53061 100644 --- a/draft/man3/asprintf.3 +++ b/draft/man3/asprintf.3 @@ -1,5 +1,6 @@ .\" Copyright (C) 2001 Andries Brouwer .\" +.\" %%%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. @@ -19,88 +20,43 @@ .\" .\" 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 . .\" -.\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved. -.\" Translated Mon 14 Jan 2002 by NAKANO Takeo +.\"******************************************************************* .\" -.TH ASPRINTF 3 2001-12-18 "GNU" "Linux Programmer's Manual" -.\"O .SH NAME -.\"O asprintf, vasprintf \- print to allocated string +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH ASPRINTF 3 2013\-06\-21 GNU "Linux Programmer's Manual" .SH 名前 asprintf, vasprintf \- 文字列を割り当ててそれに出力する -.\"O .SH SYNOPSIS .SH 書式 -.\"O .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" -.BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */" +\fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */ .br -.B #include +\fB#include \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 ); -.\"O .SH DESCRIPTION +\fBint vasprintf(char **\fP\fIstrp\fP\fB, const char *\fP\fIfmt\fP\fB, va_list +\fP\fIap\fP\fB);\fP .SH 説明 -.\"O The functions -.\"O .BR asprintf () -.\"O and -.\"O .BR vasprintf () -.\"O are analogs of -.\"O .BR sprintf (3) -.\"O and -.\"O .BR vsprintf (3), -.\"O except that they allocate a string large enough to hold the output -.\"O including the terminating null byte, -.\"O and return a pointer to it via the first argument. -.\"O This pointer should be passed to -.\"O .BR free (3) -.\"O to release the allocated storage when it is no longer needed. -.BR asprintf () -関数と -.BR vasprintf () -関数とは、それぞれ -.BR sprintf (3) -関数と -.BR vsprintf (3) -関数とに似ているが、 -出力文字列を (終端の NULL バイトも含めて) -保持するのに十分な大きさのメモリを確保し、 -最初の引数にその文字列へのポインタを返す。 -このポインタは、不要になったら -.BR free (3) -に渡し、割り当てられた記憶領域を解放すべきである。 -.\"O .SH "RETURN VALUE" +The functions \fBasprintf\fP() and \fBvasprintf\fP() are analogs of +\fBsprintf\fP(3) and \fBvsprintf\fP(3), except that they allocate a string large +enough to hold the output including the terminating null byte (\(aq\e0\(aq), +and return a pointer to it via the first argument. This pointer should be +passed to \fBfree\fP(3) to release the allocated storage when it is no longer +needed. .SH 返り値 -.\"O When successful, these functions return the number of bytes printed, -.\"O just like -.\"O .BR sprintf (3). -.\"O If memory allocation wasn't possible, or some other error occurs, -.\"O these functions will return \-1, and the contents of -.\"O .I strp -.\"O is undefined. -成功すると、これらの関数は出力されたバイト数を -.RB ( sprintf (3) -のように) 返す。 -メモリの割り当てができなかったり、 -その他エラーが生じると、 -これらの関数は \-1 を返し、 -.I strp -の内容は未定義となる。 -.\"O .SH CONFORMING TO +成功すると、これらの関数は出力されたバイト数を (\fBsprintf\fP(3) のように) 返す。 メモリの割り当てができなかったり、 +その他エラーが生じると、 これらの関数は \-1 を返し、 \fIstrp\fP の内容は未定義となる。 .SH 準拠 -.\"O These functions are GNU extensions, not in C or POSIX. -.\"O They are also available under *BSD. -.\"O The FreeBSD implementation sets -.\"O .I strp -.\"O to NULL on error. -これらの関数は GNU の拡張であり、C や POSIX のものではない。 -これらは *BSD でも利用できる。 -FreeBSD の実装では、エラーの際には -.I strp -を NULL にセットする。 -.\"O .SH "SEE ALSO" +これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD でも利用できる。 FreeBSD +の実装では、エラーの際には \fIstrp\fP を NULL にセットする。 .SH 関連項目 -.BR free (3), -.BR malloc (3), -.BR printf (3) +\fBfree\fP(3), \fBmalloc\fP(3), \fBprintf\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。