delorie.com/archives/browse.cgi | search |
Date: | Tue, 18 Aug 92 09:16:10 EDT |
From: | DJ Delorie <dj AT ctron DOT com> |
To: | Xavier DOT Leroy AT inria DOT fr |
Cc: | djgpp AT sun DOT soe DOT clarkson DOT edu |
Subject: | Polling for ctrl-C |
>But the fact is I do not need asynchronous interrupts: for various >reasons, the program I'm porting cannot be interrupted at any time, so >the signal handler just sets a global flag, and the main program >periodically polls this flag. You could just shut off ctrl-c handling completely, and look for the ^C character when you scan the keyboard (kbhit() and getch()). 1.08 will have setcbrk(), but 1.07 has int 0x21 AH=0x33 already. DJ
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |