Go to the source code of this file.
|
static bool __cdecl | common_fseek_binary_mode_read_only_fast_track_nolock (__crt_stdio_stream const stream, __int64 offset, int whence) throw () |
|
static int __cdecl | common_fseek_nolock (__crt_stdio_stream const stream, __int64 offset, int whence, __crt_cached_ptd_host &ptd) throw () |
|
static int __cdecl | common_fseek (__crt_stdio_stream const stream, __int64 const offset, int const whence, __crt_cached_ptd_host &ptd) throw () |
|
int __cdecl | fseek (FILE *const public_stream, long const offset, int const whence) |
|
int __cdecl | _fseek_nolock (FILE *const public_stream, long const offset, int const whence) |
|
int __cdecl | _fseeki64 (FILE *const public_stream, __int64 const offset, int const whence) |
|
int __cdecl | _fseeki64_nolock (FILE *const public_stream, __int64 const offset, int const whence) |
|
◆ ENABLE_INTSAFE_SIGNED_FUNCTIONS
#define ENABLE_INTSAFE_SIGNED_FUNCTIONS |
◆ _fseek_nolock()
Definition at line 216 of file fseek.cpp.
221{
222 __crt_cached_ptd_host
ptd;
224}
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
static int __cdecl common_fseek_nolock(__crt_stdio_stream const stream, __int64 offset, int whence, __crt_cached_ptd_host &ptd)
◆ _fseeki64()
Definition at line 228 of file fseek.cpp.
233{
234 __crt_cached_ptd_host
ptd;
236}
static int __cdecl common_fseek(__crt_stdio_stream const stream, __int64 const offset, int const whence, __crt_cached_ptd_host &ptd)
◆ _fseeki64_nolock()
Definition at line 240 of file fseek.cpp.
245{
246 __crt_cached_ptd_host
ptd;
248}
◆ common_fseek()
Definition at line 176 of file fseek.cpp.
182{
185
186 int return_value = -1;
187
190 {
192 }
194 {
196 }
198
199 return return_value;
200}
#define _UCRT_VALIDATE_RETURN(ptd, expr, errorcode, retexpr)
_CRTIMP void __cdecl _unlock_file(_Inout_ FILE *_File)
_CRTIMP void __cdecl _lock_file(_Inout_ FILE *_File)
Referenced by _fseeki64(), and fseek().
◆ common_fseek_binary_mode_read_only_fast_track_nolock()
Definition at line 23 of file fseek.cpp.
28{
29
30
31
33 {
34 return false;
35 }
36
37
38 if (!
stream.has_any_buffer())
39 {
40 return false;
41 }
42
43
44
45
47 {
48 return false;
49 }
50
51
52
53
54
55
56
58 {
59 return false;
60 }
61
62
63
64
65 int const fh =
stream.lowio_handle();
67 {
68 return false;
69 }
70
71
72
74 {
76 if (lowio_position < 0)
77 {
78 return false;
79 }
80
83 {
84 return false;
85 }
87 }
88
89
90
91
94
95 bool const seek_is_within_buffer = minimum_reverse_seek <=
offset &&
offset <= maximum_forward_seek;
96 if (!seek_is_within_buffer)
97 {
98 return false;
99 }
100
102
103
104
106 return true;
107}
_Check_return_opt_ __int64 __cdecl _lseeki64_nolock(_In_ int _FileHandle, _In_ __int64 _Offset, _In_ int _Origin)
Referenced by common_fseek_nolock().
◆ common_fseek_nolock()
Definition at line 111 of file fseek.cpp.
117{
119 {
121 return -1;
122 }
123
125
127 {
128 return 0;
129 }
130
131
132
133
135 {
138 }
139
141
142
143
144
145
147
148
149
150
151
152
154 {
156 }
158 {
160 }
161
163 {
164 return -1;
165 }
166
167 return 0;
168}
_Check_return_opt_ __int64 __cdecl _lseeki64_nolock_internal(_In_ int _FileHandle, _In_ __int64 _Offset, _In_ int _Origin, _Inout_ __crt_cached_ptd_host &_Ptd)
void __cdecl __acrt_stdio_reset_buffer(__crt_stdio_stream const stream)
_Check_return_ __int64 __cdecl _ftelli64_nolock_internal(_Inout_ FILE *_Stream, _Inout_ __crt_cached_ptd_host &_Ptd)
int __cdecl __acrt_stdio_flush_nolock(FILE *const public_stream, __crt_cached_ptd_host &ptd)
static bool __cdecl common_fseek_binary_mode_read_only_fast_track_nolock(__crt_stdio_stream const stream, __int64 offset, int whence)
Referenced by _fseek_nolock(), _fseeki64_nolock(), and common_fseek().
◆ fseek()
Definition at line 204 of file fseek.cpp.
209{
210 __crt_cached_ptd_host
ptd;
212}