SCCS-vsn: lib/libc/stdio/ferror.3 6.4
SCCS-vsn: lib/libc/stdio/fopen.3 6.4
SCCS-vsn: lib/libc/stdio/fread.3 6.2
SCCS-vsn: lib/libc/stdio/fseek.3 6.5
SCCS-vsn: lib/libc/stdio/getc.3 6.3
SCCS-vsn: lib/libc/stdio/fgets.3 6.2
SCCS-vsn: lib/libc/stdio/gets.3 6.2
SCCS-vsn: lib/libc/stdio/printf.3 6.6
SCCS-vsn: lib/libc/stdio/putc.3 6.3
SCCS-vsn: lib/libc/stdio/fputs.3 6.2
SCCS-vsn: lib/libc/stdio/scanf.3 6.2
SCCS-vsn: lib/libc/stdio/setbuf.3 6.4
SCCS-vsn: lib/libc/stdio/ungetc.3 6.2
13 files changed:
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
-.\" @(#)ferror.3 6.3 (Berkeley) %G%
+.\" @(#)ferror.3 6.4 (Berkeley) %G%
.UC 4
.SH NAME
ferror, feof, clearerr, fileno \- stream status inquiries
.UC 4
.SH NAME
ferror, feof, clearerr, fileno \- stream status inquiries
are implemented as macros;
they cannot be redeclared.
.SH "SEE ALSO"
are implemented as macros;
they cannot be redeclared.
.SH "SEE ALSO"
-.\" @(#)fgets.3 6.1 (Berkeley) %G%
+.\" @(#)fgets.3 6.2 (Berkeley) %G%
.AT 3
.SH NAME
gets, fgets \- get a string from a stream
.AT 3
.SH NAME
gets, fgets \- get a string from a stream
.I Fgets
returns its first argument.
.SH "SEE ALSO"
.I Fgets
returns its first argument.
.SH "SEE ALSO"
-puts(3S),
-getc(3S),
-scanf(3S),
-fread(3S),
-ferror(3S)
+puts(3),
+getc(3),
+scanf(3),
+fread(3),
+ferror(3)
.SH DIAGNOSTICS
.I Gets
and
.SH DIAGNOSTICS
.I Gets
and
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
-.\" @(#)fopen.3 6.3 (Berkeley) %G%
+.\" @(#)fopen.3 6.4 (Berkeley) %G%
.UC 4
.SH NAME
fopen, freopen, fdopen \- open a stream
.UC 4
.SH NAME
fopen, freopen, fdopen \- open a stream
-.\" @(#)fputs.3 6.1 (Berkeley) %G%
+.\" @(#)fputs.3 6.2 (Berkeley) %G%
.AT 3
.SH NAME
puts, fputs \- put a string on a stream
.AT 3
.SH NAME
puts, fputs \- put a string on a stream
.PP
Neither routine copies the terminal null character.
.SH "SEE ALSO"
.PP
Neither routine copies the terminal null character.
.SH "SEE ALSO"
-fopen(3S),
-gets(3S),
-putc(3S),
-printf(3S),
-ferror(3S)
+fopen(3),
+gets(3),
+putc(3),
+printf(3),
+ferror(3)
.I fwrite
.SH BUGS
.I Puts
.I fwrite
.SH BUGS
.I Puts
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
-.\" @(#)fread.3 6.1 (Berkeley) %G%
+.\" @(#)fread.3 6.2 (Berkeley) %G%
.UC 4
.SH NAME
fread, fwrite \- buffered binary input/output
.UC 4
.SH NAME
fread, fwrite \- buffered binary input/output
.SH "SEE ALSO"
read(2),
write(2),
.SH "SEE ALSO"
read(2),
write(2),
-fopen(3S),
-getc(3S),
-putc(3S),
-gets(3S),
-puts(3S),
-printf(3S),
-scanf(3S)
+fopen(3),
+getc(3),
+putc(3),
+gets(3),
+puts(3),
+printf(3),
+scanf(3)
.SH DIAGNOSTICS
.I Fread
and
.SH DIAGNOSTICS
.I Fread
and
-.\" @(#)fseek.3 6.4 (Berkeley) %G%
+.\" @(#)fseek.3 6.5 (Berkeley) %G%
.AT 3
.SH NAME
fseek, ftell, rewind \- reposition a stream
.AT 3
.SH NAME
fseek, ftell, rewind \- reposition a stream
.PP
.I Fseek
undoes any effects of
.PP
.I Fseek
undoes any effects of
.PP
.I Ftell
returns the current value of the offset relative to the beginning
.PP
.I Ftell
returns the current value of the offset relative to the beginning
0L, L_SET).
.SH "SEE ALSO"
lseek(2),
0L, L_SET).
.SH "SEE ALSO"
lseek(2),
.SH DIAGNOSTICS
.I Fseek
returns \-1 for improper seeks, otherwise zero.
.SH DIAGNOSTICS
.I Fseek
returns \-1 for improper seeks, otherwise zero.
-.\" @(#)getc.3 6.2 (Berkeley) %G%
+.\" @(#)getc.3 6.3 (Berkeley) %G%
.AT 3
.SH NAME
getc, getchar, fgetc, getw \- get character or word from stream
.AT 3
.SH NAME
getc, getchar, fgetc, getw \- get character or word from stream
integer value,
.I feof
and
integer value,
.I feof
and
should be used to check the success of
.IR getw .
.I Getw
assumes no special alignment in the file.
.SH "SEE ALSO"
should be used to check the success of
.IR getw .
.I Getw
assumes no special alignment in the file.
.SH "SEE ALSO"
-clearerr(3S),
-fopen(3S),
-putc(3S),
-gets(3S),
-scanf(3S),
-fread(3S),
-ungetc(3S)
+clearerr(3),
+fopen(3),
+putc(3),
+gets(3),
+scanf(3),
+fread(3),
+ungetc(3)
.SH DIAGNOSTICS
These functions return the integer constant
.SM
.SH DIAGNOSTICS
These functions return the integer constant
.SM
and all subsequent attempts to read will return
.B EOF
until the condition is cleared with
and all subsequent attempts to read will return
.B EOF
until the condition is cleared with
.SH BUGS
Because it is implemented as a macro,
.I getc
.SH BUGS
Because it is implemented as a macro,
.I getc
-.\" @(#)gets.3 6.1 (Berkeley) %G%
+.\" @(#)gets.3 6.2 (Berkeley) %G%
.AT 3
.SH NAME
gets, fgets \- get a string from a stream
.AT 3
.SH NAME
gets, fgets \- get a string from a stream
.I Fgets
returns its first argument.
.SH "SEE ALSO"
.I Fgets
returns its first argument.
.SH "SEE ALSO"
-puts(3S),
-getc(3S),
-scanf(3S),
-fread(3S),
-ferror(3S)
+puts(3),
+getc(3),
+scanf(3),
+fread(3),
+ferror(3)
.SH DIAGNOSTICS
.I Gets
and
.SH DIAGNOSTICS
.I Gets
and
-.\" @(#)printf.3 6.5 (Berkeley) %G%
+.\" @(#)printf.3 6.6 (Berkeley) %G%
-.TH PRINTF 3S "October 22, 1987"
+.TH PRINTF 3 "October 22, 1987"
.AT 3
.SH NAME
printf, fprintf, sprintf \- formatted output conversion
.AT 3
.SH NAME
printf, fprintf, sprintf \- formatted output conversion
Characters generated by
.I printf
are printed as by
Characters generated by
.I printf
are printed as by
.PP
.SH "RETURN VALUE"
The functions all return
.PP
.SH "RETURN VALUE"
The functions all return
.IP
printf("pi = %.5f", 4*atan(1.0));
.SH "SEE ALSO"
.IP
printf("pi = %.5f", 4*atan(1.0));
.SH "SEE ALSO"
.SH BUGS
The functions still supports \fI%D\fP, \fI%O\fP, and \fI%U\fP. Do not
use these formats, as they will be disappearing soon.
.SH BUGS
The functions still supports \fI%D\fP, \fI%O\fP, and \fI%U\fP. Do not
use these formats, as they will be disappearing soon.
-.\" @(#)putc.3 6.2 (Berkeley) %G%
+.\" @(#)putc.3 6.3 (Berkeley) %G%
.AT 3
.SH NAME
putc, putchar, fputc, putw \- put character or word on a stream
.AT 3
.SH NAME
putc, putchar, fputc, putw \- put character or word on a stream
.I Putw
neither assumes nor causes special alignment in the file.
.SH "SEE ALSO"
.I Putw
neither assumes nor causes special alignment in the file.
.SH "SEE ALSO"
-fopen(3S),
-fclose(3S),
-getc(3S),
-puts(3S),
-printf(3S),
-fread(3S)
+fopen(3),
+fclose(3),
+getc(3),
+puts(3),
+printf(3),
+fread(3)
.SH DIAGNOSTICS
These functions return the constant
.SM
.B EOF
upon error. Since this is a good integer,
.SH DIAGNOSTICS
These functions return the constant
.SM
.B EOF
upon error. Since this is a good integer,
should be used to detect
.I putw
errors.
should be used to detect
.I putw
errors.
-.\" @(#)scanf.3 6.1 (Berkeley) %G%
+.\" @(#)scanf.3 6.2 (Berkeley) %G%
.AT 3
.SH NAME
scanf, fscanf, sscanf \- formatted input conversion
.AT 3
.SH NAME
scanf, fscanf, sscanf \- formatted input conversion
will return `a'.
.SH "SEE ALSO"
atof(3),
will return `a'.
.SH "SEE ALSO"
atof(3),
.SH DIAGNOSTICS
The
.I scanf
.SH DIAGNOSTICS
The
.I scanf
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
-.\" @(#)setbuf.3 6.3 (Berkeley) %G%
+.\" @(#)setbuf.3 6.4 (Berkeley) %G%
.UC 4
.SH NAME
setbuf, setbuffer, setlinebuf \- assign buffering to a stream
.UC 4
.SH NAME
setbuf, setbuffer, setlinebuf \- assign buffering to a stream
encountered or input is read from stdin.
.I Fflush
(see
encountered or input is read from stdin.
.I Fflush
(see
may be used to force the block out early.
Normally all files are block buffered.
A buffer is obtained from
may be used to force the block out early.
Normally all files are block buffered.
A buffer is obtained from
upon the first
.I getc
or
upon the first
.I getc
or
on the file.
If the standard stream
.B stdout
on the file.
If the standard stream
.B stdout
A file can be changed from block buffered or line buffered to unbuffered
by using
.I freopen
A file can be changed from block buffered or line buffered to unbuffered
by using
.I freopen
.SM
.BR NULL .
.SH "SEE ALSO"
.SM
.BR NULL .
.SH "SEE ALSO"
-fopen(3S),
-getc(3S),
-putc(3S),
+fopen(3),
+getc(3),
+putc(3),
-fclose(3S),
-puts(3S),
-printf(3S),
-fread(3S)
+fclose(3),
+puts(3),
+printf(3),
+fread(3)
.SH BUGS
The
.I setbuffer
.SH BUGS
The
.I setbuffer
-.\" @(#)ungetc.3 6.1 (Berkeley) %G%
+.\" @(#)ungetc.3 6.2 (Berkeley) %G%
.AT 3
.SH NAME
ungetc \- push character back into input stream
.AT 3
.SH NAME
ungetc \- push character back into input stream
something has been read from the stream and the stream is actually buffered.
Attempts to push EOF are rejected.
.PP
something has been read from the stream and the stream is actually buffered.
Attempts to push EOF are rejected.
.PP
erases all memory of pushed back characters.
.SH "SEE ALSO"
erases all memory of pushed back characters.
.SH "SEE ALSO"
-getc(3S),
-setbuf(3S),
-fseek(3S)
+getc(3),
+setbuf(3),
+fseek(3)
.SH DIAGNOSTICS
.I Ungetc
returns
.SH DIAGNOSTICS
.I Ungetc
returns