Author: akhaldi
Date: Sat May 17 10:28:57 2014
New Revision: 63320
URL:
http://svn.reactos.org/svn/reactos?rev=63320&view=rev
Log:
[CRT]
* Update _fseeki64().
* Fixes some msvcrt tests.
CORE-8080
Modified:
trunk/reactos/lib/sdk/crt/stdio/file.c
Modified: trunk/reactos/lib/sdk/crt/stdio/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?r…
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Sat May 17 10:28:57 2014
@@ -1170,19 +1170,10 @@
flush_buffer(file);
if(whence == SEEK_CUR && file->_flag & _IOREAD ) {
- offset -= file->_cnt;
- if (get_ioinfo(file->_file)->wxflag & WX_TEXT) {
- /* Black magic correction for CR removal */
- int i;
- for (i=0; i<file->_cnt; i++) {
- if (file->_ptr[i] == '\n')
- offset--;
- }
- /* Black magic when reading CR at buffer boundary*/
- if(get_ioinfo(file->_file)->wxflag & WX_READCR)
- offset--;
- }
- }
+ whence = SEEK_SET;
+ offset += _ftelli64(file);
+ }
+
/* Discard buffered input */
file->_cnt = 0;
file->_ptr = file->_base;