head	1.1;
branch	1.1.1;
access;
symbols
	FILE5_48:1.1.1.4
	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.10
	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.8
	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.6
	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.3
	cjep_sun2x:1.1.1.3.0.4
	cjep_sun2x-base:1.1.1.3
	cjep_staticlib_x-base1:1.1.1.3
	netbsd-9-2-RELEASE:1.1.1.2
	cjep_staticlib_x:1.1.1.3.0.2
	cjep_staticlib_x-base:1.1.1.3
	FILE5_40:1.1.1.3
	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.4
	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.2
	netbsd-9-base:1.1.1.2
	phil-wifi-20190609:1.1.1.2
	FILE5_37:1.1.1.2
	pgoyette-compat-merge-20190127:1.1.1.1.2.3
	pgoyette-compat-20190127:1.1.1.2
	pgoyette-compat-20190118:1.1.1.2
	pgoyette-compat-1226:1.1.1.2
	pgoyette-compat-1126:1.1.1.2
	pgoyette-compat-1020:1.1.1.2
	FILE5_35:1.1.1.2
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	phil-wifi:1.1.1.1.0.4
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat:1.1.1.1.0.2
	pgoyette-compat-0422:1.1.1.1
	FILE5_33:1.1.1.1
	CHRISTOS:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2018.04.15.19.32.47;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	unKSwpX2g9VqBzyA;

1.1.1.1
date	2018.04.15.19.32.47;	author christos;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.4.1;
next	1.1.1.2;
commitid	unKSwpX2g9VqBzyA;

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

1.1.1.3
date	2021.04.09.18.58.02;	author christos;	state Exp;
branches;
next	1.1.1.4;
commitid	W9ddLLbSkHHinEOC;

1.1.1.4
date	2026.06.10.15.59.14;	author christos;	state Exp;
branches;
next	;
commitid	3UWc0DrzTz7bHgJG;

1.1.1.1.2.1
date	2018.04.15.19.32.47;	author pgoyette;	state dead;
branches;
next	1.1.1.1.2.2;
commitid	W6xykws0Zbl4kpzA;

1.1.1.1.2.2
date	2018.04.22.07.20.08;	author pgoyette;	state Exp;
branches;
next	1.1.1.1.2.3;
commitid	W6xykws0Zbl4kpzA;

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

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


desc
@@


1.1
log
@Initial revision
@
text
@
#------------------------------------------------------------------------------
# $File: measure,v 1.1 2017/11/28 14:01:14 christos Exp $
# measure: file(1) magic for measurement data

# DIY-Thermocam raw data
0	name	diy-thermocam-parser
>0	beshort	x	scale %d-
>2	beshort x	\b%d,
>4	lefloat	x	spot sensor temperature %f,
>9	byte	0	unit celsius,
>9	byte	1	unit fahrenheit,
>8	byte	x	color scheme %d
>10	byte	1	\b, show spot sensor
>11	byte	1	\b, show scale bar
>12	byte	&1	\b, minimum point enabled
>12	byte	&2	\b, maximum point enabled
>13	lefloat	x	\b, calibration: offset %f,
>17	lefloat x	slope %f

0	name	diy-thermocam-checker
>9	byte	<2
>>10	byte	<2
>>>11	byte	<2
>>>>12	byte	<4
>>>>>17	lefloat	>0.0001	DIY-Thermocam raw data

# V2 and Leption 3.x:
38408	byte	<19
>38400	use	diy-thermocam-checker
>>38400	default x	(Lepton 3.x),
>>>38400	use	diy-thermocam-parser

# V1 or Lepton 2.x
9608	byte	<19
>9600	use	diy-thermocam-checker
>>9600	default	x	(Lepton 2.x),
>>>9600	use	diy-thermocam-parser

@


1.1.1.1
log
@2018-04-15  14:52  Christos Zoulas <christos@@zoulas.com>

	* release 5.33

2018-02-24  14:50  Christos Zoulas <christos@@zoulas.com>

	* extend the support for ${x?:} expansions for magic descriptions

2018-02-21  16:25  Christos Zoulas <christos@@zoulas.com>

	* add support for ${x?:} in mime types to handle
	  pie binaries.

2017-11-03   9:23  Christos Zoulas <christos@@zoulas.com>

	* add support for negative offsets (offsets from the end of file)

2017-09-26   8:22  Christos Zoulas <christos@@zoulas.com>

	* close the file on error when writing magic (Steve Grubb)

2017-09-24  12:02  Christos Zoulas <christos@@zoulas.com>

	* seccomp support (Paul Moore)

2017-09-02  11:53  Christos Zoulas <christos@@zoulas.com>

	* release 5.32

