-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrimhori.c
71 lines (64 loc) · 1.43 KB
/
trimhori.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
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
63
64
65
66
67
68
69
70
71
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* trimhori.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ssalaues <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/18 11:54:22 by ssalaues #+# #+# */
/* Updated: 2017/01/18 16:52:42 by ssalaues ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
char **rml(char **tetro)
{
int c;
int c2;
char **h;
c = 0;
c2 = 0;
h = tetro;
while (tetro)
{
if (*tetro[c2] == '.')
c++;
if (c == 3)
{
tetro++;
h = tetro;
}
if (c2 == 3)
tetro++;
c2++;
}
return (h);
}
char **trim(char **tetro)
{
char **h;
int c;
h = tetro;
c = 0;
while(*tetro)
{
if (c = 3)
tetro
if (**tetro == '#')
tetro++;
else
(*tetro)++;
}
return (h);
}
char **trimt(char **tetro)
{
int c1;
int c2;
c1 = 0;
c2 = 0;
while (c1 < 3)
{
if (tetro[c1][c2] == '.')
c2++;
}
}