OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man3 / error.3
index 62d7bc2..63fb2ed 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (C) 2006 Justin Pryzby <pryzbyj@justinpryzby.com>
 .\" and Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(PERMISSIVE_MISC)
 .\" Permission is hereby granted, free of charge, to any person obtaining
 .\" a copy of this software and associated documentation files (the
 .\" "Software"), to deal in the Software without restriction, including
 .\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 .\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 .\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\" %%%LICENSE_END
 .\"
 .\" References:
 .\"   glibc manual and source
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 2006 Yuichi SATO
-.\"         all rights reserved.
-.\" Translated 2006-08-04 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.36
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH ERROR 3 2010-08-29 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O error, error_at_line, error_message_count, error_on_per_line, \
-.\"O error_print_progname \- glibc error reporting functions
-error, error_at_line, error_message_count, error_on_per_line, error_print_progname \- glibc ¤Î¥¨¥é¡¼½ñ¤­½Ð¤·´Ø¿ô
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH ERROR 3 2010\-08\-29 GNU "Linux Programmer's Manual"
+.SH 名前
+error, error_at_line, error_message_count, error_one_per_line,
+error_print_progname \- glibc のエラー書き出し関数
+.SH 書式
 .nf
-\fB#include <error.h>
+\fB#include <error.h>\fP
 
-\fBvoid error(int \fIstatus, \fBint\fI errnum, \
-\fBconst char *\fIformat, \fB...);
+\fBvoid error(int \fP\fIstatus\fP\fB, int \fP\fIerrnum\fP\fB, const char *\fP\fIformat\fP\fB, ...);\fP
 
-\fBvoid error_at_line(int \fIstatus, \fBint \fIerrnum, \
-\fBconst char *\fIfilename,
-                   \fBunsigned int \fIlinenum, \
-\fBconst char *\fIformat, \fB...);
+\fBvoid error_at_line(int \fP\fIstatus\fP\fB, int \fP\fIerrnum\fP\fB, const char *\fP\fIfilename\fP\fB,\fP
+\fB                   unsigned int \fP\fIlinenum\fP\fB, const char *\fP\fIformat\fP\fB, ...);\fP
 
-\fBextern unsigned int \fIerror_message_count\fP;
+\fBextern unsigned int \fP\fIerror_message_count\fP\fB;\fP
 
-\fBextern int \fIerror_one_per_line\fP;
+\fBextern int \fP\fIerror_one_per_line\fP\fB;\fP
 
