msvcrt: Implement _ftelli64.
This commit is contained in:
parent
70e6a2f7ae
commit
a3927b5e09
|
@ -656,7 +656,7 @@
|
|||
@ cdecl _fstat64(long ptr) msvcrt._fstat64
|
||||
@ cdecl _fstat64i32(long ptr) msvcr90._fstat64i32
|
||||
@ stub _ftell_nolock
|
||||
@ stub _ftelli64
|
||||
@ cdecl -ret64 _ftelli64(ptr) msvcrt._ftelli64
|
||||
@ stub _ftelli64_nolock
|
||||
@ cdecl _ftime32(ptr) msvcrt._ftime32
|
||||
@ stub _ftime32_s
|
||||
|
|
|
@ -497,7 +497,7 @@
|
|||
@ cdecl _fstat64(long ptr) msvcrt._fstat64
|
||||
@ cdecl _fstat64i32(long ptr) msvcr90._fstat64i32
|
||||
@ stub _ftell_nolock
|
||||
@ stub _ftelli64
|
||||
@ cdecl -ret64 _ftelli64(ptr) msvcrt._ftelli64
|
||||
@ stub _ftelli64_nolock
|
||||
@ cdecl _ftime32(ptr) msvcrt._ftime32
|
||||
@ stub _ftime32_s
|
||||
|
|
|
@ -489,7 +489,7 @@
|
|||
@ cdecl _fstat64(long ptr) msvcrt._fstat64
|
||||
@ cdecl _fstat64i32(long ptr)
|
||||
@ stub _ftell_nolock
|
||||
@ stub _ftelli64
|
||||
@ cdecl -ret64 _ftelli64(ptr) msvcrt._ftelli64
|
||||
@ stub _ftelli64_nolock
|
||||
@ cdecl _ftime32(ptr) msvcrt._ftime32
|
||||
@ stub _ftime32_s
|
||||
|
|
|
@ -2997,14 +2997,14 @@ int CDECL MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
|
|||
}
|
||||
|
||||
/*********************************************************************
|
||||
* ftell (MSVCRT.@)
|
||||
* _ftelli64 (MSVCRT.@)
|
||||
*/
|
||||
LONG CDECL MSVCRT_ftell(MSVCRT_FILE* file)
|
||||
__int64 CDECL MSVCRT__ftelli64(MSVCRT_FILE* file)
|
||||
{
|
||||
/* TODO: just call fgetpos and return lower half of result */
|
||||
int off=0;
|
||||
MSVCRT_long pos;
|
||||
pos = MSVCRT__tell(file->_file);
|
||||
__int64 pos;
|
||||
pos = _telli64(file->_file);
|
||||
if(pos == -1) return -1;
|
||||
if(file->_bufsiz) {
|
||||
if( file->_flag & MSVCRT__IOWRT ) {
|
||||
|
@ -3018,7 +3018,7 @@ LONG CDECL MSVCRT_ftell(MSVCRT_FILE* file)
|
|||
if (file->_ptr[i] == '\n')
|
||||
off--;
|
||||
}
|
||||
/* Black magic when reading CR at buffer boundary*/
|
||||
/* Black magic when reading CR at buffer boundary*/
|
||||
if(MSVCRT_fdesc[file->_file].wxflag & WX_READCR)
|
||||
off--;
|
||||
|
||||
|
@ -3028,6 +3028,14 @@ LONG CDECL MSVCRT_ftell(MSVCRT_FILE* file)
|
|||
return off + pos;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* ftell (MSVCRT.@)
|
||||
*/
|
||||
LONG CDECL MSVCRT_ftell(MSVCRT_FILE* file)
|
||||
{
|
||||
return MSVCRT__ftelli64(file);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* fgetpos (MSVCRT.@)
|
||||
*/
|
||||
|
|
|
@ -442,6 +442,7 @@
|
|||
@ cdecl _fstat(long ptr) MSVCRT__fstat
|
||||
@ cdecl _fstat64(long ptr) MSVCRT__fstat64
|
||||
@ cdecl _fstati64(long ptr) MSVCRT__fstati64
|
||||
@ cdecl -ret64 _ftelli64(ptr) MSVCRT__ftelli64
|
||||
@ cdecl _ftime(ptr) MSVCRT__ftime
|
||||
@ cdecl _ftime32(ptr) MSVCRT__ftime32
|
||||
# stub _ftime32_s
|
||||
|
|
|
@ -138,8 +138,10 @@ FILE* __cdecl freopen(const char*,const char*,FILE*);
|
|||
int __cdecl fscanf(FILE*,const char*,...);
|
||||
int __cdecl fscanf_s(FILE*,const char*,...);
|
||||
int __cdecl fseek(FILE*,__msvcrt_long,int);
|
||||
int __cdecl _fseeki64(FILE*,__int64,int);
|
||||
int __cdecl fsetpos(FILE*,fpos_t*);
|
||||
__msvcrt_long __cdecl ftell(FILE*);
|
||||
__int64 __cdecl _ftelli64(FILE*);
|
||||
size_t __cdecl fwrite(const void*,size_t,size_t,FILE*);
|
||||
int __cdecl getc(FILE*);
|
||||
int __cdecl getchar(void);
|
||||
|
|
Loading…
Reference in New Issue