1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2020 Dmitry Kozlyuk
7 #include "cmdline_private.h"
10 terminal_adjust(struct cmdline *cl)
14 tcgetattr(0, &cl->oldterm);
16 memcpy(&term, &cl->oldterm, sizeof(term));
17 term.c_lflag &= ~(ICANON | ECHO | ISIG);
18 tcsetattr(0, TCSANOW, &term);
24 terminal_restore(const struct cmdline *cl)
26 tcsetattr(fileno(stdin), TCSANOW, &cl->oldterm);