-\fBextern void (* \fIerror_print_progname\fB) (void);
+\fBextern void (*\fP\fIerror_print_progname\fP\fB) (void);\fP
 .fi
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O .BR error ()
-.\"O is a general error-reporting function.
-.BR error ()
-¤ÏÈÆÍÑŪ¤Ê¥¨¥é¡¼½ñ¤­½Ð¤·´Ø¿ô¤Ç¤¢¤ë¡£
-.\"O It flushes
-.\"O .IR stdout ,
-.\"O and then outputs to
-.\"O .I stderr
-.\"O the program name, a colon and a space, the message specified by the
-.\"O .BR printf (3)-style
-.\"O format string \fIformat\fP, and, if \fIerrnum\fP is
-.\"O nonzero, a second colon and a space followed by the string given by
-.\"O .IR strerror(errnum) .
-¤³¤Î´Ø¿ô¤Ïɸ½à½ÐÎÏ
-.RI ( stdout )
-¤Ë½ñ¤­½Ð¤·¤Æ¤«¤é¡¢É¸½à¥¨¥é¡¼½ÐÎÏ
-.RI ( stderr )
-¤Ë½ñ¤­½Ð¤¹¡£
-½ñ¤­½Ð¤¹ÆâÍƤϡ¢¥×¥í¥°¥é¥à̾¡¦¥³¥í¥ó¡¦¥¹¥Ú¡¼¥¹¡¦
-.BR printf (3)
-·Á¼°¤Î
-¥Õ¥©¡¼¥Þ¥Ã¥Èʸ»úÎó \fIformat\fP ¤Ç»ØÄꤵ¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Ç¤¢¤ë¡£
-\fIerrnum\fP ¤¬ 0 °Ê³°¤Î¾ì¹ç¡¢2 ¤ÄÌܤΥ³¥í¥ó¤È¥¹¥Ú¡¼¥¹¤Î¸å¤Ë
-.I strerror(errnum)
-¤Ç»ØÄꤵ¤ì¤¿Ê¸»úÎó¤â½ñ¤­½Ð¤¹¡£
-.\"O Any arguments required for
-.\"O .I format
-.\"O should follow
-.\"O .I format
-.\"O in the argument list.
-.I format
-¤ËɬÍפÊǤ°Õ¤Î°ú¤­¿ô¤¬¡¢°ú¤­¿ô¥ê¥¹¥È¤Î
-.I format
-¤Î¸å¤Ë³¤¯¡£
-.\"O The output is terminated by a newline character.
-½ÐÎϤνªÃ¼¤Ë¤Ï²þ¹Ôʸ»ú¤¬ÉÕ¤¯¡£
+.SH 説明
+\fBerror\fP()  は汎用的なエラー書き出し関数である。 この関数は標準出力 (\fIstdout\fP)  に書き出してから、標準エラー出力
+(\fIstderr\fP)  に書き出す。 書き出す内容は、プログラム名・コロン・スペース・ \fBprintf\fP(3)  形式の フォーマット文字列
+\fIformat\fP で指定されたメッセージである。 \fIerrnum\fP が 0 以外の場合、2 つ目のコロンとスペースの後に
+\fIstrerror(errnum)\fP で指定された文字列も書き出す。 \fIformat\fP に必要な任意の引き数が、引き数リストの \fIformat\fP
+の後に続く。 出力の終端には改行文字が付く。
 
-.\"O The program name printed by
-.\"O .BR error ()
-.\"O is the value of the global variable
-.\"O .BR program_invocation_name (3).
-.BR error ()
-¤Ç½ÐÎϤµ¤ì¤ë¥×¥í¥°¥é¥à̾¤Ï¡¢Âç°èÊÑ¿ô
-.BR program_invocation_name (3)
-¤ÎÃͤǤ¢¤ë¡£
-.\"O .I program_invocation_name
-.\"O initially has the same value as
-.\"O .IR main ()'s
-.\"O .IR argv[0] .
-.I program_invocation_name
-¤Î½é´üÃͤÏ
-.IR main ()
-¤Î
-.I argv[0]
-¤ÎÃͤÈÅù¤·¤¤¡£
-.\"O The value of this variable can be modified to change the output of
-.\"O .BR error ().
-¤³¤ÎÊÑ¿ô¤ÎÃͤÏÊѹ¹²Äǽ¤Ç¤¢¤ê¡¢Êѹ¹¤¹¤ë¤È
-.BR error ()
-¤Î½ÐÎϤ¬ÊѤï¤ë¡£
+\fBerror\fP()  で出力されるプログラム名は、大域変数 \fBprogram_invocation_name\fP(3)  の値である。
+\fIprogram_invocation_name\fP の初期値は \fImain\fP()  の \fIargv[0]\fP の値と等しい。
+この変数の値は変更可能であり、変更すると \fBerror\fP()  の出力が変わる。
 
-.\"O If \fIstatus\fP has a nonzero value, then
-.\"O .BR error ()
-.\"O calls
-.\"O .BR exit (3)
-.\"O to terminate the program using the given value as the exit status.
-\fIstatus\fP ¤¬ 0 °Ê³°¤Î¾ì¹ç¡¢
-.BR error ()
-¤Ï
-.BR exit (3)
-¤ò¸Æ¤Ó½Ð¤·¤Æ¡¢»ØÄꤵ¤ì¤¿½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤Ç¥×¥í¥°¥é¥à¤ò½ªÎ»¤µ¤»¤ë¡£
+\fIstatus\fP が 0 以外の場合、 \fBerror\fP()  は \fBexit\fP(3)
+を呼び出して、指定された終了ステータスでプログラムを終了させる。
 
