diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-10-26 13:15:16 +0100 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-10-26 13:15:16 +0100 |
commit | deba350a161e2cc6dba22cf253469d7de555f153 (patch) | |
tree | a849e2550ba0a9138d7755a2517db4e403b9305e /src/c_input.c | |
parent | qweqwe (diff) | |
download | 42-minishell-deba350a161e2cc6dba22cf253469d7de555f153.tar.gz 42-minishell-deba350a161e2cc6dba22cf253469d7de555f153.tar.bz2 42-minishell-deba350a161e2cc6dba22cf253469d7de555f153.tar.xz 42-minishell-deba350a161e2cc6dba22cf253469d7de555f153.tar.zst 42-minishell-deba350a161e2cc6dba22cf253469d7de555f153.zip |
ready for merge
Diffstat (limited to '')
-rw-r--r-- | src/c_input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c_input.c b/src/c_input.c index d680552..cab18b8 100644 --- a/src/c_input.c +++ b/src/c_input.c @@ -25,8 +25,13 @@ int16_t c_init_line(uint8_t psx, t_caps *tcaps) { + char *term; + if (tcaps) { + term = getenv("TERM"); + if (!tgetent(NULL, term)) + return (-1); c_set_term_raw(1); signal(SIGINT, SIG_IGN); tcaps->cpos = 0; |