summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/printf.3
diff options
context:
space:
mode:
authormichaels <michaels@cvs.openbsd.org>1996-09-29 01:26:18 +0000
committermichaels <michaels@cvs.openbsd.org>1996-09-29 01:26:18 +0000
commit854ae272c5ef8eefd4de5b37a41adc8fa49249a2 (patch)
tree66fa1bdbcf8970f42c024008eb6faa4d3dd1de80 /lib/libc/stdio/printf.3
parent71359bbabe7c9889a72c2144a046db9b59d38cbf (diff)
Document printf addition. From Mark Diekhans (markd@grizzly.com).
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r--lib/libc/stdio/printf.317
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index d5d35c59254..319a4fdc89f 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.2 1996/08/19 08:32:57 tholo Exp $
+.\" $OpenBSD: printf.3,v 1.3 1996/09/29 01:26:17 michaels Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -171,6 +171,17 @@ After the
the following appear in sequence:
.Bl -bullet
.It
+An optional field, consisting of a decimal digit string followed by a
+.Cm $ ,
+specifying the next argument to access.
+If this field is not provided, the argument following the last
+argument accessed will be used.
+Arguments are numbered starting at
+.Cm 1 .
+If unaccessed arguments in the format string are interspersed with
+ones that are accessed the results will be indeterminate.
+
+.It
Zero or more of the following flags:
.Bl -hyphen
.It
@@ -389,6 +400,8 @@ A character that specifies the type of conversion to be applied.
A field width or precision, or both, may be indicated by
an asterisk
.Ql *
+or an asterisk followed by one or more decimal digits and a
+.Ql $
instead of a
digit string.
In this case, an
@@ -397,6 +410,8 @@ argument supplies the field width or precision.
A negative field width is treated as a left adjustment flag followed by a
positive field width; a negative precision is treated as though it were
missing.
+If a single format directive mixes positional (nn$) and
+non-positional arguments, the results are undefined.
.Pp
The conversion specifiers and their meanings are:
.Bl -tag -width "diouxX"