Thread View: comp.unix.programmer
1 messages
1 total messages
Started by Thomas Vachuska
Mon, 08 Oct 1990 20:57
Interruptable curses 'getch'.
Author: Thomas Vachuska
Date: Mon, 08 Oct 1990 20:57
Date: Mon, 08 Oct 1990 20:57
22 lines
1179 bytes
1179 bytes
Hello...
I was wondering if anyone knows how to coerce 'curses' routine 'getch' to
return with an abnormal status (say -1) after the process receives an interrupt.
This is similar to the semantics of a 'read' call on a slow (tty) device.
The function 'getch' returns -1 if the 'nodelay' is active (for the
particular window), and I'm aware that there is a workaround solution for my
problem by using the 'nodelay' feature, but I'm not willing to pay the CPU
penalty assiciated with polling for input. Next alternative that I considered
is to write 'getich' (or interruptable version of getch) but I figured that
before I do so, I should try to tap the well of your experience and knowledge.
So if anyone has encountered this before and you have a solution, please
let me know.
Thanks
Thomas Vachuska
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads