OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / man3 / dprintf.3
1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Text fragments inspired by Martin Schulze <joey@infodrom.org>.
24 .\"
25 .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved.
26 .\" Translated Sat 12 Jan 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
27 .\"
28 .TH DPRINTF 3 2010-09-15 "GNU" "Linux Programmer's Manual"
29 .SH 名前
30 dprintf, vdprintf \- ファイルディスクリプターに文字出力する
31 .SH 書式
32 .B #include <stdio.h>
33 .sp
34 .BI "int dprintf(int " fd ", const char *" format ", ...);"
35 .sp
36 .BI "int vdprintf(int " fd ", const char *" format ", va_list " ap );
37 .sp
38 .in -4n
39 glibc 向けの機能検査マクロの要件
40 .RB ( feature_test_macros (7)
41 参照):
42 .in
43 .sp
44 .BR dprintf (),
45 .BR vdprintf ():
46 .PD 0
47 .ad l
48 .RS 4
49 .TP 4
50 glibc 2.10 以降:
51 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
52 .TP
53 glibc 2.10 より前:
54 _GNU_SOURCE
55 .RE
56 .ad
57 .PD
58 .SH 説明
59 (glibc2 ライブラリにおける)
60 .BR dprintf ()
61 関数と
62 .BR vdprintf ()
63 関数とは、それぞれ
64 .BR fprintf (3)
65 関数と
66 .BR vfprintf (3)
67 関数とにちょうど対応するが、
68 これらは
69 .I stdio
70 ストリームではなくファイルディスクリプター
71 .I fd
72 に対して出力を行う。
73 .SH 準拠
74 これらの関数は GNU による拡張であり、
75 現在では POSIX.1-2008 で規定されている。
76 .\" .SH 注意
77 .\" これらの関数は GNU の拡張であり、C や POSIX のものではない。
78 .\" 見てわかるとおり、名前の付け方はあまり良くない。
79 .\" 多くのシステム (MacOS など) には、
80 .\" .BR dprintf ()
81 .\" という名前の、これとは互換でない関数があり、
82 .\" たいていはなんらかのデバッグ用の
83 .\" .BR printf (3)
84 .\" になっている。プロトタイプは
85 .\" 
86 .\" .BI "void dprintf(int level, const char *" format ", ...);"
87 .\" 
88 .\" で、最初のパラメータはデバッグレベルになっている
89 .\" (また出力は
90 .\" .I stderr
91 .\" に行われる)。
92 .\" さらに、
93 .\" .BR dprintf ()
94 .\" (あるいは
95 .\" .BR DPRINTF )
96 .\" はデバッグ処理用の printf のマクロとしても良く用いられる。
97 .\" したがって恐らく、移植性を必要とするプログラムでは、
98 .\" この関数は用いないほうが良いだろう。
99 .\" 
100 .\" より良い名前は
101 .\" .BR fdprintf ()
102 .\" だったかと思われる。
103 .SH 関連項目
104 .BR printf (3)