-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.c
More file actions
62 lines (55 loc) · 1.36 KB
/
error.c
File metadata and controls
62 lines (55 loc) · 1.36 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* error.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: iariss <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/01/15 14:13:45 by iariss #+# #+# */
/* Updated: 2021/01/17 16:37:27 by iariss ### ########.fr */
/* */
/* ************************************************************************** */
#include "file.h"
void ft_string_put(char *s)
{
int i;
i = 0;
while (s[i])
{
write(1, &s[i], 1);
i++;
}
exit(0);
}
int number(char *mapi, int *i)
{
int k;
k = *i;
while (ft_isdigit(mapi[*i]))
(*i)++;
if (*i == k)
return (0);
return (1);
}
void sp_count(t_vars *vars)
{
int x;
int y;
int z;
y = 0;
z = 0;
while (vars->ss.bp[y])
{
x = 0;
while (vars->ss.bp[y][x])
{
if (vars->ss.bp[y][x] == '2')
{
z++;
}
x++;
}
y++;
}
vars->num_sps = z;
}