Date: Wed, 8 Nov 2000 08:59:59 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Bill Currie cc: djgpp AT delorie DOT com Subject: Re: EOF In-Reply-To: <20001107085756.B17227@taniwha.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 7 Nov 2000, Bill Currie wrote: > > while ((c = getchar()) != EOF) > > > > you could try entering Ctrl-Z and then pressing ENTER on your keyboard. > > I don't know if this would be the same for all systems, but I think it > > should work under DOS. > > Ctrl-D (normally, it can be changed) in *nix, and no enter: it's immediate (in > my experience). On DOS/Windows, you need ENTER, because DOS functions which read from stdin don't return until you press ENTER. (This can be disabled by switching the console device into raw mode, but then ^Z is just another character, it only produces EOF in cooked mode.)