head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.3
	netbsd-11-0-RC3:1.1.1.3
	netbsd-11-0-RC2:1.1.1.3
	netbsd-11-0-RC1:1.1.1.3
	perseant-exfatfs-base-20250801:1.1.1.3
	netbsd-11:1.1.1.3.0.6
	netbsd-11-base:1.1.1.3
	netbsd-10-1-RELEASE:1.1.1.3
	perseant-exfatfs-base-20240630:1.1.1.3
	perseant-exfatfs:1.1.1.3.0.4
	perseant-exfatfs-base:1.1.1.3
	netbsd-9-4-RELEASE:1.1.1.2
	netbsd-10-0-RELEASE:1.1.1.3
	netbsd-10-0-RC6:1.1.1.3
	netbsd-10-0-RC5:1.1.1.3
	netbsd-10-0-RC4:1.1.1.3
	netbsd-10-0-RC3:1.1.1.3
	netbsd-10-0-RC2:1.1.1.3
	netbsd-10-0-RC1:1.1.1.3
	FILE5_45:1.1.1.3
	netbsd-10:1.1.1.3.0.2
	netbsd-10-base:1.1.1.3
	FILE5_43:1.1.1.3
	netbsd-9-3-RELEASE:1.1.1.2
	cjep_sun2x-base1:1.1.1.2
	cjep_sun2x:1.1.1.2.0.10
	cjep_sun2x-base:1.1.1.2
	cjep_staticlib_x-base1:1.1.1.2
	netbsd-9-2-RELEASE:1.1.1.2
	cjep_staticlib_x:1.1.1.2.0.8
	cjep_staticlib_x-base:1.1.1.2
	FILE5_40:1.1.1.2
	netbsd-9-1-RELEASE:1.1.1.2
	FILE5_39:1.1.1.2
	phil-wifi-20200421:1.1.1.2
	phil-wifi-20200411:1.1.1.2
	is-mlppp:1.1.1.2.0.6
	is-mlppp-base:1.1.1.2
	phil-wifi-20200406:1.1.1.2
	netbsd-9-0-RELEASE:1.1.1.2
	netbsd-9-0-RC2:1.1.1.2
	FILE5_38:1.1.1.2
	netbsd-9-0-RC1:1.1.1.2
	phil-wifi-20191119:1.1.1.2
	netbsd-9:1.1.1.2.0.4
	netbsd-9-base:1.1.1.2
	phil-wifi:1.1.1.2.0.2
	phil-wifi-20190609:1.1.1.2
	FILE5_37:1.1.1.2
	pgoyette-compat-merge-20190127:1.1.1.1.2.2
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat:1.1.1.1.0.2
	pgoyette-compat-1020:1.1.1.1
	FILE5_35:1.1.1.1
	CHRISTOS:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2018.10.18.23.54.09;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	e8WctwerBeEm4vWA;

1.1.1.1
date	2018.10.18.23.54.09;	author christos;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;
commitid	e8WctwerBeEm4vWA;

1.1.1.2
date	2019.05.22.17.19.57;	author christos;	state Exp;
branches
	1.1.1.2.2.1;
next	1.1.1.3;
commitid	VXeNRYYruN1MWdoB;

1.1.1.3
date	2022.09.24.20.07.54;	author christos;	state Exp;
branches;
next	;
commitid	Nf6F9kcpc0EPC9VD;

1.1.1.1.2.1
date	2018.10.18.23.54.09;	author pgoyette;	state dead;
branches;
next	1.1.1.1.2.2;
commitid	mTSoqZEZ4arHnFWA;

1.1.1.1.2.2
date	2018.10.20.06.58.20;	author pgoyette;	state Exp;
branches;
next	;
commitid	mTSoqZEZ4arHnFWA;

1.1.1.2.2.1
date	2019.05.22.17.19.57;	author christos;	state dead;
branches;
next	1.1.1.2.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.2.2.2
date	2019.06.10.21.44.46;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;


desc
@@


1.1
log
@Initial revision
@
text
@
#------------------------------------------------------------------------------
# $File: dataone,v 1.1 2018/06/06 01:16:40 christos Exp $
#
# DataONE- files from Dave Vieglais <dave.vieglais@@gmail.com> &
#                     Pratik Shrivastava <pratikshrivastava23@@gmail.com>
#
# file formats:   https://cn.dataone.org/cn/v2/formats
#------------------------------------------------------------------------------

