summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/printf.3
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-03-01 20:41:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-03-01 20:41:57 +0000
commitae38941d9fb3badfdbb2fd2ec7b689cb0462e959 (patch)
tree1a3b4d5d96bcef10ad7f162811a2f9d5b0ebdce0 /lib/libc/stdio/printf.3
parenta53a154f4bc9fffefcb0f58cceeda737e4ea17fa (diff)
talk about positional arguments and sizes; james@oaktree.co.uk
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r--lib/libc/stdio/printf.310
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index dd3a4f24054..f2b8b9ff547 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.14 1999/02/27 21:55:46 deraadt Exp $
+.\" $OpenBSD: printf.3,v 1.15 1999/03/01 20:41:56 deraadt Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -190,8 +190,6 @@ 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
@@ -681,3 +679,9 @@ interface is not available on older
systems and the
.Fn asprintf
interface is not portable.
+.Pp
+There is no way for printf to know the size of each argument passed. If
+you use positional arguments you must ensure that all parameters, up to the
+last positionally-specified parameter, are used in the format string. This
+allows for the format string to be parsed for this information. Failure
+to do this will mean your code is non-portable and liable to fail.