OSDN Git Service

(split) LDP: Update drafts based on LDP v3.40.
[linuxjm/LDP_man-pages.git] / draft / man3 / printf.3
index 14f6ea2..e64d655 100644 (file)
 .\" 2000-07-26 jsm28@hermes.cam.ac.uk - three small fixes
 .\" 2000-10-16 jsm28@hermes.cam.ac.uk - more fixes
 .\"
-.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi all rights reserved.
-.\" Translated 1998-02-17, YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
-.\" Updated 2000-10-02, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2001-01-29, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2002-01-03, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2002-10-17, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2005-03-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2006-07-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2008-02-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
-.\" Updated 2009-03-03, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.19
+.\"*******************************************************************
 .\"
-.\" WORD: conversion specifier ÊÑ´¹»ØÄê»Ò
-.\" WORD: length modifier      Ä¹¤µ½¤¾þ»Ò
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH PRINTF 3  2008-12-19 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf,
-.\"O vsnprintf \- formatted output conversion
-printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf,
-vsnprintf \- »ØÄꤵ¤ì¤¿½ñ¼°¤ËÊÑ´¹¤·¤Æ½ÐÎϤò¹Ô¤¦
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.B #include <stdio.h>
+.\"*******************************************************************
+.TH PRINTF 3 2011\-09\-28 GNU "Linux Programmer's Manual"
+.SH 名前
+printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf \-
+指定された書式に変換して出力を行う
+.SH 書式
+\fB#include <stdio.h>\fP
 .sp
-.BI "int printf(const char *" format ", ...);"
+\fBint printf(const char *\fP\fIformat\fP\fB, ...);\fP
 .br
-.BI "int fprintf(FILE *" stream ", const char *" format ", ...);"
+\fBint fprintf(FILE *\fP\fIstream\fP\fB, const char *\fP\fIformat\fP\fB, ...);\fP
 .br
-.BI "int sprintf(char *" str ", const char *" format ", ...);"
+\fBint sprintf(char *\fP\fIstr\fP\fB, const char *\fP\fIformat\fP\fB, ...);\fP
 .br
-.BI "int snprintf(char *" str ", size_t " size ", const char *" format ", ...);"
+\fBint snprintf(char *\fP\fIstr\fP\fB, size_t \fP\fIsize\fP\fB, const char *\fP\fIformat\fP\fB,
+\&...);\fP
 .sp
-.B #include <stdarg.h>
+\fB#include <stdarg.h>\fP
 .sp
-.BI "int vprintf(const char *" format ", va_list " ap );
+\fBint vprintf(const char *\fP\fIformat\fP\fB, va_list \fP\fIap\fP\fB);\fP
 .br
-.BI "int vfprintf(FILE *" stream ", const char *" format ", va_list " ap );
+\fBint vfprintf(FILE *\fP\fIstream\fP\fB, const char *\fP\fIformat\fP\fB, va_list
+\fP\fIap\fP\fB);\fP
 .br
-.BI "int vsprintf(char *" str ", const char *" format ", va_list " ap );
+\fBint vsprintf(char *\fP\fIstr\fP\fB, const char *\fP\fIformat\fP\fB, va_list
+\fP\fIap\fP\fB);\fP
 .br
-.BI "int vsnprintf(char *" str ", size_t " size ", const char *" format \
-", va_list " ap );
+\fBint vsnprintf(char *\fP\fIstr\fP\fB, size_t \fP\fIsize\fP\fB, const char
+*\fP\fIformat\fP\fB, va_list \fP\fIap\fP\fB);\fP
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
 .ad l
-.BR snprintf (),
-.BR vsnprintf ():
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE; or
-.I "cc -std=c99"
-.ad b
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The functions in the
-.\"O .BR printf ()
-.\"O family produce output according to a
-.\"O .I format
-.\"O as described below.
-.BR printf ()
-´Ø¿ô¥°¥ë¡¼¥×¤Ï¡¢°Ê²¼¤Ç½Ò¤Ù¤ë¤è¤¦¤Ë¡¢
-.I format
-¤Ë½¾¤Ã¤Æ½ÐÎϤòÀ¸À®¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
-.\"O The functions
-.\"O .BR printf ()
-.\"O and
-.\"O .BR vprintf ()
-.\"O write output to
-.\"O .IR stdout ,
-.\"O the standard output stream;
-.\"O .BR fprintf ()
-.\"O and
-.\"O .BR vfprintf ()
-.\"O write output to the given output
-.\"O .IR stream ;
-.\"O .BR sprintf (),
-.\"O .BR snprintf (),
-.\"O .BR vsprintf ()
-.\"O and
-.\"O .BR vsnprintf ()
-.\"O write to the character string
-.\"O .IR str .
-.BR printf ()
-¤È
-.BR vprintf ()
-¤Ï½ÐÎϤò
-.I stdout
-(ɸ½à½ÐÎÏ¥¹¥È¥ê¡¼¥à) ¤Ë½ñ¤­½Ð¤¹¡£
-.BR fprintf ()
-¤È
-.BR vfprintf ()
-¤Ï½ÐÎϤò»ØÄꤵ¤ì¤¿½ÐÎÏ
-.I stream
-¤Ë½ñ¤­½Ð¤¹¡£
-.BR sprintf (),
-.BR snprintf (),
-.BR vsprintf (),
-.BR vsnprintf ()
-¤Ï½ÐÎϤòʸ»úÎó
-.IR str
-¤Ë½ñ¤­¹þ¤à¡£
+\fBsnprintf\fP(), \fBvsnprintf\fP():
+.RS 4
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE ||
+_POSIX_C_SOURCE\ >=\ 200112L;
+.br
+or \fIcc \-std=c99\fP
+.RE
+.ad
+.SH 説明
+\fBprintf\fP()  関数グループは、以下で述べるように、 \fIformat\fP に従って出力を生成するものである。 \fBprintf\fP()  と
+\fBvprintf\fP()  は出力を \fIstdout\fP (標準出力ストリーム) に書き出す。 \fBfprintf\fP()  と
+\fBvfprintf\fP()  は出力を指定された出力 \fIstream\fP に書き出す。 \fBsprintf\fP(), \fBsnprintf\fP(),
+\fBvsprintf\fP(), \fBvsnprintf\fP()  は出力を文字列 \fIstr\fP に書き込む。
 .PP
