source: trunk/src/kernel32/time.cpp@ 17

Last change on this file since 17 was 17, checked in by phaller, 26 years ago

Code cleanup #1 for build, mainly addresses linkage problems

File size: 9.1 KB
Line 
1/* $Id: time.cpp,v 1.2 1999-05-31 22:08:13 phaller Exp $ */
2
3/*
4 *
5 * Project Odin Software License can be found in LICENSE.TXT
6 *
7 */
8/*
9 * Win32 timer API functions
10 *
11 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
12 *
13 */
14#include <os2win.h>
15#include <winnls.h>
16#include "misc.h"
17
18
19//******************************************************************************
20//******************************************************************************
21VOID WIN32API GetLocalTime( LPSYSTEMTIME arg1)
22{
23/// dprintf(("KERNEL32: GetLocalTime\n"));
24 O32_GetLocalTime(arg1);
25}
26//******************************************************************************
27//******************************************************************************
28BOOL WIN32API SetLocalTime( const SYSTEMTIME * arg1)
29{
30 dprintf(("KERNEL32: SetLocalTime\n"));
31 return O32_SetLocalTime(arg1);
32}
33//******************************************************************************
34//******************************************************************************
35BOOL WIN32API FileTimeToDosDateTime(const FILETIME * arg1, LPWORD arg2, LPWORD arg3)
36{
37 dprintf(("KERNEL32: FileTimeToDosDateTime\n"));
38 return O32_FileTimeToDosDateTime(arg1, arg2, arg3);
39}
40//******************************************************************************
41//******************************************************************************
42BOOL WIN32API FileTimeToLocalFileTime(const FILETIME * arg1, LPFILETIME arg2)
43{
44 dprintf(("KERNEL32: FileTimeToLocalFileTime\n"));
45 return O32_FileTimeToLocalFileTime(arg1, arg2);
46}
47//******************************************************************************
48//******************************************************************************
49BOOL WIN32API LocalFileTimeToFileTime(const FILETIME * arg1, LPFILETIME arg2)
50{
51 dprintf(("KERNEL32: LocalFileTimeToFileTime\n"));
52 return O32_LocalFileTimeToFileTime(arg1, arg2);
53}
54//******************************************************************************
55//******************************************************************************
56BOOL WIN32API FileTimeToSystemTime(const FILETIME * arg1, LPSYSTEMTIME arg2)
57{
58 dprintf(("KERNEL32: FileTimeToSystemTime"));
59 return O32_FileTimeToSystemTime(arg1, arg2);
60}
61//******************************************************************************
62//******************************************************************************
63BOOL WIN32API DosDateTimeToFileTime( WORD arg1, WORD arg2, LPFILETIME arg3)
64{
65 dprintf(("KERNEL32: DosDateTimeToFileTime\n"));
66 return O32_DosDateTimeToFileTime(arg1, arg2, arg3);
67}
68//******************************************************************************
69//******************************************************************************
70BOOL WIN32API GetFileTime( HANDLE arg1, LPFILETIME arg2, LPFILETIME arg3, LPFILETIME arg4)
71{
72 dprintf(("KERNEL32: GetFileTime\n"));
73 return O32_GetFileTime(arg1, arg2, arg3, arg4);
74}
75//******************************************************************************
76//******************************************************************************
77DWORD WIN32API GetTimeZoneInformation( LPTIME_ZONE_INFORMATION arg1)
78{
79 dprintf(("KERNEL32: GetTimeZoneInformation\n"));
80 return O32_GetTimeZoneInformation(arg1);
81}
82//******************************************************************************
83//******************************************************************************
84DWORD WIN32API GetTickCount(void)
85{
86//// dprintf(("KERNEL32: GetTickCount\n"));
87 return O32_GetTickCount();
88}
89//******************************************************************************
90//******************************************************************************
91VOID WIN32API GetSystemTime( LPSYSTEMTIME arg1)
92{
93 dprintf(("KERNEL32: OS2GetSystemTime\n"));
94 O32_GetSystemTime(arg1);
95}
96//******************************************************************************
97//******************************************************************************
98BOOL WIN32API SystemTimeToFileTime( const SYSTEMTIME * arg1, LPFILETIME arg2)
99{
100 dprintf(("KERNEL32: OS2SystemTimeToFileTime\n"));
101 return O32_SystemTimeToFileTime(arg1, arg2);
102}
103//******************************************************************************
104//******************************************************************************
105BOOL WIN32API SystemTimeToTzSpecificLocalTime( LPTIME_ZONE_INFORMATION arg1, LPSYSTEMTIME arg2, LPSYSTEMTIME arg3)
106{
107 dprintf(("KERNEL32: OS2SystemTimeToTzSpecificLocalTime\n"));
108 return O32_SystemTimeToTzSpecificLocalTime(arg1, arg2, arg3);
109}
110//******************************************************************************
111//******************************************************************************
112BOOL WIN32API SetTimeZoneInformation( const LPTIME_ZONE_INFORMATION arg1)
113{
114 dprintf(("KERNEL32: OS2SetTimeZoneInformation\n"));
115 return O32_SetTimeZoneInformation(arg1);
116}
117//******************************************************************************
118//******************************************************************************
119BOOL WIN32API SetSystemTime(const SYSTEMTIME * arg1)
120{
121 dprintf(("KERNEL32: OS2SetSystemTime\n"));
122 return O32_SetSystemTime(arg1);
123}
124//******************************************************************************
125//******************************************************************************
126INT WIN32API GetTimeFormatA(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
127 LPCSTR lpFormat, LPSTR lpTimeStr, INT cchTime)
128{
129 dprintf(("KERNEL32: OS2GetTimeFormatA not implemented!!\n"));
130 return(0);
131}
132//******************************************************************************
133//******************************************************************************
134INT WIN32API GetTimeFormatW(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
135 LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchTime)
136{
137 dprintf(("KERNEL32: OS2GetTimeFormatW not implemented!!\n"));
138 return(0);
139}
140//******************************************************************************
141//******************************************************************************
142int WIN32API GetDateFormatA(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
143 LPCSTR lpFormat, LPSTR lpDateStr, int cchDate)
144{
145 dprintf(("KERNEL32: OS2GetDateFormatA not implemented!!\n"));
146 return(0);
147}
148//******************************************************************************
149//******************************************************************************
150int WIN32API GetDateFormatW(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
151 LPCWSTR lpFormat, LPWSTR lpDateStr, int cchDate)
152{
153 dprintf(("KERNEL32: OS2GetDateFormatW not implemented!!\n"));
154 return(0);
155}
156//******************************************************************************
157//******************************************************************************
158BOOL WIN32API EnumTimeFormatsA(TIMEFMT_ENUMPROCA lpDataFmtEnumProc,
159 LCID Locale, DWORD dwFlags)
160{
161 dprintf(("KERNEL32: OS2EnumTimeFormatsA, not implemented\n"));
162 return(FALSE);
163}
164//******************************************************************************
165//******************************************************************************
166BOOL WIN32API EnumTimeFormatsW(TIMEFMT_ENUMPROCW lpDataFmtEnumProc,
167 LCID Locale, DWORD dwFlags)
168{
169 dprintf(("KERNEL32: OS2EnumTimeFormatsW, not implemented\n"));
170 return(FALSE);
171}
172/*****************************************************************************
173 * Name : DWORD GetSystemTimeAsFileTime
174 * Purpose : The GetSystemTimeAsFileTime function obtains the current system
175 * date and time. The information is in Coordinated Universal Time (UTC) format.
176 * Parameters: LLPFILETIME lLPSYSTEMTIMEAsFileTime
177 * Variables :
178 * Result :
179 * Remark :
180 * Status : UNTESTED
181 *
182 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
183 *****************************************************************************/
184
185VOID WIN32API GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime)
186{
187 FILETIME ft; /* code sequence from WIN32.HLP */
188 SYSTEMTIME st;
189
190 dprintf(("KERNEL32: GetSystemTimeAsFileTime(%08xh)\n", lpSystemTimeAsFileTime));
191
192 GetSystemTime(&st);
193 SystemTimeToFileTime(&st, &ft);
194}
195//******************************************************************************
196//******************************************************************************
197BOOL WIN32API EnumDateFormatsA(DATEFMT_ENUMPROCA lpDataFmtEnumProc,
198 LCID Locale, DWORD dwFlags)
199{
200 dprintf(("KERNEL32: OS2EnumDateFormatsA, not implemented\n"));
201 return(FALSE);
202}
203//******************************************************************************
204//******************************************************************************
205BOOL WIN32API EnumDateFormatsW(DATEFMT_ENUMPROCW lpDataFmtEnumProc,
206 LCID Locale, DWORD dwFlags)
207{
208 dprintf(("KERNEL32: OS2EnumDateFormatsW, not implemented\n"));
209 return(FALSE);
210}
Note: See TracBrowser for help on using the repository browser.