"Fossies" - the Fresh Open Source Software Archive

Member "file-5.35/magic/Magdir/mathematica" (17 Mar 2017, 2750 Bytes) of package /linux/misc/file-5.35.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "mathematica": 5.30_vs_5.31.

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