Date: Thu, 25 Jan 2001 12:53:56 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Robert van der Boon" Message-Id: <9003-Thu25Jan2001125355+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: <000b01c086af$d9195a10$b0e979c3@internet> (rjvdboon@europe.com) Subject: Re: patch.exe (fwd) References: <000b01c086af$d9195a10$b0e979c3 AT internet> 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 Precedence: bulk > From: "Robert van der Boon" > Date: Thu, 25 Jan 2001 10:17:58 +0100 > > ! && (r.x.ax == 5 || (r.x.ax == 2 && __file_exists(old)) || > (r.x.ax==0xB7 && __file_exists(new))) > It gives 0xB7 only if the new file exists..., but I didn't want to widen the > scope of the test, that's why the __file_exist(new) is there. > If the performance penalty of __file_exist() is too big, I think that test > can go, and we'll treat 0xB7 exactly as 0x5. Thanks. I committed the changes after removing the __file_exist test. I think this test is unnecessary: if the problem is not that the file merely exists, its deletion will fail anyway. > > > Another thing I noticed was that the following text (or better: all > texts > > > without \n): > > > "Reversed (or previously applied) patch detected! Assume -R? [n]" > > > don't show up _before_ you press a valid key, but only _after_ you > > > press y/n/space. It seems like fflush isn't working either > > Yes, someone posted reports to that effect in the past. Feel like > > digging into this one as well? ;-) > > I wouldn't have a clue where to start... Well, one thing to try is to see if fsync(fileno(stdout)) (or stderr, as the case may be) solves the problem. Another idea is to call kbhit after fflush and see if that causes the text to be delivered to the screen.