diff --git a/ConsoleUI/ColorUI.cpp b/ConsoleUI/ColorUI.cpp index 00c06b2..7cce79f 100644 --- a/ConsoleUI/ColorUI.cpp +++ b/ConsoleUI/ColorUI.cpp @@ -15,15 +15,15 @@ struct termios _old, _new; void initTermios(int echo) { tcgetattr(0, &_old); /* grab old terminal i/o settings */ - new = old; /* make new settings same as old settings */ - new.c_lflag &= ~ICANON; /* disable buffered i/o */ - new.c_lflag &= echo ? ECHO : ~ECHO; /* set echo mode */ + _new = _old; /* make new settings same as old settings */ + _new.c_lflag &= ~ICANON; /* disable buffered i/o */ + _new.c_lflag &= echo ? ECHO : ~ECHO; /* set echo mode */ tcsetattr(0, TCSANOW, &_new); /* use these new terminal i/o settings now */ } /* Restore old terminal i/o settings */ void resetTermios(void) { - tcsetattr(0, TCSANOW, &old); + tcsetattr(0, TCSANOW, &_old); } /* Read 1 character - echo defines echo mode */ char getch_(int echo) @@ -48,6 +48,15 @@ char getche(void) namespace _cns { +/// Stop endless compile error +static int _key_min(int a,int b) +{ + return a