Lines Matching refs:bit32

140 	tz->bit32.ttisgmtcnt = timelib_conv_int_unsigned(buffer[0]);  in read_header()
141 tz->bit32.ttisstdcnt = timelib_conv_int_unsigned(buffer[1]); in read_header()
142 tz->bit32.leapcnt = timelib_conv_int_unsigned(buffer[2]); in read_header()
143 tz->bit32.timecnt = timelib_conv_int_unsigned(buffer[3]); in read_header()
144 tz->bit32.typecnt = timelib_conv_int_unsigned(buffer[4]); in read_header()
145 tz->bit32.charcnt = timelib_conv_int_unsigned(buffer[5]); in read_header()
163 if (tz->bit32.timecnt) { in read_transitions()
164 buffer = (int32_t*) timelib_malloc(tz->bit32.timecnt * sizeof(int32_t)); in read_transitions()
168 memcpy(buffer, *tzf, sizeof(int32_t) * tz->bit32.timecnt); in read_transitions()
169 *tzf += (sizeof(int32_t) * tz->bit32.timecnt); in read_transitions()
170 for (i = 0; i < tz->bit32.timecnt; i++) { in read_transitions()
178 cbuffer = (unsigned char*) timelib_malloc(tz->bit32.timecnt * sizeof(unsigned char)); in read_transitions()
183 memcpy(cbuffer, *tzf, sizeof(unsigned char) * tz->bit32.timecnt); in read_transitions()
184 *tzf += sizeof(unsigned char) * tz->bit32.timecnt; in read_transitions()
214 buffer = (unsigned char*) timelib_malloc(tz->bit32.typecnt * sizeof(unsigned char) * 6); in read_types()
218 memcpy(buffer, *tzf, sizeof(unsigned char) * 6 * tz->bit32.typecnt); in read_types()
219 *tzf += sizeof(unsigned char) * 6 * tz->bit32.typecnt; in read_types()
221 tz->type = (ttinfo*) timelib_malloc(tz->bit32.typecnt * sizeof(ttinfo)); in read_types()
227 for (i = 0; i < tz->bit32.typecnt; i++) { in read_types()
236 tz->timezone_abbr = (char*) timelib_malloc(tz->bit32.charcnt); in read_types()
240 memcpy(tz->timezone_abbr, *tzf, sizeof(char) * tz->bit32.charcnt); in read_types()
241 *tzf += sizeof(char) * tz->bit32.charcnt; in read_types()
243 if (tz->bit32.leapcnt) { in read_types()
244 leap_buffer = (int32_t *) timelib_malloc(tz->bit32.leapcnt * 2 * sizeof(int32_t)); in read_types()
248 memcpy(leap_buffer, *tzf, sizeof(int32_t) * tz->bit32.leapcnt * 2); in read_types()
249 *tzf += sizeof(int32_t) * tz->bit32.leapcnt * 2; in read_types()
251 tz->leap_times = (tlinfo*) timelib_malloc(tz->bit32.leapcnt * sizeof(tlinfo)); in read_types()
256 for (i = 0; i < tz->bit32.leapcnt; i++) { in read_types()
263 if (tz->bit32.ttisstdcnt) { in read_types()
264 buffer = (unsigned char*) timelib_malloc(tz->bit32.ttisstdcnt * sizeof(unsigned char)); in read_types()
268 memcpy(buffer, *tzf, sizeof(unsigned char) * tz->bit32.ttisstdcnt); in read_types()
269 *tzf += sizeof(unsigned char) * tz->bit32.ttisstdcnt; in read_types()
271 for (i = 0; i < tz->bit32.ttisstdcnt; i++) { in read_types()
277 if (tz->bit32.ttisgmtcnt) { in read_types()
278 buffer = (unsigned char*) timelib_malloc(tz->bit32.ttisgmtcnt * sizeof(unsigned char)); in read_types()
282 memcpy(buffer, *tzf, sizeof(unsigned char) * tz->bit32.ttisgmtcnt); in read_types()
283 *tzf += sizeof(unsigned char) * tz->bit32.ttisgmtcnt; in read_types()
285 for (i = 0; i < tz->bit32.ttisgmtcnt; i++) { in read_types()
342 printf("UTC/Local count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.ttisgmtcnt); in timelib_dump_tzinfo()
343 printf("Std/Wall count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.ttisstdcnt); in timelib_dump_tzinfo()
344 printf("Leap.sec. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.leapcnt); in timelib_dump_tzinfo()
345 printf("Trans. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.timecnt); in timelib_dump_tzinfo()
346 printf("Local types count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.typecnt); in timelib_dump_tzinfo()
347 printf("Zone Abbr. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.charcnt); in timelib_dump_tzinfo()
358 for (i = 0; i < tz->bit32.timecnt; i++) { in timelib_dump_tzinfo()
369 for (i = 0; i < tz->bit32.leapcnt; i++) { in timelib_dump_tzinfo()
528 tmp->bit32.ttisgmtcnt = tz->bit32.ttisgmtcnt; in timelib_tzinfo_clone()
529 tmp->bit32.ttisstdcnt = tz->bit32.ttisstdcnt; in timelib_tzinfo_clone()
530 tmp->bit32.leapcnt = tz->bit32.leapcnt; in timelib_tzinfo_clone()
531 tmp->bit32.timecnt = tz->bit32.timecnt; in timelib_tzinfo_clone()
532 tmp->bit32.typecnt = tz->bit32.typecnt; in timelib_tzinfo_clone()
533 tmp->bit32.charcnt = tz->bit32.charcnt; in timelib_tzinfo_clone()
535 if (tz->bit32.timecnt) { in timelib_tzinfo_clone()
536 tmp->trans = (int32_t *) timelib_malloc(tz->bit32.timecnt * sizeof(int32_t)); in timelib_tzinfo_clone()
537 tmp->trans_idx = (unsigned char*) timelib_malloc(tz->bit32.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
538 memcpy(tmp->trans, tz->trans, tz->bit32.timecnt * sizeof(int32_t)); in timelib_tzinfo_clone()
539 memcpy(tmp->trans_idx, tz->trans_idx, tz->bit32.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
542 tmp->type = (ttinfo*) timelib_malloc(tz->bit32.typecnt * sizeof(ttinfo)); in timelib_tzinfo_clone()
543 memcpy(tmp->type, tz->type, tz->bit32.typecnt * sizeof(ttinfo)); in timelib_tzinfo_clone()
545 tmp->timezone_abbr = (char*) timelib_malloc(tz->bit32.charcnt); in timelib_tzinfo_clone()
546 memcpy(tmp->timezone_abbr, tz->timezone_abbr, tz->bit32.charcnt); in timelib_tzinfo_clone()
548 if (tz->bit32.leapcnt) { in timelib_tzinfo_clone()
549 tmp->leap_times = (tlinfo*) timelib_malloc(tz->bit32.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
550 memcpy(tmp->leap_times, tz->leap_times, tz->bit32.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
562 if (!tz->bit32.timecnt || !tz->trans) { in fetch_timezone_offset()
564 if (tz->bit32.typecnt == 1) { in fetch_timezone_offset()
579 while (j < tz->bit32.timecnt && tz->type[tz->trans_idx[j]].isdst) { in fetch_timezone_offset()
582 if (j == tz->bit32.timecnt) { in fetch_timezone_offset()
590 for (i = 0; i < tz->bit32.timecnt; i++) { in fetch_timezone_offset()
596 *transition_time = tz->trans[tz->bit32.timecnt - 1]; in fetch_timezone_offset()
597 return &(tz->type[tz->trans_idx[tz->bit32.timecnt - 1]]); in fetch_timezone_offset()
604 if (!tz->bit32.leapcnt || !tz->leap_times) { in fetch_leaptime_offset()
608 for (i = tz->bit32.leapcnt - 1; i > 0; i--) { in fetch_leaptime_offset()