diff options
author | Pixel <> | 2001-04-17 00:46:47 +0000 |
---|---|---|
committer | Pixel <> | 2001-04-17 00:46:47 +0000 |
commit | 4f2aa7d436bb50cef3f9a551f79fa03ea275ab77 (patch) | |
tree | 51984db4e75ce1ac8e1bfe6f079938a54e056bad /lib/terminal.c | |
parent | d3050fa05ca0bc9231eca96bcbf62d1ec60c9f90 (diff) |
POUEEEEEEEEEEEEEET
Diffstat (limited to 'lib/terminal.c')
-rw-r--r-- | lib/terminal.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/terminal.c b/lib/terminal.c index ace1302..adc2a49 100644 --- a/lib/terminal.c +++ b/lib/terminal.c @@ -9,7 +9,8 @@ FILE *input; struct termios initial_settings, new_settings; -void initterm(void) { +void initterm(void) +{ tcgetattr(fileno(input), &initial_settings); new_settings = initial_settings; new_settings.c_lflag &= ~ICANON; @@ -24,11 +25,13 @@ void initterm(void) { } -void clearterm(void) { +void clearterm(void) +{ tcsetattr(fileno(input), TCSANOW, &initial_settings); } -void openterm(void) { +void openterm(void) +{ if (!(input = fopen("/dev/tty", "r"))) { exception(1, _("could not open terminal")); } |