-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush_swap.c
32 lines (28 loc) · 1.27 KB
/
push_swap.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: shaas <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/13 23:59:41 by shaas #+# #+# */
/* Updated: 2022/03/09 00:17:04 by shaas ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
int main(int argc, char **argv)
{
t_list stack_a;
t_list stack_b;
unsigned int numnum;
stack_b.head = NULL;
stack_b.tail = NULL;
parse_input(argc, argv, &stack_a);
numnum = assign_ranks(&stack_a);
if (!is_sorted(&stack_a, numnum))
logical_algorithm(&stack_a, &stack_b, numnum);
exit_cleanly(&stack_a, &stack_b, EXIT_SUCCESS);
}
/*
printf("\e[96mhere?\e[0m\n");
*/