* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)fclose.c 5.2 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
if (fp
->_flags
== 0) { /* not open! */
r
= fp
->_flags
& __SWR
? __sflush(fp
) : 0;
if (fp
->_close
!= NULL
&& (*fp
->_close
)(fp
->_cookie
) < 0)
free((char *)fp
->_bf
._base
);
fp
->_flags
= 0; /* release this FILE for reuse */