mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-12-23 05:30:18 +00:00
54 lines
1.5 KiB
Groff
54 lines
1.5 KiB
Groff
|
.\"
|
||
|
.\" Macros for converting newline translation mode of stdio streams.
|
||
|
.\" Devin Reade, 1997
|
||
|
.\"
|
||
|
.\" $Id: fsettext.3,v 1.1 1997/09/19 15:47:54 gdr Exp $
|
||
|
.\"
|
||
|
.TH FSETTEXT 3 "15 September 1997" GNO "Library Routines"
|
||
|
.SH NAME
|
||
|
.BR fsettext ,
|
||
|
.BR fsetbinary
|
||
|
\- set the newline translation mode for a stdio stream.
|
||
|
.SH SYNOPSIS
|
||
|
#include <stdio.h>
|
||
|
.sp 1
|
||
|
void \fBfsettext\fR (FILE *\fIfp\fR);
|
||
|
.br
|
||
|
void \fBfsetbinary\fR (FILE *\fIfp\fR);
|
||
|
.SH DESCRIPTION
|
||
|
The FILE struct for each stdio stream contains information as to whether
|
||
|
or not newline translation (carrige return to linefeed and back) will occur
|
||
|
for that stream. This translation mode is set when the stream is opened
|
||
|
by passing (or not passing) the "\fBb\fR" flag modifier to
|
||
|
.BR fopen (3),
|
||
|
.BR fdopen (3),
|
||
|
or
|
||
|
.BR freopen (3).
|
||
|
.LP
|
||
|
The stdio streams that are already open upon entry into the
|
||
|
.BR main
|
||
|
routine
|
||
|
.RB ( stdin ,
|
||
|
.BR stdout ,
|
||
|
and
|
||
|
.BR stderr )
|
||
|
by default do newline translations. The
|
||
|
.BR fsetbinary
|
||
|
macro allows these translations to be disabled. The
|
||
|
.BR fsettext
|
||
|
macro allows these translations to be reenabled. These macros are not
|
||
|
necessary and should not be used for any other stream pointers.
|
||
|
.LP
|
||
|
These macros must be used before any I/O is performed on the associated
|
||
|
stream. If I/O has already been performed, the results are undefined.
|
||
|
.SH STANDARDS
|
||
|
.BR fsetbinary
|
||
|
and
|
||
|
.BR fsettext
|
||
|
are non-standard routines, and should not be used for programs intended
|
||
|
to be ported to other platforms.
|
||
|
.SH SEE ALSO
|
||
|
.BR fflush (3),
|
||
|
.BR fopen (3),
|
||
|
.BR stdio (3)
|