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
24d57405
Commit
24d57405
authored
Sep 23, 2015
by
Iván Matellanes
Committed by
Alexandre Julliard
Oct 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcirt: Implement strstreambuf::seekoff.
parent
9754cda5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
msvcirt.c
dlls/msvcirt/msvcirt.c
+37
-2
msvcirt.c
dlls/msvcirt/tests/msvcirt.c
+0
-0
No files found.
dlls/msvcirt/msvcirt.c
View file @
24d57405
...
...
@@ -1351,8 +1351,43 @@ int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
DEFINE_THISCALL_WRAPPER
(
strstreambuf_seekoff
,
16
)
streampos
__thiscall
strstreambuf_seekoff
(
strstreambuf
*
this
,
streamoff
offset
,
ios_seek_dir
dir
,
int
mode
)
{
FIXME
(
"(%p %d %d %d) stub
\n
"
,
this
,
offset
,
dir
,
mode
);
return
EOF
;
char
*
base
[
3
];
TRACE
(
"(%p %d %d %d)
\n
"
,
this
,
offset
,
dir
,
mode
);
if
(
dir
<
SEEKDIR_beg
||
dir
>
SEEKDIR_end
||
!
(
mode
&
(
OPENMODE_in
|
OPENMODE_out
)))
return
EOF
;
/* read buffer */
if
(
mode
&
OPENMODE_in
)
{
call_streambuf_underflow
(
&
this
->
base
);
base
[
SEEKDIR_beg
]
=
this
->
base
.
eback
;
base
[
SEEKDIR_cur
]
=
this
->
base
.
gptr
;
base
[
SEEKDIR_end
]
=
this
->
base
.
egptr
;
if
(
base
[
dir
]
+
offset
<
this
->
base
.
eback
||
base
[
dir
]
+
offset
>
this
->
base
.
egptr
)
return
EOF
;
this
->
base
.
gptr
=
base
[
dir
]
+
offset
;
}
/* write buffer */
if
(
mode
&
OPENMODE_out
)
{
if
(
!
this
->
base
.
epptr
&&
call_streambuf_overflow
(
&
this
->
base
,
EOF
)
==
EOF
)
return
EOF
;
base
[
SEEKDIR_beg
]
=
this
->
base
.
pbase
;
base
[
SEEKDIR_cur
]
=
this
->
base
.
pptr
;
base
[
SEEKDIR_end
]
=
this
->
base
.
epptr
;
if
(
base
[
dir
]
+
offset
<
this
->
base
.
pbase
)
return
EOF
;
if
(
base
[
dir
]
+
offset
>
this
->
base
.
epptr
)
{
/* make room if the buffer is dynamic */
if
(
!
this
->
dynamic
)
return
EOF
;
this
->
increase
=
offset
;
if
(
call_streambuf_doallocate
(
&
this
->
base
)
==
EOF
)
return
EOF
;
}
this
->
base
.
pptr
=
base
[
dir
]
+
offset
;
return
this
->
base
.
pptr
-
base
[
SEEKDIR_beg
];
}
return
this
->
base
.
gptr
-
base
[
SEEKDIR_beg
];
}
/* ?setbuf@strstreambuf@@UAEPAVstreambuf@@PADH@Z */
...
...
dlls/msvcirt/tests/msvcirt.c
View file @
24d57405
This diff is collapsed.
Click to expand it.
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