wordprocessors 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. #------------------------------------------------------------------------------
  2. # $File: wordprocessors,v 1.31 2022/08/31 08:00:53 christos Exp $
  3. # wordprocessors: file(1) magic fo word processors.
  4. #
  5. ####### PWP file format used on Smith Corona Personal Word Processors:
  6. 2 string \040\040\040\040\040\040\040\040\040\040\040ML4D\040'92 Smith Corona PWP
  7. >24 byte 2 \b, single spaced
  8. >24 byte 3 \b, 1.5 spaced
  9. >24 byte 4 \b, double spaced
  10. >25 byte 0x42 \b, letter
  11. >25 byte 0x54 \b, legal
  12. >26 byte 0x46 \b, A4
  13. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
  14. # reference: http://mark0.net/download/triddefs_xml.7z
  15. # /defs/w/wps-works-dos.trid.xml
  16. # From: Joerg Jenderek
  17. # Note: older non OLE 2 Compound based versions
  18. 0 ubeshort =0x01FE
  19. >112 ubeshort =0x0100 Microsoft Works 1-3 (DOS) or 2 (Windows) document
  20. # title like THE GREAT KHAN GAME
  21. >>0x100 string x %s
  22. !:mime application/vnd-ms-works
  23. #!:mime application/x-msworks
  24. # https://www.macdisk.com/macsigen.php
  25. !:apple ????AWWP
  26. !:ext wps
  27. # Corel/WordPerfect
  28. # URL: https://en.wikipedia.org/wiki/WordPerfect
  29. # Reference: https://github.com/OneWingedShark/WordPerfect/blob/master/doc/SDK_Help/FileFormats/WPFF_DocumentStructure.htm
  30. # http://mark0.net/download/triddefs_xml.7z/defs/w/wp-generic.trid.xml
  31. 0 string \xffWPC
  32. # WordPerfect
  33. >8 byte 1
  34. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/w/wpm-macro.trid.xml
  35. # Note: there exist other macro variants
  36. >>9 byte 1 WordPerfect macro
  37. #!:mime application/octet-stream
  38. !:mime application/x-wordperfect-wpm
  39. # like: ALTD.WPM ENDFOOT.WPM FOOTEND.WPM LABELS.WPM REVEALTX.WPM
  40. !:ext wpm
  41. # Note: used in WordPerfect 5.1; there exist other FIL variants
  42. >>9 byte 2 WordPerfect help file
  43. #!:mime application/octet-stream
  44. !:mime application/x-wordperfect-help
  45. # like: WPHELP.FIL
  46. !:ext fil
  47. # pointer to document area like: 10h
  48. >>>4 ulelong !0x10 \b, at %#x document area
  49. >>9 byte 3 WordPerfect keyboard file
  50. #!:mime application/octet-stream
  51. !:mime application/x-wordperfect-keyboard
  52. !:ext wpk
  53. # no document area, so point to end of file; so this is file size like: 23381 2978 32835 3355 3775 919
  54. >>>4 ulelong x \b, %u bytes
  55. >>9 byte 4 WordPerfect VAX keyboard definition
  56. #!:mime application/octet-stream
  57. !:mime application/x-wordperfect-keyboard
  58. #!:ext foo
  59. # URL: http://fileformats.archiveteam.org/wiki/WordPerfect
  60. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/w/wpd-doc-gen.trid.xml
  61. >>9 byte 10 WordPerfect document
  62. # https://www.iana.org/assignments/media-types/application/vnd.wordperfect
  63. !:mime application/vnd.wordperfect
  64. #!:apple ????WPC2
  65. # TODO: distinguish different suffix
  66. !:ext wpd/wpt/wkb/icr/tut/sty/tst/crs
  67. >>9 byte 11 WordPerfect dictionary
  68. >>9 byte 12 WordPerfect thesaurus
  69. >>9 byte 13 WordPerfect block
  70. >>9 byte 14 WordPerfect rectangular block
  71. >>9 byte 15 WordPerfect column block
  72. >>9 byte 16 WordPerfect printer data
  73. #!:mime application/octet-stream
  74. !:mime application/x-wordperfect-prs
  75. # like: STANDARD.PRS WORKBOOK.PRS
  76. !:ext prs
  77. # like: "Standard Printer" "Workbook Printer"
  78. >>>0x64 pstring/B >A "%s"
  79. #>>9 byte 18 WordPerfect Prefix information file
  80. # printer resource .ALL
  81. >>9 byte 19 WordPerfect printer data
  82. #!:mime application/octet-stream
  83. !:mime application/x-wordperfect-all
  84. !:ext all
  85. # display Resource
  86. >>9 byte 20 WordPerfect driver resource data
  87. #!:mime application/octet-stream
  88. !:mime application/x-wordperfect-drs
  89. # like: WPSMALL.DRS
  90. !:ext drs
  91. # pointer to index area with string "smalldrs" like: 46h
  92. >>>4 uleshort !0x46 \b, at %#x index area
  93. >>9 byte 21 WordPerfect Overlay file
  94. #!:mime application/octet-stream
  95. !:mime application/x-wordperfect-fil
  96. # like: WP.FIL
  97. !:ext fil
  98. # URL: http://fileformats.archiveteam.org/wiki/WordPerfect_Graphics
  99. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-wpg.trid.xml
  100. # Note: called "WordPerfect Graphics bitmap" by TrID and
  101. # "WordPerfect Graphics Metafile" by DROID via x-fmt/395 fmt/1042
  102. # "WPG (Word Perfect Graphics)" by ImageMagick `identify -verbose BUTTRFLY.WPG`
  103. >>9 byte 22 WordPerfect graphic image
  104. # TODO: skip DROID x-fmt-395-signature-id-132.wpg by check for existing document area
  105. #>>>4 ulelong >15 WordPerfect_graphic_OK
  106. #!:mime application/octet-stream
  107. # http://extension.nirsoft.net/wpg
  108. !:mime image/x-wordperfect-graphics
  109. # https://reposcope.com/mimetype/application/x-wpg
  110. #!:mime application/x-wpg
  111. # like: BUTTRFLY.WPG STAR-5.WPG input.wpg WORDPFCT.WPG
  112. !:ext wpg
  113. # pointer to document area like: 10h 1Ah
  114. >>>4 ulelong !0x1A \b, at %#x document area
  115. >>9 byte 23 WordPerfect hyphenation code
  116. >>9 byte 24 WordPerfect hyphenation data
  117. >>9 byte 25 WordPerfect macro resource data
  118. #!:mime application/octet-stream
  119. !:mime application/x-wordperfect-mrs
  120. # like: WP.MRS
  121. !:ext mrs
  122. >>9 byte 27 WordPerfect hyphenation lex
  123. >>9 byte 29 WordPerfect wordlist
  124. >>9 byte 30 WordPerfect equation resource data
  125. #!:mime application/octet-stream
  126. !:mime application/x-wordperfect-qrs
  127. # like: WQ.QRS wpDE.qrs wpen.qrs
  128. !:ext qrs
  129. # jump to document area with some marker and equation
  130. >>>(4.l) ubyte x
  131. # equation like: "Fraction: x OVER y"
  132. >>>>&1 string >A (...%-.19s...)
  133. # pointer to document area like: 17C4h
  134. >>>4 ulelong x \b, at %#x document area
  135. #>>9 byte 31 reserved
  136. #>>9 byte 32 WordPerfect VAX .SET
  137. >>9 byte 33 WordPerfect spell rules
  138. >>9 byte 34 WordPerfect dictionary rules
  139. #>>9 byte 35 reserved
  140. # video resource device driver
  141. # Note: filetype 26 for VRS and filetype 36 for WPD apparently is wrong
  142. >>9 byte 36 WordPerfect Video Resource
  143. #!:mime application/octet-stream
  144. !:mime application/x-wordperfect-vrs
  145. # like: STANDARD.VRS
  146. !:ext vrs
  147. # like: "IBM CGA (& compatibles)"
  148. >>>0x20 string >A "%.23s"
  149. >>9 byte 39 WordPerfect spell rules (Microlytics)
  150. #>>9 byte 40 reserved
  151. >>9 byte 41 WordPerfect Install options
  152. #!:mime application/octet-stream
  153. !:mime application/x-wordperfect-ins
  154. # like: WP51.INS
  155. !:ext ins
  156. # probably default directory name like: "C:\WP51\"
  157. >>>0x12 string >A "%.8s"
  158. # maybe mouse driver for WP5.1
  159. >>9 byte 42 WordPerfect Resource
  160. #!:mime application/octet-stream
  161. !:mime application/x-wordperfect-irs
  162. # like: STANDARD.IRS
  163. !:ext irs
  164. # like: "Mouse Driver (MOUSE.COM)"
  165. >>>0x28 string >A "%.24s"
  166. >>9 byte 43 WordPerfect settings file
  167. # maybe Macintosh WP2.0 document
  168. >>9 byte 44 WordPerfect 3.5 document
  169. !:mime application/vnd.wordperfect
  170. !:apple ????WPD3
  171. # like: WP3.wpd
  172. !:ext wpd
  173. >>9 byte 45 WordPerfect 4.2 document
  174. # External spell code module (WP5.1)
  175. #>>9 byte 46 WordPerfect external spell
  176. # external spell dictionary .LEX
  177. #>>9 byte 47 WordPerfect external spell dictionary
  178. # Macintosh SOFT graphics file (SOFT (Sequential Object Format)
  179. #>>9 byte 48 WordPerfect SOFT graphics
  180. #>>9 byte 49 reserved
  181. #>>9 byte 50 reserved
  182. # WPWin 5.1 Application Resource Library added for WPWin 5.1
  183. #>>9 byte 51 WordPerfect application resource library
  184. >>9 byte 69 WordPerfect dialog file
  185. # From: Joerg Jenderek
  186. # Note: found in sub directory WritingTools inside WordPerfect 2021 program directory
  187. >>9 byte 70 WordPerfect Writing Tools
  188. #!:mime application/octet-stream
  189. !:mime application/x-wordperfect-cbt
  190. # like: Wt13cbede.cbt Wt13cbeit.cbt Wt13cbefr.cbt WT21cbede.cbt Wt13cbeEN.CBD WT21cbeEN.CBD
  191. !:ext cbd/cbt
  192. >>9 byte 76 WordPerfect button bar
  193. >>9 default x
  194. >>>9 byte x Corel WordPerfect: Unknown filetype %d
  195. # Corel Shell
  196. >8 byte 2
  197. >>9 byte 1 Corel shell macro
  198. >>9 byte 10 Corel shell definition
  199. >>9 default x
  200. >>>9 byte x Corel Shell: Unknown filetype %d
  201. # Corel Notebook
  202. >8 byte 3
  203. >>9 byte 1 Corel Notebook macro
  204. >>9 byte 2 Corel Notebook help file
  205. >>9 byte 3 Corel Notebook keyboard file
  206. >>9 byte 10 Corel Notebook definition
  207. >>9 default x
  208. >>>9 byte x Corel Notebook: Unknown filetype %d
  209. # Corel Calculator
  210. >8 byte 4
  211. >>9 byte 2 Corel Calculator help file
  212. >>9 default x
  213. >>>9 byte x Corel Calculator: Unknown filetype %d
  214. # Corel File Manager
  215. >8 byte 5
  216. >>9 default x
  217. >>>9 byte x Corel File Manager: Unknown filetype %d
  218. # Corel Calendar
  219. >8 byte 6
  220. >>9 byte 2 Corel Calendar help file
  221. >>9 byte 10 Corel Calendar data file
  222. >>9 default x
  223. >>>9 byte x Corel Calendar: Unknown filetype %d
  224. # Corel Program Editor/Ed Editor
  225. >8 byte 7
  226. >>9 byte 1 Corel Editor macro
  227. >>9 byte 2 Corel Editor help file
  228. >>9 byte 3 Corel Editor keyboard file
  229. >>9 byte 25 Corel Editor macro resource file
  230. >>9 default x
  231. >>>9 byte x Corel Program Editor/Ed Editor: Unknown filetype %d
  232. # Corel Macro Editor
  233. >8 byte 8
  234. >>9 byte 1 Corel Macro editor macro
  235. >>9 byte 2 Corel Macro editor help file
  236. >>9 byte 3 Corel Macro editor keyboard file
  237. >>9 default x
  238. >>>9 byte x Corel Macro Editor: Unknown filetype %d
  239. # Corel Plan Perfect
  240. >8 byte 9
  241. >>9 default x
  242. >>>9 byte x Corel Plan Perfect: Unknown filetype %d
  243. # Corel DataPerfect
  244. >8 byte 10
  245. # CHECK: Don't these belong into product 9?
  246. >>9 byte 1 Corel PlanPerfect macro
  247. >>9 byte 2 Corel PlanPerfect help file
  248. >>9 byte 3 Corel PlanPerfect keyboard file
  249. >>9 byte 10 Corel PlanPerfect worksheet
  250. >>9 byte 15 Corel PlanPerfect printer definition
  251. >>9 byte 18 Corel PlanPerfect graphic definition
  252. >>9 byte 19 Corel PlanPerfect data
  253. >>9 byte 20 Corel PlanPerfect temporary printer
  254. >>9 byte 25 Corel PlanPerfect macro resource data
  255. >>9 default x
  256. >>>9 byte x Corel DataPerfect: Unknown filetype %d
  257. # Corel Mail
  258. >8 byte 11
  259. >>9 byte 2 Corel Mail help file
  260. >>9 byte 5 Corel Mail distribution list
  261. >>9 byte 10 Corel Mail out box
  262. >>9 byte 11 Corel Mail in box
  263. >>9 byte 20 Corel Mail users archived mailbox
  264. >>9 byte 21 Corel Mail archived message database
  265. >>9 byte 22 Corel Mail archived attachments
  266. >>9 default x
  267. >>>9 byte x Corel Mail: Unknown filetype %d
  268. # Corel Printer
  269. >8 byte 12
  270. >>9 byte 11 Corel Printer temporary file
  271. >>9 default x
  272. >>>9 byte x Corel Printer: Unknown filetype %d
  273. # Corel Scheduler
  274. >8 byte 13
  275. >>9 byte 2 Corel Scheduler help file
  276. >>9 byte 10 Corel Scheduler in file
  277. >>9 byte 11 Corel Scheduler out file
  278. >>9 default x
  279. >>>9 byte x Corel Scheduler: Unknown filetype %d
  280. # Corel WordPerfect Office
  281. >8 byte 14
  282. >>9 byte 10 Corel GroupWise settings file
  283. >>9 byte 17 Corel GroupWise directory services
  284. >>9 byte 43 Corel GroupWise settings file
  285. >>9 default x
  286. >>>9 byte x Corel WordPerfect Office: Unknown filetype %d
  287. # Corel DrawPerfect
  288. >8 byte 15
  289. >>9 default x
  290. >>>9 byte x Corel DrawPerfect: Unknown filetype %d
  291. # Corel LetterPerfect
  292. >8 byte 16
  293. >>9 default x
  294. >>>9 byte x Corel LetterPerfect: Unknown filetype %d
  295. # Corel Terminal
  296. >8 byte 17
  297. >>9 byte 10 Corel Terminal resource data
  298. >>9 byte 11 Corel Terminal resource data
  299. >>9 byte 43 Corel Terminal resource data
  300. >>9 default x
  301. >>>9 byte x Corel Terminal: Unknown filetype %d
  302. # Corel loadable file
  303. >8 byte 18
  304. >>9 byte 10 Corel loadable file
  305. >>9 byte 11 Corel GUI loadable text
  306. >>9 byte 12 Corel graphics resource data
  307. >>9 byte 13 Corel printer settings file
  308. >>9 byte 14 Corel port definition file
  309. >>9 byte 15 Corel print queue parameters
  310. >>9 byte 16 Corel compressed file
  311. >>9 default x
  312. >>>9 byte x Corel loadable file: Unknown filetype %d
  313. >>15 byte 0 \b, optimized for Intel
  314. >>15 byte 1 \b, optimized for Non-Intel
  315. # Network service
  316. >8 byte 20
  317. >>9 byte 10 Corel Network service msg file
  318. >>9 byte 11 Corel Network service msg file
  319. >>9 byte 12 Corel Async gateway login msg
  320. >>9 byte 14 Corel GroupWise message file
  321. >>9 default x
  322. >>>9 byte x Corel Network service: Unknown filetype %d
  323. # GroupWise
  324. >8 byte 31
  325. >>9 byte 20 GroupWise admin domain database
  326. >>9 byte 21 GroupWise admin host database
  327. >>9 byte 23 GroupWise admin remote host database
  328. >>9 byte 24 GroupWise admin ADS deferment data file
  329. >>9 default x
  330. >>>9 byte x GroupWise: Unknown filetype %d
  331. # Corel Writing Tools WT*.*
  332. # From: Joerg Jenderek
  333. # URL: https://support.corel.com/hc/en-us/articles/215876258-Writing-Tools-Spell-Check-Dictionary-does-not-work-in-WordPerfect-X5
  334. # http://wordperfect.helpmax.net/en/editing-and-formatting-documents/using-the-writing-tools/working-with-user-word-lists/
  335. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/u/uwl-wp.trid.xml
  336. >8 byte 32
  337. >>9 byte 10 Corel Writing Tools User Word List
  338. #!:mime application/octet-stream
  339. !:mime application/x-wordperfect-wordlist
  340. # personal user word list UWL under user directory like: WTDE.UWL WTUS.UWL WT21DE.UWL WT21US.UWL WT13DE.UWL ...
  341. # and "template" SAV/HWL variant under program directory like: wt13en.hwl Wt13de.sav Wt13it.sav wt13ru.sav WT21us.sav Wtcz.sav ...
  342. !:ext uwl/hwl/sav
  343. # jump to document area with some marker and word list
  344. >>>(4.l) ubyte x
  345. # look for beginning of word list starting mostly with letter a as UTF-16 like: Wt13es.sav
  346. # but not found in russian wt13ru.sav
  347. >>>>&0 search/91/sb a\0
  348. # word list starting like: "acsesory\022accessory.\001\026acomodate\026accommodate4\001"
  349. >>>>>&0 lestring16 x (...%-.33s...)
  350. # pointer to document area like: 200h
  351. >>>4 ulelong !0x200 \b, at %#x document area
  352. # file size, not including pad characters at EOF
  353. >>>0x14 uleshort x \b, %u bytes
  354. # IntelliTAG
  355. >8 byte 33
  356. >>9 byte 10 IntelliTAG (SGML) compiled DTD
  357. >>9 default x
  358. >>>9 byte x IntelliTAG: Unknown filetype %d
  359. # Summary: Corel WordPerfect WritingTools advise part
  360. # From: Joerg Jenderek
  361. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/adv-wp.trid.xml
  362. >8 byte 34
  363. >>9 byte 11 Corel WordPerfect dictionary advise
  364. #!:mime application/octet-stream
  365. !:mime application/x-wordperfect-adv
  366. #!:mime application/vnd.wordperfect.adv
  367. # like: WT21de.adv Wt13de.adv Wt13es.adv Wt13fr.adv wt13us.adv
  368. !:ext adv
  369. # advise text part often start with tag like: 580A
  370. #>>>(16.s) ubequad x ADVISE PART %#llx
  371. # part of advise text like: "This is too informal for most writing."
  372. >>>(16.s+16) string x (...%-.33s...)
  373. # everything else
  374. >8 default x
  375. >>8 byte x Unknown Corel/Wordperfect product %d,
  376. >>>9 byte x file type %d
  377. >10 byte 0 \b, v5.
  378. >10 byte !0 \b, v%d.
  379. >11 byte x \b%d
  380. # Hangul (Korean) Word Processor File
  381. 0 string HWP\ Document\ File Hangul (Korean) Word Processor File 3.0
  382. # CosmicBook, from Benoit Rouits
  383. 0 string CSBK Ted Neslson's CosmicBook hypertext file
  384. 2 string EYWR AmigaWriter file
  385. # chi: file(1) magic for ChiWriter files
  386. 0 string \\1cw\ ChiWriter file
  387. >5 string >\0 version %s
  388. 0 string \\1cw ChiWriter file
  389. # Quark Express from https://www.garykessler.net/library/file_sigs.html
  390. 2 string IIXPR3 Intel Quark Express Document (English)
  391. 2 string IIXPRa Intel Quark Express Document (Korean)
  392. 2 string MMXPR3 Motorola Quark Express Document (English)
  393. !:mime application/x-quark-xpress-3
  394. 2 string MMXPRa Motorola Quark Express Document (Korean)
  395. # From: Joerg Jenderek
  396. # URL: http://fileformats.archiveteam.org/wiki/PageMaker
  397. # https://en.wikipedia.org/wiki/Adobe_PageMaker
  398. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p
  399. # pm4-pagemaker.trid.xml
  400. # pm5-pagemaker.trid.xml
  401. # Note: since version 6 in 1995 called Adobe PageMaker and
  402. # embedded in Compound Document handled by ./ole2compounddocs
  403. # mainly tested little endian variant
  404. 4 ubelong =0x0000FF99
  405. >0 use PageMaker
  406. # big endian variant
  407. 4 ubelong =0x000099FF
  408. >0 use \^PageMaker
  409. # display information of Aldus/Adobe PageMaker document/publication
  410. 0 name PageMaker
  411. >110 uleshort <0x0600 Aldus
  412. >110 uleshort >0x05FF Adobe
  413. >110 uleshort x PageMaker
  414. # "MP" marker for newer version 4 and above according to TrID
  415. #>108 string x \b, MARKER "%.2s"
  416. # http://www.nationalarchives.gov.uk/pronom/fmt/876
  417. !:mime application/vnd.pagemaker
  418. #!:mime application/x-pagemaker
  419. # different file name extensions are used depending on version
  420. # older version like 3
  421. >110 uleshort/256 =0 document
  422. # https://www.macdisk.com/macsigen.php
  423. !:apple ALB3ALD3
  424. # PT3 for template and no example for PageMaker document/publiction with PM3 extension
  425. !:ext pm3/pt3
  426. >110 uleshort/256 =4 document
  427. !:apple ALD4ALB4
  428. # no example for PT4 template
  429. !:ext pm4/pt4
  430. >110 uleshort/256 =5 document
  431. !:apple ALD5ALB5
  432. # no example for PT5 template
  433. !:ext pm5/pt5
  434. >110 uleshort =0x0600 document
  435. !:apple ALD6ALB6
  436. # PT6 for template
  437. !:ext pm6/pt6
  438. # HOWTO to distinguish version 7 from 6.5 ?
  439. >110 uleshort =0x0632 document
  440. !:apple AD65AB65
  441. # no example for T65 template
  442. !:ext p65/t65/pmd/pmt
  443. # version 7 with PMT extension for template
  444. #!:ext pmd/pmt
  445. #!:apple ????PUBF
  446. # endian marker FF 99 for little endian
  447. >6 ubyte =0xFF \b, little-endian
  448. >6 ubyte =0x99 \b, big-endian
  449. # newer numeric version like: 4 5 6 6.50
  450. #>110 uleshort x \b, VERSION=%#x
  451. >110 uleshort >0x03FF
  452. >>110 uleshort/256 x \b, version %u
  453. >>110 uleshort%256 >0 \b.%u
  454. # older version like 3
  455. >110 uleshort <0x0400 \b, maybe version 3
  456. # adobe indesign (document, whatever...) from querkan
  457. 0 belong 0x0606edf5 Adobe InDesign
  458. >16 string DOCUMENT Document
  459. #------------------------------------------------------------------------------
  460. # ichitaro456: file(1) magic for Just System Word Processor Ichitaro
  461. #
  462. # Contributor kenzo-:
  463. # Reversed-engineered JS Ichitaro magic numbers
  464. #
  465. 0 string DOC
  466. >43 byte 0x14 Just System Word Processor Ichitaro v4
  467. !:mime application/x-ichitaro4
  468. >144 string JDASH application/x-ichitaro4
  469. 0 string DOC
  470. >43 byte 0x15 Just System Word Processor Ichitaro v5
  471. !:mime application/x-ichitaro5
  472. 0 string DOC
  473. >43 byte 0x16 Just System Word Processor Ichitaro v6
  474. !:mime application/x-ichitaro6
  475. # Type: Freemind mindmap documents
  476. # From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
  477. 0 string/w \<map\ version Freemind document
  478. !:mime application/x-freemind
  479. # Type: Freeplane mindmap documents
  480. # From: Felix Natter <fnatter@gmx.net>
  481. 0 string/w \<map\ version="freeplane Freeplane document
  482. !:mime application/x-freeplane
  483. # Type: Scribus
  484. # From: Werner Fink <werner@suse.de>
  485. 0 string \<SCRIBUSUTF8\ Version Scribus Document
  486. 0 string \<SCRIBUSUTF8NEW\ Version Scribus Document
  487. !:mime application/x-scribus
  488. # help files .hlp compiled from html and used by gfxboot added by Joerg Jenderek
  489. # markups page=0x04,label=0x12, followed by strings like "opt" or "main" and title=0x14
  490. 0 ulelong&0x8080FFFF 0x00001204 gfxboot compiled html help file
  491. # From: Joerg Jenderek
  492. # URL: https://en.wikipedia.org/wiki/StarOffice
  493. # Reference: http://mark0.net/download/triddefs_xml.7z
  494. # /defs/t/thm-staroffice.trid.xml
  495. # Note: used in Star-, Open- and Libre-Office
  496. # named as soffice.StarConfigFile.6 or OpenOffice.org configuration by others
  497. 0 ubeshort 0x0400
  498. # non nil gap
  499. #>(2.s+8) ubequad x \b, gap %#16.16llx
  500. # test for null value in gap after theme name maybe unreliable
  501. #>(2.s+9) ubyte 0 \b, 0-byte
  502. # look for keyword GALRESRV near the end
  503. # "C:\Program Files (x86)\StarOffice6.0\share\gallery\sg27.thm" Navigation, 238 objects
  504. #>0 search/8415 GALRESRV \b, GALRESRV found
  505. # "neues thema6.thm" MorePictures, 315 objects
  506. #>0 search/19299 GALRESRV \b, GALRESRV FOUND
  507. #>2 uleshort x \b, name length %u
  508. # skip file2147.chk by check for positive name length like for sg16.thm "3D"
  509. >2 uleshort >0
  510. # skip dBase printer form T6.PRF with misidentified gallery
  511. # name :\DBASE\IV\T6.txts by check for 1st object name or RESRV keyword
  512. # https://www.clicketyclick.dk/databases/xbase/xbase/dbase_ex.zip
  513. # template/t6/with_data/T6.PRF
  514. # by first char of object name or RESRV part of keyword GALRESRV
  515. >>(2.s+13) ubyte >0x1F StarOffice Gallery theme
  516. !:mime application/x-stargallery-thm
  517. # thm is also used for JPEG thumbnail images
  518. !:ext thm
  519. # gallery name often 1 word like: 3D sounds Diagrams Flussdiagramme Fotos
  520. # or like private://gallery/hidden/imgppt "Cisco - WAN - LAN"
  521. >>>2 pstring/h x %s
  522. # number of objects
  523. >>>(2.s+4) ulelong x \b, %u object
  524. # plural s
  525. >>>(2.s+4) ulelong !1 \bs
  526. # if available then display first object name
  527. >>>(2.s+4) ulelong >0
  528. # partial file name, URL or internal name like "dd2*" of 1st object or RESRV
  529. >>>>(2.s+11) pstring/h x \b, 1st %s
  530. # From: Joerg Jenderek
  531. # URL: http://fileformats.archiveteam.org/wiki/StarOffice_Gallery
  532. # Note: used in Star-, Open- and Libre-Office and found in directories like
  533. # %APPDATA%\Roaming\LibreOffice\4\user\gallery
  534. # $HOME/.config/libreoffice/4/user/gallery
  535. 0 string SGA3 StarOffice Gallery thumbnails
  536. # Unknown like 0x04000?0001000142
  537. #>4 ubequad x \b, UNKNOWN %#16.16llx
  538. #!:mime application/x-sdg
  539. !:mime application/x-stargallery-sdg
  540. !:ext sdg
  541. # display image magic for debugging purpose like 'BM'
  542. # looking like PC bitmap, Windows 3.x format with unknown compression
  543. #>11 string x \b, image magic '%-.2s'
  544. # inspect 1st GALLERY thumbnail magic by ./images with 1 space at end
  545. #>11 indirect x \b; contains