[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions about patch
Re: Questions about patch
Sun, 3 Apr 2005 11:51:30 -0500
----- Original Message -----
From: "Eli Zaretskii" <address@hidden>
To: "Gary Setter" <address@hidden>
Cc: <address@hidden>; <address@hidden>
Sent: Saturday, April 02, 2005 5:06 AM
Subject: Re: Questions about patch
> > From: "Gary Setter" <address@hidden>
> > Date: Fri, 1 Apr 2005 08:08:10 -0600
> > Cc: address@hidden
> > I'm sorry to take so long to respond to your e-mail. I've
> > some tests on my humble PC, and have not yet been able to
> > a version that is portable and that accepts diff files of all
> > types. I have one problem with three parts. The parts are:
> > use of cr/lf to terminate lines verses, opening files as
> > verses text and the failure of the fseek() function.
> > The problem has a long history. Based on the newsgroups that
> > been reading, the consensus is that the above fseek was not
> > to work with text files.
> I'm not Paul Eggert, but I'll try to put in my $0.02.
> I know one implementation of fseek that does work with text
> one in the DJGPP project's (http://www.delorie.com/djgpp/)
> > That seems to mean that patch should
> > open files to read in binary mode only, throw out carriage
> > returns, and terminate lines where line feeds are found.
> I believe latest versions of Patch already do that: they remove
> characters near the end of the line and print a message to that
> > I have no problem doing that, but it would make the existing
> > --binary meaningless.
> The --binary switch affects _output_, not only _input_. So,
> Patch is invoked with this switch, it produces patched files in
> format, i.e. each line is terminated by a single LF character.
> is not what you might want, at least not in every situation.
> In other words, --binary is mainly meant for the situation
> patch Unix-style files, and the patch file itself is in Unix
Your right, but 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)?
Where is the source for the latest versions of patch kept?
I had a second question, is a portable version of patch needed?
That is one compatible with more Windows compilers?
- Re: Questions about patch, Gary Setter, 2005/04/01
- Re: Questions about patch, Eli Zaretskii, 2005/04/02
- Re: Questions about patch,
Gary Setter <=
- Re: Questions about patch, Eli Zaretskii, 2005/04/04
- Re: Questions about patch, Gary Setter, 2005/04/05
- Re: Questions about patch, Eli Zaretskii, 2005/04/05
- Re: Questions about patch, Gary Setter, 2005/04/06
- Re: Questions about patch, Paul Eggert, 2005/04/06
- Re: Questions about patch, Gary Setter, 2005/04/07
- Re: Questions about patch, Gary Setter, 2005/04/18
- Re: Questions about patch, Paul Eggert, 2005/04/18