ReactOS
0.4.16-dev-1946-g52006dd
fsetpos.cpp
Go to the documentation of this file.
1
//
2
// fsetpos.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Defines fsetpos(), which sets the file position using a position previously
7
// returned by fgetpos().
8
//
9
#include <
corecrt_internal_stdio.h
>
10
11
12
13
// Sets the file position to the given position. The position value must have
14
// been returned by a prior call to fgetpos(). Returns 0 on success; returns
15
// nonzero on failure.
16
extern
"C"
int
__cdecl
fsetpos
(
FILE
*
const
stream
,
fpos_t
const
*
const
position)
17
{
18
_VALIDATE_RETURN
(
stream
!=
nullptr
,
EINVAL
, -1);
19
_VALIDATE_RETURN
(position !=
nullptr
,
EINVAL
, -1);
20
21
return
_fseeki64
(
stream
, *position,
SEEK_SET
);
22
}
EINVAL
#define EINVAL
Definition:
acclib.h:90
__cdecl
#define __cdecl
Definition:
accygwin.h:79
corecrt_internal_stdio.h
_VALIDATE_RETURN
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
Definition:
corecrt_internal_strtox.h:38
fsetpos
int __cdecl fsetpos(FILE *const stream, fpos_t const *const position)
Definition:
fsetpos.cpp:16
_fseeki64
_Check_return_opt_ __MINGW_EXTENSION _CRTIMP int __cdecl _fseeki64(_Inout_ FILE *_File, _In_ __int64 _Offset, _In_ int _Origin)
fpos_t
__int64 fpos_t
Definition:
stdio.h:73
SEEK_SET
#define SEEK_SET
Definition:
jmemansi.c:26
_iobuf
Definition:
mbstring.h:19
stream
Definition:
parse.h:23
sdk
lib
ucrt
stdio
fsetpos.cpp
Generated on Thu Dec 4 2025 06:16:22 for ReactOS by
1.9.6