素晴らしいファイル形式

素晴らしいファイル形式

~からマジックファイル形式マニュアルルールの形式は次のとおりです。

offset type value message

たとえば、

0      string   MZ
>0x18  leshort  <0x40   MS-DOS executable
>0x18  leshort  >0x3f   extended PC executable (e.g., MS Windows)

このコンテキストを使ってマジックファイルを理解しようとしています。これ同様のルールがあります。

# DIY-Thermocam raw data
0   name    diy-thermocam-parser
>0  beshort x   scale %d-

最初のルールは何を意味しますか?少なくともマニュアルページで判断すると、名前は有効な型ではありません。そしてテストコンポーネントはありません。

ベストアンサー1

見ているマンページは、見ているソフトウェアのバージョンには適していません。

docgithubのサイトディレクトリのマンページには次のように記載されています。

          name        Define a ``named'' magic instance that can be called
                      from another use magic entry, like a subroutine
                      call.  Named instance direct magic offsets are rela-
                      tive to the offset of the previous matched entry,
                      but indirect offsets are relative to the beginning
                      of the file as usual.  Named magic entries always
                      match.

おすすめ記事