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