OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man3 / rpmatch.3
index 2296e7e..212a3a8 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 2006 Justin Pryzby <pryzbyj@justinpryzby.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
 .\"
 .\" 2006-05-19, mtk, various edits and example program
 .\"
-.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
-.\" Translated 2006-07-31, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"*******************************************************************
 .\"
-.TH RPMATCH 3 2007-07-26 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH RPMATCH 3 2007\-07\-26 GNU "Linux Programmer's Manual"
 .SH 名前
-.\"O rpmatch \- determine if the answer to a question is affirmative or negative
 rpmatch \- 質問への応答が肯定か否定かを判定する
-.\"O .SH SYNOPSIS
 .SH 書式
 .nf
-.B #include <stdlib.h>
+\fB#include <stdlib.h>\fP
 
-.BI "int rpmatch(const char *" response );
+\fBint rpmatch(const char *\fP\fIresponse\fP\fB);\fP
 .fi
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR rpmatch ():
-_SVID_SOURCE
-.\"O .SH DESCRIPTION
+\fBrpmatch\fP(): _SVID_SOURCE
 .SH 説明
-.\"O .BR rpmatch ()
-.\"O handles a user response to yes or no questions, with
-.\"O support for internationalization.
-.BR  rpmatch ()
-は yes/no の質問に対するユーザからの応答を処理する。
-国際化 (I18N) に対応している。
+\fBrpmatch\fP()  は yes/no の質問に対するユーザからの応答を処理する。 国際化 (I18N) に対応している。
 
-.\"O \fIresponse\fP should be a null-terminated string containing a
-.\"O user-supplied response, perhaps obtained with
-.\"O .BR fgets (3)
-.\"O or
-.\"O .BR getline (3).
-.I response
-にはユーザからの応答を格納した NULL 終端文字列が入っている必要がある。
-たいていは、
-.BR fgets (3)
-や
-.BR getline (3)
-で取り込んだものであろう。
+\fIresponse\fP にはユーザからの応答を格納した NULL 終端文字列が入っている必要がある。 たいていは、 \fBfgets\fP(3)  や
+\fBgetline\fP(3)  で取り込んだものであろう。
 
-.\"O The user's language preference is taken into account per the
-.\"O environment variables \fBLANG\fP, \fBLC_MESSAGES\fP, and \fBLC_ALL\fP,
-.\"O if the program has called
-.\"O .BR setlocale (3)
-.\"O to effect their changes.
-プログラムが
-.BR setlocale (3)
-を呼び出して環境変数の変更を有効にした場合、
-環境変数 \fBLANG\fP, \fBLC_MESSAGES\fP, \fBLC_ALL\fP が
-ユーザの言語設定として考慮される。
+プログラムが \fBsetlocale\fP(3)  を呼び出して環境変数の変更を有効にした場合、 環境変数 \fBLANG\fP, \fBLC_MESSAGES\fP,
+\fBLC_ALL\fP が ユーザの言語設定として考慮される。
 
-.\"O Regardless of the locale, responses matching \fB^[Yy]\fP are always
-.\"O accepted as affirmative, and those matching \fB^[Nn]\fP are always
-.\"O accepted as negative.
-ロケールに関わらず、\fB^[Yy]\fP にマッチする応答は常に肯定だと解釈され、
-\fB^[Nn]\fP にマッチする応答は常に否定だと解釈される。
-.\"O .SH "RETURN VALUE"
+ロケールに関わらず、\fB^[Yy]\fP にマッチする応答は常に肯定だと解釈され、 \fB^[Nn]\fP にマッチする応答は常に否定だと解釈される。
 .SH 返り値
-.\"O After examining
-.\"O .IR response ,
-.\"O .BR rpmatch ()
-.\"O returns 0 for a recognized negative response ("no"), 1
-.\"O for a recognized positive response ("yes"), and \-1 when the value
-.\"O of \fIresponse\fP is unrecognized.
-.I response
-を検査した後、
-.BR rpmatch ()
-は否定的な応答 ("no") と認識した場合は 0 を返し、
-肯定的な応答 ("yes") と認識した場合は 1 を返す。
-.I response
-の値を解釈できなかった場合は \-1 を返す。
-.\"O .SH ERRORS
+\fIresponse\fP を検査した後、 \fBrpmatch\fP()  は否定的な応答 ("no") と認識した場合は 0 を返し、 肯定的な応答
+("yes") と認識した場合は 1 を返す。 \fIresponse\fP の値を解釈できなかった場合は \-1 を返す。
 .SH エラー
-.\"O A return value of \-1 may indicate either an invalid input, or some
-.\"O other error.
-.\"O It is incorrect to only test if the return value is nonzero.
-返り値 \-1 が返った場合、入力が不正であったか、他の何らかのエラーが
-あったことを意味する。返り値が 0 以外かどうかを確認するだけでは
+返り値 \-1 が返った場合、入力が不正であったか、他の何らかのエラーが あったことを意味する。返り値が 0 以外かどうかを確認するだけでは
 十分ではない。
 
