Annotation of mstools/h/time.h, revision 1.1.1.2

1.1       root        1: /***
                      2: *time.h - definitions/declarations for time routines
                      3: *
1.1.1.2 ! root        4: *      Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
1.1       root        5: *
                      6: *Purpose:
                      7: *      This file has declarations of time routines and defines
                      8: *      the structure returned by the localtime and gmtime routines and
                      9: *      used by asctime.
                     10: *      [ANSI/System V]
                     11: *
                     12: ****/
                     13: 
                     14: #ifndef _INC_TIME
                     15: 
                     16: #ifdef __cplusplus
                     17: extern "C" {
                     18: #endif
                     19: 
                     20: 
1.1.1.2 ! root       21: #ifndef MIPS
1.1       root       22: #if (_MSC_VER <= 600)
                     23: #define __cdecl _cdecl
                     24: #endif
1.1.1.2 ! root       25: #endif
1.1       root       26: 
                     27: /* define the implementation defined time type */
                     28: 
                     29: #ifndef _TIME_T_DEFINED
                     30: typedef long time_t;           /* time value */
                     31: #define _TIME_T_DEFINED        /* avoid multiple def's of time_t */
                     32: #endif
                     33: 
                     34: #ifndef _CLOCK_T_DEFINED
                     35: typedef long clock_t;
                     36: #define _CLOCK_T_DEFINED
                     37: #endif
                     38: 
                     39: #ifndef _SIZE_T_DEFINED
                     40: typedef unsigned int size_t;
                     41: #define _SIZE_T_DEFINED
                     42: #endif
                     43: 
                     44: 
                     45: /* define NULL pointer value */
                     46: 
                     47: #ifndef NULL
                     48: #ifdef __cplusplus
                     49: #define NULL   0
                     50: #else
                     51: #define NULL   ((void *)0)
                     52: #endif
                     53: #endif
                     54: 
                     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: /* clock ticks macro - ANSI version */
                     73: 
                     74: #define CLOCKS_PER_SEC 1000
                     75: 
                     76: 
                     77: /* extern declarations for the global variables used by the ctime family of
                     78:  * routines.
                     79:  */
                     80: 
1.1.1.2 ! root       81: #ifdef _DLL
        !            82: 
        !            83: #define _daylight   (*_daylight_dll)
        !            84: #define _timezone   (*_timezone_dll)
        !            85: 
        !            86: /* non-zero if daylight savings time is used */
        !            87: extern int * _daylight_dll;
        !            88: 
        !            89: /* difference in seconds between GMT and local time */
        !            90: extern long * _timezone_dll;
        !            91: 
        !            92: /* standard/daylight savings time zone names */
        !            93: extern char ** _tzname;
        !            94: 
        !            95: #else
        !            96: 
        !            97: 
        !            98: #ifdef _POSIX_
        !            99: extern char * _rule;
        !           100: #endif
        !           101: 
1.1       root      102: /* non-zero if daylight savings time is used */
                    103: extern int _daylight;
                    104: 
                    105: /* difference in seconds between GMT and local time */
                    106: extern long _timezone;
                    107: 
                    108: /* standard/daylight savings time zone names */
1.1.1.2 ! root      109: #ifdef _POSIX_
        !           110: #define tzname _tzname
        !           111: #endif
1.1       root      112: extern char * _tzname[2];
                    113: 
1.1.1.2 ! root      114: #endif
1.1       root      115: 
                    116: /* function prototypes */
                    117: 
                    118: char * asctime(const struct tm *);
                    119: char * ctime(const time_t *);
                    120: clock_t clock(void);
                    121: double difftime(time_t, time_t);
                    122: struct tm * gmtime(const time_t *);
                    123: struct tm * localtime(const time_t *);
                    124: time_t mktime(struct tm *);
                    125: size_t strftime(char *, size_t, const char *, const struct tm *);
                    126: char * _strdate(char *);
                    127: char * _strtime(char *);
                    128: time_t time(time_t *);
1.1.1.2 ! root      129: #ifdef _POSIX_
        !           130: void tzset(void);
        !           131: #else
1.1       root      132: void _tzset(void);
1.1.1.2 ! root      133: #endif
1.1       root      134: unsigned _getsystime(struct tm *);
                    135: unsigned _setsystime(struct tm *, unsigned);
                    136: 
                    137: 
1.1.1.2 ! root      138: #if  !__STDC__ || defined(_POSIX_)
1.1       root      139: /* Non-ANSI names for compatibility */
                    140: 
                    141: #define CLK_TCK  CLOCKS_PER_SEC
                    142: 
                    143: #define daylight _daylight
                    144: #define timezone _timezone
                    145: #define tzname  _tzname
                    146: 
                    147: #define tzset   _tzset
                    148: 
                    149: #endif /* __STDC__ */
                    150: 
                    151: #ifdef __cplusplus
                    152: }
                    153: #endif
                    154: 
                    155: #define _INC_TIME
                    156: #endif /* _INC_TIME */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.