ReactOS 0.4.16-dev-959-g2ec3a19
fgetpos.cpp File Reference
Include dependency graph for fgetpos.cpp:

Go to the source code of this file.

Functions

int __cdecl fgetpos (FILE *const stream, fpos_t *const position)
 

Function Documentation

◆ fgetpos()

int __cdecl fgetpos ( FILE *const  stream,
fpos_t *const  position 
)

Definition at line 16 of file fgetpos.cpp.

17{
18 _VALIDATE_RETURN(stream != nullptr, EINVAL, -1);
19 _VALIDATE_RETURN(position != nullptr, EINVAL, -1);
20
21 *position = _ftelli64(stream);
22 if (*position == -1)
23 return -1;
24
25 return 0;
26}
#define EINVAL
Definition: acclib.h:90
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
__MINGW_EXTENSION _Check_return_ _CRTIMP __int64 __cdecl _ftelli64(_Inout_ FILE *_File)
Definition: parse.h:23