Lines Matching refs:CAST
368 if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL) in add_mlist()
463 if ((ms = CAST(struct magic_set *, ecalloc((size_t)1, in file_ms_alloc()
475 if ((ms->c.li = CAST(struct level_info *, emalloc(len))) == NULL) in file_ms_alloc()
514 if ((mlist = CAST(struct mlist *, ecalloc(1, sizeof(*mlist)))) == NULL) { in mlist_alloc()
781 const struct magic_entry *ma = CAST(const struct magic_entry *, a); in apprentice_sort()
782 const struct magic_entry *mb = CAST(const struct magic_entry *, b); in apprentice_sort()
918 if ((mp = CAST(struct magic_entry *, in addentry()
1104 if ((*ma = CAST(struct magic *, emalloc(slen))) == NULL) { in coalesce_entries()
1148 if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) { in apprentice_load()
1194 if ((filearr = CAST(char **, in apprentice_load()
1539 if ((nm = CAST(struct magic *, erealloc(me->mp, in parse()
1545 me->max_count = CAST(uint32_t, cnt); in parse()
1554 if ((m = CAST(struct magic *, emalloc(len))) == NULL) { in parse()
1565 m->lineno = CAST(uint32_t, lineno); in parse()
1783 m->str_range = CAST(uint32_t, in parse()
2476 m->vallen = CAST(unsigned char, (p - origp)); in getstr()
2604 if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) { in apprentice_map()
2650 if ((map->p = CAST(void *, emalloc(map->len))) == NULL) { in apprentice_map()
2703 map->magic[0] = CAST(struct magic *, map->p) + 1; in apprentice_map()