diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-11-06 23:13:26 +0100 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-11-06 23:13:26 +0100 |
commit | 296f228966acfe2c645a750b6f8c3fed9bddf615 (patch) | |
tree | eb15406a14216e01493c69a6dbaf1416e78db3e5 /src/c_input.c | |
parent | static something (diff) | |
download | 42-minishell-296f228966acfe2c645a750b6f8c3fed9bddf615.tar.gz 42-minishell-296f228966acfe2c645a750b6f8c3fed9bddf615.tar.bz2 42-minishell-296f228966acfe2c645a750b6f8c3fed9bddf615.tar.xz 42-minishell-296f228966acfe2c645a750b6f8c3fed9bddf615.tar.zst 42-minishell-296f228966acfe2c645a750b6f8c3fed9bddf615.zip |
c_ctrls
Diffstat (limited to 'src/c_input.c')
-rw-r--r-- | src/c_input.c | 33 |
1 files changed, 1 insertions, 32 deletions
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 <signal.h> #include <term.h> +#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) { |