TZ-Lib  $VERSION$
zic.c File Reference
#include "version.h"
#include "private.h"
#include "locale.h"
#include "tzfile.h"
#include <fcntl.h>
#include <stdarg.h>
#include <stddef.h>
#include <sys/stat.h>

Classes

struct  attype
 
struct  link
 
struct  lookup
 
struct  rule
 
struct  zone
 

Macros

#define BIG_BANG   (- (1LL << 59))
 
#define DC_DOM   0 /* 1..31 */ /* unused */
 
#define DC_DOWGEQ   1 /* 1..31 */ /* 0..6 (Sun..Sat) */
 
#define DC_DOWLEQ   2 /* 1..31 */ /* 0..6 (Sun..Sat) */
 
#define DO(field)   fwrite(tzh.field, sizeof tzh.field, 1, fp)
 
#define LC_LEAP   3
 
#define LC_LINK   2
 
#define LC_RULE   0
 
#define LC_ZONE   1
 
#define LDAYSPERWEEK   ((zic_t) DAYSPERWEEK)
 
#define LEAP_FIELDS   7
 
#define LF_FROM   1
 
#define LF_TO   2
 
#define LINK_FIELDS   3
 
#define linkat(fromdir, from, todir, to, flag)   (itssymlink(from) ? (errno = ENOTSUP, -1) : link(from, to))
 
#define LP_CORR   5
 
#define LP_DAY   3
 
#define LP_MONTH   2
 
#define LP_ROLL   6
 
#define LP_TIME   4
 
#define LP_YEAR   1
 
#define MKDIR_UMASK   0755
 
#define PRIdLINENO   PRIdMAX
 
#define PRIdZIC   PRIdFAST64
 
#define RF_ABBRVAR   9
 
#define RF_COMMAND   4
 
#define RF_DAY   6
 
#define RF_HIYEAR   3
 
#define RF_LOYEAR   2
 
#define RF_MONTH   5
 
#define RF_NAME   1
 
#define RF_STDOFF   8
 
#define RF_TOD   7
 
#define RULE_FIELDS   10
 
#define SCNdZIC   SCNdFAST64
 
#define TIME_T_BITS_IN_FILE   64
 
#define YR_MAXIMUM   1
 
#define YR_MINIMUM   0
 
#define YR_ONLY   2
 
#define ZF_FORMAT   4
 
#define ZF_GMTOFF   2
 
#define ZF_NAME   1
 
#define ZF_RULE   3
 
#define ZF_TILDAY   7
 
#define ZF_TILMONTH   6
 
#define ZF_TILTIME   8
 
#define ZF_TILYEAR   5
 
#define ZFC_FORMAT   2
 
#define ZFC_GMTOFF   0
 
#define ZFC_RULE   1
 
#define ZFC_TILDAY   5
 
#define ZFC_TILMONTH   4
 
#define ZFC_TILTIME   6
 
#define ZFC_TILYEAR   3
 
#define ZIC_MAX   INT_FAST64_MAX
 
#define ZIC_MAX_ABBR_LEN_WO_WARN   6
 
#define ZIC_MIN   INT_FAST64_MIN
 
#define ZIC_VERSION   '3'
 
#define ZIC_VERSION_PRE_2013   '2'
 
#define ZONE_MAXFIELDS   9
 
#define ZONE_MINFIELDS   5
 
#define ZONEC_MAXFIELDS   7
 
#define ZONEC_MINFIELDS   3
 

Typedefs

typedef intmax_t lineno
 
typedef int_fast64_t zic_t
 

Enumerations

enum  { PERCENT_Z_LEN_BOUND = sizeof "+995959" - 1 }
 
enum  { WORK_AROUND_QTBUG_53071 = true }
 
enum  { WORK_AROUND_GNOME_BUG_730332 = true }
 
enum  { YEAR_BY_YEAR_ZONE = 1 }
 

Functions

static char const * abbroffset (char *buf, zic_t offset)
 
static void addtt (zic_t starttime, int type)
 
static int addtype (zic_t, char const *, bool, bool, bool)
 
static void adjleap (void)
 
static void associate (void)
 
static int atcomp (const void *avp, const void *bvp)
 
static void ATTRIBUTE_FORMAT ((printf, 1, 0))
 
static void ATTRIBUTE_FORMAT ((printf, 1, 2))
 
