summaryrefslogtreecommitdiffstats
path: root/src/c_utils.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-09-09 15:57:14 +0200
committersalad <fmoenne-@student.le-101.fr>2020-09-09 15:57:14 +0200
commit1c5c7fb2cda9fbc9ea4a6240adbcafed81764c6f (patch)
tree6bdff3e3184ddbe42c058905bf70091daa2034c4 /src/c_utils.c
parentinsert a char try it (diff)
download42-minishell-1c5c7fb2cda9fbc9ea4a6240adbcafed81764c6f.tar.gz
42-minishell-1c5c7fb2cda9fbc9ea4a6240adbcafed81764c6f.tar.bz2
42-minishell-1c5c7fb2cda9fbc9ea4a6240adbcafed81764c6f.tar.xz
42-minishell-1c5c7fb2cda9fbc9ea4a6240adbcafed81764c6f.tar.zst
42-minishell-1c5c7fb2cda9fbc9ea4a6240adbcafed81764c6f.zip
LITERALLY C89
Diffstat (limited to 'src/c_utils.c')
-rw-r--r--src/c_utils.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/c_utils.c b/src/c_utils.c
index 6621a1a..8433d40 100644
--- a/src/c_utils.c
+++ b/src/c_utils.c
@@ -24,11 +24,13 @@
/*
** TODO:
-** 1 : cleanup
-** 2 : prompt on beginning
-** 3 : c_set_term(0) on command
-** 4 : MAKE IT WORK ON XTERM FFS (arrows + reset term)
-** 5 : leaks
+** cursor on char insert
+** quotes
+** MAKE IT WORK ON XTERM FFS (arrows + reset term)
+** leaks
+** cleanup DONE
+** prompt on beginning DONE
+** c_set_term(0) on command DONE
*/
uint16_t
@@ -45,9 +47,9 @@ uint16_t
}
char
-*c_insert_char(char *str,
- char c,
- t_caps *tcaps)
+ *c_insert_char(char *str,
+ char c,
+ t_caps *tcaps)
{
size_t i;
size_t j;
@@ -70,6 +72,7 @@ char
j++;
}
}
+ tcaps->cpos++;
dst[len] = '\0';
ft_memdel((void*)&str);
return (dst);