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
d553a088
Commit
d553a088
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::stossc.
parent
346a8e1c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
6 deletions
+52
-6
msvcirt.c
dlls/msvcirt/msvcirt.c
+19
-0
msvcirt.spec
dlls/msvcirt/msvcirt.spec
+2
-2
msvcirt.c
dlls/msvcirt/tests/msvcirt.c
+27
-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 @
d553a088
...
...
@@ -636,6 +636,25 @@ int __thiscall streambuf_sbumpc(streambuf *this)
return
ret
;
}
/* ?stossc@streambuf@@QAEXXZ */
/* ?stossc@streambuf@@QEAAXXZ */
DEFINE_THISCALL_WRAPPER
(
streambuf_stossc
,
4
)
void
__thiscall
streambuf_stossc
(
streambuf
*
this
)
{
TRACE
(
"(%p)
\n
"
,
this
);
if
(
this
->
unbuffered
)
{
if
(
this
->
stored_char
==
EOF
)
call_streambuf_underflow
(
this
);
else
this
->
stored_char
=
EOF
;
}
else
{
if
(
this
->
gptr
>=
this
->
egptr
)
call_streambuf_underflow
(
this
);
if
(
this
->
gptr
<
this
->
egptr
)
this
->
gptr
++
;
}
}
/******************************************************************
* ??1ios@@UAE@XZ (MSVCRTI.@)
* class ios & __thiscall ios::-ios<<(void)
...
...
dlls/msvcirt/msvcirt.spec
View file @
d553a088
...
...
@@ -710,8 +710,8 @@
@ cdecl -arch=win64 ?sputn@streambuf@@QEAAHPEBDH@Z(ptr str long) streambuf_sputn
@ stub -arch=win32 ?stdiofile@stdiobuf@@QAEPAU_iobuf@@XZ # struct _iobuf * __thiscall stdiobuf::stdiofile(void)
@ stub -arch=win64 ?stdiofile@stdiobuf@@QEAAPEAU_iobuf@@XZ
@
stub -arch=win32 ?stossc@streambuf@@QAEXXZ # void __thiscall streambuf::stossc(void)
@
stub -arch=win64 ?stossc@streambuf@@QEAAXXZ
@
thiscall -arch=win32 ?stossc@streambuf@@QAEXXZ(ptr) streambuf_stossc
@
cdecl -arch=win64 ?stossc@streambuf@@QEAAXXZ(ptr) streambuf_stossc
@ stub -arch=win32 ?str@istrstream@@QAEPADXZ # char * __thiscall istrstream::str(void)
@ stub -arch=win64 ?str@istrstream@@QEAAPEADXZ
@ stub -arch=win32 ?str@ostrstream@@QAEPADXZ # char * __thiscall ostrstream::str(void)
...
...
dlls/msvcirt/tests/msvcirt.c
View file @
d553a088
...
...
@@ -65,6 +65,7 @@ static streambuf* (*__thiscall p_streambuf_setbuf)(streambuf*, char*, int);
static
int
(
*
__thiscall
p_streambuf_sgetc
)(
streambuf
*
);
static
int
(
*
__thiscall
p_streambuf_snextc
)(
streambuf
*
);
static
int
(
*
__thiscall
p_streambuf_sputc
)(
streambuf
*
,
int
);
static
void
(
*
__thiscall
p_streambuf_stossc
)(
streambuf
*
);
static
int
(
*
__thiscall
p_streambuf_sync
)(
streambuf
*
);
static
void
(
*
__thiscall
p_streambuf_unlock
)(
streambuf
*
);
static
int
(
*
__thiscall
p_streambuf_xsgetn
)(
streambuf
*
,
char
*
,
int
);
...
...
@@ -155,6 +156,7 @@ static BOOL init(void)
SET
(
p_streambuf_sgetc
,
"?sgetc@streambuf@@QEAAHXZ"
);
SET
(
p_streambuf_snextc
,
"?snextc@streambuf@@QEAAHXZ"
);
SET
(
p_streambuf_sputc
,
"?sputc@streambuf@@QEAAHH@Z"
);
SET
(
p_streambuf_stossc
,
"?stossc@streambuf@@QEAAXXZ"
);
SET
(
p_streambuf_sync
,
"?sync@streambuf@@UEAAHXZ"
);
SET
(
p_streambuf_unlock
,
"?unlock@streambuf@@QEAAXXZ"
);
SET
(
p_streambuf_xsgetn
,
"?xsgetn@streambuf@@UEAAHPEADH@Z"
);
...
...
@@ -176,6 +178,7 @@ static BOOL init(void)
SET
(
p_streambuf_sgetc
,
"?sgetc@streambuf@@QAEHXZ"
);
SET
(
p_streambuf_snextc
,
"?snextc@streambuf@@QAEHXZ"
);
SET
(
p_streambuf_sputc
,
"?sputc@streambuf@@QAEHH@Z"
);
SET
(
p_streambuf_stossc
,
"?stossc@streambuf@@QAEXXZ"
);
SET
(
p_streambuf_sync
,
"?sync@streambuf@@UAEHXZ"
);
SET
(
p_streambuf_unlock
,
"?unlock@streambuf@@QAEXXZ"
);
SET
(
p_streambuf_xsgetn
,
"?xsgetn@streambuf@@UAEHPADH@Z"
);
...
...
@@ -662,6 +665,30 @@ static void test_streambuf(void)
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
"
);
/* stossc */
call_func1
(
p_streambuf_stossc
,
&
sb
);
ok
(
sb
.
gptr
==
sb
.
eback
+
3
,
"wrong get pointer, expected %p got %p
\n
"
,
sb
.
eback
+
3
,
sb
.
gptr
);
test_this
=
&
sb2
;
call_func1
(
p_streambuf_stossc
,
&
sb2
);
ok
(
sb2
.
gptr
==
sb2
.
egptr
,
"wrong get pointer, expected %p got %p
\n
"
,
sb2
.
egptr
,
sb2
.
gptr
);
ok
(
underflow_count
==
55
,
"expected call to underflow
\n
"
);
get_end
=
0
;
call_func1
(
p_streambuf_stossc
,
&
sb2
);
ok
(
sb2
.
gptr
==
sb2
.
eback
+
1
,
"wrong get pointer, expected %p got %p
\n
"
,
sb2
.
eback
+
1
,
sb2
.
gptr
);
ok
(
underflow_count
==
56
,
"expected call to underflow
\n
"
);
sb2
.
gptr
=
sb2
.
egptr
-
1
;
call_func1
(
p_streambuf_stossc
,
&
sb2
);
ok
(
sb2
.
gptr
==
sb2
.
egptr
,
"wrong get pointer, expected %p got %p
\n
"
,
sb2
.
egptr
,
sb2
.
gptr
);
ok
(
underflow_count
==
56
,
"no call to underflow expected
\n
"
);
test_this
=
&
sb3
;
call_func1
(
p_streambuf_stossc
,
&
sb3
);
ok
(
sb3
.
stored_char
==
EOF
,
"wrong stored character, expected EOF got %c
\n
"
,
sb3
.
stored_char
);
ok
(
underflow_count
==
57
,
"expected call to underflow
\n
"
);
sb3
.
stored_char
=
'a'
;
call_func1
(
p_streambuf_stossc
,
&
sb3
);
ok
(
sb3
.
stored_char
==
EOF
,
"wrong stored character, expected EOF got %c
\n
"
,
sb3
.
stored_char
);
ok
(
underflow_count
==
57
,
"no call to underflow expected
\n
"
);
SetEvent
(
lock_arg
.
test
[
3
]);
WaitForSingleObject
(
thread
,
INFINITE
);
...
...
dlls/msvcrt20/msvcrt20.spec
View file @
d553a088
...
...
@@ -698,8 +698,8 @@
@ cdecl -arch=win64 ?sputn@streambuf@@QEAAHPEBDH@Z(ptr str long) msvcirt.?sputn@streambuf@@QEAAHPEBDH@Z
@ stub -arch=win32 ?stdiofile@stdiobuf@@QAEPAU_iobuf@@XZ
@ stub -arch=win64 ?stdiofile@stdiobuf@@QEAAPEAU_iobuf@@XZ
@
stub -arch=win32
?stossc@streambuf@@QAEXXZ
@
stub -arch=win64
?stossc@streambuf@@QEAAXXZ
@
thiscall -arch=win32 ?stossc@streambuf@@QAEXXZ(ptr) msvcirt.
?stossc@streambuf@@QAEXXZ
@
cdecl -arch=win64 ?stossc@streambuf@@QEAAXXZ(ptr) msvcirt.
?stossc@streambuf@@QEAAXXZ
@ stub -arch=win32 ?str@istrstream@@QAEPADXZ
@ stub -arch=win64 ?str@istrstream@@QEAAPEADXZ
@ stub -arch=win32 ?str@ostrstream@@QAEPADXZ
...
...
dlls/msvcrt40/msvcrt40.spec
View file @
d553a088
...
...
@@ -770,8 +770,8 @@
@ cdecl -arch=win64 ?sputn@streambuf@@QEAAHPEBDH@Z(ptr str long) msvcirt.?sputn@streambuf@@QEAAHPEBDH@Z
@ stub -arch=win32 ?stdiofile@stdiobuf@@QAEPAU_iobuf@@XZ
@ stub -arch=win64 ?stdiofile@stdiobuf@@QEAAPEAU_iobuf@@XZ
@
stub -arch=win32
?stossc@streambuf@@QAEXXZ
@
stub -arch=win64
?stossc@streambuf@@QEAAXXZ
@
thiscall -arch=win32 ?stossc@streambuf@@QAEXXZ(ptr) msvcirt.
?stossc@streambuf@@QAEXXZ
@
cdecl -arch=win64 ?stossc@streambuf@@QEAAXXZ(ptr) msvcirt.
?stossc@streambuf@@QEAAXXZ
@ stub -arch=win32 ?str@istrstream@@QAEPADXZ
@ stub -arch=win64 ?str@istrstream@@QEAAPEADXZ
@ stub -arch=win32 ?str@ostrstream@@QAEPADXZ
...
...
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