.\" Chris Torek and the American National Standards Committee X3,
.\" on Information Processing Systems.
.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
.\"
.\" @(#)fopen.3 6.8 (Berkeley) 6/29/91
.\"
operation between write and read operations on such a stream.
This operation may be an apparent no-op
(as in \fIfseek(..., 0L, SEEK_CUR)\fP
-called for its synchronizing side effect.
+called for its synchronizing side effect).
.PP
Opening a file in append mode (\fBa\fP as the first character of
.IR mode )
at end-of-file, as if preceded the call:
.nf
- fseek(stream,0,SEEK_END);
+ fseek(stream, 0, SEEK_END);
.fi
.PP
The
.BR freopen ()
function is to change the file associated with a standard text stream
.RI ( stderr ", " stdin ", or " stdout ).
-.SH "RETURN VALUE"
+.SH RETURN VALUE
Upon successful completion
.BR fopen (),
.BR fdopen ()
.I errno
for any of the errors specified for the routines
.BR open (2),
-.BR fclose (3)
+.BR fclose (3),
and
.BR fflush (3).
-.SH "CONFORMING TO"
+.SH CONFORMING TO
The
.BR fopen ()
and
.BR fdopen ()
function conforms to POSIX.1-1990.
.SH NOTES
-.SS Glibc Notes
+.SS Glibc notes
The GNU C library allows the following extensions for the string specified in
.IR mode :
.TP
.\" As at glibc 2.4:
use of
.BR mmap (2)
-is only attempted for a file opened for reading.
+is attempted only for a file opened for reading.
.TP
.B x
.\" Since glibc 2.0?
-.\" FIXME C11 specifies this flag
+.\" FIXME . C11 specifies this flag
Open the file exclusively
(like the
.B O_EXCL
.IR mode
(i.e., the characters preceding the "ccs" specification),
the glibc implementation of
-.\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
+.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12685
.BR fopen ()
and
.BR freopen ()
.BR fdopen ()
parses at most 5 characters in
.IR mode .
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR open (2),
.BR fclose (3),
.BR fileno (3),
.BR fmemopen (3),
.BR fopencookie (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.