From 296f228966acfe2c645a750b6f8c3fed9bddf615 Mon Sep 17 00:00:00 2001 From: salad Date: Fri, 6 Nov 2020 23:13:26 +0100 Subject: c_ctrls --- src/c_input.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'src/c_input.c') diff --git a/src/c_input.c b/src/c_input.c index f26bbad..ce571ca 100644 --- a/src/c_input.c +++ b/src/c_input.c @@ -16,6 +16,7 @@ #include #include +#include "c_ctrls.h" #include "c_init.h" #include "c_keys.h" #include "c_input.h" @@ -23,38 +24,6 @@ #include "m_prompt.h" #include "m_loop.h" -t_msh - *c_get_struct(int mode, t_msh **msh) -{ - static t_msh *mstruct = NULL; - - if (mode) - { - mstruct = *msh; - } - return (mstruct); -} - -void c_signal_int(int signo) -{ - t_msh *msh; - - msh = NULL; - signal(SIGINT, c_signal_int); - (void)signo; - msh = c_get_struct(0, &msh); - ft_printf("[%s]\n", msh->ps[0]); - msh->ret = 130; - ioctl(1, TIOCSTI, "\002"); -} - -void c_signal_ign(int signo) -{ - signal(SIGINT, c_signal_int); - (void)signo; - signal(SIGTSTP, SIG_IGN); -} - short c_init_line(char psx, t_caps *tcaps) { -- cgit v1.2.3