Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: john@iastate.edu (John Hascall)
Subject: file command busted in V4.0x?
Date: 1998/07/18	[thread overview]
Message-ID: <6op4hi$jqb$1@news.iastate.edu> (raw)

Given the following in /etc/magic :

0       string  ^GIF\\%...\\%           GIF (%s) image
>6      short   >0                      (%d
>8      short   >0                      x %d)


Using the V4.0d file command always gives:

    vincent% /tmp/file sarah-rachel-zelle.gif
    sarah-rachel-zelle.gif: GIF (87a) image (0 x 0)

rather than the correct (here from V3.2d) result:

    vincent% /tmp/file sarah-rachel-zelle.gif
    sarah-rachel-zelle.gif: GIF (87a) image (359 x 426)

In fact, it appears that '%d' is picking up the
'operator value' (the 0 after the '>' in this case) because
making this change:

0       string  ^GIF\\%...\\%           GIF (%s) image
>6      short   <1234                   (%d
>8      short   <2345                   x %d)

gives:

    vincent% file sarah-rachel-zelle.gif
    sarah-rachel-zelle.gif: GIF (87a) image (1234 x 2345)

Is this a 'known problem'?
Is there a patch/fix/workaround (other than using
a copy of 'file' from a V3.2d system)?

Thanks,
John
-- 
John Hascall, Software Engr.        Shut up, be happy.  The conveniences you
ISU Computation Center              demanded are now mandatory. -Jello Biafra
mailto:john@iastate.edu
http://www.cc.iastate.edu/staff/systems/john/welcome.html  <-- the usual crud



                 reply	other threads:[~1998-07-18  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox