OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / strfmon.3
index 751f82d..b9107a5 100644 (file)
 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
 .\" USA.
 .\"
-.\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
-.\" Translated Thu Fri 08 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"*******************************************************************
 .\"
-.\"WORD:       numeric fill character  ¿ôÃÍËä¤áʸ»ú
-.\"WORD:       grouping character      ¥°¥ë¡¼¥×²½Ê¸»ú
-.\"WORD:       left precision          º¸ÀºÅÙ
-.\"WORD:       right precision         º¸ÀºÅÙ
-.\"WORD:       radix (character)       ´ð¿ôÅÀ(ʸ»ú)
-.\"WORD:       conversion character    ÊÑ´¹Ê¸»ú
-.\"WORD:       international currency format   ¹ñºÝÄ̲ߥե©¡¼¥Þ¥Ã¥È
-.\"WORD:       national currency format        ¹ñÆâÄ̲ߥե©¡¼¥Þ¥Ã¥È
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH STRFMON 3 2000-12-05 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O strfmon \- convert monetary value to a string
-.SH Ì¾Á°
-strfmon \- ¶â³Û¤ÎÃͤòʸ»úÎó¤ËÊÑ´¹¤¹¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.B #include <monetary.h>
+.\"*******************************************************************
+.TH STRFMON 3 2000\-12\-05 Linux "Linux Programmer's Manual"
+.SH 名前
+strfmon \- 金額の値を文字列に変換する
+.SH 書式
+\fB#include <monetary.h>\fP
 .sp
-.BI "ssize_t strfmon(char *" s ", size_t " max ", const char *" format ,
-.B "...);"
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The
-.\"O .BR strfmon ()
-.\"O function formats the specified amounts
-.\"O according to the format specification \fIformat\fP and places the
-.\"O result in the character array \fIs\fP of size \fImax\fP.
-.BR strfmon ()
-´Ø¿ô¤Ï¡¢»ØÄꤵ¤ì¤¿¿ôÎ̤ò
-.I format
-¤Ç»ØÄꤵ¤ì¤¿¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë¤·¤¿¤¬¤Ã¤ÆÀ°·Á¤·¡¢
-·ë²Ì¤ò¥µ¥¤¥º
-.I max
-¤Îʸ»úÇÛÎó
-.I s
-¤Ë½ñ¤­¤³¤à¡£
+\fBssize_t strfmon(char *\fP\fIs\fP\fB, size_t \fP\fImax\fP\fB, const char
+*\fP\fIformat\fP\fB,\fP \fB...);\fP
+.SH 説明
+\fBstrfmon\fP()  関数は、指定された数量を \fIformat\fP で指定されたフォーマットにしたがって整形し、 結果をサイズ \fImax\fP
+の文字配列 \fIs\fP に書きこむ。
 .PP
