OAR

RTEMS GNU Tools On-Line Library


fclose

PREV UP NEXT Bookshelf

3.2: fclose---close a file

Synopsis

#include <stdio.h>
int fclose(FILE *fp);

Description
If the file or stream identified by fp is open, fclose closes it, after first ensuring that any pending data is written (by calling fflush(fp)).


Returns
fclose returns 0 if successful (including when fp is NULL or not an open file); otherwise, it returns EOF.


Portability
fclose is required by ANSI C.

Required OS subroutines: close, fstat, isatty, lseek, read, sbrk, write.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.