diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-04-14 18:19:25 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-04-14 18:19:25 +0000 |
commit | 3d3bbc8f3ad0c6a1ca8417379a2c4e3c9e31901e (patch) | |
tree | a622fef9a9d3709096979e63da83f9987c417b00 /lib/libc/stdio/printf.3 | |
parent | 7a0df57ca13540b7336606bc12e8f1e5bf54f46c (diff) |
Explain what happens when len equals 0 for snprintf().
ok jmc@ millert@
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r-- | lib/libc/stdio/printf.3 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 4931d4e3b3d..1eaf7375db4 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.45 2005/02/25 03:12:44 cloder Exp $ +.\" $OpenBSD: printf.3,v 1.46 2005/04/14 18:19:24 otto Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -165,6 +165,14 @@ if the return value is greater than or equal to the .Fa size argument, the string was too short and some of the printed characters were discarded. +If +.Fa size +is zero, +.Fa str +may be a null pointer and no characters will be written; +the number of bytes that would have been written excluding the terminating +.Ql \e0 +byte, or \-1 on error, will be returned. .Pp .Fn sprintf and |