delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/03/19/06:28:35

Date: Mon, 19 Mar 2001 13:22:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Juan Manuel Guerrero <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
cc: djgpp-workers AT delorie DOT com
Subject: Re: 2 suggestions for djtar
In-Reply-To: <5081AB53B41@HRZ1.hrz.tu-darmstadt.de>
Message-ID: <Pine.SUN.3.91.1010319131332.23067D@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 19 Mar 2001, Juan Manuel Guerrero wrote:

> 1) A couple of days ago, Bruno Haible suggested to modify
> djtar in such a way that it always extracts batch files with
> DOS-style EOL. I do not know if such a "silent" EOL convertion
> is welcome at all and I know that this will not really solve
> the problem, but IMHO it is a nice feature that can be easily
> implemented and that may be of some use. The code I suggest in
> this patch consideres every file having as last extension ".bat"
> as batch file. Before checking for ".bat" the extension is
> converted to lower case. The LF -> CRLF convertion is done
> automatically.

It is okay to add such a feature, but the implementation is not right, 
IMHO: if a .bat file already has CR-LF style EOLs (most of them do), 
djtar might corrupt it.

To be useful, this option should only convert batch files that have 
Unix-style LF-only EOLs.

(Yes, I know that djtar examines the first block of the file to decide 
whether it has Unix-style EOLs.  However, for a feature that is 
automatically turned on and cannot be turned off, this is not safe 
enough, because the block size is small.  If this feature is made 
optional, then I think it will be okay to use the implementation you 
suggest.)

Btw, does anyone know whether 4DOS groks Unix style EOLs in its *.btm 
files?  If not, they should be converted as well.

- Raw text -


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