.\" 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" .\"O .SH NAME .SH 名前 .\"O dprintf, vdprintf \- print to a file descriptor dprintf, vdprintf \- ファイルディスクリプターに文字出力する .\"O .SH SYNOPSIS .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 .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR dprintf (), .BR vdprintf (): .PD 0 .ad l .RS 4 .TP 4 .\"O Since glibc 2.10: glibc 2.10 以降: _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L .TP .\"O Before glibc 2.10: glibc 2.10 より前: _GNU_SOURCE .RE .ad .PD .\"O .SH DESCRIPTION .SH 説明 .\"O The functions .\"O .BR dprintf () .\"O and .\"O .BR vdprintf () .\"O (as found in the glibc2 library) are exact analogs of .\"O .BR fprintf (3) .\"O and .\"O .BR vfprintf (3), .\"O except that they output to a file descriptor .\"O .I fd .\"O instead of to a .\"O .I stdio .\"O stream. (glibc2 ライブラリにおける) .BR dprintf () 関数と .BR vdprintf () 関数とは、それぞれ .BR fprintf (3) 関数と .BR vfprintf (3) 関数とにちょうど対応するが、 これらは .I stdio ストリームではなくファイルディスクリプター .I fd に対して出力を行う。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O These functions are GNU extensions that are nowadays specified in .\"O POSIX.1-2008. これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されている。 .\"O .\" .SH NOTES .\" .SH 注意 .\"O .\" These functions are GNU extensions, not in C or POSIX. .\"O .\" Clearly, the names were badly chosen. .\"O .\" Many systems (like MacOS) have incompatible functions called .\"O .\" .BR dprintf (), .\"O .\" usually some debugging version of .\"O .\" .BR printf (3), .\"O .\" perhaps with a prototype like .\"O .\" .\"O .\" .BI "void dprintf(int level, const char *" format ", ...);" .\"O .\" .\"O .\" where the first parameter is a debugging level (and output is to .\"O .\" .IR stderr ). .\" これらの関数は GNU の拡張であり、C や POSIX のものではない。 .\" 見てわかるとおり、名前の付け方はあまり良くない。 .\" 多くのシステム (MacOS など) には、 .\" .BR dprintf () .\" という名前の、これとは互換でない関数があり、 .\" たいていはなんらかのデバッグ用の .\" .BR printf (3) .\" になっている。プロトタイプは .\" .\" .BI "void dprintf(int level, const char *" format ", ...);" .\" .\" で、最初のパラメータはデバッグレベルになっている .\" (また出力は .\" .I stderr .\" に行われる)。 .\"O .\" Moreover, .\"O .\" .BR dprintf () .\"O .\" (or .\"O .\" .BR DPRINTF ) .\"O .\" is also a popular macro name for a debugging printf. .\"O .\" So, probably, it is better to avoid this function in programs .\"O .\" intended to be portable. .\"O .\" .\"O .\" A better name would have been .\"O .\" .BR fdprintf (). .\" さらに、 .\" .BR dprintf () .\" (あるいは .\" .BR DPRINTF ) .\" はデバッグ処理用の printf のマクロとしても良く用いられる。 .\" したがって恐らく、移植性を必要とするプログラムでは、 .\" この関数は用いないほうが良いだろう。 .\" .\" より良い名前は .\" .BR fdprintf () .\" だったかと思われる。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR printf (3)