FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
file_hlock.c
Go to the documentation of this file.
1
/* low-level lock and unlock functions */
2
3
#include "../fb.h"
4
#include <io.h>
5
6
int
fb_hFileLock
( FILE *
f
,
fb_off_t
inipos,
fb_off_t
size
)
7
{
8
return
fb_ErrorSetNum
( _dos_lock( fileno(f), inipos, size ) == 0 ?
9
FB_RTERROR_OK
:
FB_RTERROR_FILEIO
);
10
}
11
12
int
fb_hFileUnlock
( FILE *
f
,
fb_off_t
inipos,
fb_off_t
size
)
13
{
14
return
fb_ErrorSetNum
( _dos_unlock( fileno(f), inipos, size) == 0 ?
15
FB_RTERROR_OK
:
FB_RTERROR_FILEIO
);
16
}
rtlib
dos
file_hlock.c
Generated on Thu Jan 23 2014 19:40:08 for FreeBASIC by
1.8.4