mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Cleanup
This commit is contained in:
parent
a0f3f9d9b7
commit
ac25e7434c
2 changed files with 9 additions and 11 deletions
14
src/tty.c
14
src/tty.c
|
|
@ -306,6 +306,11 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c
|
|||
}
|
||||
}
|
||||
|
||||
void stdin_restore(void)
|
||||
{
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &stdin_old);
|
||||
}
|
||||
|
||||
void stdin_configure(void)
|
||||
{
|
||||
int status;
|
||||
|
|
@ -339,9 +344,9 @@ void stdin_configure(void)
|
|||
atexit(&stdin_restore);
|
||||
}
|
||||
|
||||
void stdin_restore(void)
|
||||
void stdout_restore(void)
|
||||
{
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &stdin_old);
|
||||
tcsetattr(STDOUT_FILENO, TCSANOW, &stdout_old);
|
||||
}
|
||||
|
||||
void stdout_configure(void)
|
||||
|
|
@ -384,11 +389,6 @@ void stdout_configure(void)
|
|||
atexit(&stdout_restore);
|
||||
}
|
||||
|
||||
void stdout_restore(void)
|
||||
{
|
||||
tcsetattr(STDOUT_FILENO, TCSANOW, &stdout_old);
|
||||
}
|
||||
|
||||
void tty_configure(void)
|
||||
{
|
||||
bool token_found = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue