home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
PROGRAM
/
AECUR100.ZIP
/
CONTRIB
/
CURSES
/
SRC
/
KBGETC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-08
|
602b
|
34 lines
/*----------------------------------------------------------------------
*
* kbgetc.c
*
* copyright (c) 1987,88,89,90 J. Alan Eldridge
*
* this is the non-tasking keyboard handler for Curses
*
*----------------------------------------------------------------------
*/
#include "curses.h"
/*
kbgetc()
get next character available from keyboard
if key is ctl-backslash, cleanup and exit (panic)
*/
int
kbgetc()
{
int c = _kb_getc();
if (c == K_CTL_BKSLASH) {
endwin();
exit(1);
}
return c;
}