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
f9ff5fe3
Commit
f9ff5fe3
authored
Aug 28, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp80: Fixed basic_string::rbegin and basic_string::rend implementation.
parent
27d0551b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
0 deletions
+138
-0
Makefile.in
dlls/msvcp80/Makefile.in
+3
-0
msvcp80.c
dlls/msvcp80/msvcp80.c
+135
-0
msvcp80.spec
dlls/msvcp80/msvcp80.spec
+0
-0
No files found.
dlls/msvcp80/Makefile.in
View file @
f9ff5fe3
MODULE
=
msvcp80.dll
IMPORTS
=
msvcrt
MODCFLAGS
=
@BUILTINFLAG@
EXTRAINCL
=
-I
$(top_srcdir)
/include/msvcrt
C_SRCS
=
\
msvcp80.c
...
...
dlls/msvcp80/msvcp80.c
View file @
f9ff5fe3
...
...
@@ -18,15 +18,76 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#ifdef __i386__
/* thiscall functions are i386-specific */
#define THISCALL(func) __thiscall_ ## func
#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
#define __thiscall __stdcall
#define DEFINE_THISCALL_WRAPPER(func,args) \
extern void THISCALL(func)(void); \
__ASM_GLOBAL_FUNC(__thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
/* __i386__ */
#define THISCALL(func) func
#define THISCALL_NAME(func) __ASM_NAME(#func)
#define __thiscall __cdecl
#define DEFINE_THISCALL_WRAPPER(func,args)
/* nothing */
#endif
/* __i386__ */
typedef
SIZE_T
MSVCP_size_t
;
struct
locale_facet
;
struct
locale
;
/* basic_string<char, char_traits<char>, allocator<char>> */
#define BUF_SIZE_CHAR 16
typedef
struct
{
void
*
allocator
;
union
{
char
buf
[
BUF_SIZE_CHAR
];
char
*
ptr
;
}
data
;
MSVCP_size_t
size
;
MSVCP_size_t
res
;
}
basic_string_char
;
#define BUF_SIZE_WCHAR 8
typedef
struct
{
void
*
allocator
;
union
{
wchar_t
buf
[
BUF_SIZE_WCHAR
];
wchar_t
*
ptr
;
}
data
;
MSVCP_size_t
size
;
MSVCP_size_t
res
;
}
basic_string_wchar
;
/* _String_iterator<char> and _String_const_iterator<char> class */
typedef
struct
{
void
*
cont
;
const
basic_string_char
*
bstr
;
const
char
*
pos
;
}
basic_string_char_reverse_iter
;
typedef
struct
{
void
*
cont
;
const
basic_string_wchar
*
bstr
;
const
wchar_t
*
pos
;
}
basic_string_wchar_reverse_iter
;
const
struct
locale
*
(
CDECL
*
plocale_classic
)(
void
);
MSVCP_size_t
(
CDECL
*
pcollate_char__Getcat
)(
const
struct
locale_facet
**
,
const
struct
locale
*
);
MSVCP_size_t
(
CDECL
*
pcollate_wchar__Getcat
)(
const
struct
locale_facet
**
,
const
struct
locale
*
);
...
...
@@ -158,3 +219,77 @@ MSVCP_size_t __cdecl numpunct_short__Getcat(const struct locale_facet **facet)
{
return
pnumpunct_short__Getcat
(
facet
,
plocale_classic
());
}
static
const
char
*
basic_string_char_const_ptr
(
const
basic_string_char
*
this
)
{
if
(
this
->
res
==
BUF_SIZE_CHAR
-
1
)
return
this
->
data
.
buf
;
return
this
->
data
.
ptr
;
}
static
const
wchar_t
*
basic_string_wchar_const_ptr
(
const
basic_string_wchar
*
this
)
{
if
(
this
->
res
==
BUF_SIZE_WCHAR
-
1
)
return
this
->
data
.
buf
;
return
this
->
data
.
ptr
;
}
/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
DEFINE_THISCALL_WRAPPER
(
basic_string_char_rbegin
,
8
)
basic_string_char_reverse_iter
*
__thiscall
basic_string_char_rbegin
(
const
basic_string_char
*
this
,
basic_string_char_reverse_iter
*
ret
)
{
ret
->
cont
=
NULL
;
ret
->
bstr
=
this
;
ret
->
pos
=
basic_string_char_const_ptr
(
this
)
+
this
->
size
;
return
ret
;
}
/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
DEFINE_THISCALL_WRAPPER
(
basic_string_wchar_rbegin
,
8
)
basic_string_wchar_reverse_iter
*
__thiscall
basic_string_wchar_rbegin
(
const
basic_string_wchar
*
this
,
basic_string_wchar_reverse_iter
*
ret
)
{
ret
->
cont
=
NULL
;
ret
->
bstr
=
this
;
ret
->
pos
=
basic_string_wchar_const_ptr
(
this
)
+
this
->
size
;
return
ret
;
}
/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
DEFINE_THISCALL_WRAPPER
(
basic_string_char_rend
,
8
)
basic_string_char_reverse_iter
*
__thiscall
basic_string_char_rend
(
const
basic_string_char
*
this
,
basic_string_char_reverse_iter
*
ret
)
{
ret
->
cont
=
NULL
;
ret
->
bstr
=
this
;
ret
->
pos
=
basic_string_char_const_ptr
(
this
);
return
ret
;
}
/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */
DEFINE_THISCALL_WRAPPER
(
basic_string_wchar_rend
,
8
)
basic_string_wchar_reverse_iter
*
__thiscall
basic_string_wchar_rend
(
const
basic_string_wchar
*
this
,
basic_string_wchar_reverse_iter
*
ret
)
{
ret
->
cont
=
NULL
;
ret
->
bstr
=
this
;
ret
->
pos
=
basic_string_wchar_const_ptr
(
this
);
return
ret
;
}
dlls/msvcp80/msvcp80.spec
View file @
f9ff5fe3
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