From 21c8a863cd8eb931015ebd63b2f9f4c4f0ebfd7f Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Tue, 2 Feb 2010 21:51:46 +0000 Subject: [PATCH] Add EPUB support. --- ChangeLog | 4 ++++ magic/Magdir/archive | 47 +++++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 211fe3b0..6d893119 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-02-02 21:50 Reuben Thomas + + * Add support for OCF (EPUB) files (application/epub+zip) + 2010-01-28 18:25 Christos Zoulas * Fix core-dump from unbound loop: diff --git a/magic/Magdir/archive b/magic/Magdir/archive index c3864362..d0d43a0d 100644 --- a/magic/Magdir/archive +++ b/magic/Magdir/archive @@ -1,6 +1,5 @@ - #------------------------------------------------------------------------------ -# $File: archive,v 1.54 2009/09/19 16:28:08 christos Exp $ +# $File: archive,v 1.55 2009/12/04 15:00:47 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -245,13 +244,13 @@ # MS Compress 4 string \x88\xf0\x27 MS Compress archive data # updated by Joerg Jenderek ->9 string \0 ->>0 string KWAJ +>9 string \0 +>>0 string KWAJ >>>7 string \321\003 MS Compress archive data >>>>14 ulong >0 \b, original size: %ld bytes ->>>>18 ubyte >0x65 ->>>>>18 string x \b, was %.8s ->>>>>(10.b-4) string x \b.%.3s +>>>>18 ubyte >0x65 +>>>>>18 string x \b, was %.8s +>>>>>(10.b-4) string x \b.%.3s # MP3 (archiver, not lossy audio compression) 0 string MP3\x1a MP3-Archiver archive data # ZET @@ -276,7 +275,7 @@ # Splint 0 string \x93\xb9\x06 Splint archive data # InstallShield -0 string \x13\x5d\x65\x8c InstallShield Z archive Data +0 string \x13\x5d\x65\x8c InstallShield Z archive Data # Gather 1 string GTH Gather archive data # BOA @@ -497,7 +496,7 @@ 0 string HPAK HPACK archive data # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net -0 string \351,\001JAM\ JAM archive, +0 string \351,\001JAM\ JAM archive, >7 string >\0 version %.4s >0x26 byte =0x27 - >>0x2b string >\0 label %.11s, @@ -535,7 +534,7 @@ >20 byte x - header level %d # taken from idarc [JW] 2 string -lZ PUT archive data -2 string -lz LZS archive data +2 string -lz LZS archive data 2 string -sw1- Swag archive data # RAR archiver (Greg Roelofs, newt@uchicago.edu) @@ -662,6 +661,10 @@ >>>>78 string -template Template !:mime application/vnd.oasis.opendocument.image-template +# OEBPS Container Format (OCF) 1.0 +>>50 string epub+zip OEBPS Container Format (OCF) 1.0 (EPUB) +!:mime application/epub+zip + # Zoo archiver 20 lelong 0xfdc4a7dc Zoo archive data !:mime application/x-zoo @@ -679,7 +682,7 @@ !:mime application/octet-stream # -# LBR. NB: May conflict with the questionable +# LBR. NB: May conflict with the questionable # "binary Computer Graphics Metafile" format. # 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data @@ -695,10 +698,10 @@ # From Rafael Laboissiere # The Project Revision Control System (see # http://prcs.sourceforge.net) generates a packaged project -# file which is recognized by the following entry: +# file which is recognized by the following entry: 0 leshort 0xeb81 PRCS packaged project -# Microsoft cabinets +# Microsoft cabinets # by David Necas (Yeti) #0 string MSCF\0\0\0\0 Microsoft cabinet file data, #>25 byte x v%d @@ -706,9 +709,9 @@ # MPi: All CABs have version 1.3, so this is pointless. # Better magic in debian-additions. -# GTKtalog catalogs +# GTKtalog catalogs # by David Necas (Yeti) -4 string gtktalog\ GTKtalog catalog data, +4 string gtktalog\ GTKtalog catalog data, >13 string 3 version 3 >>14 beshort 0x677a (gzipped) >>14 beshort !0x677a (not gzipped) @@ -726,11 +729,11 @@ # Atari MSA archive - Teemu Hukkanen 0 beshort 0x0e0f Atari MSA archive data ->2 beshort x \b, %d sectors per track ->4 beshort 0 \b, 1 sided ->4 beshort 1 \b, 2 sided ->6 beshort x \b, starting track: %d ->8 beshort x \b, ending track: %d +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d # Alternate ZIP string (amc@arwen.cs.berkeley.edu) 0 string PK00PK\003\004 Zip archive data @@ -774,8 +777,8 @@ >>0x2A string >\0 : %s # DR-DOS 7.03 Packed File *.??_ -0 string Packed\ File\ Personal NetWare Packed File ->12 string x \b, was "%.12s" +0 string Packed\ File\ Personal NetWare Packed File +>12 string x \b, was "%.12s" # EET archive # From: Tilman Sauerbeck -- 2.40.0