# EML (Ecological Metadata Language Format)
0	string	<?xml
>&0	regex	(eml)-[0-9].[0-9].[0-9]+	eml://ecoinformatics.org/%s

# onedcx (DataONE Dublin Core Extended v1.0)
>&0	regex	(onedcx/v)[0-9].[0-9]+		http://ns.dataone.org/metadata/schema/onedcx/v1.0

# FGDC-STD-001-1998 (Content Standard for Digital Geospatial Metadata,
# version 001-1998)
>&0	regex	fgdc				FGDC-STD-001-1998

# Mercury (Oak Ridge National Lab Mercury Metadata version 1.0)
>&0	regex	(mercury/terms/v)[0-9].[0-9]	http://purl.org/ornl/schema/mercury/terms/v1.0

# ISOTC211 (Geographic MetaData (GMD) Extensible Markup Language)
>&0	regex	isotc211
>>&0	regex	eng;USA				http://www.isotc211.org/2005/gmd

# ISOTC211 (NOAA Variant Geographic MetaData (GMD) Extensible Markup Language)
>>&0	regex	gov.noaa.nodc:[0-9]+		http://www.isotc211.org/2005/gmd-noaa

# ISOTC211 PANGAEA Variant Geographic MetaData (GMD) Extensible Markup Language
>>&0	regex	pangaea.dataset[0-9][0-9][0-9][0-9][0-9][0-9]+	http://www.isotc211.org/2005/gmd-pangaea
!:mime	text/xml


# Object Reuse and Exchange Vocabulary
0	string	<?xml
>&0	regex	rdf
>>&0	regex	openarchives	http://www.openarchives.org/ore/terms
!:mime application/rdf+xml


# Dryad Metadata Application Profile Version 3.1
0	string	<DryadData
>&0	regex	(dryad-bibo/v)[0-9].[0-9]	http://datadryad.org/profile/v3.1
!:mime	text/xml
@


1.1.1.1
log
@2018-10-18  19:32  Christos Zoulas <christos@@zoulas.com>

	* release 5.35

2018-09-10  20:38  Christos Zoulas <christos@@zoulas.com>

	* Add FreeBSD ELF core file support (John Baldwin)

2018-08-20  18:40  Christos Zoulas <christos@@zoulas.com>

	* PR/30: Allow all parameter values to be set (don't treat 0 specially)
	* handle default annotations on the softmagic match instead at the
	  end.

2018-07-25  10:17  Christos Zoulas <christos@@zoulas.com>

	* PR/23: Recognize JSON files

2018-07-25  10:17  Christos Zoulas <christos@@zoulas.com>

	* PR/18: file --mime-encoding should not print mime-type

2018-07-25   8:50  Christos Zoulas <christos@@zoulas.com>

	* release 5.34

2018-06-22  16:38  Christos Zoulas <christos@@zoulas.com>

	* Add Quad indirect offsets

2018-05-24  14:10  Christos Zoulas <christos@@zoulas.com>

	* Enable parsing of ELF dynamic sections to handle PIE better
@
text
@@


1.1.1.2
log
@2019-05-14  22:26  Christos Zoulas <christos@@zoulas.com>

	* release 5.37

2019-05-09  22:27  Christos Zoulas <christos@@zoulas.com>

	* Make sure that continuation separators are printed
	  with -k within softmagic

2019-05-06  22:27  Christos Zoulas <christos@@zoulas.com>

	* Change SIGPIPE saving and restoring during compression to use
	  sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko)
	* Cache stat(2) calls more to reduce number of calls (Denys Vlasenko)

2019-05-06  17:25  Christos Zoulas <christos@@zoulas.com>

	* PR/77: Handle --mime-type and -k correctly.

2019-05-03  15:26  Christos Zoulas <christos@@zoulas.com>

	* Switch decompression code to use vfork() because
	  tools like rpmdiff and rpmbuild call libmagic
	  with large process footprints (Denys Vlasenko)

2019-04-07  14:05  Christos Zoulas <christos@@zoulas.com>

	* PR/75: --enable-zlib, did not work.