static struct lookup const * byword (const char *string, const struct lookup *lp)
 
static void change_directory (char const *dir)
 
static ATTRIBUTE_PURE bool ciequal (register const char *ap, register const char *bp)
 
static void close_file (FILE *stream, char const *dir, char const *name)
 
static bool componentcheck (char const *name, char const *component, char const *component_end)
 
static void convert (const int_fast32_t val, char *const buf)
 
static void convert64 (const zic_t val, char *const buf)
 
static size_t doabbr (char *abbr, struct zone const *zp, char const *letters, zic_t stdoff, bool doquotes)
 
static void dolink (const char *, const char *, bool)
 
static void eat (char const *name, lineno num)
 
static void eats (char const *name, lineno num, char const *rname, lineno rnum)
 
static char * ecpyalloc (char const *str)
 
static void * emalloc (size_t size)
 
static void * erealloc (void *ptr, size_t size)
 
static char ** getfields (char *buf)
 
static char ** getfields (register char *cp)
 
static zic_t gethms (const char *string, const char *errstring, bool)
 
static void * growalloc (void *ptr, size_t itemsize, ptrdiff_t nitems, ptrdiff_t *nitems_alloc)
 
static int hardlinkerr (char const *from, char const *to)
 
static void infile (const char *filename)
 
static void inleap (char **fields, int nfields)
 
static void inlink (char **fields, int nfields)
 
static void inrule (char **fields, int nfields)
 
static bool inzcont (char **fields, int nfields)
 
static bool inzone (char **fields, int nfields)
 
static bool inzsub (char **, int, bool)
 
static bool is32 (const zic_t x)
 
static bool is_alpha (char a)
 
static bool is_space (char a)
 
static ATTRIBUTE_PURE bool itsabbr (register const char *abbr, register const char *word)
 
static bool itsdir (char const *)
 
static bool itssymlink (char const *)
 
static void leapadd (zic_t, bool, int, int)
 
static char lowerit (char)
 
int main (int argc, char **argv)
 
static ATTRIBUTE_PURE void * memcheck (void *ptr)
 
static _Noreturn void memory_exhausted (const char *msg)
 
static void mkdirs (char const *, bool)
 
static bool namecheck (const char *name)
 
static void newabbr (const char *abbr)
 
static zic_t oadd (zic_t t1, zic_t t2)
 
static void outzone (const struct zone *zp, ptrdiff_t ntzones)
 
static void puttzcode (const int_fast32_t val, FILE *const fp)
 
static void puttzcode64 (const zic_t val, FILE *const fp)
 
static int rcomp (const void *cp1, const void *cp2)
 
static char * relname (char const *from, char const *to)
 
static zic_t rpytime (const struct rule *rp, zic_t wantedy)
 
static int rule_cmp (struct rule const *a, struct rule const *b)
 
static void rulesub (struct rule *rp, const char *loyearp, const char *hiyearp, const char *typep, const char *monthp, const char *dayp, const char *timep)
 
static char * shellquote (char *b, char const *s)
 
static ATTRIBUTE_PURE size_t size_product (size_t nitems, size_t itemsize)
 
static int stringoffset (char *result, zic_t offset)
 
static int stringrule (char *result, const struct rule *const rp, const zic_t dstoff, const zic_t gmtoff)
 
static int stringzone (char *result, struct zone const *zpfirst, ptrdiff_t zonecount)
 
static zic_t tadd (zic_t t1, zic_t t2)
 
static _Noreturn void time_overflow (void)
 
static void updateminmax (const zic_t x)
 
static _Noreturn void usage (FILE *stream, int status)
 
static void writezone (const char *const name, const char *const string, char version)
 
static bool yearistype (zic_t year, const char *type)
 

Variables

static unsigned char abbrinds [TZ_MAX_TYPES]
 
static struct attypeattypes
 
static struct lookup const begin_years []
 
static int charcnt
 
static char chars [TZ_MAX_CHARS]
 
static zic_t corr [TZ_MAX_LEAPS]
 
static const char * directory
 
static const zic_t early_time
 
static struct lookup const end_years []
 
static bool errors
 
static const char * filename
 
static zic_t gmtoffs [TZ_MAX_TYPES]
 
static char isdsts [TZ_MAX_TYPES]
 
static struct lookup const lasts []
 
static const char * lcltime
 
static struct lookup const leap_types []
 
