-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
31 lines (28 loc) · 1.17 KB
/
main.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: iyapar <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/29 15:07:53 by iyapar #+# #+# */
/* Updated: 2022/06/30 16:44:50 by iyapar ### ########.fr */
/* */
/* ************************************************************************** */
#include "header.h"
int main(int ac, char **av)
{
t_struct *stack_a;
t_struct *stack_b;
if (ac > 1 && ft_arg_check(av))
{
stack_b = NULL;
stack_a = ft_lst_fill(av, ac);
if (ft_is_sorted(stack_a) == 1)
{
ft_lst_free(&stack_a);
return (0);
}
ft_main_sort(&stack_a, &stack_b, ac - 1);
}
}