On Wednesday 14 May 2008, Karel Zak wrote: > On Wed, May 14, 2008 at 07:17:45PM -0400, Mike Frysinger wrote: > > On Wednesday 14 May 2008, Karel Zak wrote: > > > On Wed, May 14, 2008 at 06:20:47PM -0400, Mike Frysinger wrote: > > > > we could use libmagic from the file package, but how terribly useful > > > > is that even ? > > > > > > Overkill. > > > > > > I see libmagic in /usr/lib and it also depends on > > > /usr/share/file/magic*. The more(1) should be useful with minimal > > > dependences. > > > > then the question is, is the magic() function useful. i dont think it > > is. > > I agree with you. BTW, less(1): > > /* > * Call it a binary file if there are more than 5 binary characters > * in the first 256 bytes of the file. > */ > > ... it uses isprint() the "less" behavior is much more useable than the "more" behavior. if "more" encounters a binary file, it exits. if "less" encounters a binary file, it prompts the user if they wish to continue. so shall i post a patch to outright delete the magic function ? the problem i have with "binary" detection is that it seems like it could be problematic with unicode files ? -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.