summaryrefslogtreecommitdiffstats
path: root/man3/fmemopen.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/fmemopen.3')
-rw-r--r--man3/fmemopen.332
1 files changed, 17 insertions, 15 deletions
diff --git a/man3/fmemopen.3 b/man3/fmemopen.3
index 385fcdcc9..dc5ecbcdd 100644
--- a/man3/fmemopen.3
+++ b/man3/fmemopen.3
@@ -19,7 +19,7 @@ const char *" mode );
.P
.RS -4
Feature Test Macro Requirements for glibc (see
-.BR feature_test_macros (7)):
+.MR feature_test_macros 7 ):
.RE
.P
.BR fmemopen ():
@@ -69,9 +69,9 @@ The stream maintains the notion of a current position,
the location where the next I/O operation will be performed.
The current position is implicitly updated by I/O operations.
It can be explicitly updated using
-.BR fseek (3),
+.MR fseek 3 ,
and determined using
-.BR ftell (3).
+.MR ftell 3 .
In all modes other than append,
the initial position is set to the start of the buffer.
In append mode, if no null byte is found within the buffer,
@@ -91,7 +91,7 @@ The initial position is set to the start of the buffer.
The buffer is automatically freed when the stream is closed.
Note that the caller has no way to obtain a pointer to the
temporary buffer allocated by this call (but see
-.BR open_memstream (3)).
+.MR open_memstream 3 ).
.P
If
.I buf
@@ -100,9 +100,11 @@ is not NULL, then it should point to a buffer of at least
bytes allocated by the caller.
.P
When a stream that has been opened for writing is flushed
-.RB ( fflush (3))
+\%(\c
+.MR fflush 3 )
or closed
-.RB ( fclose (3)),
+\%(\c
+.MR fclose 3 ),
a null byte is written at the end of the buffer if there is space.
The caller should ensure that an extra byte is available in the
buffer
@@ -149,7 +151,7 @@ Otherwise, NULL is returned and
is set to indicate the error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
-.BR attributes (7).
+.MR attributes 7 .
.TS
allbox;
lbx lb lb
@@ -188,7 +190,7 @@ enabled by specifying the letter \[aq]b\[aq] as the second character in
.IR mode .
In this mode,
writes don't implicitly add a terminating null byte, and
-.BR fseek (3)
+.MR fseek 3
.B SEEK_END
is relative to the end of the buffer (i.e., the value specified by the
.I size
@@ -204,7 +206,7 @@ This is inconsistent with the treatment of
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12836
.I mode
by
-.BR fopen (3).
+.MR fopen 3 .
.P
Binary mode was removed in glibc 2.22; a \[aq]b\[aq] specified in
.I mode
@@ -213,7 +215,7 @@ has no effect.
There is no file descriptor associated with the file stream
returned by this function
(i.e.,
-.BR fileno (3)
+.MR fileno 3
will return an error if called on the returned stream).
.SH BUGS
Before glibc 2.22, if
@@ -257,7 +259,7 @@ This bug is fixed in glibc 2.22.
Before glibc 2.22,
.\" https://sourceware.org/bugzilla/show_bug.cgi?id=14292
when a call to
-.BR fseek (3)
+.MR fseek 3
with a
.I whence
value of
@@ -282,7 +284,7 @@ ignored \[aq]b\[aq] in
The program below uses
.BR fmemopen ()
to open an input buffer, and
-.BR open_memstream (3)
+.MR open_memstream 3
to open a dynamically sized output buffer.
The program scans its input string (taken from the program's
first command-line argument) reading integers,
@@ -347,6 +349,6 @@ main(int argc, char *argv[])
.EE
.\" SRC END
.SH SEE ALSO
-.BR fopen (3),
-.BR fopencookie (3),
-.BR open_memstream (3)
+.MR fopen 3 ,
+.MR fopencookie 3 ,
+.MR open_memstream 3