maple 3.8 KB

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