diff --git a/libConsole/getch.c b/libConsole/getch.c deleted file mode 100644 --- a/libConsole/getch.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include - -#ifdef WIN32 -#include - -int cross_getch () -{ - int ch = -1; - - while (!kbhit ()) { - ch = getch (); - } - - return ch; -} - -#else -#include - -int cross_getch () -{ - int ch = -1, fd = 0; - struct termios neu, alt; - - fd = fileno (stdin); - tcgetattr (fd, &alt); - neu = alt; - neu.c_lflag &= ~(ICANON | ECHO); - tcsetattr (fd, TCSANOW, &neu); - ch = getchar (); - tcsetattr (fd, TCSANOW, &alt); - return ch; -} -#endif - -JNIEXPORT jint JNICALL Java_Console_getch (JNIEnv * env, jclass lass) -{ - return cross_getch (); -}