-.\" $File: magic.man,v 1.40 2008/02/03 21:00:15 christos Exp $
+.\" $File: magic.man,v 1.41 2008/02/04 01:40:53 christos Exp $
.Dd January 10, 2007
.Dt MAGIC __FSECTION__
.Os
.Dq "magic number" .
The file
.Pa __MAGIC__
-specifies what magic numbers are to be tested for,
-what message to print if a particular magic number is found,
+specifies what magic numbers are to be tested for, what message or
+MIME type to print if a particular magic number is found,
and additional information to extract from the file.
.Pp
Each line of the file specifies a test to be performed.
.Dq c
flag, specifies case insensitive matching: lowercase
characters in the magic match both lower and upper case characters in the
-targer, whereas upper case characters in the magic, only much uppercase
+target, whereas upper case characters in the magic, only much uppercase
characters in the target.
.It Dv pstring
A pascal style string where the first byte is interpreted as the an
matches are normally separated by a single space.
.El
.Pp
+A MIME type is given on a separate line, which must be the next
+non-blank or comment line after the magic line that identifies the
+file type, and has the following format:
+.Bd -literal -offset indent
+!:mime MIMETYPE
+.Ed
+.Pp
+i.e. the literal string
+.Dq !:mime
+followed by the MIME type.
+.Pp
Some file formats contain additional information which is to be printed
along with the file type or need additional tests to determine the true
file type.
.\" the changes I posted to the S5R2 version.
.\"
.\" Modified for Ian Darwin's version of the file command.
-.\" @(#)$Id: magic.man,v 1.41 2008/02/04 01:40:53 christos Exp $
+.\" @(#)$Id: magic.man,v 1.42 2008/02/04 18:49:43 christos Exp $