OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man3 / strftime.3
index a8e7b1f..aa61ce3 100644 (file)
@@ -213,14 +213,10 @@ UNIX Specification) では \fB%Ec\fP, \fB%EC\fP, \fB%Ex\fP, \fB%EX\fP, \fB%Ey\fP
 .PP
 要素別の時刻構造体 \fItm\fP の詳細は \fI<time.h>\fP に定義されている。 \fBctime\fP(3)  も参照すること。
 .SH 返り値
-Provided that the result string, including the terminating null byte, does
-not exceed \fImax\fP bytes, \fBstrftime\fP()  returns the number of bytes
-(excluding the terminating null byte)  placed in the array \fIs\fP.  If the
-length of the result string (including the terminating null byte)  would
-exceed \fImax\fP bytes, then \fBstrftime\fP()  returns 0, and the contents of the
-array are undefined.  (This behavior applies since at least libc 4.4.4; very
-old versions of libc, such as libc 4.4.1, would return \fImax\fP if the array
-was too small.)
+終端の NULL バイトを含めた結果の文字列の長さが \fImax\fP バイトを超えなかった場合、 \fBstrftime\fP() 関数は配列 \fIs\fP
+に格納されたバイト数を返す (このバイト数に終端の NULL バイトは含まれない)。 終端の NULL バイトを含めた結果の文字列の長さが \fImax\fP
+バイトを超える場合には、 \fBstrftime\fP() は 0 を返し、配列の内容は不定となる。 (少なくとも libc 4.4.4
+以降ではこの動作となる。 libc 4.4.1 などの非常に古いバージョンの libc では配列が短かすぎた場合には \fImax\fP が返される。)
 .LP
 返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。 例えば、多くのロケールでは \fB%p\fP は空文字列を返す。 同様に、空の
 \fIformat\fP 文字列は空文字列を返す。
@@ -270,10 +266,9 @@ glibc では変換指定にいくつか拡張を行っている (これらの拡
 オプションの10進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
 小さい場合、結果文字列の左側は指定された幅までパディングされる。
 .SH バグ
-If the output string would exceed \fImax\fP bytes, \fIerrno\fP is \fInot\fP set.
-This makes it impossible to distinguish this error case from cases where the
-\fIformat\fP string legitimately produces a zero\-length output string.
-POSIX.1\-2001 does \fInot\fP specify any \fIerrno\fP settings for \fBstrftime\fP().
+出力文字列が \fImax\fP バイトを超えてしまう場合、 \fIerrno\fP は設定「されない」。 このため、このエラーを、 \fIformat\fP
+文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合を区別することができない。 POSIX.1\-2001 では \fBstrftime\fP()
+で \fIerrno\fP に設定する値について一切規定して「いない」。
 
 \fBgcc\fP(1)  のいくつかのバージョンにはおかしなところがあり、 \fB%c\fP の使用法について以下のような警告を出す: \fIwarning:
 `%c' yields only last 2 digits of year in some locales\fP
@@ -354,6 +349,6 @@ main(int argc, char *argv[])
 \fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBsetlocale\fP(3), \fBsprintf\fP(3),
 \fBstrptime\fP(3)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。