Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
7fe881c7
Commit
7fe881c7
authored
19 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
msvcrt: Implementation of wcsftime (based on a patch by Mike McCormack).
parent
418b8399
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msvcrt/time.c
+21
-3
21 additions, 3 deletions
dlls/msvcrt/time.c
with
21 additions
and
3 deletions
dlls/msvcrt/time.c
+
21
−
3
View file @
7fe881c7
...
...
@@ -445,10 +445,28 @@ MSVCRT_size_t MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *format,
MSVCRT_size_t
MSVCRT_wcsftime
(
MSVCRT_wchar_t
*
str
,
MSVCRT_size_t
max
,
const
MSVCRT_wchar_t
*
format
,
const
struct
MSVCRT_tm
*
mstm
)
{
FIXME
(
"%p, %d, %s, %p - stub
\n
"
,
str
,
max
,
debugstr_w
(
format
),
mstm
);
char
*
s
,
*
fmt
;
MSVCRT_size_t
len
;
*
str
=
'\0'
;
return
0
;
TRACE
(
"%p %d %s %p
\n
"
,
str
,
max
,
debugstr_w
(
format
),
mstm
);
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
format
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
!
(
fmt
=
MSVCRT_malloc
(
len
)))
return
0
;
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
format
,
-
1
,
fmt
,
len
,
NULL
,
NULL
);
if
((
s
=
MSVCRT_malloc
(
max
*
4
)))
{
struct
tm
tm
;
msvcrt_tm_to_unix
(
&
tm
,
mstm
);
if
(
!
strftime
(
s
,
max
*
4
,
fmt
,
&
tm
))
s
[
0
]
=
0
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
s
,
-
1
,
str
,
max
);
if
(
len
)
len
--
;
MSVCRT_free
(
s
);
}
else
len
=
0
;
MSVCRT_free
(
fmt
);
return
len
;
}
/*********************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment