FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
dev_file_unlock.c
Go to the documentation of this file.
1
/* file device */
2
3
#include "
fb.h
"
4
5
int
fb_DevFileUnlock
(
FB_FILE
*
handle
,
fb_off_t
position,
fb_off_t
size
)
6
{
7
int
res;
8
FILE *fp;
9
10
if
( size==0 )
11
return
fb_ErrorSetNum
(
FB_RTERROR_ILLEGALFUNCTIONCALL
);
12
13
FB_LOCK
();
14
15
fp = (FILE*) handle->
opaque
;
16
if
( fp ==
NULL
) {
17
FB_UNLOCK
();
18
return
fb_ErrorSetNum
(
FB_RTERROR_ILLEGALFUNCTIONCALL
);
19
}
20
21
res =
fb_hFileUnlock
( fp, position, size );
22
23
FB_UNLOCK
();
24
25
return
res;
26
}
rtlib
dev_file_unlock.c
Generated on Thu Jan 23 2014 19:40:08 for FreeBASIC by
1.8.4