OSDN Git Service

LDP: Update draft based on the previous commit (locale)
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / duplocale.3
index 102b063..70d6a24 100644 (file)
@@ -78,14 +78,12 @@ POSIX.1\-2008.
 .IP
     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 EXAMPLES, 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 EXAMPLES
+.SH 
 以下のプログラムでは、 \fBtoupper_l\fP(3) に渡す現在のロケールのハンドルを取得するのに \fBuselocale\fP(3) と
 \fBduplocale\fP() を使用する。
 このプログラムはコマンドライン引き数として文字列を一つ取る。この文字列は、大文字に変換され、標準出力に表示される。 以下は使用例である。