--- embedaddon/php/ext/fileinfo/libmagic/magic.h 2012/02/21 23:47:56 1.1.1.1 +++ embedaddon/php/ext/fileinfo/libmagic/magic.h 2012/05/29 12:34:39 1.1.1.2 @@ -43,6 +43,7 @@ #define MAGIC_MIME_ENCODING 0x000400 /* Return the MIME encoding */ #define MAGIC_MIME (MAGIC_MIME_TYPE|MAGIC_MIME_ENCODING) #define MAGIC_APPLE 0x000800 /* Return the Apple creator and type */ + #define MAGIC_NO_CHECK_COMPRESS 0x001000 /* Don't check for compressed files */ #define MAGIC_NO_CHECK_TAR 0x002000 /* Don't check for tar files */ #define MAGIC_NO_CHECK_SOFT 0x004000 /* Don't check magic entries */ @@ -53,6 +54,19 @@ #define MAGIC_NO_CHECK_TOKENS 0x100000 /* Don't check tokens */ #define MAGIC_NO_CHECK_ENCODING 0x200000 /* Don't check text encodings */ +/* No built-in tests; only consult the magic file */ +#define MAGIC_NO_CHECK_BUILTIN ( \ + MAGIC_NO_CHECK_COMPRESS | \ + MAGIC_NO_CHECK_TAR | \ +/* MAGIC_NO_CHECK_SOFT | */ \ + MAGIC_NO_CHECK_APPTYPE | \ + MAGIC_NO_CHECK_ELF | \ + MAGIC_NO_CHECK_TEXT | \ + MAGIC_NO_CHECK_CDF | \ + MAGIC_NO_CHECK_TOKENS | \ + MAGIC_NO_CHECK_ENCODING | \ +) + /* Defined for backwards compatibility (renamed) */ #define MAGIC_NO_CHECK_ASCII MAGIC_NO_CHECK_TEXT @@ -69,6 +83,7 @@ typedef struct magic_set *magic_t; magic_t magic_open(int); void magic_close(magic_t); +const char *magic_getpath(const char *, int); const char *magic_file(magic_t, const char *); const char *magic_stream(magic_t, php_stream *); const char *magic_descriptor(magic_t, int); @@ -79,6 +94,7 @@ int magic_setflags(magic_t, int); int magic_load(magic_t, const char *); int magic_compile(magic_t, const char *); +int magic_list(magic_t, const char *); int magic_errno(magic_t); #ifdef __cplusplus