OSDN Git Service

Release pages for LDP v3.77
[linuxjm/LDP_man-pages.git] / release / man3 / duplocale.3
index bb8ecd6..04e6d4d 100644 (file)
@@ -70,31 +70,25 @@ _GNU_SOURCE
 .SH 準拠
 POSIX.1\-2008.
 .SH 注意
-Duplicating a locale can serve the following purposes:
+ロケールの複製は以下のことを行う際に役立つ。
 .IP * 3
-To create a copy of a locale object in which one of more categories are to
-be modified (using \fBnewlocale\fP(3)).
+ロケールオブジェクトのコピーを作成し、  (\fBnewlocale\fP(3) を使って) いくつかのカテゴリだけを変更する。
 .IP *
-To obtain a handle for the current locale which can used in other functions
-that employ a locale handle, such as \fBtoupper_l\fP(3).  This is done by
-applying \fBduplocale\fP()  to the value returned by the following call:
+現在のロケールに対するハンドルを取得する。 このハンドルはロケールハンドルを受け取る他の関数 (\fBtoupper_l\fP(3) など) で使用できる。
+これを行うには、 以下の呼び出しが返した値を \fBduplocale\fP() に渡せばよい。
 
     loc = uselocale((locale_t) 0);
 
 .IP
-This technique is necessary, because the above \fBuselocale\fP(3)  call may
-return the value \fBLC_GLOBAL_LOCALE\fP, which results in undefined behavior if
-passed to functions such as \fBtoupper_l\fP(3).  Calling \fBduplocale\fP()  can be
-used to ensure that the \fBLC_GLOBAL_LOCALE\fP value is converted into a usable
-locale object.  See EXAMPLE, below.
+上記の \fBuselocale\fP(3) の呼び出しは値 \fBLC_GLOBAL_LOCALE\fP を返すことがあり、 この値を
+\fBtoupper_l\fP(3) などの関数に渡した場合の動作は不定なので、 この方法は必要である。 \fBduplocale\fP()
+を呼び出すことで、確実に \fBLC_GLOBAL_LOCALE\fP が使用可能なロケールオブジェクトに変換することができる。 下記の「例」を参照。
 .PP
 \fBduplocale\fP() で作成された各ロケールオブジェクトは \fBfreelocale\fP(3) を使って解放すべきである。
 .SH 例
-The program below uses \fBuselocale\fP(3)  and \fBduplocale\fP()  to obtain a
-handle for the current locale which is then passed to \fBtoupper_l\fP(3).  The
-program takes one command\-line argument, a string of characters that is
-converted to uppercase and displayed on standard output.  An example of its
-use is the following:
+以下のプログラムでは、 \fBtoupper_l\fP(3) に渡す現在のロケールのハンドルを取得するのに \fBuselocale\fP(3) と
+\fBduplocale\fP() を使用する。
+このプログラムはコマンドライン引き数として文字列を一つ取る。この文字列は、大文字に変換され、標準出力に表示される。 以下は使用例である。
 .in +4n
 .nf
 
@@ -150,6 +144,6 @@ main(int argc, char *argv[])
 \fBfreelocale\fP(3), \fBnewlocale\fP(3), \fBsetlocale\fP(3), \fBuselocale\fP(3),
 \fBlocale\fP(5), \fBlocale\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.77 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。