Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4ffa9364
Commit
4ffa9364
authored
Jan 10, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Simplify fseek implementation.
parent
568a3be8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
file.c
dlls/msvcrt/file.c
+3
-12
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
No files found.
dlls/msvcrt/file.c
View file @
4ffa9364
...
...
@@ -1169,19 +1169,10 @@ int CDECL MSVCRT__fseeki64(MSVCRT_FILE* file, __int64 offset, int whence)
msvcrt_flush_buffer
(
file
);
if
(
whence
==
SEEK_CUR
&&
file
->
_flag
&
MSVCRT__IOREAD
)
{
offset
-=
file
->
_cnt
;
if
(
msvcrt_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
(
msvcrt_get_ioinfo
(
file
->
_file
)
->
wxflag
&
WX_READCR
)
offset
--
;
}
whence
=
SEEK_SET
;
offset
+=
MSVCRT__ftelli64
(
file
);
}
/* Discard buffered input */
file
->
_cnt
=
0
;
file
->
_ptr
=
file
->
_base
;
...
...
dlls/msvcrt/msvcrt.h
View file @
4ffa9364
...
...
@@ -885,6 +885,7 @@ int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
int
__cdecl
MSVCRT_ungetc
(
int
,
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT_fgetwc
(
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT_ungetwc
(
MSVCRT_wint_t
,
MSVCRT_FILE
*
);
__int64
__cdecl
MSVCRT__ftelli64
(
MSVCRT_FILE
*
file
);
void
__cdecl
MSVCRT__exit
(
int
);
void
__cdecl
MSVCRT_abort
(
void
);
MSVCRT_ulong
*
__cdecl
MSVCRT___doserrno
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment