Lines Matching refs:tz

116 timelib_tzinfo *timelib_tzinfo_clone(timelib_tzinfo *tz)  in timelib_tzinfo_clone()  argument
118 timelib_tzinfo *tmp = timelib_tzinfo_ctor(tz->name); in timelib_tzinfo_clone()
119 tmp->bit32.ttisgmtcnt = tz->bit32.ttisgmtcnt; in timelib_tzinfo_clone()
120 tmp->bit32.ttisstdcnt = tz->bit32.ttisstdcnt; in timelib_tzinfo_clone()
121 tmp->bit32.leapcnt = tz->bit32.leapcnt; in timelib_tzinfo_clone()
122 tmp->bit32.timecnt = tz->bit32.timecnt; in timelib_tzinfo_clone()
123 tmp->bit32.typecnt = tz->bit32.typecnt; in timelib_tzinfo_clone()
124 tmp->bit32.charcnt = tz->bit32.charcnt; in timelib_tzinfo_clone()
126 tmp->trans = (int32_t *) malloc(tz->bit32.timecnt * sizeof(int32_t)); in timelib_tzinfo_clone()
127 tmp->trans_idx = (unsigned char*) malloc(tz->bit32.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
128 memcpy(tmp->trans, tz->trans, tz->bit32.timecnt * sizeof(int32_t)); in timelib_tzinfo_clone()
129 memcpy(tmp->trans_idx, tz->trans_idx, tz->bit32.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
131 tmp->type = (ttinfo*) malloc(tz->bit32.typecnt * sizeof(struct ttinfo)); in timelib_tzinfo_clone()
132 memcpy(tmp->type, tz->type, tz->bit32.typecnt * sizeof(struct ttinfo)); in timelib_tzinfo_clone()
134 tmp->timezone_abbr = (char*) malloc(tz->bit32.charcnt); in timelib_tzinfo_clone()
135 memcpy(tmp->timezone_abbr, tz->timezone_abbr, tz->bit32.charcnt); in timelib_tzinfo_clone()
137 tmp->leap_times = (tlinfo*) malloc(tz->bit32.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
138 memcpy(tmp->leap_times, tz->leap_times, tz->bit32.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
143 void timelib_tzinfo_dtor(timelib_tzinfo *tz) in timelib_tzinfo_dtor() argument
145 TIMELIB_TIME_FREE(tz->name); in timelib_tzinfo_dtor()
146 TIMELIB_TIME_FREE(tz->trans); in timelib_tzinfo_dtor()
147 TIMELIB_TIME_FREE(tz->trans_idx); in timelib_tzinfo_dtor()
148 TIMELIB_TIME_FREE(tz->type); in timelib_tzinfo_dtor()
149 TIMELIB_TIME_FREE(tz->timezone_abbr); in timelib_tzinfo_dtor()
150 TIMELIB_TIME_FREE(tz->leap_times); in timelib_tzinfo_dtor()
151 TIMELIB_TIME_FREE(tz->location.comments); in timelib_tzinfo_dtor()
152 TIMELIB_TIME_FREE(tz); in timelib_tzinfo_dtor()
153 tz = NULL; in timelib_tzinfo_dtor()