OSDN Git Service

(split) LDP: Update draft pages
[linuxjm/LDP_man-pages.git] / draft / man3 / wcsnrtombs.3
index ab81783..9de16ff 100644 (file)
@@ -55,21 +55,17 @@ _GNU_SOURCE
 \fIdest\fP を書き込んだバイト数だけ増やし、\fI*src\fP を 1 増やす。 そして、wcrtomb が成功を返す限りこれを繰り返す。
 変換が止まる理由は 3 つ考えられる:
 .IP 1. 3
-A wide character has been encountered that can not be represented as a
-multibyte sequence (according to the current locale).  In this case \fI*src\fP
-is left pointing to the invalid wide character, \fI(size_t)\ \-1\fP is returned,
-and \fIerrno\fP is set to \fBEILSEQ\fP.
+(現在のロケールに基づいて)マルチバイト列で表現できないワイド文字に 出会った場合。この場合は、\fI*src\fP は不正なワイド文字を指した状態になり、
+\fI(size_t)\ \-1\fP が返され、\fIerrno\fP に \fBEILSEQ\fP が設定される。
 .IP 2.
-\fInwc\fP wide characters have been converted without encountering a null wide
-character (L\(aq\e0\(aq), or the length limit forces a stop.  In this case
-\fI*src\fP is left pointing to the next wide character to be converted, and the
-number of bytes written to \fIdest\fP is returned.
+NULL ワイド文字 (L\(aq\e0\(aq) に出会わないで \fInwc\fP 個のワイド文字を
+変換した場合か、長さの制限によって変換が止められた場合。 この場合には、\fI*src\fP は次に変換されるべきワイド文字を指した状態になり、
+\fIdest\fP に書き込まれたバイト数が返される。
 .IP 3.
-The wide\-character string has been completely converted, including the
-terminating null wide character (which has the side effect of bringing back
-\fI*ps\fP to the initial state).  In this case \fI*src\fP is set to NULL, and the
-number of bytes written to \fIdest\fP, excluding the terminating null byte
-(\(aq\e0\(aq), is returned.
+ワイド文字列が終端の L\(aq\e0\(aq (これには \fI*ps\fP を初期状態に戻すという副作用がある)
+も含めて全て変換された場合。この場合には \fI*src\fP に NULL が設定され、
+\fIdest\fP に書き込まれたバイト数が返される
+(終端の NULL バイト (\(aq\e0\(aq) は数えない)。
 .PP
 \fIdest\fP が NULL ならば \fIlen\fP は無視されて前述のように変換が行わ
 れるが、変換されたバイトデータはメモリに書き出されない点と、出力先の長 さの制限がない点が異なる。