]> granicus.if.org Git - file/commitdiff
PR/216: Reduce strength of x86 boot sector, bump pbm files adding width and
authorChristos Zoulas <christos@zoulas.com>
Tue, 18 Dec 2012 17:28:43 +0000 (17:28 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 18 Dec 2012 17:28:43 +0000 (17:28 +0000)
height printing (Jan Kaluza)

magic/Magdir/filesystems
magic/Magdir/images

index 27e67705d0c4bf8d567f75ac3ad74ffe483ee669..9172dcb43570748d6fda8efd5940195e9d398142 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: filesystems,v 1.67 2012/12/01 19:14:28 christos Exp $
+# $File: filesystems,v 1.68 2012/12/09 17:49:00 christos Exp $
 # filesystems:  file(1) magic for different filesystems
 #
 0      string  \366\366\366\366        PC formatted floppy with no filesystem
@@ -61,7 +61,7 @@
 # for any allowed sector sizes
 30             search/481      \x55\xAA        
 # to display x86 boot sector (40) before old one (strength=50), SYSLINUX MBR (?) and DOS BPB information (71) like in previous file version
-!:strength +72
+!:strength +40
 # for sector sizes < 512 Bytes
 >11            uleshort        <512            
 >>(11.s-2)     uleshort        0xAA55          x86 boot sector
index 26cfdd2883d0f9943d742275d9bbd84d5c538ad9..740f23a86592d72ac29746ee7ab1bde52a90ab20 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: images,v 1.77 2012/10/14 22:53:42 christos Exp $
+# $File: images,v 1.78 2012/12/18 17:25:54 christos Exp $
 # images:  file(1) magic for image formats (see also "iff", and "c-lang" for
 # XPM bitmaps)
 #
 
 # PBMPLUS images
 # The next byte following the magic is always whitespace.
-0      search/1        P1              Netpbm PBM image text
+# strength is changed to try these patterns before "x86 boot sector"
+0      search/1        P1              
+>3     regex           =[0-9]*\ [0-9]*         Netpbm PBM image text
+>3     regex           =[0-9]+\                \b, size = %sx
+>>3    regex           =\ [0-9]+       \b%s
+!:strength + 45
 !:mime image/x-portable-bitmap
-0      search/1        P2              Netpbm PGM image text
+0      search/1        P2              
+>3     regex           =[0-9]*\ [0-9]*         Netpbm PGM image text
+>3     regex           =[0-9]+\                \b, size = %sx
+>>3    regex           =\ [0-9]+       \b%s
+!:strength + 45
 !:mime image/x-portable-greymap
 0      search/1        P3              Netpbm PPM image text
+>3     regex           =[0-9]*\ [0-9]*         Netpbm PPM image text
+>3     regex           =[0-9]+\                \b, size = %sx
+>>3    regex           =\ [0-9]+       \b%s
+!:strength + 45
 !:mime image/x-portable-pixmap
-0      string          P4              Netpbm PBM "rawbits" image data
+0      string          P4              
+>3     regex           =[0-9]*\ [0-9]*         Netpbm PBM "rawbits" image data
+>3     regex           =[0-9]+\                \b, size = %sx
+>>3    regex           =\ [0-9]+       \b%s
+!:strength + 45
 !:mime image/x-portable-bitmap
-0      string          P5              Netpbm PGM "rawbits" image data
+0      string          P5              
+>3     regex           =[0-9]*\ [0-9]*         Netpbm PGM "rawbits" image data
+>3     regex           =[0-9]+\                \b, size = %sx
+>>3    regex           =\ [0-9]+       \b%s
+!:strength + 45
 !:mime image/x-portable-greymap
-0      string          P6              Netpbm PPM "rawbits" image data
+0      string          P6              
+>3     regex           =[0-9]*\ [0-9]*         Netpbm PPM "rawbits" image data
+>3     regex           =[0-9]+\                \b, size = %sx
+>>3    regex           =\ [0-9]+       \b%s
+!:strength + 45
 !:mime image/x-portable-pixmap
 0      string          P7              Netpbm PAM image file
 !:mime image/x-portable-pixmap