home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / qc25 / include / time.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-25  |  3.2 KB  |  120 lines

  1. /***
  2. *time.h - Definitionen/Deklarationen für Uhrzeit-Routinen
  3. *
  4. *    Copyright (c) 1985-1990, Microsoft Corporation.  Alle Rechte vorbehalten.
  5. *
  6. * Zweck:
  7. *    Diese Datei enthält Deklarationen von Uhrzeit-Routinen und definiert
  8. *    die von den Routinen localtime und gmtime produzierten und von asctime
  9. *    verwerteten Strukturen.
  10. *    [ANSI/System V]
  11. *
  12. ***/
  13.  
  14. #if defined(_DLL) && !defined(_MT)
  15. #error  _DLL kann ohne _MT nicht definiert werden
  16. #endif
  17.  
  18. #ifdef _MT
  19. #define _FAR_ _far
  20. #else
  21. #define _FAR_
  22. #endif
  23.  
  24. /* Definition des ausführungsdefinierten Uhrzeit-Typs */
  25.  
  26. #ifndef _TIME_T_DEFINED
  27. typedef long time_t;
  28. #define _TIME_T_DEFINED
  29. #endif
  30.  
  31. #ifndef _CLOCK_T_DEFINED
  32. typedef long clock_t;
  33. #define _CLOCK_T_DEFINED
  34. #endif
  35.  
  36. #ifndef _SIZE_T_DEFINED
  37. typedef unsigned int size_t;
  38. #define _SIZE_T_DEFINED
  39. #endif
  40.  
  41. /* Struktur zur Verwendung mit den Funktionen localtime(), gmtime(), etc. */
  42.  
  43. #ifndef _TM_DEFINED
  44. struct tm {
  45.     int tm_sec;    /* Sekunden nach der Minute - [0,59] */
  46.     int tm_min;    /* Minuten nach der Stunde - [0,59] */
  47.     int tm_hour;    /* Stunden seit Mitternacht - [0,23] */
  48.     int tm_mday;    /* Monatstag - [1,31] */
  49.     int tm_mon;    /* Monate seit Januar - [0,11] */
  50.     int tm_year;    /* Jahre seit 1900 */
  51.     int tm_wday;    /* Tage seit Sonntag - [0,6] */
  52.     int tm_yday;    /* Tage seit dem 1.Januar - [0,365] */
  53.     int tm_isdst;    /* Sommerzeitangabe */
  54.     };
  55. #define _TM_DEFINED
  56. #endif
  57.  
  58.  
  59. /* Definition Null-Zeiger Wert */
  60.  
  61. #ifndef NULL
  62. #if (_MSC_VER >= 600)
  63. #define NULL    ((void *)0)
  64. #elif (defined(M_I86SM) || defined(M_I86MM))
  65. #define NULL    0
  66. #else
  67. #define NULL    0L
  68. #endif
  69. #endif
  70.  
  71.  
  72. /* Makro für Clock-Ticks- ANSI Version */
  73.  
  74. #define CLOCKS_PER_SEC    1000
  75.  
  76. /* clock ticks Makro - veraltete Version */
  77.  
  78. #define CLK_TCK     1000
  79.  
  80.  
  81. /* externe Deklarationen für die von den ctime-Routinen benutzten 
  82.  * Globalvariablen.
  83.  */
  84.  
  85. #ifdef _DLL
  86. extern int _FAR_ _cdecl daylight;     /* ungleich Null falls Sommerzeit verwendet wird */
  87. extern long _FAR_ _cdecl timezone;    /* Unterschied in Sek zwischen */
  88.                         /* GMT und Ortszeit */
  89. extern char _FAR_ * _FAR_ _cdecl tzname[2]; /* Zeitzonennamen für */
  90.                     /* Standard-/Sommerzeit */
  91. #else
  92. extern int _near _cdecl daylight;     /* ungleich Null falls Sommerzeit verwendet wird */
  93. extern long _near _cdecl timezone;    /* Unterschied in Sek zwischen */
  94.                         /* GMT und Ortszeit */
  95. extern char * _near _cdecl tzname[2]; /* Zeitzonennamen für */
  96.                     /* Standard-/Sommerzeit */
  97. #endif
  98.  
  99.  
  100. /* Funktionsprototypen */
  101.  
  102. #ifdef _MT
  103. double _FAR_ _pascal difftime(time_t, time_t);
  104. #else
  105. double _FAR_ _cdecl difftime(time_t, time_t);
  106. #endif
  107.  
  108. char _FAR_ * _FAR_ _cdecl asctime(const struct tm _FAR_ *);
  109. char _FAR_ * _FAR_ _cdecl ctime(const time_t _FAR_ *);
  110. clock_t _FAR_ _cdecl clock(void);
  111. struct tm _FAR_ * _FAR_ _cdecl gmtime(const time_t _FAR_ *);
  112. struct tm _FAR_ * _FAR_ _cdecl localtime(const time_t _FAR_ *);
  113. time_t _FAR_ _cdecl mktime(struct tm _FAR_ *);
  114. size_t _FAR_ _cdecl strftime(char _FAR_ *, size_t, const char _FAR_ *,
  115.     const struct tm _FAR_ *);
  116. char _FAR_ * _FAR_ _cdecl _strdate(char _FAR_ *);
  117. char _FAR_ * _FAR_ _cdecl _strtime(char _FAR_ *);
  118. time_t _FAR_ _cdecl time(time_t _FAR_ *);
  119. void _FAR_ _cdecl tzset(void);
  120.