summaryrefslogtreecommitdiffstats
path: root/src/c_keys.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-11-06 20:17:34 +0100
committersalad <fmoenne-@student.le-101.fr>2020-11-06 20:17:34 +0100
commit87a70e527eca58cad87c14fd2a8595b8bce85e25 (patch)
tree9bbb931a9bdd16d93f6546e1e7f254ba3c3db221 /src/c_keys.c
parentC-c arrows (diff)
download42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.gz
42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.bz2
42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.xz
42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.tar.zst
42-minishell-87a70e527eca58cad87c14fd2a8595b8bce85e25.zip
major changes to ctrlc + c, no norm for now
Diffstat (limited to 'src/c_keys.c')
-rw-r--r--src/c_keys.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/c_keys.c b/src/c_keys.c
index 6d472c4..8c06a85 100644
--- a/src/c_keys.c
+++ b/src/c_keys.c
@@ -12,6 +12,7 @@
#include <term.h>
#include <libft.h>
+#include <unistd.h>
#include "c_init.h"
#include "c_utils.h"
@@ -26,6 +27,16 @@ short
return (1);
}
+char
+ *c_ctrl_c(char **line, char *buf, t_msh *msh)
+{
+ msh->ret = 130;
+ buf[0] = '\n';
+ write(1, "\n", 1);
+ ft_memdel((void**)line);
+ return (ft_strdup("\0"));
+}
+
short
c_home_key(unsigned int plen, t_caps *tcaps)
{