summaryrefslogtreecommitdiffstats
path: root/contrib/file/doc/magic.man
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-12-14 13:59:40 -0200
committerRenato Botelho <renato@netgate.com>2016-12-14 13:59:40 -0200
commitcc9fac304cafadab4656653aa1a62fdad74b4e94 (patch)
tree43fee446af0c829986548dcbe6862d3ac31bae2e /contrib/file/doc/magic.man
parent812767d2bb4e201b4f826fd31924d2cafb8fe0ae (diff)
parent6d3cdf0ab519f1b7bad6bd132eda48242f0ff7c8 (diff)
downloadFreeBSD-src-cc9fac304cafadab4656653aa1a62fdad74b4e94.zip
FreeBSD-src-cc9fac304cafadab4656653aa1a62fdad74b4e94.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'contrib/file/doc/magic.man')
-rw-r--r--contrib/file/doc/magic.man17
1 files changed, 11 insertions, 6 deletions
diff --git a/contrib/file/doc/magic.man b/contrib/file/doc/magic.man
index f3b63b4..bc37404 100644
--- a/contrib/file/doc/magic.man
+++ b/contrib/file/doc/magic.man
@@ -1,5 +1,5 @@
-.\" $File: magic.man,v 1.86 2015/09/08 13:48:44 christos Exp $
-.Dd January 1, 2015
+.\" $File: magic.man,v 1.88 2016/07/27 09:42:49 rrt Exp $
+.Dd July 20, 2016
.Dt MAGIC __FSECTION__
.Os
.\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
@@ -535,13 +535,18 @@ the file.
The value at that offset is read, and is used again as an offset
in the file.
Indirect offsets are of the form:
-.Em (( x [.[bislBISL]][+\-][ y ]) .
+.Em (( x [[.,][bislBISL]][+\-][ y ]) .
The value of
.Em x
is used as an offset in the file.
A byte, id3 length, short or long is read at that offset depending on the
.Em [bislBISLm]
type specifier.
+The value is treated as signed if
+.Dq ,
+is specified or unsigned if
+.Dq .
+is specified.
The capitalized types interpret the number as a big endian
value, whereas the small letter versions interpret the number as a little
endian value;
@@ -564,9 +569,9 @@ That way variable length structures can be examined:
\*[Gt]\*[Gt](0x3c.l) string LX\e0\e0 LX executable (OS/2)
.Ed
.Pp
-This strategy of examining has a drawback: You must make sure that
-you eventually print something, or users may get empty output (like, when
-there is neither PE\e0\e0 nor LE\e0\e0 in the above example)
+This strategy of examining has a drawback: you must make sure that you
+eventually print something, or users may get empty output (such as when
+there is neither PE\e0\e0 nor LE\e0\e0 in the above example).
.Pp
If this indirect offset cannot be used directly, simple calculations are
possible: appending
OpenPOWER on IntegriCloud