From f8067c8898864c53428a28e32566fbad40cd1765 Mon Sep 17 00:00:00 2001 From: Paul Janzen Date: Sun, 25 Jun 2000 13:52:31 +0000 Subject: correct return values --- lib/libc/stdio/printf.3 | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index ce49b321ecc..100c89e0b45 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.27 2000/04/25 15:15:10 espie Exp $ +.\" $OpenBSD: printf.3,v 1.28 2000/06/25 13:52:30 pjanzen Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -122,7 +122,18 @@ are converted for output. These functions return the number of characters printed (not including the trailing .Ql \e0 -used to end output to strings). +used to end output to strings), +except for +.Fn snprintf +and +.Fn vsnprintf , +which return the number of characters that would have been printed if the +.Fa size +were unlimited +.Po +again, not including the final +.Ql \e0 +.Pc . .Pp .Fn asprintf and @@ -138,16 +149,6 @@ will return \-1 and set .Fa ret to be a null pointer. .Pp -If -.Fn asprintf -or -.Fn vasprintf -are given a -.Fa size -of 0, they set -.Fa ret -to be a null pointer. -.Pp .Fn snprintf and .Fn vsnprintf -- cgit v1.2.3