-.\"O The
-.\"O .BR error_at_line ()
-.\"O function is exactly the same as
-.\"O .BR error (),
-.\"O except for the addition of the arguments
-.\"O .I filename
-.\"O and
-.\"O .IR linenum .
-.BR error_at_line ()
-´Ø¿ô¤Ï¡¢°ú¤­¿ô
-.I filename
-¤È
-.I linenum
-¤¬Äɲ䵤ì¤Æ¤¤¤ë°Ê³°¤Ï¡¢
-.BR error ()
-¤ÈƱ¤¸¤Ç¤¢¤ë¡£
-.\"O The output produced is as for
-.\"O .BR error (),
-.\"O except that after the program name are written: a colon, the value of
-.\"O .IR filename ,
-.\"O a colon, and the value of
-.\"O .IR linenum .
-À¸À®¤µ¤ì¤ë½ÐÎϤϡ¢¥×¥í¥°¥é¥à̾¤Î¸å¤Ë
-¥³¥í¥ó¡¦\fIfilename\fR ¤ÎÃÍ¡¦¥³¥í¥ó¡¦\fIlinenum\fR ¤ÎÃͤ¬½ñ¤­½Ð¤µ¤ì¤ë°Ê³°¤Ï¡¢
-.BR error ()
-¤ÈƱ¤¸¤Ç¤¢¤ë¡£
-.\"O The preprocessor values \fB__LINE__\fP and
-.\"O \fB__FILE__\fP may be useful when calling
-.\"O .BR error_at_line (),
-.\"O but other values can also be used.
-.\"O For example, these arguments could refer to a location in an input file.
-¥×¥ê¥×¥í¥»¥Ã¥µ¤ÎÃÍ \fB__LINE__\fP ¤È \fB__FILE__\fP ¤Ï¡¢
-.BR error_at_line ()
-¤ò¸Æ¤Ó½Ð¤¹¤È¤­¤ËÌò¤ËΩ¤Ä¡£
-¤½¤Î¾¤Î¥×¥ê¥×¥í¥»¥Ã¥µ¤ÎÃͤâ»È¤¦¤³¤È¤¬¤Ç¤­¤ë¡£
-Î㤨¤Ð¡¢¤³¤ì¤é¤Î°ú¤­¿ô¤ÇÆþÎÏ¥Õ¥¡¥¤¥ë¤Ë¤ª¤±¤ë°ÌÃÖ¤ò»²¾È¤Ç¤­¤ë¡£
+\fBerror_at_line\fP()  関数は、引き数 \fIfilename\fP と \fIlinenum\fP が追加されている以外は、 \fBerror\fP()
+と同じである。 生成される出力は、プログラム名の後に コロン・\fIfilename\fP の値・コロン・\fIlinenum\fP の値が書き出される以外は、
+\fBerror\fP()  と同じである。 プリプロセッサの値 \fB__LINE__\fP と \fB__FILE__\fP は、
+\fBerror_at_line\fP()  を呼び出すときに役に立つ。 その他のプリプロセッサの値も使うことができる。
+例えば、これらの引き数で入力ファイルにおける位置を参照できる。
 
