raccourcis de fillsolution
This commit is contained in:
13
srcs/print.c
13
srcs/print.c
@@ -17,18 +17,13 @@
|
||||
*/
|
||||
void fill_solution(t_list *solution, char *sp)
|
||||
{
|
||||
t_stack **tmp1;
|
||||
t_stack **tmp2;
|
||||
t_stack *a;
|
||||
t_stack *b;
|
||||
char *stack;
|
||||
|
||||
tmp1 = solution->content;
|
||||
tmp2 = solution->next->content;
|
||||
a = *tmp1;
|
||||
b = *tmp2;
|
||||
stack = ft_strdup(sp);
|
||||
stack = ft_strjoinfree(stack, ft_strdup("!a:"));
|
||||
a = *(t_stack **)(solution->content);
|
||||
b = *(t_stack **)(solution->next->content);
|
||||
stack = ft_strjoinfree(ft_strdup(sp), ft_strdup("!a:"));
|
||||
while(a != NULL)
|
||||
{
|
||||
stack = ft_strjoinfree(stack, ft_strdup(" "));
|
||||
@@ -36,7 +31,7 @@ void fill_solution(t_list *solution, char *sp)
|
||||
a = a->next;
|
||||
}
|
||||
stack = ft_strjoinfree(stack, ft_strdup("!b:"));
|
||||
while(b)
|
||||
while(b != NULL)
|
||||
{
|
||||
stack = ft_strjoinfree(stack, ft_strdup(" "));
|
||||
stack = ft_strjoinfree(stack, ft_itoa(b->n));
|
||||
|
||||
Reference in New Issue
Block a user