From 5c8ded7ac978cde22cba31d1d03086f9a60a101b Mon Sep 17 00:00:00 2001 From: salad Date: Fri, 11 Sep 2020 16:01:55 +0200 Subject: grep TODO c_utils.c --- src/c_input.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'src/c_input.c') diff --git a/src/c_input.c b/src/c_input.c index 2435e4a..ed60ae4 100644 --- a/src/c_input.c +++ b/src/c_input.c @@ -21,24 +21,6 @@ #include "m_loop.h" -int16_t - c_new_line(char *buf, - char **line, - t_msh *msh, - t_caps *tcaps) -{ - write(1, buf, ft_strlen(buf)); - tputs(tgetstr("cr", NULL), 1, ft_putchar); - c_set_term_raw(0); - m_parse_and_run_line(*line, msh); - *line = NULL; - tcaps->cpos = 0; - tputs(tgetstr("cr", NULL), 1, ft_putchar); - c_set_term_raw(1); - m_prompt_psx(1, msh); - return (1); -} - int16_t c_back_slash(char **line, t_caps *tcaps) @@ -64,6 +46,17 @@ int16_t return (1); } +int16_t + c_ctrl_c(char *line, + t_caps *tcaps, + t_msh *msh) +{ + tputs(tgetstr("cl", NULL), 1, ft_putchar); + m_prompt_psx(1, msh); + c_redraw_line(line, tcaps->cpos, msh); + return (1); +} + int16_t c_home_key(t_caps *tcaps) { @@ -94,7 +87,6 @@ int16_t return (1); } - int16_t c_key_right(uint32_t len, t_caps *tcaps) -- cgit v1.2.3