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