2019-02-27  11:54  Christos Zoulas <christos@@zoulas.com>

	* Improve regex efficiency (Michael Schroeder) by:
		1. Prefixing regex searches with regular search
		   for keywords where possible
		2. Using memmem(3) where available
@
text
@d3 1
a3 1
# $File: dataone,v 1.2 2019/04/19 00:42:27 christos Exp $
d16 1
a16 1
>&0	regex	(onedcx/v)[0-9].[0-9]+		https://ns.dataone.org/metadata/schema/onedcx/v1.0
d23 1
a23 1
>&0	regex	(mercury/terms/v)[0-9].[0-9]	https://purl.org/ornl/schema/mercury/terms/v1.0
d27 1
a27 1
>>&0	regex	eng;USA				https://www.isotc211.org/2005/gmd
d30 1
a30 1
>>&0	regex	gov.noaa.nodc:[0-9]+		https://www.isotc211.org/2005/gmd-noaa
d33 1
a33 1
>>&0	regex	pangaea.dataset[0-9][0-9][0-9][0-9][0-9][0-9]+	https://www.isotc211.org/2005/gmd-pangaea
d40 1
a40 1
>>&0	regex	openarchives	https://www.openarchives.org/ore/terms
d46 1
a46 1
>&0	regex	(dryad-bibo/v)[0-9].[0-9]	https://datadryad.org/profile/v3.1
@


1.1.1.3
log
@Import file-5.43+; last was file-5.40

2022-09-20  17:12  Christos Zoulas <christos@@zoulas.com>

	* fixed various clustefuzz issues

2022-09-19  15:54  Christos Zoulas <christos@@zoulas.com>

	* Fix error detection for decompression code (Vincent Mihalkovic)

2022-09-15  13:50  Christos Zoulas <christos@@zoulas.com>

	* Add MAGIC_NO_COMPRESS_FORK and use it to produce a more
	  meaningful error message if we are sandboxing.

2022-09-15  10:45  Christos Zoulas <christos@@zoulas.com>

	* Add built-in lzip decompression support (Michal Gorny)

2022-09-14  10:35  Christos Zoulas <christos@@zoulas.com>

	* Add built-in zstd decompression support (Martin Rodriguez Reboredo)

2022-09-13  14:55  Christos Zoulas <christos@@zoulas.com>

	* release 5.43

2022-09-10   9:17  Christos Zoulas <christos@@zoulas.com>

	* Add octal indirect magic (Michal Gorny)

2022-08-17  11:43  Christos Zoulas <christos@@zoulas.com>

	* PR/374: avoid infinite loop in non-wide code (piru)
	* PR/373: Obey MAGIC_CONTINUE with multiple magic files (vismarli)

2022-07-26  11:10  Christos Zoulas <christos@@zoulas.com>

	* Fix bug with large flist (Florian Weimer)

2022-07-07  13:21  Christos Zoulas <christos@@zoulas.com>

        * PR/364: Detect non-nul-terminated core filenames from QEMU
	  (mam-ableton)

2022-07-04  15:45  Christos Zoulas <christos@@zoulas.com>

	* PR/359: Add support for http://ndjson.org/ (darose)
	* PR/362: Fix wide printing (ro-ee)
	* PR/358: Fix width for -f - (jpalus)
	* PR/356: Fix JSON constant parsing (davewhite)

2022-06-10   9:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.42

2022-05-31  14:50   Christos Zoulas <christos@@zoulas.com>

	* PR/348: add missing cases to prevent file from aborting on
	  random magic files.

2022-05-27  21:05   Christos Zoulas <christos@@zoulas.com>

	* PR/351: octalify filenames when not raw before printing.

2022-04-18  17:51   Christos Zoulas <christos@@zoulas.com>

	* fix regex cacheing bug (Dirk Mueller)
	* merge file_regcomp and file_regerror() to simplify the code
	  and reduce memory requirements for storing regexes (Dirk Mueller)

2022-03-19  12:56   Christos Zoulas <christos@@zoulas.com>

	* cache regex (Dirk Mueller)
	* detect filesystem full by flushing output (Dirk Mueller)

2021-11-19  12:36   Christos Zoulas <christos@@zoulas.com>

	* implement running decompressor programs using
	  posix_spawnp(2) instead of vfork(2)

2021-10-24  11:51   Christos Zoulas <christos@@zoulas.com>

	* Add support for msdos dates and times

