[File] [PATCH] Magdir/maple library *.lib; newer versions + extension

Christos Zoulas christos at zoulas.com
Mon Aug 30 13:31:53 UTC 2021


Committed, thanks!

christos

> On Aug 29, 2021, at 5:38 PM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> Hello,
> 
> some days ago i inspected some Maple help examples. Now i looked at
> Maple library examples with lib extension.
> 
> When running running file command version 5.40 on my examples and
> related test files i get an output like:
> 
> exterior.lib: data
> maple.lib:    MIPSEB MIPS-III ECOFF executable not stripped -
> 	      version 114.100
> test-v4.lib:  MapleVr4 library
> test-v5.lib:  data
> Tutors.lib:   data
> 
> Furthermore with extension option only 3 byte sequences ??? is shown
> and with -i option only generic mime type application/octet-stream is
> displayed.
> 
> For comparison reason i run the file format identification utility
> TrID ( See https://mark0.net/soft-trid-e.html).
> The detected example test-v4.lib is described by TrID as "Maple V R4
> Library" by lib-maple-v-r4.trid.xml. The example test-v5.lib is
> described as "Maple V R5 Library" by second definition
> lib-maple-v-r5.trid.xml (See appended lib-maple-trid-v.txt.gz ).
> It also displays related URL and used file name extension LIB.
> 
> For the examples a page about the numeric computing software maple on
> Wikipedia was mentioned by TrID as related URL. Unfortunately i found
> no file format documentation. So i used TrID definition file as
> reference. So this information is now expressed by additional comment
> lines inside Magdir/maple like:
> # URL:		https://en.wikipedia.org/wiki/Maple_(software)
> # Reference:	http://mark0.net/download/triddefs_xml.7z
> #		/defs/l/lib-maple-v-r4.trid.xml
> 
> The detection of release 4 example happens by lines inside
> Magdir/maple like:
> 0	string	\000MVR4\nI	MapleVr4 library
> 
> According to TrID definition this now becomes like:
> # URL:		https://en.wikipedia.org/wiki/Maple_(software)
> # Reference:	http://mark0.net/download/triddefs_xml.7z
> #		/defs/l/lib-maple-v-r4.trid.xml
> 0	string	\000MVR4\nI	MapleVr4 library
> !:mime	application/x-maple-lib
> !:ext	lib
> Instead of generic mime type application/octet-stream i choose a user
> defined one.
> 
> According to TrID there exist also a newer "version 5" variant.
> Converting the TrID XML constructs this is now expressed by magic
> lines like:
> # URL:		https://en.wikipedia.org/wiki/Maple_(software)
> # Reference:	http://mark0.net/download/triddefs_xml.7z
> #		/defs/l/lib-maple-v-r5.trid.xml
> 0	string	\000MVR5\n	Maple Vr5 library
> !:mime	application/x-maple-lib
> !:ext	lib
> 
> For undetected lib examples i get a similar pattern. Here pattern is
> found at other offset (1024) and obviously such libraries
> are newer version 7. So that is expressed by lines like:
> 0x400	string	M7R0\nI		Maple Vr7 library
> !:mime	application/x-maple-lib
> !:ext	lib
> 
> So i choose as file type description "Maple Vr7 library" in the same
> manner as for older versions.
> 
> At offset 6 the null terminated library name (like
> ../Maplets/Tutors.lib /Users/mark/math/Msh/Exterior/1.2/exterior.lib
> C:\Maple12/Cliffordlib\maple.lib) is stored. That is expressed by
> additional line like:
> >5	string	x		%s
> 
> At offset 281 some null terminated strings ( like Exterior Clifford
> FunctionArithmetics) are stored. Before at offset 277 the number of
> strings is stored as 4 byte integer. In my examples the number was 1,
> 20 and 40. That information is shown by line like:
> >0x115	ulelong	x		\b, %u string
> >0x115	ulelong	>1		\bs
> >0x119	string	x		1st '%s'
> 
> After applying the above mentioned modifications by patch
> file-5.40-maple-lib.diff then all my newer Maple library examples are
> now are described correctly and first like:
> 
> exterior.lib: Maple Vr7 library
> 	      /Users/mark/math/Msh/Exterior/1.2/exterior.lib,
> 	      1 string 1st 'Exterior'
> maple.lib:    Maple Vr7 library
> 	      C:\Maple12/Cliffordlib\maple.lib,
> 	      40 strings 1st 'Clifford
> 	      MIPSEB MIPS-III ECOFF executable not stripped -
> 	      version 114.100
> test-v4.lib:  Maple Vr4 library
> test-v5.lib:  Maple Vr5 library
> Tutors.lib:   Maple Vr7 library
> 	      ../Maplets/Tutors.lib,
> 	      20 strings 1st 'FunctionArithmetics'
> 
> I hope my diff file can be applied in future version of file utility.
> 
> With best wishes
> Jörg Jenderek
> --
> Jörg Jenderek
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> <file-5_40-maple-lib_diff.DEFANGED-1><file-5_40-maple-lib_diff_sig.DEFANGED-2><lib-maple-trid-v.txt.gz>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20210830/b2247b62/attachment.asc>


More information about the File mailing list