diff options
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) { |