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
c56c7433
Commit
c56c7433
authored
Dec 06, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Added _Getctype implementation.
parent
34d94718
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
6 deletions
+60
-6
locale.c
dlls/msvcp90/locale.c
+23
-4
msvcp90.spec
dlls/msvcp90/msvcp90.spec
+1
-1
misc.c
dlls/msvcp90/tests/misc.c
+36
-1
No files found.
dlls/msvcp90/locale.c
View file @
c56c7433
...
...
@@ -68,7 +68,7 @@ typedef struct {
typedef
struct
{
LCID
handle
;
unsigned
page
;
const
short
*
table
;
short
*
table
;
int
delfl
;
}
_Ctypevec
;
...
...
@@ -868,14 +868,33 @@ _Collvec __thiscall _Locinfo__Getcoll(const _Locinfo *this)
return
_Getcoll
();
}
/* _Getctype */
_Ctypevec
__cdecl
_Getctype
(
void
)
{
_Ctypevec
ret
;
_locale_t
locale
=
_get_current_locale
();
TRACE
(
"
\n
"
);
ret
.
page
=
locale
->
locinfo
->
lc_codepage
;
ret
.
handle
=
locale
->
locinfo
->
lc_handle
[
LC_COLLATE
];
ret
.
delfl
=
TRUE
;
ret
.
table
=
malloc
(
sizeof
(
short
[
256
]));
if
(
!
ret
.
table
)
{
_free_locale
(
locale
);
throw_exception
(
EXCEPTION_BAD_ALLOC
,
NULL
);
}
memcpy
(
ret
.
table
,
locale
->
locinfo
->
pctype
,
sizeof
(
short
[
256
]));
_free_locale
(
locale
);
return
ret
;
}
/* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
/* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
DEFINE_THISCALL_WRAPPER_RETPTR
(
_Locinfo__Getctype
,
4
)
_Ctypevec
__thiscall
_Locinfo__Getctype
(
const
_Locinfo
*
this
)
{
_Ctypevec
ret
=
{
0
};
/* FIXME */
FIXME
(
"(%p) stub
\n
"
,
this
);
return
ret
;
return
_Getctype
();
}
/* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
...
...
dlls/msvcp90/msvcp90.spec
View file @
c56c7433
...
...
@@ -5751,7 +5751,7 @@
@ extern _FSnan
# extern _FXbig
@ cdecl _Getcoll()
@
stub _Getctype
@
cdecl _Getctype()
@ stub _Getcvt
@ stub _Getdateorder
@ stub _Getwctype
...
...
dlls/msvcp90/tests/misc.c
View file @
c56c7433
...
...
@@ -17,12 +17,22 @@
*/
#include <stdio.h>
#include <locale.h>
#include <windef.h>
#include <winbase.h>
#include "wine/test.h"
typedef
struct
{
LCID
handle
;
unsigned
page
;
short
*
table
;
int
delfl
;
}
MSVCP__Ctypevec
;
static
void
*
(
__cdecl
*
p_set_invalid_parameter_handler
)(
void
*
);
static
_locale_t
(
__cdecl
*
p__get_current_locale
)(
void
);
static
void
(
__cdecl
*
p_free
)(
void
*
);
static
void
(
__cdecl
*
p_char_assign
)(
void
*
,
const
void
*
);
static
void
(
__cdecl
*
p_wchar_assign
)(
void
*
,
const
void
*
);
...
...
@@ -35,6 +45,7 @@ static BYTE (__cdecl *p_short_eq)(const void*, const void*);
static
char
*
(
__cdecl
*
p_Copy_s
)(
char
*
,
size_t
,
const
char
*
,
size_t
);
static
unsigned
short
(
__cdecl
*
p_wctype
)(
const
char
*
);
static
MSVCP__Ctypevec
(
__cdecl
*
p__Getctype
)(
void
);
#ifdef __i386__
#define __thiscall __stdcall
...
...
@@ -119,7 +130,9 @@ static BOOL init(void)
}
p_set_invalid_parameter_handler
=
(
void
*
)
GetProcAddress
(
msvcr
,
"_set_invalid_parameter_handler"
);
if
(
!
p_set_invalid_parameter_handler
)
{
p__get_current_locale
=
(
void
*
)
GetProcAddress
(
msvcr
,
"_get_current_locale"
);
p_free
=
(
void
*
)
GetProcAddress
(
msvcr
,
"free"
);
if
(
!
p_set_invalid_parameter_handler
||
!
p__get_current_locale
||
!
p_free
)
{
win_skip
(
"Error setting tests environment
\n
"
);
return
FALSE
;
}
...
...
@@ -127,6 +140,7 @@ static BOOL init(void)
p_set_invalid_parameter_handler
(
test_invalid_parameter_handler
);
SET
(
p_wctype
,
"wctype"
);
SET
(
p__Getctype
,
"_Getctype"
);
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
SET
(
p_char_assign
,
"?assign@?$char_traits@D@std@@SAXAEADAEBD@Z"
);
SET
(
p_wchar_assign
,
"?assign@?$char_traits@_W@std@@SAXAEA_WAEB_W@Z"
);
...
...
@@ -291,6 +305,26 @@ static void test_wctype(void)
}
}
static
void
test__Getctype
(
void
)
{
MSVCP__Ctypevec
ret
;
ret
=
p__Getctype
();
ok
(
ret
.
handle
==
0
,
"ret.handle = %d
\n
"
,
ret
.
handle
);
ok
(
ret
.
page
==
0
,
"ret.page = %d
\n
"
,
ret
.
page
);
ok
(
ret
.
delfl
==
1
,
"ret.delfl = %d
\n
"
,
ret
.
delfl
);
ok
(
ret
.
table
[
0
]
==
32
,
"ret.table[0] = %d
\n
"
,
ret
.
table
[
0
]);
p_free
(
ret
.
table
);
p__get_current_locale
()
->
locinfo
->
lc_handle
[
LC_COLLATE
]
=
1
;
ret
=
p__Getctype
();
ok
(
ret
.
handle
==
1
,
"ret.handle = %d
\n
"
,
ret
.
handle
);
ok
(
ret
.
page
==
0
,
"ret.page = %d
\n
"
,
ret
.
page
);
ok
(
ret
.
delfl
==
1
,
"ret.delfl = %d
\n
"
,
ret
.
delfl
);
ok
(
ret
.
table
[
0
]
==
32
,
"ret.table[0] = %d
\n
"
,
ret
.
table
[
0
]);
p_free
(
ret
.
table
);
}
static
void
test_allocator_char
(
void
)
{
void
*
allocator
=
(
void
*
)
0xdeadbeef
;
...
...
@@ -331,6 +365,7 @@ START_TEST(misc)
test_equal
();
test_Copy_s
();
test_wctype
();
test__Getctype
();
test_allocator_char
();
...
...
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