Lines Matching refs:magic
42 struct magic_set *magic; member
75 magic_close(intern->ptr->magic); in finfo_objects_free()
97 #define FINFO_SET_OPTION(magic, options) \ argument
98 if (magic_setflags(magic, options) == -1) { \
100 options, magic_errno(magic), magic_error(magic)); \
179 magic_close(finfo_obj->ptr->magic); in PHP_FUNCTION()
213 finfo->magic = magic_open(options); in PHP_FUNCTION()
215 if (finfo->magic == NULL) { in PHP_FUNCTION()
227 if (magic_load(finfo->magic, file) == -1) { in PHP_FUNCTION()
229 magic_close(finfo->magic); in PHP_FUNCTION()
279 FINFO_SET_OPTION(finfo->magic, options) in PHP_FUNCTION()
299 struct magic_set *magic = NULL; in _php_finfo_get_type() local
324 magic = magic_open(MAGIC_MIME_TYPE); in _php_finfo_get_type()
325 if (magic_load(magic, NULL) == -1) { in _php_finfo_get_type()
335 magic = finfo->magic; in _php_finfo_get_type()
340 FINFO_SET_OPTION(magic, options) in _php_finfo_get_type()
346 ret_val = (char *) magic_buffer(magic, buffer, buffer_len); in _php_finfo_get_type()
363 ret_val = (char *) magic_stream(magic, stream); in _php_finfo_get_type()
413 ret_val = (char *)magic_stream(magic, stream); in _php_finfo_get_type()
428 …rror_docref(NULL, E_WARNING, "Failed identify data %d:%s", magic_errno(magic), magic_error(magic)); in _php_finfo_get_type()
434 magic_close(magic); in _php_finfo_get_type()
439 FINFO_SET_OPTION(magic, finfo->options) in _php_finfo_get_type()