home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / utils / graphic / viewers / general / msdos / ncsa / src / time.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-04-22  |  1.3 KB  |  87 lines

  1. /**
  2. *
  3. * This structure contains the unpacked time as returned by "gmtime".
  4. *
  5. */
  6. struct tm 
  7.     {
  8.     int tm_sec;
  9.     int tm_min;
  10.     int tm_hour;
  11.     int tm_mday;
  12.     int tm_mon;
  13.     int tm_year;
  14.     int tm_wday;
  15.     int tm_yday;
  16.     int tm_isdst;
  17.     };
  18.  
  19. /**
  20. *
  21. * External data
  22. *
  23. */
  24. extern long timezone;
  25. extern int daylight;
  26. extern char *tzname[];
  27. extern char tzstn[];
  28. extern char tzdtn[];
  29.  
  30. /**
  31. *
  32. * The following kludge takes care of short/long name inconsistencies.
  33. *
  34. */
  35. #define localtime
  36. #ifdef localtim
  37. #undef localtim
  38. #else
  39. #undef localtime
  40. #define localtime localtim
  41. #endif
  42.  
  43. /**
  44. *
  45. * External functions
  46. *
  47. */
  48. #ifndef NARGS
  49. extern char *asctime(struct tm *);
  50. extern char *ctime(long *);
  51. extern struct tm *gmtime(long *);
  52. extern struct tm *localtim(long *);
  53. extern long time(long *);
  54. extern void tzset();
  55. #else
  56. extern char *asctime();
  57. extern char *ctime();
  58. extern struct tm *gmtime();
  59. extern struct tm *localtim();
  60. extern long time();
  61. extern void tzset();
  62. #endif
  63.  
  64. /*
  65. *
  66. * External variables
  67. *
  68. */
  69. extern int daylight;
  70. extern long timezone;
  71. extern char *tzname[2];
  72. extern char tzstn[4];
  73. extern char tzdtn[4];
  74.  
  75. /**
  76. *
  77. * Define NULL if it's not already defined
  78. *
  79. */
  80. #ifndef NULL
  81. #if SPTR
  82. #define NULL 0            /* null pointer value */
  83. #else
  84. #define NULL 0L
  85. #endif
  86. #endif
  87.