FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
dev_pipe_close.c
Go to the documentation of this file.
1
/* file device */
2
3
#include "
fb.h
"
4
5
int
fb_DevPipeClose
(
FB_FILE
*
handle
)
6
{
7
#if defined( HOST_DOS ) || defined( HOST_UNIX ) || defined( HOST_WIN32 )
8
FILE *fp;
9
10
FB_LOCK
();
11
12
fp = (FILE*) handle->
opaque
;
13
if
( fp !=
NULL
) {
14
#ifdef HOST_MINGW
15
_pclose( fp );
16
#else
17
pclose( fp );
18
#endif
19
}
20
21
handle->
opaque
=
NULL
;
22
23
FB_UNLOCK
();
24
return
fb_ErrorSetNum
(
FB_RTERROR_OK
);
25
#else
26
return
fb_ErrorSetNum
(
FB_RTERROR_ILLEGALFUNCTIONCALL
);
27
#endif
28
}
rtlib
dev_pipe_close.c
Generated on Thu Jan 23 2014 19:40:08 for FreeBASIC by
1.8.4