Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7fe9abd5
Commit
7fe9abd5
authored
Dec 21, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Added ctype<char>::toupper functions implementation.
parent
283c07b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
9 deletions
+59
-9
locale.c
dlls/msvcp90/locale.c
+58
-8
msvcp90.spec
dlls/msvcp90/msvcp90.spec
+1
-1
No files found.
dlls/msvcp90/locale.c
View file @
7fe9abd5
...
...
@@ -1505,23 +1505,73 @@ const char* __thiscall ctype_char_tolower(const ctype_char *this, char *first, c
return
call_ctype_char_do_tolower
(
this
,
first
,
last
);
}
/* _Toupper */
int
__cdecl
_Toupper
(
int
ch
,
const
_Ctypevec
*
ctype
)
{
unsigned
int
cp
;
TRACE
(
"%d %p
\n
"
,
ch
,
ctype
);
if
(
ctype
)
cp
=
ctype
->
page
;
else
cp
=
___lc_codepage_func
();
/* Don't convert to unicode in case of C locale */
if
(
!
cp
)
{
if
(
ch
>=
'a'
&&
ch
<=
'z'
)
ch
=
ch
-
'a'
+
'A'
;
return
ch
;
}
else
{
WCHAR
wide
,
upper
;
char
str
[
2
];
int
size
;
if
(
ch
>
255
)
{
str
[
0
]
=
(
ch
>>
8
)
&
255
;
str
[
1
]
=
ch
&
255
;
size
=
2
;
}
else
{
str
[
0
]
=
ch
&
255
;
size
=
1
;
}
if
(
!
MultiByteToWideChar
(
cp
,
MB_ERR_INVALID_CHARS
,
str
,
size
,
&
wide
,
1
))
return
ch
;
upper
=
toupperW
(
wide
);
if
(
upper
==
wide
)
return
ch
;
WideCharToMultiByte
(
cp
,
0
,
&
upper
,
1
,
str
,
2
,
NULL
,
NULL
);
return
str
[
0
]
+
(
str
[
1
]
<<
8
);
}
}
/* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
/* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
#define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
char, (const ctype_char*, char), (this, ch))
DEFINE_THISCALL_WRAPPER
(
ctype_char_do_toupper_ch
,
8
)
char
__thiscall
ctype_char_do_toupper_ch
(
const
ctype_char
*
this
,
char
ch
)
{
FIXME
(
"(%p %c) stub
\n
"
,
this
,
ch
);
return
0
;
TRACE
(
"(%p %c)
\n
"
,
this
,
ch
);
return
_Toupper
(
ch
,
&
this
->
ctype
)
;
}
/* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
/* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
#define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
const char*, (const ctype_char*, char*, const char*), (this, first, last))
DEFINE_THISCALL_WRAPPER
(
ctype_char_do_toupper
,
12
)
const
char
*
__thiscall
ctype_char_do_toupper
(
const
ctype_char
*
this
,
char
*
first
,
const
char
*
last
)
{
FIXME
(
"(%p %p %p) stub
\n
"
,
this
,
first
,
last
);
return
NULL
;
TRACE
(
"(%p %p %p)
\n
"
,
this
,
first
,
last
);
for
(;
first
<
last
;
first
++
)
*
first
=
_Toupper
(
*
first
,
&
this
->
ctype
);
return
last
;
}
/* ?toupper@?$ctype@D@std@@QBEDD@Z */
...
...
@@ -1529,8 +1579,8 @@ const char* __thiscall ctype_char_do_toupper(const ctype_char *this,
DEFINE_THISCALL_WRAPPER
(
ctype_char_toupper_ch
,
8
)
char
__thiscall
ctype_char_toupper_ch
(
const
ctype_char
*
this
,
char
ch
)
{
FIXME
(
"(%p %c) stub
\n
"
,
this
,
ch
);
return
0
;
TRACE
(
"(%p %c)
\n
"
,
this
,
ch
);
return
call_ctype_char_do_toupper_ch
(
this
,
ch
)
;
}
/* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
...
...
@@ -1538,8 +1588,8 @@ char __thiscall ctype_char_toupper_ch(const ctype_char *this, char ch)
DEFINE_THISCALL_WRAPPER
(
ctype_char_toupper
,
12
)
const
char
*
__thiscall
ctype_char_toupper
(
const
ctype_char
*
this
,
char
*
first
,
const
char
*
last
)
{
FIXME
(
"(%p %p %p) stub
\n
"
,
this
,
first
,
last
);
return
NULL
;
TRACE
(
"(%p %p %p)
\n
"
,
this
,
first
,
last
);
return
call_ctype_char_do_toupper
(
this
,
first
,
last
)
;
}
/* ?is@?$ctype@D@std@@QBE_NFD@Z */
...
...
dlls/msvcp90/msvcp90.spec
View file @
7fe9abd5
...
...
@@ -5799,7 +5799,7 @@
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ stub _Strxfrm
@ cdecl _Tolower(long ptr)
@
stub _Toupper
@
cdecl _Toupper(long ptr)
@ stub _Towlower
@ stub _Towupper
@ stub _Wcrtomb
...
...
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