From b9f8599537c6481d78fbf215c92c61eea8100be3 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 20 Dec 2006 21:10:32 +0000 Subject: [PATCH] Define KEY_MIN and use it in kb.c. --- src/hci/mucurses/kb.c | 4 ++-- src/include/curses.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hci/mucurses/kb.c b/src/hci/mucurses/kb.c index 474f11ef..f0c8dcb0 100644 --- a/src/hci/mucurses/kb.c +++ b/src/hci/mucurses/kb.c @@ -67,7 +67,7 @@ int wgetch ( WINDOW *win ) { c = _wgetc( win ); if ( m_echo ) { - if ( c >= 0401 && c <= 0633 ) { + if ( c >= KEY_MIN ) { switch(c) { case KEY_LEFT : case KEY_BACKSPACE : @@ -112,7 +112,7 @@ int wgetnstr ( WINDOW *win, char *str, int n ) { _wcursback( win ); wdelch( win ); } else { - if ( c >= 0401 && c <= 0633 ) { + if ( c >= KEY_MIN ) { switch(c) { case KEY_LEFT : case KEY_BACKSPACE : diff --git a/src/include/curses.h b/src/include/curses.h index 4d89c0ef..ca8e53b5 100644 --- a/src/include/curses.h +++ b/src/include/curses.h @@ -194,6 +194,7 @@ extern unsigned short _LINES; /* * KEY code constants */ +#define KEY_MIN 0401 /**< Minimum special key */ #define KEY_BREAK 0401 /**< Break key */ #define KEY_DOWN 0402 /**< down-arrow key */ #define KEY_UP 0403 /**< up-arrow key */