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
859261f4
Commit
859261f4
authored
Feb 02, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Make __lc_time_data more similar to native.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b54ab691
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
locale.c
dlls/msvcrt/locale.c
+6
-0
msvcrt.h
dlls/msvcrt/msvcrt.h
+2
-0
No files found.
dlls/msvcrt/locale.c
View file @
859261f4
...
...
@@ -63,12 +63,14 @@ __lc_time_data cloc_time_data =
MAKELCID
(
LANG_ENGLISH
,
SORT_DEFAULT
),
#endif
1
,
0
,
#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
{{
L"Sun"
,
L"Mon"
,
L"Tue"
,
L"Wed"
,
L"Thu"
,
L"Fri"
,
L"Sat"
,
L"Sunday"
,
L"Monday"
,
L"Tuesday"
,
L"Wednesday"
,
L"Thursday"
,
L"Friday"
,
L"Saturday"
,
L"Jan"
,
L"Feb"
,
L"Mar"
,
L"Apr"
,
L"May"
,
L"Jun"
,
L"Jul"
,
L"Aug"
,
L"Sep"
,
L"Oct"
,
L"Nov"
,
L"Dec"
,
L"January"
,
L"February"
,
L"March"
,
L"April"
,
L"May"
,
L"June"
,
L"July"
,
L"August"
,
L"September"
,
L"October"
,
L"November"
,
L"December"
,
L"AM"
,
L"PM"
,
L"MM/dd/yy"
,
L"dddd, MMMM dd, yyyy"
,
L"HH:mm:ss"
}},
#endif
#if _MSVCR_VER >= 110
L"en-US"
,
#endif
...
...
@@ -1184,10 +1186,12 @@ static __lc_time_data* create_time_data(LCID lcid)
return
NULL
;
size
+=
ret
;
#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
ret
=
GetLocaleInfoW
(
lcid
,
time_data
[
i
],
NULL
,
0
);
if
(
!
ret
)
return
NULL
;
size
+=
ret
*
sizeof
(
wchar_t
);
#endif
}
#if _MSVCR_VER >= 110
size
+=
LCIDToLocaleName
(
lcid
,
NULL
,
0
,
0
)
*
sizeof
(
wchar_t
);
...
...
@@ -1202,11 +1206,13 @@ static __lc_time_data* create_time_data(LCID lcid)
cur
->
str
.
str
[
i
]
=
&
cur
->
data
[
ret
];
ret
+=
GetLocaleInfoA
(
lcid
,
time_data
[
i
],
&
cur
->
data
[
ret
],
size
-
ret
);
}
#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
time_data
);
i
++
)
{
cur
->
wstr
.
wstr
[
i
]
=
(
wchar_t
*
)
&
cur
->
data
[
ret
];
ret
+=
GetLocaleInfoW
(
lcid
,
time_data
[
i
],
(
wchar_t
*
)
&
cur
->
data
[
ret
],
size
-
ret
)
*
sizeof
(
wchar_t
);
}
#endif
#if _MSVCR_VER >= 110
cur
->
locname
=
(
wchar_t
*
)
&
cur
->
data
[
ret
];
LCIDToLocaleName
(
lcid
,
(
wchar_t
*
)
&
cur
->
data
[
ret
],
(
size
-
ret
)
/
sizeof
(
wchar_t
),
0
);
...
...
dlls/msvcrt/msvcrt.h
View file @
859261f4
...
...
@@ -66,6 +66,7 @@ typedef struct __lc_time_data {
#endif
int
unk
;
int
refcount
;
#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
union
{
const
wchar_t
*
wstr
[
43
];
struct
{
...
...
@@ -80,6 +81,7 @@ typedef struct __lc_time_data {
const
wchar_t
*
time
;
}
names
;
}
wstr
;
#endif
#if _MSVCR_VER >= 110
const
wchar_t
*
locname
;
#endif
...
...
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