xref: /freebsd/contrib/file/magic/Magdir/dif (revision 1f40866feb2135a4cf764a07b1b90a8a3398ff0a)
1
2#------------------------------------------------------------------------------
3# $File: dif,v 1.1 2020/04/09 19:14:01 christos Exp $
4# dif:  file(1) magic for DIF text files
5
6#------------------------------------------------------------------------------
7# From:	Joerg Jenderek
8# URL:	http://en.wikipedia.org/wiki/Data_Interchange_Format
9#	http://fileformats.archiveteam.org/wiki/Data_Interchange_Format
10# Note:	called by TrID "Data Interchange Format",
11#	by DROID x-fmt/368 "VisiCalc Database"
120	string		TABLE
13# skip text starting with TABLE by looking for numeric version on 2nd line
14>6	search/2	0,
15# skip DROID x-fmt-41-signature-id-380.dif by looking for key word TUPLES at the beginning
16>>27	search/128	TUPLES		Data Interchange Format
17# https://www.pcmatic.com/company/libraries/fileextension/detail.asp?ext=dif.html
18#!:mime	application/x-dif-spreadsheet	Gnumeric
19# https://github.com/LibreOffice/online/blob/master/discovery.xml
20#!:mime	application/x-dif-document	LibreOffice
21# https://www.wikidata.org/wiki/Wikidata:WikiProject_Informatics/File_formats/Lists/File_formats
22!:mime	application/x-dif
23# https://extension.nirsoft.net/dif
24#!:mime	application/vnd.ms-excel
25#!:mime	text/plain
26!:ext	dif
27# look for double quote 0x22 on 3rd line
28>>>10	search/3	"
29# skip if next character also double quote
30>>>>&0	ubyte		!0x22		\b, generator or table name
31# comment like EXCEL, pwm enclosed in double quotes
32>>>>>&-2	string	x		%s
33
34