Lines Matching refs:CAST

72 #define	EATAB {while (isascii(CAST(unsigned char, *l)) && \
73 isspace(CAST(unsigned char, *l))) ++l;}
74 #define LOWCASE(l) (isupper(CAST(unsigned char, l)) ? \
75 tolower(CAST(unsigned char, l)) : (l))
98 #define ALLOC_CHUNK CAST(size_t, 10)
99 #define ALLOC_INCR CAST(size_t, 200)
292 return CAST(off_t, INT_MAX); in maxoff_t()
294 return CAST(off_t, LONG_MAX); in maxoff_t()
303 if (isalpha(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
338 } else if (isdigit(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
349 if (isdigit(CAST(unsigned char, l[2]))) { in get_standard_integer_type()
407 if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL) in add_mlist()
435 CAST(unsigned long, sizeof(*map->magic[0])), in apprentice_1()
436 CAST(unsigned long, FILE_MAGICSIZE)); in apprentice_1()
510 if ((ms = CAST(struct magic_set *, ecalloc(CAST(size_t, 1u), in file_ms_alloc()
523 if ((ms->c.li = CAST(struct level_info *, emalloc(len))) == NULL) in file_ms_alloc()
569 if ((mlist = CAST(struct mlist *, ecalloc(1, sizeof(*mlist)))) == NULL) { in mlist_alloc()
591 apprentice_unmap(CAST(struct magic_map *, ml->map)); in mlist_free_one()
970 const struct magic_entry *ma = CAST(const struct magic_entry *, a); in apprentice_sort()
971 const struct magic_entry *mb = CAST(const struct magic_entry *, b); in apprentice_sort()
1085 if (file_looks_utf8(m->value.us, CAST(size_t, m->vallen), NULL, in set_test_type()
1111 if ((mp = CAST(struct magic_entry *, in addentry()
1171 if (CAST(size_t, len - 2) > bang[i].len && in load_1()
1251 isspace(CAST(unsigned char, p[-1]))) && in set_text_binary()
1254 isspace(CAST(unsigned char, p[len]))))) in set_text_binary()
1294 if ((*ma = CAST(struct magic *, emalloc(slen))) == NULL) { in coalesce_entries()
1338 if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) in apprentice_load()
1376 if ((filearr = CAST(char **, in apprentice_load()
1452 v = CAST(signed char, v); in file_signextend()
1457 v = CAST(short, v); in file_signextend()
1474 v = CAST(int32_t, v); in file_signextend()
1492 v = CAST(int64_t, v); in file_signextend()
1620 isspace(CAST(unsigned char, l[p->len]))) { in get_cond()
1678 while (!isspace(CAST(unsigned char, *++l))) in parse_indirect_modifier()
1704 val = CAST(uint64_t, strtoull(l, &t, 0)); in parse_op_modifier()
1718 while (!isspace(CAST(unsigned char, *++l))) { in parse_string_modifier()
1727 m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); in parse_string_modifier()
1800 if (l[1] == '/' && !isspace(CAST(unsigned char, l[2]))) in parse_string_modifier()
1855 diff = CAST(int32_t, cont_level) - CAST(int32_t, m->cont_level); in parse()
1863 if ((nm = CAST(struct magic *, erealloc(me->mp, in parse()
1869 me->max_count = CAST(uint32_t, cnt); in parse()
1878 if ((m = CAST(struct magic *, emalloc(len))) == NULL) { in parse()
1889 m->lineno = CAST(uint32_t, lineno); in parse()
1918 m->offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2006 if (isdigit(CAST(unsigned char, *l)) || *l == '-') { in parse()
2007 m->in_offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2071 && !isalpha(CAST(unsigned char, l[1]))) { in parse()
2161 if (*l == 'x' && ((isascii(CAST(unsigned char, l[1])) && in parse()
2162 isspace(CAST(unsigned char, l[1]))) || !l[1])) { in parse()
2260 if (*el && !isspace(CAST(unsigned char, *el))) { in parse_strength()
2264 m->factor = CAST(uint8_t, factor); in parse_strength()
2290 char *buf = CAST(char *, CAST(void *, m)) + off; in parse_extra()
2295 "`%.*s', new type `%s'", name, CAST(int, len), buf, l); in parse_extra()
2317 if (!isspace(CAST(unsigned char, *l)) && !goodchar(*l, extra)) in parse_extra()
2342 CAST(off_t, offsetof(struct magic, apple)), in parse_apple()
2356 CAST(off_t, offsetof(struct magic, ext)), in parse_ext()
2371 CAST(off_t, offsetof(struct magic, mimetype)), in parse_mime()
2422 for (len = cnt = 0; isdigit(CAST(unsigned char, *ptr)); ptr++, cnt++) \ in check_format_type()
2540 while (isdigit(CAST(unsigned char, *ptr))) in check_format_type()
2544 while (isdigit(CAST(unsigned char , *ptr))) in check_format_type()
2699 ull = CAST(uint64_t, strtoull(*p, &ep, 0)); in getvalue()
2713 for (q = *p; isspace(CAST(unsigned char, *q)); q++) in getvalue()
2716 ull = -CAST(int64_t, ull); in getvalue()
2719 x = CAST(uint64_t, ull & ~0xffULL); in getvalue()
2722 x = CAST(uint64_t, ull & ~0xffffULL); in getvalue()
2725 x = CAST(uint64_t, ull & ~0xffffffffULL); in getvalue()
2765 if (isspace(CAST(unsigned char, c))) in getstr()
2789 if (isprint(CAST(unsigned char, c))) { in getstr()
2827 *p++ = CAST(char, c); in getstr()
2879 *p++ = CAST(char, val); in getstr()
2895 *p++ = CAST(char, val); in getstr()
2899 *p++ = CAST(char, c); in getstr()
2904 m->vallen = CAST(unsigned char, (p - origp)); in getstr()
2909 m->vallen += CAST(unsigned char, l); in getstr()
2919 if (!isascii(CAST(unsigned char, c))) in hextoint()
2921 if (isdigit(CAST(unsigned char, c))) in hextoint()
3035 if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) { in apprentice_map()
3078 map->len = CAST(size_t, st.sb.st_size); in apprentice_map()
3079 map->p = CAST(void *, emalloc(map->len)); in apprentice_map()
3128 map->magic[0] = CAST(struct magic *, map->p) + 1; in apprentice_map()
3251 spprintf(&buf, MAXPATHLEN, "%.*s.mime%s", CAST(int, q - fn), fn, ext);
3262 spprintf(&buf, MAXPATHLEN, "%.*s%s", CAST(int, q - fn), fn, ext);
3349 m->offset = swap4(CAST(uint32_t, m->offset));
3350 m->in_offset = swap4(CAST(uint32_t, m->in_offset));
3351 m->lineno = swap4(CAST(uint32_t, m->lineno));