Lines Matching refs:mset
1284 struct magic_entry_set *mset) in addentry() argument
1287 if (mset[i].me == NULL || mset[i].count == mset[i].max) { in addentry()
1290 size_t incr = mset[i].max + ALLOC_INCR; in addentry()
1292 realloc(mset[i].me, sizeof(*mp) * incr))) == in addentry()
1297 (void)memset(&mp[mset[i].count], 0, sizeof(*mp) * in addentry()
1299 mset[i].me = mp; in addentry()
1300 mset[i].max = CAST(uint32_t, incr); in addentry()
1301 assert(mset[i].max == incr); in addentry()
1303 mset[i].me[mset[i].count++] = *me; in addentry()
1313 struct magic_entry_set *mset) in load_1() argument
1381 (void)addentry(ms, &me, mset); in load_1()
1390 (void)addentry(ms, &me, mset); in load_1()
1512 struct magic_entry_set mset[MAGIC_SETS]; in apprentice_load() local
1516 memset(mset, 0, sizeof(mset)); in apprentice_load()
1573 load_1(ms, action, filearr[i], &errs, mset); in apprentice_load()
1580 load_1(ms, action, fn, &errs, mset); in apprentice_load()
1586 for (i = 0; i < mset[j].count; ) { in apprentice_load()
1587 if (mset[j].me[i].mp->cont_level != 0) { in apprentice_load()
1591 i = set_text_binary(ms, mset[j].me, mset[j].count, i); in apprentice_load()
1593 if (mset[j].me) in apprentice_load()
1594 qsort(mset[j].me, mset[j].count, sizeof(*mset[j].me), in apprentice_load()
1601 set_last_default(ms, mset[j].me, mset[j].count); in apprentice_load()
1604 if (mset[j].count == 0) in apprentice_load()
1607 if (coalesce_entries(ms, mset[j].me, mset[j].count, in apprentice_load()
1617 magic_entry_free(mset[j].me, mset[j].count); in apprentice_load()