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
346a8e1c
Commit
346a8e1c
authored
Jun 25, 2015
by
Iván Matellanes
Committed by
Alexandre Julliard
Jun 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcirt: Add implementation of streambuf::sbumpc.
parent
fac4fdb5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
6 deletions
+71
-6
msvcirt.c
dlls/msvcirt/msvcirt.c
+21
-0
msvcirt.spec
dlls/msvcirt/msvcirt.spec
+2
-2
msvcirt.c
dlls/msvcirt/tests/msvcirt.c
+44
-0
msvcrt20.spec
dlls/msvcrt20/msvcrt20.spec
+2
-2
msvcrt40.spec
dlls/msvcrt40/msvcrt40.spec
+2
-2
No files found.
dlls/msvcirt/msvcirt.c
View file @
346a8e1c
...
...
@@ -615,6 +615,27 @@ int __thiscall streambuf_snextc(streambuf *this)
}
}
/* ?sbumpc@streambuf@@QAEHXZ */
/* ?sbumpc@streambuf@@QEAAHXZ */
DEFINE_THISCALL_WRAPPER
(
streambuf_sbumpc
,
4
)
int
__thiscall
streambuf_sbumpc
(
streambuf
*
this
)
{
int
ret
;
TRACE
(
"(%p)
\n
"
,
this
);
if
(
this
->
unbuffered
)
{
ret
=
this
->
stored_char
;
this
->
stored_char
=
EOF
;
if
(
ret
==
EOF
)
ret
=
call_streambuf_underflow
(
this
);
}
else
{
ret
=
(
this
->
gptr
<
this
->
egptr
)
?
*
this
->
gptr
:
call_streambuf_underflow
(
this
);
this
->
gptr
++
;
}
return
ret
;
}
/******************************************************************
* ??1ios@@UAE@XZ (MSVCRTI.@)
* class ios & __thiscall ios::-ios<<(void)
...
...
dlls/msvcirt/msvcirt.spec
View file @
346a8e1c
...
...
@@ -637,8 +637,8 @@
@ stub -arch=win64 ?read@istream@@QEAAAEAV1@PEADH@Z
@ stub -arch=win32 ?read@istream@@QAEAAV1@PAEH@Z # class istream & __thiscall istream::read(unsigned char *,int)
@ stub -arch=win64 ?read@istream@@QEAAAEAV1@PEAEH@Z
@
stub -arch=win32 ?sbumpc@streambuf@@QAEHXZ # int __thiscall streambuf::sbumpc(void)
@
stub -arch=win64 ?sbumpc@streambuf@@QEAAHXZ
@
thiscall -arch=win32 ?sbumpc@streambuf@@QAEHXZ(ptr) streambuf_sbumpc
@
cdecl -arch=win64 ?sbumpc@streambuf@@QEAAHXZ(ptr) streambuf_sbumpc
@ stub -arch=win32 ?seekg@istream@@QAEAAV1@J@Z # class istream & __thiscall istream::seekg(long)
@ stub -arch=win64 ?seekg@istream@@QEAAAEAV1@J@Z
@ stub -arch=win32 ?seekg@istream@@QAEAAV1@JW4seek_dir@ios@@@Z # class istream & __thiscall istream::seekg(long,enum ios::seek_dir)
...
...
dlls/msvcirt/tests/msvcirt.c
View file @
346a8e1c
...
...
@@ -58,6 +58,7 @@ static int (*__thiscall p_streambuf_doallocate)(streambuf*);
static
void
(
*
__thiscall
p_streambuf_gbump
)(
streambuf
*
,
int
);
static
void
(
*
__thiscall
p_streambuf_lock
)(
streambuf
*
);
static
void
(
*
__thiscall
p_streambuf_pbump
)(
streambuf
*
,
int
);
static
int
(
*
__thiscall
p_streambuf_sbumpc
)(
streambuf
*
);
static
void
(
*
__thiscall
p_streambuf_setb
)(
streambuf
*
,
char
*
,
char
*
,
int
);
static
void
(
*
__thiscall
p_streambuf_setlock
)(
streambuf
*
);
static
streambuf
*
(
*
__thiscall
p_streambuf_setbuf
)(
streambuf
*
,
char
*
,
int
);
...
...
@@ -147,6 +148,7 @@ static BOOL init(void)
SET
(
p_streambuf_gbump
,
"?gbump@streambuf@@IEAAXH@Z"
);
SET
(
p_streambuf_lock
,
"?lock@streambuf@@QEAAXXZ"
);
SET
(
p_streambuf_pbump
,
"?pbump@streambuf@@IEAAXH@Z"
);
SET
(
p_streambuf_sbumpc
,
"?sbumpc@streambuf@@QEAAHXZ"
);
SET
(
p_streambuf_setb
,
"?setb@streambuf@@IEAAXPEAD0H@Z"
);
SET
(
p_streambuf_setbuf
,
"?setbuf@streambuf@@UEAAPEAV1@PEADH@Z"
);
SET
(
p_streambuf_setlock
,
"?setlock@streambuf@@QEAAXXZ"
);
...
...
@@ -167,6 +169,7 @@ static BOOL init(void)
SET
(
p_streambuf_gbump
,
"?gbump@streambuf@@IAEXH@Z"
);
SET
(
p_streambuf_lock
,
"?lock@streambuf@@QAEXXZ"
);
SET
(
p_streambuf_pbump
,
"?pbump@streambuf@@IAEXH@Z"
);
SET
(
p_streambuf_sbumpc
,
"?sbumpc@streambuf@@QAEHXZ"
);
SET
(
p_streambuf_setb
,
"?setb@streambuf@@IAEXPAD0H@Z"
);
SET
(
p_streambuf_setbuf
,
"?setbuf@streambuf@@UAEPAV1@PADH@Z"
);
SET
(
p_streambuf_setlock
,
"?setlock@streambuf@@QAEXXZ"
);
...
...
@@ -618,6 +621,47 @@ static void test_streambuf(void)
ok
(
sb3
.
stored_char
==
'p'
,
"wrong stored character, expected 'p' got %c
\n
"
,
sb3
.
stored_char
);
ok
(
underflow_count
==
49
,
"expected 2 calls to underflow, got %d
\n
"
,
underflow_count
-
47
);
/* sbumpc */
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb
);
ok
(
ret
==
'e'
,
"expected 'e' got '%c'
\n
"
,
ret
);
ok
(
sb
.
gptr
==
sb
.
eback
+
2
,
"wrong get pointer, expected %p got %p
\n
"
,
sb
.
eback
+
2
,
sb
.
gptr
);
test_this
=
&
sb2
;
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb2
);
ok
(
ret
==
'W'
,
"expected 'W' got '%c'
\n
"
,
ret
);
ok
(
sb2
.
gptr
==
sb2
.
eback
+
1
,
"wrong get pointer, expected %p got %p
\n
"
,
sb2
.
eback
+
1
,
sb2
.
gptr
);
ok
(
underflow_count
==
50
,
"expected call to underflow
\n
"
);
sb2
.
gptr
=
sb2
.
egptr
-
1
;
*
sb2
.
gptr
=
't'
;
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb2
);
ok
(
ret
==
't'
,
"expected 't' got '%c'
\n
"
,
ret
);
ok
(
sb2
.
gptr
==
sb2
.
egptr
,
"wrong get pointer, expected %p got %p
\n
"
,
sb2
.
egptr
,
sb2
.
gptr
);
ok
(
underflow_count
==
50
,
"no call to underflow expected
\n
"
);
get_end
=
1
;
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb2
);
ok
(
ret
==
EOF
,
"expected EOF got '%c'
\n
"
,
ret
);
ok
(
sb2
.
gptr
==
sb2
.
egptr
+
1
,
"wrong get pointer, expected %p got %p
\n
"
,
sb2
.
egptr
+
1
,
sb2
.
gptr
);
ok
(
underflow_count
==
51
,
"expected call to underflow
\n
"
);
sb2
.
gptr
=
sb2
.
egptr
;
test_this
=
&
sb3
;
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb3
);
ok
(
ret
==
'p'
,
"expected 'p' got '%c'
\n
"
,
ret
);
ok
(
sb3
.
stored_char
==
EOF
,
"wrong stored character, expected EOF got %c
\n
"
,
sb3
.
stored_char
);
ok
(
underflow_count
==
51
,
"no call to underflow expected
\n
"
);
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb3
);
ok
(
ret
==
'u'
,
"expected 'u' got '%c'
\n
"
,
ret
);
ok
(
sb3
.
stored_char
==
EOF
,
"wrong stored character, expected EOF got %c
\n
"
,
sb3
.
stored_char
);
ok
(
underflow_count
==
52
,
"expected call to underflow
\n
"
);
buffer_pos
=
23
;
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb3
);
ok
(
ret
==
EOF
,
"expected EOF got '%c'
\n
"
,
ret
);
ok
(
sb3
.
stored_char
==
EOF
,
"wrong stored character, expected EOF got %c
\n
"
,
sb3
.
stored_char
);
ok
(
underflow_count
==
53
,
"expected call to underflow
\n
"
);
buffer_pos
=
0
;
ret
=
(
int
)
call_func1
(
p_streambuf_sbumpc
,
&
sb3
);
ok
(
ret
==
'C'
,
"expected 'C' got '%c'
\n
"
,
ret
);
ok
(
sb3
.
stored_char
==
EOF
,
"wrong stored character, expected EOF got %c
\n
"
,
sb3
.
stored_char
);
ok
(
underflow_count
==
54
,
"expected call to underflow
\n
"
);
SetEvent
(
lock_arg
.
test
[
3
]);
WaitForSingleObject
(
thread
,
INFINITE
);
...
...
dlls/msvcrt20/msvcrt20.spec
View file @
346a8e1c
...
...
@@ -623,8 +623,8 @@
@ stub -arch=win64 ?read@istream@@QEAAAEAV1@PEADH@Z
@ stub -arch=win32 ?read@istream@@QAEAAV1@PAEH@Z
@ stub -arch=win64 ?read@istream@@QEAAAEAV1@PEAEH@Z
@
stub -arch=win32
?sbumpc@streambuf@@QAEHXZ
@
stub -arch=win64
?sbumpc@streambuf@@QEAAHXZ
@
thiscall -arch=win32 ?sbumpc@streambuf@@QAEHXZ(ptr) msvcirt.
?sbumpc@streambuf@@QAEHXZ
@
cdecl -arch=win64 ?sbumpc@streambuf@@QEAAHXZ(ptr) msvcirt.
?sbumpc@streambuf@@QEAAHXZ
@ stub -arch=win32 ?seekg@istream@@QAEAAV1@J@Z
@ stub -arch=win64 ?seekg@istream@@QEAAAEAV1@J@Z
@ stub -arch=win32 ?seekg@istream@@QAEAAV1@JW4seek_dir@ios@@@Z
...
...
dlls/msvcrt40/msvcrt40.spec
View file @
346a8e1c
...
...
@@ -694,8 +694,8 @@
@ stub -arch=win64 ?read@istream@@QEAAAEAV1@PEADH@Z
@ stub -arch=win32 ?read@istream@@QAEAAV1@PAEH@Z
@ stub -arch=win64 ?read@istream@@QEAAAEAV1@PEAEH@Z
@
stub -arch=win32
?sbumpc@streambuf@@QAEHXZ
@
stub -arch=win64
?sbumpc@streambuf@@QEAAHXZ
@
thiscall -arch=win32 ?sbumpc@streambuf@@QAEHXZ(ptr) msvcirt.
?sbumpc@streambuf@@QAEHXZ
@
cdecl -arch=win64 ?sbumpc@streambuf@@QEAAHXZ(ptr) msvcirt.
?sbumpc@streambuf@@QEAAHXZ
@ stub -arch=win32 ?seekg@istream@@QAEAAV1@J@Z
@ stub -arch=win64 ?seekg@istream@@QEAAAEAV1@J@Z
@ stub -arch=win32 ?seekg@istream@@QAEAAV1@JW4seek_dir@ios@@@Z
...
...
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