update stuff
This commit is contained in:
parent
ebf62307e6
commit
9752ce84fb
8 changed files with 375 additions and 16 deletions
33
src/app/sort2.c
Normal file
33
src/app/sort2.c
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* sort2.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/08 15:50:10 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/02/08 16:20:35 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "app/state.h"
|
||||
#include "me/types.h"
|
||||
#include "me/vec/vec_i64.h"
|
||||
|
||||
void push_a(void *s);
|
||||
void push_b(void *s);
|
||||
void swap_a(void *s);
|
||||
void swap_b(void *s);
|
||||
void swap_both(void *s);
|
||||
void rotate_a(void *s);
|
||||
void rotate_b(void *s);
|
||||
void rotate_both(void *s);
|
||||
void rev_rotate_a(void *s);
|
||||
void rev_rotate_b(void *s);
|
||||
void rev_rotate_both(void *s);
|
||||
|
||||
void sort_2(t_state *state)
|
||||
{
|
||||
if (state->stack_a.buffer[0] > state->stack_a.buffer[1])
|
||||
swap_a(state);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue