delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/18/03:56:26

Date: Sun, 18 Feb 2001 10:48:15 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
cc: c DOT zeelenberg AT hccnet DOT nl, djgpp AT delorie DOT com
Subject: Re: file(1)
In-Reply-To: <200102171501.QAA26211@mother.ludd.luth.se>
Message-ID: <Pine.SUN.3.91.1010218104547.5826A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 17 Feb 2001, Martin Str|mberg wrote:

> 1. Try specify an alternative magic file with -m:
> file -m t:/magic /djgpp/bin/ranlib.exe
> file.exe: couldn't find any magic files!
> 
> I worked around this by using "/dev/t/" instead of "t:/".

It's indeed not nice for a DJGPP port not to support native DOS/Windows 
file names.

What happens if you use backslashes?  Does it support something like 
\foo\bar\baz?  It should, IMHO.

> 3. If you do 2, you'll find a bug. In the line 365 of file.c you need
> to open the files in binary mode.

A utility such as `file', which reads arbitrary files, should indeed use 
binary input.  Text mode is too unreliable for files which are not text 
files.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019