| 1 | /*
|
|---|
| 2 | * Time definitions
|
|---|
| 3 | *
|
|---|
| 4 | * Copyright 2000 Francois Gouget.
|
|---|
| 5 | *
|
|---|
| 6 | * This library is free software; you can redistribute it and/or
|
|---|
| 7 | * modify it under the terms of the GNU Lesser General Public
|
|---|
| 8 | * License as published by the Free Software Foundation; either
|
|---|
| 9 | * version 2.1 of the License, or (at your option) any later version.
|
|---|
| 10 | *
|
|---|
| 11 | * This library is distributed in the hope that it will be useful,
|
|---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 14 | * Lesser General Public License for more details.
|
|---|
| 15 | *
|
|---|
| 16 | * You should have received a copy of the GNU Lesser General Public
|
|---|
| 17 | * License along with this library; if not, write to the Free Software
|
|---|
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 19 | */
|
|---|
| 20 | #ifndef __WINE_TIME_H
|
|---|
| 21 | #define __WINE_TIME_H
|
|---|
| 22 | #define __WINE_USE_MSVCRT
|
|---|
| 23 |
|
|---|
| 24 | #include "winnt.h"
|
|---|
| 25 | #include "msvcrt/sys/types.h" /* For time_t */
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | #ifndef MSVCRT_SIZE_T_DEFINED
|
|---|
| 29 | typedef unsigned int MSVCRT(size_t);
|
|---|
| 30 | #define MSVCRT_SIZE_T_DEFINED
|
|---|
| 31 | #endif
|
|---|
| 32 |
|
|---|
| 33 | typedef long MSVCRT(clock_t);
|
|---|
| 34 |
|
|---|
| 35 | struct MSVCRT(tm) {
|
|---|
| 36 | int tm_sec;
|
|---|
| 37 | int tm_min;
|
|---|
| 38 | int tm_hour;
|
|---|
| 39 | int tm_mday;
|
|---|
| 40 | int tm_mon;
|
|---|
| 41 | int tm_year;
|
|---|
| 42 | int tm_wday;
|
|---|
| 43 | int tm_yday;
|
|---|
| 44 | int tm_isdst;
|
|---|
| 45 | };
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 | #ifdef __cplusplus
|
|---|
| 49 | extern "C" {
|
|---|
| 50 | #endif
|
|---|
| 51 |
|
|---|
| 52 | /* FIXME: Must do something for _daylight, _dstbias, _timezone, _tzname */
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 | unsigned _getsystime(struct MSVCRT(tm)*);
|
|---|
| 56 | unsigned _setsystime(struct MSVCRT(tm)*,unsigned);
|
|---|
| 57 | char* _strdate(char*);
|
|---|
| 58 | char* _strtime(char*);
|
|---|
| 59 | void _tzset(void);
|
|---|
| 60 |
|
|---|
| 61 | char* MSVCRT(asctime)(const struct MSVCRT(tm)*);
|
|---|
| 62 | MSVCRT(clock_t) MSVCRT(clock)(void);
|
|---|
| 63 | char* MSVCRT(ctime)(const MSVCRT(time_t)*);
|
|---|
| 64 | double MSVCRT(difftime)(MSVCRT(time_t),MSVCRT(time_t));
|
|---|
| 65 | struct MSVCRT(tm)* MSVCRT(gmtime)(const MSVCRT(time_t)*);
|
|---|
| 66 | struct MSVCRT(tm)* MSVCRT(localtime)(const MSVCRT(time_t)*);
|
|---|
| 67 | MSVCRT(time_t) MSVCRT(mktime)(struct MSVCRT(tm)*);
|
|---|
| 68 | size_t MSVCRT(strftime)(char*,size_t,const char*,const struct MSVCRT(tm)*);
|
|---|
| 69 | MSVCRT(time_t) MSVCRT(time)(MSVCRT(time_t)*);
|
|---|
| 70 |
|
|---|
| 71 | WCHAR* _wasctime(const struct MSVCRT(tm)*);
|
|---|
| 72 | MSVCRT(size_t) wcsftime(WCHAR*,MSVCRT(size_t),const WCHAR*,const struct MSVCRT(tm)*);
|
|---|
| 73 | WCHAR* _wctime(const MSVCRT(time_t)*);
|
|---|
| 74 | WCHAR* _wstrdate(WCHAR*);
|
|---|
| 75 | WCHAR* _wstrtime(WCHAR*);
|
|---|
| 76 |
|
|---|
| 77 | #ifdef __cplusplus
|
|---|
| 78 | }
|
|---|
| 79 | #endif
|
|---|
| 80 |
|
|---|
| 81 | #endif /* __WINE_TIME_H */
|
|---|