Lines Matching refs:mp
103 struct magic *mp; member
870 size_t sa = apprentice_magic_strength(ma->mp); in apprentice_sort()
871 size_t sb = apprentice_magic_strength(mb->mp); in apprentice_sort()
1001 size_t i = me->mp->type == FILE_NAME ? 1 : 0; in addentry()
1003 struct magic_entry *mp; in addentry() local
1006 if ((mp = CAST(struct magic_entry *, in addentry()
1007 erealloc(mset[i].me, sizeof(*mp) * mset[i].max))) == in addentry()
1009 file_oomem(ms, sizeof(*mp) * mset[i].max); in addentry()
1012 (void)memset(&mp[mset[i].count], 0, sizeof(*mp) * in addentry()
1014 mset[i].me = mp; in addentry()
1077 if (me.mp == NULL) { in load_1()
1106 if (me.mp) in load_1()
1134 set_test_type(me[starttest].mp, me[i].mp); in set_text_binary()
1138 me[i].mp->mimetype, in set_text_binary()
1139 me[i].mp->mimetype[0] == '\0' ? "" : "; ", in set_text_binary()
1140 me[i].mp->desc[0] ? me[i].mp->desc : "(no description)", in set_text_binary()
1141 me[i].mp->flag & BINTEST ? binary : text); in set_text_binary()
1142 if (me[i].mp->flag & BINTEST) { in set_text_binary()
1143 char *p = strstr(me[i].mp->desc, text); in set_text_binary()
1144 if (p && (p == me[i].mp->desc || in set_text_binary()
1146 (p + len - me[i].mp->desc == MAXstring in set_text_binary()
1152 } while (++i < nme && me[i].mp->cont_level != 0); in set_text_binary()
1161 if (me[i].mp->cont_level == 0 && in set_last_default()
1162 me[i].mp->type == FILE_DEFAULT) { in set_last_default()
1164 if (me[i].mp->cont_level == 0) in set_last_default()
1168 ms->line = me[i].mp->lineno; in set_last_default()
1195 (void)memcpy(*ma + mentrycount, me[i].mp, in coalesce_entries()
1210 efree(me[i].mp); in magic_entry_free()
1294 if (mset[j].me[i].mp->cont_level != 0) { in apprentice_load()
1733 if (me->mp == NULL) { in parse()
1741 m = &me->mp[me->cont_count - 1]; in parse()
1750 if ((nm = CAST(struct magic *, erealloc(me->mp, in parse()
1755 me->mp = m = nm; in parse()
1758 m = &me->mp[me->cont_count++]; in parse()
1763 if (me->mp != NULL) in parse()
1769 me->mp = m; in parse()
2087 struct magic *m = &me->mp[0]; in parse_strength()
2148 struct magic *m = &me->mp[me->cont_count == 0 ? 0 : me->cont_count - 1]; in parse_extra()
2196 struct magic *m = &me->mp[0]; in parse_apple()
2210 struct magic *m = &me->mp[0]; in parse_mime()