[comp.os.msdos.apps] patch and GNU diff woes

weisen@eniac.seas.upenn.edu (Neil Weisenfeld) (07/12/90)

Sorry that I haven't had time to look at the source code and ferret these
out myself, but here's the problem I had:

On my ALR 286/12.5 MHz (not that it's really relevant), running diff with
directories caused the machine to hang.

At work on a true blue IBM PC/AT, running patch out of D:\BIN with the
following command line:

	patch -c -o old\test1.new test1.new <patch.dif

cause the following error:

	patch: couldn't create D:\/patchpxxxxxx

Note that I was on the C: drive at the time.  I think that patch needs
a little more patching before all will be well. :-)


Anyone have this problem?

Neil





=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Neil I.  Weisenfeld                    | InterNet: weisen@eniac.seas.upenn.edu
Dept. of Computer and Info. Sciences   | USPS: I dunno, I'm moving...
University of Pennsylvania             | PENNmail: Don't even try it...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

mlord@bwdls58.bnr.ca (Mark Lord) (07/13/90)

In article <27000@netnews.upenn.edu> weisen@eniac.seas.upenn.edu (Neil Weisenfeld) writes:
>Sorry that I haven't had time to look at the source code and ferret these
>out myself, but here's the problem I had:

Well.. I just generated an executable for my HPUX machine, and the compiler
spotted an uninitialized local variable in one routine.. perhaps fixing it
might cure some of these other ailments people are noticing.

In file INP.C, there is a procedure called rev_in_string() at the bottom.

This procedure declares a local variable "s", which is then used without
first being given a value.  This instance of "s" should be replaced with
the parameter "string" instead on that one line.

Ie.  the existing line looks like:

	if (strnEQ(string,revision,patlen) && isspace(s[patlen]))

and should be changed to look like

	if (strnEQ(string,revision,patlen) && isspace(string[patlen]))

This is such an obvious bug, I wonder whether it was part of the REAL
distribution of 'patch', or just something introduced here by a mis-applied
patch or something.  I've sent email to the author (lwall) asking about it.

I got some other complaints about illegally mixing pointers and ints in
expressions from the mypatch.dif file.. so beware of this when applying those
patches.  Ideally, turn on ALL error detection in TURBOC and then FIX every
problem reported, even the "simple" warnings.  
-- 
 ___Mark S. Lord__________________________________________
| ..uunet!bnrgate!bmerh614!mlord | Climb Free Or Die (NH) |
| ..uunet!bnrgate!mlord%bmerh614 | Personal views only.   |
|________________________________|________________________|