2021-10-20   9:55   Christos Zoulas <christos@@zoulas.com>

	* use the system byte swapping functions if available (Werner Fink)

2021-10-18  11:57  Christos Zoulas <christos@@zoulas.com>

	* release 5.41

2021-09-23  03:51  Christos Zoulas <christos@@zoulas.com>

	* Avinash Sonawane: Fix tzname detection

2021-09-03  09:17  Christos Zoulas <christos@@zoulas.com>

	* Fix relationship tests with "search" magic, don't short circuit
	  logic

2021-07-13  01:06  Christos Zoulas <christos@@zoulas.com>

	* Fix memory leak in compile mode

2021-07-01  03:51  Christos Zoulas <christos@@zoulas.com>

	* PR/272: kiefermat: Only set returnval = 1 when we printed something
	  (in all cases print or !print). This simplifies the logic and fixes
	  the issue in the PR with -k and --mime-type there was no continuation
	  printed before the default case.

2021-06-30  13:07  Christos Zoulas <christos@@zoulas.com>

	* PR/270: Don't translate unprintable characters in %s magic formats
	  when -r
	* PR/269: Avoid undefined behavior with clang (adding offset to NULL)

2021-05-09  18:38  Christos Zoulas <christos@@zoulas.com>

	* Add a new flag (f) that requires that the match is a full word,
	   not a partial word match.
	* Add varint types (unused)

2021-04-19  17:17  Christos Zoulas <christos@@zoulas.com>

	* PR/256: mutableVoid: If the file is less than 3 bytes, use the file
	  length to determine type
	* PR/259: aleksandr.v.novichkov: mime printing through indirect magic
	  is not taken into account, use match directly so that it does.

2021-04-04  17:02  Christos Zoulas <christos@@zoulas.com>

	* count the total bytes found not the total byte positions
	  in order to determine encoding (Anatol Belski)
@
text
@d3 1
a3 1
# $File: dataone,v 1.3 2022/04/18 21:38:10 christos Exp $
d12 2
a13 2
0	string	\<?xml\ version=
>&0	regex/1024	eml-[0-9]\\.[0-9]\\.[0-9]+	eml://ecoinformatics.org/%s
d16 1
a16 1
>&0	regex/1024	onedcx/v[0-9]\\.[0-9]+		https://ns.dataone.org/metadata/schema/onedcx/v1.0
d20 1
a20 1
>&0	search/1024	fgdc				FGDC-STD-001-1998
d23 1
a23 1
>&0	regex/1024	mercury/terms/v[0-9]\\.[0-9]	https://purl.org/ornl/schema/mercury/terms/v1.0
d26 2
a27 2
>&0	search/1024	isotc211
>>&0	search/1024	eng;USA				https://www.isotc211.org/2005/gmd
d30 1
a30 1
>>&0	regex/1024	gov\\.noaa\\.nodc:[0-9]+		https://www.isotc211.org/2005/gmd-noaa
d33 1
a33 1
>>&0	regex/1024	pangaea\\.dataset[0-9][0-9][0-9][0-9][0-9][0-9]+	https://www.isotc211.org/2005/gmd-pangaea
d38 3
a40 3
0	string	\<?xml\ version=
>&0	search/1024	rdf
>>&0	search/1024	openarchives	https://www.openarchives.org/ore/terms
d46 1
a46 1
>&0	regex/1024	dryad-bibo/v[0-9]\\.[0-9]	https://datadryad.org/profile/v3.1
@


1.1.1.2.2.1
log
@file dataone was added on branch phil-wifi on 2019-06-10 21:44:46 +0000
@
text
@d1 47
@


1.1.1.2.2.2
log
@Sync with HEAD
@
text
@a0 47

#------------------------------------------------------------------------------
# $File: dataone,v 1.2 2019/04/19 00:42:27 christos Exp $
#
# DataONE- files from Dave Vieglais <dave.vieglais@@gmail.com> &
#                     Pratik Shrivastava <pratikshrivastava23@@gmail.com>
#
# file formats:   https://cn.dataone.org/cn/v2/formats
#------------------------------------------------------------------------------

# EML (Ecological Metadata Language Format)
0	string	<?xml
>&0	regex	(eml)-[0-9].[0-9].[0-9]+	eml://ecoinformatics.org/%s

