From a169aa5820cc8a52f254a0794d640f7582805571 Mon Sep 17 00:00:00 2001 From: Ian Darwin Date: Thu, 21 May 1992 16:17:28 +0000 Subject: [PATCH] Changes from cudcv@warwick.ac.uk (Rob McMahon) to allow more general masking operator. --- doc/magic.man | 50 +++++++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/doc/magic.man b/doc/magic.man index 44cb08fa..489cc360 100644 --- a/doc/magic.man +++ b/doc/magic.man @@ -35,28 +35,11 @@ A four-byte value (on most systems). .IP string A string of bytes. .RE -.IP -The types -.BR byte , -.BR short , -and -.B long -may optionally be followed by a mask -specifier of the form -.BI & number\fR. -If a mask specifier is given, the value is -.SM AND\s0'ed -with the -.I number -before any comparisons are done. The -.I number -is specified in C form; for instance, -.B 13 -is decimal, -.B 013 -is octal, and -.B 0x13 -is hexadecimal. +The numeric types may optionally be followed by +.B & +and a numeric value, +to specify that the value is to be AND'ed with the +numeric value before any comparisons are done. .IP test The value to be compared with the value from the file. If the type is numeric, this value @@ -71,24 +54,25 @@ to specify that the value from the file must equal the specified value, .BR < , to specify that the value from the file must be less than the specified value, +or .BR > , to specify that the value from the file must be greater than the specified -value, -.BR & , -to specify that all the bits in the specified -value must be set in the value from the file, -.BR ^ , -to specify that at least one of the bits in -the specified value must not be set in the -value from the file, or -.B x +value. +or +Numeric values are specified in C form; e.g. +.B 13 +is decimal, +.B 013 +is octal, and +.B 0x13 +is hexadecimal. to specify that any value will match. If the character is omitted, it is assumed to be .BR = . .IP For string values, the byte string from the file must match the specified byte string. -The operators =, < and > (but not &, ^, or x) can be applied to strings. +The operators =, < and > (but not &) can be applied to strings. The length used for matching is that of the string argument in the magic file. .IP message @@ -141,4 +125,4 @@ at the beginning of the line. .\" the changes I posted to the S5R2 version. .\" .\" Modified for Ian Darwin's version of the file command. -.\" @(#)$Header: /home/glen/git/file/cvs/file/doc/magic.man,v 1.6 1990/10/03 17:56:18 ian Exp $ +.\" @(#)$Ident $ -- 2.40.0