-.\"O .BR rpmatch ()
-.\"O can fail for any of the reasons that
-.\"O .BR regcomp (3)
-.\"O or
-.\"O .BR regexec (3)
-.\"O can fail; the cause of the error
-.\"O is not available from \fIerrno\fP or anywhere else, but indicates a
-.\"O failure of the regex engine (but this case is indistinguishable from
-.\"O that of an unrecognized value of \fIresponse\fP).
-.BR rpmatch ()
-は、
-.BR regcomp (3)
-や
-.BR regexec (3)
-が失敗する理由のどれかで失敗することがある。
-エラーの原因を
-.I errno
-や他の何かで知ることはできないが、
-.I errno
-は正規表現エンジンの失敗の原因を示している
-(但し、このケースと
-.I response
-の値を認識できずに失敗した場合を区別することはできない)。
-.\"O .SH "CONFORMING TO"
+\fBrpmatch\fP()  は、 \fBregcomp\fP(3)  や \fBregexec\fP(3)  が失敗する理由のどれかで失敗することがある。
+エラーの原因を \fIerrno\fP や他の何かで知ることはできないが、 \fIerrno\fP は正規表現エンジンの失敗の原因を示している (但し、このケースと
+\fIresponse\fP の値を認識できずに失敗した場合を区別することはできない)。
 .SH 準拠
-.\"O .BR rpmatch ()
-.\"O is not required by any standard, but
-.\"O is available on a few other systems.
-.BR rpmatch ()
-はどの標準でも必須となっていないが、
-Linux 以外にも利用できるシステムもいくつかは存在する。
-.\"O .\" It is available on at least AIX 5.1 and FreeBSD 6.0.
-.\" 少なくとも AIX 5.1 と FreeBSD 6.0 では利用できる。
-.\"O .SH BUGS
+.\" It is available on at least AIX 5.1 and FreeBSD 6.0.
+\fBrpmatch\fP()  はどの標準でも必須となっていないが、 Linux 以外にも利用できるシステムもいくつかは存在する。
 .SH バグ
-.\"O The
-.\"O .BR rpmatch ()
-.\"O implementation looks at only the first character
-.\"O of \fIresponse\fP.
-.\"O As a consequence, "nyes" returns 0, and
-.\"O "ynever; not in a million years" returns 1.
-.\"O It would be preferable to accept input strings much more
-.\"O strictly, for example (using the extended regular
-.\"O expression notation described in
-.\"O .BR regex (7)):
-.\"O \fB^([yY]|yes|YES)$\fP and \fB^([nN]|no|NO)$\fP.
-.BR rpmatch ()
-の実装は
-.I response
-の最初の 1 文字だけを見ているようである。その結果、
-"nyes" は 0 を返し、
-"ynever; not in a million years" は 1 を返すことになる。
-入力文字列をもっと厳密に解釈した方がよいだろう。
-例えば、
-.RB ( regex (7)
-で説明されている拡張正規表現を使って)
-.BR ^([yY]|yes|YES)$ " や " ^([nN]|no|NO)$
+\fBrpmatch\fP()  の実装は \fIresponse\fP の最初の 1 文字だけを見ているようである。その結果、 "nyes" は 0 を返し、
+"ynever; not in a million years" は 1 を返すことになる。 入力文字列をもっと厳密に解釈した方がよいだろう。 例えば、
+(\fBregex\fP(7)  で説明されている拡張正規表現を使って)  \fB^([yY]|yes|YES)$\fP や \fB^([nN]|no|NO)$\fP
 で解釈するなど。
-.\"O .SH EXAMPLE
 .SH 例
-.\"O The following program displays the results when
-.\"O .BR rpmatch ()
-.\"O is applied to the string given in the program's command-line argument.
-以下のプログラムは、コマンドライン引き数で
-指定された文字列を
-.BR rpmatch ()
-に渡した場合の結果を表示する。
+以下のプログラムは、コマンドライン引き数で 指定された文字列を \fBrpmatch\fP()  に渡した場合の結果を表示する。
 .nf
 
 #define _SVID_SOURCE
@@ -191,19 +88,19 @@ int
 main(int argc, char *argv[])
 {
     if (argc != 2 || strcmp(argv[1], "\-\-help") == 0) {
-        fprintf(stderr, "%s response\\n", argv[0]);
+        fprintf(stderr, "%s response\en", argv[0]);
         exit(EXIT_FAILURE);
     }
 
     setlocale(LC_ALL, "");
-    printf("rpmatch() returns: %d\\n", rpmatch(argv[1]));
+    printf("rpmatch() returns: %d\en", rpmatch(argv[1]));
     exit(EXIT_SUCCESS);
 }
 .fi
-.\"O .SH SEE ALSO
 .SH 関連項目
-.BR fgets (3),
-.BR getline (3),
-.BR nl_langinfo (3),
-.BR regcomp (3),
-.BR setlocale (3)
+\fBfgets\fP(3), \fBgetline\fP(3), \fBnl_langinfo\fP(3), \fBregcomp\fP(3),
+\fBsetlocale\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。