static int leapcnt
 
static zic_t leapmaxyear
 
static zic_t leapminyear
 
static const char * leapsec
 
static bool leapseen
 
static const int len_months [2][MONSPERYEAR]
 
static const int len_years [2]
 
static struct lookup const line_codes []
 
static lineno linenum
 
static struct linklinks
 
static int max_abbrvar_len = PERCENT_Z_LEN_BOUND
 
static int max_format_len
 
static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE)
 
static zic_t max_year
 
static zic_t const min_time = MINVAL(zic_t, TIME_T_BITS_IN_FILE)
 
static zic_t min_year
 
static struct lookup const mon_names []
 
static ptrdiff_t nlinks
 
static ptrdiff_t nlinks_alloc
 
static bool noise
 
static ptrdiff_t nrules
 
static ptrdiff_t nrules_alloc
 
static ptrdiff_t nzones
 
static ptrdiff_t nzones_alloc
 
static const char * progname
 
static const char * psxrules
 
static ptrdiff_t const PTRDIFF_MAX = MAXVAL(ptrdiff_t, TYPE_BIT(ptrdiff_t))
 
static const char * rfilename
 
static lineno rlinenum
 
static char roll [TZ_MAX_LEAPS]
 
static struct rulerules
 
static ptrdiff_t timecnt
 
static ptrdiff_t timecnt_alloc
 
static zic_t trans [TZ_MAX_LEAPS]
 
static bool ttisgmts [TZ_MAX_TYPES]
 
static bool ttisstds [TZ_MAX_TYPES]
 
static int typecnt
 
static bool warnings
 
static struct lookup const wday_names []
 
static const char * yitcommand
 
static struct zonezones
 

Macro Definition Documentation

#define BIG_BANG   (- (1LL << 59))
#define DC_DOM   0 /* 1..31 */ /* unused */
#define DC_DOWGEQ   1 /* 1..31 */ /* 0..6 (Sun..Sat) */

Referenced by rpytime(), rulesub(), and stringrule().

#define DC_DOWLEQ   2 /* 1..31 */ /* 0..6 (Sun..Sat) */

Referenced by rpytime(), rulesub(), and stringrule().

#define DO (   field)    fwrite(tzh.field, sizeof tzh.field, 1, fp)

Referenced by writezone().

#define LC_LEAP   3

Referenced by infile().

#define LC_LINK   2

Referenced by infile().

#define LC_RULE   0

Referenced by infile().

#define LC_ZONE   1

Referenced by infile().

#define LDAYSPERWEEK   ((zic_t) DAYSPERWEEK)

Referenced by rpytime().

#define LEAP_FIELDS   7

Referenced by inleap().

#define LF_FROM   1

Referenced by inlink().

#define LF_TO   2

Referenced by inlink().

#define LINK_FIELDS   3

Referenced by inlink().

#define linkat (   fromdir,
  from,
  todir,
  to,
  flag 
)    (itssymlink(from) ? (errno = ENOTSUP, -1) : link(from, to))

Referenced by hardlinkerr().

#define LP_CORR   5

Referenced by inleap().

#define LP_DAY   3

Referenced by inleap().

#define LP_MONTH   2

Referenced by inleap().

#define LP_ROLL   6

Referenced by inleap().

#define LP_TIME   4

Referenced by inleap().

#define LP_YEAR   1

Referenced by inleap().

#define MKDIR_UMASK   0755

Referenced by mkdirs().

#define PRIdLINENO   PRIdMAX

Referenced by ATTRIBUTE_FORMAT(), and inzone().

#define PRIdZIC   PRIdFAST64

Referenced by yearistype().

#define RF_ABBRVAR   9

Referenced by inrule().

#define RF_COMMAND   4

Referenced by inrule().

#define RF_DAY   6

Referenced by inrule().

#define RF_HIYEAR   3

Referenced by inrule().

#define RF_LOYEAR   2

Referenced by inrule().

#define RF_MONTH   5

Referenced by inrule().

#define RF_NAME   1

Referenced by inrule().

#define RF_STDOFF   8

Referenced by inrule().

#define RF_TOD   7

Referenced by inrule().

#define RULE_FIELDS   10

Referenced by inrule().

#define SCNdZIC   SCNdFAST64

Referenced by gethms(), inleap(), and rulesub().

#define TIME_T_BITS_IN_FILE   64
#define YR_MAXIMUM   1

