commit 26ea86ba3aca1f176e6cd862385dfea91e991a5d
parent ae7989574d883afbe9f4be778df669093862dc21
Author: mjkloeckner <martinjkloeckner@gmail.com>
Date: Sat, 13 May 2023 16:45:00 -0300
Removed deprecated code
Diffstat:
M | tui.c | | | 15 | --------------- |
1 file changed, 0 insertions(+), 15 deletions(-)
diff --git a/tui.c b/tui.c
@@ -1,16 +1,9 @@
#include "tui.h"
-#include <stdio.h>
#include <termios.h>
#include <stdlib.h>
#include <unistd.h>
-#include <signal.h>
-#include <string.h>
-#include <ctype.h>
-#define TAB_SIZE 4
-
-static int is_terminal;
static struct termios default_attributes;
void tui_reset_input_mode (void) {
@@ -20,14 +13,6 @@ void tui_reset_input_mode (void) {
void tui_set_input_mode (void) {
struct termios tattr;
- /* Make sure stdin is a terminal. */
- if (!isatty(STDIN_FILENO)) {
- is_terminal = 0;
- return;
- } else {
- is_terminal = 1;
- }
-
/* Save the terminal attributes so we can restore them later. */
tcgetattr(STDIN_FILENO, &default_attributes);
atexit(tui_reset_input_mode);