Lines Matching refs:magic
48 struct magic_set *magic; member
86 magic_close(intern->ptr->magic); in finfo_objects_free()
179 #define FINFO_SET_OPTION(magic, options) \ argument
180 if (magic_setflags(magic, options) == -1) { \
182 options, magic_errno(magic), magic_error(magic)); \
194 magic_close(finfo->magic); in finfo_resource_destructor()
314 magic_close(finfo_obj->ptr->magic); in PHP_FUNCTION()
338 finfo->magic = magic_open(options); in PHP_FUNCTION()
340 if (finfo->magic == NULL) { in PHP_FUNCTION()
347 if (magic_load(finfo->magic, file) == -1) { in PHP_FUNCTION()
349 magic_close(finfo->magic); in PHP_FUNCTION()
402 FINFO_SET_OPTION(finfo->magic, options) in PHP_FUNCTION()
423 struct magic_set *magic = NULL; in _php_finfo_get_type() local
449 magic = magic_open(MAGIC_MIME_TYPE); in _php_finfo_get_type()
450 if (magic_load(magic, NULL) == -1) { in _php_finfo_get_type()
459 magic = finfo->magic; in _php_finfo_get_type()
465 magic = finfo->magic; in _php_finfo_get_type()
470 FINFO_SET_OPTION(magic, options) in _php_finfo_get_type()
476 ret_val = (char *) magic_buffer(magic, buffer, buffer_len); in _php_finfo_get_type()
493 ret_val = (char *) magic_stream(magic, stream); in _php_finfo_get_type()
547 ret_val = (char *)magic_stream(magic, stream); in _php_finfo_get_type()
564 …f(NULL TSRMLS_CC, E_WARNING, "Failed identify data %d:%s", magic_errno(magic), magic_error(magic)); in _php_finfo_get_type()
570 magic_close(magic); in _php_finfo_get_type()
575 FINFO_SET_OPTION(magic, finfo->options) in _php_finfo_get_type()