ReactOS
0.4.16-dev-1946-g52006dd
feoferr.cpp
Go to the documentation of this file.
1
//
2
// feoferr.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Defines feof() and ferror(), which test the end-of-file and error states of a
7
// stream, respectively.
8
//
9
#include <
corecrt_internal_stdio.h
>
10
11
12
13
// Tests the stream for the end-of-file condition. Returns nonzero if and only
14
// if the stream is at end-of-file.
15
extern
"C"
int
__cdecl
feof
(
FILE
*
const
public_stream)
16
{
17
_VALIDATE_RETURN
(public_stream !=
nullptr
,
EINVAL
, 0);
18
return
__crt_stdio_stream
(public_stream).
eof
();
19
}
20
21
22
23
// Tests the stream error indicator. Returns nonzero if and only if the error
24
// indicator for the stream is set.
25
extern
"C"
int
__cdecl
ferror
(
FILE
*
const
public_stream)
26
{
27
_VALIDATE_RETURN
(public_stream !=
nullptr
,
EINVAL
, 0);
28
return
__crt_stdio_stream
(public_stream).
error
();
29
}
EINVAL
#define EINVAL
Definition:
acclib.h:90
__cdecl
#define __cdecl
Definition:
accygwin.h:79
__crt_stdio_stream
Definition:
corecrt_internal_stdio.h:197
__crt_stdio_stream::error
bool error() const
Definition:
corecrt_internal_stdio.h:258
__crt_stdio_stream::eof
bool eof() const
Definition:
corecrt_internal_stdio.h:257
corecrt_internal_stdio.h
_VALIDATE_RETURN
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
Definition:
corecrt_internal_strtox.h:38
feof
int __cdecl feof(FILE *const public_stream)
Definition:
feoferr.cpp:15
ferror
int __cdecl ferror(FILE *const public_stream)
Definition:
feoferr.cpp:25
_iobuf
Definition:
mbstring.h:19
sdk
lib
ucrt
stdio
feoferr.cpp
Generated on Thu Dec 4 2025 06:16:22 for ReactOS by
1.9.6