1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
|
.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
.\"
.\" 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.
.\"
.\" References consulted:
.\" GNU glibc-2 source code and manual
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
.\" 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 "November 20, 1999" "GNU" "Linux Programmer's Manual"
.SH ̾
wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- 磻ʸ
եޥåȤƽϤ
.SH
.nf
.B #include <stdio.h>
.B #include <wchar.h>
.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 ", ...);"
.sp
.B #include <stdarg.h>
.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 );
.fi
.SH
\fBwprintf\fP եߥδؿ \fBprintf\fP եߥδؿ
磻ʸǤǤ롣ϥ磻ʸեޥåȤƽϤ롣
.PP
\fBwprintf\fP \fBvwprintf\fP ؿ \fBstdout\fP ˽ϤԤʤ
\fBstdout\fP ХñϤǤäƤϤʤܤ
\fBfwide\fP ؿȤ뤳ȡ
.PP
\fBfwprintf\fP \fBvfwprintf\fP ؿ \fIstream\fP ˥磻ʸ
Ԥʤ \fIstream\fP ХñϤǤäƤϤʤ
ܤ\fBfwide\fP ؿȤ뤳ȡ
.PP
\fBswprintf\fP \fBvswprintf\fP ؿϥ磻ʸ
磻ʸϤԤʤץޡ \fIwcs\fP ˺Ǥ
\fImaxlen\fP ʸΥ磻ʸϤǤ뤳Ȥݾڤʤ
ʤʤ
.PP
δؿ \fBprintf\fP, \fBvprintf\fP, \fBfprintf\fP,
\fBvfprintf\fP, \fBsprintf\fP, \fBvsprintf\fP ؿ˻Ƥ뤬ʲ
ǰۤäƤ롣
.TP
.B \(bu
\fIformat\fP 磻ʸͿ롣
.TP
.B \(bu
ϤХȤǤϤʤ磻ʸǹ롣
.TP
.B \(bu
\fBswprintf\fP \fBvswprintf\fP \fImaxlen\fP 뤬
\fBsprintf\fP \fBvsprintf\fP ϼʤ
(\fBsnprintf\fP \fBvsnprintf\fP \fImaxlen\fP 뤬
δؿ Linux ǤϡХåե줿Ǥ \-1 ֤ʤ)
.PP
\fBc\fP \fBs\fP ѴʸΰۤäƤ:
.TP
.B c
⤷
.B l
Ҥ¸ߤʤ
.I int
.B btowc
ؿˤäƥ磻ʸѴ롣Ʒ̤Υ磻ʸϤ롣
.B l
Ҥ¸ߤ
.I wint_t
(磻ʸ)Ϥ롣
.TP
.B s
⤷
.B l
Ҥ¸ߤʤ硢
.IR "" `` "const char *" ''
Ͻ֤ϤޤޥХʸޤ
char ؤΥݥ(ʸؤΥݥ)Ȥߤʤ롣
ʸ(ǽΥХ˽֤ѴϤ줾ʸ
.B mbrtowc
ؿˤä)磻ʸؤѴ롣̤Υ磻ʸϽü
ʥ磻ʸμޤǤޤ롣(precision)ꤵ줿
硢ꤵ줿Ķ磻ʸϽޤʤ٤
ޤ
.I Х
.I ̾ΰ
ǤϤʤ
.I 磻ʸ
οꤹ뤳Ȥդ뤳ȡ
٤ʤˤνü˥ʥʸޤɬפ롣
٤ꤹˤϡκǸ夹Ѵ줿磻ʸ
ã褦٤Ͻʬ˾ʿǤʤФʤʤ
⤷
.B l
Ҥ¸ߤ硢
.IR "" `` "const wchar_t *" ''
ϥ磻ʸؤΥݥȤߤʤ롣
Υ磻ʸϽüΥʥ磻ʸμ֤ޤǽϤ롣
⤷٤ꤵ줿ˤϻꤵ줿ٰʾʸϽϤʤ
٤ꤷʤˤϽüΥʥ磻ʸޤɬפ롣
٤ꤹˤϤϥ磻ʸ礭⾮
Фʤʤ
.SH ֤
δؿϽޤ줿磻ʸʸ֤
\fBswprintf\fP \fBvswprintf\fP ؿξ
üΥʥ磻ʸϴޤޤʤ顼ä \-1 ֤
.SH
ISO/ANSI C, UNIX98
.SH Ϣ
.BR printf (3),
.BR fprintf (3),
.BR snprintf (3),
.BR fputwc (3),
.BR fwide (3),
.BR wscanf (3)
.SH
\fBwprintf\fP ưϸߤΥ LC_CTYPE ƥ˰¸Ƥ롣
.PP
\fIformat\fP ʸ ASCII ʳΥ磻ʸޤǤ硢
¹ԻΥ LC_CTYPE ƥ꤬ѥ LC_CTYPE ƥ
פƤˤΤߥץư롣
.B wchar_t
ɽץåȥۡ˰¸Ƥ뤳Ȥ˸롣
( GNU libc Ǥϥ磻ʸȤ Unicode (ISO-10646) ΥɥݥȤ
ѤƤ롣¾ΥץåȥۡǤϤǤϤʤƱͤ
ISO C99 \\unnnn ʸ̾ΤϤ褷ʤ)
Τݲ줿ץǤ \fIformat\fP ʸ ASCII 磻
ʸΤߤˤ뤫¹Ի˹ݲ줿ˡǹɬפ롣
( 㤨
.B gettext
.BR iconv
.BR mbstowcs
Ȥ߹ƻѤ롣)
|