summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-04-01 18:45:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-04-01 18:45:17 +0000
commit27ac101e4e05c94efc930e6d8bee19099d9129a1 (patch)
tree6e0a898a693b0ed1e0c658960b52453dab1accab
parent88c636def1fb4f2e359c7150ef91367460252fbc (diff)
clarify return values, prompted by moritz; ok moritz jmc
-rw-r--r--lib/libc/stdio/printf.312
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 7a6cb1fd984..650af91b66e 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.52 2006/01/13 17:56:18 millert Exp $
+.\" $OpenBSD: printf.3,v 1.53 2007/04/01 18:45:16 deraadt Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -537,14 +537,19 @@ In no case does a non-existent or small field width cause truncation of
a field; if the result of a conversion is wider than the field width, the
field is expanded to contain the conversion result.
.Sh RETURN VALUES
+For all these functions if an output or encoding error occurs, a value
+of \-1 is returned.
+.Pp
The
.Fn printf ,
.Fn fprintf ,
.Fn sprintf ,
.Fn vprintf ,
.Fn vfprintf ,
+.Fn vsprintf ,
+.Fn asprintf ,
and
-.Fn vsprintf
+.Fn vasprintf
functions
return the number of characters printed
(not including the trailing
@@ -561,9 +566,8 @@ been output if the
were unlimited
.Po
again, not including the final
-.Ql \e0
+.Ql \e0 .
.Pc .
-If an output or encoding error occurs, a value of \-1 is returned instead.
.Pp
The
.Fn asprintf