bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about patch


From: Gary Setter
Subject: Re: Questions about patch
Date: Tue, 5 Apr 2005 08:17:42 -0500

<snip>
> > would it be more useful to implement two mutually
> > exclusive switches -terminatelineslf
and --terminatelinesdefault
> > to choose between opening output files as binary vs text
files;
> > and then consistently reading files as binary (throwing out
cr)?
>
> I don't know.  I never tried to see whether this would be
possible or
> easy in Patch.
>
> The advantage of the current code is that it is already there
and
> works quite well in the Windows environment, provided that you
use
> "--binary" where appropriate.
>
<snip>
Thanks Eli, for your replies.
Is the binary switch a good design? It seems to me that
consistently reading files as binary would be better. If the user
is not all knowing (and I'm not) he can easily get himself in
trouble. Some versions of seek would hang if the file was not
opened as binary. With the version I was using, the read
following seek was to the wrong place resulting in an assertion
failure. That problem goes away if input is consistently opened
as binary. Doesn't a pair of switches named  -terminatelines
something something say exactly what the switch does? Isn't that
clarity what you want in a utility?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]