Lines Matching refs:tz

138 timelib_tzinfo *timelib_tzinfo_clone(timelib_tzinfo *tz)  in timelib_tzinfo_clone()  argument
140 timelib_tzinfo *tmp = timelib_tzinfo_ctor(tz->name); in timelib_tzinfo_clone()
141 tmp->bit32.ttisgmtcnt = tz->bit32.ttisgmtcnt; in timelib_tzinfo_clone()
142 tmp->bit32.ttisstdcnt = tz->bit32.ttisstdcnt; in timelib_tzinfo_clone()
143 tmp->bit32.leapcnt = tz->bit32.leapcnt; in timelib_tzinfo_clone()
144 tmp->bit32.timecnt = tz->bit32.timecnt; in timelib_tzinfo_clone()
145 tmp->bit32.typecnt = tz->bit32.typecnt; in timelib_tzinfo_clone()
146 tmp->bit32.charcnt = tz->bit32.charcnt; in timelib_tzinfo_clone()
148 tmp->trans = (int32_t *) timelib_malloc(tz->bit32.timecnt * sizeof(int32_t)); in timelib_tzinfo_clone()
149 tmp->trans_idx = (unsigned char*) timelib_malloc(tz->bit32.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
150 memcpy(tmp->trans, tz->trans, tz->bit32.timecnt * sizeof(int32_t)); in timelib_tzinfo_clone()
151 memcpy(tmp->trans_idx, tz->trans_idx, tz->bit32.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
153 tmp->type = (ttinfo*) timelib_malloc(tz->bit32.typecnt * sizeof(struct ttinfo)); in timelib_tzinfo_clone()
154 memcpy(tmp->type, tz->type, tz->bit32.typecnt * sizeof(struct ttinfo)); in timelib_tzinfo_clone()
156 tmp->timezone_abbr = (char*) timelib_malloc(tz->bit32.charcnt); in timelib_tzinfo_clone()
157 memcpy(tmp->timezone_abbr, tz->timezone_abbr, tz->bit32.charcnt); in timelib_tzinfo_clone()
159 tmp->leap_times = (tlinfo*) timelib_malloc(tz->bit32.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
160 memcpy(tmp->leap_times, tz->leap_times, tz->bit32.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
165 void timelib_tzinfo_dtor(timelib_tzinfo *tz) in timelib_tzinfo_dtor() argument
167 TIMELIB_TIME_FREE(tz->name); in timelib_tzinfo_dtor()
168 TIMELIB_TIME_FREE(tz->trans); in timelib_tzinfo_dtor()
169 TIMELIB_TIME_FREE(tz->trans_idx); in timelib_tzinfo_dtor()
170 TIMELIB_TIME_FREE(tz->type); in timelib_tzinfo_dtor()
171 TIMELIB_TIME_FREE(tz->timezone_abbr); in timelib_tzinfo_dtor()
172 TIMELIB_TIME_FREE(tz->leap_times); in timelib_tzinfo_dtor()
173 TIMELIB_TIME_FREE(tz->location.comments); in timelib_tzinfo_dtor()
174 TIMELIB_TIME_FREE(tz); in timelib_tzinfo_dtor()
175 tz = NULL; in timelib_tzinfo_dtor()