Lines Matching refs:CAST

412 	if ((ml = CAST(struct mlist *, malloc(sizeof(*ml)))) == NULL)  in add_mlist()
506 if ((ms = CAST(struct magic_set *, calloc((size_t)1, in file_ms_alloc()
518 if ((ms->c.li = CAST(struct level_info *, malloc(len))) == NULL) in file_ms_alloc()
554 if (CAST(char *, b) >= CAST(char *, p) && in apprentice_unmap()
555 CAST(char *, b) <= CAST(char *, p) + map->len) in apprentice_unmap()
577 if ((mlist = CAST(struct mlist *, calloc(1, sizeof(*mlist)))) == NULL) { in mlist_alloc()
595 apprentice_unmap(CAST(struct magic_map *, ml->map)); in mlist_free()
983 const struct magic_entry *ma = CAST(const struct magic_entry *, a); in apprentice_sort()
984 const struct magic_entry *mb = CAST(const struct magic_entry *, b); in apprentice_sort()
1122 if ((mp = CAST(struct magic_entry *, in addentry()
1299 if ((*ma = CAST(struct magic *, malloc(slen))) == NULL) { in coalesce_entries()
1342 if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) in apprentice_load()
1378 if ((filearr = CAST(char **, in apprentice_load()
1726 m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); in parse_string_modifier()
1862 if ((nm = CAST(struct magic *, realloc(me->mp, in parse()
1868 me->max_count = CAST(uint32_t, cnt); in parse()
1877 if ((m = CAST(struct magic *, malloc(len))) == NULL) { in parse()
1888 m->lineno = CAST(uint32_t, lineno); in parse()
2293 char *buf = CAST(char *, CAST(void *, m)) + off; in parse_extra()
2343 CAST(off_t, offsetof(struct magic, apple)), in parse_apple()
2356 CAST(off_t, offsetof(struct magic, ext)), in parse_ext()
2370 CAST(off_t, offsetof(struct magic, mimetype)), in parse_mime()
2893 m->vallen = CAST(unsigned char, (p - origp)); in getstr()
3010 if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) { in apprentice_buf()
3038 if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) { in apprentice_map()
3071 if ((map->p = CAST(void *, malloc(map->len))) == NULL) { in apprentice_map()
3114 ptr = CAST(uint32_t *, map->p); in check_buffer()
3140 map->magic[0] = CAST(struct magic *, map->p) + 1; in check_buffer()