diff options
Diffstat (limited to 'src/ft_p_line.c')
-rw-r--r-- | src/ft_p_line.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/ft_p_line.c b/src/ft_p_line.c index ddaf0bd..606408b 100644 --- a/src/ft_p_line.c +++ b/src/ft_p_line.c @@ -21,14 +21,21 @@ void ft_p_line(char line[], t_msh *msh) { - int64_t ret; + uint64_t i; + uint64_t count; - if ((ret = ft_strlchr(line, ';') < 0)) + i = 0; + count = 0; + while (line[i] != '\0') { - if (ft_p_lcom(line, 1, msh) < 0) + if (line[i] == ';') { - exit(FT_RET_ALLOC); + count++; } + i++; + } + if (ft_p_lcom(line, count, msh) < 0) + { + exit(FT_RET_ALLOC); } - /* TODO: fun */ } |