-.\"O The functions
-.\"O .BR snprintf ()
-.\"O and
-.\"O .BR vsnprintf ()
-.\"O write at most
-.\"O .I size
-.\"O bytes (including the trailing null byte (\(aq\e0\(aq)) to
-.\"O .IR str .
-.BR snprintf ()
-¤È
-.BR vsnprintf ()
-¤ÏºÇÂç¤Ç
-.I size
-¥Ð¥¤¥È¤ò
-.I str
-¤Ë½ñ¤­¹þ¤à
-.RI ( size
-¤Ë¤Ïʸ»úÎó¤ò½ªÃ¼¤¹¤ë \(aq\e0\(aq ¤â¤ò´Þ¤Þ¤ì¤ë)¡£
+\fBsnprintf\fP()  と \fBvsnprintf\fP()  は最大で \fIsize\fP バイトを \fIstr\fP に書き込む (\fIsize\fP
+には文字列を終端する NULL バイト (\(aq\e0\(aq) もを含まれる)。
 .PP
-.\"O The functions
-.\"O .BR vprintf (),
-.\"O .BR vfprintf (),
-.\"O .BR vsprintf (),
-.\"O .BR vsnprintf ()
-.\"O are equivalent to the functions
-.\"O .BR printf (),
-.\"O .BR fprintf (),
-.\"O .BR sprintf (),
-.\"O .BR snprintf (),
-.\"O respectively, except that they are called with a
-.\"O .I va_list
-.\"O instead of a variable number of arguments.
-.\"O These functions do not call the
-.\"O .I va_end
-.\"O macro.
-.\"O Because they invoke the
-.\"O .I va_arg
-.\"O macro, the value of
-.\"O .I ap
-.\"O is undefined after the call.
-.\"O See
-.\"O .BR stdarg (3).
-.BR vprintf (),
-.BR vfprintf (),
-.BR vsprintf (),
-.BR vsnprintf ()
-¤Î³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
-.BR printf (),
-.BR fprintf (),
-.BR sprintf (),
-.BR snprintf (),
-¤Î³Æ´Ø¿ô¤ÈÅù²Á¤Ç¤¢¤ê¡¢²ÄÊÑ¿ô°ú¤­¿ô¤ÎÂå¤ï¤ê¤Ë
-.I va_list
-¤ò°ú¤­¿ô¤È¤·¤Æ¸Æ¤Ó½Ð¤µ¤ì¤ëÅÀ¤À¤±¤¬°Û¤Ê¤ë¡£
-¤³¤ì¤é¤Î´Ø¿ô¤Ç¤Ï
-.I va_end
-¥Þ¥¯¥í¤Ï¸Æ¤Ó½Ð¤µ¤ì¤Ê¤¤¡£
-¤³¤ì¤é¤Î´Ø¿ô¤Ï
-.I va_arg
-¤ò¸Æ¤Ó½Ð¤¹¤Î¤Ç¡¢¸Æ¤Ó½Ð¤·¸å¤Î
-.I ap
-¤ÎÃͤÏ̤ÄêµÁ¤Ç¤¢¤ë¡£
-.BR stdarg (3)
-¤ò»²¾È¤Î¤³¤È¡£
+\fBvprintf\fP(), \fBvfprintf\fP(), \fBvsprintf\fP(), \fBvsnprintf\fP()  の各関数はそれぞれ
+\fBprintf\fP(), \fBfprintf\fP(), \fBsprintf\fP(), \fBsnprintf\fP(),
+の各関数と等価であり、可変数引き数の代わりに \fIva_list\fP を引き数として呼び出される点だけが異なる。 これらの関数では \fIva_end\fP
+マクロは呼び出されない。 これらの関数は \fIva_arg\fP を呼び出すので、呼び出し後の \fIap\fP の値は未定義である。 \fBstdarg\fP(3)
+を参照のこと。
 .PP
-.\"O These eight functions write the output under the control of a
-.\"O .I format
-.\"O string that specifies how subsequent arguments (or arguments accessed via
-.\"O the variable-length argument facilities of
-.\"O .BR stdarg (3))
-.\"O are converted for output.
-¤³¤ì¤é¤Î 8 ¤Ä¤Î´Ø¿ô¤Ï
-.I format
-ʸ»úÎó¤ÎÀ©¸æ¤Ë½¾¤Ã¤Æ½ÐÎϤò½ñ¤­½Ð¤¹¡£
-.I format
-ʸ»úÎó¤Ï¡¢¤³¤ì¤Ë³¤¯°ú¤­¿ô (¤Þ¤¿¤Ï
-.BR stdarg (3)
-¤Î²ÄÊÑĹ°ú¤­¿ôµ¡¹½¤ò»È¤Ã¤Æ¥¢¥¯¥»¥¹¤Ç¤­¤ë°ú¤­¿ô)
-¤ò¤É¤Î¤è¤¦¤ËÊÑ´¹¤·¤Æ½ÐÎϤ¹¤ë¤«¤ò»ØÄꤹ¤ë¡£
+これらの 8 つの関数は \fIformat\fP 文字列の制御に従って出力を書き出す。 \fIformat\fP 文字列は、これに続く引き数 (または
+\fBstdarg\fP(3)  の可変長引き数機構を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。
 
-.\"O C99 and POSIX.1-2001 specify that the results are undefined if a call to
-.\"O .BR sprintf (),
-.\"O .BR snprintf (),
-.\"O .BR vsprintf (),
-.\"O or
-.\"O .BR vsnprintf ()
-.\"O would cause copying to take place between objects that overlap
-.\"O (e.g., if the target string array and one of the supplied input arguments
-.\"O refer to the same buffer).
-.\"O See NOTES.
-C99 ¤È POSIX.1-2001 ¤Ç¤Ï¡¢
-.BR sprintf (),
-.BR snprintf (),
-.BR vsprintf (),
-.BR vsnprintf ()
-¤Î¸Æ¤Ó½Ð¤·¤Ç¡¢ÈϰϤ¬½ÅÊ£¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È´Ö¤Ç¥³¥Ô¡¼¤¬È¯À¸¤¹¤ë¾ì¹ç¤Î
-·ë²Ì¤ÏÉÔÄê¤Ç¤¢¤ë¤Èµ¬Äꤵ¤ì¤Æ¤¤¤ë (Î㤨¤Ð¡¢½ÐÎÏÀè¤Îʸ»úÎó¤ÈÆþÎϤµ¤ì¤¿
-°ú¤­¿ô¤Î°ì¤Ä¤¬Æ±¤¸¥Ð¥Ã¥Õ¥¡¤ò»²¾È¤·¤Æ¤¤¤ë¾ì¹ç¤Ê¤É¤Ç¤¢¤ë)¡£
-¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È¡£
-.\"O .SS "Return value"
-.SS ÊÖ¤êÃÍ
-.\"O Upon successful return, these functions return the number of characters
-.\"O printed (not including the
-.\"O trailing \(aq\e0\(aq used to end output to strings).
-À®¸ù»þ¤Ë¤Ï¡¢¾åµ­¤Î´Ø¿ô¤Ï½ñ¤­¹þ¤Þ¤ì¤¿Ê¸»ú¿ô¤òÊÖ¤¹
-(ʸ»úÎó¤ÎºÇ¸å¤ò¼¨¤¹¤¿¤á¤Ë»ÈÍѤ¹¤ë \(aq\e0\(aq ¤Ï¿ô¤Ë´Þ¤Þ¤ì¤Ê¤¤)¡£
+C99 と POSIX.1\-2001 では、 \fBsprintf\fP(), \fBsnprintf\fP(), \fBvsprintf\fP(),
+\fBvsnprintf\fP()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する場合の 結果は不定であると規定されている
+(例えば、出力先の文字列と入力された 引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参照。
+.SS "Return Values"
+成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使用する NULL バイトは数に含まれない)。
 
-.\"O The functions
-.\"O .BR snprintf ()
-.\"O and
-.\"O .BR vsnprintf ()
-.\"O do not write more than
-.\"O .I size
-.\"O bytes (including the trailing \(aq\e0\(aq).
-.\"O If the output was truncated due to this limit then the return value
-.\"O is the number of characters (not including the trailing \(aq\e0\(aq)
-.\"O which would have been written to the final string if enough space
-.\"O had been available.
-.\"O Thus, a return value of
-.\"O .I size
-.\"O or more means that the output was truncated.
-.\"O (See also below under NOTES.)
-.BR snprintf ()
-¤È
-.BR vsnprintf ()
-¤Ï¡¢
-.I size
-¥Ð¥¤¥È¤ò±Û¤¨¤ëʸ»ú¿ô¤ò½ñ¤­¹þ¤Þ¤Ê¤¤
-.RI ( size
-¤Ë¤Ïʸ»úÎó¤ò½ªÃ¼¤¹¤ë \(aq\e0\(aq ¤â¤ò´Þ¤Þ¤ì¤ë)¡£
-¤³¤ÎÀ©¸Â¤Ë¤è¤Ã¤Æ½ÐÎϤ¬ÀÚ¤êµÍ¤á¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢
-¤â¤·½½Ê¬¤Ê¥¹¥Ú¡¼¥¹¤¬¤¢¤ì¤Ð½ñ¤­¹þ¤Þ¤ì¤¿¤Ç¤¢¤í¤¦Ê¸»ú¤Î¸Ä¿ô
-(ʸ»úÎó¤ò½ªÃ¼¤¹¤ë \(aq\e0\(aq ¤ò½ü¤¯) ¤òÊÖ¤¹¡£
-½¾¤Ã¤Æ¡¢ÊÖ¤êÃͤ¬
-.I size
-°Ê¾å¤À¤Ã¤¿¾ì¹ç¡¢½ÐÎϤ¬ÀÚ¤êµÍ¤á¤é¤ì¤¿¤³¤È¤ò°ÕÌ£¤¹¤ë
-(¸å½Ò¤ÎÃí°Õ¤â»²¾È¤Î¤³¤È)¡£
+\fBsnprintf\fP()  と \fBvsnprintf\fP()  は、 \fIsize\fP バイトを越える文字数を書き込まない (\fIsize\fP
+には文字列を終端する NULL バイト (\(aq\e0\(aq) も含まれる)。 この制限によって出力が切り詰められた場合には、
+もし十分なスペースがあれば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返す。 従って、返り値が \fIsize\fP
+以上だった場合、出力が切り詰められたことを意味する (後述の注意も参照のこと)。
 
-.\"O If an output error is encountered, a negative value is returned.
-¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï¡¢Éé¤Î¿ô¤òÊÖ¤¹¡£
-.\"O .SS "Format of the format string"
-.SS ¥Õ¥©¡¼¥Þ¥Ã¥Èʸ»úÎó¤Î¥Õ¥©¡¼¥Þ¥Ã¥È
-.\"O The format string is a character string, beginning and ending
-.\"O in its initial shift state, if any.
-¥Õ¥©¡¼¥Þ¥Ã¥Èʸ»úÎó¤Ïʸ»ú¤ÎÎó¤Ç¡¢
-(¤â¤·¤¢¤ë¤Ê¤é) ½é´ü¥·¥Õ¥È¾õÂ֤ǻϤޤꡢ½é´ü¥·¥Õ¥È¾õÂ֤ǽª¤ï¤ë¡£
-.\"O The format string is composed of zero or more directives: ordinary
-.\"O characters (not
-.\"O .BR % ),
-.\"O which are copied unchanged to the output stream;
-.\"O and conversion specifications, each of which results in fetching zero or
-.\"O more subsequent arguments.
-¥Õ¥©¡¼¥Þ¥Ã¥ÈÍѤÎʸ»úÎó¤Ï 0 ¸Ä°Ê¾å¤ÎÌ¿Îá (directives) ¤Ë¤è¤Ã¤Æ¹½À®¤µ¤ì¤ë¡£
-Ì¿Îá¤Ë¤Ï¡¢Ä̾ïʸ»ú¤ÈÊÑ´¹»ØÄê (conversion specifications) ¤¬¤¢¤ë¡£
-Ä̾ïʸ»ú¤Ï
-.B %
-°Ê³°¤Îʸ»ú¤Ç¡¢½ÐÎÏ¥¹¥È¥ê¡¼¥à¤Ë¤½¤Î¤Þ¤Þ¥³¥Ô¡¼¤µ¤ì¤ë¡£
-ÊÑ´¹»ØÄê¤Ï¡¢¤½¤ì¤¾¤ì¤¬ 0 ¸Ä°Ê¾å¤Î°ú¤­¿ô¤ò¼è¤ë¡£
-.\"O Each conversion specification is introduced by
-.\"O the character
-.\"O .BR % ,
-.\"O and ends with a
-.\"O .IR "conversion specifier" .
-³ÆÊÑ´¹»ØÄê¤Ïʸ»ú
-.B %
-¤Ç»Ï¤Þ¤ê¡¢
-.I "ÊÑ´¹»ØÄê»Ò (conversion specifier)"
-¤Ç½ª¤ï¤ë¡£
-.\"O In between there may be (in this order) zero or more
-.\"O .IR flags ,
-.\"O an optional minimum
-.\"O .IR "field width" ,
-.\"O an optional
-.\"O .I precision
-.\"O and an optional
-.\"O .IR "length modifier" .
-.B %
-¤ÈÊÑ´¹»ØÄê»Ò¤Î´Ö¤Ë¤Ï¡¢0 ¸Ä°Ê¾å¤Î
-.I ¥Õ¥é¥° ¡¢
-ºÇ¾®
-.I ¥Õ¥£¡¼¥ë¥ÉÉý ¡¢
-.I ÀºÅÙ ¡¢
-.I Ä¹¤µ½¤¾þ»Ò
-¤ò (¤³¤Î½ç½ø¤Ç) ÃÖ¤¯¤³¤È¤¬¤Ç¤­¤ë¡£
+エラーが発生した場合は、負の数を返す。
+.SS フォーマット文字列のフォーマット
+フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令
+(directives) によって構成される。 命令には、通常文字と変換指定 (conversion specifications) がある。
+通常文字は \fB%\fP 以外の文字で、出力ストリームにそのままコピーされる。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字
+\fB%\fP で始まり、 \fI変換指定子 (conversion specifier)\fP で終わる。 \fB%\fP と変換指定子の間には、0 個以上の
+\fIフラグ 、\fP 最小 \fIフィールド幅 、\fP \fI精度 、\fP \fI長さ修飾子\fP を (この順序で) 置くことができる。
 
-.\"O The arguments must correspond properly (after type promotion) with the
-.\"O conversion specifier.
-.\"O By default, the arguments are used in the order
-.\"O given, where each \(aq*\(aq and each conversion specifier asks for the next
-.\"O argument (and it is an error if insufficiently many arguments are given).
-°ú¤­¿ô¤Ï (·¿¤Î³Ê¾å¤²¤Î¸å¤Ï) ÊÑ´¹»ØÄê»Ò¤¬É½¤¹·¿¤ÈÀµ³Î¤ËÂбþ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢\(aq*\(aq ¤äÊÑ´¹»ØÄê»Ò¤¬½Ð¤Æ¤¯¤ëËè¤Ë¼¡¤Î°ú¤­¿ô¤òÍ׵ᤵ¤ì¡¢
-°ú¤­¿ô¤Ï»ØÄꤵ¤ì¤¿½ç½ø¤Ç»ÈÍѤµ¤ì¤Æ¤¤¤¯
-(»ØÄꤵ¤ì¤¿°ú¤­¿ô¤Î¸Ä¿ô¤¬ÉÔ½½Ê¬¤Ê¤é¥¨¥é¡¼¤È¤Ê¤ë)¡£
-.\"O One can also specify explicitly which argument is taken,
-.\"O at each place where an argument is required, by writing "%m$" instead
-.\"O of \(aq%\(aq and "*m$" instead of \(aq*\(aq,
-.\"O where the decimal integer m denotes
-.\"O the position in the argument list of the desired argument, indexed starting
-.\"O from 1.
-.\"O Thus,
-.\"O .in +4n
-.\"O .nf
-.\"O
-.\"O printf("%*d", width, num);
-.\"O
-.\"O .fi
-.\"O .in
-.\"O and
-.\"O .in +4n
-.\"O .nf
-.\"O
-.\"O printf("%2$*1$d", width, num);
-.\"O
-.\"O .fi
-.\"O .in
-¤Þ¤¿¡¢°ú¤­¿ô¤¬É¬Íפʲսê¤Ç \(aq%\(aq ¤ÎÂå¤ï¤ê¤Ë "%m$"¡¢
-\(aq*\(aq¤ÎÂå¤ï¤ê¤Ë "*m$" ¤È½ñ¤¯¤³¤È¤Ç¡¢
-ÌÀ¼¨Åª¤Ë¤É¤Î°ú¤­¿ô¤ò»ÈÍѤ¹¤ë¤«¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤­¤ë¡£
-¤³¤³¤Ç 10¿Ê¤ÎÀ°¿ô m ¤Ï´õ˾¤Î°ú¤­¿ô¤Î°ú¤­¿ô¥ê¥¹¥È¤Ç¤Î°ÌÃÖ¤ò¼¨¤¹
-(ºÇ½é¤Î°ú¤­¿ô¤ÎÈֹ椬 1 ¤Ç¤¢¤ë)¡£
-½¾¤Ã¤Æ¡¢°Ê²¼¤ÎÆó¤Ä¤ÏÅù²Á¤Ç¤¢¤ë¡£
+引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならない。 デフォルトでは、\(aq*\(aq
+や変換指定子が出てくる毎に次の引き数を要求され、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分ならエラーとなる)。
+また、引き数が必要な箇所で \(aq%\(aq の代わりに "%m$"、 \(aq*\(aqの代わりに "*m$" と書くことで、
+明示的にどの引き数を使用するかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リストでの位置を示す (最初の引き数の番号が 1
+である)。 従って、
 .in +4n
 .nf
 
 printf("%*d", width, num);
 
+.fi
+.in
+と
+.in +4n
+.nf
+
 printf("%2$*1$d", width, num);
 
 .fi
 .in
-¤ÏÅù²Á¤Ç¤¢¤ë¡£
-.\"O are equivalent.
-.\"O The second style allows repeated references to the
-.\"O same argument.
-.\"O The C99 standard does not include the style using \(aq$\(aq,
-.\"O which comes from the Single Unix Specification.
-.\"O If the style using
-.\"O \(aq$\(aq is used, it must be used throughout for all conversions taking an
-.\"O argument and all width and precision arguments, but it may be mixed
-.\"O with "%%" formats which do not consume an argument.
-.\"O There may be no
-.\"O gaps in the numbers of arguments specified using \(aq$\(aq; for example, if
-.\"O arguments 1 and 3 are specified, argument 2 must also be specified
-.\"O somewhere in the format string.
-ÆóÈÖÌܤνñ¤­Êý¤Ç¤ÏƱ¤¸°ú¤­¿ô¤ò·«¤êÊÖ¤·»²¾È¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-C99 É¸½à¤Ë¤Ï¡¢ Single Unix Specification Í³Íè¤Î \(aq$\(aq ¤ò»È¤Ã¤¿½ñ¤­Êý¤Ï´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¡£
-\(aq$\(aq ¤ò»È¤Ã¤¿¥¹¥¿¥¤¥ë¤ò»È¤¦¤È¡¢°ú¤­¿ô¤ò¼è¤ëÊÑ´¹µÚ¤ÓÉý¤ÈÀºÅ٤ΰú¤­¿ô¤ò
-Á´¤Æ¤³¤Î¥¹¥¿¥¤¥ë¤Ç»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤¬¡¢
-°ú¤­¿ô¤ò¾ÃÈñ¤·¤Ê¤¤ "%%" ¥Õ¥©¡¼¥Þ¥Ã¥È¤Èº®¤¶¤Ã¤Æ¤¤¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-\(aq$\(aq ¤Ç»ØÄꤵ¤ì¤ë°ú¤­¿ô¤ÎÈÖ¹æ¤Ë¶õ¤­¤¬¤¢¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
-Î㤨¤Ð¡¢¤â¤·°ú¤­¿ô 1 ¤È 3 ¤¬»ØÄꤵ¤ì¤ë¤È¡¢°ú¤­¿ô 2 ¤â¥Õ¥©¡¼¥Þ¥Ã¥Èʸ»úÎó¤Î¤É¤³¤«¤Ç
-»ØÄꤵ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 C99 標準には、 Single UNIX Specification
+由来の \(aq$\(aq を使った書き方は含まれていない。 \(aq$\(aq を使ったスタイルを使うと、引き数を取る変換及び幅と精度の引き数を
+全てこのスタイルで指定しなければならないが、 引き数を消費しない "%%" フォーマットと混ざっているかもしれない。 \(aq$\(aq
+で指定される引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定されると、引き数 2 もフォーマット文字列のどこかで
+指定されなければならない。
 
-.\"O For some numeric conversion a radix character ("decimal point") or
-.\"O thousands' grouping character is used.
-.\"O The actual character used
-.\"O depends on the
-.\"O .B LC_NUMERIC
-.\"O part of the locale.
-.\"O The POSIX locale
-.\"O uses \(aq.\(aq as radix character, and does not have a grouping character.
-¿ôÃÍÊÑ´¹¤Ë¤Ï¾®¿ôÅÀ¤ä 1000 Ã±°Ì¤Î¶èÀÚ¤êʸ»ú¤ò»È¤¦¤â¤Î¤â¤¢¤ë¡£
-¼ÂºÝ¤Ë¤É¤Îʸ»ú¤ò»È¤¦¤«¤Ï¥í¥±¡¼¥ë¤Î
-.B LC_NUMERIC
-¤Ë¤è¤ë¡£
-POSIX ¥í¥±¡¼¥ë¤Ç¤Ï¾®¿ôÅÀ¤Ë \(aq.\(aq ¤òÍѤ¤¡¢
-¶èÀÚ¤êʸ»ú¤Ï»È¤ï¤Ê¤¤¡£
-.\"O Thus,
-½¾¤Ã¤Æ¡¢
+数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を使うかはロケールの \fBLC_NUMERIC\fP による。 POSIX
+ロケールでは小数点に \(aq.\(aq を用い、 区切り文字は使わない。 従って、
 .in +4n
 .nf
 
@@ -416,1322 +150,275 @@ printf("%\(aq.2f", 1234567.89);
 
 .fi
 .in
-.\"O results in "1234567.89" in the POSIX locale, in "1234567,89" in the
-.\"O nl_NL locale, and in "1.234.567,89" in the da_DK locale.
-¤Ï¡¢ POSIX ¥í¥±¡¼¥ë¤Ç¤Ï "1234567.89" ¡¢ nl_NL ¥í¥±¡¼¥ë¤Ç¤Ï "1234567,89"¡¢
-da_DK ¥í¥±¡¼¥ë¤Ç¤Ï "1.234.567,89" ¤È¤Ê¤ë¡£
-.\"O .SS "The flag characters"
-.SS ¥Õ¥é¥°Ê¸»ú
-.\"O The character % is followed by zero or more of the following flags:
-% Ê¸»ú¤Î¸å¤í¤Ë¤Ï 0 ¸Ä°Ê¾å¤Î¥Õ¥é¥°Ê¸»ú¤¬Â³¤¯¡£
-.TP
-.\"O .B #
-.\"O The value should be converted to an "alternate form".
-.B #
-ÃͤϡÖÊ̤ηÁ¼°¡×¤ËÊÑ´¹¤µ¤ì¤ë¡£
-.\"O For
-.\"O .B o
-.\"O conversions, the first character of the output string is made zero
-.\"O (by prefixing a 0 if it was not zero already).
-.B o
-ÊÑ´¹¤Î¾ì¹ç¡¢(ÀèƬʸ»ú¤¬ 0 ¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤ËÀèƬ¤Ë 0 ¤òÄɲ乤뤳¤È¤Ç)
-½ÐÎÏʸ»úÎó¤ÎºÇ½é¤Îʸ»ú¤ò 0 ¤Ë¤¹¤ë¡£
-.\"O For
-.\"O .B x
-.\"O and
-.\"O .B X
-.\"O conversions, a nonzero result has the string "0x" (or "0X" for
-.\"O .B X
-.\"O conversions) prepended to it.
-.B x
-¤È
-.B X
-ÊÑ´¹¤Î¾ì¹ç¡¢¿ôÃͤ¬ 0 ¤Ç¤Ê¤¤¤È¤­¤Ë¤Ïʸ»úÎó "0x"
-.RB ( X
-ÊÑ´¹¤Î¾ì¹ç¤Ë¤Ï "0X") ¤¬Á°¤ËÉÕÍ¿¤µ¤ì¤ë¡£
-.\"O For
-.\"O .BR a ,
-.\"O .BR A ,
-.\"O .BR e ,
-.\"O .BR E ,
-.\"O .BR f ,
-.\"O .BR F ,
-.\"O .BR g ,
-.\"O and
-.\"O .B G
-.\"O conversions, the result will always contain a decimal point, even if no
-.\"O digits follow it (normally, a decimal point appears in the results of those
-.\"O conversions only if a digit follows).
-.\"O For
-.BR a ,
-.BR A ,
-.BR e ,
-.BR E ,
-.BR f ,
-.BR F ,
-.BR g ,
-.B G
-ÊÑ´¹¤Ç¤Ï¡¢ ¾®¿ôÅÀ¤Ë³¤¯¿ô»ú¤¬¤Ê¤¯¤Æ¤â¡¢
-½ÐÎϤˤϾï¤Ë¾®¿ôÅÀ¤¬´Þ¤Þ¤ì¤ë
-(Ä̾ï¤Ï¡¢¾®¿ôÅÀ¤Î¸å¤Ë¿ô»ú¤¬Â³¤¯¾ì¹ç¤Ë¤Î¤ß¡¢
-¾®¿ôÅÀ¤¬É½¼¨¤µ¤ì¤ë)¡£
-.\"O .B g
-.\"O and
-.\"O .B G
-.\"O conversions, trailing zeros are not removed from the result as they would
-.\"O otherwise be.
-.B g
-¤È
-.B G
-ÊÑ´¹¤Î¾ì¹ç¡¢Â¾¤ÎÊÑ´¹¤È¤Ï°Û¤Ê¤ê¡¢ËöÈø¤Î¥¼¥í¤¬ÊÑ´¹·ë²Ì¤«¤éºï½ü¤µ¤ì¤Ê¤¤¡£
-.\"O For other conversions, the result is undefined.
-¤½¤Î¾¤ÎÊÑ´¹¤Ç¤Ï¡¢·ë²Ì¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
-.TP
-.B \&0
-.\"O The value should be zero padded.
-.\"O For
-.\"O .BR d ,
-.\"O .BR i ,
-.\"O .BR o ,
-.\"O .BR u ,
-.\"O .BR x ,
-.\"O .BR X ,
-.\"O .BR a ,
-.\"O .BR A ,
-.\"O .BR e ,
-.\"O .BR E ,
-.\"O .BR f ,
-.\"O .BR F ,
-.\"O .BR g ,
-.\"O and
-.\"O .B G
-.\"O conversions, the converted value is padded on the left with zeros rather
-.\"O than blanks.
-Ãͤò¥¼¥í¤ÇËä¤á¤ë¡£
-.BR d ,
-.BR i ,
-.BR o ,
-.BR u ,
-.BR x ,
-.BR X ,
-.BR a ,
-.BR A ,
-.BR e ,
-.BR E ,
-.BR f ,
-.BR F ,
-.BR g ,
-.B G
-ÊÑ´¹¤Ç¤Ï¡¢ÊÑ´¹¤·¤¿Ãͤκ¸Â¦¤ò¶õÇòʸ»ú¤ÎÂå¤ï¤ê¤Ë¥¼¥í¤ÇËä¤á¤ë¡£
-.\"O If the
-.\"O .B \&0
-.\"O and
-.\"O .B \-
-.\"O flags both appear, the
-.\"O .B \&0
-.\"O flag is ignored.
-.B \&0
-¤È
-.B \-
-¤¬Î¾Êý¤È¤â»ØÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢
-.B \&0
-¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë¡£
-.\"O If a precision is given with a numeric conversion
-.\"O .RB ( d ,
-.\"O .BR i ,
-.\"O .BR o ,
-.\"O .BR u ,
-.\"O .BR x ,
-.\"O and
-.\"O .BR X ),
-.\"O the
-.\"O .B \&0
-.\"O flag is ignored.
-ÀºÅÙ¤¬¿ôÃÍÊÑ´¹
-.RB ( d ,
-.BR i ,
-.BR o ,
-.BR u ,
-.BR x ,
-.BR X )
-¤ÈƱ»þ¤Ë»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢
-.B \&0
-¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë¡£
-.\"O For other conversions, the behavior is undefined.
-¤½¤Î¾¤ÎÊÑ´¹¤Ç¤Ï¡¢Æ°ºî¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
-.TP
-.B \-
-.\"O The converted value is to be left adjusted on the field boundary.
-.\"O (The default is right justification.)
-.\"O Except for
-.\"O .B n
-.\"O conversions, the converted value is padded on the right with blanks, rather
-.\"O than on the left with blanks or zeros.
-.\"O A
-ÊÑ´¹Ãͤò¥Õ¥£¡¼¥ë¥É¶­³¦¤Çº¸Â·¤¨¤Ë¤¹¤ë
-(¥Ç¥Õ¥©¥ë¥È¤Ï±¦Â·¤¨¤Ç¤¢¤ë)¡£
-.B n
-ÊÑ´¹°Ê³°¤Ç¤Ï¡¢ÊÑ´¹¤µ¤ì¤¿ÃͤÏ
-º¸Â¦¤Ç¤Ï¤Ê¤¯±¦Â¦¤ò¶õÇòʸ»ú¤ä¥¼¥í¤ÇËä¤á¤é¤ì¤ë¡£
-.\"O .B \-
-.\"O overrides a
-.\"O .B \&0
-.\"O if both are given.
-.B \-
-¤È
-.B \&0
-¤ÎξÊý¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢
-.B \-
-¤¬Í¥À褵¤ì¤ë¡£
-.TP
-.\"O .B \(aq \(aq
-.B ' '
-.\"O (a space) A blank should be left before a positive number
-.\"O (or empty string) produced by a signed conversion.
-(1¸Ä¤ÎȾ³Ñ¥¹¥Ú¡¼¥¹)
-Éä¹æÉÕ¤­ÊÑ´¹¤ÇÀ¸À®¤µ¤ì¤¿Àµ¤Î¿ô»ú¤ÎÁ°¤Ë¶õÇò (¤Þ¤¿¤Ï¶õʸ»úÎó) ¤¬ÃÖ¤«¤ì¤ë¡£
-.TP
-.\"O .B +
-.\"O A sign (+ or \-) should always be placed before a number produced by a signed
-.\"O conversion.
-.\"O By default a sign is used only for negative numbers.
-.\"O A
-.\"O .B +
-.\"O overrides a space if both are used.
-.B +
-Éä¹æÉÕ¤­ÊÑ´¹¤Ë¤è¤Ã¤Æ½ÐÎϤµ¤ì¤ë¿ô»ú¤ÎÁ°¤Ë¡¢¾ï¤ËÉä¹æ (+ ¤« \-) ¤¬ÃÖ¤«¤ì¤ë¡£
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢Éä¹æ¤ÏÉé¤Î¿ô»ú¤Î¾ì¹ç¤Î¤ßÉÕÍ¿¤µ¤ì¤ë¡£
-.B +
-¤ÈȾ³Ñ¥¹¥Ú¡¼¥¹¤Î
-ξÊý¤¬»È¤ï¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢
-.B +
-¤¬Í¥À褵¤ì¤ë¡£
+は、 POSIX ロケールでは "1234567.89" 、 nl_NL ロケールでは "1234567,89"、 da_DK ロケールでは
+"1.234.567,89" となる。
+.SS フラグ文字
+% 文字の後ろには 0 個以上のフラグ文字が続く。
+.TP 
+\fB#\fP
+値は「別の形式」に変換される。 \fBo\fP 変換の場合、(先頭文字が 0 になっていない場合に先頭に 0 を追加することで)  出力文字列の最初の文字を
+0 にする。 \fBx\fP と \fBX\fP 変換の場合、数値が 0 でないときには文字列 "0x" (\fBX\fP 変換の場合には "0X") が前に付与される。
+\fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, \fBG\fP 変換では、 小数点に続く数字がなくても、
+出力には常に小数点が含まれる (通常は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 \fBg\fP と \fBG\fP
+変換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の変換では、結果は未定義である。
+.TP 
+\fB\&0\fP
+値をゼロで埋める。 \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP, \fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP,
+\fBF\fP, \fBg\fP, \fBG\fP 変換では、変換した値の左側を空白文字の代わりにゼロで埋める。 \fB\&0\fP と \fB\-\fP が両方とも指定された場合は、
+\fB\&0\fP フラグは無視される。 精度が数値変換 (\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP)
+と同時に指定された場合には、 \fB\&0\fP フラグは無視される。 その他の変換では、動作は未定義である。
+.TP 
+\fB\-\fP
+変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 \fBn\fP 変換以外では、変換された値は
+左側ではなく右側を空白文字やゼロで埋められる。 \fB\-\fP と \fB\&0\fP の両方が指定された場合には、 \fB\-\fP が優先される。
+.TP 
+\&\fB' '\fP
+(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字列) が置かれる。
+.TP 
+\fB+\fP
+符号付き変換によって出力される数字の前に、常に符号 (+ か \-) が置かれる。 デフォルトでは、符号は負の数字の場合のみ付与される。 \fB+\fP
+と半角スペースの 両方が使われている場合には、 \fB+\fP が優先される。
 .PP
-.\"O The five flag characters above are defined in the C standard.
-.\"O The SUSv2 specifies one further flag character.
-¾åµ­¤Î 5 ¤Ä¤Î¥Õ¥é¥°¤Ï C É¸½à¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
-SUSv2 ¤Ç¤Ï¡¢¤µ¤é¤Ë¤â¤¦°ì¤Ä¥Õ¥é¥°Ê¸»ú¤¬µ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
-.TP
-.B \(aq
-.\"O For decimal conversion
-.\"O .RB ( i ,
-.\"O .BR d ,
-.\"O .BR u ,
-.\"O .BR f ,
-.\"O .BR F ,
-.\"O .BR g ,
-.\"O .BR G )
-.\"O the output is to be grouped with thousands' grouping characters
-.\"O if the locale information indicates any.
-.\"O Note that many versions of
-.\"O .BR gcc (1)
-.\"O cannot parse this option and will issue a warning.
-.\"O SUSv2 does not
-.\"O include %\(aqF.
-10¿Ê¿ôÊÑ´¹
-.RB ( i ,
-.BR d ,
-.BR u ,
-.BR f ,
-.BR F ,
-.BR g ,
-.BR G )
-¤Ë¤ª¤¤¤Æ¡¢¥í¥±¡¼¥ë¾ðÊó¤Ë»ØÄ꤬¤¢¤ì¤Ð 1000 Ã±°Ì¤Î¶èÀÚ¤êʸ»ú¤ò½ÐÎϤ¹¤ë¡£
-.BR gcc (1)
-¤Î¿¤¯¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤ò²ò¼á¤¹¤ë¤³¤È¤¬¤Ç¤­¤º¡¢
-·Ù¹ð¤ò½ÐÎϤ¹¤ë¤³¤È¤ËÃí°Õ¤»¤è¡£
-%\(aqF ¤Ï SUSv2 ¤Ë¤Ï´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¡£
-.PP
-.\"O glibc 2.2 adds one further flag character.
-glibc 2.2 ¤Ç¤Ï¡¢¤µ¤é¤Ë°ì¤Ä¥Õ¥é¥°Ê¸»ú¤¬Äɲ䵤ì¤Æ¤¤¤ë¡£
-.TP
-.B I
-.\"O For decimal integer conversion
-.\"O .RB ( i ,
-.\"O .BR d ,
-.\"O .BR u )
-.\"O the output uses the locale's alternative output digits, if any.
-.\"O For example, since glibc 2.2.3 this will give Arabic-Indic digits
-.\"O in the Persian ("fa_IR") locale.
-.\"O .\" outdigits keyword in locale file
-10¿ÊÀ°¿ôÊÑ´¹
-.RB ( i ,
-.BR d ,
-.BR u )
-¤Ë¤ª¤¤¤Æ¡¢¥í¥±¡¼¥ë¤ÎÂåÂؽÐÎÏ¿ô»ú¤¬¤¢¤ì¤Ð¡¢¤½¤ì¤òÍѤ¤¤Æ½ÐÎϤ¹¤ë¡£
-Î㤨¤Ð¡¢ glibc 2.2.3 °Ê¹ß¤Ç¤Ï¡¢¥Ú¥ë¥·¥¢ ("fa_IR") ¥í¥±¡¼¥ë¤Ç
-¥¢¥é¥Ó¥¢¿ô»ú (Arabic-Indic digits) ¤ò½ÐÎϤǤ­¤ë¡£
-.\" ¥í¥±¡¼¥ë¥Õ¥¡¥¤¥ë¤Ë¤Ï outdigits ¤È¤¤¤¦¥­¡¼¥ï¡¼¥É¤¬¤¢¤ë¡£
-.\"O .SS "The field width"
-.SS ¥Õ¥£¡¼¥ë¥ÉÉý
-.\"O An optional decimal digit string (with nonzero first digit) specifying
-.\"O a minimum field width.
-.\"O If the converted value has fewer characters
-.\"O than the field width, it will be padded with spaces on the left
-.\"O (or right, if the left-adjustment flag has been given).
-ºÇ¾®¤Î¥Õ¥£¡¼¥ë¥ÉÉý¤ò»ØÄꤹ¤ë 10¿Ê¿ô¤Î¿ôÃÍʸ»úÎó (ʸ»úÎó¤ÎºÇ½é¤Îʸ»ú¤Ï
-¥¼¥í°Ê³°)¡£ËܹàÌܤϥª¥×¥·¥ç¥ó¤Ç¤¢¤ë¡£
-ÊÑ´¹¤µ¤ì¤¿ÃͤÎʸ»ú¿ô¤¬¥Õ¥£¡¼¥ë¥ÉŤè¤ê¤â¾¯¤Ê¤¤¾ì¹ç¡¢
-¥Õ¥£¡¼¥ë¥É¤Îº¸Â¦¤ò¥¹¥Ú¡¼¥¹¤ÇËä¤á¤ë
-(º¸Â·¤¨¤Î¥Õ¥é¥°¤¬¤¢¤ë¾ì¹ç¤Ï±¦Â¦¤òËä¤á¤ë)¡£
-.\"O Instead of a decimal digit string one may write "*" or "*m$"
-.\"O (for some decimal integer \fIm\fP) to specify that the field width
-.\"O is given in the next argument, or in the \fIm\fP-th argument, respectively,
-.\"O which must be of type
-.\"O .IR int .
-10¿Ê¿ô¤Îʸ»úÎó¤ÎÂå¤ï¤ê¤Ë "*" ¤ä "*m$" (\fIm\fP ¤Ï 10¿ÊÀ°¿ô) ¤ò½ñ¤¯¤³¤È¤â¤Ç¤­¤ë¡£
-"*" ¤È "*m$" ¤Ï¤½¤ì¤¾¤ì¡¢¼¡¤Î°ú¤­¿ô¤È \fIm\fP ÈÖÌܤΰú¤­¿ô¤ò¥Õ¥£¡¼¥ë¥ÉÉý¤È¤·¤Æ
-»È¤¦¤³¤È¤ò»ØÄꤹ¤ë (¤³¤ì¤é¤Î°ú¤­¿ô¤Ï
-.I int
-·¿¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤)¡£
-.\"O A negative field width is taken as a \(aq\-\(aq flag followed by a
-.\"O positive field width.
-¥Õ¥£¡¼¥ë¥ÉÉý¤ËÉé¤Î¿ô¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢
-\(aq\-\(aq ¥Õ¥é¥°¤ÈÀµ¤Î¿ô¤Î¥Õ¥£¡¼¥ë¥ÉÉý¤È¤·¤Æ°·¤ï¤ì¤ë¡£
-.\"O In no case does a nonexistent or small field width cause truncation of a
-.\"O field; if the result of a conversion is wider than the field width, the
-.\"O field is expanded to contain the conversion result.
-¥Õ¥£¡¼¥ë¥ÉÉý¤¬¾®¤µ¤«¤Ã¤¿¤ê»ØÄ꤬¤Ê¤«¤Ã¤¿¤ê¤·¤Æ¤â¡¢¥Õ¥£¡¼¥ë¥É¤¬ÀÚ¤êµÍ¤á¤é¤ì¤ë
-¤³¤È¤Ï¤Ê¤¤¡£¤â¤·ÊÑ´¹·ë²Ì¤¬¥Õ¥£¡¼¥ë¥ÉÉý¤è¤ê¤â¹­¤«¤Ã¤¿¾ì¹ç¡¢
-¥Õ¥£¡¼¥ë¥É¤ÏÊÑ´¹·ë²Ì¤¬Æþ¤ëÉý¤Ë¹­¤²¤é¤ì¤ë¡£
-.\"O .SS "The precision"
-.SS ÀºÅÙ
-.\"O An optional precision, in the form of a period (\(aq.\(aq)  followed by an
-.\"O optional decimal digit string.
-¥ª¥×¥·¥ç¥ó¤Ç¤¢¤ëÀºÅ٤ϡ¢¥Ô¥ê¥ª¥É (\(aq.\(aq) ¤È¤½¤ì¤Ë³¤¯10¿Ê¿ô¤È¤¤¤¦
-·Á¼°¤Ç»ØÄꤹ¤ë (10¿Ê¿ô¤Ï¥ª¥×¥·¥ç¥ó) ¡£
-.\"O Instead of a decimal digit string one may write "*" or "*m$"
-.\"O (for some decimal integer m) to specify that the precision
-.\"O is given in the next argument, or in the m-th argument, respectively,
-.\"O which must be of type
-.\"O .IR int .
-10¿Ê¿ô¤Îʸ»úÎó¤ÎÂå¤ï¤ê¤Ë "*" ¤ä "*m$" (m ¤Ï 10 ¿ÊÀ°¿ô)¤ò½ñ¤¯¤³¤È¤â¤Ç¤­¤ë¡£
-"*" ¤È "*m$" ¤Ï¤½¤ì¤¾¤ì¡¢¼¡¤Î°ú¤­¿ô¤È m ÈÖÌܤΰú¤­¿ô¤òÀºÅ٤Ȥ·¤Æ
-»È¤¦¤³¤È¤ò»ØÄꤹ¤ë (¤³¤ì¤é¤Î°ú¤­¿ô¤Ï
-.I int
-·¿¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤)¡£
-.\"O If the precision is given as just \(aq.\(aq, or the precision is negative,
-.\"O the precision is taken to be zero.
-ÀºÅ٤Ȥ·¤Æ \(aq.\(aq ¤À¤±¤¬»ØÄꤵ¤ì¤¿¤ê¡¢ÀºÅÙ¤¬Éé¤Î¿ô¤À¤Ã¤¿¾ì¹ç¡¢
-ÀºÅ٤ϥ¼¥í¤È¤ß¤Ê¤µ¤ì¤ë¡£
-.\"O This gives the minimum number of digits to appear for
-.\"O .BR d ,
-.\"O .BR i ,
-.\"O .BR o ,
-.\"O .BR u ,
-.\"O .BR x ,
-.\"O and
-.\"O .B X
-.\"O conversions, the number of digits to appear after the radix character for
-.\"O .BR a ,
-.\"O .BR A ,
-.\"O .BR e ,
-.\"O .BR E ,
-.\"O .BR f ,
-.\"O and
-.\"O .B F
-.\"O conversions, the maximum number of significant digits for
-.\"O .B g
-.\"O and
-.\"O .B G
-.\"O conversions, or the maximum number of characters to be printed from a
-.\"O string for
-.\"O .B s
-.\"O and
-.\"O .B S
-.\"O conversions.
-.BR d ,
-.BR i ,
-.BR o ,
-.BR u ,
-.BR x ,
-.B X
-ÊÑ´¹¤Ç¤Ï¡¢É½¼¨¤µ¤ì¤ëºÇ¾®¤Î·å¿ô¤ò»ØÄꤹ¤ë¡£
-.BR a ,
-.BR A ,
-.BR e ,
-.BR E ,
-.BR f ,
-.B F
-ÊÑ´¹¤Ç¤Ï¡¢¾®¿ôÅÀ°Ê²¼¤Ëɽ¼¨¤µ¤ì¤ë¿ô»ú¤Î·å¿ô¤ò»ØÄꤹ¤ë¡£
-.B g
-¤È
-.B G
-ÊÑ´¹¤Ç¤Ï¡¢Í­¸ú¿ô»ú¤ÎºÇÂç·å¿ô¤ò»ØÄꤹ¤ë¡£
-.B s
-¤È
-.B S
-ÊÑ´¹¤Ç¤Ï¡¢Ê¸»úÎ󤫤é½ÐÎϤµ¤ì¤ëºÇÂçʸ»ú¿ô¤ò»ØÄꤹ¤ë¡£
-.\"O .SS "The length modifier"
-.SS Ä¹¤µ½¤¾þ»Ò
-.\"O Here, "integer conversion" stands for
-.\"O .BR d ,
-.\"O .BR i ,
-.\"O .BR o ,
-.\"O .BR u ,
-.\"O .BR x ,
-.\"O or
-.\"O .B X
-.\"O conversion.
-¡ÖÀ°¿ôÊÑ´¹¡×¤È¤Ï¡¢
-.BR d ,
-.BR i ,
-.BR o ,
-.BR u ,
-.BR x ,
-.B X
-ÊÑ´¹¤Î¤³¤È¤Ç¤¢¤ë¡£
-.TP
-.B hh
-.\"O A following integer conversion corresponds to a
-.\"O .I signed char
-.\"O or
-.\"O .I unsigned char
-.\"O argument, or a following
-.\"O .B n
-.\"O conversion corresponds to a pointer to a
-.\"O .I signed char
-.\"O argument.
-À°¿ôÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I signed char
-¤«
-.I unsigned char
-¤Ç¡¢
-.B n
-ÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I signed char
-¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-.TP
-.B h
-.\"O A following integer conversion corresponds to a
-.\"O .I short int
-.\"O or
-.\"O .I unsigned short int
-.\"O argument, or a following
-.\"O .B n
-.\"O conversion corresponds to a pointer to a
-.\"O .I short int
-.\"O argument.
-À°¿ôÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I short int
-¤«
-.I unsigned short int
-¤Ç¡¢
-.B n
-ÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I short int
-¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-.TP
-.\"O .B l
-.\"O (ell) A following integer conversion corresponds to a
-.\"O .I long int
-.\"O or
-.\"O .I unsigned long int
-.\"O argument, or a following
-.\"O .B n
-.\"O conversion corresponds to a pointer to a
-.\"O .I long long int
-.\"O argument, or a following
-.\"O .B c
-.\"O conversion corresponds to a
-.\"O .I wint_t
-.\"O argument, or a following
-.\"O .B s
-.\"O conversion corresponds to a pointer to
-.\"O .I wchar_t
-.\"O argument.
-.BR l " (¥¨¥ë)"
-³ÆÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬¡¢
-À°¿ôÊÑ´¹¤Ç¤Ï
-.IR "long int" ¤«
-.IR "unsigned long int" ¡¢
-.B n
-ÊÑ´¹¤Ç¤Ï
-.I long long int
-¤Ø¤Î¥Ý¥¤¥ó¥¿¡¢
-.B c
-ÊÑ´¹¤Ç¤Ï
-.IR wint_t ¡¢
-.B s
-ÊÑ´¹¤Ç¤Ï
-.I wchar_t
-¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-
-.TP
-.\"O .B ll
-.\"O (ell-ell).
-.\"O A following integer conversion corresponds to a
-.\"O .I long long int
-.\"O or
-.\"O .I unsigned long long int
-.\"O argument, or a following
-.\"O .B n
-.\"O conversion corresponds to a pointer to a
-.\"O .I long int
-.\"O argument.
-.BR ll " (¥¨¥ë¥¨¥ë)"
-À°¿ôÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I long long int
-¤«
-.I unsigned long long int
-¤Ç¡¢
-.B n
-ÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I long int
-¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-.TP
-.B L
-.\"O A following
-.\"O .BR a ,
-.\"O .BR A ,
-.\"O .BR e ,
-.\"O .BR E ,
-.\"O .BR f ,
-.\"O .BR F ,
-.\"O .BR g ,
-.\"O or
-.\"O .B G
-.\"O conversion corresponds to a
-.\"O .I long double
-.\"O argument.
-.BR a ,
-.BR A ,
-.BR e ,
-.BR E ,
-.BR f ,
-.BR F ,
-.BR g ,
-.B G
-ÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I long double
-¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-.\"O (C99 allows %LF, but SUSv2 does not.)
-(C99 ¤Ç¤Ï %LF ¤ò»È¤¦¤³¤È¤òǧ¤á¤Æ¤¤¤ë¤¬¡¢SUSv2 ¤Ç¤Ïǧ¤á¤é¤ì¤Æ¤¤¤Ê¤¤¡£)
-.TP
-.B q
-.\"O ("quad". 4.4BSD and Linux libc5 only.
-.\"O Don't use.)
-.\"O This is a synonym for
-.\"O .BR ll .
-("quad"¡£ 4.4BSD ¤È Linux libc5 ¤Î¤ßÍ­¸ú¡£»È¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£)
-.B ll
-¤ÈƱ¤¸°ÕÌ£¤Ç¤¢¤ë¡£
-.TP
-.B j
-.\"O A following integer conversion corresponds to an
-.\"O .I intmax_t
-.\"O or
-.\"O .I uintmax_t
-.\"O argument.
-À°¿ôÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I intmax_t
-¤«
-.I uintmax_t
-¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-.TP
-.B z
-.\"O A following integer conversion corresponds to a
-.\"O .I size_t
-.\"O or
-.\"O .I ssize_t
-.\"O argument.
-.\"O (Linux libc5 has
-.\"O .B Z
-.\"O with this meaning.
-.\"O Don't use it.)
-À°¿ôÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I size_t
-¤«
-.I ssize_t
-¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-(Linux libc5 ¤Ç¤Ï¡¢¤³¤ì¤ò»ØÄꤹ¤ë¤Î¤Ë
-.B Z
-¤òÍѤ¤¤ë¡£»È¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£)
-.TP
-.B t
-.\"O A following integer conversion corresponds to a
-.\"O .I ptrdiff_t
-.\"O argument.
-À°¿ôÊÑ´¹¤ËÂбþ¤¹¤ë°ú¤­¿ô¤¬
-.I ptrdiff_t
-¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
+上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラグ文字が規定されている。
+.TP 
+\fB\(aq\fP
+10進数変換 (\fBi\fP, \fBd\fP, \fBu\fP, \fBf\fP, \fBF\fP, \fBg\fP, \fBG\fP)  において、ロケール情報に指定があれば 1000
+単位の区切り文字を出力する。 \fBgcc\fP(1)  の多くのバージョンは、このオプションを解釈することができず、 警告を出力することに注意せよ。
+%\(aqF は SUSv2 には含まれていない。
 .PP
-.\"O The SUSv2 only knows about the length modifiers
-.\"O .B h
-.\"O (in
-.\"O .BR hd ,
-.\"O .BR hi ,
-.\"O .BR ho ,
-.\"O .BR hx ,
-.\"O .BR hX ,
-.\"O .BR hn )
-.\"O and
-.\"O .B l
-.\"O (in
-.\"O .BR ld ,
-.\"O .BR li ,
-.\"O .BR lo ,
-.\"O .BR lx ,
-.\"O .BR lX ,
-.\"O .BR ln ,
-.\"O .BR lc ,
-.\"O .BR ls )
-.\"O and
-.\"O .B L
-.\"O (in
-.\"O .BR Le ,
-.\"O .BR LE ,
-.\"O .BR Lf ,
-.\"O .BR Lg ,
-.\"O .BR LG ).
-SUSv2 ¤ÇŤµ½¤¾þ»Ò¤È¤·¤Æ»ÈÍѤǤ­¤ë¤Î¤Ï¡¢
-.B h
-.RB ( hd ,
-.BR hi ,
-.BR ho ,
-.BR hx ,
-.BR hX ,
-.BR hn ),
-.B l
-.RB ( ld ,
-.BR li ,
-.BR lo ,
-.BR lx ,
-.BR lX ,
-.BR ln ,
-.BR lc ,
-.BR ls ),
-.B L
-.RB ( Le ,
-.BR LE ,
-.BR Lf ,
-.BR Lg ,
-.BR LG )
-¤À¤±¤Ç¤¢¤ë¡£
-.\"O .SS "The conversion specifier"
-.SS ÊÑ´¹»ØÄê»Ò
-.\"O A character that specifies the type of conversion to be applied.
-ŬÍѤµ¤ì¤ëÊÑ´¹¤Î·¿¤ò»ØÄꤹ¤ëʸ»ú¡£
+glibc 2.2 では、さらに一つフラグ文字が追加されている。
+.TP 
+\fBI\fP
+.\" outdigits keyword in locale file
+10進整数変換 (\fBi\fP, \fBd\fP, \fBu\fP)  において、ロケールの代替出力数字があれば、それを用いて出力する。 例えば、 glibc
+2.2.3 以降では、ペルシア ("fa_IR") ロケールで アラビア数字 (Arabic\-Indic digits) を出力できる。
+.SS フィールド幅
+最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以外)。本項目はオプションである。
+変換された値の文字数がフィールド長よりも少ない場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を埋める)。
+10進数の文字列の代わりに "*" や "*m$" (\fIm\fP は 10進整数) を書くこともできる。 "*" と "*m$" はそれぞれ、次の引き数と
+\fIm\fP 番目の引き数をフィールド幅として 使うことを指定する (これらの引き数は \fIint\fP 型でなければならない)。
+フィールド幅に負の数が指定された場合は、 \(aq\-\(aq フラグと正の数のフィールド幅として扱われる。
+フィールド幅が小さかったり指定がなかったりしても、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広かった場合、
+フィールドは変換結果が入る幅に広げられる。
+.SS 精度
+オプションである精度は、ピリオド (\(aq.\(aq) とそれに続く10進数という 形式で指定する (10進数はオプション) 。
+10進数の文字列の代わりに "*" や "*m$" (m は 10 進整数)を書くこともできる。 "*" と "*m$" はそれぞれ、次の引き数と m
+番目の引き数を精度として 使うことを指定する (これらの引き数は \fIint\fP 型でなければならない)。 精度として \(aq.\(aq
+だけが指定されたり、精度が負の数だった場合、 精度はゼロとみなされる。 \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP
+変換では、表示される最小の桁数を指定する。 \fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP
+変換では、小数点以下に表示される数字の桁数を指定する。 \fBg\fP と \fBG\fP 変換では、有効数字の最大桁数を指定する。 \fBs\fP と \fBS\fP
+変換では、文字列から出力される最大文字数を指定する。
+.SS 長さ修飾子
+「整数変換」とは、 \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP 変換のことである。
+.TP 
+\fBhh\fP
+整数変換に対応する引き数が \fIsigned char\fP か \fIunsigned char\fP で、 \fBn\fP 変換に対応する引き数が \fIsigned
+char\fP へのポインタであることを示す。
+.TP 
+\fBh\fP
+整数変換に対応する引き数が \fIshort int\fP か \fIunsigned short int\fP で、 \fBn\fP 変換に対応する引き数が
+\fIshort int\fP へのポインタであることを示す。
+.TP 
+\fBl\fP
+各変換に対応する引き数が、 整数変換では \fIlong int\fPか \fIunsigned long int\fP、 \fBn\fP 変換では \fIlong
+long int\fP へのポインタ、 \fBc\fP 変換では \fIwint_t\fP、 \fBs\fP 変換では \fIwchar_t\fP へのポインタであることを示す。
+.TP 
+\fBll\fP (エルエル)
+整数変換に対応する引き数が \fIlong long int\fP か \fIunsigned long long int\fP で、 \fBn\fP
+変換に対応する引き数が \fIlong int\fP へのポインタであることを示す。
+.TP 
+\fBL\fP
+\fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, \fBG\fP 変換に対応する引き数が \fIlong double\fP
+であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では認められていない。)
+.TP 
+\fBq\fP
+("quad"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  \fBll\fP と同じ意味である。
+.TP 
+\fBj\fP
+整数変換に対応する引き数が \fIintmax_t\fP か \fIuintmax_t\fP であることを示す。
+.TP 
+\fBz\fP
+整数変換に対応する引き数が \fIsize_t\fP か \fIssize_t\fP であることを示す。 (Linux libc5 では、これを指定するのに
+\fBZ\fP を用いる。使ってはならない。)
+.TP 
+\fBt\fP
+整数変換に対応する引き数が \fIptrdiff_t\fP であることを示す。
 .PP
-.\"O The conversion specifiers and their meanings are:
-ÊÑ´¹»ØÄê»Ò¤È¤½¤Î°ÕÌ£¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
-.TP
-.BR d ", " i
-.\"O The
-.\"O .I int
-.\"O argument is converted to signed decimal notation.
-.I int
-°ú¤­¿ô¤òÉä¹æÉÕ¤­ 10 ¿Êɽµ­¤ËÊÑ´¹¤¹¤ë¡£
-.\"O The precision, if any, gives the minimum number of digits
-.\"O that must appear; if the converted value requires fewer digits, it is
-.\"O padded on the left with zeros.
-.\"O The default precision is 1.
-ÀºÅÙ»ØÄ꤬¤¢¤ì¤Ð¡¢ÀºÅ٤ǻØÄꤷ¤¿·å¿ô¤Ïɬ¤º½ÐÎϤµ¤ì¤ë¡£ÊÑ´¹¸å¤ÎÃͤ¬
-»ØÄꤵ¤ì¤¿·å¿ô¤Ë­¤ê¤Ê¤¤¾ì¹ç¤Ï¡¢º¸Â¦¤¬ 0 ¤ÇËä¤á¤é¤ì¤ë¡£
-¥Ç¥Õ¥©¥ë¥È¤ÎÀºÅ٤Ϡ1 ¤Ç¤¢¤ë¡£
-.\"O When 0 is printed with an explicit precision 0, the output is empty.
-0 ¤òɽ¼¨¤·¤è¤¦¤È¤·¤¿»þ¤Ë¡¢ÌÀ¼¨Åª¤ËÀºÅ٤Ȥ·¤Æ 0 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤È¡¢
-½ÐÎϤ϶õʸ»úÎó¤È¤Ê¤ë¡£
-.TP
-.BR o ", " u ", " x ", " X
-.\"O The
-.\"O .I "unsigned int"
-.\"O argument is converted to unsigned octal
-.\"O .RB ( o ),
-.\"O unsigned decimal
-.\"O .RB ( u ),
-.\"O or unsigned hexadecimal
-.\"O .RB ( x
-.\"O and
-.\"O .BR X )
-.\"O notation.
-.I "unsigned int"
-°ú¤­¿ô¤ò¡¢
-Éä¹æ¤Ê¤·8¿Ê¿ô
-.RB ( o ),
-Éä¹æ¤Ê¤·10¿Ê¿ô
-.RB ( u ),
-Éä¹æ¤Ê¤·16¿Ê¿ô
-.RB ( x
-¤È
-.BR X )
-¤ËÊÑ´¹¤¹¤ë¡£
-.\"O The letters
-.\"O .B abcdef
-.\"O are used for
-.\"O .B x
-.\"O conversions; the letters
-.\"O .B ABCDEF
-.\"O are used for
-.\"O .B X
-.\"O conversions.
-.B x
-ÊÑ´¹¤Ç¤Ï
-.B abcdef
-¤¬»ÈÍѤµ¤ì¡¢
-.B X
-ÊÑ´¹¤Ç¤Ï
-.B ABCDEF
-¤¬»ÈÍѤµ¤ì¤ë¡£
-.\"O The precision, if any, gives the minimum number of digits
-.\"O that must appear; if the converted value requires fewer digits, it is
-.\"O padded on the left with zeros.
-ÀºÅÙ»ØÄ꤬¤¢¤ì¤Ð¡¢ÀºÅ٤ǻØÄꤷ¤¿·å¿ô¤Ïɬ¤º½ÐÎϤµ¤ì¤ë¡£ÊÑ´¹¸å¤ÎÃͤ¬
-»ØÄꤵ¤ì¤¿·å¿ô¤Ë­¤ê¤Ê¤¤¾ì¹ç¤Ï¡¢º¸Â¦¤¬ 0 ¤ÇËä¤á¤é¤ì¤ë¡£
-.TP
-.BR e ", " E
-.\"O The
-.\"O .I double
-.\"O argument is rounded and converted in the style
-.\"O .if \w'\*(Pm'=0 .ds Pm \(+-
-.\"O .RB [\-]d \&. ddd e \\*(Pmdd
-.\"O where there is one digit before the decimal-point character and the number
-.\"O of digits after it is equal to the precision; if the precision is missing,
-.\"O it is taken as 6; if the precision is zero, no decimal-point character
-.\"O appears.
-.\"O An
-.I double
-°ú¤­¿ô¤ò´Ý¤á¤Æ
-.if \w'\*(Pm'=0 .ds Pm \(+-
-.RB [\-]d \&. ddd e \\*(Pmdd
-¤Î·Á¤ËÊÑ´¹¤¹¤ë¡£
-¾®¿ôÅÀ¤ÎÁ°¤Ë¤Ï°ì·å¤Î¿ô»ú¤¬¤¢¤ê¡¢¾®¿ôÅÀ°Ê²¼¤Î·å¿ô¤ÏÀºÅ٤ǻØÄꤵ¤ì¤¿
-·å¿ô¤Ë¤Ê¤ë¡£ÀºÅ٤ϻØÄꤵ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç 6 ¤È¤ß¤Ê¤µ¤ì¤ë¡£
-ÀºÅÙ¤¬ 0 ¤Î¾ì¹ç¤Ë¤Ï¡¢¾®¿ôÅÀ°Ê²¼¤Ïɽ¼¨¤µ¤ì¤Ê¤¤¡£
-.\"O .B E
-.\"O conversion uses the letter
-.\"O .B E
-.\"O (rather than
-.\"O .BR e )
-.\"O to introduce the exponent.
-.B E
-ÊÑ´¹¤Ç¤Ï¡¢»Ø¿ô¤òɽ¸½¤¹¤ë¤È¤­¤Ë
-.RB ( e
-¤Ç¤Ï¤Ê¤¯)
-.B E
-¤¬»È¤ï¤ì¤ë¡£
-.\"O The exponent always contains at least two
-.\"O digits; if the value is zero, the exponent is 00.
-»Ø¿ôÉôʬ¤Ï¾¯¤Ê¤¯¤È¤â 2·åɽ¼¨¤µ¤ì¤ë¡£
-¤Ä¤Þ¤ê¡¢»Ø¿ô¤ÎÃͤ¬ 0 ¤Î¾ì¹ç¤Ë¤Ï¡¢00 ¤Èɽ¼¨¤µ¤ì¤ë¡£
-.TP
-.BR f ", " F
-.\"O The
-.\"O .I double
-.\"O argument is rounded and converted to decimal notation in the style
-.\"O .RB [\-]ddd \&. ddd,
-.\"O where the number of digits after the decimal-point character is equal to
-.\"O the precision specification.
-.I double
-°ú¤­¿ô¤ò´Ý¤á¤Æ
-.RB [\-]ddd \&. ddd
-¤Î·Á¤Î10¿Êɽ¸½¤ËÊÑ´¹¤¹¤ë¡£
-¾®¿ôÅÀ¤Î¸å¤Î·å¿ô¤Ï¡¢ÀºÅ٤ǻØÄꤵ¤ì¤¿ÃͤȤʤ롣
-.\"O If the precision is missing, it is taken as
-.\"O 6; if the precision is explicitly zero, no decimal-point character appears.
-ÀºÅÙ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï 6 ¤È¤·¤Æ°·¤ï¤ì¤ë¡£
-ÀºÅ٤Ȥ·¤ÆÌÀ¼¨Åª¤Ë 0 ¤¬»ØÄꤵ¤ì¤¿¤È¤­¤Ë¤Ï¡¢¾®¿ôÅÀ°Ê²¼¤Ïɽ¼¨¤µ¤ì¤Ê¤¤¡£
-.\"O If a decimal point appears, at least one digit appears before it.
-¾®¿ôÅÀ¤òɽ¼¨¤¹¤ëºÝ¤Ë¤Ï¡¢¾®¿ôÅÀ¤ÎÁ°¤Ë¾¯¤Ê¤¯¤È¤â°ì·å¤Ï¿ô»ú¤¬É½¼¨¤µ¤ì¤ë¡£
+SUSv2 で長さ修飾子として使用できるのは、 \fBh\fP (\fBhd\fP, \fBhi\fP, \fBho\fP, \fBhx\fP, \fBhX\fP, \fBhn\fP),
+\fBl\fP (\fBld\fP, \fBli\fP, \fBlo\fP, \fBlx\fP, \fBlX\fP, \fBln\fP, \fBlc\fP, \fBls\fP), \fBL\fP (\fBLe\fP,
+\fBLE\fP, \fBLf\fP, \fBLg\fP, \fBLG\fP)  だけである。
+.SS 変換指定子
+適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。
+.TP 
+\fBd\fP, \fBi\fP
+\fIint\fP 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定した桁数は必ず出力される。変換後の値が
+指定された桁数に足りない場合は、左側が 0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示的に精度として 0
+が指定されていると、 出力は空文字列となる。
+.TP 
+\fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP
+\fIunsigned int\fP 引き数を、 符号なし8進数 (\fBo\fP), 符号なし10進数 (\fBu\fP), 符号なし16進数 (\fBx\fP と
+\fBX\fP)  に変換する。 \fBx\fP 変換では \fBabcdef\fP が使用され、 \fBX\fP 変換では \fBABCDEF\fP が使用される。
+精度指定があれば、精度で指定した桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋められる。
+.TP 
+\fBe\fP, \fBE\fP
+\fIdouble\fP 引き数を丸めて
+.if  \w'\*(Pm'=0 .ds Pm \(+-
+[\-]d\fB\&.\fPddd\fBe\fP\*(Pmdd の形に変換する。 小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された
+桁数になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、小数点以下は表示されない。 \fBE\fP 変換では、指数を表現するときに
+(\fBe\fP ではなく)  \fBE\fP が使われる。 指数部分は少なくとも 2桁表示される。 つまり、指数の値が 0 の場合には、00 と表示される。
+.TP 
+\fBf\fP, \fBF\fP
+\fIdouble\fP 引き数を丸めて [\-]ddd\fB\&.\fPddd の形の10進表現に変換する。 小数点の後の桁数は、精度で指定された値となる。
+精度が指定されていない場合には 6 として扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示されない。
+小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。
 
-.\"O (The SUSv2 does not know about
-.\"O .B F
-.\"O and says that character string representations for infinity and NaN
-.\"O may be made available.
-.\"O The C99 standard specifies "[\-]inf" or "[\-]infinity"
-.\"O for infinity, and a string starting with "nan" for NaN, in the case of
-.\"O .B f
-.\"O conversion, and "[\-]INF" or "[\-]INFINITY" or "NAN*" in the case of
-.\"O .B F
-.\"O conversion.)
-(SUSv2 ¤Ç¤Ï¡¢
-.B F
-¤Ïµ¬Äꤵ¤ì¤Æ¤ª¤é¤º¡¢Ìµ¸Â¤ä NaN ¤Ë´Ø¤¹¤ëʸ»úÎóɽ¸½¤ò
-¹Ô¤Ã¤Æ¤â¤è¤¤¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
- C99 É¸½à¤Ç¤Ï¡¢
-.B f
-ÊÑ´¹¤Ç¤Ï¡¢Ìµ¸Â¤Ï "[\-]inf" ¤« "[\-]infinity" ¤Èɽ¼¨¤·¡¢
-NaN ¤Ïʸ»úÎó¤ÎÀèƬ¤Ë `nan' ¤ò¤Ä¤±¤Æɽ¼¨¤¹¤ë¤è¤¦¤Ëµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
-.B F
-ÊÑ´¹¤Î¾ì¹ç¤Ï "[\-]INF", "[\-]INFINITY", "NAN*" ¤Èɽ¼¨¤µ¤ì¤ë¡£)
-.TP
-.BR g ", " G
-.\"O The
-.\"O .I double
-.\"O argument is converted in style
-.\"O .B f
-.\"O or
-.\"O .B e
-.\"O (or
-.\"O .B F
-.\"O or
-.\"O .B E
-.\"O for
-.\"O .B G
-.\"O conversions).
-.I double
-°ú¤­¿ô¤ò
-.B f
-¤«
-.B e
-.RB ( G
-ÊÑ´¹¤Î¾ì¹ç¤Ï
-.B F
-¤«
-.BR E )
-¤Î·Á¼°¤ËÊÑ´¹¤¹¤ë¡£
-.\"O The precision specifies the number of significant digits.
-ÀºÅÙ¤Ïɽ¼¨¤¹¤ë·å¿ô¤ò»ØÄꤹ¤ë¡£
-.\"O If the precision is missing, 6 digits are given; if the precision is zero,
-.\"O it is treated as 1.
-ÀºÅÙ¤¬»ØÄꤵ¤ì¤Ê¤¤¾ì¹ç¤Ï¡¢6·å¤È¤ß¤Ê¤µ¤ì¤ë¡£
-ÀºÅÙ¤¬ 0 ¤Î¾ì¹ç¤Ï¡¢1·å¤È¤ß¤Ê¤µ¤ì¤ë¡£
-.\"O Style
-.\"O .B e
-.\"O is used if the exponent from its conversion is less than \-4 or greater
-.\"O than or equal to the precision.
-ÊÑ´¹¤µ¤ì¤ëÃͤλؿô¤¬¡¢ \-4 ¤è¤ê¾®¤µ¤¤¤«¡¢ÀºÅٰʾå¤Î¾ì¹ç¤Ë¡¢
-.B e
-·Á¼°¤¬»ÈÍѤµ¤ì¤ë¡£
-.\"O Trailing zeros are removed from the
-.\"O fractional part of the result; a decimal point appears only if it is
-.\"O followed by at least one digit.
-ÊÑ´¹¤µ¤ì¤¿·ë²Ì¤Î¾®¿ôÉôʬ¤ÎËöÈø¤Î 0 ¤Ïºï½ü¤µ¤ì¤ë¡£¾®¿ôÅÀ¤¬É½¼¨¤µ¤ì¤ë¤Î¤Ï¡¢
-¾®¿ôÅÀ°Ê²¼¤Ë¿ô»ú¤¬¾¯¤Ê¤¯¤È¤â°ì¤Ä¤¢¤ë¾ì¹ç¤Ë¤À¤±¤Ç¤¢¤ë¡£
-.TP
-.BR a ", " A
-.\"O (C99; not in SUSv2) For
-.\"O .B a
-.\"O conversion, the
-.\"O .I double
-.\"O argument is converted to hexadecimal notation (using the letters abcdef)
-.\"O in the style
-.\"O .RB [\-] 0x h \&. hhhh p \\*(Pmd;
-.\"O for
-.\"O .B A
-.\"O conversion the prefix
-.\"O .BR 0X ,
-.\"O the letters ABCDEF, and the exponent separator
-.\"O .B P
-.\"O is used.
-(C99 ¤Ë¤Ï¤¢¤ë¤¬ SUSv2 ¤Ë¤Ï¤Ê¤¤)
-.B a
-ÊÑ´¹¤Ç¤Ï¡¢
-.I double
-°ú¤­¿ô¤ò (abcdef ¤Îʸ»ú¤ò»È¤Ã¤Æ)
-.RB [\-] 0x h \&. hhhh p \\*(Pmd;
-·Á¼°¤Î 16 ¿Êɽµ­¤ËÊÑ´¹¤¹¤ë¡£
-.B A
-ÊÑ´¹¤Ç¤Ï¡¢Á°ÃÖʸ»úÎó
-.BR 0X ,
-ʸ»ú ABCDEF, »Ø¿ôʸ»ú
-.B P
-¤òÍѤ¤¤ë¡£
-.\"O There is one hexadecimal digit before the decimal point,
-.\"O and the number of digits after it is equal to the precision.
-¾®¿ôÅÀ¤ÎÁ°¤Ë¤Ï 1·å¤Î16¿Ê¿ô¤¬ÃÖ¤«¤ì¡¢¾®¿ôÅÀ¤Î¸å¤í¤Î·å¿ô¤Ï
-ÀºÅ٤ǻØÄꤵ¤ì¤¿ÃͤȤʤ롣
-.\"O The default precision suffices for an exact representation of the value
-.\"O if an exact representation in base 2 exists
-.\"O and otherwise is sufficiently large to distinguish values of type
-.\"O .IR double .
-¥Ç¥Õ¥©¥ë¥È¤ÎÀºÅ٤ϡ¢¤½¤ÎÃͤ¬ 2¿Ê¿ô¤ÇÀµ³Î¤Ëɽ¸½¤Ç¤­¤ë¾ì¹ç¤Ë¤Ï¡¢
-¤½¤ÎÃͤòÀµ³Î¤Ëɽ¸½¤Ç¤­¤ë·å¿ô¤È¤Ê¤ë¡£¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¡¢
-.I double
-·¿¤ÎÃͤò¶èÊ̤¹¤ë¤Î¤Ë½½Ê¬¤ÊÂ礭¤µ¤È¤Ê¤ë¡£
-.\"O The digit before the decimal point is unspecified for nonnormalized
-.\"O numbers, and nonzero but otherwise unspecified for normalized numbers.
-.\" motoki 2005/03/19: ¹ç¤Ã¤Æ¤¤¤ë¤«¤Ê¡©
-¾®¿ôÅÀ¤ÎÁ°¤Î¿ô»ú¤Ï¡¢Àµµ¬²½¤µ¤ì¤Æ¤¤¤Ê¤¤¿ô¤Î¾ì¹ç¤Ï¤¤¤¯¤Ä¤Ë¤Ê¤ë¤«Ê¬¤«¤é¤Ê¤¤¡£
-Àµµ¬²½¤µ¤ì¤¿¿ô¤Î¾ì¹ç¤Ï¡¢ 0 °Ê³°¤ÎÃͤˤʤ뤬¡¢¤¤¤¯¤Ä¤Ë¤Ê¤ë¤«¤Ïʬ¤«¤é¤Ê¤¤¡£
-.TP
-.B c
-.\"O If no
-.\"O .B l
-.\"O modifier is present, the
-.\"O .I int
-.\"O argument is converted to an
-.\"O .IR "unsigned char" ,
-.\"O and the resulting character is written.
-.B l
-½¤¾þ»Ò¤¬¤Ê¤±¤ì¤Ð¡¢
-.I int
-°ú¤­¿ô¤ò
-.IR "unsigned char"
-¤ËÊÑ´¹¤·¤Æ¡¢¤½¤Î·ë²Ì¤ËÂбþ¤¹¤ëʸ»ú¤ò½ÐÎϤ¹¤ë¡£
-.\"O If an
-.\"O .B l
-.\"O modifier is present, the
-.\"O .I wint_t
-.\"O (wide character) argument is converted to a multibyte sequence by a call
-.\"O to the
-.\"O .BR wcrtomb (3)
-.\"O function, with a conversion state starting in the initial state, and the
-.\"O resulting multibyte string is written.
-.B l
-½¤¾þ»Ò¤¬¤¢¤ì¤Ð¡¢
-.I wint_t
-(¥ï¥¤¥Éʸ»ú) °ú¤­¿ô¤ò¡¢
-.BR wcrtomb (3)
-´Ø¿ô¤ò½é´ü¥·¥Õ¥È¾õÂ֤ǸƤӽФ·¤Æ¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»úÎó¤ËÊÑ´¹¤·¡¢
-ÊÑ´¹¤µ¤ì¤¿¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»úÎó¤ò½ÐÎϤ¹¤ë¡£
-.TP
-.B s
-.\"O If no
-.\"O .B l
-.\"O modifier is present: The
-.\"O .I "const char *"
-.\"O argument is expected to be a pointer to an array of character type (pointer
-.\"O to a string).
-.\"O Characters from the array are written up to (but not
-.\"O including) a terminating null byte (\(aq\\0\(aq);
-.\"O if a precision is specified, no more than the number specified
-.\"O are written.
-.\"O If a precision is given, no null byte need be present;
-.\"O if the precision is not specified, or is greater than the size of the
-.\"O array, the array must contain a terminating null byte.
-.B l
-½¤¾þ»Ò¤¬¤Ê¤¤¾ì¹ç¡¢
-°ú¤­¿ô¤Ï
-.I "const char *"
-·¿¤Çʸ»ú·¿¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿ (ʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿) ¤Ç¤¢¤ë¤³¤È¤¬
-´üÂÔ¤µ¤ì¤Æ¤¤¤ë¡£ÇÛÎóÃæ¤Îʸ»ú¤Ï¡¢½ªÃ¼¤Î NULL ¥Ð¥¤¥È (\(aq\\0\(aq)
-¤¬½Ð¤Æ¤¯¤ë¤Þ¤Ç½ÐÎϤµ¤ì¤ë (½ªÃ¼Ê¸»ú¤Ï½ÐÎϤµ¤ì¤Ê¤¤)¡£
-ÀºÅÙ¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤È¡¢»ØÄꤵ¤ì¤¿»ú¿ô°Ê¾å¤Ï½ÐÎϤµ¤ì¤Ê¤¤¡£
-ÀºÅÙ¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢½ªÃ¼¥Ð¥¤¥È¤¬Â¸ºß¤¹¤ëɬÍפϤʤ¤¡£
-ÀºÅÙ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¤ê¡¢ÀºÅÙ¤ÎÃͤ¬ÇÛÎó¤ÎÂ礭¤µ¤è¤êÂ礭¤¤¾ì¹ç¤Ë¤Ï¡¢
-ÇÛÎó¤Ï½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤ò´Þ¤ó¤Ç¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+(SUSv2 では、\fBF\fP は規定されておらず、無限や NaN に関する文字列表現を
+行ってもよいことになっている。
+ C99 標準では、\fBf\fP 変換では、無限は "[\-]inf" か "[\-]infinity" と表示し、
+NaN は文字列の先頭に `nan' をつけて表示するように規定されている。
+\fBF\fP 変換の場合は "[\-]INF", "[\-]INFINITY", "NAN*" と表示される。)
+.TP 
+\fBg\fP, \fBG\fP
+\fIdouble\fP 引き数を \fBf\fP か \fBe\fP (\fBG\fP 変換の場合は \fBF\fP か \fBE\fP)  の形式に変換する。
+精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなされる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 \-4
+より小さいか、精度以上の場合に、 \fBe\fP 形式が使用される。 変換された結果の小数部分の末尾の 0 は削除される。小数点が表示されるのは、
+小数点以下に数字が少なくとも一つある場合にだけである。
+.TP 
+\fBa\fP, \fBA\fP
+(C99 にはあるが SUSv2 にはない)  \fBa\fP 変換では、 \fIdouble\fP 引き数を (abcdef の文字を使って)
+[\-]\fB0x\fPh\fB\&.\fPhhhh\fBp\fP\*(Pmd; 形式の 16 進表記に変換する。 \fBA\fP 変換では、前置文字列 \fB0X\fP, 文字
+ABCDEF, 指数文字 \fBP\fP を用いる。 小数点の前には 1桁の16進数が置かれ、小数点の後ろの桁数は 精度で指定された値となる。
+デフォルトの精度は、その値が 2進数で正確に表現できる場合には、 その値を正確に表現できる桁数となる。それ以外の場合は、 \fIdouble\fP
+型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、正規化されていない数の場合はいくつになるか分からない。 正規化された数の場合は、 0
+以外の値になるが、いくつになるかは分からない。
+.TP 
+\fBc\fP
+\fBl\fP 修飾子がなければ、 \fIint\fP 引き数を \fIunsigned char\fP に変換して、その結果に対応する文字を出力する。 \fBl\fP
+修飾子があれば、 \fIwint_t\fP (ワイド文字) 引き数を、 \fBwcrtomb\fP(3)
+関数を初期シフト状態で呼び出してマルチバイト文字列に変換し、 変換されたマルチバイト文字列を出力する。
+.TP 
+\fBs\fP
+\fBl\fP 修飾子がない場合、 引き数は \fIconst char *\fP 型で文字型の配列へのポインタ (文字列へのポインタ) であることが
+期待されている。配列中の文字は、終端の NULL バイト (\(aq\e0\(aq)  が出てくるまで出力される (終端文字は出力されない)。
+精度が指定されていると、指定された字数以上は出力されない。 精度が指定された場合には、終端バイトが存在する必要はない。
+精度が指定されていなかったり、精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでいなければならない。
 
-.\"O If an
-.\"O .B l
-.\"O modifier is present: The
-.\"O .I "const wchar_t *"
-.\"O argument is expected to be a pointer to an array of wide characters.
-.B l
-½¤¾þ»Ò¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
-°ú¤­¿ô¤Ï
-.I "const wchar_t *"
-·¿¤Ç¥ï¥¤¥Éʸ»ú¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¤³¤È¤¬´üÂÔ¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O Wide characters from the array are converted to multibyte characters
-.\"O (each by a call to the
-.\"O .BR wcrtomb (3)
-.\"O function, with a conversion state starting in the initial state before
-.\"O the first wide character), up to and including a terminating null
-.\"O wide character.
-.\"O The resulting multibyte characters are written up to
-.\"O (but not including) the terminating null byte.
-.\"O If a precision is
-.\"O specified, no more bytes than the number specified are written, but
-.\"O no partial multibyte characters are written.
-.\"O Note that the precision
-.\"O determines the number of
-.\"O .I bytes
-.\"O written, not the number of
-.\"O .I wide characters
-.\"O or
-.\"O .IR "screen positions" .
-ÇÛÎóÃæ¤Î¥ï¥¤¥Éʸ»ú¤Ï (1ʸ»úËè¤Ë
-.BR wcrtomb (3)
-¤ò¸Æ¤Ó½Ð¤·¤Æ) ¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»ú¤ËÊÑ´¹¤µ¤ì¤ë
-(ºÇ½é¤Î¥ï¥¤¥Éʸ»ú¤ÎÊÑ´¹¤ÎÁ°¤Ë
-.BR wcrtomb ()
-¤Î¥·¥Õ¥È¾õÂÖ¤ò½é´ü¾õÂÖ¤ËÌᤷ¤Æ¤«¤éÊÑ´¹¤Ï¹Ô¤ï¤ì¤ë)¡£
-¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»ú¤Ø¤ÎÊÑ´¹¤Ï¡¢Ê¸»úÎó¤ò½ªÃ¼¤¹¤ë NULL ¥ï¥¤¥Éʸ»ú¤¬
-½Ð¤Æ¤¯¤ë¤Þ¤Ç¹Ô¤ï¤ì¡¢½ªÃ¼ NULL ¥ï¥¤¥Éʸ»ú¤â´Þ¤á¤ÆÊÑ´¹¤µ¤ì¤ë¡£
-·ë²Ì¤Î¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»úÎó¤Ï¡¢½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤¬½Ð¤Æ¤¯¤ë¤Þ¤Ç
-½ÐÎϤµ¤ì¤ë (½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤Ï½ÐÎϤµ¤ì¤Ê¤¤)¡£
-ÀºÅÙ¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢»ØÄꤵ¤ì¤¿¥Ð¥¤¥È¿ô°Ê¾å¤Ë¤Ï½ÐÎϤµ¤ì¤Ê¤¤¡£
-⤷¡¢¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»ú¤Î°ìÉôʬ¤À¤±¤¬½ÐÎϤµ¤ì¤ë¤³¤È¤Ï¤Ê¤¤¡£
-ÀºÅ٤ϡ֥Х¤¥È¡×¿ô¤ò»ØÄꤹ¤ë¤â¤Î¤Ç¤¢¤ê¡¢¡Ö¥ï¥¤¥Éʸ»ú¡×¿ô¤ä
-¡Ö²èÌ̤ǤΰÌÃ֡פò»ØÄꤹ¤ë¤â¤Î¤Ç¤Ï¤Ê¤¤¤³¤È¤ËÃí°Õ¡£
-.\"O The array must contain a terminating null wide character, unless a
-.\"O precision is given and it is so small that the number of bytes written
-.\"O exceeds it before the end of the array is reached.
-ÀºÅÙ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Æ¡¢¤µ¤é¤Ë½ÐÎϤ¬ÇÛÎó¤ÎËöÈø¤Ë㤹¤ëÁ°¤Ë½ÐÎϥХ¤¥È¿ô¤¬
-ÀºÅÙ¤ÎÃͤòĶ¤¨¤ë¾ì¹ç¤À¤±¤Ï¡¢ÇÛÎó¤Ï NULL ¥ï¥¤¥Éʸ»ú¤Ç½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¯¤Æ¤â¤è¤¤¡£
-¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¡¢É¬¤ºÇÛÎó¤Ï NULL ¥ï¥¤¥Éʸ»ú¤Ç½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.TP
-.B C
-.\"O (Not in C99, but in SUSv2.)
-.\"O Synonym for
-.\"O .BR lc .
-.\"O Don't use.
-(C99 ¤Ë¤Ï¤Ê¤¤¤¬ SUSv2 ¤Ë¤Ï¤¢¤ë)
-.B lc
-¤ÈƱ¤¸¡£»È¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
-.TP
-.B S
-.\"O (Not in C99, but in SUSv2.)
-.\"O Synonym for
-.\"O .BR ls .
-.\"O Don't use.
-(C99 ¤Ë¤Ï¤Ê¤¤¤¬ SUSv2 ¤Ë¤Ï¤¢¤ë)
-.B ls
-¤ÈƱ¤¸¡£»È¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
-.TP
-.B p
-.\"O The
-.\"O .I "void *"
-.\"O pointer argument is printed in hexadecimal (as if by
-.\"O .B %#x
-.\"O or
-.\"O .BR  %#lx ).
-.I "void *"
-¥Ý¥¤¥ó¥¿°ú¤­¿ô¤ò
-.RB ( %#x
-¤ä
-.BR  %#lx
-¤Î¤è¤¦¤Ê) 16 ¿Ê¿ô¤Ç½ÐÎϤ¹¤ë¡£
-.TP
-.B n
-.\"O The number of characters written so far is stored into the integer
-.\"O indicated by the
-.\"O .I "int *"
-.\"O (or variant) pointer argument.
-.\"O No argument is converted.
-¤³¤ì¤Þ¤Ç¤Ë½ÐÎϤµ¤ì¤¿Ê¸»ú¿ô¤ò
-.I "int *"
-(¤Þ¤¿¤ÏÎà»÷¤Î·¿) ¤Î¥Ý¥¤¥ó¥¿°ú¤­¿ô¤¬»Ø¤¹À°¿ô¤ËÊݸ¤¹¤ë¡£
-°ú¤­¿ô¤ÎÊÑ´¹¤Ï¹Ô¤ï¤ì¤Ê¤¤¡£
-.TP
-.B m
-.\"O (Glibc extension.)
-.\"O Print output of
-.\"O .IR strerror(errno) .
-.\"O No argument is required.
-(glibc ¤Ç¤Î³ÈÄ¥)
-.I strerror(errno)
-¤Î½ÐÎϤòɽ¼¨¤¹¤ë¡£°ú¤­¿ô¤ÏɬÍפʤ¤¡£
-.TP
-.B %
-.\"O A \(aq%\(aq is written.
-.\"O No argument is converted.
-.\"O The complete conversion
-.\"O specification is \(aq%%\(aq.
-\(aq%\(aq Ê¸»ú¤ò½ÐÎϤ¹¤ë¡£ÊÑ´¹¤µ¤ì¤ë°ú¤­¿ô¤Ï̵¤¤¡£
-ÊÑ´¹»ØÄêÁ´ÂΤò½ñ¤¯¤È "%%" ¤È¤Ê¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O The
-.\"O .BR fprintf (),
-.\"O .BR printf (),
-.\"O .BR sprintf (),
-.\"O .BR vprintf (),
-.\"O .BR vfprintf (),
-.\"O and
-.\"O .BR vsprintf ()
-.\"O functions conform to C89 and C99.
-.BR fprintf (),
-.BR printf (),
-.BR sprintf (),
-.BR vprintf (),
-.BR vfprintf (),
-.BR vsprintf ()
-´Ø¿ô¤Ï¡¢C89 ¤È C99 ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
-.\"O The
-.\"O .BR snprintf ()
-.\"O and
-.\"O .BR vsnprintf ()
-.\"O functions conform to C99.
-.BR snprintf ()
-¤È
-.BR vsnprintf ()
-¤Ï C99 ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
+\fBl\fP 修飾子が指定されている場合、 引き数は \fIconst wchar_t *\fP 型でワイド文字の配列へのポインタであることが期待されている。
+配列中のワイド文字は (1文字毎に \fBwcrtomb\fP(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド文字の変換の前に
+\fBwcrtomb\fP()  のシフト状態を初期状態に戻してから変換は行われる)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が
+出てくるまで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列は、終端の NULL バイトが出てくるまで 出力される
+(終端の NULL バイトは出力されない)。 精度が指定された場合、指定されたバイト数以上には出力されない。
+但し、マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定するものであり、「ワイド文字」数や
+「画面での位置」を指定するものではないことに注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数が
+精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよい。 それ以外の場合は、必ず配列は NULL
+ワイド文字で終端されていなければならない。
+.TP 
+\fBC\fP
+(C99 にはないが SUSv2 にはある)  \fBlc\fP と同じ。使ってはならない。
+.TP 
+\fBS\fP
+(C99 にはないが SUSv2 にはある)  \fBls\fP と同じ。使ってはならない。
+.TP 
+\fBp\fP
+\fIvoid *\fP ポインタ引き数を (\fB%#x\fP や \fB%#lx\fP のような) 16 進数で出力する。
+.TP 
+\fBn\fP
+これまでに出力された文字数を \fIint *\fP (または類似の型) のポインタ引き数が指す整数に保存する。 引き数の変換は行われない。
+.TP 
+\fBm\fP
+(glibc での拡張)  \fIstrerror(errno)\fP の出力を表示する。引き数は必要ない。
+.TP 
+\fB%\fP
+\(aq%\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと "%%" となる。
+.SH 準拠
+\fBfprintf\fP(), \fBprintf\fP(), \fBsprintf\fP(), \fBvprintf\fP(), \fBvfprintf\fP(),
+\fBvsprintf\fP()  関数は、C89 と C99 に準拠している。 \fBsnprintf\fP()  と \fBvsnprintf\fP()  は C99
+に準拠している。
 .PP
-.\"O Concerning the return value of
-.\"O .BR snprintf (),
-.\"O SUSv2 and C99 standard contradict each other: when
-.\"O .BR snprintf ()
-.\"O is called with
-.\"O .IR size =0
-.\"O then SUSv2 stipulates an unspecified return value less than 1,
-.\"O while C99 allows
-.\"O .I str
-.\"O to be NULL in this case, and gives the return value (as always)
-.\"O as the number of characters that would have been written in case
-.\"O the output string has been large enough.
-.BR snprintf ()
-¤ÎÊÖ¤êÃͤò¸«¤ë¤È¡¢
-SUSv2 ¤È C99 É¸½à¤Ï¸ß¤¤¤ËÌ·½â¤·¤Æ¤¤¤ë¡£
-SUSv2 ¤Ç¤Ï¡¢
-.BR snprintf ()
-¤¬
-.IR size =0
-¤Ç¸Æ¤Ó½Ð¤µ¤ì¤¿¾ì¹ç¡¢ 1 Ì¤Ëþ¤ÎÃͤò²¿¤«ÊÖ¤êÃͤȤ¹¤ë¤è¤¦¤Ëµ¬Äꤷ¤Æ¤¤¤ë¡£
-°ìÊý C99 ¤Ç¤Ï¡¢¤³¤Î¤è¤¦¤Ê¾ì¹ç
-.I str
-¤ò NULL ¤È¤·¡¢ÊÖ¤êÃͤȤ·¤Æ (Ä̾ïÄ̤ê) ½ÐÎϥХåե¡¤¬½½Ê¬¤ÊÂ礭¤µ¤¬
-¤¢¤Ã¤¿¾ì¹ç¤Ë½ÐÎϤµ¤ì¤ë¤Ç¤¢¤í¤¦Ê¸»ú¿ô¤òÊÖ¤¹¡£
+\fBsnprintf\fP()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 SUSv2 では、 \fBsnprintf\fP()
+が \fIsize\fP=0 で呼び出された場合、 1 未満の値を何か返り値とするように規定している。 一方 C99 では、このような場合 \fIstr\fP を
+NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に出力されるであろう文字数を返す。
 .PP
-.\"O Linux libc4 knows about the five C standard flags.
-.\"O It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
-.\"O and the conversions
-.\"O \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP,
-.\"O \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP,
-.\"O \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP,
-.\"O where \fBF\fP is a synonym for \fBf\fP.
-Linux libc4 ¤Ç¤Ï¡¢ 5 ¤Ä¤Î C É¸½à¤Î¥Õ¥é¥°¡¢
-Ťµ½¤¾þ»Ò \fBh\fP, \fBl\fP, \fBL\fP¡¢ÊÑ´¹
-\fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP,
-\fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP,
-\fBs\fP, \fBu\fP, \fBx\fP, \fBX\fP
-¤¬»È¤¨¤ë¡£
-⤷ \fBF\fP ¤Ï \fBf\fP ¤ÈƱµÁ¤Ç¤¢¤ë¡£
-.\"O Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms
-.\"O for \fBld\fP, \fBlo\fP, and \fBlu\fP.
-.\"O (This is bad, and caused serious bugs later, when
-.\"O support for \fB%D\fP disappeared.)
-.\"O No locale-dependent radix character,
-.\"O no thousands' separator, no NaN or infinity, no "%m$" and "*m$".
-¤Þ¤¿¡¢ \fBD\fP, \fBO\fP, and \fBU\fP ¤ò \fBld\fP, \fBlo\fP, and \fBlu\fP
-¤ÈƱ¤¸¤â¤Î¤È¤·¤Æ»È¤¨¤ë
-(¤³¤ì¤Ï¤Þ¤º¤¤»ÅÍͤǡ¢ ¸å¤Ë \fB%D\fP ¤ÎÂбþ¤¬ÂǤÁÀÚ¤é¤ì¤¿»þ¤Ë¿¼¹ï¤Ê¥Ð¥°¤ò
-°ú¤­µ¯¤³¤·¤¿)¡£¥í¥±¡¼¥ë°Í¸¤Î¾®¿ôÅÀ¡¢1000 ¶èÀڤꡢ NaN ¤È̵¸Â¡¢
-"%m$" ¤È "*m$" ¤Ï»È¤¨¤Ê¤¤¡£
+Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 \fBh\fP, \fBl\fP, \fBL\fP、変換 \fBc\fP, \fBd\fP, \fBe\fP,
+\fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, \fBs\fP, \fBu\fP, \fBx\fP, \fBX\fP
+が使える。 但し \fBF\fP は \fBf\fP と同義である。 また、 \fBD\fP, \fBO\fP, and \fBU\fP を \fBld\fP, \fBlo\fP, and
+\fBlu\fP と同じものとして使える (これはまずい仕様で、 後に \fB%D\fP の対応が打ち切られた時に深刻なバグを
+引き起こした)。ロケール依存の小数点、1000 区切り、 NaN と無限、 "%m$" と "*m$" は使えない。
 .PP
-.\"O Linux libc5 knows about the five C standard flags and the \(aq flag,
-.\"O locale, "%m$" and "*m$".
-.\"O It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
-.\"O \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP
-.\"O both for \fIlong double\fP and for \fIlong long int\fP (this is a bug).
-Linux libc5 ¤Ç¤Ï¡¢ 5 ¤Ä¤Î C É¸½à¤Î¥Õ¥é¥°¤È \(aq ¥Õ¥é¥°¡¢¥í¥±¡¼¥ë¡¢
-"%m$" ¤È "*m$" ¤¬»È¤¨¤ë¡£
-¤Þ¤¿¡¢Ä¹¤µ½¤¾þ»Ò \fBh\fP, \fBl\fP, \fBL\fP, \fBZ\fP, iand \fBq\fP ¤¬»È¤¨¤ë¤¬¡¢
-\fBL\fP ¤È \fBq\fP ¤ÏξÊý¤È¤â
-\fIlong double\fP ¤È \fIlong long int\fP ¤ËÂбþ¤·¤Æ¤¤¤ë (¤³¤ì¤Ï¥Ð¥°¤Ç¤¢¤ë)¡£
-.\"O It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP,
-.\"O but adds the conversion character
-.\"O .BR m ,
-.\"O which outputs
-.\"O .IR strerror(errno) .
-¸½ºß¤Ç¤ÏÊÑ´¹ \fBF\fP, \fBD\fP, \fBO\fP, \fBU\fP ¤Ïǧ¼±¤µ¤ì¤Ê¤¤¤¬¡¢ÊÑ´¹Ê¸»ú
-.B m
-¤¬Äɲ䵤줿¡£¤³¤ì¤Ï
-.I strerror(errno)
-¤ò½ÐÎϤ¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
+Linux libc5 では、 5 つの C 標準のフラグと \(aq フラグ、ロケール、 "%m$" と "*m$" が使える。 また、長さ修飾子
+\fBh\fP, \fBl\fP, \fBL\fP, \fBZ\fP, iand \fBq\fP が使えるが、 \fBL\fP と \fBq\fP は両方とも \fIlong double\fP と
+\fIlong long int\fP に対応している (これはバグである)。 現在では変換 \fBF\fP, \fBD\fP, \fBO\fP, \fBU\fP
+は認識されないが、変換文字 \fBm\fP が追加された。これは \fIstrerror(errno)\fP を出力するものである。
 .PP
-.\"O glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP.
-glibc 2.0 ¤Ç¤Ï¡¢ÊÑ´¹Ê¸»ú \fBC\fP ¤È \fBS\fP ¤¬Äɲ䵤줿¡£
+glibc 2.0 では、変換文字 \fBC\fP と \fBS\fP が追加された。
 .PP
-.\"O glibc 2.1 adds length modifiers \fBhh\fP, \fBj\fP, \fBt\fP, and \fBz\fP
-.\"O and conversion characters \fBa\fP and \fBA\fP.
-glibc 2.1 ¤Ç¤Ï¡¢Ä¹¤µ½¤¾þ»Ò \fBhh\fP, \fBj\fP, \fBt\fP, \fBz\fP
-¤ÈÊÑ´¹Ê¸»ú \fBa\fP, \fBA\fP ¤¬Äɲ䵤줿¡£
+glibc 2.1 では、長さ修飾子 \fBhh\fP, \fBj\fP, \fBt\fP, \fBz\fP と変換文字 \fBa\fP, \fBA\fP が追加された。
 .PP
-.\"O glibc 2.2 adds the conversion character \fBF\fP with C99 semantics,
-.\"O and the flag character \fBI\fP.
-glibc 2.2 ¤Ç¤Ï¡¢ C99 ¤Çµ¬Äꤵ¤ì¤¿°ÕÌ£¤Ç¤ÎÊÑ´¹Ê¸»ú \fBF\fP ¤È
-¥Õ¥é¥°Ê¸»ú \fBI\fP ¤¬Äɲ䵤줿¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O Some programs imprudently rely on code such as the following
-.\"O 
-.\"O     sprintf(buf, "%s some further text", buf);
-.\"O 
-.\"O to append text to
-.\"O .IR buf .
-¥Æ¥­¥¹¥È¤ò
-.I buf
-¤ËÄɲ乤ë¤Î¤Ë¡¢·ÚΨ¤Ë¤â¼¡¤Î¤è¤¦¤Ê¥³¡¼¥É¤ò»È¤Ã¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤¬¤¢¤ë¡£
+glibc 2.2 では、 C99 で規定された意味での変換文字 \fBF\fP と フラグ文字 \fBI\fP が追加された。
+.SH 注意
+テキストを \fIbuf\fP に追加するのに、軽率にも次のようなコードを使っているプログラムがある。
 
     sprintf(buf, "%s some further text", buf);
 
-.\"O However, the standards explicitly note that the results are undefined
-.\"O if source and destination buffers overlap when calling
-.\"O .BR sprintf (),
-.\"O .BR snprintf (),
-.\"O .BR vsprintf (),
-.\"O and
-.\"O .BR vsnprintf ().
-¤·¤«¤·¤Ê¤¬¤é¡¢É¸½àµ¬³Ê¤Ç¤Ï¡¢
-.BR sprintf (),
-.BR snprintf (),
-.BR vsprintf (),
-.BR vsnprintf ()
-¤Î¸Æ¤Ó½Ð¤·¤Ë¤ª¤¤¤Æ¡¢¥³¥Ô¡¼¸µ¤È¥³¥Ô¡¼Àè¤Î¥Ð¥Ã¥Õ¥¡¤¬½Å¤Ê¤Ã¤Æ¤¤¤¿¾ì¹ç¤Î
-·ë²Ì¤ÏÉÔÄê¤Ç¤¢¤ë¡¢¤ÈÌÀµ­¤µ¤ì¤Æ¤¤¤ë¡£
 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=7075
-.\"O Depending on the version of
-.\"O .BR gcc (1)
-.\"O used, and the compiler options employed, calls such as the above will
-.\"O .B not
-.\"O produce the expected results.
-»ÈÍѤ¹¤ë
-.BR gcc (1)
-¤Î¥Ð¡¼¥¸¥ç¥ó¤ä»ØÄꤷ¤¿¥³¥ó¥Ñ¥¤¥é¤Î¥ª¥×¥·¥ç¥ó¼¡Âè¤Ç¤Ï¡¢
-¾åµ­¤Î¤è¤¦¤Ê¸Æ¤Ó½Ð¤·¤Ç¡¢´üÂÔ¤·¤¿·ë²Ì¤¬ÆÀ¤é¤ì¡Ö¤Ê¤¤¡×¤³¤È¤¬¤¢¤ë¡£
+しかしながら、標準規格では、 \fBsprintf\fP(), \fBsnprintf\fP(), \fBvsprintf\fP(), \fBvsnprintf\fP()
+の呼び出しにおいて、コピー元とコピー先のバッファが重なっていた場合の 結果は不定である、と明記されている。 使用する \fBgcc\fP(1)
+のバージョンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した結果が得られ「ない」ことがある。
 
-.\"O The glibc implementation of the functions
-.\"O .BR snprintf ()
-.\"O and
-.\"O .BR vsnprintf ()
-.\"O conforms to the C99 standard, that is, behaves as described above,
-.\"O since glibc version 2.1.
-.\"O Until glibc 2.0.6 they would return \-1
-.\"O when the output was truncated.
-glibc ¤Î
-.BR snprintf ()
-¤È
-.BR vsnprintf ()
-¤Î¼ÂÁõ¤Ï¡¢¥Ð¡¼¥¸¥ç¥ó 2.1 °Ê¹ß¤Ï C99 É¸½à¤Ë½àµò¤·¤Æ¤ª¤ê¡¢
-¾åµ­¤ÎÄ̤ê¤ÎÆ°ºî¤ò¤¹¤ë¡£
-glibc 2.0.6 ¤Þ¤Ç¤Ï¡¢½ÐÎϤ¬ÀÚ¤êµÍ¤á¤é¤ì¤¿¾ì¹ç¤Ï \-1 ¤òÊÖ¤¹¡£
-.\"O .\" .SH HISTORY
-.\" .SH Îò»Ë
-.\"O .\" Unix V7 defines the three routines
-.\"O .\" .BR printf (),
-.\"O .\" .BR fprintf (),
-.\"O .\" .BR sprintf (),
-.\"O .\" and has the flag \-, the width or precision *, the length modifier l,
-.\"O .\" and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
-.\" Unix V7 ¤Ç¤Ï
+.\" .SH HISTORY
+.\" UNIX V7 defines the three routines
 .\" .BR printf (),
 .\" .BR fprintf (),
-.\" .BR sprintf ()
-.\" ¤Î 3 ¤Ä¤Î´Ø¿ô¤È¡¢¥Õ¥é¥° \-¡¢Éý¤ÈÀºÅ٤ǤΠ*¡¢Ä¹¤µ½¤¾þ»Ò l¡¢
-.\" ÊÑ´¹ doxfegcsu¡¢¤½¤·¤Æ ld,ld,lu,lx ¤ÎƱµÁ¸ì¤È¤·¤Æ D,O,U,X ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .\" This is still true for 2.9.1BSD, but 2.10BSD has the flags
-.\"O .\" #, + and <space> and no longer mentions D,O,U,X.
-.\" 2.9.1BSD ¤Ç¤â¤³¤ì¤ÏƱ¤¸¤À¤Ã¤¿¤¬¡¢ 2.10BSD ¤Ç¤Ï
-.\" ¥Õ¥é¥° #, +, ¶õÇò¤¬Äɲ䵤졢 D,O,U,X ¤Ë¤Ä¤¤¤Æ¤Ïµ­ºÜ¤µ¤ì¤Ê¤¯¤Ê¤Ã¤¿¡£
-.\"O .\" 2.11BSD has
-.\"O .\" .BR vprintf (),
-.\"O .\" .BR vfprintf (),
-.\"O .\" .BR vsprintf (),
-.\"O .\" and warns not to use D,O,U,X.
-.\" 2.11BSD ¤Ç¤Ï
+.\" .BR sprintf (),
+.\" and has the flag \-, the width or precision *, the length modifier l,
+.\" and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
+.\" This is still true for 2.9.1BSD, but 2.10BSD has the flags
+.\" #, + and <space> and no longer mentions D,O,U,X.
+.\" 2.11BSD has
 .\" .BR vprintf (),
 .\" .BR vfprintf (),
-.\" .BR vsprintf ()
-.\" ¤¬Äɲ䵤졢 D,O,U,X ¤ò»È¤ï¤Ê¤¤¤è¤¦¤Ë·Ù¹ð¤µ¤ì¤¿¡£
-.\"O .\" 4.3BSD Reno has the flag 0, the length modifiers h and L,
-.\"O .\" and the conversions n, p, E, G, X (with current meaning)
-.\"O .\" and deprecates D,O,U.
-.\" 4.3BSD Reno ¤Ç¤Ï¥Õ¥é¥° 0¡¢Ä¹¤µ½¤¾þ»Ò h ¤È L¡¢
-.\" ÊÑ´¹ n, p, E, G, (¸½ºß¤Î°ÕÌ£¤Ç¤Î) X ¤¬Äɲ䵤졢
-.\" D,O,U ¤ÏÈó¿ä¾©°·¤¤¤È¤Ê¤Ã¤¿¡£
-.\"O .\" 4.4BSD introduces the functions
-.\"O .\" .BR snprintf ()
-.\"O .\" and
-.\"O .\" .BR vsnprintf (),
-.\"O .\" and the length modifier q.
-.\" 4.4BSD ¤Ç¤Ï¡¢´Ø¿ô
-.\" .BR snprintf ()¤È
-.\" .BR vsnprintf ()¡¢
-.\" Ä¹¤µ½¤¾þ»Ò q ¤¬Æ³Æþ¤µ¤ì¤¿¡£
-.\"O .\" FreeBSD also has functions
-.\"O .\" .BR asprintf ()
-.\"O .\" and
-.\"O .\" .BR vasprintf (),
-.\"O .\" that allocate a buffer large enough for
-.\"O .\" .BR sprintf ().
-.\" FreeBSD ¤Ç¤Ï¡¢
-.\" .BR sprintf ()
-.\" ¤Î¤¿¤á¤Ë½½Ê¬¤Ê¥Ð¥Ã¥Õ¥¡¤ò³ÎÊݤ¹¤ë
+.\" .BR vsprintf (),
+.\" and warns not to use D,O,U,X.
+.\" 4.3BSD Reno has the flag 0, the length modifiers h and L,
+.\" and the conversions n, p, E, G, X (with current meaning)
+.\" and deprecates D,O,U.
+.\" 4.4BSD introduces the functions
+.\" .BR snprintf ()
+.\" and
+.\" .BR vsnprintf (),
+.\" and the length modifier q.
+.\" FreeBSD also has functions
 .\" .BR asprintf ()
-.\" ¤È
-.\" .BR vasprintf ()
-.\" ¤¬Äɲ䵤ì¤Æ¤¤¤ë¡£
-.\"O .\" In glibc there are functions
-.\"O .\" .BR dprintf ()
-.\"O .\" and
-.\"O .\" .BR vdprintf ()
-.\"O .\" that print to a file descriptor instead of a stream.
-.\" glibc ¤Ë¤Ï¡¢´Ø¿ô
-.\" .BR dprintf (),
+.\" and
+.\" .BR vasprintf (),
+.\" that allocate a buffer large enough for
+.\" .BR sprintf ().
+.\" In glibc there are functions
+.\" .BR dprintf ()
+.\" and
 .\" .BR vdprintf ()
-.\" ¤¬¤¢¤ê¡¢¤³¤ì¤é¤Ï¥¹¥È¥ê¡¼¥à¤Ç¤Ï¤Ê¤¯¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ë½ÐÎϤ¹¤ë¡£
-.\"O .SH BUGS
-.SH ¥Ð¥°
-.\"O Because
-.\"O .BR sprintf ()
-.\"O and
-.\"O .BR vsprintf ()
-.\"O assume an arbitrarily long string, callers must be careful not to overflow
-.\"O the actual space; this is often impossible to assure.
-.\"O Note that the length
-.\"O of the strings produced is locale-dependent and difficult to predict.
-.BR sprintf ()
-¤È
-.BR vsprintf ()
-¤Ï¾¡¼ê¤Ë½½Ê¬¤ËŤ¤Ê¸»úÎóÎΰ褬¤¢¤ë¤È²¾Äꤹ¤ë¤Î¤Ç¡¢¸Æ¤Ó½Ð¤·Â¦¤Ï
-¼ÂºÝ¤ÎÎΰ褫¤é¤¢¤Õ¤ì¤Ê¤¤¤è¤¦¤ËÃí°Õ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-¤·¤«¤·¡¢¤³¤ì¤òÊݾڤ¹¤ë¤³¤È¤¬ÉÔ²Äǽ¤Ê¾ì¹ç¤¬Â¿¤¤¡£
-À¸À®¤µ¤ì¤ëʸ»úÎó¤ÎŤµ¤Ï¥í¥±¡¼¥ë°Í¸¤Ç¤¢¤ê¡¢Í½Â¬¤¬Æñ¤·¤¤¤³¤È¤ËÃí°Õ¡£
-.\"O Use
-.\"O .BR snprintf ()
-.\"O and
-.\"O .BR vsnprintf ()
-.\"O instead (or
-.\"O .BR asprintf (3)
-.\"O and
-.\"O .BR vasprintf (3)).
-Âå¤ï¤ê¤Ë
-.BR snprintf ()
-¤È
-.BR vsnprintf ()
-(¤Þ¤¿¤Ï
-.BR asprintf (3)
-¤È
-.BR vasprintf (3))
-¤ò»È¤¦¤³¤È¡£
+.\" that print to a file descriptor instead of a stream.
+glibc の \fBsnprintf\fP()  と \fBvsnprintf\fP()  の実装は、バージョン 2.1 以降は C99 標準に準拠しており、
+上記の通りの動作をする。 glibc 2.0.6 までは、出力が切り詰められた場合は \-1 を返す。
+.SH バグ
+\fBsprintf\fP()  と \fBvsprintf\fP()  は勝手に十分に長い文字列領域があると仮定するので、呼び出し側は
+実際の領域からあふれないように注意しなければならない。 しかし、これを保証することが不可能な場合が多い。
+生成される文字列の長さはロケール依存であり、予測が難しいことに注意。 代わりに \fBsnprintf\fP()  と \fBvsnprintf\fP()
+(または \fBasprintf\fP(3)  と \fBvasprintf\fP(3))  を使うこと。
 .PP
-.\"O Linux libc4.[45] does not have a
-.\"O .BR snprintf (),
-.\"O but provides a libbsd that contains an
-.\"O .BR snprintf ()
-.\"O equivalent to
-.\"O .BR sprintf (),
-.\"O that is, one that ignores the
-.\"O .I size
-.\"O argument.
-Linux libc4.[45] ¤Ë¤Ï
-.BR snprintf ()
-¤Ï¤Ê¤¤¤¬¡¢ libbsd ¤¬Ä󶡤µ¤ì¤Æ¤ª¤ê¡¢
-¤½¤ÎÃæ¤Ë¤Ï
-.BR sprintf ()
-¤ÈÅù²Á¤Ê (¤Ä¤Þ¤ê
-.I size
-°ú¤­¿ô¤ò̵»ë¤¹¤ë)
-.BR snprintf ()
-¤¬¤¢¤ë¡£
-.\"O Thus, the use of
-.\"O .BR snprintf ()
-.\"O with early libc4 leads to serious security problems.
-¤·¤¿¤¬¤Ã¤Æ¡¢½é´ü¤Î libc4 ¤Ç
-.BR snprintf ()
-¤ò»È¤¦¤È¡¢¿¼¹ï¤Ê¥»¥­¥å¥ê¥Æ¥£ÌäÂê¤ò°ú¤­µ¯¤³¤¹¤³¤È¤¬¤¢¤ë¡£
+Linux libc4.[45] には \fBsnprintf\fP()  はないが、 libbsd が提供されており、 その中には \fBsprintf\fP()
+と等価な (つまり \fIsize\fP 引き数を無視する)  \fBsnprintf\fP()  がある。 したがって、初期の libc4 で
+\fBsnprintf\fP()  を使うと、深刻なセキュリティ問題を引き起こすことがある。
 .PP
-.\"O Code such as
-.\"O .BI printf( foo );
-.\"O often indicates a bug, since
-.\"O .I foo
-.\"O may contain a % character.
-.\"O If
-.\"O .I foo
-.\"O comes from untrusted user input, it may contain \fB%n\fP, causing the
-.\"O .BR printf ()
-.\"O call to write to memory and creating a security hole.
-.BI printf( foo );
-¤Î¤è¤¦¤Ê¥³¡¼¥É¤Ï¤·¤Ð¤·¤Ð¥Ð¥°¤ò°ú¤­µ¯¤³¤¹¡£
-¤Ê¤¼¤Ê¤é
-.I foo
-¤Ë % Ê¸»ú¤¬´Þ¤Þ¤ì¤Æ¤ë¤«¤â¤·¤ì¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
-.I foo
-¤¬¿®Íê¤Ç¤­¤Ê¤¤¥æ¡¼¥¶¡¼ÆþÎϤ«¤éºî¤é¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢
-¤½¤ÎÃæ¤Ë \fB%n\fP ¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¤³¤È¤¬¤¢¤ê¡¢
-.BR printf ()
-¸Æ¤Ó½Ð¤·»þ¤Ë¥á¥â¥ê¤Ø¤Î½ñ¤­¹þ¤ß¤¬µ¯¤³¤ê¡¢
-¥»¥­¥å¥ê¥Æ¥£¡¼¥Û¡¼¥ë¤òºî¤ë¤³¤È¤Ë¤Ê¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-.\".PP
-.\".\"O Some floating-point conversions under early libc4
-.\".\"O caused memory leaks.
-.\"½é´ü¤Î libc4 ¤Ç¤Î¼Â¿ôÊÑ´¹¤Ë¤Ï¥á¥â¥ê¥ê¡¼¥¯¤ò°ú¤­µ¯¤³¤¹¤³¤È¤¬¤¢¤ë¡£
-.\"O .SH EXAMPLE
-.SH Îã
-.if \w'\*(Pi'=0 .ds Pi pi
-.\"O To print \*(Pi to five decimal places:
-\*(Pi ¤ò 5 ·å¤Ç½ÐÎϤ¹¤ë¡£
+.\" .PP
+.\" Some floating-point conversions under early libc4
+.\" caused memory leaks.
+\fBprintf(\fP\fIfoo\fP\fB);\fP のようなコードはしばしばバグを引き起こす。 なぜなら \fIfoo\fP に %
+文字が含まれてるかもしれないからである。 \fIfoo\fP が信頼できないユーザー入力から作られている場合には、 その中に \fB%n\fP
+が含まれていることがあり、 \fBprintf\fP()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホールを作ることになるかもしれない。
+.SH 例
+.if  \w'\*(Pi'=0 .ds Pi pi
+\*(Pi を 5 桁で出力する。
 .in +4n
 .nf
 
@@ -1741,17 +428,8 @@ fprintf(stdout, "pi = %.5f\en", 4 * atan(1.0));
 .fi
 .in
 .PP
-.\"O To print a date and time in the form "Sunday, July 3, 10:02",
-.\"O where
-.\"O .I weekday
-.\"O and
-.\"O .I month
-.\"O are pointers to strings:
-ÆüÉդȻþ´Ö¤ò "Sunday, July 3, 10:02" ¤Î·Á¼°¤Ç½ÐÎϤ¹¤ë¡£
-.RI ( weekday
-¤È
-.I month
-¤Ïʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë)
+日付と時間を "Sunday, July 3, 10:02" の形式で出力する。 (\fIweekday\fP と \fImonth\fP
+は文字列へのポインタである)
 .in +4n
 .nf
 
@@ -1761,12 +439,7 @@ fprintf(stdout, "%s, %s %d, %.2d:%.2d\en",
 .fi
 .in
 .PP
-.\"O Many countries use the day-month-year order.
-.\"O Hence, an internationalized version must be able to print
-.\"O the arguments in an order specified by the format:
-Æü - ·î - Ç¯ ¤Î½ç½ø¤Çɽ¼¨¤ò¹Ô¤¦¹ñ¤â¿¤¤¡£
-½¾¤Ã¤Æ¡¢¹ñºÝÈǤǤϽñ¼°¤Ç»ØÄꤵ¤ì¤¿½çÈÖ¤Ç
-°ú¤­¿ô¤òɽ¼¨¤Ç¤­¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+日 \- 月 \- 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された順番で 引き数を表示できなければならない。
 .in +4n
 .nf
 
@@ -1776,14 +449,7 @@ fprintf(stdout, format,
 
 .fi
 .in
-.\"O where
-.\"O .I format
-.\"O depends on locale, and may permute the arguments.
-.\"O With the value:
-.I format
-¤Ï¥í¥±¡¼¥ë¤Ë°Í¸¤·¤Æ¤ª¤ê¡¢°ú¤­¿ô¤Î½çÈÖ¤òÊѤ¨¤ë¤³¤È¤â¤Ç¤­¤ë¡£
-.I format
-¤¬
+\fIformat\fP はロケールに依存しており、引き数の順番を変えることもできる。 \fIformat\fP が
 .in +4n
 .nf
 
@@ -1791,23 +457,20 @@ fprintf(stdout, format,
 
 .fi
 .in
-.\"O one might obtain "Sonntag, 3. Juli, 10:02".
-¤Ç¤¢¤ì¤Ð¡¢ "Sonntag, 3. Juli, 10:02" ¤È¤¤¤¦·ë²Ì¤Ë¤Ê¤ë¡£
+であれば、 "Sonntag, 3. Juli, 10:02" という結果になる。
 .PP
-.\"O To allocate a sufficiently large string and print into it
-.\"O (code correct for both glibc 2.0 and glibc 2.1):
-½½Ê¬¤ËÂ礭¤Êʸ»úÎóÎΰè¤ò³ÎÊݤ·¤Æ¡¢¤½¤³¤Ë¥á¥Ã¥»¡¼¥¸¤ò³ÊǼ¤¹¤ë¤Ë¤Ï
-(glibc 2.0 ¤È glibc 2.1 ¤ÎξÊý¤ÇÀµ¤·¤¯Æ°ºî¤¹¤ë¥³¡¼¥É):
+十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 と glibc 2.1 の両方で正しく動作するコード):
 .nf
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
+
 char *
 make_message(const char *fmt, ...)
 {
-    /* Guess we need no more than 100 bytes. */
-    int n, size = 100;
+    int n;
+    int size = 100;     /* Guess we need no more than 100 bytes. */
     char *p, *np;
     va_list ap;
 
@@ -1815,18 +478,25 @@ make_message(const char *fmt, ...)
         return NULL;
 
     while (1) {
+
         /* Try to print in the allocated space. */
+
         va_start(ap, fmt);
         n = vsnprintf(p, size, fmt, ap);
         va_end(ap);
+
         /* If that worked, return the string. */
+
         if (n > \-1 && n < size)
             return p;
+
         /* Else try again with more space. */
+
         if (n > \-1)    /* glibc 2.1 */
             size = n+1; /* precisely what is needed */
         else           /* glibc 2.0 */
             size *= 2;  /* twice the old size */
+
         if ((np = realloc (p, size)) == NULL) {
             free(p);
             return NULL;
@@ -1836,13 +506,10 @@ make_message(const char *fmt, ...)
     }
 }
 .fi
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR printf (1),
-.BR asprintf (3),
-.BR dprintf (3),
-.BR scanf (3),
-.BR setlocale (3),
-.BR wcrtomb (3),
-.BR wprintf (3),
-.BR locale (5)
+.SH 関連項目
+\fBprintf\fP(1), \fBasprintf\fP(3), \fBdprintf\fP(3), \fBscanf\fP(3), \fBsetlocale\fP(3),
+\fBwcrtomb\fP(3), \fBwprintf\fP(3), \fBlocale\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。