OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[linuxjm/LDP_man-pages.git] / draft / man3 / wprintf.3
index 423362a..631dcf0 100644 (file)
@@ -1,9 +1,11 @@
 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"   GNU glibc-2 source code and manual
 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
 .\"   ISO/IEC 9899:1999
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
 .\"         all rights reserved.
 .\" Translated Tue Jan 11 00:55:36 JST 2000
 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
 .\"
-.TH WPRINTF 3  2010-09-20 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- formatted
-.\"O wide-character output conversion
-wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- ¥ï¥¤¥Éʸ»ú¤ò
-¥Õ¥©¡¼¥Þ¥Ã¥È¤·¤Æ½ÐÎϤ¹¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.TH WPRINTF 3 2011\-09\-17 GNU "Linux Programmer's Manual"
+.SH 名前
+wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- ワイド文字を
+フォーマットして出力する
+.SH 書式
 .nf
-.B #include <stdio.h>
-.B #include <wchar.h>
+\fB#include <stdio.h>\fP
+\fB#include <wchar.h>\fP
 .sp
-.BI "int wprintf(const wchar_t *" format ", ...);"
-.BI "int fwprintf(FILE *" stream ", const wchar_t *" format ", ...);"
-.BI "int swprintf(wchar_t *" wcs ", size_t " maxlen ,
-.BI "             const wchar_t *" format ", ...);"
+\fBint wprintf(const wchar_t *\fP\fIformat\fP\fB, ...);\fP
+\fBint fwprintf(FILE *\fP\fIstream\fP\fB, const wchar_t *\fP\fIformat\fP\fB, ...);\fP
+\fBint swprintf(wchar_t *\fP\fIwcs\fP\fB, size_t \fP\fImaxlen\fP\fB,\fP
+\fB             const wchar_t *\fP\fIformat\fP\fB, ...);\fP
 .sp
-.BI "int vwprintf(const wchar_t *" format ", va_list " args );
-.BI "int vfwprintf(FILE *" stream ", const wchar_t *" format ", va_list " args );
-.BI "int vswprintf(wchar_t *" wcs ", size_t " maxlen ,
-.BI "              const wchar_t *" format ", va_list " args );
+\fBint vwprintf(const wchar_t *\fP\fIformat\fP\fB, va_list \fP\fIargs\fP\fB);\fP
+\fBint vfwprintf(FILE *\fP\fIstream\fP\fB, const wchar_t *\fP\fIformat\fP\fB, va_list \fP\fIargs\fP\fB);\fP
+\fBint vswprintf(wchar_t *\fP\fIwcs\fP\fB, size_t \fP\fImaxlen\fP\fB,\fP
+\fB              const wchar_t *\fP\fIformat\fP\fB, va_list \fP\fIargs\fP\fB);\fP
 .fi
 .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
-.\"O All functions shown above:
-¾åµ­¤ÎÁ´¤Æ¤Î´Ø¿ô:
+上記の全ての関数:
 .RS 4
 .\" .BR wprintf (),
 .\" .BR fwprintf (),
@@ -59,318 +58,78 @@ glibc 
 .\" .BR vfwprintf (),
 .\" .BR vswprintf ():
 _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE ||
+.br
+_ISOC95_SOURCE /* Since glibc 2.12 */ ||
+.br
 _POSIX_C_SOURCE\ >=\ 200112L;
 .br
