summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/printf.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r--lib/libc/stdio/printf.329
1 files changed, 26 insertions, 3 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 01307ba9fa7..61767cd4784 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.59 2011/09/03 22:59:07 jmc Exp $
+.\" $OpenBSD: printf.3,v 1.60 2013/01/30 00:08:13 brad Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)printf.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: September 3 2011 $
+.Dd $Mdocdate: January 30 2013 $
.Dt PRINTF 3
.Os
.Sh NAME
@@ -42,11 +42,13 @@
.Nm sprintf ,
.Nm snprintf ,
.Nm asprintf ,
+.Nm dprintf ,
.Nm vprintf ,
.Nm vfprintf ,
.Nm vsprintf ,
.Nm vsnprintf ,
-.Nm vasprintf
+.Nm vasprintf ,
+.Nm vdprintf
.Nd formatted output conversion
.Sh SYNOPSIS
.Fd #include <stdio.h>
@@ -60,6 +62,8 @@
.Fn snprintf "char *str" "size_t size" "const char *format" ...
.Ft int
.Fn asprintf "char **ret" "const char *format" ...
+.Ft int
+.Fn dprintf "int fd" "const char * restrict format" ...
.Fd #include <stdarg.h>
.Ft int
.Fn vprintf "const char *format" "va_list ap"
@@ -71,6 +75,8 @@
.Fn vsnprintf "char *str" "size_t size" "const char *format" "va_list ap"
.Ft int
.Fn vasprintf "char **ret" "const char *format" "va_list ap"
+.Ft int
+.Fn vdprintf "int fd" "const char * restrict format" "va_list ap"
.Sh DESCRIPTION
The
.Fn printf
@@ -95,6 +101,10 @@ and
.Fn vfprintf
write output to the supplied stream pointer
.Fa stream ;
+.Fn dprintf
+and
+.Fn vdprintf
+write output to the given file descriptor;
.Fn sprintf ,
.Fn snprintf ,
.Fn vsprintf ,
@@ -754,6 +764,12 @@ and
.Fn vsprintf
functions conform to
.St -ansiC .
+The
+.Fn dprintf
+and
+.Fn vdprintf
+functions conform to
+.St -p1003.1-2008 .
.Sh HISTORY
The functions
.Fn snprintf
@@ -769,6 +785,13 @@ and
first appeared in the GNU C library.
This implementation first appeared in
.Ox 2.3 .
+.Pp
+The functions
+.Fn dprintf
+and
+.Fn vdprintf
+first appeared in
+.Ox 5.3 .
.Sh CAVEATS
The conversion formats
.Cm \&%D ,