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
ac26d786
Commit
ac26d786
authored
Sep 28, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Sep 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Convert the Unix asctime string from CP_UNIXCP to CP_ACP.
parent
68abad93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
time.c
dlls/msvcrt/time.c
+7
-3
No files found.
dlls/msvcrt/time.c
View file @
ac26d786
...
...
@@ -756,6 +756,9 @@ MSVCRT_size_t CDECL MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max,
*/
char
*
CDECL
MSVCRT_asctime
(
const
struct
MSVCRT_tm
*
mstm
)
{
char
bufferA
[
30
];
WCHAR
bufferW
[
30
];
thread_data_t
*
data
=
msvcrt_get_thread_data
();
struct
tm
tm
;
...
...
@@ -764,12 +767,13 @@ char * CDECL MSVCRT_asctime(const struct MSVCRT_tm *mstm)
if
(
!
data
->
asctime_buffer
)
data
->
asctime_buffer
=
MSVCRT_malloc
(
30
);
/* ought to be enough */
/* FIXME: may want to map from Unix codepage to CP_ACP */
#ifdef HAVE_ASCTIME_R
asctime_r
(
&
tm
,
data
->
asctime_buffer
);
asctime_r
(
&
tm
,
bufferA
);
#else
strcpy
(
data
->
asctime_buffer
,
asctime
(
&
tm
)
);
strcpy
(
bufferA
,
asctime
(
&
tm
)
);
#endif
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
bufferA
,
-
1
,
bufferW
,
30
);
WideCharToMultiByte
(
CP_ACP
,
0
,
bufferW
,
-
1
,
data
->
asctime_buffer
,
30
,
NULL
,
NULL
);
return
data
->
asctime_buffer
;
}
...
...
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