2017-08-28  16:37  Christos Zoulas <christos@@zoulas.com>

	* Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos@@zoulas.com>

	* Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos@@zoulas.com>

	* pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos@@zoulas.com>

	* PR/615 add magic_getflags()
@
text
@@


1.1.1.1.4.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: measure,v 1.2 2018/06/23 16:13:15 christos Exp $
d11 7
a17 7
>9	ubyte	0	unit celsius,
>9	ubyte	1	unit fahrenheit,
>8	ubyte	x	color scheme %d
>10	ubyte	1	\b, show spot sensor
>11	ubyte	1	\b, show scale bar
>12	ubyte	&1	\b, minimum point enabled
>12	ubyte	&2	\b, maximum point enabled
d22 4
a25 4
>9	ubyte	<2
>>10	ubyte	<2
>>>11	ubyte	<2
>>>>12	ubyte	<4
d29 1
a29 1
38408	ubyte	<19
d35 1
a35 1
9608	ubyte	<19
@


1.1.1.2
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
@d3 1
a3 1
# $File: measure,v 1.2 2018/06/23 16:13:15 christos Exp $
d11 7
a17 7
>9	ubyte	0	unit celsius,
>9	ubyte	1	unit fahrenheit,
>8	ubyte	x	color scheme %d
>10	ubyte	1	\b, show spot sensor
>11	ubyte	1	\b, show scale bar
>12	ubyte	&1	\b, minimum point enabled
>12	ubyte	&2	\b, maximum point enabled
d22 4
a25 4
>9	ubyte	<2
>>10	ubyte	<2
>>>11	ubyte	<2
>>>>12	ubyte	<4
d29 1
a29 1
38408	ubyte	<19
d35 1
a35 1
9608	ubyte	<19
@


1.1.1.3
log
@2021-03-30  20:21  Christos Zoulas <christos@@zoulas.com>

	* release 5.40

2021-02-05  16:31  Christos Zoulas <christos@@zoulas.com>

	* PR/234: Add limit to the number of bytes to scan for encoding
	* PR/230: Fix /T (trim flag) for regex

2021-02-01  12:31  Christos Zoulas <christos@@zoulas.com>
	* PR/77: Trim trailing separator.

2020-12-17  15:44  Christos Zoulas <christos@@zoulas.com>

	* PR/211: Convert system read errors from corrupt ELF
	  files into human readable error messages

2020-12-08  16:24  Christos Zoulas <christos@@zoulas.com>

	* fix multithreaded decompression file descriptor issue
	  by using close-on-exec (Denys Vlasenko)

2020-06-27  11:58  Christos Zoulas <christos@@zoulas.com>

	* Exclude surrogate pairs from utf-8 detection (Michael Liu)

2020-06-25  12:53  Christos Zoulas <christos@@zoulas.com>

	* Include # to the list of ignored format chars (Werner Fink)
@
text
@d3 1
a3 1
# $File: measure,v 1.3 2021/03/25 17:30:10 christos Exp $
a39 5
# Becker & Hickl Photon Counting (PMS) data file
# format documentation: https://www.becker-hickl.com/wp-content/uploads/2018/11/opm-pms400-v01.pdf (page 57)
(0x02.l)	string	*IDENTIFICATION		Becker & Hickl PMS Data File
>0x12		short	x			(%d data blocks)
!:ext sdt
@


1.1.1.4
log
@Import file-5.48 (previous was file-5.45)

2026-05-07  11:32  Christos Zoulas <christos@@zoulas.com>

	* release 5.48

2026-05-11  15:55 Christos Zoulas <christos@@zoulas.com>

	* add landlock support (valoq)

2026-04-19  15:55 Christos Zoulas <christos@@zoulas.com>

	* add BE/LE GUID

2026-04-17  11:05 Christos Zoulas <christos@@zoulas.com>

	* multiple fixes to prevent integer overflow in 32 bits (kerwin)

2026-04-15  12:40 Christos Zoulas <christos@@zoulas.com>

	* PR/745: streamout: Don't flush when trying to set negative offsets
	          on pipes, just continue, fixes 'cat file.zip | file -'
	* PR/753: vmihalko: Fix race is magic_getpath()

2026-03-11  15:14 Christos Zoulas <christos@@zoulas.com>

	* PR/728: Anton Monroe: Reinstate regex/c

2026-02-26  11:32  Christos Zoulas <christos@@zoulas.com>

	* release 5.47

2026-02-04  09:54  Christos Zoulas <christos@@zoulas.com>
	* Better multi-compound document identification by following the
	  order of the directories entries. (Thomas Ledoux)

2026-01-19  14:00  Christos Zoulas <christos@@zoulas.com>
	* if stat fails, don't attempt to restore times (Steven Grubb)