-or
-.I cc\ -std=c99
+or \fIcc\ \-std=c99\fP
 .RE
 .ad
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The
-.\"O .BR wprintf ()
-.\"O family of functions is
-.\"O the wide-character equivalent of the
-.\"O .BR printf (3)
-.\"O family of functions.
-.\"O It performs formatted output of wide
-.\"O characters.
-.BR wprintf ()
-¥Õ¥¡¥ß¥ê¡¼¤Î´Ø¿ô¤Ï
-.BR printf (3)
-¥Õ¥¡¥ß¥ê¡¼¤Î´Ø¿ô¤Î
-¥ï¥¤¥Éʸ»úÈǤǤ¢¤ë¡£¤³¤ì¤é¤Ï¥ï¥¤¥Éʸ»ú¤ò¥Õ¥©¡¼¥Þ¥Ã¥È¤·¤Æ½ÐÎϤ¹¤ë¡£
+.SH 説明
+\fBwprintf\fP()  ファミリーの関数は \fBprintf\fP(3)  ファミリーの関数の
+ワイド文字版である。これらはワイド文字をフォーマットして出力する。
 .PP
-.\"O The
-.\"O .BR wprintf ()
-.\"O and
-.\"O .BR vwprintf ()
-.\"O functions
-.\"O perform wide-character output to \fIstdout\fP.
-.\"O \fIstdout\fP must not be byte oriented; see
-.\"O .BR fwide (3)
-.\"O for more information.
-.BR wprintf ()
-¤È
-.BR vwprintf ()
-´Ø¿ô¤Ï \fIstdout\fP ¤Ë½ÐÎϤò¹Ô¤Ê¤¦¡£
-\fIstdout\fP ¤¬¥Ð¥¤¥Èñ°ÌÆþ½ÐÎϤǤ¢¤Ã¤Æ¤Ï¤¤¤±¤Ê¤¤¡£¤è¤ê¾Ü¤·¤¤ÀâÌÀ¤Ï
-.BR fwide (3)
-¤ò»²¾È¤¹¤ë¤³¤È¡£
+\fBwprintf\fP()  と \fBvwprintf\fP()  関数は \fIstdout\fP に出力を行なう。 \fIstdout\fP
+がバイト単位入出力であってはいけない。より詳しい説明は \fBfwide\fP(3)  を参照すること。
 .PP
-.\"O The
-.\"O .BR fwprintf ()
-.\"O and
-.\"O .BR vfwprintf ()
-.\"O functions
-.\"O perform wide-character output to \fIstream\fP.
-.\"O \fIstream\fP must not be byte oriented; see
-.\"O .BR fwide (3)
-.\"O for more information.
-.BR fwprintf ()
-¤È
-.BR vfwprintf ()
-´Ø¿ô¤Ï \fIstream\fP ¤Ë¥ï¥¤¥Éʸ»ú½ÐÎÏ
-¤ò¹Ô¤Ê¤¦¡£ \fIstream\fP ¤¬¥Ð¥¤¥Èñ°ÌÆþ½ÐÎϤǤ¢¤Ã¤Æ¤Ï¤¤¤±¤Ê¤¤¡£
-¤è¤ê¾Ü¤·¤¤ÀâÌÀ¤Ï
-.BR fwide (3)
-¤ò»²¾È¤¹¤ë¤³¤È¡£
+\fBfwprintf\fP()  と \fBvfwprintf\fP()  関数は \fIstream\fP にワイド文字出力 を行なう。 \fIstream\fP
+がバイト単位入出力であってはいけない。 より詳しい説明は \fBfwide\fP(3)  を参照すること。
 .PP
-.\"O The
-.\"O .BR swprintf ()
-.\"O and
-.\"O .BR vswprintf ()
-.\"O functions
-.\"O perform wide-character output
-.\"O to an array of wide characters.
-.\"O The programmer must ensure that there is
-.\"O room for at least \fImaxlen\fP wide
-.\"O characters at \fIwcs\fP.
-.BR swprintf ()
-¤È
-.BR vswprintf ()
-´Ø¿ô¤Ï¥ï¥¤¥Éʸ»ú¤ÎÇÛÎó¤Ë
-¥ï¥¤¥Éʸ»ú½ÐÎϤò¹Ô¤Ê¤¦¡£¥×¥í¥°¥é¥Þ¡¼¤Ï \fIwcs\fP ¤ËºÇÄã¤Ç¤â
-\fImaxlen\fP Ê¸»ú¤Î¥ï¥¤¥Éʸ»ú¤ò½ÐÎϤǤ­¤ë¶õ¤­¤¬¤¢¤ë¤³¤È¤òÊݾڤ·¤Ê¤±¤ì¤Ð
-¤Ê¤é¤Ê¤¤¡£
+\fBswprintf\fP()  と \fBvswprintf\fP()  関数はワイド文字の配列に ワイド文字出力を行なう。プログラマーは \fIwcs\fP
+に最低でも \fImaxlen\fP 文字のワイド文字を出力できる空きがあることを保証しなければ ならない。
 .PP
