comp.lang.ada
 help / color / mirror / Atom feed
From: teyssier@raccoon.esl.com (Luke Teyssier)
Subject: Re: How to check for characters in input stream?
Date: 14 Sep 1994 23:55:33 GMT
Date: 1994-09-14T23:55:33+00:00	[thread overview]
Message-ID: <3582hl$es5@gatekeeper.esl.com> (raw)
In-Reply-To: 1994Sep14.140207.2304@mksol.dseg.ti.com

In article <1994Sep14.140207.2304@mksol.dseg.ti.com> cramer@mksol.dseg.ti.com (Norman W Cramer) writes:
>am having is that the functions in text_io block until a <CR> is entered.  I 
>need to return each character as it is typed and some status code if there are

>cramer@dseg.ti.com
>

__Unix__ will wait for you to press a carriage return. I have not checked, 
but I suspect that is where your problem lies. Try using the "raw" mode
for character input. see the man page for stty.

To have the read return if no characters are available, change the
file descriptor to asynchrounous. Use fcntl to accomplish this.

If you talk to verdix technical support, they have a sample implementation of
non-blocking file-io. Ask them for the async_io patch.

luke_teyssier@smtp.esl.com

Luke



  reply	other threads:[~1994-09-14 23:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-14 14:02 How to check for characters in input stream? Norman W Cramer
1994-09-14 23:55 ` Luke Teyssier [this message]
1994-09-15  8:26   ` David Emery
1994-09-15 13:42 ` Robert Dewar
1994-09-16  9:23   ` David Emery
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox