Update to file 4.13. Put the contrib files into contrib/file-4 instead
[dragonfly.git] / contrib / file-4 / magic / Magdir / mathematica
1
2 #------------------------------------------------------------------------------
3 # mathematica:  file(1) magic for mathematica files
4 # "H. Nanosecond" <aldomel@ix.netcom.com>
5 # Mathematica a multi-purpose math program
6 # versions 2.2 and 3.0
7
8 #mathematica .mb
9 0       string  \064\024\012\000\035\000\000\000        Mathematica version 2 notebook
10 0       string  \064\024\011\000\035\000\000\000        Mathematica version 2 notebook
11
12 # .ma
13 # multiple possibilites:
14
15 0       string  (*^\n\n::[\011frontEndVersion\ =\       Mathematica notebook
16 #>41    string  >\0     %s
17
18 #0      string  (*^\n\n::[\011palette   Mathematica notebook version 2.x
19
20 #0      string  (*^\n\n::[\011Information       Mathematica notebook version 2.x
21 #>675   string  >\0     %s #doesn't work well
22
23 # there may be 'cr' instread of 'nl' in some does this matter?
24
25 # generic:
26 0       string  (*^\r\r::[\011  Mathematica notebook version 2.x
27 0       string  \(\*\^\r\n\r\n\:\:\[\011        Mathematica notebook version 2.x
28 0       string  (*^\015                 Mathematica notebook version 2.x
29 0       string  (*^\n\r\n\r::[\011      Mathematica notebook version 2.x
30 0       string  (*^\r::[\011    Mathematica notebook version 2.x
31 0       string  (*^\r\n::[\011  Mathematica notebook version 2.x
32 0       string  (*^\n\n::[\011  Mathematica notebook version 2.x
33 0       string  (*^\n::[\011    Mathematica notebook version 2.x
34
35
36 # Mathematica .mx files
37
38 #0      string  (*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*)      Mathematica binary file
39 0       string  (*This\ is\ a\ Mathematica\ binary\     Mathematica binary file
40 #>71    string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000     
41 # >71... is optional
42 >88     string  >\0     from %s
43
44
45 # Mathematica files PBF:
46 # 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
47 0       string  MMAPBF\000\001\000\000\000\203\000\001\000      Mathematica PBF (fonts I think)
48
49 # .ml files  These are menu resources I think
50 # these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ 
51 # how to put that into a magic rule?
52 4       string  \ A~    MAthematica .ml file
53
54 # .nb files
55 #too long 0     string  (***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook     Mathematica 3.0 notebook
56 0       string  (***********************        Mathematica 3.0 notebook
57
58 # other (* matches it is a comment start in these langs
59 0       string  (*      Mathematica, or Pascal,  Modula-2 or 3 code text
60
61 #########################
62 # MatLab v5
63 0       string  MATLAB  Matlab v5 mat-file
64 >126    short   0x494d  (big endian)
65 >>124   beshort x       version 0x%04x
66 >126    short   0x4d49  (little endian)
67 >>124   leshort x       version 0x%04x
68