Referenced by rulesub().

#define YR_MINIMUM   0

Referenced by rulesub().

#define YR_ONLY   2

Referenced by rulesub().

#define ZF_FORMAT   4

Referenced by inzsub().

#define ZF_GMTOFF   2

Referenced by inzsub().

#define ZF_NAME   1

Referenced by inzone(), and inzsub().

#define ZF_RULE   3

Referenced by inzsub().

#define ZF_TILDAY   7

Referenced by inzsub().

#define ZF_TILMONTH   6

Referenced by inzsub().

#define ZF_TILTIME   8

Referenced by inzsub().

#define ZF_TILYEAR   5

Referenced by inzsub().

#define ZFC_FORMAT   2

Referenced by inzsub().

#define ZFC_GMTOFF   0

Referenced by inzsub().

#define ZFC_RULE   1

Referenced by inzsub().

#define ZFC_TILDAY   5

Referenced by inzsub().

#define ZFC_TILMONTH   4

Referenced by inzsub().

#define ZFC_TILTIME   6

Referenced by inzsub().

#define ZFC_TILYEAR   3

Referenced by inzsub().

#define ZIC_MAX   INT_FAST64_MAX
#define ZIC_MAX_ABBR_LEN_WO_WARN   6

Referenced by newabbr().

#define ZIC_MIN   INT_FAST64_MIN

Referenced by oadd(), outzone(), rpytime(), and rulesub().

#define ZIC_VERSION   '3'

Referenced by outzone().

#define ZIC_VERSION_PRE_2013   '2'

Referenced by outzone().

#define ZONE_MAXFIELDS   9

Referenced by inzone().

#define ZONE_MINFIELDS   5
#define ZONEC_MAXFIELDS   7

Referenced by inzcont().

#define ZONEC_MINFIELDS   3

Typedef Documentation

typedef intmax_t lineno

Enumeration Type Documentation

anonymous enum
Enumerator
PERCENT_Z_LEN_BOUND 
anonymous enum
Enumerator
WORK_AROUND_QTBUG_53071 
anonymous enum
Enumerator
WORK_AROUND_GNOME_BUG_730332 
anonymous enum
Enumerator
YEAR_BY_YEAR_ZONE 

Function Documentation

static char const* abbroffset ( char *  buf,
zic_t  offset 
)
static

References _, MINSPERHOUR, and SECSPERMIN.

Referenced by doabbr().

static void addtt ( zic_t  starttime,
int  type 
)
static
static int addtype ( zic_t  gmtoff,
char const *  abbr,
bool  isdst,
bool  ttisstd,
bool  ttisgmt 
)
static

References _, charcnt, EXIT_FAILURE, gmtoff(), newabbr(), typecnt, and TZ_MAX_TYPES.

Referenced by outzone(), and writezone().

static void adjleap ( void  )
static

References leapcnt, and tadd().

Referenced by main().

static int atcomp ( const void *  avp,
const void *  bvp 
)
static

Referenced by writezone().

static void ATTRIBUTE_FORMAT ( (printf, 1, 0)  )
static

References _, and PRIdLINENO.

static void ATTRIBUTE_FORMAT ( (printf, 1, 2)  )
static
static ATTRIBUTE_PURE const struct lookup * byword ( const char *  string,
const struct lookup lp 
)
static

References ciequal(), itsabbr(), and lookup::l_word.

Referenced by infile(), inleap(), and rulesub().

static void change_directory ( char const *  dir)
static

References _, EXIT_FAILURE, and mkdirs().

Referenced by main().

static ATTRIBUTE_PURE bool ciequal ( register const char *  ap,
register const char *  bp 
)
static

References lowerit().

Referenced by byword().

static void close_file ( FILE *  stream,
char const *  dir,
char const *  name 
)
static

References _, and EXIT_FAILURE.

Referenced by dolink(), infile(), main(), usage(), and writezone().

static bool componentcheck ( char const *  name,
char const *  component,
char const *  component_end 
)
static

References _.

Referenced by namecheck().

static void convert ( const int_fast32_t  val,
char *const  buf 
)
static

Referenced by puttzcode(), and writezone().

static void convert64 ( const zic_t  val,
char *const  buf 
)
static

Referenced by puttzcode64().

