merging luke remote with origin local

This commit is contained in:
hugogogo
2021-11-02 13:56:26 +01:00
26 changed files with 548 additions and 312 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 09:25:35 by lperrey #+# #+# */
/* Updated: 2021/10/28 17:04:03 by hulamy ### ########.fr */
/* Updated: 2021/11/02 13:52:23 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -85,7 +85,7 @@ size_t ft_2d_arrlen(void *ptr) // Replace ft_arrlen()
return (len);
}
char **ft_dup_2d_char_arr(char **ptr)
char **ft_dup_2d_char_arr(char **ptr)
{
unsigned int i;
char **arr;
@@ -125,6 +125,7 @@ void *ft_resize_2d_arr(void *ptr, size_t add_nbr)
return (new_arr);
}
// pour imprimer une char ** en precisant comment separer les char *
void print_matrix(char **matrix, char *sep)
{
int i;
@@ -141,27 +142,11 @@ void print_matrix(char **matrix, char *sep)
write(1, "\n", 1);
}
void print_token(t_token *token, char *sep)
t_list *ft_lstbeforelast(t_list *lst)
{
while(token)
{
printf("%s - ", token->content);
if(token->id == T_TOKEN)
printf("T_TOKEN");
else if(token->id == T_LESS)
printf("T_LESS");
else if(token->id == T_GREAT)
printf("T_GREAT");
else if(token->id == T_PIPE)
printf("T_PIPE");
else if(token->id == T_DLESS)
printf("T_DLESS");
else if(token->id == T_DGREAT)
printf("T_DGREAT");
else if(token->id == T_WORD)
printf("T_WORD");
printf("%s", sep);
token = token->next;
}
if (!lst || !lst->next)
return (NULL);
while (lst->next->next)
lst = lst->next;
return (lst);
}