From 3ddc30745fb6d3dadc43b890ebc80980a58cb35c Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 13 Sep 2011 04:33:35 +0200 Subject: [PATCH] open_memstream.3: A little bit of cleanup. --- lib/libc/stdio/open_memstream.3 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/libc/stdio/open_memstream.3 b/lib/libc/stdio/open_memstream.3 index c019abf9eb..43a109e3a8 100644 --- a/lib/libc/stdio/open_memstream.3 +++ b/lib/libc/stdio/open_memstream.3 @@ -23,7 +23,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd Sept 12, 2011 +.Dd September 12, 2011 .Dt OPEN_MEMSTREAM 3 .Os .Sh NAME @@ -34,28 +34,31 @@ .Sh SYNOPSIS .In stdio.h .Ft FILE * -.Fn open_memstream "char **bufp" "size_t *sizep" +.Fn open_memstream "char **bufp" "size_t *sizep" .Sh DESCRIPTION The .Fn open_memstream -function -creates a FILE stream with a dynamically expanding buffer. A pointer to the -buffer is stored at the +function creates a +.Vt FILE +stream with a dynamically expanding buffer. +A pointer to the buffer is stored at the .Fa bufp argument and the length of the data in the buffer is stored at the .Fa sizep -argument. The pointer and length values may be updated by writes to the buffer. +argument. +The pointer and length values may be updated by writes to the buffer. .Pp -Writes append to the buffer and may reallocate it, invalidating the -.Fa bufp -argument. Writes may fail if the buffer cannot be resized. +Writes append to the buffer and may reallocate it, invalidating the +.Fa bufp +argument. +Writes may fail if the buffer cannot be resized. .Pp The stream is seekable and opened for writing. .Sh RETURN VALUES Upon successful completion, .Fn open_memstream returns a -.Dv FILE +.Vt FILE pointer. Otherwise, .Dv NULL @@ -75,10 +78,10 @@ argument were Memory for the stream buffer or cookie could not be allocated. .El .Sh SEE ALSO -.Xr fmemopen 3 , .Xr fclose 3 , .Xr fflush 3 , -.Xr fopen 3 +.Xr fmemopen 3 , +.Xr fopen 3 .Sh HISTORY The .Fn open_memstream -- 2.41.0