static size_t doabbr ( char *  abbr,
struct zone const *  zp,
char const *  letters,
zic_t  stdoff,
bool  doquotes 
)
static
static void dolink ( const char *  fromfield,
const char *  tofield,
bool  staysymlink 
)
static
static void eat ( char const *  name,
lineno  num 
)
static

References eats().

Referenced by associate(), infile(), main(), and outzone().

static void eats ( char const *  name,
lineno  num,
char const *  rname,
lineno  rnum 
)
static

Referenced by eat(), and outzone().

static char* ecpyalloc ( char const *  str)
static

References memcheck().

Referenced by inlink(), inrule(), inzsub(), mkdirs(), and rulesub().

static void* emalloc ( size_t  size)
static
static void* erealloc ( void *  ptr,
size_t  size 
)
static

References memcheck().

Referenced by growalloc().

static char** getfields ( char *  buf)
static

Referenced by infile().

static char** getfields ( register char *  cp)
static
static zic_t gethms ( const char *  string,
const char *  errstring,
bool  signable 
)
static
static void* growalloc ( void *  ptr,
size_t  itemsize,
ptrdiff_t  nitems,
ptrdiff_t *  nitems_alloc 
)
static
static int hardlinkerr ( char const *  from,
char const *  to 
)
static

References linkat.

Referenced by dolink().

static void infile ( const char *  filename)
static
static void inleap ( char **  fields,
int  nfields 
)
static
static void inlink ( char **  fields,
int  nfields 
)
static
static bool inzcont ( char **  fields,
int  nfields 
)
static

References _, inzsub(), and ZONEC_MAXFIELDS.

Referenced by infile().

static bool inzone ( char **  fields,
int  nfields 
)
static
static bool is32 ( const zic_t  x)
static

References INT32_MAX, and INT32_MIN.

Referenced by writezone().

static bool is_alpha ( char  a)
static
static bool is_space ( char  a)
static

Referenced by getfields().

static ATTRIBUTE_PURE bool itsabbr ( register const char *  abbr,
register const char *  word 
)
static

References lowerit().

Referenced by byword().

static bool itsdir ( char const *  name)
static

References emalloc(), and EOVERFLOW.

Referenced by dolink(), and mkdirs().

static bool itssymlink ( char const *  name)
static

Referenced by dolink().

static void leapadd ( zic_t  t,
bool  positive,
int  rolling,
int  count 
)
static

References _, EXIT_FAILURE, leapcnt, and TZ_MAX_LEAPS.

Referenced by inleap().

static char lowerit ( char  a)
static

Referenced by ciequal(), itsabbr(), and rulesub().

static ATTRIBUTE_PURE void* memcheck ( void *  ptr)
static

References memory_exhausted().

Referenced by ecpyalloc(), emalloc(), and erealloc().

static _Noreturn void memory_exhausted ( const char *  msg)
static

References _, and EXIT_FAILURE.

Referenced by growalloc(), memcheck(), and size_product().

static void mkdirs ( char const *  argname,
bool  ancestors 
)
static
static bool namecheck ( const char *  name)
static

References _, and componentcheck().

Referenced by inlink(), and inzsub().

static void newabbr ( const char *  abbr)
static
static ATTRIBUTE_PURE zic_t oadd ( zic_t  t1,
zic_t  t2 
)
static

References time_overflow(), ZIC_MAX, and ZIC_MIN.

Referenced by gethms(), inleap(), outzone(), and rpytime().

static void puttzcode ( const int_fast32_t  val,
FILE *const  fp 
)
static

References convert().

Referenced by writezone().

static void puttzcode64 ( const zic_t  val,
FILE *const  fp 
)
static

References convert64().

Referenced by writezone().

static int rcomp ( const void *  cp1,
const void *  cp2 
)
static

Referenced by associate().

static char* relname ( char const *  from,
char const *  to 
)
static

References emalloc(), and SIZE_MAX.

Referenced by dolink().

static int rule_cmp ( struct rule const *  a,
struct rule const *  b 
)
static

References rule::r_dayofmonth, rule::r_hiyear, and rule::r_month.

Referenced by stringzone().

static void rulesub ( struct rule rp,
const char *  loyearp,
const char *  hiyearp,
const char *  typep,
const char *  monthp,
const char *  dayp,
const char *  timep 
)
static
static char* shellquote ( char *  b,
char const *  s 
)
static

Referenced by yearistype().

