Changeset 159 for libcaca/trunk/libee/io.c
- Timestamp:
- Nov 12, 2003, 10:18:50 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/libee/io.c
r155 r159 23 23 #include "config.h" 24 24 25 #if def USE_SLANG25 #if defined(USE_SLANG) 26 26 # include <slang.h> 27 #elif USE_NCURSES27 #elif defined(USE_NCURSES) 28 28 # include <curses.h> 29 #elif USE_CONIO29 #elif defined(USE_CONIO) 30 30 # include <conio.h> 31 31 #else … … 34 34 35 35 #include "ee.h" 36 #include "ee_internals.h" 36 37 37 38 char ee_get_key(void) 38 39 { 39 #ifdef USE_SLANG 40 if(SLang_input_pending(0)) 41 { 42 return SLang_getkey(); 43 } 44 #elif USE_NCURSES 40 #if defined(USE_SLANG) 41 return SLang_input_pending(0) ? SLang_getkey() : 0; 42 43 #elif defined(USE_NCURSES) 45 44 char key = getch(); 45 return key != ERR ? key : 0; 46 46 47 if(key != ERR) 48 { 49 return key; 50 } 51 #elif USE_CONIO 47 #elif defined(USE_CONIO) 52 48 return _conio_kbhit() ? getch() : 0; 53 49 54 50 #endif 55 56 return 0;57 51 } 58 52
Note: See TracChangeset
for help on using the changeset viewer.