-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.c
35 lines (33 loc) · 1.38 KB
/
errors.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
33
34
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* errors.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ycanga <ycanga@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/12 22:12:03 by ycanga #+# #+# */
/* Updated: 2022/10/12 22:12:04 by ycanga ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
/**
* Hataları kontrol eder ve varsa yığınları serbest bırakır.
*
* @param a İlk yığın
* @param b Sıralanmayan yığın.
* @param err 0 = geçersiz komut, 1 = geçersiz sayı, 2 = geçersiz sayı, 3 = geçersiz sayı
*/
void ft_error(t_stack *a, t_stack *b, int err)
{
(void)a;
(void)b;
if (err == 0)
write(2, "Error\n", 6);
if (err == 1)
write(2, "Error\n", 6);
if (err == 2)
write(2, "Error\n", 6);
if (err == 3)
write(2, "Error\n", 6);
ft_free(a, b);
}