xref: /freebsd/contrib/file/magic/Magdir/maple (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*43a5ec4eSXin LI# $File: maple,v 1.10 2021/08/30 13:31:25 christos Exp $
4b6cee71dSXin LI# maple:  file(1) magic for maple files
5b6cee71dSXin LI# "H. Nanosecond" <aldomel@ix.netcom.com>
6b6cee71dSXin LI# Maple V release 4, a multi-purpose math program
7b6cee71dSXin LI#
8b6cee71dSXin LI
9b6cee71dSXin LI# maple library .lib
10*43a5ec4eSXin LI# URL:		https://en.wikipedia.org/wiki/Maple_(software)
11*43a5ec4eSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/l/lib-maple-v-r4.trid.xml
12*43a5ec4eSXin LI# Update:	Joerg Jenderek
13b6cee71dSXin LI0	string	\000MVR4\nI	Maple Vr4 library
14*43a5ec4eSXin LI#!:mime	application/octet-stream
15*43a5ec4eSXin LI!:mime	application/x-maple-lib
16*43a5ec4eSXin LI!:ext	lib
17*43a5ec4eSXin LI
18*43a5ec4eSXin LI# URL:		https://en.wikipedia.org/wiki/Maple_(software)
19*43a5ec4eSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/l/lib-maple-v-r5.trid.xml
20*43a5ec4eSXin LI# From:		Joerg Jenderek
21*43a5ec4eSXin LI0	string	\000MVR5\n	Maple Vr5 library
22*43a5ec4eSXin LI#!:mime	application/octet-stream
23*43a5ec4eSXin LI!:mime	application/x-maple-lib
24*43a5ec4eSXin LI!:ext	lib
25*43a5ec4eSXin LI
26*43a5ec4eSXin LI# From:		Joerg Jenderek
27*43a5ec4eSXin LI0x400	string	M7R0\nI		Maple Vr7 library
28*43a5ec4eSXin LI#!:mime	application/octet-stream
29*43a5ec4eSXin LI!:mime	application/x-maple-lib
30*43a5ec4eSXin LI!:ext	lib
31*43a5ec4eSXin LI# null terminated library name like: C:\Maple12/Cliffordlib\maple.lib ../Maplets/Tutors.lib
32*43a5ec4eSXin LI>5	string	x		%s
33*43a5ec4eSXin LI# probably library name padding with nil or points (0x2E)
34*43a5ec4eSXin LI#>0xF8	uquad	x		\b, PADDING 0x%16.16llx
35*43a5ec4eSXin LI# null terminated strings like: Exterior Clifford FunctionArithmetics
36*43a5ec4eSXin LI# like: 1 20 40
37*43a5ec4eSXin LI>0x115	ulelong	x		\b, %u string
38*43a5ec4eSXin LI# plural s
39*43a5ec4eSXin LI>0x115	ulelong	>1		\bs
40*43a5ec4eSXin LI>0x119	string	x		1st '%s'
41*43a5ec4eSXin LI# probably second name section padding with nil or points (0x2E)
42*43a5ec4eSXin LI#>0x3F0	uquad	x		\b, 2nd PADDING 0x%16.16llx
43*43a5ec4eSXin LI# line feed separated ASCII string with maximal 79 length
44*43a5ec4eSXin LI#>0x407	string	x		\b, section "%s"
45*43a5ec4eSXin LI>0x454	ubyte	!0x0a		\b, at 0x454 0x%x
46b6cee71dSXin LI
47b6cee71dSXin LI# .ind
48b6cee71dSXin LI# no magic for these :-(
49b6cee71dSXin LI# they are compiled indexes for maple files
50b6cee71dSXin LI
51b6cee71dSXin LI# .hdb
52*43a5ec4eSXin LI# Update:	Joerg Jenderek
53*43a5ec4eSXin LI# URL:		https://www.maplesoft.com/support/help/maple/view.aspx?path=Formats/HDB
54*43a5ec4eSXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/h/hdb-maple.trid.xml
55*43a5ec4eSXin LI# Note:		This format was replaced in Maple 18 by the Maple Help format (*.help)
56*43a5ec4eSXin LI0	string	\000\004\000\000
57*43a5ec4eSXin LI# skip xBASE Compound Index file *.CDX by looking for version
58*43a5ec4eSXin LI>1028	string		version	Maple help database
59*43a5ec4eSXin LI# length of string version
60*43a5ec4eSXin LI#>>1024	ulelong		!7	\b, at 0x400 unexpected %u
61*43a5ec4eSXin LI#!:mime application/octet-stream
62*43a5ec4eSXin LI!:mime application/x-maple-hdb
63*43a5ec4eSXin LI!:ext	hdb
64*43a5ec4eSXin LI>1028	default		x
65*43a5ec4eSXin LI# skip more xBASE Compound Index file *.CDX by looking for keyword Maple
66*43a5ec4eSXin LI# like hsum.hdb
67*43a5ec4eSXin LI>>4	search/0xCC41	Maple	Maple help database
68*43a5ec4eSXin LI!:mime	application/x-maple-hdb
69*43a5ec4eSXin LI!:ext	hdb
70b6cee71dSXin LI
71b6cee71dSXin LI# .mhp
72b6cee71dSXin LI# this has the form <PACKAGE=name>
73b6cee71dSXin LI0	string	\<PACKAGE=	Maple help file
74b6cee71dSXin LI0	string	\<HELP\ NAME=	Maple help file
75b6cee71dSXin LI0	string	\n\<HELP\ NAME=	Maple help file with extra carriage return at start (yuck)
76b6cee71dSXin LI#0	string	#\ Newton	Maple help file, old style
77b6cee71dSXin LI0	string	#\ daub	Maple help file, old style
78b6cee71dSXin LI#0	string	#===========	Maple help file, old style
79b6cee71dSXin LI
80b6cee71dSXin LI# .mws
81b6cee71dSXin LI0	string	\000\000\001\044\000\221	Maple worksheet
82b6cee71dSXin LI#this is anomalous
83b6cee71dSXin LI0	string	WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000	Maple worksheet, but weird
84b6cee71dSXin LI# this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
85b6cee71dSXin LI# that is {VERSION major_version miunor_version computer_type version_string}
86b6cee71dSXin LI0	string	{VERSION\ 	Maple worksheet
87b6cee71dSXin LI>9	string	>\0	version %.1s.
88b6cee71dSXin LI>>11	string	>\0	%.1s
89b6cee71dSXin LI
90b6cee71dSXin LI# .mps
91b6cee71dSXin LI0	string	\0\0\001$	Maple something
92b6cee71dSXin LI# from byte 4 it is either 'nul E' or 'soh R'
93b6cee71dSXin LI# I think 'nul E' means a file that was saved as  a different name
94b6cee71dSXin LI# a sort of revision marking
95b6cee71dSXin LI# 'soh R' means new
96b6cee71dSXin LI>4	string	\000\105	An old revision
97b6cee71dSXin LI>4	string	\001\122	The latest save
98b6cee71dSXin LI
99b6cee71dSXin LI# .mpl
100b6cee71dSXin LI# some of these are the same as .mps above
101b6cee71dSXin LI#0000000 000 000 001 044 000 105 same as .mps
102b6cee71dSXin LI#0000000 000 000 001 044 001 122 same as .mps
103b6cee71dSXin LI
104b6cee71dSXin LI0	string	#\n##\ <SHAREFILE=	Maple something
105b6cee71dSXin LI0	string	\n#\n##\ <SHAREFILE=	Maple something
106b6cee71dSXin LI0	string	##\ <SHAREFILE=	Maple something
107b6cee71dSXin LI0	string	#\r##\ <SHAREFILE=	Maple something
108b6cee71dSXin LI0	string	\r#\r##\ <SHAREFILE=	Maple something
109b6cee71dSXin LI0	string	#\ \r##\ <DESCRIBE>	Maple something anomalous.
110