diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-11-07 23:37:26 +0100 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-11-07 23:37:26 +0100 |
commit | 1494b105cce7eac172bd07cf324ec48a37de46bf (patch) | |
tree | 4c94a2e7f3e48b40338823c18fefd293e42add5a /src/c_ctrls.c | |
parent | c_ctrls (diff) | |
download | 42-minishell-1494b105cce7eac172bd07cf324ec48a37de46bf.tar.gz 42-minishell-1494b105cce7eac172bd07cf324ec48a37de46bf.tar.bz2 42-minishell-1494b105cce7eac172bd07cf324ec48a37de46bf.tar.xz 42-minishell-1494b105cce7eac172bd07cf324ec48a37de46bf.tar.zst 42-minishell-1494b105cce7eac172bd07cf324ec48a37de46bf.zip |
ctrlc \
Diffstat (limited to 'src/c_ctrls.c')
-rw-r--r-- | src/c_ctrls.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/c_ctrls.c b/src/c_ctrls.c index 2f066d6..dce9db6 100644 --- a/src/c_ctrls.c +++ b/src/c_ctrls.c @@ -19,6 +19,17 @@ #include "c_utils.h" #include "m_prompt.h" +t_msh *c_get_msh(int mode, t_msh *src) +{ + static t_msh *msh; + + if (mode == 1) + { + msh = src; + } + return (msh); +} + short c_ctrl_l(char *line, t_caps *tcaps, t_msh *msh) { tputs(tgetstr("cl", NULL), 1, ft_putchar); @@ -43,8 +54,9 @@ void c_signal_int(int signo) msh = NULL; signal(SIGINT, c_signal_int); (void)signo; - msh->ret = 130; + msh = c_get_msh(0, msh); ioctl(1, TIOCSTI, "\002"); + msh->ret = 130; } void c_signal_ign(int signo) |