summaryrefslogtreecommitdiffstats
path: root/src/c_ctrls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_ctrls.c')
-rw-r--r--src/c_ctrls.c14
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)