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