-.\"O These functions are like
-.\"O the
-.\"O .BR printf (3),
-.\"O .BR vprintf (3),
-.\"O .BR fprintf (3),
-.\"O .BR vfprintf (3),
-.\"O .BR sprintf (3),
-.\"O .BR vsprintf (3)
-.\"O functions except for the
-.\"O following differences:
-¤³¤ì¤é¤Î´Ø¿ô¤Ï
-.BR printf (3),
-.BR vprintf (3),
-.BR fprintf (3),
-.BR vfprintf (3),
-.BR sprintf (3),
-.BR vsprintf (3)
-´Ø¿ô¤Ë»÷¤Æ¤¤¤ë¤¬°Ê²¼¤Î
-ÅÀ¤Ç°Û¤Ã¤Æ¤¤¤ë¡£
-.TP
-.B \(bu
-.\"O The \fIformat\fP string is a wide character string.
-\fIformat\fP ¤¬¥ï¥¤¥Éʸ»úÎó¤ÇÍ¿¤¨¤é¤ì¤ë¡£
-.TP
-.B \(bu
-.\"O The output consists of wide characters, not bytes.
-½ÐÎϤ¬¥Ð¥¤¥È¤Ç¤Ï¤Ê¤¯¥ï¥¤¥Éʸ»ú¤Ç¹½À®¤µ¤ì¤ë¡£
-.TP
-.B \(bu
-.\"O .BR swprintf ()
-.\"O and
-.\"O .BR vswprintf ()
-.\"O take a \fImaxlen\fP argument,
-.\"O .BR sprintf (3)
-.\"O and
-.\"O .BR vsprintf (3)
-.\"O do not.
-.\"O .RB ( snprintf (3)
-.\"O and
-.\"O .BR vsnprintf (3)
-.\"O take a \fImaxlen\fP argument, but these functions do not return \-1 upon
-.\"O buffer overflow on Linux.)
-.BR swprintf ()
-¤È
-.BR vswprintf ()
-¤Ï \fImaxlen\fP °ú¤­¿ô¤ò¼è¤ë¤¬¡¢
-.BR sprintf ()
-¤È
-.BR vsprintf ()
-¤Ï¼è¤é¤Ê¤¤
-.RB ( snprintf ()
-¤È
-.BR vsnprintf ()
-¤Ï \fImaxlen\fP °ú¤­¿ô¤ò¼è¤ë¤¬
-¤³¤ì¤é¤Î´Ø¿ô¤¬ Linux ¤Ç¤Ï¡¢¥Ð¥Ã¥Õ¥¡¡¼¤¬°î¤ì¤¿¾ì¹ç¤Ç¤â \-1 ¤òÊÖ¤µ¤Ê¤¤)¡£
+これらの関数は \fBprintf\fP(3), \fBvprintf\fP(3), \fBfprintf\fP(3), \fBvfprintf\fP(3),
+\fBsprintf\fP(3), \fBvsprintf\fP(3)  関数に似ているが以下の 点で異っている。
+.TP 
+\fB\(bu\fP
+\fIformat\fP がワイド文字列で与えられる。
+.TP 
+\fB\(bu\fP
+出力がバイトではなくワイド文字で構成される。
+.TP 
+\fB\(bu\fP
+\fBswprintf\fP()  と \fBvswprintf\fP()  は \fImaxlen\fP 引き数を取るが、 \fBsprintf\fP()  と
+\fBvsprintf\fP()  は取らない (\fBsnprintf\fP()  と \fBvsnprintf\fP()  は \fImaxlen\fP 引き数を取るが
+これらの関数が Linux では、バッファーが溢れた場合でも \-1 を返さない)。
 .PP
-.\"O The treatment of the conversion characters \fBc\fP and \fBs\fP is different:
-\fBc\fP ¤È \fBs\fP ÊÑ´¹Ê¸»ú¤Î°·¤¤¤¬°Û¤Ã¤Æ¤¤¤ë:
-.TP
-.\"O .B c
-.\"O If no
-.\"O .B l
-.\"O modifier is present, the
-.\"O .I int
-.\"O argument is converted to a wide character by a call to the
-.\"O .BR btowc (3)
-.\"O function, and the resulting wide character is written.
-.\"O If an
-.\"O .B l
-.\"O modifier is present, the
-.\"O .I wint_t
-.\"O (wide character) argument is written.
-.B c
-¤â¤·
-.B l
-½¤¾þ»Ò¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï
-.I int
-°ú¤­¿ô¤Ï
-.BR btowc (3)
-´Ø¿ô¤Ë¤è¤Ã¤Æ¥ï¥¤¥Éʸ»ú¤ËÊÑ´¹¤µ¤ì¤ë¡£¤½¤·¤Æ·ë²Ì¤Î¥ï¥¤¥Éʸ»ú¤¬½ÐÎϤµ¤ì¤ë¡£
-.B l
-½¤¾þ»Ò¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï
-.I wint_t
-(¥ï¥¤¥Éʸ»ú)°ú¤­¿ô¤¬½ÐÎϤµ¤ì¤ë¡£
-.\"O .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
-.\"O (pointer to a string) containing a multibyte character sequence beginning
-.\"O in the initial shift state.
-.\"O Characters from the array are converted to
-.\"O wide characters (each by a call to the
-.\"O .BR mbrtowc (3)
-.\"O function with a conversion state starting in the initial state before
-.\"O the first byte).
-.\"O The resulting wide characters are written up to
-.\"O (but not including) the terminating null wide character.
-.\"O If a precision is
-.\"O specified, no more wide characters than the number specified are written.
-.\"O Note that the precision determines the number of
-.\"O .I wide characters
-.\"O written, not the number of
-.\"O .I bytes
-.\"O or
-.\"O .IR "screen positions" .
-.TP
-.B s
-¤â¤·
-.B l
-½¤¾þ»Ò¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¡¢
-.I "const\ char\ *"
-°ú¤­¿ô¤Ï½é´ü¾õÂÖ¤è¤ê»Ï¤Þ¤ë¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»úÎó¤ò´Þ¤ó¤À
-char ·¿¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼(ʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼)¤È¤ß¤Ê¤µ¤ì¤ë¡£
-ÇÛÎó¤Îʸ»ú¤Ï(ºÇ½é¤Î¥Ð¥¤¥ÈÁ°¤Ë½é´ü¾õÂÖ¤ÇÊÑ´¹¤ò³«»Ï¤·¡¢¤½¤ì¤¾¤ì¤Îʸ»ú¤ò
-.BR mbrtowc (3)
-´Ø¿ô¤Ë¤è¤Ã¤Æ)¥ï¥¤¥Éʸ»ú¤Ø¤ÈÊÑ´¹¤µ¤ì¤ë¡£·ë²Ì¤Î¥ï¥¤¥Éʸ»ú¤Ï½ªÃ¼¤Î
-¥Ê¥ë¥ï¥¤¥Éʸ»ú¤Î¼êÁ°¤Þ¤Ç¤¬½ñ¤­¹þ¤Þ¤ì¤ë¡£ÀºÅÙ(precision)¤¬»ØÄꤵ¤ì¤¿
-¾ì¹ç¡¢»ØÄꤵ¤ì¤¿¿ô»ú¤òĶ¤¨¤ë¥ï¥¤¥Éʸ»ú¤Ï½ñ¤­¹þ¤Þ¤ì¤Ê¤¤¡£ÀºÅÙ¤Ï
-½ñ¤­¹þ¤Þ¤ì¤ë
-.I ¥Ð¥¤¥È
-¿ô¤ä
-.I ²èÌ̾å¤Î°ÌÃÖ
-¤Ç¤Ï¤Ê¤¯
-.I ¥ï¥¤¥Éʸ»ú
-¤Î¿ô¤ò»ØÄꤹ¤ë¤³¤È¤ËÃí°Õ¤¹¤ë¤³¤È¡£
-.\"O The array must contain a terminating null byte, unless a precision is given
-.\"O and it is so small that the number of converted wide characters reaches it
-.\"O before the end of the array is reached.
-.\"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.
-.\"O Wide characters from the array are written up to (but not including) a
-.\"O terminating null wide character.
-.\"O If a precision is specified, no more than
-.\"O the number specified are written.
-.\"O The array must contain a terminating null
-.\"O wide character, unless a precision is given and it is smaller than or equal
-.\"O to the number of wide characters in the array.
-ÀºÅÙ¤¬¤Ê¤¤¾ì¹ç¤Ë¤ÏÇÛÎó¤Î½ªÃ¼¤Ë¥Ê¥ëʸ»ú¤ò´Þ¤àɬÍפ¬¤¢¤ë¡£
-ÀºÅÙ¤ò»ØÄꤹ¤ë¾ì¹ç¤Ë¤Ï¡¢ÇÛÎó¤ÎºÇ¸å¤ËÅþÃ夹¤ëÁ°¤ËÊÑ´¹¤µ¤ì¤¿¥ï¥¤¥Éʸ»ú¤Î
-¿ô¤¬¤½¤ì¤ËÅþ㤹¤ë¤è¤¦¡¢ÀºÅ٤Ͻ½Ê¬¤Ë¾®¤µ¤Ê¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-¤â¤·
-.B l
-½¤¾þ»Ò¤¬Â¸ºß¤¹¤ë¾ì¹ç¡¢
-.I "const\ wchar_t\ *"
-°ú¤­¿ô¤Ï¥ï¥¤¥Éʸ»ú¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤È¤ß¤Ê¤µ¤ì¤ë¡£
-ÇÛÎó¤Î¥ï¥¤¥Éʸ»úÎó¤Ï½ªÃ¼¤Î¥Ê¥ë¥ï¥¤¥Éʸ»ú¤Î¼ê´Ö¤Þ¤Ç½ÐÎϤµ¤ì¤ë¡£
-¤â¤·ÀºÅÙ¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï»ØÄꤵ¤ì¤¿ÀºÅٰʾå¤Îʸ»ú¤Ï½ÐÎϤµ¤ì¤Ê¤¤¡£
-ÀºÅÙ¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¤Ë¤Ï½ªÃ¼¤Î¥Ê¥ë¥ï¥¤¥Éʸ»ú¤ò´Þ¤àɬÍפ¬¤¢¤ë¡£
-ÀºÅÙ¤ò»ØÄꤹ¤ë¾ì¹ç¤Ë¤Ï¤½¤ì¤Ï¥ï¥¤¥Éʸ»ú¤ÎÇÛÎó¤ÎÂ礭¤µ¤è¤ê¤â¾®¤µ¤¯¤Ê
-¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O The functions return the number of wide characters written, excluding the
-.\"O terminating null wide character in
-.\"O case of the functions
-.\"O .BR swprintf ()
-.\"O and
-.\"O .BR vswprintf ().
-.\"O They return \-1 when an error occurs.
-¤³¤ì¤é¤Î´Ø¿ô¤Ï½ñ¤­¹þ¤Þ¤ì¤¿¥ï¥¤¥Éʸ»ú¤Îʸ»ú¿ô¤òÊÖ¤¹¡£
-.BR swprintf ()
-¤È
-.BR vswprintf ()
-´Ø¿ô¤Î¾ì¹ç¤Ï
-½ªÃ¼¤Î¥Ê¥ë¥ï¥¤¥Éʸ»ú¤Ï´Þ¤Þ¤Ê¤¤¡£¥¨¥é¡¼¤¬µ¯¤³¤Ã¤¿¾ì¹ç¤Ï \-1 ¤òÊÖ¤¹¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
+\fBc\fP と \fBs\fP 変換文字の扱いが異っている:
+.TP 
+\fBc\fP
+もし \fBl\fP 修飾子が存在しない場合は \fIint\fP 引き数は \fBbtowc\fP(3)
+関数によってワイド文字に変換される。そして結果のワイド文字が出力される。 \fBl\fP 修飾子が存在する場合は \fIwint_t\fP
+(ワイド文字)引き数が出力される。
+.TP 
+\fBs\fP
+もし \fBl\fP 修飾子が存在しない場合、 \fIconst\ char\ *\fP 引き数は初期状態より始まるマルチバイト文字列を含んだ char
+型の配列へのポインタ(文字列へのポインタ)とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれの文字を
+\fBmbrtowc\fP(3)  関数によって)ワイド文字へと変換される。結果のワイド文字は終端の ナルワイド文字 (L\(aq\e0\(aq)
+の手前までが書き込まれる。精度(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれない。精度は 書き込まれる
+\fIバイト\fP 数や \fI画面上の位置\fP ではなく \fIワイド文字\fP の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイト
+(\(aq\e0\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到着する前に変換されたワイド文字の
+数がそれに到達するよう、精度は十分に小さな数でなければならない。 もし \fBl\fP 修飾子が存在する場合、 \fIconst\ wchar_t\ *\fP
+引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端のナルワイド文字の手間まで出力される。
+もし精度が指定された場合には指定された精度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含む必要がある。
+精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さくな ければならない。
+.SH 返り値
+これらの関数は書き込まれたワイド文字の文字数を返す。 \fBswprintf\fP()  と \fBvswprintf\fP()  関数の場合は
+終端のナルワイド文字は含まない。エラーが起こった場合は \-1 を返す。
+.SH 準拠
 C99.
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O The behavior of
-.\"O .BR wprintf ()
-.\"O et al. depends
-.\"O on the
-.\"O .B LC_CTYPE
-.\"O category of the
-.\"O current locale.
-.BR wprintf ()
-Åù¤ÎÆ°ºî¤Ï¸½ºß¤Î¥í¥±¡¼¥ë¤Î
-.B LC_CTYPE
-¥«¥Æ¥´¥ê¤Ë°Í¸¤·¤Æ¤¤¤ë¡£
+.SH 注意
+\fBwprintf\fP()  等の動作は現在のロケールの \fBLC_CTYPE\fP カテゴリに依存している。
 .PP
-.\"O If the \fIformat\fP string contains non-ASCII wide characters, the program
-.\"O will only work correctly if the
-.\"O .B LC_CTYPE
-.\"O category of the current locale at
-.\"O run time is the same as the
-.\"O .B LC_CTYPE
-.\"O category of the current locale at
-.\"O compile time.
-.\"O This is because the
-\fIformat\fP Ê¸»úÎ󤬠ASCII °Ê³°¤Î¥ï¥¤¥Éʸ»ú¤ò´Þ¤ó¤Ç¤¤¤ë¾ì¹ç¡¢
-¼Â¹Ô»þ¤Î¥í¥±¡¼¥ë¤Î
-.B LC_CTYPE
-¥«¥Æ¥´¥ê¤¬¥³¥ó¥Ñ¥¤¥ë»þ¤Î
-.B LC_CTYPE
-¥«¥Æ¥´¥ê¤È
-°ìÃפ·¤Æ¤¤¤ë¾ì¹ç¤Ë¤Î¤ß¥×¥í¥°¥é¥à¤ÏÀµ¾ï¤ËÆ°ºî¤¹¤ë¡£¤³¤ì¤Ï
-.I wchar_t
-.\"O representation is platform- and locale- dependent.
-.\"O (The glibc represents
-.\"O wide characters using their Unicode (ISO-10646) code point, but other
-.\"O platforms don't do this.
-.\"O Also, the use of ISO C99 universal character names
-.\"O of the form \\unnnn does not solve this problem.)
-¤Îɽ¸½¤¬¥í¥±¡¼¥ë¤ä¥×¥é¥Ã¥È¥Û¡¼¥à¤Ë°Í¸¤·¤Æ¤¤¤ë¤³¤È¤Ë¸¶°ø¤¬¤¢¤ë¡£
-(glibc ¤Ç¤Ï¥ï¥¤¥Éʸ»ú¤È¤·¤Æ Unicode (ISO-10646) ¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤ò
-»ÈÍѤ·¤Æ¤¤¤ë¡£Â¾¤Î¥×¥é¥Ã¥È¥Û¡¼¥à¤Ç¤Ï¤½¤¦¤Ç¤Ï¤Ê¤¤¡£Æ±ÍͤË
-ISO C99 ¤Î \\unnnn ·Á¼°¤ÎÈÆÍÑʸ»ú̾¾Î¤Ï¤³¤ÎÌäÂê¤ò²ò·è¤·¤Ê¤¤¡£)
-.\"O Therefore, in
-.\"O internationalized programs, the \fIformat\fP string should consist of ASCII
-.\"O wide characters only, or should be constructed at run time in an
-.\"O internationalized way (e.g., using
-.\"O .BR gettext (3)
-.\"O or
-.\"O .BR iconv (3),
-.\"O followed by
-.\"O .BR mbstowcs (3)).
-¤³¤Î¤¿¤á¹ñºÝ²½¤µ¤ì¤¿¥×¥í¥°¥é¥à¤Ç¤Ï \fIformat\fP Ê¸»úÎó¤ò ASCII ¥ï¥¤¥É
-ʸ»ú¤Î¤ß¤Ë¤¹¤ë¤«¡¢¼Â¹Ô»þ¤Ë¹ñºÝ²½¤µ¤ì¤¿ÊýË¡¤Ç¹½À®¤¹¤ëɬÍפ¬¤¢¤ë
-(Î㤨¤Ð
-.BR gettext ()
-¤È
-.BR iconv ()
-¤ä
-.BR mbstowcs ()
-¤òÁȤ߹ç¤ï¤Æ»ÈÍѤ¹¤ë)¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR fprintf (3),
-.BR fputwc (3),
-.BR fwide (3),
-.BR printf (3),
-.BR snprintf (3)
+\fIformat\fP 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケールの \fBLC_CTYPE\fP カテゴリがコンパイル時の
+\fBLC_CTYPE\fP カテゴリと 一致している場合にのみプログラムは正常に動作する。これは \fIwchar_t\fP
+の表現がロケールやプラットホームに依存していることに原因がある。 (glibc ではワイド文字として Unicode (ISO\-10646)
+のコードポイントを 使用している。他のプラットホームではそうではない。同様に ISO C99 の \eunnnn
+形式の汎用文字名称はこの問題を解決しない。)  このため国際化されたプログラムでは \fIformat\fP 文字列を ASCII ワイド
+文字のみにするか、実行時に国際化された方法で構成する必要がある (例えば \fBgettext\fP()  と \fBiconv\fP()  や
+\fBmbstowcs\fP()  を組み合わて使用する)。
+.SH 関連項目
 .\" .BR wscanf (3)
+\fBfprintf\fP(3), \fBfputwc\fP(3), \fBfwide\fP(3), \fBprintf\fP(3), \fBsnprintf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。