Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site tellab2.UUCP
Path: utzoo!watmath!clyde!burl!hou3c!hocda!houxm!ihnp4!tellab1!tellab2!dag
From: dag@tellab2.UUCP (Donald Graft)
Newsgroups: net.micro.cpm
Subject: getchar()
Message-ID: <131@tellab2.UUCP>
Date: Wed, 13-Jun-84 10:51:27 EDT
Article-I.D.: tellab2.131
Posted: Wed Jun 13 10:51:27 1984
Date-Received: Thu, 14-Jun-84 00:30:57 EDT
Organization: Tellabs, Inc., Lisle, Ill.
Lines: 10

The fact that getchar() is buffered on a line basis should not be
considered a bug.  The intent is to allow the user to edit data (by
backspacing) before it reaches the program.  If characters were returned
when struck the program itself would need to provide any editing capabilities.
Nevertheless, some applications require the immediate return of the character.
To achieve this on unix, some ioctl calls can be made to reconfigure the tty.
The program would then reset the tty before exiting.  Under CP/M, perhaps
the easiest way to achieve the desired result is to make a direct bdos
call for input (in other words, don't use getchar()).  I have used this
technique for "hit any key when ready" situations.