.\" Copyright (C) 2001 Andries Brouwer .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Text fragments inspired by Martin Schulze . .\" .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved. .\" Translated Sat 12 Jan 2002 by NAKANO Takeo .\" .TH DPRINTF 3 2010-09-15 "GNU" "Linux Programmer's Manual" .SH 名前 dprintf, vdprintf \- ファイルディスクリプターに文字出力する .SH 書式 .B #include .sp .BI "int dprintf(int " fd ", const char *" format ", ...);" .sp .BI "int vdprintf(int " fd ", const char *" format ", va_list " ap ); .sp .in -4n glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR dprintf (), .BR vdprintf (): .PD 0 .ad l .RS 4 .TP 4 glibc 2.10 以降: _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L .TP glibc 2.10 より前: _GNU_SOURCE .RE .ad .PD .SH 説明 (glibc2 ライブラリにおける) .BR dprintf () 関数と .BR vdprintf () 関数とは、それぞれ .BR fprintf (3) 関数と .BR vfprintf (3) 関数とにちょうど対応するが、 これらは .I stdio ストリームではなくファイルディスクリプター .I fd に対して出力を行う。 .SH 準拠 これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されている。 .\" .SH 注意 .\" これらの関数は GNU の拡張であり、C や POSIX のものではない。 .\" 見てわかるとおり、名前の付け方はあまり良くない。 .\" 多くのシステム (MacOS など) には、 .\" .BR dprintf () .\" という名前の、これとは互換でない関数があり、 .\" たいていはなんらかのデバッグ用の .\" .BR printf (3) .\" になっている。プロトタイプは .\" .\" .BI "void dprintf(int level, const char *" format ", ...);" .\" .\" で、最初のパラメータはデバッグレベルになっている .\" (また出力は .\" .I stderr .\" に行われる)。 .\" さらに、 .\" .BR dprintf () .\" (あるいは .\" .BR DPRINTF ) .\" はデバッグ処理用の printf のマクロとしても良く用いられる。 .\" したがって恐らく、移植性を必要とするプログラムでは、 .\" この関数は用いないほうが良いだろう。 .\" .\" より良い名前は .\" .BR fdprintf () .\" だったかと思われる。 .SH 関連項目 .BR printf (3)