summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/printf.3
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2010-09-06 14:52:55 +0000
committerchristos <christos@NetBSD.org>2010-09-06 14:52:55 +0000
commit4ddc2fb37ca2e30de6086b84b0f05ae0c8204929 (patch)
tree93b0a099b0cbd075e5c1ebe99821ba78aafb5a3d /lib/libc/stdio/printf.3
parent748dbd74c643c4ca9410e562a6397e955e431b3a (diff)
add dprintf and vdprintf
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r--lib/libc/stdio/printf.321
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 27333d06901..18f49f12a61 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: printf.3,v 1.52 2010/05/13 21:52:43 joerg Exp $
+.\" $NetBSD: printf.3,v 1.53 2010/09/06 14:52:55 christos Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,18 +33,20 @@
.\"
.\" @(#)printf.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd March 21, 2010
+.Dd August 28, 2010
.Dt PRINTF 3
.Os
.Sh NAME
.Nm printf ,
.Nm fprintf ,
+.Nm dprintf
.Nm sprintf ,
.Nm snprintf ,
.Nm asprintf ,
.Nm vprintf ,
.Nm vfprintf ,
.Nm vsprintf ,
+.Nm vdprintf ,
.Nm vsnprintf ,
.Nm vasprintf
.Nd formatted output conversion
@@ -57,6 +59,8 @@
.Ft int
.Fn fprintf "FILE * restrict stream" "const char * restrict format" ...
.Ft int
+.Fn dprintf "int fd" "const char * restrict format" ...
+.Ft int
.Fn sprintf "char * restrict str" "const char * restrict format" ...
.Ft int
.Fn snprintf "char * restrict str" "size_t size" "const char * restrict format" ...
@@ -70,6 +74,8 @@
.Ft int
.Fn vsprintf "char * restrict str" "const char * restrict format" "va_list ap"
.Ft int
+.Fn vdprintf "int fd" "const char * restrict format" "va_list ap"
+.Ft int
.Fn vsnprintf "char * restrict str" "size_t size" "const char * restrict format" "va_list ap"
.Ft int
.Fn vasprintf "char ** restrict ret" "const char * restrict format" "va_list ap"
@@ -92,6 +98,11 @@ and
.Fn vfprintf
write output to the given output
.Fa stream ;
+.Fn dprintf
+and
+.Fn vdprintf
+write output to the give file descriptor
+.Fa fd ;
.Fn sprintf ,
.Fn snprintf ,
.Fn vsprintf ,
@@ -814,6 +825,12 @@ The functions
and
.Fn vasprintf
are modeled on the ones that first appeared in the GNU C library.
+The functions
+.Fn dprintf
+and
+.Fn vdprintf
+are parts of POSIX 200805 and appeared in
+.Nx 6.0 .
.Sh CAVEATS
Because
.Fn sprintf