Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fcloseall(DOS) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close(S)

fopen(S)

fclose(S)



     FCLOSEALL(DOS)           XENIX System V            FCLOSEALL(DOS)



     Name
          fclose, fcloseall - Closes streams.

     Syntax
          #include <stdio.h>

          int fclose (stream);
          FILE *stream;

          int fcloseall ( );

     Description
          The fclose and fcloseall functions close a stream or
          streams.  All buffers associated with the stream(s) are
          flushed prior to closing.  System-allocated buffers are
          released when the stream is closed.  Buffers assigned using
          setbuf are not automatically released.

          The fclose function closes the given stream.  The fcloseall
          function closes all open streams except stdin, stdout,
          stderr, stdaux, and stdprn.

     Return Value
          fclose returns 0 if the stream is successfully closed.
          fcloseall returns the total number of streams closed.  Both
          functions return EOF to indicate an error.

     See Also
          close(S), fopen(S), fclose(S)

     Example
          #include <stdio.h>

          FILE *stream; int numclosed;

          stream = fopen ("data","r");
             .
             .
             .

          /* The following statement closes the stream.  */

          fclose (stream);


          /* The following statement closes all streams except **
          stdin, stdout, stderr, stdaux, and stdprn.  */

          numclosed = fcloseall ( );

     Notes
          These calls must be compiled with the -dos flag.



     Page 1                                           (printed 8/7/87)



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