Browse Source

Define KEY_MIN and use it in kb.c.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
b9f8599537
2 changed files with 3 additions and 2 deletions
  1. 2
    2
      src/hci/mucurses/kb.c
  2. 1
    0
      src/include/curses.h

+ 2
- 2
src/hci/mucurses/kb.c View File

@@ -67,7 +67,7 @@ int wgetch ( WINDOW *win ) {
67 67
 	c = _wgetc( win );
68 68
 
69 69
 	if ( m_echo ) {
70
-		if ( c >= 0401 && c <= 0633 ) {
70
+		if ( c >= KEY_MIN ) {
71 71
 			switch(c) {
72 72
 			case KEY_LEFT :
73 73
 			case KEY_BACKSPACE :
@@ -112,7 +112,7 @@ int wgetnstr ( WINDOW *win, char *str, int n ) {
112 112
 			_wcursback( win );
113 113
 			wdelch( win );
114 114
 		} else {
115
-			if ( c >= 0401 && c <= 0633 ) {
115
+			if ( c >= KEY_MIN ) {
116 116
 				switch(c) {
117 117
 				case KEY_LEFT :
118 118
 				case KEY_BACKSPACE :

+ 1
- 0
src/include/curses.h View File

@@ -194,6 +194,7 @@ extern unsigned short _LINES;
194 194
 /*
195 195
  * KEY code constants
196 196
  */
197
+#define KEY_MIN		0401		/**< Minimum special key */
197 198
 #define KEY_BREAK	0401		/**< Break key */
198 199
 #define KEY_DOWN	0402		/**< down-arrow key */
199 200
 #define KEY_UP		0403		/**< up-arrow key */

Loading…
Cancel
Save