Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fflush(3S) — NEXTSTEP 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close(2)

fopen(3S)

setbuf(3S)

FCLOSE(3S)  —  UNIX Programmer’s Manual

NAME

fclose, fflush − close or flush a stream

SYNOPSIS

#include <stdio.h>

int fclose(FILE ∗stream);

int fflush(FILE ∗stream);

DESCRIPTION

Fclose causes any buffers for the named stream to be emptied, and the file to be closed.  Buffers allocated by the standard input/output system are freed. 

Fclose is performed automatically upon calling exit(3).

Fflush causes any buffered data for the named output or update stream to be written to that file.  The stream remains open. 

If stream is a null pointer, the fflush function performs this flushing action on all output and update streams. 

SEE ALSO

close(2), fopen(3S), setbuf(3S)

DIAGNOSTICS

These routines return EOF if stream is not associated with an output file, or if buffered data cannot be transferred to that file. 

ANSI C  —  June 23, 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026