in src/unix/libtz/libtz.c [163:227]
static int long_normalize_overflow(long *tensptr,
int *unitsptr, int base);
static int normalize_overflow(int *tensptr, int *unitsptr,
int base);
static time_t time1(register const struct state *const sp,
struct tm *tmp,
struct tm * (*funcp)(const struct state *const sp, const time_t *,
long, struct tm *),
long offset);
static time_t time2(const struct state *const sp,
struct tm *tmp,
struct tm * (*funcp)(const struct state *const sp, const time_t *,
long, struct tm *),
long offset, int *okayp);
static time_t time2sub(register const struct state *const sp,
struct tm *tmp,
struct tm * (*funcp)(const struct state *const sp, const time_t *,
long, struct tm *),
long offset, int *okayp, int do_norm_secs);
static struct tm *timesub(const time_t *timep, long offset,
const struct state *const sp, struct tm *tmp);
static int tmcomp(const struct tm *atmp,
const struct tm *btmp);
static time_t transtime(time_t janfirst, int year,
const struct rule *rulep, long offset);
static int typesequiv(const struct state *const sp, int a, int b);
static int tzload(const char *name, struct state *const sp,
int doextend);
static int tzparse(const char *name, struct state *const sp,
int lastditch);
#ifdef ALL_STATE
static struct state *gmtptr;
#endif /* defined ALL_STATE */
#ifndef ALL_STATE
static struct state gmtmem;
#define gmtptr (&gmtmem)
#endif /* State Farm */
int gmt_is_set;
/*
** Section 4.12.3 of X3.159-1989 requires that
** Except for the strftime function, these functions [asctime,
** ctime, gmtime, localtime] return values in one of two static
** objects: a broken-down time structure and an array of char.
** Thanks to Paul Eggert for noting this.
*/
static struct tm tm;
static long
detzcode(codep)
const char *const codep;
{
register long result;
register int i;
result = (codep[0] & 0x80) ? ~0L : 0;
for (i = 0; i < 4; ++i) {
result = (result << 8) | (codep[i] & 0xff);
}
return result;
}