MCPcopy Create free account
hub / github.com/F-Stack/f-stack / LONG_SEEK

Function LONG_SEEK

freebsd/contrib/zstd/programs/fileio.c:253–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251#elif defined(_WIN32) && !defined(__DJGPP__)
252# include <windows.h>
253 static int LONG_SEEK(FILE* file, __int64 offset, int origin) {
254 LARGE_INTEGER off;
255 DWORD method;
256 off.QuadPart = offset;
257 if (origin == SEEK_END)
258 method = FILE_END;
259 else if (origin == SEEK_CUR)
260 method = FILE_CURRENT;
261 else
262 method = FILE_BEGIN;
263
264 if (SetFilePointerEx((HANDLE) _get_osfhandle(_fileno(file)), off, NULL, method))
265 return 0;
266 else
267 return -1;
268 }
269 static __int64 LONG_TELL(FILE* file) {
270 LARGE_INTEGER off, newOff;
271 off.QuadPart = 0;

Callers 3

FIO_fwriteSparseFunction · 0.85
FIO_fwriteSparseEndFunction · 0.85
FIO_analyzeFramesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected