home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume4 / settz / tzfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  1.4 KB  |  57 lines

  1. /* @(#)tzfile.h    2.1 */
  2.  
  3. /*
  4. ** Information about time zone files.
  5. */
  6.  
  7. #ifndef TZDIR
  8. #define TZDIR        "/etc/tzdir"    /* Time zone object file directory */
  9. #endif
  10.  
  11. #ifndef TZDEFAULT
  12. #define TZDEFAULT    "localtime"
  13. #endif
  14.  
  15. struct ttinfo {                /* time type information */
  16.     long        tt_gmtoff;    /* GMT offset in seconds */
  17.     int        tt_isdst;    /* used to set tm_isdst */
  18.     unsigned int    tt_abbrind;    /* abbreviation list index */
  19. };
  20.  
  21. /*
  22. ** Each file begins with. . .
  23. */
  24.  
  25. struct tzhead {
  26.     char        tzh_reserved[14];    /* reserved for future use */
  27.     unsigned short    tzh_timecnt;        /* number of transition times */
  28.     unsigned short    tzh_typecnt;        /* number of local time types */
  29.     unsigned short    tzh_charcnt;        /* number of abbr. chars */
  30. };
  31.  
  32. /*
  33. ** . . .followed by. . .
  34. **
  35. **    tzh_timecnt (long)s        transition times as returned by time(2)
  36. **    tzh_timecnt (unsigned char)s    types of local time starting at above
  37. **    tzh_typecnt (struct ttinfo)s    information for each time type
  38. **    tzh_charcnt (char)s        '\0'-terminated zone abbreviaton strings
  39. */
  40.  
  41. /*
  42. ** In the current implementation, "settz()" refuses to deal with files that
  43. ** exceed any of the limits below.
  44. */
  45.  
  46. #ifndef TZ_MAX_TIMES
  47. #define TZ_MAX_TIMES    170    /* Maximum number of transition times */
  48. #endif
  49.  
  50. #ifndef TZ_MAX_TYPES
  51. #define TZ_MAX_TYPES    10    /* Maximum number of local time types */
  52. #endif
  53.  
  54. #ifndef TZ_MAX_CHARS
  55. #define TZ_MAX_CHARS    50    /* Maximum number of abbreviation characters */
  56. #endif
  57.