[File] [PATCH] of Magdir/msdos Norton Commander module Message *.msg; Guide *.ng

Jörg Jenderek joerg.jen.der.ek at gmx.net
Tue Sep 1 12:36:44 UTC 2020

Hash: SHA1

some days ago i handled OS/2 help message *.msg.

Just for interest i look on my disc for other files with that file
name extensions. Some are described as "data" by file command
version 5.39.

Some are only found in directory where the Norton Commander was
installed. So i know that such MSG samples are part of Norton
Commander suite.

For most MSG example exist a DOS executable with same main name and
file name extension EXE. The message file is used by executable to
display text messages. If the message file is missing the
corresponding program complains with "Unable to read message file".

For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). This describes
such samples as Norton Commander module message (ENG) by definition
file msg-nc-eng.trid.xml. So i add this reference as comment line
inside Magdir/msdos by line like:
 # Ref: mark0.net/download/triddefs_xml.7z/defs/m/msg-nc-eng.trid.xml

It also list the used file name extension msg and with -v option the
related URL pointing to Norton Commander page on Wikipedia. This is
now expressed by additional comment line like
 # URL:		https://en.wikipedia.org/wiki/Norton_Commander

Characteristic for such message files is a typical ASCII phrase like
Abort or Aborting like in NCVIEW.MSG at the beginning. That is
expressed inside Magdir/msdos by magic line like
 0 string	Abort

To skip ASCII Abort texts i look for specific error message like in
sample NCVIEW.MSG. That second test line is like:
 >6 search/7089	Non-DOS\ disk	Norton Commander module message

Afterwards show file name extension and a user defined mime type by
additional lines like:
 !:mime	application/x-norton-msg
 !:ext	msg
The messages seems to be separated by null bytes. Therefore such file
are not considered as ASCII text by file command.

I have only tested with Norton Commander versions DOS 5.50 English
and PACKER.MSG of Windows 2.01 version. So i mention these facts in
comment line.
The German version of MSG files are not matched because the start
with German word "Abbrechen" instead English "Abort".

I have inserted Norton MSG files after Norton Guide which are
recognised by lines like:
 0	string		NG\0\001
 >2	ulelong		0x00000100	Norton Guide
For Guide examples no mime type and file name extension are shown.
So show user defined mime type and possible file name extensions by
additional lines like:
 !:mime	application/x-norton-guide
 !:ext	ng/hlp

After applying the above mentioned modifications by patch
file-5.39-msdos-norton.diff all Norton MSG samples are now
recognized like:

NC.EXE:     MS-DOS executable
NC.HLP:     Norton Guide "NC 5.5 Help a",
            Copyright (C) 1986 to 1998,
            Symantec Inc. July 1, 1998
NC.MSG:     Norton Commander module message
NCDD.EXE:   MS-DOS executable
NCDD.MSG:   Norton Commander module message
NCEDIT.EXE: MS-DOS executable
NCEDIT.MSG: Norton Commander module message
NCFF.EXE:   MS-DOS executable
NCFF.MSG:   Norton Commander module message
NCNET.EXE:  MS-DOS executable
NCNET.MSG:  Norton Commander module message
NCSF.EXE:   MS-DOS executable
NCSF.MSG:   Norton Commander module message
NCSI.EXE:   MS-DOS executable
NCSI.MSG:   Norton Commander module message
NCVIEW.MSG: Norton Commander module message
NCZIP.EXE:  MS-DOS executable
NCZIP.MSG:  Norton Commander module message
PACKER.EXE: MS-DOS executable
PACKER.MSG: Norton Commander module message

I hope my diff file can be applied in future version of file utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek

Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

-------------- next part --------------
--- file-5.39/magic/Magdir/msdos.old	2020-05-31 10:34:40 +0000
+++ file-5.39/magic/Magdir/msdos	2020-09-01 12:21:34 +0000
@@ -1165,15 +1165,31 @@
 # https://en.wikipedia.org/wiki/Norton_Guides
 0	string		NG\0\001
 # only value 0x100 found at offset 2
 >2	ulelong		0x00000100	Norton Guide
+!:mime	application/x-norton-guide
+# often like NORTON.NG but some times like NC.HLP
+!:ext	ng/hlp
 # Title[40]
 >>8	string		>\0		"%-.40s"
 #>>6	uleshort	x		\b, MenuCount=%u
 # szCredits[5][66]
 >>48	string		>\0		\b, %-.66s
 >>114	string		>\0		%-.66s
+# URL:		https://en.wikipedia.org/wiki/Norton_Commander
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/m/msg-nc-eng.trid.xml
+# From:		Joerg Jenderek
+# Note:		Message file is used by executable with same main name.
+#		Only tested with version 5.50 (english) and 2.01 (Windows)
+0	string		Abort
+# \0 or i
+#>5	ubyte		x		%x
+# skip ASCII Abort text by looking for error message like in NCVIEW.MSG
+>6	search/7089	Non-DOS\ disk	Norton Commander module message
+!:mime	application/x-norton-msg
+!:ext	msg
 # 4DOS help (.HLP) files added by Joerg Jenderek from source TPHELP.PAS
 # of https://www.4dos.info/
 # pointer,HelpID[8]=4DHnnnmm
 0	ulelong	0x48443408		4DOS help file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.39-msdos-norton.diff.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20200901/f7903df6/attachment.obj>

More information about the File mailing list