2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" 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.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" 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 <joey@infodrom.org>.
|
|
|
|
.\"
|
2010-09-15 06:36:37 +00:00
|
|
|
.TH DPRINTF 3 2010-09-15 "GNU" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
dprintf, vdprintf \- print to a file descriptor
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <stdio.h>
|
|
|
|
.sp
|
|
|
|
.BI "int dprintf(int " fd ", const char *" format ", ...);"
|
|
|
|
.sp
|
|
|
|
.BI "int vdprintf(int " fd ", const char *" format ", va_list " ap );
|
2010-09-15 06:36:37 +00:00
|
|
|
.sp
|
|
|
|
.in -4n
|
|
|
|
Feature Test Macro Requirements for glibc (see
|
|
|
|
.BR feature_test_macros (7)):
|
|
|
|
.in
|
|
|
|
.sp
|
|
|
|
.BR dprintf (),
|
|
|
|
.BR vdprintf ():
|
faccessat.2, dprintf.3, fexecve.3, fmemopen.3, mbsnrtowcs.3, mkfifoat.3, opendir.3, stpcpy.3, stpncpy.3, strnlen.3, strsignal.3, wcpcpy.3, wcpncpy.3, wcscasecmp.3, wcsdup.3, wcsncasecmp.3, wcsnlen.3, wcsnrtombs.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-09-19 16:57:10 +00:00
|
|
|
.PD 0
|
|
|
|
.ad l
|
|
|
|
.RS 4
|
|
|
|
.TP 4
|
|
|
|
Since glibc 2.10:
|
|
|
|
_XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
|
|
|
|
.TP
|
2010-09-15 06:36:37 +00:00
|
|
|
Before glibc 2.10:
|
|
|
|
_GNU_SOURCE
|
faccessat.2, dprintf.3, fexecve.3, fmemopen.3, mbsnrtowcs.3, mkfifoat.3, opendir.3, stpcpy.3, stpncpy.3, strnlen.3, strsignal.3, wcpcpy.3, wcpncpy.3, wcscasecmp.3, wcsdup.3, wcsncasecmp.3, wcsnlen.3, wcsnrtombs.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-09-19 16:57:10 +00:00
|
|
|
.RE
|
|
|
|
.ad
|
|
|
|
.PD
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
The functions
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR dprintf ()
|
2004-11-03 13:51:07 +00:00
|
|
|
and
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR vdprintf ()
|
2007-06-08 09:56:56 +00:00
|
|
|
(as found in the glibc2 library) are exact analogs of
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR fprintf (3)
|
2004-11-03 13:51:07 +00:00
|
|
|
and
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR vfprintf (3),
|
2004-11-03 13:51:07 +00:00
|
|
|
except that they output to a file descriptor
|
|
|
|
.I fd
|
2008-06-11 13:52:05 +00:00
|
|
|
instead of to a
|
|
|
|
.I stdio
|
|
|
|
stream.
|
2007-05-19 04:30:20 +00:00
|
|
|
.SH "CONFORMING TO"
|
2008-08-06 12:04:37 +00:00
|
|
|
These functions are GNU extensions that are nowadays specified in
|
2010-11-01 06:21:04 +00:00
|
|
|
POSIX.1-2008.
|
2008-06-11 13:52:05 +00:00
|
|
|
.\" .SH NOTES
|
|
|
|
.\" These functions are GNU extensions, not in C or POSIX.
|
|
|
|
.\" Clearly, the names were badly chosen.
|
|
|
|
.\" Many systems (like MacOS) have incompatible functions called
|
|
|
|
.\" .BR dprintf (),
|
|
|
|
.\" usually some debugging version of
|
|
|
|
.\" .BR printf (3),
|
|
|
|
.\" perhaps with a prototype like
|
2008-06-12 11:52:08 +00:00
|
|
|
.\"
|
2008-06-11 13:52:05 +00:00
|
|
|
.\" .BI "void dprintf(int level, const char *" format ", ...);"
|
2008-06-12 11:52:08 +00:00
|
|
|
.\"
|
2008-07-10 20:53:08 +00:00
|
|
|
.\" where the first argument is a debugging level (and output is to
|
2008-06-11 13:52:05 +00:00
|
|
|
.\" .IR stderr ).
|
|
|
|
.\" Moreover,
|
|
|
|
.\" .BR dprintf ()
|
|
|
|
.\" (or
|
|
|
|
.\" .BR DPRINTF )
|
|
|
|
.\" is also a popular macro name for a debugging printf.
|
|
|
|
.\" So, probably, it is better to avoid this function in programs
|
|
|
|
.\" intended to be portable.
|
2008-06-12 11:52:08 +00:00
|
|
|
.\"
|
2008-06-11 13:52:05 +00:00
|
|
|
.\" A better name would have been
|
|
|
|
.\" .BR fdprintf ().
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
getresuid.2, intro.2, mremap.2, open.2, poll.2, posix_fadvise.2, pread.2, remap_file_pages.2, setresuid.2, signal.2, splice.2, sync_file_range.2, tee.2, vmsplice.2, INFINITY.3, asprintf.3, assert_perror.3, basename.3, bsd_signal.3, canonicalize_file_name.3, clog10.3, crypt.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, encrypt.3, exp10.3, fcloseall.3, fenv.3, ffs.3, fmemopen.3, fopencookie.3, ftw.3, getdate.3, getline.3, getloadavg.3, getopt.3, getsubopt.3, getutent.3, grantpt.3, hsearch.3, intro.3, lseek64.3, memmem.3, mempcpy.3, mq_receive.3, mq_send.3, posix_fallocate.3, pow10.3, program_invocation_name.3, ptsname.3, putgrent.3, readdir.3, sigset.3, sincos.3, stpcpy.3, stpncpy.3, strchr.3, strfry.3, strnlen.3, strptime.3, strsignal.3, strstr.3, strverscmp.3, swab.3, sysv_signal.3, tsearch.3, unlocked_stdio.3, unlockpt.3, wcpcpy.3, wcpncpy.3, wcsdup.3, wcwidth.3: SEE ALSO: Remove redundant reference to feature_test_macros(7)
Reported-by: Florian Lehmann <flo.lehmann@googlemail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-10-31 05:05:22 +00:00
|
|
|
.BR printf (3)
|