blob: e4b5c6aeb150c314564d9366e4a4d3ead0771281 [file] [log] [blame]
/*
* fclose.c
*/
#include "stdioint.h"
int fclose(FILE *file)
{
struct _IO_file_pvt *f = stdio_pvt(file);
int rv;
fflush(file);
rv = f->funcs.close(f->cookie);
/* Remove from linked list */
f->next->prev = f->prev;
f->prev->next = f->next;
free(f);
return rv;
}