gno/usr.man/man3/fsettext.3

57 lines
1.5 KiB
Groff
Raw Normal View History

1997-09-19 15:47:55 +00:00
.\"
.\" Macros for converting newline translation mode of stdio streams.
.\" Devin Reade, 1997
.\"
.\" $Id: fsettext.3,v 1.2 1998/04/29 03:33:13 gdr-ftp Exp $
1997-09-19 15:47:55 +00:00
.\"
.TH FSETTEXT 3 "28 April 1998" GNO "Library Routines"
1997-09-19 15:47:55 +00:00
.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, other
than as described in the
.BR funopen (3)
manual page.
1997-09-19 15:47:55 +00:00
.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)