Lines Matching defs:keyboard
18 /* $Id: keyboard.c,v 1.7 2007/06/19 23:47:19 tbox Exp $ */
34 #include <isc/keyboard.h>
38 isc_keyboard_open(isc_keyboard_t *keyboard) {
41 REQUIRE(keyboard != NULL);
47 keyboard->fd = fd;
49 keyboard->result = ISC_R_SUCCESS;
55 isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleeptime) {
56 REQUIRE(keyboard != NULL);
58 if (sleeptime > 0 && keyboard->result != ISC_R_CANCELED)
61 keyboard->fd = -1;
67 isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp) {
71 REQUIRE(keyboard != NULL);
74 cc = read(keyboard->fd, &c, 1);
76 keyboard->result = ISC_R_IOERROR;
77 return (keyboard->result);
86 isc_keyboard_canceled(isc_keyboard_t *keyboard) {
87 return (ISC_TF(keyboard->result == ISC_R_CANCELED));