2007-08-24 19:49:07 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2016-05-19 12:15:22 +00:00
|
|
|
int fclose(FILE* file)
|
2006-09-07 14:14:53 +00:00
|
|
|
{
|
2016-05-19 12:15:22 +00:00
|
|
|
if(!file)
|
|
|
|
{
|
|
|
|
errno = E_INVALIDPTR;
|
|
|
|
return EOF;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(file->buffer)
|
|
|
|
free(file->buffer);
|
2018-03-05 17:53:31 +00:00
|
|
|
if(file->filename)
|
|
|
|
free(file->filename);
|
2006-09-07 14:14:53 +00:00
|
|
|
free(file);
|
2016-05-19 12:15:22 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|