2001-04-11 01:21:43 +02:00
|
|
|
/*
|
|
|
|
* Time definitions
|
|
|
|
*
|
|
|
|
* Copyright 2000 Francois Gouget.
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-04-11 01:21:43 +02:00
|
|
|
*/
|
|
|
|
#ifndef __WINE_TIME_H
|
|
|
|
#define __WINE_TIME_H
|
2001-10-22 20:59:23 +02:00
|
|
|
#define __WINE_USE_MSVCRT
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2002-12-18 21:17:20 +01:00
|
|
|
#ifndef MSVCRT
|
|
|
|
# ifdef USE_MSVCRT_PREFIX
|
|
|
|
# define MSVCRT(x) MSVCRT_##x
|
|
|
|
# else
|
|
|
|
# define MSVCRT(x) x
|
|
|
|
# endif
|
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2002-12-18 21:17:20 +01:00
|
|
|
#ifndef MSVCRT_WCHAR_T_DEFINED
|
|
|
|
#define MSVCRT_WCHAR_T_DEFINED
|
|
|
|
#ifndef __cplusplus
|
|
|
|
typedef unsigned short MSVCRT(wchar_t);
|
|
|
|
#endif
|
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifndef MSVCRT_SIZE_T_DEFINED
|
|
|
|
typedef unsigned int MSVCRT(size_t);
|
|
|
|
#define MSVCRT_SIZE_T_DEFINED
|
|
|
|
#endif
|
|
|
|
|
2002-12-18 21:17:20 +01:00
|
|
|
#ifndef MSVCRT_TIME_T_DEFINED
|
|
|
|
typedef long MSVCRT(time_t);
|
|
|
|
#define MSVCRT_TIME_T_DEFINED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MSVCRT_CLOCK_T_DEFINED
|
2001-04-11 01:21:43 +02:00
|
|
|
typedef long MSVCRT(clock_t);
|
2002-12-18 21:17:20 +01:00
|
|
|
#define MSVCRT_CLOCK_T_DEFINED
|
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2002-12-18 21:17:20 +01:00
|
|
|
#ifndef NULL
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define NULL 0
|
|
|
|
#else
|
|
|
|
#define NULL ((void *)0)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MSVCRT_TM_DEFINED
|
|
|
|
#define MSVCRT_TM_DEFINED
|
2001-04-11 01:21:43 +02:00
|
|
|
struct MSVCRT(tm) {
|
|
|
|
int tm_sec;
|
|
|
|
int tm_min;
|
|
|
|
int tm_hour;
|
|
|
|
int tm_mday;
|
|
|
|
int tm_mon;
|
|
|
|
int tm_year;
|
|
|
|
int tm_wday;
|
|
|
|
int tm_yday;
|
|
|
|
int tm_isdst;
|
|
|
|
};
|
2002-12-18 21:17:20 +01:00
|
|
|
#endif /* MSVCRT_TM_DEFINED */
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* FIXME: Must do something for _daylight, _dstbias, _timezone, _tzname */
|
|
|
|
|
|
|
|
|
|
|
|
unsigned _getsystime(struct MSVCRT(tm)*);
|
|
|
|
unsigned _setsystime(struct MSVCRT(tm)*,unsigned);
|
|
|
|
char* _strdate(char*);
|
|
|
|
char* _strtime(char*);
|
|
|
|
void _tzset(void);
|
|
|
|
|
|
|
|
char* MSVCRT(asctime)(const struct MSVCRT(tm)*);
|
|
|
|
MSVCRT(clock_t) MSVCRT(clock)(void);
|
|
|
|
char* MSVCRT(ctime)(const MSVCRT(time_t)*);
|
|
|
|
double MSVCRT(difftime)(MSVCRT(time_t),MSVCRT(time_t));
|
|
|
|
struct MSVCRT(tm)* MSVCRT(gmtime)(const MSVCRT(time_t)*);
|
|
|
|
struct MSVCRT(tm)* MSVCRT(localtime)(const MSVCRT(time_t)*);
|
|
|
|
MSVCRT(time_t) MSVCRT(mktime)(struct MSVCRT(tm)*);
|
|
|
|
size_t MSVCRT(strftime)(char*,size_t,const char*,const struct MSVCRT(tm)*);
|
|
|
|
MSVCRT(time_t) MSVCRT(time)(MSVCRT(time_t)*);
|
|
|
|
|
2002-12-18 21:17:20 +01:00
|
|
|
#ifndef MSVCRT_WTIME_DEFINED
|
|
|
|
#define MSVCRT_WTIME_DEFINED
|
|
|
|
MSVCRT(wchar_t)*_wasctime(const struct MSVCRT(tm)*);
|
|
|
|
MSVCRT(size_t) wcsftime(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,const struct MSVCRT(tm)*);
|
|
|
|
MSVCRT(wchar_t)*_wctime(const MSVCRT(time_t)*);
|
|
|
|
MSVCRT(wchar_t)*_wstrdate(MSVCRT(wchar_t)*);
|
|
|
|
MSVCRT(wchar_t)*_wstrtime(MSVCRT(wchar_t)*);
|
|
|
|
#endif /* MSVCRT_WTIME_DEFINED */
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __WINE_TIME_H */
|