Lines Matching refs:CAST
71 #define EATAB {while (isascii(CAST(unsigned char, *l)) && \
72 isspace(CAST(unsigned char, *l))) ++l;}
73 #define LOWCASE(l) (isupper(CAST(unsigned char, l)) ? \
74 tolower(CAST(unsigned char, l)) : (l))
97 #define ALLOC_CHUNK CAST(size_t, 10)
98 #define ALLOC_INCR CAST(size_t, 200)
291 return CAST(off_t, INT_MAX); in maxoff_t()
293 return CAST(off_t, LONG_MAX); in maxoff_t()
302 if (isalpha(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
337 } else if (isdigit(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
348 if (isdigit(CAST(unsigned char, l[2]))) { in get_standard_integer_type()
406 if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL) in add_mlist()
434 CAST(unsigned long, sizeof(*map->magic[0])), in apprentice_1()
435 CAST(unsigned long, FILE_MAGICSIZE)); in apprentice_1()
509 if ((ms = CAST(struct magic_set *, ecalloc(CAST(size_t, 1u), in file_ms_alloc()
522 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()
1455 v = CAST(signed char, v); in file_signextend()
1460 v = CAST(short, v); in file_signextend()
1477 v = CAST(int32_t, v); in file_signextend()
1495 v = CAST(int64_t, v); in file_signextend()
1623 isspace(CAST(unsigned char, l[p->len]))) { in get_cond()
1681 while (!isspace(CAST(unsigned char, *++l))) in parse_indirect_modifier()
1707 val = CAST(uint64_t, strtoull(l, &t, 0)); in parse_op_modifier()
1721 while (!isspace(CAST(unsigned char, *++l))) { in parse_string_modifier()
1730 m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); in parse_string_modifier()
1803 if (l[1] == '/' && !isspace(CAST(unsigned char, l[2]))) in parse_string_modifier()
1858 diff = CAST(int32_t, cont_level) - CAST(int32_t, m->cont_level); in parse()
1866 if ((nm = CAST(struct magic *, erealloc(me->mp, in parse()
1872 me->max_count = CAST(uint32_t, cnt); in parse()
1881 if ((m = CAST(struct magic *, emalloc(len))) == NULL) { in parse()
1892 m->lineno = CAST(uint32_t, lineno); in parse()
1921 m->offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2009 if (isdigit(CAST(unsigned char, *l)) || *l == '-') { in parse()
2010 m->in_offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2074 && !isalpha(CAST(unsigned char, l[1]))) { in parse()
2171 if (*l == 'x' && ((isascii(CAST(unsigned char, l[1])) && in parse()
2172 isspace(CAST(unsigned char, l[1]))) || !l[1])) { in parse()
2270 if (*el && !isspace(CAST(unsigned char, *el))) { in parse_strength()
2274 m->factor = CAST(uint8_t, factor); in parse_strength()
2300 char *buf = CAST(char *, CAST(void *, m)) + off; in parse_extra()
2305 "`%.*s', new type `%s'", name, CAST(int, len), buf, l); in parse_extra()
2327 if (!isspace(CAST(unsigned char, *l)) && !goodchar(*l, extra)) in parse_extra()
2352 CAST(off_t, offsetof(struct magic, apple)), in parse_apple()
2366 CAST(off_t, offsetof(struct magic, ext)), in parse_ext()
2381 CAST(off_t, offsetof(struct magic, mimetype)), in parse_mime()
2432 for (len = cnt = 0; isdigit(CAST(unsigned char, *ptr)); ptr++, cnt++) \ in check_format_type()
2550 while (isdigit(CAST(unsigned char, *ptr))) in check_format_type()
2554 while (isdigit(CAST(unsigned char , *ptr))) in check_format_type()
2709 ull = CAST(uint64_t, strtoull(*p, &ep, 0)); in getvalue()
2723 for (q = *p; isspace(CAST(unsigned char, *q)); q++) in getvalue()
2726 ull = -CAST(int64_t, ull); in getvalue()
2729 x = CAST(uint64_t, ull & ~0xffULL); in getvalue()
2732 x = CAST(uint64_t, ull & ~0xffffULL); in getvalue()
2735 x = CAST(uint64_t, ull & ~0xffffffffULL); in getvalue()
2775 if (isspace(CAST(unsigned char, c))) in getstr()
2799 if (isprint(CAST(unsigned char, c))) { in getstr()
2837 *p++ = CAST(char, c); in getstr()
2889 *p++ = CAST(char, val); in getstr()
2905 *p++ = CAST(char, val); in getstr()
2909 *p++ = CAST(char, c); in getstr()
2914 m->vallen = CAST(unsigned char, (p - origp)); in getstr()
2919 m->vallen += CAST(unsigned char, l); in getstr()
2929 if (!isascii(CAST(unsigned char, c))) in hextoint()
2931 if (isdigit(CAST(unsigned char, c))) in hextoint()
3045 if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) { in apprentice_map()
3088 map->len = CAST(size_t, st.sb.st_size); in apprentice_map()
3089 map->p = CAST(void *, emalloc(map->len)); in apprentice_map()
3138 map->magic[0] = CAST(struct magic *, map->p) + 1; in apprentice_map()
3261 spprintf(&buf, MAXPATHLEN, "%.*s.mime%s", CAST(int, q - fn), fn, ext);
3272 spprintf(&buf, MAXPATHLEN, "%.*s%s", CAST(int, q - fn), fn, ext);
3359 m->offset = swap4(CAST(uint32_t, m->offset));
3360 m->in_offset = swap4(CAST(uint32_t, m->in_offset));
3361 m->lineno = swap4(CAST(uint32_t, m->lineno));