home *** CD-ROM | disk | FTP | other *** search
- /*----------------------------------------------------------------------
- *
- * 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;
- }
-