🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3989

Re: How to enable ctrl-break in a Standard C program

#3989
From: Christopher R. Volpe
Date: Wed, 13 Sep 1995 21:39
24 lines
1406 bytes
In article <431qar$691@isoit109.bbn.hp.com>, Bruno RICHARD <bruno_richard@hp-france-om1.om.hp.com> writes:
>Under DOS, if a program does not call the BIOS, for instance while doing
>a loop, it is not possible for the user to send a ctrl-break.
>
>I want to make a long loop, but still want to be able to break the
>program if I want.
>
>One way to do this is to poll the keyboard using kbhit() regularly.
>The problem is that kbhit() is NOT part of the Standard C library.
>
>Does anyone have an hint about how to do this cleanly?
>

Try comp.lang.c.moderated FAQ list. Section 16.

(In a nutshell, this is a system-dependent task and there are only
system-dependent solutions. The C Standard doesn't even mandate the existence
of a keyboard.)

--

Chris Volpe				Phone: (518) 387-7766 (Dial Comm 8*833
GE Corporate R&D			Fax:   (518) 387-6560
PO Box 8, Schenectady, NY 12301		Email: volpecr@crd.ge.com
Technical Details
Message-ID: <437j2s$qr9@rdsunx.crd.ge.com>
Path: arc1-ca.pugleaf.net!bart.crd.ge.com!volpe
References: <431qar$691@isoit109.bbn.hp.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!bart.crd.ge.com!volpe
From: volpe@bart.crd.ge.com (Christopher R. Volpe)
Newsgroups: comp.std.c
Subject: Re: How to enable ctrl-break in a Standard C program
Date: 13 Sep 1995 21:39:40 GMT
Organization: GE Corporate Research & Development
Sender: volpe@bart (Christopher R. Volpe)
Distribution: world
Message-ID: <437j2s$qr9@rdsunx.crd.ge.com>
References: <431qar$691@isoit109.bbn.hp.com>
Reply-To: volpe@ausable.crd.ge.com
NNTP-Posting-Host: bart.crd.ge.com