diff options
author | 2006-01-07 16:49:59 +0000 | |
---|---|---|
committer | 2006-01-07 16:49:59 +0000 | |
commit | f398ba01cb26050bb7cc6c72f5f9351a9f0b49a6 (patch) | |
tree | 875f0585147ab716dd2b2209aaff0d29418f4f9e /lib/libc/stdio/printf.3 | |
parent | expand the section on ssh tunnelling machanisms; (diff) | |
download | wireguard-openbsd-f398ba01cb26050bb7cc6c72f5f9351a9f0b49a6.tar.xz wireguard-openbsd-f398ba01cb26050bb7cc6c72f5f9351a9f0b49a6.zip |
improve the RETURN VALUES section;
for such a small diff, this one was hard work...
based on a diff from ray lai;
blood, sweat, and tears (and ok) kettenis
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r-- | lib/libc/stdio/printf.3 | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index e6fe04825f7..3fc265fe566 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.50 2005/09/23 02:33:34 tedu Exp $ +.\" $OpenBSD: printf.3,v 1.51 2006/01/07 16:49:59 jmc Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -604,9 +604,8 @@ The .Fn sprintf , .Fn vprintf , .Fn vfprintf , -.Fn vsprintf , and -.Fn vasprintf +.Fn vsprintf functions return the number of characters printed (not including the trailing @@ -627,15 +626,20 @@ again, not including the final .Pc . If an output or encoding error occurs, a value of \-1 is returned instead. .Pp +The .Fn asprintf and .Fn vasprintf -return a pointer to a buffer sufficiently large to hold the string in the -.Fa ret -argument. -This pointer should be passed to +functions return the number of characters that were output +to the newly allocated string +(excluding the final +.Ql \e0 ) . +A pointer to the newly allocated string is returned in +.Fa ret ; +it should be passed to .Xr free 3 -to release the allocated storage when it is no longer needed. +to release the allocated storage +when it is no longer needed. If sufficient space cannot be allocated, these functions will return \-1. The value of |