mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 09:51:22 +00:00

-critical.c: catch (more) invalid use -impl. sscanf (stolen from wine) crt: -use native mingw headers and not private copies of them -converted some routines to using tchar == impl. many missing unicode routines -impl. sscanf and friends correctly (stolen from wine) tchar.h: -added lotsa missin stuff svn path=/trunk/; revision=13608
20 lines
418 B
C
20 lines
418 B
C
#include "precomp.h"
|
|
#include <io.h>
|
|
#include <internal/file.h>
|
|
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
long _lseek(int _fildes, long _offset, int _whence)
|
|
{
|
|
DWORD newpos = SetFilePointer((HANDLE)fdinfo(_fildes)->hFile, _offset, NULL, _whence);
|
|
if (newpos == INVALID_SET_FILE_POINTER) {
|
|
DWORD oserror = GetLastError();
|
|
if (oserror != 0) {
|
|
_dosmaperr(oserror);
|
|
return -1L;
|
|
}
|
|
}
|
|
return newpos;
|
|
}
|