# onedcx (DataONE Dublin Core Extended v1.0)
>&0	regex	(onedcx/v)[0-9].[0-9]+		https://ns.dataone.org/metadata/schema/onedcx/v1.0

# FGDC-STD-001-1998 (Content Standard for Digital Geospatial Metadata,
# version 001-1998)
>&0	regex	fgdc				FGDC-STD-001-1998

# Mercury (Oak Ridge National Lab Mercury Metadata version 1.0)
>&0	regex	(mercury/terms/v)[0-9].[0-9]	https://purl.org/ornl/schema/mercury/terms/v1.0

# ISOTC211 (Geographic MetaData (GMD) Extensible Markup Language)
>&0	regex	isotc211
>>&0	regex	eng;USA				https://www.isotc211.org/2005/gmd

# ISOTC211 (NOAA Variant Geographic MetaData (GMD) Extensible Markup Language)
>>&0	regex	gov.noaa.nodc:[0-9]+		https://www.isotc211.org/2005/gmd-noaa

# ISOTC211 PANGAEA Variant Geographic MetaData (GMD) Extensible Markup Language
>>&0	regex	pangaea.dataset[0-9][0-9][0-9][0-9][0-9][0-9]+	https://www.isotc211.org/2005/gmd-pangaea
!:mime	text/xml


# Object Reuse and Exchange Vocabulary
0	string	<?xml
>&0	regex	rdf
>>&0	regex	openarchives	https://www.openarchives.org/ore/terms
!:mime application/rdf+xml


# Dryad Metadata Application Profile Version 3.1
0	string	<DryadData
>&0	regex	(dryad-bibo/v)[0-9].[0-9]	https://datadryad.org/profile/v3.1
!:mime	text/xml
@


1.1.1.1.2.1
log
@file dataone was added on branch pgoyette-compat on 2018-10-20 06:58:20 +0000
@
text
@d1 47
@


1.1.1.1.2.2
log
@Sync with head
@
text
@a0 47

#------------------------------------------------------------------------------
# $File: dataone,v 1.1 2018/06/06 01:16:40 christos Exp $
#
# DataONE- files from Dave Vieglais <dave.vieglais@@gmail.com> &
#                     Pratik Shrivastava <pratikshrivastava23@@gmail.com>
#
# file formats:   https://cn.dataone.org/cn/v2/formats
#------------------------------------------------------------------------------

# EML (Ecological Metadata Language Format)
0	string	<?xml
>&0	regex	(eml)-[0-9].[0-9].[0-9]+	eml://ecoinformatics.org/%s

# onedcx (DataONE Dublin Core Extended v1.0)
>&0	regex	(onedcx/v)[0-9].[0-9]+		http://ns.dataone.org/metadata/schema/onedcx/v1.0

# FGDC-STD-001-1998 (Content Standard for Digital Geospatial Metadata,
# version 001-1998)
>&0	regex	fgdc				FGDC-STD-001-1998

# Mercury (Oak Ridge National Lab Mercury Metadata version 1.0)
>&0	regex	(mercury/terms/v)[0-9].[0-9]	http://purl.org/ornl/schema/mercury/terms/v1.0

# ISOTC211 (Geographic MetaData (GMD) Extensible Markup Language)
>&0	regex	isotc211
>>&0	regex	eng;USA				http://www.isotc211.org/2005/gmd

# ISOTC211 (NOAA Variant Geographic MetaData (GMD) Extensible Markup Language)
>>&0	regex	gov.noaa.nodc:[0-9]+		http://www.isotc211.org/2005/gmd-noaa

# ISOTC211 PANGAEA Variant Geographic MetaData (GMD) Extensible Markup Language
>>&0	regex	pangaea.dataset[0-9][0-9][0-9][0-9][0-9][0-9]+	http://www.isotc211.org/2005/gmd-pangaea
!:mime	text/xml


# Object Reuse and Exchange Vocabulary
0	string	<?xml
>&0	regex	rdf
>>&0	regex	openarchives	http://www.openarchives.org/ore/terms
!:mime application/rdf+xml


# Dryad Metadata Application Profile Version 3.1
0	string	<DryadData
>&0	regex	(dryad-bibo/v)[0-9].[0-9]	http://datadryad.org/profile/v3.1
!:mime	text/xml
@


