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