From 3e186c29bb4c911e133dfcfe00cb21cc1cbea87c Mon Sep 17 00:00:00 2001 From: gshapiro Date: Wed, 30 May 2001 23:47:14 +0000 Subject: [PATCH] Correct the documentation for snprintf() and vsprintf() which actually return the number of characters that would have been in the new string. Obtained from: OpenBSD MFC after: 3 days --- lib/libc/stdio/printf.3 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 590c1c0bfddb..722f351ca3cb 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -118,7 +118,18 @@ 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