merging conflicts

This commit is contained in:
Hugo LAMY
2021-12-20 15:07:58 +01:00
parent 59a43ea1cc
commit 0a64977cdc
8 changed files with 43 additions and 35 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/07 02:01:33 by lperrey #+# #+# */
/* Updated: 2021/12/16 03:03:27 by lperrey ### ########.fr */
/* Updated: 2021/12/20 14:47:04 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -35,7 +35,7 @@ t_list *expand_token(char *content)
expand->next = content_copy(content, &i, &quotes_state);
expand = expand->next;
if (!expand)
{//todo wrap
{
perror("expand_token() error");
return (ft_lstclear(&head.next, free));
}
@@ -88,7 +88,7 @@ static char *env_var_expansion(char *content, int *i)
{
char *expansion;
(*i)++; // skip '$'
(*i)++;
if (content[*i] == '?')
{
(*i)++;
@@ -112,7 +112,7 @@ static char *retrieve_var(char *content, int *i)
char *tmp;
int i_exp;
expansion = ft_calloc(ft_strlen(&content[*i - 1]) + 1, 1); // *i - 1 for '$' skip
expansion = ft_calloc(ft_strlen(&content[*i - 1]) + 1, 1);
if (!expansion)
return (NULL);
i_exp = 0;