Lines Matching refs:marray
656 struct magic_entry **marray, uint32_t *marraycount) argument
721 &(*marray)[*marraycount - 1],
730 if (parse(ms, marray, marraycount, line, lineno,
754 struct magic_entry *marray; local
767 marray = ecalloc(maxmagic, sizeof(*marray));
813 load_1(ms, action, filearr[i], &errs, &marray,
819 load_1(ms, action, fn, &errs, &marray, &marraycount);
825 if (marray[i].mp->cont_level != 0) {
835 set_test_type(marray[starttest].mp, marray[i].mp);
839 marray[i].mp->mimetype,
840 marray[i].mp->mimetype[0] == '\0' ? "" : "; ",
841 marray[i].mp->desc[0] ? marray[i].mp->desc :
843 marray[i].mp->flag & BINTEST ? binary : text);
844 if (marray[i].mp->flag & BINTEST) {
845 char *p = strstr(marray[i].mp->desc, text);
846 if (p && (p == marray[i].mp->desc ||
848 (p + len - marray[i].mp->desc ==
854 } while (++i < marraycount && marray[i].mp->cont_level != 0);
857 qsort(marray, marraycount, sizeof(*marray), apprentice_sort);
863 if (marray[i].mp->cont_level == 0 &&
864 marray[i].mp->type == FILE_DEFAULT) {
866 if (marray[i].mp->cont_level == 0)
870 ms->line = marray[i].mp->lineno;
879 mentrycount += marray[i].cont_count;
885 (void)memcpy(*magicp + mentrycount, marray[i].mp,
886 marray[i].cont_count * sizeof(**magicp));
887 mentrycount += marray[i].cont_count;
891 if (marray[i].mp) {
892 efree(marray[i].mp);
895 if (marray) {
896 efree(marray);