-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathError.c
More file actions
29 lines (26 loc) · 1.21 KB
/
Copy pathError.c
File metadata and controls
29 lines (26 loc) · 1.21 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* manage_args.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: isel-azz <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/11 07:43:40 by isel-azz #+# #+# */
/* Updated: 2024/05/11 07:43:43 by isel-azz ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void error(void)
{
write(2, "Error\n", 6);
exit(1);
}
int test_case(char **argv, int i, int j)
{
if ((argv[i][j] == '-' && argv[i][j + 1] == '-')
|| (argv[i][j] == '-' && argv[i][j + 1] == '+')
|| (argv[i][j] == '+' && argv[i][j + 1] == '+')
|| (argv[i][j] == '+' && argv[i][j + 1] == '-'))
return (1);
return (0);
}