Message-Id: <199904200520.FAA38452@out5.ibm.net> From: "Mark E." To: djgpp-workers AT delorie DOT com, eliz AT is DOT elta DOT co DOT il Date: Tue, 20 Apr 1999 01:21:20 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Bug no. 277 X-mailer: Pegasus Mail for Win32 (v3.01d) Reply-To: djgpp-workers AT delorie DOT com > > Could people who know their way around C++ in general, and libstdc++ and > > iostreams in particular, please look at this bug and help me decide > > whether this has something to do with core DJGPP? > > At first I thought it did, but after going through some references I now don't think so. > > After some debugging, I've come up with a sample program that > illustrates what is going on: > > #include > > int main() > { > int ch; > printf("Prompt 1: "); > ch = getc(stdin); > clearerr(stdin); > printf("\nPrompt 2: "); > ch = getc(stdin); > } > I think I finally have the correct answer this time. If you compile the original example, it "fails" just like the sample C++ program in bug #377 when ctrl-z is pressed. When a call to clearerr(stdin) is added as above, the program waits at the second prompt. But when I added clearerr(stdin) to bug 377's sample program, it made no difference. So I have to conclude that it's a libstdc++ and not a DJGPP problem . BTW, forget my patch to filbuf since it's not correct. Mark --- Mark Elbrecht, snowball3 AT usa DOT net http://snowball.digitalspace.net/