From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e44a032d26775cd3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-15 08:04:30 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!usc!nic-nac.CSU.net!rosebud.sdsc.edu!acsc.com!wp-sp.nba.trw.com!gatekeeper.esl.com!raccoon.esl.com!teyssier From: teyssier@raccoon.esl.com (Luke Teyssier) Newsgroups: comp.lang.ada Subject: Re: How to check for characters in input stream? Date: 14 Sep 1994 23:55:33 GMT Organization: ESL, Inc. (Sunnyvale) Message-ID: <3582hl$es5@gatekeeper.esl.com> References: <1994Sep14.140207.2304@mksol.dseg.ti.com> NNTP-Posting-Host: raccoon.esl.com Date: 1994-09-14T23:55:33+00:00 List-Id: 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 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