keyboard.c revision 15a44745412679c30a6d022733925af70a38b715
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Copyright (C) 2000 Internet Software Consortium.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Permission to use, copy, modify, and distribute this software for any
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * purpose with or without fee is hereby granted, provided that the above
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * copyright notice and this permission notice appear in all copies.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt/* $Id: keyboard.c,v 1.5 2000/07/27 09:52:49 tale Exp $ */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt current_mode.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if (tcsetattr(fd, TCSAFLUSH, ¤t_mode) < 0) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntisc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleeptime) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt (void)tcsetattr(keyboard->fd, TCSAFLUSH, &keyboard->saved_mode);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntisc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned char c;