static ATTRIBUTE_PURE size_t size_product ( size_t  nitems,
size_t  itemsize 
)
static

References _, memory_exhausted(), and SIZE_MAX.

Referenced by getfields(), growalloc(), and writezone().

static int stringoffset ( char *  result,
zic_t  offset 
)
static

References DAYSPERWEEK, HOURSPERDAY, MINSPERHOUR, and SECSPERMIN.

Referenced by stringrule(), and stringzone().

static int stringrule ( char *  result,
const struct rule *const  rp,
const zic_t  dstoff,
const zic_t  gmtoff 
)
static
static ATTRIBUTE_PURE zic_t tadd ( zic_t  t1,
zic_t  t2 
)
static
static _Noreturn void time_overflow ( void  )
static

References _, and EXIT_FAILURE.

Referenced by oadd(), and tadd().

static void updateminmax ( const zic_t  x)
static

Referenced by outzone().

static _Noreturn void usage ( FILE *  stream,
int  status 
)
static

References _, close_file(), EXIT_SUCCESS, and REPORT_BUGS_TO.

Referenced by main().

static bool yearistype ( zic_t  year,
const char *  type 
)
static

Variable Documentation

unsigned char abbrinds[TZ_MAX_TYPES]
static
struct attype * attypes
static

Referenced by addtt(), outzone(), and writezone().

struct lookup const begin_years[]
static
Initial value:
= {
{ "minimum", YR_MINIMUM },
{ "maximum", YR_MAXIMUM },
{ NULL, 0 }
}
#define YR_MINIMUM
Definition: zic.c:270
#define YR_MAXIMUM
Definition: zic.c:271
int charcnt
static

Referenced by addtype(), tzloadbody(), and tzparse().

char chars[TZ_MAX_CHARS]
static
zic_t corr[TZ_MAX_LEAPS]
static

Referenced by timesub(), and tzloadbody().

const char* directory
static
const zic_t early_time
static
Initial value:
#define TIME_T_BITS_IN_FILE
Definition: zic.c:906
#define MINVAL(t, b)
Definition: private.h:519
#define BIG_BANG
Definition: zic.c:932
int_fast64_t zic_t
Definition: zic.c:18
Definition: zic.c:943
struct lookup const end_years[]
static
Initial value:
= {
{ "minimum", YR_MINIMUM },
{ "maximum", YR_MAXIMUM },
{ "only", YR_ONLY },
{ NULL, 0 }
}
#define YR_MINIMUM
Definition: zic.c:270
#define YR_ONLY
Definition: zic.c:272
#define YR_MAXIMUM
Definition: zic.c:271
bool errors
static
const char* filename
static

Referenced by inlink(), inrule(), and inzsub().

zic_t gmtoffs[TZ_MAX_TYPES]
static
char isdsts[TZ_MAX_TYPES]
static
struct lookup const lasts[]
static
Initial value:
= {
{ "last-Sunday", TM_SUNDAY },
{ "last-Monday", TM_MONDAY },
{ "last-Tuesday", TM_TUESDAY },
{ "last-Wednesday", TM_WEDNESDAY },
{ "last-Thursday", TM_THURSDAY },
{ "last-Friday", TM_FRIDAY },
{ "last-Saturday", TM_SATURDAY },
{ NULL, 0 }
}
#define TM_WEDNESDAY
Definition: db/tzfile.h:130
#define TM_THURSDAY
Definition: db/tzfile.h:131
#define TM_SATURDAY
Definition: db/tzfile.h:133
#define TM_FRIDAY
Definition: db/tzfile.h:132
#define TM_TUESDAY
Definition: db/tzfile.h:129
#define TM_SUNDAY
Definition: db/tzfile.h:127
#define TM_MONDAY
Definition: db/tzfile.h:128
const char* lcltime
static
struct lookup const leap_types[]
static
Initial value:
= {
{ "Rolling", true },
{ "Stationary", false },
{ NULL, 0 }
}
int leapcnt
static
zic_t leapmaxyear
static
zic_t leapminyear
static
const char* leapsec
static
bool leapseen
static
const int len_months[2][MONSPERYEAR]
static
Initial value:
= {
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
}
const int len_years[2]
static
Initial value:
= {
}
#define DAYSPERLYEAR
Definition: db/tzfile.h:122
#define DAYSPERNYEAR
Definition: db/tzfile.h:121
struct lookup const line_codes[]
static
Initial value:
= {
{ "Rule", LC_RULE },
{ "Zone", LC_ZONE },
{ "Link", LC_LINK },
{ "Leap", LC_LEAP },
{ NULL, 0}
}
#define LC_LEAP
Definition: zic.c:200
#define LC_LINK
Definition: zic.c:199
#define LC_ZONE
Definition: zic.c:198
#define LC_RULE
Definition: zic.c:197
lineno linenum
static

