Mail Archives: djgpp-workers/2001/03/19/06:28:35
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 -