Lines Matching refs:magic
93 struct magic *mp;
108 struct magic *magic[MAGIC_SETS]; member
117 file_private int getvalue(struct magic_set *ms, struct magic *, const char **, int);
119 file_private const char *getstr(struct magic_set *, struct magic *, const char *,
125 file_private ssize_t apprentice_magic_strength_1(const struct magic *);
133 file_private void byteswap(struct magic *, uint32_t);
134 file_private void bs1(struct magic *);
156 file_private int check_format(struct magic_set *, struct magic *);
168 file_private size_t magicsize = sizeof(struct magic);
453 ml->magic = map->magic[idx]; in add_mlist()
476 CAST(unsigned long, sizeof(*map->magic[0])), in apprentice_1()
604 if (map->magic[j]) { in apprentice_unmap()
605 efree(map->magic[j]); in apprentice_unmap()
879 apprentice_magic_strength_1(const struct magic *m) in apprentice_magic_strength_1()
1016 file_magic_strength(const struct magic *m, in file_magic_strength()
1101 struct magic *m = &ml->magic[magindex]; in apprentice_list()
1105 ml->magic[magindex + 1].cont_level != 0) in apprentice_list()
1116 ml->magic[magindex + 1].cont_level != 0; in apprentice_list()
1119 if (*ml->magic[descindex].desc == '\0' in apprentice_list()
1120 && *ml->magic[mi].desc) in apprentice_list()
1122 if (*ml->magic[mimeindex].mimetype == '\0' in apprentice_list()
1123 && *ml->magic[mi].mimetype) in apprentice_list()
1129 ml->magic[lineindex].lineno, in apprentice_list()
1130 ml->magic[descindex].desc, in apprentice_list()
1131 ml->magic[mimeindex].mimetype); in apprentice_list()
1137 set_test_type(struct magic *mstart, struct magic *m) in set_test_type()
1412 struct magic **ma, uint32_t *nma) in coalesce_entries()
1427 if ((*ma = CAST(struct magic *, emalloc(slen))) == NULL) { in coalesce_entries()
1557 &map->magic[j], &map->nmagic[j]) == -1) { in apprentice_load()
1578 file_signextend(struct magic_set *ms, struct magic *m, uint64_t v) in file_signextend()
1664 string_modifier_check(struct magic_set *ms, struct magic *m) in string_modifier_check()
1819 parse_indirect_modifier(struct magic_set *ms, struct magic *m, const char **lp) in parse_indirect_modifier()
1840 parse_op_modifier(struct magic_set *ms, struct magic *m, const char **lp, in parse_op_modifier()
1857 parse_string_modifier(struct magic_set *ms, struct magic *m, const char **lp) in parse_string_modifier()
1971 struct magic *m; in parse()
2009 struct magic *nm; in parse()
2011 if ((nm = CAST(struct magic *, erealloc(me->mp, in parse()
2026 if ((m = CAST(struct magic *, emalloc(len))) == NULL) { in parse()
2388 struct magic *m = &me->mp[0]; in parse_strength()
2453 struct magic *m = &me->mp[me->cont_count == 0 ? 0 : me->cont_count - 1]; in parse_extra()
2504 CAST(off_t, offsetof(struct magic, apple)), in parse_apple()
2516 CAST(off_t, offsetof(struct magic, ext)), in parse_ext()
2531 CAST(off_t, offsetof(struct magic, mimetype)), in parse_mime()
2730 check_format(struct magic_set *ms, struct magic *m) in check_format()
2786 getvalue(struct magic_set *ms, struct magic *m, const char **p, int action) in getvalue()
2923 getstr(struct magic_set *ms, struct magic *m, const char *s, int warn) in getstr()
3303 nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map()
3304 entries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map()
3305 if ((zend_off_t)(entries * sizeof(struct magic)) != st.sb.st_size) { in apprentice_map()
3308 sizeof(struct magic)); in apprentice_map()
3312 map->magic[0] = CAST(struct magic *, map->p) + 1; in apprentice_map()
3320 map->magic[i + 1] = map->magic[i] + map->nmagic[i]; in apprentice_map()
3330 byteswap(map->magic[i], map->nmagic[i]); in apprentice_map()
3355 static const size_t m = sizeof(**map->magic); in apprentice_compile()
3362 struct magic m; in apprentice_compile()
3390 if (php_stream_write(stream, (const char *)map->magic[i], len) != (ssize_t)len) { in apprentice_compile()
3458 byteswap(struct magic *magic, uint32_t nmagic) argument
3462 bs1(&magic[i]);
3562 bs1(struct magic *m)
3579 file_pstring_length_size(struct magic_set *ms, const struct magic *m)
3598 file_pstring_get_length(struct magic_set *ms, const struct magic *m,
3659 struct magic *ma = ml->magic;
3664 v->magic = &ma[i];