-.\"O Ordinary characters in \fIformat\fP are copied to \fIs\fP
-.\"O without conversion.
-.\"O Conversion specifiers are introduced by a \(aq%\(aq
-.\"O character.
-.\"O Immediately following it there can be zero or more
-.\"O of the following flags:
-.I format
-Ãæ¤ÎÄ̾ï¤Îʸ»ú¤Ï¡¢ÊÑ´¹¤µ¤ì¤º¤Ë¤½¤Î¤Þ¤Þ
-.I s
-¤Ë¥³¥Ô¡¼¤µ¤ì¤ë¡£ÊÑ´¹»ØÄê¤Ï \(aq%\(aq Ê¸»ú¤Ç»Ï¤Þ¤ë¡£
-¤³¤Îľ¸å¤Ë¤Ï¡¢°Ê²¼¤Î¥Õ¥é¥°¤ò 0 ¸Ä°Ê¾å³¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-.TP
-.BI = f
-.\"O The single-byte character
-.\"O .I f
-.\"O is used as the numeric fill character (to be used with
-.\"O a left precision, see below).
-.\"O When not specified, the space character is used.
-1 ¥Ð¥¤¥Èʸ»ú
-.I f
-¤ò¿ôÃÍËä¤áʸ»ú (numeric fill character) ¤Ë¤¹¤ë
-(º¸ÀºÅ٤ȶ¦¤ËÍѤ¤¤ë¡£°Ê²¼¤ò»²¾È)¡£
-»ØÄꤵ¤ì¤Ê¤¤¤È¡¢¥¹¥Ú¡¼¥¹Ê¸»ú¤¬ÍѤ¤¤é¤ì¤ë¡£
-.TP
-.B ^
-.\"O Do not use any grouping characters that might be defined
-.\"O for the current locale.
-.\"O By default, grouping is enabled.
-¸½ºß¤Î¥í¥±¡¼¥ë¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤Ç¤¢¤í¤¦¥°¥ë¡¼¥×²½Ê¸»ú (grouping character)
-¤ò°ìÀڻȤï¤Ê¤¤¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥°¥ë¡¼¥×²½¤ÏÍ­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
-.TP
-.\"O .BR ( " or " +
-.BR ( " ¤Þ¤¿¤Ï " +
-.\"O The ( flag indicates that negative amounts should be enclosed between
-.\"O parentheses.
-.\"O The + flag indicates that signs should be handled
-.\"O in the default way, that is, amounts are preceded by the locale's
-.\"O sign indication, for example, nothing for positive, "\-" for negative.
-( ¥Õ¥é¥°¤Ï¡¢Éé¤Î¿ôÃͤò³ç¸Ì¤Ç³ç¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
-+ ¥Õ¥é¥°¤ÏÉä¹æ¤ò¥Ç¥Õ¥©¥ë¥È¤Î¤è¤¦¤Ë¼è¤ê°·¤¦¤³¤È¤ò°ÕÌ£¤¹¤ë
-(¤¹¤Ê¤ï¤Á¿ôÃͤÎÁ°¤Ë¥í¥±¡¼¥ë¤ÎÉä¹æ¥Þ¡¼¥¯¤¬ÃÖ¤«¤ì¤ë¡£
-Î㤨¤ÐÀµ¤Ê¤é¤Ê¤Ë¤â¤Ê¤¯¡¢Éé¤Ê¤é \(aq\-\(aq ¤òÃÖ¤¯¡¢¤Ê¤É)¡£
-.TP
-.B !
-.\"O Omit the currency symbol.
-Ä̲ߥ·¥ó¥Ü¥ë¤ò¾Êά¤¹¤ë¡£
-.TP
-.B \-
-.\"O Left justify all fields.
-.\"O The default is right justification.
-¤¹¤Ù¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤òº¸µÍ¤á¤Ë¤¹¤ë¡£¥Ç¥Õ¥©¥ë¥È¤Ï±¦µÍ¤á¡£
+\fIformat\fP 中の通常の文字は、変換されずにそのまま \fIs\fP にコピーされる。変換指定は \(aq%\(aq 文字で始まる。
+この直後には、以下のフラグを 0 個以上続けることができる。
+.TP 
+\fB=\fP\fIf\fP
+1 バイト文字 \fIf\fP を数値埋め文字 (numeric fill character) にする (左精度と共に用いる。以下を参照)。
+指定されないと、スペース文字が用いられる。
+.TP 
+\fB^\fP
+現在のロケールで定義されているであろうグループ化文字 (grouping character)
+を一切使わない。デフォルトではグループ化は有効になっている。
+.TP 
+\fB(\fP または \fB+\fP
+( フラグは、負の数値を括弧で括ることを意味する。 + フラグは符号をデフォルトのように取り扱うことを意味する
+(すなわち数値の前にロケールの符号マークが置かれる。 例えば正ならなにもなく、負なら \(aq\-\(aq を置く、など)。
+.TP 
+\fB!\fP
+通貨シンボルを省略する。
+.TP 
+\fB\-\fP
+すべてのフィールドを左詰めにする。デフォルトは右詰め。
 .LP
-.\"O Next, there may be a field width: a decimal digit string specifying
-.\"O a minimum field width in bytes.
-.\"O The default is 0.
-.\"O A result smaller than this width is padded with spaces
-.\"O (on the left, unless the left-justify flag was given).
-¼¡¤Î°ÌÃ֤ˤϡ¢¥Õ¥£¡¼¥ë¥É¤ÎÉý¤ò»ØÄê¤Ç¤­¤ë¡£
-10 ¿Ê¤Î¿ôÃÍʸ»úÎó¤Ç¡¢¥Õ¥£¡¼¥ë¥É¤ÎºÇ¾®Éý¤ò¥Ð¥¤¥Èñ°Ì¤Ç»ØÄꤹ¤ë¡£
-¥Ç¥Õ¥©¥ë¥È¤Ï 0¡£
-·ë²Ì¤¬¤³¤ÎÉý¤è¤ê¤â¶¹¤¯¤Ê¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢
-ÉÔ­ʬ¤¬¥¹¥Ú¡¼¥¹¤ÇËä¤á¤é¤ì¤ë
-(º¸µÍ¤á¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ðº¸Â¦¤¬Ëä¤á¤é¤ì¤ë)¡£
+次の位置には、フィールドの幅を指定できる。 10 進の数値文字列で、フィールドの最小幅をバイト単位で指定する。 デフォルトは 0。
+結果がこの幅よりも狭くなった場合には、 不足分がスペースで埋められる (左詰めフラグが指定されていなければ左側が埋められる)。
 .LP
-.\"O Next, there may be a left precision of the form "#" followed by
-.\"O a decimal digit string.
-.\"O If the number of digits left of the
-.\"O radix character is smaller than this, the representation is
-.\"O padded on the left with the numeric fill character.
-.\"O Grouping characters are not counted in this field width.
-¼¡¤Î°ÌÃ֤ˤϡ¢"#" ¤Ë 10 ¿Ê¿ôÃÍʸ»úÎó¤ò³¤±¤¿·Á¼°¤Ç¡¢
-º¸ÀºÅÙ (left precision) ¤ò»ØÄê¤Ç¤­¤ë¡£
-Ä̲ߤδð¿ôÅÀ (radix) ¤è¤êº¸Â¦¤Î¿ôÃͤηå¿ô¤¬¤³¤Î»ØÄê¤è¤ê¾®¤µ¤¤¾ì¹ç¤Ï¡¢
-¿ôÃÍËä¤áʸ»ú¤Çº¸Â¦¤¬Ëä¤á¤é¤ì¤ë¡£
-¤³¤Î¥Õ¥£¡¼¥ë¥ÉÉý¤Î»ØÄê¤Ç¤Ï¡¢¥°¥ë¡¼¥×²½Ê¸»ú¤Ï¥«¥¦¥ó¥È¤µ¤ì¤Ê¤¤¡£
+次の位置には、"#" に 10 進数値文字列を続けた形式で、 左精度 (left precision) を指定できる。 通貨の基数点 (radix)
+より左側の数値の桁数がこの指定より小さい場合は、 数値埋め文字で左側が埋められる。 このフィールド幅の指定では、グループ化文字はカウントされない。
 .LP
-.\"O Next, there may be a right precision of the form "." followed by
-.\"O a decimal digit string.
-.\"O The amount being formatted is rounded to
-.\"O the specified number of digits prior to formatting.
-.\"O The default is specified in the
-.\"O .I frac_digits
-.\"O and
-.\"O .I int_frac_digits
-.\"O items of the current locale.
-.\"O If the right precision is 0, no radix character is printed.
-.\"O (The radix character here is determined by
-.\"O .BR LC_MONETARY ,
-.\"O and may differ from that specified by
-.\"O .BR LC_NUMERIC .)
-¼¡¤Î°ÌÃ֤ˤϡ¢"." ¤Ë 10 ¿Ê¿ôÃÍʸ»úÎó¤ò³¤±¤¿·Á¼°¤Ç¡¢
-±¦ÀºÅÙ (right precision) ¤ò»ØÄê¤Ç¤­¤ë¡£
-À°·Á¤µ¤ì¤ë¿ôÃͤϡ¢À°·ÁÁ°¤Ë¤³¤Î·å¿ô¤Ë´Ý¤á¤é¤ì¤ë¡£
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥«¥ì¥ó¥È¥í¥±¡¼¥ë¤Î
-.I frac_digits
-¤È
-.I int_frac_digits
-¤Î»ØÄê¤òÍѤ¤¤ë¡£
-±¦ÀºÅÙ¤¬ 0 ¤Î¾ì¹ç¤Ï¡¢´ð¿ôÅÀʸ»ú (radix character) ¤Ï°õ»ú¤µ¤ì¤Ê¤¤
-(¤³¤³¤Ç¤Î´ð¿ôÅÀʸ»ú¤Ï
-.B LC_MONETARY
-¤ÇÄêµÁ¤µ¤ì¤Æ¤ª¤ê¡¢
-.B LC_NUMERIC
-¤Î»ØÄê¤È¤Ï°Û¤Ê¤Ã¤Æ¤¤¤Æ¤â¤è¤¤)¡£
+次の位置には、"." に 10 進数値文字列を続けた形式で、 右精度 (right precision) を指定できる。
+整形される数値は、整形前にこの桁数に丸められる。 デフォルトではカレントロケールの \fIfrac_digits\fP と
+\fIint_frac_digits\fP の指定を用いる。 右精度が 0 の場合は、基数点文字 (radix character) は印字されない
+(ここでの基数点文字は \fBLC_MONETARY\fP で定義されており、 \fBLC_NUMERIC\fP の指定とは異なっていてもよい)。
 .LP
-.\"O Finally, the conversion specification must be ended with a
-.\"O conversion character.
-.\"O The three conversion characters are
-ºÇ¸å¤Ë¡¢ÊÑ´¹»ØÄê¤ÏÊÑ´¹Ê¸»ú (conversion character)
-¤Ç½ªÎ»¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-ÊÑ´¹Ê¸»ú¤Ë¤Ï°Ê²¼¤Î 3 ¤Ä¤¬¤¢¤ë¡£
-.TP
-.B %
-.\"O (In this case the entire specification must be exactly "%%".)
-.\"O Put a \(aq%\(aq character in the result string.
-(¤³¤Î¾ì¹ç¤Ï»ØÄêÁ´ÂΤ¬ "%%" ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£)
-·ë²Ì¤Îʸ»úÎó¤Ë \(aq%\(aq Ê¸»ú¤ò½ñ¤­¤³¤à¡£
-.TP
-.B i
-.\"O One argument of type
-.\"O .I double
-.\"O is converted using the locale's international currency format.
-.I double
-·¿¤Î°ú¤­¿ô¤Ò¤È¤Ä¤¬¡¢
-¥í¥±¡¼¥ë¤Î¹ñºÝÄ̲ߥե©¡¼¥Þ¥Ã¥È (international currency format)
-¤òÍѤ¤¤ÆÊÑ´¹¤µ¤ì¤ë¡£
-.TP
-.B n
-.\"O One argument of type
-.\"O .I double
-.\"O is converted using the locale's national currency format.
-.I double
-·¿¤Î°ú¤­¿ô¤Ò¤È¤Ä¤¬¡¢
-¥í¥±¡¼¥ë¤Î¹ñÆâÄ̲ߥե©¡¼¥Þ¥Ã¥È (national currency format)
-¤òÍѤ¤¤ÆÊÑ´¹¤µ¤ì¤ë¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O The
-.\"O .BR strfmon ()
-.\"O function returns the number of characters placed
-.\"O in the array \fIs\fP, not including the terminating null byte,
-.\"O provided the string, including the terminating null byte, fits.
-.\"O Otherwise, it sets
-.\"O .I errno
-.\"O to
-.\"O .BR E2BIG ,
-.\"O returns \-1, and the contents of the array is undefined.
-.BR strfmon ()
-´Ø¿ô¤Ï¡¢·ë²Ì¤Îʸ»úÎ󤬽ªÃ¼¤Î NULL ¥Ð¥¤¥È¤ò´Þ¤á¤ÆÇÛÎó
-.I s
-¤Ë¼ý¤Þ¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢
-.I s
-¤Ë½ñ¤­¤³¤Þ¤ì¤¿Ê¸»ú¿ô¤òÊÖ¤¹¡£NULL ¥Ð¥¤¥È¤Ïʸ»ú¿ô¤ËÆþ¤é¤Ê¤¤¡£
-¤½¤ì°Ê³°¤Î¾ì¹ç¤Ë¤Ï¡¢
-.I errno
-¤Ë
-.B E2BIG
-¤òÀßÄꤷ¤Æ \-1 ¤òÊÖ¤¹¡£
-¤³¤Î¾ì¹ç¤ÎÇÛÎó¤ÎÆâÍƤÏ̤ÄêµÁ¤Ç¤¢¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O Not in POSIX.1-2001.
-.\"O Present on several other systems.
-POSIX.1-2001 ¤Ë¤Ï¤Ê¤¤¡£
-¾¤Î¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ë¸ºß¤¹¤ë¡£
-.\"O .SH EXAMPLE
-.SH Îã
-.\"O The call
+最後に、変換指定は変換文字 (conversion character)  で終了しなければならない。 変換文字には以下の 3 つがある。
+.TP 
+\fB%\fP
+(この場合は指定全体が "%%" でなければならない。)  結果の文字列に \(aq%\(aq 文字を書きこむ。
+.TP 
+\fBi\fP
+\fIdouble\fP 型の引き数ひとつが、 ロケールの国際通貨フォーマット (international currency format)
+を用いて変換される。
+.TP 
+\fBn\fP
+\fIdouble\fP 型の引き数ひとつが、 ロケールの国内通貨フォーマット (national currency format)  を用いて変換される。
+.SH 返り値
+\fBstrfmon\fP()  関数は、結果の文字列が終端の NULL バイトを含めて配列 \fIs\fP に収まった場合には、 \fIs\fP
+に書きこまれた文字数を返す。NULL バイトは文字数に入らない。 それ以外の場合には、 \fIerrno\fP に \fBE2BIG\fP を設定して \-1
+を返す。 この場合の配列の内容は未定義である。
+.SH 準拠
+POSIX.1\-2001 にはない。 他のいくつかのシステムに存在する。
+.SH 例
+次のような関数コール
 .in +4n
 .nf
 
@@ -236,44 +96,25 @@ strfmon(buf, sizeof(buf), "[%^=*#6n] [%=*#6i]",
 
 .fi
 .in
-¤Î¤è¤¦¤Ê´Ø¿ô¥³¡¼¥ë¤Î½ÐÎϤϡ¢¥ª¥é¥ó¥À¤Î¥í¥±¡¼¥ë¤Ç¤Ï°Ê²¼¤Î¤è¤¦¤Ê½ÐÎϤˤʤ롣
-.\"O outputs
+は、オランダのロケールでは以下のような出力になる。
 .in +4n
 
-[ fl **1234,57] [ NLG  **1 234,57]
+[ fl **1234,57] [ NLG **1 234,57]
 
 .in
-.\"O in the Dutch locale (with fl for "florijnen" and NLG for Netherlands Guilders).
-(fl ¤Ï "florijnen" ¤Î°Õ¡£NLG ¤Ï Netherlands Guilder¡£)
-.\"O The grouping character is very ugly because it takes as much space
-.\"O as a digit, while it should not take more than half that,
-.\"O and will no doubt cause confusion.
-.\"O Surprisingly, the "fl" is preceded and followed by a space,
-.\"O and "NLG" is preceded by one and followed by two spaces.
-.\"O This may be a bug in the locale files.
-.\"O The Italian, Australian, Swiss
-.\"O and Portuguese locales yield
-¥°¥ë¡¼¥×²½Ê¸»ú¤òÍѤ¤¤ë¤ÈÈó¾ï¤Ë½¹¤¯¤Ê¤ë¡£
-Ʊ»þ¤Ë´Ö°ã¤¤¤Ê¤¯º®Íð¤Î¸¶°ø¤Ë¤â¤Ê¤Ã¤Æ¤·¤Þ¤¦¤À¤í¤¦¡£
-¤³¤ì¤Ï¿ôÃͤÎȾʬ°Ê²¼¤ÎÉý¤Ç¤¢¤ë¤Ù¤­¤À¤¬¡¢
-¿ôÃͤÈƱ¤¸¤À¤±¤ÎÉý¤ò¼è¤Ã¤Æ¤·¤Þ¤¦¤«¤é¤Ç¤¢¤ë¡£
-¤Ò¤É¤¤¤³¤È¤Ë¡¢ "fl" ¤ÎÁ°¸å¤Ë¤Ï¥¹¥Ú¡¼¥¹¤¬Æþ¤Ã¤Æ¤·¤Þ¤¤¡¢
-¤Þ¤¿ "NLG" ¤ÎÁ°¤Ë¤Ï 1 ¤Ä¡¢¸å¤Ë¤Ï 2 ¤Ä¤Î¥¹¥Ú¡¼¥¹¤¬ÃÖ¤«¤ì¤Æ¤¤¤ë¡£
-¤³¤ì¤Ï¥í¥±¡¼¥ë¥Õ¥¡¥¤¥ë¤Î¥Ð¥°¤Ç¤¢¤í¤¦¡£
-¥¤¥¿¥ê¥¢¡¦¥ª¡¼¥¹¥È¥é¥ê¥¢¡¦¥¹¥¤¥¹¡¦¥Ý¥ë¥È¥¬¥ë¤Î
-³Æ¥í¥±¡¼¥ë¤Ç¤Î·ë²Ì¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë¡£
+(fl は "florijnen" の意。NLG は Netherlands Guilder。)  グループ化文字を用いると非常に醜くなる。
+同時に間違いなく混乱の原因にもなってしまうだろう。 これは数値の半分以下の幅であるべきだが、 数値と同じだけの幅を取ってしまうからである。
+ひどいことに、 "fl" の前後にはスペースが入ってしまい、 また "NLG" の前には 1 つ、後には 2 つのスペースが置かれている。
+これはロケールファイルのバグであろう。 イタリア・オーストラリア・スイス・ポルトガルの 各ロケールでの結果は以下のようになる。
 .in +4n
 
-[ L. **1235] [ ITL  **1.235]
+[ L. **1235] [ ITL **1.235]
 .br
 [ $**1234.57] [ AUD **1,234.57]
 .br
-[Fr. **1234,57] [CHF  **1.234,57]
+[Fr. **1234,57] [CHF **1.234,57]
 .br
 [ **1234$57Esc] [ **1.234$57PTE ]
 .in
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR setlocale (3),
-.BR sprintf (3),
-.BR locale (7)
+.SH 関連項目
+\fBsetlocale\fP(3), \fBsprintf\fP(3), \fBlocale\fP(7)