diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-09-11 16:01:55 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-09-11 16:01:55 +0200 |
commit | 5c8ded7ac978cde22cba31d1d03086f9a60a101b (patch) | |
tree | 0f75f3f47c2c43fed7b1fd24b1d78a435310ec85 /src/c_input.c | |
parent | home works, not END. lets go for a bit of norming (diff) | |
download | 42-minishell-5c8ded7ac978cde22cba31d1d03086f9a60a101b.tar.gz 42-minishell-5c8ded7ac978cde22cba31d1d03086f9a60a101b.tar.bz2 42-minishell-5c8ded7ac978cde22cba31d1d03086f9a60a101b.tar.xz 42-minishell-5c8ded7ac978cde22cba31d1d03086f9a60a101b.tar.zst 42-minishell-5c8ded7ac978cde22cba31d1d03086f9a60a101b.zip |
grep TODO c_utils.c
Diffstat (limited to '')
-rw-r--r-- | src/c_input.c | 30 |
1 files changed, 11 insertions, 19 deletions
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 @@ -22,24 +22,6 @@ 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) { @@ -65,6 +47,17 @@ int16_t } 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) { uint16_t i; @@ -94,7 +87,6 @@ int16_t return (1); } - int16_t c_key_right(uint32_t len, t_caps *tcaps) |