diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-09-08 17:01:10 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-09-08 17:01:10 +0200 |
commit | 77e5beb02ee3694a4abd722d8186aed0dd40fe75 (patch) | |
tree | 913e819318cbbb7f01be94bff1c8603431b161c4 /src/c_input.c | |
parent | on god? (diff) | |
download | 42-minishell-77e5beb02ee3694a4abd722d8186aed0dd40fe75.tar.gz 42-minishell-77e5beb02ee3694a4abd722d8186aed0dd40fe75.tar.bz2 42-minishell-77e5beb02ee3694a4abd722d8186aed0dd40fe75.tar.xz 42-minishell-77e5beb02ee3694a4abd722d8186aed0dd40fe75.tar.zst 42-minishell-77e5beb02ee3694a4abd722d8186aed0dd40fe75.zip |
added TODO, this is a baseline before reformatting
Diffstat (limited to 'src/c_input.c')
-rw-r--r-- | src/c_input.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/c_input.c b/src/c_input.c index e7a3f44..a4b62ca 100644 --- a/src/c_input.c +++ b/src/c_input.c @@ -22,6 +22,15 @@ #include "m_loop.h" #include "s_struct.h" +/* +** TODO: +** 1 : cleanup +** 2 : prompt on beginning +** 3 : c_set_term(0) on command +** 4 : MAKE IT WORK ON XTERM FFS +** 5 : leaks + */ + uint16_t c_get_win_size(struct winsize *ws) { @@ -35,7 +44,6 @@ uint16_t return (1); } - char *c_delchar(char *str, uint16_t cpos) { char *dst; @@ -47,7 +55,6 @@ char *c_delchar(char *str, uint16_t cpos) if (!(dst = malloc((ft_strlen(str)) * sizeof(char)))) return (NULL); cpos -= 1; - /* ft_printf("[%c] [%d]\n", str[cpos], cpos); */ while (j < (ft_strlen(str) - 1)) { if (i == cpos) @@ -57,12 +64,9 @@ char *c_delchar(char *str, uint16_t cpos) j++; } dst[j] = '\0'; - /* ft_printf("dst : [%s]\n", dst); */ return (dst); } -/* TODO: pos += 1 lettre / -1 si kl / +1 kr del*/ - int16_t c_redraw_line(char *line, uint16_t cpos, t_msh *msh) { |