2025-05-28  15:20  Christos Zoulas <christos@@zoulas.com>

	* PR/622: Odd_Bloke: Handle negative offsets in file_buffer(),
	  when fd is not available.

2025-05-28  12:50  Christos Zoulas <christos@@zoulas.com>

	* PR/655: jsummers: Obey str_flags in strings like we do for search
	  and regex
	* PR/659: Pitzl: Apply MAGIC_CONTINUE to annotations; i.e. print
	  only the first, unless -k is specified.

2024-12-19  14:44  Christos Zoulas <christos@@zoulas.com>

	* PR/592: allow + in format strings
	* PR/592: signed operations should be done in signed context

2024-12-05  13:50 Christos Zoulas <christos@@zoulas.com>

	* PR/578: jsummers: Don't crash on cygwin when tm_mon == -1
	* PR/579: net147: Fix stack overrun.

2024-11-27  14:44  Christos Zoulas <christos@@zoulas.com>

	* release 5.46
	* Add OFFPOSITIVE

2024-11-25  13:56  Christos Zoulas <christos@@zoulas.com>

	* avoid leaking symbols in libmagic

2024-11-10  13:56  Christos Zoulas <christos@@zoulas.com>

	* PR/562: jsummers: Search/regex offsets are absolute to the
	  beginning of the file, so adjust them by subtracting the
	  offset that the "use" starts so that we don't double-count it.


2024-11-09  19:30  Christos Zoulas <christos@@zoulas.com>
 	* PR/543: matshch: bump nbuf so we can get the flags into the buffer.


2024-11-02  14:34  Christos Zoulas <christos@@zoulas.com>

 	* Add Android elf notes (enh)

2023-12-29  12:55  Christos Zoulas <christos@@zoulas.com>

	* Add limit for number of magic warnings allowed

2023-07-29  12:55  Christos Zoulas <christos@@zoulas.com>

	* check regex bounds (found by clusterfuzz)
@
text
@d3 1
a3 1
# $File: measure,v 1.4 2026/01/23 16:41:32 christos Exp $
a44 7

# https://www.asam.net/standards/detail/mdf/
0	string	MDF\x20\x20\x20\x20\x20	ASAM/MDF measurement file Version
>8	regex	.\\...			%s
>12	string	\x20\x20\x20\x20
>62	byte	!0			(unfinalized)
>64	string	##HD
@


1.1.1.1.2.1
log
@file measure was added on branch pgoyette-compat on 2018-04-22 07:20:08 +0000
@
text
@d1 39
@


1.1.1.1.2.2
log
@Sync with HEAD
@
text
@a0 39

#------------------------------------------------------------------------------
# $File: measure,v 1.1 2017/11/28 14:01:14 christos Exp $
# measure: file(1) magic for measurement data

# DIY-Thermocam raw data
0	name	diy-thermocam-parser
>0	beshort	x	scale %d-
>2	beshort x	\b%d,
>4	lefloat	x	spot sensor temperature %f,
>9	byte	0	unit celsius,
>9	byte	1	unit fahrenheit,
>8	byte	x	color scheme %d
>10	byte	1	\b, show spot sensor
>11	byte	1	\b, show scale bar
>12	byte	&1	\b, minimum point enabled
>12	byte	&2	\b, maximum point enabled
>13	lefloat	x	\b, calibration: offset %f,
>17	lefloat x	slope %f

0	name	diy-thermocam-checker
>9	byte	<2
>>10	byte	<2
>>>11	byte	<2
>>>>12	byte	<4
>>>>>17	lefloat	>0.0001	DIY-Thermocam raw data

# V2 and Leption 3.x:
38408	byte	<19
>38400	use	diy-thermocam-checker
>>38400	default x	(Lepton 3.x),
>>>38400	use	diy-thermocam-parser

# V1 or Lepton 2.x
9608	byte	<19
>9600	use	diy-thermocam-checker
>>9600	default	x	(Lepton 2.x),
>>>9600	use	diy-thermocam-parser

@


1.1.1.1.2.3
log
@Sync with head
@
text
@d3 1
a3 1
# $File: measure,v 1.2 2018/06/23 16:13:15 christos Exp $
d11 7
a17 7
>9	ubyte	0	unit celsius,
>9	ubyte	1	unit fahrenheit,
>8	ubyte	x	color scheme %d
>10	ubyte	1	\b, show spot sensor
>11	ubyte	1	\b, show scale bar
>12	ubyte	&1	\b, minimum point enabled
>12	ubyte	&2	\b, maximum point enabled
d22 4
a25 4
>9	ubyte	<2
>>10	ubyte	<2
>>>11	ubyte	<2
>>>>12	ubyte	<4
d29 1
a29 1
38408	ubyte	<19
d35 1
a35 1
9608	ubyte	<19
@


