]> 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 9f9dc9d58cf41af9f476185a7fe013ef6e670db4..08c6ae9f199f02530ed4f27444d121e437f02bbc 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: filesystems,v 1.68 2012/12/09 17:49:00 christos Exp $
+# $File: filesystems,v 1.69 2012/12/18 17:28:43 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 2c6ed23aca5b04ba9246730d0449d5f85fe77349..6053449ebb1db2d9576f10a1fd9c0be06231e67a 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: images,v 1.78 2012/12/18 17:25:54 christos Exp $
+# $File: images,v 1.79 2012/12/18 17:28:44 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