From owner-freebsd-hackers Wed Dec 28 11:25:55 1994 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id LAA28552 for hackers-outgoing; Wed, 28 Dec 1994 11:25:55 -0800 Received: from gateway.cybernet.com (gateway.cybernet.com [192.245.33.1]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id LAA28539 for ; Wed, 28 Dec 1994 11:25:49 -0800 Received: from [192.245.33.12] by gateway.cybernet.com (8.6.8/1.0A) id OAA15696; Wed, 28 Dec 1994 14:52:08 -0500 Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 28 Dec 1994 14:34:31 -0500 To: John Beukema , freebsd-hackers@freefall.cdrom.com From: mtaylor@gateway.cybernet.com (Mark J. Taylor) Subject: Re: how to emulate kdhit()B? Sender: hackers-owner@freebsd.org Precedence: bulk At 5:24 PM 12/28/94, John Beukema wrote: >I cannot get the function kbhit() which works well under SCO to work under >FBSD. The function which tries to read 1 char from stdin after setting >flags to nonblocking, always returns true ie, keyboard hit when the term >is in 'cooked' mode. Can anyone point me to a way to do this? >jbeukema Have you tried using fileno(stdin) in a select() call with an immediate return (when times=0)? It should do the trick of emulating kbhit(). -Mark Taylor mtaylor@cybernet.com