linux-dist: Remove unneeded code
This commit is contained in:
parent
5fd66a1322
commit
e466cba3e9
|
@ -192,48 +192,6 @@ void os_CreateWindow()
|
|||
#endif
|
||||
}
|
||||
|
||||
termios tios, orig_tios;
|
||||
|
||||
int setup_curses()
|
||||
{
|
||||
//initscr();
|
||||
//cbreak();
|
||||
//noecho();
|
||||
|
||||
|
||||
/* Get current terminal settings */
|
||||
if (tcgetattr(STDIN_FILENO, &orig_tios)) {
|
||||
printf("Error getting current terminal settings\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(&tios, &orig_tios, sizeof(struct termios));
|
||||
tios.c_lflag &= ~ICANON; //(ECHO|ICANON);&= ~(ICANON | ECHO | ECHOE | ECHOK | ECHONL | ECHOPRT | ECHOKE | ICRNL);
|
||||
|
||||
tios.c_cc[VTIME] = 0;
|
||||
tios.c_cc[VMIN] = 0;
|
||||
|
||||
if (tcsetattr(STDIN_FILENO, TCSANOW, &tios)) {
|
||||
printf("Error applying terminal settings\n");
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (tcgetattr(STDIN_FILENO, &tios)) {
|
||||
tcsetattr(0, TCSANOW, &orig_tios);
|
||||
printf("Error while asserting terminal settings\n");
|
||||
return -3;
|
||||
}
|
||||
|
||||
if ((tios.c_lflag & ICANON) || !(tios.c_lflag & ECHO)) {
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &orig_tios);
|
||||
printf("Could not apply all terminal settings\n");
|
||||
return -4;
|
||||
}
|
||||
|
||||
fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void common_linux_setup();
|
||||
int dc_init(int argc,wchar* argv[]);
|
||||
void dc_run();
|
||||
|
@ -277,10 +235,6 @@ void dc_run();
|
|||
|
||||
int main(int argc, wchar* argv[])
|
||||
{
|
||||
if (setup_curses() < 0)
|
||||
{
|
||||
printf("failed to setup curses!\n");
|
||||
}
|
||||
#ifdef TARGET_PANDORA
|
||||
signal(SIGSEGV, clean_exit);
|
||||
signal(SIGKILL, clean_exit);
|
||||
|
|
Loading…
Reference in New Issue