[File] [PATCH] of Magdir/wordprocessors Star/Libre-Office Gallery theme misidentified T6.PRF

Christos Zoulas christos at zoulas.com
Sat Aug 21 12:45:50 UTC 2021


Committed, thanks!

christos

> On Aug 20, 2021, at 3:38 AM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> Hello,
> 
> some days ago i inspected some dBase examples. Now i looked at dBase
> examples with PRF extension together with StarOffice/Libre-Office
> Gallery themes with THM file name extension.
> 
> When running running file command version 5.40 on such examples and
> related files i get an output like:
> 
> diagrams.thm:     StarOffice Gallery theme
> 		  Diagrams, 59 objects,
> 		  1st dd2343
> file2147.chk:     data
> neues thema6.thm: StarOffice Gallery theme
>         	  MorePictures, 315 objects,
> 		  1st file:///C:/Users/joerg/Pictures/
> 		  1999_1024_23_Tikal.jpg
> sg13.thm:         StarOffice Gallery theme
> 		  Flussdiagramme, 18 objects,
> 		  1st dd2037
> sg16.thm:         StarOffice Gallery theme
> 		  3D, 12 objects,
> 		  1st dd2066
> sg27.thm:         StarOffice Gallery theme
> 		  Navigation, 238 objects,
> 		  1st /navi%2D2d/wh%5Fup.gif
> sg30.thm:         StarOffice Gallery theme
> 		  private://gallery/hidden/usersounds, 0 objects
> sg33.thm:         StarOffice Gallery theme
> 		  Problemlösungen, 72 objects,
> 		  1st /troubleshooting/question-mark_blue.wmf
> sg601.thm:        StarOffice Gallery theme
> 		  Cisco - WAN - LAN, 33 objects,
> 		  1st dd2194
> sounds.thm:       StarOffice Gallery theme
> 		  sounds, 35 objects,
> 		  1st /sounds/apert2.wav
> symbolshapes.thm: StarOffice Gallery theme
> 		  private://gallery/hidden/imgppt, 45 objects,
> 		  1st dd2075
> T6.PRF:           StarOffice Gallery theme
> 		  :\DBASE\IV\T6.txts
> 
> For comparison reason i run the file format identification utility
> TrID ( See https://mark0.net/soft-trid-e.html). This describes these
> examples as "StarOffice Gallery theme" by definition
> thm-staroffice.trid.xml and does not misidentifies dBase T6.PRF
> example (See appended thm_office-trid-v.txt.gz)
> 
> TrID uses another method to identify files. So i add the TrID
> definition as URL by comment lines. This is now expressed by
> additional lines inside Magdir/wordprocessors like:
> # Reference:	http://mark0.net/download/triddefs_xml.7z
> #		/defs/t/thm-staroffice.trid.xml
> 
> The identification happen inside Magdir/wordprocessors by 2 starting
> test lines like:
> 0		ubeshort	0x0400
> >2		uleshort	>0	StarOffice Gallery theme
> By second test for positive length of gallery name a misidentified
> example file2147.chk was skipped.
> Later this gallery name is shown by line like:
> >> 2		pstring/h	x		%s
> This is typically one word (like 3D sounds Diagrams Flussdiagramme
> Fotos) or sometimes more words ( like "Cisco - WAN - LAN" ) or
> URL-like private://gallery/hidden/imgppt.
> 
> For misidentified dBase printer form T6.PRF ":\DBASE\IV\T6.txts" is
> shown as Gallery name. That file is found in Erik Bachmann dBase
> example archive dbase_ex.zip. But in reality this is part of the
> dBase printer output DOS file name "E:\DBASE\IV\T6.txt". So a third
> test is needed to avoid misidentification of this dBase example.
> 
> Later the number of Gallery objects and the name of first object is
> shown by lines like:
> >>(2.s+4)	ulelong		x		\b, %u object
> >>(2.s+4)	ulelong		>0
> >>>(2.s+11)	pstring/h	x		\b, 1st %s
> 
> For debugging purpose this last thing can also be done by additional
> lines like:
> >>(2.s+13)	string	x \b, possible OBEJECT NAME "%s"
> >>(2.s+13)	ubyte   x \b, 1st CHAR %c of possible OBJECT NAME
> 
> For examples with positive object numbers again the first object name
> and the first character of it is shown. But for examples with zero
> objects also something is shown. That seems to be always the string
> RESRV of keyword GALRESRV.
> 
> So i skipped bad example T6.PRF by check of first character  of
> object name or RESRV string as third test line like:
>>> (2.s+13)	ubyte		>0x1F	StarOffice Gallery theme
> 
> After applying the above mentioned modifications by patch
> file-5.40-wordprocessors-thm.diff then such Office THM examples are
> still described but misidentification of others vanish like:
> 
> diagrams.thm:     StarOffice Gallery theme
> 		  Diagrams, 59 objects,
> 		  1st dd2343
> file2147.chk:     data
> neues thema6.thm: StarOffice Gallery theme
>       		  MorePictures, 315 objects,
> 		  1st file:///C:/Users/joerg/Pictures/
> 		  1999_1024_23_Tikal.jpg
> sg13.thm:         StarOffice Gallery theme
> 		  Flussdiagramme, 18 objects,
> 		  1st dd2037
> sg16.thm:         StarOffice Gallery theme
> 		  3D, 12 objects,
> 		  1st dd2066
> sg27.thm:         StarOffice Gallery theme
> 		  Navigation, 238 objects,
> 		  1st /navi%2D2d/wh%5Fup.gif
> sg30.thm:         StarOffice Gallery theme
> 		  private://gallery/hidden/usersounds, 0 objects
> sg33.thm:         StarOffice Gallery theme
> 		  Problemlösungen, 72 objects,
> 		  1st /troubleshooting/question-mark_blue.wmf
> sg601.thm:        StarOffice Gallery theme
> 		  Cisco - WAN - LAN, 33 objects,
> 		  1st dd2194
> sounds.thm:       StarOffice Gallery theme
> 		  sounds, 35 objects,
> 		  1st /sounds/apert2.wav
> symbolshapes.thm: StarOffice Gallery theme
> 		  private://gallery/hidden/imgppt, 45 objects,
> 		  1st dd2075
> T6.PRF:           data
> 
> I hope my diff file can be applied in future version of file utility.
> 
> I will try to create magic lines for dBase PRN examples in a future
> session.
> 
> With best wishes
> Jörg Jenderek
> --
> Jörg Jenderek
> 
> <thm_office-trid-v.txt.gz><file-5_40-wordprocessors-thm_diff.DEFANGED-0><file-5_40-wordprocessors-thm_diff_sig.DEFANGED-1>--
> 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/20210821/0ee68b9a/attachment.asc>


More information about the File mailing list