diff options
| author | Warner Losh <imp@FreeBSD.org> | 2001-06-05 23:39:45 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2001-06-05 23:39:45 +0000 |
| commit | 656f411d3312588c08352dec5f7078880c2554e2 (patch) | |
| tree | 277bd02d0cff661513839dd4cbde1a23c819f693 /lib/libc/stdio | |
| parent | 6048cd628a52c8c99c1759a40868cb9a743e71ee (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio')
| -rw-r--r-- | lib/libc/stdio/printf.3 | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index ead6faeecd3a..362c4cb4bcb7 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -150,15 +150,17 @@ to be a NULL pointer. .Fn Snprintf and .Fn vsnprintf -return the number of characters -that would have been written had -.Fa size -been sufficiently large, not counting the terminating -.Ql \e0 -character, or a negative value if an encoding error occurred. -Thus, the null-terminated output has been completely written if and only if -the returned value is nonnegative and less than -.Fa size . +will write at most +.Fa size Ns \-1 +of the characters printed into the output string +(the +.Fa size Ns 'th +character then gets the terminating +.Ql \e0 ) ; +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. The output is always null-terminated. .Pp .Fn Sprintf |
