finish the bonus just need to verify some files i guess

This commit is contained in:
Maoake Teriierooiterai
2026-01-14 10:22:15 +01:00
parent fe69eeb821
commit 68dbe33733
18 changed files with 116 additions and 60 deletions

View File

@@ -31,7 +31,8 @@ void pa(t_stacks *stacks)
}
stack_add_front(&(stacks->a), b_push);
stacks->pa++;
write(1, "pa\n", 3);
if (stacks->print)
write(1, "pa\n", 3);
}
void pb(t_stacks *stacks)
@@ -51,5 +52,6 @@ void pb(t_stacks *stacks)
}
stack_add_front(&(stacks->b), a_push);
stacks->pb++;
write(1, "pb\n", 3);
if (stacks->print)
write(1, "pb\n", 3);
}

View File

@@ -26,7 +26,8 @@ void rrb(t_stacks *stacks)
if (stacks && stacks->b && stacks->b->previous)
stacks->b = stacks->b->previous;
stacks->rrb++;
write(1, "rrb\n", 4);
if (stacks->print)
write(1, "rrb\n", 4);
}
void rrr(t_stacks *stacks)
@@ -36,5 +37,6 @@ void rrr(t_stacks *stacks)
if (stacks && stacks->a && stacks->a->previous)
stacks->a = stacks->a->previous;
stacks->rrr++;
write(1, "rrr\n", 4);
if (stacks->print)
write(1, "rrr\n", 4);
}

View File

@@ -18,7 +18,8 @@ void ra(t_stacks *stacks)
if (stacks && stacks->a && stacks->a->next)
stacks->a = stacks->a->next;
stacks->ra++;
write(1, "ra\n", 3);
if (stacks->print)
write(1, "ra\n", 3);
}
void rb(t_stacks *stacks)
@@ -26,7 +27,8 @@ void rb(t_stacks *stacks)
if (stacks && stacks->b && stacks->b->next)
stacks->b = stacks->b->next;
stacks->rb++;
write(1, "rb\n", 3);
if (stacks->print)
write(1, "rb\n", 3);
}
void rr(t_stacks *stacks)
@@ -36,5 +38,6 @@ void rr(t_stacks *stacks)
if (stacks && stacks->b && stacks->b->next)
stacks->b = stacks->b->next;
stacks->rr++;
write(1, "rr\n", 3);
if (stacks->print)
write(1, "rr\n", 3);
}

View File

@@ -25,7 +25,8 @@ void sa(t_stacks *stacks)
a->value = a->next->value;
a->next->value = stock;
stacks->sa++;
write(1, "sa\n", 3);
if (stacks->print)
write(1, "sa\n", 3);
}
void sb(t_stacks *stacks)
@@ -40,7 +41,8 @@ void sb(t_stacks *stacks)
b->value = b->next->value;
b->next->value = stock;
stacks->sb++;
write(1, "sb\n", 3);
if (stacks->print)
write(1, "sb\n", 3);
}
void ss(t_stacks *stacks)
@@ -66,5 +68,6 @@ void ss(t_stacks *stacks)
a->next->value = stock;
}
stacks->ss++;
write(1, "ss\n", 3);
if (stacks->print)
write(1, "ss\n", 3);
}