1 /*
2  * Copyright 1993 University of Liverpool Computer Science Department
3  *
4  * Permission to use, copy, modify, and distribute this software and its
5  * documentation for any purpose and without fee is hereby granted, provided
6  * that the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation, and that the name of L.U.C.S. not be used in advertising
9  * or publicity pertaining to distribution of the software without specific,
10  * written prior permission. L.U.C.S. makes no representations about the
11  * suitability of this software for any purpose.  It is provided "as is"
12  * without express or implied warranty.
13  *
14  * FILE NAME:	magic.h
15  * CREATED:	Mon Oct 25 1993
16  * AUTHOR:	Rik Turnbull
17  * DESCRIPTION:	Header file for magic.c
18  *
19  */
20 
21 #ifndef COMMON_MAGIC_H
22 #define COMMON_MAGIC_H	1
23 
24 #define	MAGIC_JPEG		1
25 #define	MAGIC_GIF		2
26 #define	MAGIC_COMPRESS		3
27 #define	MAGIC_GZIP		4
28 #define	MAGIC_TROFF		5
29 #define	MAGIC_POSTSCRIPT	6
30 
31 extern int magic_ftype(char *, int);
32 
33 #define	is_jpeg(filename)	magic_ftype(filename, MAGIC_JPEG)
34 #define	is_gif(filename)	magic_ftype(filename, MAGIC_GIF)
35 #define	is_compressed(filename)	magic_ftype(filename, MAGIC_COMPRESS)
36 #define	is_gzipped(filename)	magic_ftype(filename, MAGIC_GZIP)
37 #define	is_troff(filename)	magic_ftype(filename, MAGIC_TROFF)
38 #define	is_postscript(filename)	magic_ftype(filename, MAGIC_POSTSCRIPT)
39 
40 #endif
41