Lines Matching refs:magic
105 struct magic *mp;
120 struct magic *magic[MAGIC_SETS]; member
129 private int getvalue(struct magic_set *ms, struct magic *, const char **, int);
131 private const char *getstr(struct magic_set *, struct magic *, const char *,
137 private size_t apprentice_magic_strength(const struct magic *);
145 private void byteswap(struct magic *, uint32_t);
146 private void bs1(struct magic *);
156 private int check_format(struct magic_set *, struct magic *);
168 private size_t magicsize = sizeof(struct magic);
410 ml->magic = map->magic[idx]; in add_mlist()
434 CAST(unsigned long, sizeof(*map->magic[0])), in apprentice_1()
554 if (map->magic[j]) { in apprentice_unmap()
555 efree(map->magic[j]); in apprentice_unmap()
819 apprentice_magic_strength(const struct magic *m) in apprentice_magic_strength()
992 struct magic *m = &ml->magic[magindex]; in apprentice_list()
996 ml->magic[magindex + 1].cont_level != 0) in apprentice_list()
1006 ml->magic[magindex + 1].cont_level != 0 && in apprentice_list()
1007 *ml->magic[magindex].desc == '\0' && in apprentice_list()
1008 *ml->magic[magindex].mimetype == '\0') in apprentice_list()
1013 ml->magic[magindex].lineno, in apprentice_list()
1014 ml->magic[magindex].desc, in apprentice_list()
1015 ml->magic[magindex].mimetype); in apprentice_list()
1021 set_test_type(struct magic *mstart, struct magic *m) in set_test_type()
1285 struct magic **ma, uint32_t *nma) in coalesce_entries()
1294 if ((*ma = CAST(struct magic *, emalloc(slen))) == NULL) { in coalesce_entries()
1424 &map->magic[j], &map->nmagic[j]) == -1) { in apprentice_load()
1445 file_signextend(struct magic_set *ms, struct magic *m, uint64_t v) in file_signextend()
1522 string_modifier_check(struct magic_set *ms, struct magic *m) in string_modifier_check()
1677 parse_indirect_modifier(struct magic_set *ms, struct magic *m, const char **lp) in parse_indirect_modifier()
1698 parse_op_modifier(struct magic_set *ms, struct magic *m, const char **lp, in parse_op_modifier()
1715 parse_string_modifier(struct magic_set *ms, struct magic *m, const char **lp) in parse_string_modifier()
1826 struct magic *m; in parse()
1864 struct magic *nm; in parse()
1866 if ((nm = CAST(struct magic *, erealloc(me->mp, in parse()
1881 if ((m = CAST(struct magic *, emalloc(len))) == NULL) { in parse()
2238 struct magic *m = &me->mp[0]; in parse_strength()
2299 struct magic *m = &me->mp[me->cont_count == 0 ? 0 : me->cont_count - 1]; in parse_extra()
2349 struct magic *m = &me->mp[0]; in parse_apple()
2352 CAST(off_t, offsetof(struct magic, apple)), in parse_apple()
2363 struct magic *m = &me->mp[0]; in parse_ext()
2366 CAST(off_t, offsetof(struct magic, ext)), in parse_ext()
2378 struct magic *m = &me->mp[0]; in parse_mime()
2381 CAST(off_t, offsetof(struct magic, mimetype)), in parse_mime()
2581 check_format(struct magic_set *ms, struct magic *m) in check_format()
2637 getvalue(struct magic_set *ms, struct magic *m, const char **p, int action) in getvalue()
2764 getstr(struct magic_set *ms, struct magic *m, const char *s, int warn) in getstr()
3129 nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map()
3130 entries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map()
3131 if ((zend_off_t)(entries * sizeof(struct magic)) != st.sb.st_size) { in apprentice_map()
3134 sizeof(struct magic)); in apprentice_map()
3138 map->magic[0] = CAST(struct magic *, map->p) + 1; in apprentice_map()
3146 map->magic[i + 1] = map->magic[i] + map->nmagic[i]; in apprentice_map()
3156 byteswap(map->magic[i], map->nmagic[i]); in apprentice_map()
3181 static const size_t m = sizeof(**map->magic); in apprentice_compile()
3187 struct magic m; in apprentice_compile()
3216 if (php_stream_write(stream, (const char *)map->magic[i], len) != (ssize_t)len) { in apprentice_compile()
3284 byteswap(struct magic *magic, uint32_t nmagic) argument
3288 bs1(&magic[i]);
3356 bs1(struct magic *m)
3373 file_pstring_length_size(struct magic_set *ms, const struct magic *m)
3392 file_pstring_get_length(struct magic_set *ms, const struct magic *m,
3453 struct magic *ma = ml->magic;
3459 v->magic = &ma[i];