Expansion: temporarily sharing broken version

This commit is contained in:
Jérôme Guélen 2025-03-19 17:20:03 +01:00
parent 0f8b18b32f
commit ea3ecaaf31
No known key found for this signature in database
7 changed files with 163 additions and 72 deletions

View file

@ -6,7 +6,7 @@
/* By: jguelen <jguelen@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/23 15:02:59 by jguelen #+# #+# */
/* Updated: 2025/03/19 09:18:53 by jguelen ### ########.fr */
/* Updated: 2025/03/19 16:48:12 by jguelen ### ########.fr */
/* */
/* ************************************************************************** */
@ -132,7 +132,7 @@ char fits_pattern(char *str, t_worddesc *pattern)
{
pattern_check[i] = ft_calloc(pattern_len + 1, sizeof(char));
if (!pattern_check[i])
return (destroy_pattern_check(pattern_check, str_len + 1), NULL);
return (destroy_pattern_check(pattern_check, str_len + 1), -1);
i++;
}
build_pattern_checks(str, pattern, pattern_check);
@ -153,7 +153,6 @@ t_wordlist *expand_star(t_worddesc *file_pattern)
char *tmp;
i = 0;
clean_pattern(file_pattern);
while (file_pattern->word[i])
{
if (file_pattern->marker[i] != '\'' && file_pattern->marker[i] != '"'