-.\"O If the global variable \fIerror_one_per_line\fP is set nonzero,
-.\"O a sequence of
-.\"O .BR error_at_line ()
-.\"O calls with the
-.\"O same value of \fIfilename\fP and \fIlinenum\fP will result in only
-.\"O one message (the first) being output.
-Âç°èÊÑ¿ô \fIerror_one_per_line\fP ¤¬ 0 °Ê³°¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
-\fIfilename\fP ¤È \fIlinenum\fP ¤ÎÃͤ¬¶¦¤ËÅù¤·¤¤
-.BR error_at_line ()
-¤Î¸Æ¤Ó½Ð¤·¤Ï¡¢
-1 ¤Ä¤Î (ºÇ½é¤Î) ¥á¥Ã¥»¡¼¥¸¤Î½ÐÎϤˤޤȤá¤é¤ì¤ë¡£
+大域変数 \fIerror_one_per_line\fP が 0 以外に設定されている場合、 \fIfilename\fP と \fIlinenum\fP
+の値が共に等しい \fBerror_at_line\fP()  の呼び出しは、 1 つの (最初の) メッセージの出力にまとめられる。
 
-.\"O The global variable \fIerror_message_count\fP counts the number of
-.\"O messages that have been output by
-.\"O .BR error ()
-.\"O and
-.\"O .BR error_at_line ().
-Âç°èÊÑ¿ô \fIerror_message_count\fP ¤Ï¡¢
-.BR error ()
-¤È
-.BR error_at_line ()
-¤Ç½ÐÎϤµ¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Î¿ô¤òɽ¤¹¡£
+大域変数 \fIerror_message_count\fP は、 \fBerror\fP()  と \fBerror_at_line\fP()
+で出力されたメッセージの数を表す。
 
-.\"O If the global variable \fIerror_print_progname\fP
-.\"O is assigned the address of a function
-.\"O (i.e., is not NULL), then that function is called
-.\"O instead of prefixing the message with the program name and colon.
-.\"O The function should print a suitable string to
-.\"O .IR stderr .
-Âç°èÊÑ¿ô \fIerror_print_progname\fP ¤Ë
-´Ø¿ô¤Î¥¢¥É¥ì¥¹¤¬³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ë¾ì¹ç (¤Ä¤Þ¤ê NULL ¤Ç¤Ï¤Ê¤¤¾ì¹ç)¡¢
-¥á¥Ã¥»¡¼¥¸¤ÎÁ°¤Ë¥×¥í¥°¥é¥à̾¤È¥³¥í¥ó¤ò½ñ¤­½Ð¤¹¤Î¤Ç¤Ï¤Ê¤¯¡¢
-¤³¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤¹¡£
-¤³¤Î´Ø¿ô¤Ïɸ½à¥¨¥é¡¼½ÐÎÏ
-.RI ( stderr )
-¤ËÂФ·¤Æ¤ÎŬÀÚ¤Êʸ»úÎó¤ò½ñ¤­½Ð¤µ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O These functions and variables are GNU extensions, and should not be
-.\"O used in programs intended to be portable.
-¤³¤ì¤é¤Î´Ø¿ô¤ÈÊÑ¿ô¤Ï GNU ¤Ë¤è¤ë³ÈÄ¥¤Ç¤¢¤ê¡¢
-°Ü¿¢À­¤ò¹Í¤¨¤¿¥×¥í¥°¥é¥à¤Ç¤Ï»ÈÍѤ¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
-.\"O .SH SEE ALSO
-.SH ´ØÏ¢¹àÌÜ
-.BR err (3),
-.BR errno (3),
-.BR exit (3),
-.BR perror (3),
-.BR program_invocation_name (3),
-.BR strerror (3)
+大域変数 \fIerror_print_progname\fP に 関数のアドレスが割り当てられている場合 (つまり NULL ではない場合)、
+メッセージの前にプログラム名とコロンを書き出すのではなく、 この関数を呼び出す。 この関数は標準エラー出力 (\fIstderr\fP)
+に対しての適切な文字列を書き出さなければならない。
+.SH 準拠
+これらの関数と変数は GNU による拡張であり、 移植性を考えたプログラムでは使用すべきではない。
+.SH 関連項目
+\fBerr\fP(3), \fBerrno\fP(3), \fBexit\fP(3), \fBperror\fP(3),
+\fBprogram_invocation_name\fP(3), \fBstrerror\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。