FreeBASIC  0.91.0
dev_file_close.c
Go to the documentation of this file.
1 /* file device */
2 
3 #include "fb.h"
4 
6 {
7  FILE *fp;
8 
9  FB_LOCK();
10 
11  fp = (FILE*) handle->opaque;
12 
13  if( fp != NULL ) {
14  fclose( fp );
15  }
16 
17  handle->opaque = NULL;
18 
19  FB_UNLOCK();
20 
21  return fb_ErrorSetNum( FB_RTERROR_OK );
22 }