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
27597799
Commit
27597799
authored
Apr 13, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix months and weekday names in C locale.
parent
34608a51
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
locale.c
dlls/msvcrt/locale.c
+6
-7
No files found.
dlls/msvcrt/locale.c
View file @
27597799
...
...
@@ -756,7 +756,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
static
const
MSVCRT_wchar_t
cloc_timeW
[]
=
{
'H'
,
'H'
,
':'
,
'm'
,
'm'
,
':'
,
's'
,
's'
,
0
};
MSVCRT__locale_t
loc
;
LCID
lcid
[
6
]
=
{
0
};
LCID
lcid
[
6
]
=
{
0
}
,
lcid_tmp
;
char
buf
[
256
];
int
i
,
ret
,
size
;
...
...
@@ -1197,15 +1197,14 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
loc
->
locinfo
->
lc_category
[
MSVCRT_LC_TIME
].
locale
=
MSVCRT__strdup
(
"C"
);
size
=
sizeof
(
MSVCRT___lc_time_data
);
lcid_tmp
=
lcid
[
MSVCRT_LC_TIME
]
?
lcid
[
MSVCRT_LC_TIME
]
:
MAKELCID
(
LANG_ENGLISH
,
SORT_DEFAULT
);
for
(
i
=
0
;
i
<
sizeof
(
time_data
)
/
sizeof
(
time_data
[
0
]);
i
++
)
{
if
(
time_data
[
i
]
==
LOCALE_SSHORTDATE
&&
!
lcid
[
MSVCRT_LC_TIME
])
{
size
+=
sizeof
(
cloc_short_date
)
+
sizeof
(
cloc_short_dateW
);
}
else
if
(
time_data
[
i
]
==
LOCALE_SSHORTDATE
&&
!
lcid
[
MSVCRT_LC_TIME
])
{
size
+=
sizeof
(
cloc_long_date
)
+
sizeof
(
cloc_long_dateW
);
}
else
if
(
time_data
[
i
]
==
LOCALE_STIMEFORMAT
&&
!
lcid
[
MSVCRT_LC_TIME
])
{
size
+=
sizeof
(
cloc_time
)
+
sizeof
(
cloc_timeW
);
}
else
{
ret
=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_TIME
]
,
time_data
[
i
]
ret
=
GetLocaleInfoA
(
lcid
_tmp
,
time_data
[
i
]
|
LOCALE_NOUSEROVERRIDE
,
NULL
,
0
);
if
(
!
ret
)
{
MSVCRT__free_locale
(
loc
);
...
...
@@ -1213,7 +1212,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
}
size
+=
ret
;
ret
=
GetLocaleInfoW
(
lcid
[
MSVCRT_LC_TIME
]
,
time_data
[
i
]
ret
=
GetLocaleInfoW
(
lcid
_tmp
,
time_data
[
i
]
|
LOCALE_NOUSEROVERRIDE
,
NULL
,
0
);
if
(
!
ret
)
{
MSVCRT__free_locale
(
loc
);
...
...
@@ -1242,7 +1241,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
memcpy
(
&
loc
->
locinfo
->
lc_time_curr
->
data
[
ret
],
cloc_time
,
sizeof
(
cloc_time
));
ret
+=
sizeof
(
cloc_time
);
}
else
{
ret
+=
GetLocaleInfoA
(
lcid
[
MSVCRT_LC_TIME
]
,
time_data
[
i
]
|
LOCALE_NOUSEROVERRIDE
,
ret
+=
GetLocaleInfoA
(
lcid
_tmp
,
time_data
[
i
]
|
LOCALE_NOUSEROVERRIDE
,
&
loc
->
locinfo
->
lc_time_curr
->
data
[
ret
],
size
-
ret
);
}
}
...
...
@@ -1258,7 +1257,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
memcpy
(
&
loc
->
locinfo
->
lc_time_curr
->
data
[
ret
],
cloc_timeW
,
sizeof
(
cloc_timeW
));
ret
+=
sizeof
(
cloc_timeW
);
}
else
{
ret
+=
GetLocaleInfoW
(
lcid
[
MSVCRT_LC_TIME
]
,
time_data
[
i
]
|
LOCALE_NOUSEROVERRIDE
,
ret
+=
GetLocaleInfoW
(
lcid
_tmp
,
time_data
[
i
]
|
LOCALE_NOUSEROVERRIDE
,
(
MSVCRT_wchar_t
*
)
&
loc
->
locinfo
->
lc_time_curr
->
data
[
ret
],
size
-
ret
)
*
sizeof
(
MSVCRT_wchar_t
);
}
}
...
...
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