Lines Matching refs:CAST

67 #define SIZE_T_MAX CAST(size_t, ~0ULL)
83 #define NEED_SWAP (cdf_bo.u == CAST(uint32_t, 0x01020304))
86 (CAST(uint64_t, NEED_SWAP ? _cdf_tole8(x) : CAST(uint64_t, x)))
88 (CAST(uint32_t, NEED_SWAP ? _cdf_tole4(x) : CAST(uint32_t, x)))
90 (CAST(uint16_t, NEED_SWAP ? _cdf_tole2(x) : CAST(uint16_t, x)))
92 CDF_TOLE2(CAST(uint16_t, x)) : \
94 CDF_TOLE4(CAST(uint32_t, x)) : \
95 CDF_TOLE8(CAST(uint64_t, x))))
205 CDF_TOLE4(CAST(uint32_t, h->h_secid_first_sector_in_short_sat)); in cdf_swap_header()
209 CDF_TOLE4(CAST(uint32_t, h->h_secid_first_sector_in_master_sat)); in cdf_swap_header()
214 CDF_TOLE4(CAST(uint32_t, h->h_master_sat[i])); in cdf_swap_header()
248 d->d_left_child = CDF_TOLE4(CAST(uint32_t, d->d_left_child)); in cdf_swap_dir()
249 d->d_right_child = CDF_TOLE4(CAST(uint32_t, d->d_right_child)); in cdf_swap_dir()
250 d->d_storage = CDF_TOLE4(CAST(uint32_t, d->d_storage)); in cdf_swap_dir()
254 d->d_created = CDF_TOLE8(CAST(uint64_t, d->d_created)); in cdf_swap_dir()
255 d->d_modified = CDF_TOLE8(CAST(uint64_t, d->d_modified)); in cdf_swap_dir()
257 CAST(uint32_t, d->d_stream_first_sector)); in cdf_swap_dir()
320 if (e >= b && CAST(size_t, e - b) <= ss * sst->sst_len) in cdf_check_stream_offset()
333 size_t siz = CAST(size_t, off + len); in cdf_read()
335 if (CAST(zend_off_t, off + len) != CAST(zend_off_t, siz)) in cdf_read()
340 return CAST(ssize_t, len); in cdf_read()
352 return CAST(ssize_t, len); in cdf_read()
364 if (cdf_read(info, CAST(zend_off_t, 0), buf, sizeof(buf)) == -1) in cdf_read_header()
398 if (SIZE_T_MAX / ss < CAST(size_t, id)) in cdf_read_sector()
403 return cdf_read(info, CAST(off_t, pos), RCAST(char *, buf) + offs, len); in cdf_read_sector()
413 if (SIZE_T_MAX / ss < CAST(size_t, id)) in cdf_read_short_sector()
460 if ((sat->sat_tab = CAST(cdf_secid_t *, CDF_CALLOC(sat->sat_len, ss))) in cdf_read_sat()
468 h->h_master_sat[i]) != CAST(ssize_t, ss)) { in cdf_read_sat()
474 if ((msa = CAST(cdf_secid_t *, CDF_CALLOC(1, ss))) == NULL) in cdf_read_sat()
486 CAST(ssize_t, ss)) { in cdf_read_sat()
491 sec = CDF_TOLE4(CAST(uint32_t, msa[k])); in cdf_read_sat()
501 sec) != CAST(ssize_t, ss)) { in cdf_read_sat()
507 mid = CDF_TOLE4(CAST(uint32_t, msa[nsatpersec])); in cdf_read_sat()
526 cdf_secid_t maxsector = CAST(cdf_secid_t, (sat->sat_len * size) in cdf_count_chain()
546 sid = CDF_TOLE4(CAST(uint32_t, sat->sat_tab[sid])); in cdf_count_chain()
557 return CAST(size_t, -1); in cdf_count_chain()
574 if (scn->sst_len == CAST(size_t, -1)) in cdf_read_long_sector_chain()
593 sid)) != CAST(ssize_t, ss)) { in cdf_read_long_sector_chain()
601 sid = CDF_TOLE4(CAST(uint32_t, sat->sat_tab[sid])); in cdf_read_long_sector_chain()
620 if (scn->sst_len == CAST(size_t, -1)) in cdf_read_short_sector_chain()
639 sid) != CAST(ssize_t, ss)) { in cdf_read_short_sector_chain()
643 sid = CDF_TOLE4(CAST(uint32_t, ssat->sat_tab[sid])); in cdf_read_short_sector_chain()
674 if (ns == CAST(size_t, -1)) in cdf_read_dir()
680 dir->dir_tab = CAST(cdf_directory_t *, in cdf_read_dir()
685 if ((buf = CAST(char *, CDF_MALLOC(ss))) == NULL) { in cdf_read_dir()
696 CAST(ssize_t, ss)) { in cdf_read_dir()
704 sid = CDF_TOLE4(CAST(uint32_t, sat->sat_tab[sid])); in cdf_read_dir()
729 if (ssat->sat_len == CAST(size_t, -1)) in cdf_read_ssat()
732 ssat->sat_tab = CAST(cdf_secid_t *, CDF_CALLOC(ssat->sat_len, ss)); in cdf_read_ssat()
748 CAST(ssize_t, ss)) { in cdf_read_ssat()
752 sid = CDF_TOLE4(CAST(uint32_t, sat->sat_tab[sid])); in cdf_read_ssat()
802 return CAST(unsigned char, *d) - CDF_TOLE2(*s); in cdf_namecmp()
853 return CAST(int, i); in cdf_find_stream()
866 return CAST(const void *, CAST(const uint8_t *, p) + l); in cdf_offset()
885 q = CAST(const uint8_t *, cdf_offset(CAST(const void *, p), in cdf_get_property_info_pos()
911 inp = CAST(cdf_property_info_t *, in cdf_grow_info()
933 if (CAST(size_t, CAST(const char *, e) - CAST(const char *, p)) < len) in cdf_copy_info()
968 shp = CAST(const cdf_section_header_t *, in cdf_read_property_info()
991 p = CAST(const uint8_t *, cdf_offset(sst->sst_tab, offs + sizeof(sh))); in cdf_read_property_info()
992 e = CAST(const uint8_t *, cdf_offset(shp, sh.sh_len)); in cdf_read_property_info()
1000 left = CAST(size_t, e - q); in cdf_read_property_info()
1072 inp[i].pi_str.s_buf = CAST(const char *, in cdf_read_property_info()
1073 CAST(const void *, &q[o4])); in cdf_read_property_info()
1116 CAST(const cdf_summary_info_header_t *, sst->sst_tab); in cdf_unpack_summary_info()
1118 CAST(const cdf_section_declaration_t *, RCAST(const void *, in cdf_unpack_summary_info()
1147 ce[i].f = CAST(t, CDF_TOLE(cep->f))
1154 const char *b = CAST(const char *, sst->sst_tab); in cdf_unpack_catalog()
1173 *cat = CAST(cdf_catalog_t *, in cdf_unpack_catalog()
1179 b = CAST(const char *, sst->sst_tab); in cdf_unpack_catalog()
1199 np = CAST(const uint16_t *, CAST(const void *, (b + 16))); in cdf_unpack_catalog()
1200 nb = CAST(const char *, CAST(const void *, in cdf_unpack_catalog()
1271 secs = CAST(int, ts % 60); in cdf_print_elapsed_time()
1273 mins = CAST(int, ts % 60); in cdf_print_elapsed_time()
1275 hours = CAST(int, ts % 24); in cdf_print_elapsed_time()
1277 days = CAST(int, ts); in cdf_print_elapsed_time()
1281 if (CAST(size_t, len) >= bufsiz) in cdf_print_elapsed_time()
1287 if (CAST(size_t, len) >= bufsiz) in cdf_print_elapsed_time()
1292 if (CAST(size_t, len) >= bufsiz) in cdf_print_elapsed_time()
1304 buf[i] = CAST(char, p[i]); in cdf_u16tos8()