head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC5:1.1.1.1
	FILE5_48:1.1.1.1
	netbsd-11-0-RC4:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	perseant-exfatfs-base-20250801:1.1.1.1
	netbsd-11:1.1.1.1.0.10
	netbsd-11-base:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	perseant-exfatfs-base-20240630:1.1.1.1
	perseant-exfatfs:1.1.1.1.0.8
	perseant-exfatfs-base:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	FILE5_45:1.1.1.1
	netbsd-10:1.1.1.1.0.6
	netbsd-10-base:1.1.1.1
	FILE5_43:1.1.1.1
	cjep_sun2x-base1:1.1.1.1
	cjep_sun2x:1.1.1.1.0.4
	cjep_sun2x-base:1.1.1.1
	cjep_staticlib_x-base1:1.1.1.1
	cjep_staticlib_x:1.1.1.1.0.2
	cjep_staticlib_x-base:1.1.1.1
	FILE5_40:1.1.1.1
	FILE5_39:1.1.1.1
	CHRISTOS:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2020.06.15.00.18.48;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	HMbuXSjPojU5LfcC;

1.1.1.1
date	2020.06.15.00.18.48;	author christos;	state Exp;
branches;
next	;
commitid	HMbuXSjPojU5LfcC;


desc
@@


1.1
log
@Initial revision
@
text
@
#------------------------------------------------------------------------------
# $File: dif,v 1.1 2020/04/09 19:14:01 christos Exp $
# dif:  file(1) magic for DIF text files

#------------------------------------------------------------------------------
# From:	Joerg Jenderek
# URL:	http://en.wikipedia.org/wiki/Data_Interchange_Format
#	http://fileformats.archiveteam.org/wiki/Data_Interchange_Format
# Note:	called by TrID "Data Interchange Format",
#	by DROID x-fmt/368 "VisiCalc Database"
0	string		TABLE
# skip text starting with TABLE by looking for numeric version on 2nd line
>6	search/2	0,
# skip DROID x-fmt-41-signature-id-380.dif by looking for key word TUPLES at the beginning
>>27	search/128	TUPLES		Data Interchange Format
# https://www.pcmatic.com/company/libraries/fileextension/detail.asp?ext=dif.html
#!:mime	application/x-dif-spreadsheet	Gnumeric
# https://github.com/LibreOffice/online/blob/master/discovery.xml
#!:mime	application/x-dif-document	LibreOffice
# https://www.wikidata.org/wiki/Wikidata:WikiProject_Informatics/File_formats/Lists/File_formats
!:mime	application/x-dif
# https://extension.nirsoft.net/dif
#!:mime	application/vnd.ms-excel
#!:mime	text/plain
!:ext	dif
# look for double quote 0x22 on 3rd line
>>>10	search/3	"
# skip if next character also double quote 
>>>>&0	ubyte		!0x22		\b, generator or table name
# comment like EXCEL, pwm enclosed in double quotes
>>>>>&-2	string	x		%s

@


1.1.1.1
log
@Import 5.39:

   * Remove unused subtype_mime (Steve Grubb)
   * Remove unused check in okstat (Steve Grubb)
   * Fix mime-type in elf binaries by making sure $x is set
   * Fix indirect negative offsets broken by OFFNEGATIVE
   * Fix GUID equality check
   * PR/165: Handle empty array and strings in JSON
   * PR/162: Add --exclude-quiet
   * Fix memory leak in ascmagic (Steve Grubb)
   * Fix string comparison length with ignore whitespace
   * Fix mingwin 64 compilation
   * PR/159: whitelist getpid needed for file_pipe2file()
   * Indicate negative offsets with a flag OFFNEGATIVE
     so that -0 works.
   * Introduce "offset" magic type that can be used to
     detect the file size, and bail on short files.
   * document DER better in the magic man page.
   * fix memory leaks (SonarQube)
   * rewrite confusing loops (SonarQube)
   * fix bogus test (SonarQube)
   * pass a sized buffer to file_fmttime() (SonarQube)
   * Don't allow * in printf formats, or the code itself (Christoph Biedl)
   * Introduce a printf output size checker to avoid DoS attacks
   * Avoid memory leak on error (oss-fuzz)
   * Check length of string on DER before derefercing and add new types
   * Add missing DER string (oss-fuzz)
   * Add missing DER types, and debugging
   * PR/140: Avoid abort with hand-crafted magic file (gockelhahn)
   * PR/139:  Avoid DoS in printf with hand-crafted magic file (gockelhahn)
   * PR/138: Avoid crash with hand-crafted magic file (gockelhahn)
   * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine)
   * add guid support native support via the "guid" type.
@
text
@@
