home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c045 / 2.ddi / INCLUDE / TIME.H$ / TIME.bin
Encoding:
Text File  |  1992-01-01  |  3.7 KB  |  153 lines

  1. /***
  2. *time.h - definitions/declarations for time routines
  3. *
  4. *    Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file contains the various declarations and definitions
  8. *    for the time routines.
  9. *    [ANSI/System V]
  10. *
  11. ****/
  12.  
  13. #ifndef _INC_TIME
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. #if defined(_DLL) && !defined(_MT)
  20. #error Cannot define _DLL without _MT
  21. #endif
  22.  
  23. #ifdef _MT
  24. #define _FAR_ __far
  25. #else
  26. #define _FAR_
  27. #endif
  28.  
  29. #if (_MSC_VER <= 600)
  30. #define __cdecl     _cdecl
  31. #define __far       _far
  32. #define __loadds    _loadds
  33. #define __near      _near
  34. #define __pascal    _pascal
  35. #endif
  36.  
  37. /* implementation defined time types */
  38.  
  39. #ifndef _TIME_T_DEFINED
  40. typedef unsigned long time_t;
  41. #define _TIME_T_DEFINED
  42. #endif
  43.  
  44. #ifndef _CLOCK_T_DEFINED
  45. typedef long clock_t;
  46. #define _CLOCK_T_DEFINED
  47. #endif
  48.  
  49. #ifndef _SIZE_T_DEFINED
  50. typedef unsigned int size_t;
  51. #define _SIZE_T_DEFINED
  52. #endif
  53.  
  54. /* structure for use with localtime(), gmtime(), etc. */
  55.  
  56. #ifndef _TM_DEFINED
  57. struct tm {
  58.     int tm_sec;    /* seconds after the minute - [0,59] */
  59.     int tm_min;    /* minutes after the hour - [0,59] */
  60.     int tm_hour;    /* hours since midnight - [0,23] */
  61.     int tm_mday;    /* day of the month - [1,31] */
  62.     int tm_mon;    /* months since January - [0,11] */
  63.     int tm_year;    /* years since 1900 */
  64.     int tm_wday;    /* days since Sunday - [0,6] */
  65.     int tm_yday;    /* days since January 1 - [0,365] */
  66.     int tm_isdst;    /* daylight savings time flag */
  67.     };
  68. #define _TM_DEFINED
  69. #endif
  70.  
  71.  
  72. /* define NULL pointer value */
  73.  
  74. #ifndef NULL
  75. #ifdef __cplusplus
  76. #define NULL    0
  77. #else
  78. #define NULL    ((void *)0)
  79. #endif
  80. #endif
  81.  
  82.  
  83. /* clock ticks macro - ANSI version */
  84.  
  85. #define CLOCKS_PER_SEC    1000
  86.  
  87.  
  88. /* extern declarations for the global variables used by the ctime family of
  89.  * routines.
  90.  */
  91.  
  92. #ifdef _DLL
  93. extern int _FAR_ __cdecl _daylight;    /* non-zero if daylight savings time is used */
  94. extern long _FAR_ __cdecl _timezone;   /* difference in seconds between GMT and local time */
  95. extern char _FAR_ * _FAR_ __cdecl _tzname[2];/* standard/daylight savings time zone names */
  96. #else
  97. extern int __near __cdecl _daylight;    /* non-zero if daylight savings time is used */
  98. extern long __near __cdecl _timezone;    /* difference in seconds between GMT and local time */
  99. extern char * __near __cdecl _tzname[2];/* standard/daylight savings time zone names */
  100. #endif
  101.  
  102.  
  103. /* function prototypes */
  104.  
  105. #ifdef _MT
  106. double _FAR_ __pascal difftime(time_t, time_t);
  107. #else
  108. double _FAR_ __cdecl difftime(time_t, time_t);
  109. #endif
  110.  
  111. char _FAR_ * _FAR_ __cdecl asctime(const struct tm _FAR_ *);
  112. char _FAR_ * _FAR_ __cdecl ctime(const time_t _FAR_ *);
  113. #ifndef _WINDLL
  114. clock_t _FAR_ __cdecl clock(void);
  115. #endif
  116. struct tm _FAR_ * _FAR_ __cdecl gmtime(const time_t _FAR_ *);
  117. struct tm _FAR_ * _FAR_ __cdecl localtime(const time_t _FAR_ *);
  118. time_t _FAR_ __cdecl mktime(struct tm _FAR_ *);
  119. #ifndef _WINDLL
  120. size_t _FAR_ __cdecl strftime(char _FAR_ *, size_t, const char _FAR_ *,
  121.     const struct tm _FAR_ *);
  122. #endif
  123. char _FAR_ * _FAR_ __cdecl _strdate(char _FAR_ *);
  124. char _FAR_ * _FAR_ __cdecl _strtime(char _FAR_ *);
  125. time_t _FAR_ __cdecl time(time_t _FAR_ *);
  126. void _FAR_ __cdecl _tzset(void);
  127.  
  128. #ifndef __STDC__
  129. /* Non-ANSI names for compatibility */
  130.  
  131. #define CLK_TCK  CLOCKS_PER_SEC
  132.  
  133. #ifdef _DLL
  134. extern int _FAR_ __cdecl daylight;
  135. extern long _FAR_ __cdecl timezone;
  136. extern char _FAR_ * _FAR_ __cdecl tzname[2];
  137. #else
  138. extern int __near __cdecl daylight;
  139. extern long __near __cdecl timezone;
  140. extern char * __near __cdecl tzname[2];
  141. #endif
  142.  
  143. void _FAR_ __cdecl tzset(void);
  144.  
  145. #endif    /* __STDC__ */
  146.  
  147. #ifdef __cplusplus
  148. }
  149. #endif
  150.  
  151. #define _INC_TIME
  152. #endif    /* _INC_TIME */
  153.