Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9a583763
Commit
9a583763
authored
Dec 21, 2005
by
Marcus Meissner
Committed by
Alexandre Julliard
Dec 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented wctime(), wasctime().
Free thread data in DLL_THREAD_DETACH.
parent
9f34fd37
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
2 deletions
+37
-2
main.c
dlls/msvcrt/main.c
+2
-0
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
time.c
dlls/msvcrt/time.c
+32
-0
No files found.
dlls/msvcrt/main.c
View file @
9a583763
...
@@ -70,6 +70,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
...
@@ -70,6 +70,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case
DLL_THREAD_DETACH
:
case
DLL_THREAD_DETACH
:
/* Free TLS */
/* Free TLS */
tls
=
TlsGetValue
(
msvcrt_tls_index
);
tls
=
TlsGetValue
(
msvcrt_tls_index
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
efcvt_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
wasctime_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
);
TRACE
(
"finished thread free
\n
"
);
TRACE
(
"finished thread free
\n
"
);
break
;
break
;
...
...
dlls/msvcrt/msvcrt.h
View file @
9a583763
...
@@ -83,6 +83,7 @@ struct __thread_data {
...
@@ -83,6 +83,7 @@ struct __thread_data {
unsigned
long
thread_doserrno
;
unsigned
long
thread_doserrno
;
unsigned
char
*
mbstok_next
;
/* next ptr for mbstok() */
unsigned
char
*
mbstok_next
;
/* next ptr for mbstok() */
char
*
efcvt_buffer
;
/* buffer for ecvt/fcvt */
char
*
efcvt_buffer
;
/* buffer for ecvt/fcvt */
MSVCRT_wchar_t
*
wasctime_buffer
;
/* buffer for asctime */
int
fpecode
;
int
fpecode
;
MSVCRT_terminate_function
terminate_handler
;
MSVCRT_terminate_function
terminate_handler
;
MSVCRT_unexpected_function
unexpected_handler
;
MSVCRT_unexpected_function
unexpected_handler
;
...
...
dlls/msvcrt/msvcrt.spec
View file @
9a583763
...
@@ -487,7 +487,7 @@
...
@@ -487,7 +487,7 @@
@ cdecl _vsnprintf(ptr long ptr ptr) MSVCRT_vsnprintf
@ cdecl _vsnprintf(ptr long ptr ptr) MSVCRT_vsnprintf
@ cdecl _vsnwprintf(ptr long wstr long) MSVCRT_vsnwprintf
@ cdecl _vsnwprintf(ptr long wstr long) MSVCRT_vsnwprintf
@ cdecl _waccess(wstr long)
@ cdecl _waccess(wstr long)
@
stub _wasctime #
(ptr) MSVCRT__wasctime
@
cdecl _wasctime
(ptr) MSVCRT__wasctime
@ cdecl _wchdir(wstr)
@ cdecl _wchdir(wstr)
@ cdecl _wchmod(wstr long)
@ cdecl _wchmod(wstr long)
@ extern _wcmdln MSVCRT__wcmdln
@ extern _wcmdln MSVCRT__wcmdln
...
@@ -503,7 +503,7 @@
...
@@ -503,7 +503,7 @@
@ cdecl _wcsrev(wstr)
@ cdecl _wcsrev(wstr)
@ cdecl _wcsset(wstr long)
@ cdecl _wcsset(wstr long)
@ cdecl _wcsupr(wstr) ntdll._wcsupr
@ cdecl _wcsupr(wstr) ntdll._wcsupr
@
stub _wctime #(ptr)
@
cdecl _wctime(ptr) MSVCRT__wctime
@ extern _wenviron
@ extern _wenviron
@ stub _wexecl #(wstr wstr) varargs
@ stub _wexecl #(wstr wstr) varargs
@ stub _wexecle #(wstr wstr) varargs
@ stub _wexecle #(wstr wstr) varargs
...
...
dlls/msvcrt/time.c
View file @
9a583763
...
@@ -410,3 +410,35 @@ void MSVCRT__tzset(void)
...
@@ -410,3 +410,35 @@ void MSVCRT__tzset(void)
lstrcpynA
(
tzname_dst
,
tzname
[
1
],
sizeof
(
tzname_dst
));
lstrcpynA
(
tzname_dst
,
tzname
[
1
],
sizeof
(
tzname_dst
));
tzname_dst
[
sizeof
(
tzname_dst
)
-
1
]
=
'\0'
;
tzname_dst
[
sizeof
(
tzname_dst
)
-
1
]
=
'\0'
;
}
}
/*********************************************************************
* _wctime (MSVCRT.@)
*/
MSVCRT_wchar_t
*
MSVCRT__wasctime
(
const
struct
MSVCRT_tm
*
mstm
)
{
thread_data_t
*
data
=
msvcrt_get_thread_data
();
struct
tm
xtm
;
memset
(
&
xtm
,
0
,
sizeof
(
xtm
));
xtm
.
tm_sec
=
mstm
->
tm_sec
;
xtm
.
tm_min
=
mstm
->
tm_min
;
xtm
.
tm_hour
=
mstm
->
tm_hour
;
xtm
.
tm_mday
=
mstm
->
tm_mday
;
xtm
.
tm_mon
=
mstm
->
tm_mon
;
xtm
.
tm_year
=
mstm
->
tm_year
;
xtm
.
tm_wday
=
mstm
->
tm_wday
;
xtm
.
tm_yday
=
mstm
->
tm_yday
;
xtm
.
tm_isdst
=
mstm
->
tm_isdst
;
if
(
!
data
->
wasctime_buffer
)
data
->
wasctime_buffer
=
MSVCRT_malloc
(
30
*
sizeof
(
MSVCRT_wchar_t
)
);
/* ought to be enough */
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
asctime
(
&
xtm
),
-
1
,
data
->
wasctime_buffer
,
30
);
return
data
->
wasctime_buffer
;
}
/*********************************************************************
* _wctime (MSVCRT.@)
*/
MSVCRT_wchar_t
*
MSVCRT__wctime
(
MSVCRT_time_t
*
time
)
{
return
MSVCRT__wasctime
(
MSVCRT_localtime
(
time
)
);
}
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