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
d58b385b
Commit
d58b385b
authored
Apr 15, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Change implementation of setlocale.
parent
10023a15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
ctype.c
dlls/msvcrt/ctype.c
+3
-6
locale.c
dlls/msvcrt/locale.c
+0
-0
main.c
dlls/msvcrt/main.c
+10
-3
msvcrt.h
dlls/msvcrt/msvcrt.h
+3
-2
No files found.
dlls/msvcrt/ctype.c
View file @
d58b385b
...
...
@@ -50,15 +50,12 @@ WORD MSVCRT__ctype [257] = {
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
/* Internal: Current ctype table for locale */
WORD
MSVCRT_current_ctype
[
257
];
/* pctype is used by macros in the Win32 headers. It must point
* To a table of flags exactly like ctype. To allow locale
* changes to affect ctypes (i.e. isleadbyte), we use a second table
* and update its flags whenever the current locale changes.
*/
WORD
*
MSVCRT__pctype
=
MSVCRT_current_ctype
+
1
;
WORD
*
MSVCRT__pctype
;
/*********************************************************************
* __pctype_func (MSVCRT.@)
...
...
@@ -87,8 +84,8 @@ int CDECL _isctype(int c, int type)
*
pconv
++
=
c
&
0xff
;
*
pconv
=
0
;
/* FIXME: Use ctype LCID, not lc_all */
if
(
GetStringTypeExA
(
MSVCRT_
current_lc_all_lcid
,
CT_CTYPE1
,
convert
,
convert
[
1
]
?
2
:
1
,
&
typeInfo
))
if
(
GetStringTypeExA
(
MSVCRT_
locale
->
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
]
,
CT_CTYPE1
,
convert
,
convert
[
1
]
?
2
:
1
,
&
typeInfo
))
return
typeInfo
&
type
;
}
return
0
;
...
...
dlls/msvcrt/locale.c
View file @
d58b385b
This diff is collapsed.
Click to expand it.
dlls/msvcrt/main.c
View file @
d58b385b
...
...
@@ -86,14 +86,20 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
if
(
!
msvcrt_init_tls
())
return
FALSE
;
msvcrt_init_mt_locks
();
if
(
!
MSVCRT_setlocale
(
0
,
"C"
))
{
msvcrt_free_mt_locks
();
return
FALSE
;
}
if
(
!
msvcrt_init_tls
())
{
_free_locale
(
MSVCRT_locale
);
msvcrt_free_mt_locks
();
return
FALSE
;
}
msvcrt_init_io
();
msvcrt_init_console
();
msvcrt_init_args
();
msvcrt_init_signals
();
MSVCRT_setlocale
(
0
,
"C"
);
_setmbcp
(
_MB_CP_LOCALE
);
TRACE
(
"finished process init
\n
"
);
break
;
...
...
@@ -108,6 +114,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
msvcrt_free_tls_mem
();
if
(
!
msvcrt_free_tls
())
return
FALSE
;
_free_locale
(
MSVCRT_locale
);
TRACE
(
"finished process free
\n
"
);
break
;
case
DLL_THREAD_DETACH
:
...
...
dlls/msvcrt/msvcrt.h
View file @
d58b385b
...
...
@@ -124,9 +124,7 @@ extern thread_data_t *msvcrt_get_thread_data(void);
extern
int
MSVCRT___lc_codepage
;
extern
int
MSVCRT___lc_collate_cp
;
extern
int
MSVCRT___mb_cur_max
;
extern
LCID
MSVCRT_current_lc_all_lcid
;
extern
WORD
MSVCRT__ctype
[
257
];
extern
WORD
MSVCRT_current_ctype
[
257
];
extern
WORD
*
MSVCRT__pctype
;
void
msvcrt_set_errno
(
int
);
...
...
@@ -792,6 +790,9 @@ typedef struct MSVCRT_localeinfo_struct
MSVCRT_pthreadmbcinfo
mbcinfo
;
}
MSVCRT__locale_tstruct
,
*
MSVCRT__locale_t
;
extern
MSVCRT__locale_t
MSVCRT_locale
;
void
__cdecl
_free_locale
(
MSVCRT__locale_t
);
#ifndef __WINE_MSVCRT_TEST
int
__cdecl
MSVCRT__write
(
int
,
const
void
*
,
unsigned
int
);
int
__cdecl
_getch
(
void
);
...
...
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