Lines Matching defs:keyboard
9 /* $Id: keyboard.c,v 1.7 2007/06/19 23:47:19 tbox Exp $ */
25 #include <isc/keyboard.h>
29 isc_keyboard_open(isc_keyboard_t *keyboard) {
32 REQUIRE(keyboard != NULL);
38 keyboard->fd = fd;
40 keyboard->result = ISC_R_SUCCESS;
46 isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleeptime) {
47 REQUIRE(keyboard != NULL);
49 if (sleeptime > 0 && keyboard->result != ISC_R_CANCELED)
52 keyboard->fd = -1;
58 isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp) {
62 REQUIRE(keyboard != NULL);
65 cc = read(keyboard->fd, &c, 1);
67 keyboard->result = ISC_R_IOERROR;
68 return (keyboard->result);
77 isc_keyboard_canceled(isc_keyboard_t *keyboard) {
78 return (ISC_TF(keyboard->result == ISC_R_CANCELED));