Referenced by inlink(), inrule(), and inzsub().

struct link* links
static
int max_abbrvar_len = PERCENT_Z_LEN_BOUND
static

Referenced by outzone().

int max_format_len
static
zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE)
static

Referenced by rpytime(), and tadd().

zic_t max_year
static

Referenced by outzone().

zic_t const min_time = MINVAL(zic_t, TIME_T_BITS_IN_FILE)
static

Referenced by rpytime(), and tadd().

zic_t min_year
static
struct lookup const mon_names[]
static
Initial value:
= {
{ "January", TM_JANUARY },
{ "February", TM_FEBRUARY },
{ "March", TM_MARCH },
{ "April", TM_APRIL },
{ "May", TM_MAY },
{ "June", TM_JUNE },
{ "July", TM_JULY },
{ "August", TM_AUGUST },
{ "September", TM_SEPTEMBER },
{ "October", TM_OCTOBER },
{ "November", TM_NOVEMBER },
{ "December", TM_DECEMBER },
{ NULL, 0 }
}
#define TM_FEBRUARY
Definition: db/tzfile.h:136
#define TM_MAY
Definition: db/tzfile.h:139
#define TM_JULY
Definition: db/tzfile.h:141
#define TM_NOVEMBER
Definition: db/tzfile.h:145
#define TM_OCTOBER
Definition: db/tzfile.h:144
#define TM_DECEMBER
Definition: db/tzfile.h:146
#define TM_APRIL
Definition: db/tzfile.h:138
#define TM_JANUARY
Definition: db/tzfile.h:135
#define TM_SEPTEMBER
Definition: db/tzfile.h:143
#define TM_AUGUST
Definition: db/tzfile.h:142
#define TM_JUNE
Definition: db/tzfile.h:140
#define TM_MARCH
Definition: db/tzfile.h:137
ptrdiff_t nlinks
static

Referenced by main().

ptrdiff_t nlinks_alloc
static
bool noise
static
ptrdiff_t nrules
static

Referenced by associate().

ptrdiff_t nrules_alloc
static
ptrdiff_t nzones
static

Referenced by associate(), inzone(), and main().

ptrdiff_t nzones_alloc
static
const char* progname
static
const char* psxrules
static
ptrdiff_t const PTRDIFF_MAX = MAXVAL(ptrdiff_t, TYPE_BIT(ptrdiff_t))
static

Referenced by growalloc().

const char* rfilename
static
lineno rlinenum
static
char roll[TZ_MAX_LEAPS]
static
struct rule* rules
static
ptrdiff_t timecnt
static
ptrdiff_t timecnt_alloc
static
zic_t trans[TZ_MAX_LEAPS]
static

Referenced by tzloadbody().

bool ttisgmts[TZ_MAX_TYPES]
static
bool ttisstds[TZ_MAX_TYPES]
static
int typecnt
static

Referenced by addtype(), tzloadbody(), and writezone().

bool warnings
static
struct lookup const wday_names[]
static
Initial value:
= {
{ "Sunday", TM_SUNDAY },
{ "Monday", TM_MONDAY },
{ "Tuesday", TM_TUESDAY },
{ "Wednesday", TM_WEDNESDAY },
{ "Thursday", TM_THURSDAY },
{ "Friday", TM_FRIDAY },
{ "Saturday", TM_SATURDAY },
{ NULL, 0 }
}
#define TM_WEDNESDAY
Definition: db/tzfile.h:130
#define TM_THURSDAY
Definition: db/tzfile.h:131
#define TM_SATURDAY
Definition: db/tzfile.h:133
#define TM_FRIDAY
Definition: db/tzfile.h:132
#define TM_TUESDAY
Definition: db/tzfile.h:129
#define TM_SUNDAY
Definition: db/tzfile.h:127
#define TM_MONDAY
Definition: db/tzfile.h:128
const char* yitcommand
static
struct zone* zones
static