Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fclose(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close

exit, _exit

fopen, freopen, fdopen

setbuf, setvbuf

standard i/o library

fclose, fflush

Purpose

     Closes or flushes a stream.

Library

     Standard I/O Library (libc.a)

Syntax

     #include <stdio.h>

     int fclose (stream)                       int fflush (stream)
     FILE *stream;                             FILE *stream;
     Description

     The fclose subroutine writes  buffered data to the stream
     specified  by the  stream parameter  and then  closes the
     stream.

     The  fclose subroutine  is automatically  called for  all
     open files when the exit system call is invoked.

     The fflush  subroutine writes  any buffered data  for the
     stream specified  by the stream parameter  and leaves the
     stream open.

     Return Value

     Upon  successful  completion,  both the  fclose  and  the
     fflush subroutines  return a  value of  0.  If  either of
     these subroutines  fails for any reason,  then it returns
     the value EOF.

     Related Information

     In this  book:  "close," "exit, _exit,"  "fopen, freopen,
     fdopen," "setbuf, setvbuf," and "standard i/o library."

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