| /freebsd-11-stable/contrib/file/src/ |
| HD | softmagic.c | 70 #define OFFSET_OOB(n, o, i) ((n) < CAST(uint32_t, (o)) || (i) > ((n) - (o))) 72 (CAST(uint64_t, (p)->hq[0])<<56)| \ 73 (CAST(uint64_t, (p)->hq[1])<<48)| \ 74 (CAST(uint64_t, (p)->hq[2])<<40)| \ 75 (CAST(uint64_t, (p)->hq[3])<<32)| \ 76 (CAST(uint64_t, (p)->hq[4])<<24)| \ 77 (CAST(uint64_t, (p)->hq[5])<<16)| \ 78 (CAST(uint64_t, (p)->hq[6])<<8)| \ 79 (CAST(uint64_t, (p)->hq[7]))) 81 (CAST(uint64_t, (p)->hq[7])<<56)| \ [all …]
|
| HD | ascmagic.c | 82 bb.flen = trim_nuls(CAST(const unsigned char *, b->fbuf), b->flen); in file_ascmagic() 109 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_ascmagic_with_encoding() 129 size_t last_line_end = CAST(size_t, -1); in file_ascmagic_with_encoding() 145 if ((utf8_buf = CAST(unsigned char *, malloc(mlen))) == NULL) { in file_ascmagic_with_encoding() 153 CAST(size_t, utf8_end - utf8_buf)); in file_ascmagic_with_encoding() 346 *buf++ = CAST(unsigned char, ubuf[i]); in encode_utf8() 350 *buf++ = CAST(unsigned char, (ubuf[i] >> 6) + 0xc0); in encode_utf8() 351 *buf++ = CAST(unsigned char, (ubuf[i] & 0x3f) + 0x80); in encode_utf8() 355 *buf++ = CAST(unsigned char, (ubuf[i] >> 12) + 0xe0); in encode_utf8() 356 *buf++ = CAST(unsigned char, ((ubuf[i] >> 6) & 0x3f) + 0x80); in encode_utf8() [all …]
|
| HD | readelf.c | 65 #define SIZE_UNKNOWN CAST(off_t, -1) 147 ? CAST(void *, &sh32) \ 148 : CAST(void *, &sh64)) 152 #define xsh_size CAST(size_t, (clazz == ELFCLASS32 \ 155 #define xsh_offset CAST(off_t, (clazz == ELFCLASS32 \ 166 ? CAST(void *, &ph32) \ 167 : CAST(void *, &ph64)) 174 #define xph_offset CAST(off_t, (clazz == ELFCLASS32 \ 177 #define xph_align CAST(size_t, (clazz == ELFCLASS32 \ 178 ? CAST(off_t, (ph32.p_align ? \ [all …]
|
| HD | cdf.c | 57 #define SIZE_T_MAX CAST(size_t, ~0ULL) 73 #define NEED_SWAP (cdf_bo.u == CAST(uint32_t, 0x01020304)) 76 (CAST(uint64_t, NEED_SWAP ? _cdf_tole8(x) : CAST(uint64_t, x))) 78 (CAST(uint32_t, NEED_SWAP ? _cdf_tole4(x) : CAST(uint32_t, x))) 80 (CAST(uint16_t, NEED_SWAP ? _cdf_tole2(x) : CAST(uint16_t, x))) 82 CDF_TOLE2(CAST(uint16_t, x)) : \ 84 CDF_TOLE4(CAST(uint32_t, x)) : \ 85 CDF_TOLE8(CAST(uint64_t, x)))) 226 CDF_TOLE4(CAST(uint32_t, h->h_secid_first_sector_in_short_sat)); in cdf_swap_header() 230 CDF_TOLE4(CAST(uint32_t, h->h_secid_first_sector_in_master_sat)); in cdf_swap_header() [all …]
|
| HD | magic.c | 410 off_t pos = CAST(off_t, -1); in file_or_fd() 420 if ((buf = CAST(unsigned char *, malloc(ms->bytes_max + SLOP))) == NULL) in file_or_fd() 470 pos = lseek(fd, CAST(off_t, 0), SEEK_CUR); in file_or_fd() 481 CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) { in file_or_fd() 513 if (file_buffer(ms, fd, okstat ? &sb : NULL, inname, buf, CAST(size_t, nbytes)) == -1) in file_or_fd() 519 if (pos != CAST(off_t, -1)) in file_or_fd() 597 ms->indir_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam() 600 ms->name_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam() 603 ms->elf_phnum_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam() 606 ms->elf_shnum_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam() [all …]
|
| HD | compress.c | 107 unsigned char *s = CAST(unsigned char *, CAST(void *, &x)); in zlibcmp() 255 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_zmagic() 265 if (nbytes < CAST(size_t, abs(compr[i].maglen))) in file_zmagic() 271 CAST(size_t, compr[i].maglen)) == 0; in file_zmagic() 368 buf = CAST(const char *, buf) + rv; in swrite() 420 if (t > 0 && CAST(size_t, t) < n) { in sread() 437 buf = CAST(char *, CCAST(void *, buf)) + rv; in sread() 478 if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes)) in file_pipe2file() 482 if (swrite(tfd, buf, CAST(size_t, r)) != r) in file_pipe2file() 507 if (lseek(fd, CAST(off_t, 0), SEEK_SET) == CAST(off_t, -1)) { in file_pipe2file() [all …]
|
| HD | apprentice.c | 55 #define EATAB {while (isascii(CAST(unsigned char, *l)) && \ 56 isspace(CAST(unsigned char, *l))) ++l;} 57 #define LOWCASE(l) (isupper(CAST(unsigned char, l)) ? \ 58 tolower(CAST(unsigned char, l)) : (l)) 77 #define ALLOC_CHUNK CAST(size_t, 10) 78 #define ALLOC_INCR CAST(size_t, 200) 305 return CAST(off_t, INT_MAX); in maxoff_t() 307 return CAST(off_t, LONG_MAX); in maxoff_t() 316 if (isalpha(CAST(unsigned char, l[1]))) { in get_standard_integer_type() 351 } else if (isdigit(CAST(unsigned char, l[1]))) { in get_standard_integer_type() [all …]
|
| HD | cdf_time.c | 93 return CAST(int, m); in cdf_getmonth() 95 return CAST(int, m); in cdf_getmonth() 111 tm.tm_sec = CAST(int, t % 60); in cdf_timestamp_to_timespec() 114 tm.tm_min = CAST(int, t % 60); in cdf_timestamp_to_timespec() 117 tm.tm_hour = CAST(int, t % 24); in cdf_timestamp_to_timespec() 121 tm.tm_year = CAST(int, CDF_BASE_YEAR + (t / 365)); in cdf_timestamp_to_timespec() 125 tm.tm_mday = cdf_getday(tm.tm_year, CAST(int, t)); in cdf_timestamp_to_timespec() 126 tm.tm_mon = cdf_getmonth(tm.tm_year, CAST(int, t)); in cdf_timestamp_to_timespec() 175 CAST(long long, *sec)); in cdf_ctime()
|
| HD | elfclass.h | 44 CAST(off_t, elf_getu(swap, elfhdr.e_phoff)), phnum, 45 CAST(size_t, elf_getu16(swap, elfhdr.e_phentsize)), 59 CAST(off_t, elf_getu(swap, elfhdr.e_phoff)), phnum, 60 CAST(size_t, elf_getu16(swap, elfhdr.e_phentsize)), 69 CAST(off_t, elf_getu(swap, elfhdr.e_shoff)), shnum, 70 CAST(size_t, elf_getu16(swap, elfhdr.e_shentsize)), 72 CAST(int, elf_getu16(swap, elfhdr.e_shstrndx)),
|
| HD | encoding.c | 72 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_encoding() 91 if ((*ubuf = CAST(unichar *, calloc(CAST(size_t, 1), mlen))) == NULL) { in file_encoding() 96 if ((nbuf = CAST(unsigned char *, in file_encoding() 97 calloc(CAST(size_t, 1), mlen))) == NULL) { in file_encoding() 446 | (CAST(unichar, bf[i]) << 8); in looks_ucs16() 449 | (CAST(unichar, bf[i + 1]) << 8); in looks_ucs16() 454 text_chars[CAST(size_t, ubf[*ulen - 1])] != T) in looks_ucs16() 484 ubf[(*ulen)++] = CAST(unichar, bf[i + 3]) in looks_ucs32() 485 | (CAST(unichar, bf[i + 2]) << 8) in looks_ucs32() 486 | (CAST(unichar, bf[i + 1]) << 16) in looks_ucs32() [all …]
|
| HD | print.c | 66 (CAST(size_t, m->in_op & FILE_OPS_MASK) < in file_mdump() 113 if (CAST(size_t, m->mask_op & FILE_OPS_MASK) < in file_mdump() 121 CAST(unsigned long long, m->num_mask)); in file_mdump() 144 CAST(long long, m->value.q)); in file_mdump() 153 CAST(size_t, m->vallen)); in file_mdump() 234 CAST(unsigned long, ms->line)); in file_magwarn() 251 cdf_timestamp_to_timespec(&ts, CAST(cdf_timestamp_t, v)); in file_fmttime() 256 t = CAST(time_t, v); in file_fmttime()
|
| HD | funcs.c | 495 *(n)++ = ((CAST(uint32_t, *(o)) >> 6) & 3) + '0', \ 496 *(n)++ = ((CAST(uint32_t, *(o)) >> 3) & 7) + '0', \ 497 *(n)++ = ((CAST(uint32_t, *(o)) >> 0) & 7) + '0', \ 522 if ((pbuf = CAST(char *, realloc(ms->o.pbuf, psize))) == NULL) { in file_getbuffer() 543 CAST(size_t, eop - op), &state); in file_getbuffer() 544 if (bytesconsumed == CAST(size_t, -1) || in file_getbuffer() 545 bytesconsumed == CAST(size_t, -2)) { in file_getbuffer() 568 if (isprint(CAST(unsigned char, *op))) { in file_getbuffer() 585 ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ? in file_check_mem() 696 if ((pb = (CAST(file_pushbuf_t *, malloc(sizeof(*pb))))) == NULL) in file_push_buffer() [all …]
|
| HD | der.c | 42 #define CAST(a, b) ((a)(b)) 62 #define DER_BAD CAST(uint32_t, -1) 221 return CAST(uint32_t, len); in getlength() 238 const uint8_t *d = CAST(const uint8_t *, q); in der_data() 294 ms->c.li[m->cont_level - 1].off = CAST(int, offs + tlen); in der_offs() 298 return CAST(int32_t, offs); in der_offs() 346 if (!isdigit(CAST(unsigned char, *s))) in der_cmp() 352 while (isdigit(CAST(unsigned char, *++s))); in der_cmp()
|
| HD | is_tar.c | 65 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_is_tar() 151 while (isspace(CAST(unsigned char, *where))) { /* Skip spaces */ in from_oct() 162 if (digs > 0 && *where && !isspace(CAST(unsigned char, *where))) in from_oct()
|
| HD | file.c | 412 for (wid = 0, j = CAST(size_t, optind); j < CAST(size_t, argc); in main() 550 (void)printf("%*s ", CAST(int, nopad ? 0 in process() 578 if (bytesconsumed == CAST(size_t, -1) || in file_mbswidth() 579 bytesconsumed == CAST(size_t, -2)) { in file_mbswidth() 638 fprintf(stdout, "%.*s", CAST(int, p - opts), opts); in docprint() 639 pad = (int)CAST(int, p - sp - 1); in docprint()
|
| HD | readcdf.c | 208 if (isprint(CAST(unsigned char, *s))) in cdf_file_property_info() 322 CAST(uint32_t, si.si_os_version) >> 8) == -1) in cdf_file_summary_info() 327 CAST(uint32_t, si.si_os_version) >> 8, in cdf_file_summary_info() 334 CAST(uint32_t, si.si_os_version) >> 8) == -1) in cdf_file_summary_info() 410 name[k] = CAST(char, cdf_tole2(d->d_name[k])); in cdf_check_summary_info() 544 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_trycdf()
|
| HD | buffer.c | 72 b->elen = CAST(size_t, b->st.st_size) < b->flen ? in buffer_fill() 73 CAST(size_t, b->st.st_size) : b->flen; in buffer_fill()
|
| HD | file.h | 146 #define FILE_BADSIZE CAST(size_t, ~0ul) 395 #define CAST(T, b) static_cast<T>(b) macro 399 #define CAST(T, b) ((T)(b)) macro
|
| /freebsd-11-stable/sys/netgraph/atm/sscfu/ |
| HD | ng_sscfu_cust.h | 53 #define MEMZALLOC(PTR, CAST, SIZE) \ argument 54 ((PTR) = (CAST)malloc((SIZE), M_NG_SSCFU, M_NOWAIT | M_ZERO)) 70 #define MEMZALLOC(PTR, CAST, SIZE) \ argument 71 ((PTR) = (CAST)malloc((SIZE), M_NG_SSCFU_INS, M_NOWAIT | M_ZERO))
|
| /freebsd-11-stable/contrib/ngatm/libngatm/ |
| HD | sscfucust.h | 50 #define MEMZALLOC(PTR,CAST,SIZE) do { \ argument 54 (PTR) = (CAST)_m; \
|
| HD | sscopcust.h | 53 #define MEMZALLOC(PTR,CAST,SIZE) do { \ argument 57 (PTR) = (CAST)_m; \
|
| /freebsd-11-stable/sys/netgraph/atm/sscop/ |
| HD | ng_sscop_cust.h | 61 #define MEMZALLOC(PTR, CAST, SIZE) \ argument 62 ((PTR) = (CAST)malloc((SIZE), M_NG_SSCOP, M_NOWAIT | M_ZERO)) 86 #define MEMZALLOC(PTR, CAST, SIZE) \ argument 87 ((PTR) = (CAST)malloc((SIZE), M_NG_SSCOP_INS, M_NOWAIT | M_ZERO))
|
| /freebsd-11-stable/contrib/file/magic/Magdir/ |
| HD | gringotts | 16 >>8 byte&0x70 0x30 CAST-256 crypt, 34 >>8 byte&0x70 0x30 CAST-256 crypt,
|
| /freebsd-11-stable/crypto/openssl/crypto/evp/ |
| HD | e_cast.c | 77 IMPLEMENT_BLOCK_CIPHER(cast5, ks, CAST, EVP_CAST_KEY,
|
| /freebsd-11-stable/crypto/openssl/crypto/cast/ |
| HD | cast.h | 69 # error CAST is disabled.
|