mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2026-11-02 12:25:12 +01:00
「✨」 feat(Prompt): prompt working
This commit is contained in:
1 parent
6c254630fa
commit
5c7a4e8b5a
19 files changed
+121
-83
No files matched your search
@@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/12 09:14:19 by adjoly #+# #+# */
|
||||
/* Updated: 2024/02/04 14:43:50 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/04/27 17:21:29 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -38,7 +38,7 @@ static int ft_countletter(char const *s, char sep)
|
||||
return (i);
|
||||
}
|
||||
|
||||
static void *ft_freearr(char **arr)
|
||||
static void *ft_freearr_s(char **arr)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -67,7 +67,7 @@ char **ft_split_to_result(char **tab, char const *s, char c)
|
||||
k = 0;
|
||||
tab[j] = ft_calloc(ft_countletter(&s[i], c) + 1, sizeof(char));
|
||||
if (!tab[j])
|
||||
return (ft_freearr(tab));
|
||||
return (ft_freearr_s(tab));
|
||||
while (s[i] && s[i] != c)
|
||||
tab[j][k++] = s [i++];
|
||||
tab[j][k] = '\0';
|
||||
|
||||
Reference in new issue
Block a user