Repository navigation
Expand file tree
/
Copy pathclio_lib.c
More file actions
50 lines (44 loc) · 1.37 KB
/
Copy pathclio_lib.c
File metadata and controls
50 lines (44 loc) · 1.37 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* clio_lib.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: agabasov <agabasov@student.42lausanne +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/06/25 11:24:59 by agabasov #+# #+# */
/* Updated: 2023/06/25 11:25:00 by agabasov ### ########.fr */
/* */
/* ************************************************************************** */
#include "lib.h"
// write one character
void ft_putchar(char c)
{
write(1, &c, 1);
}
// write '\0' terminated string
void ft_putstr(const char *str)
{
write(1, str, ft_strlen(str));
}
// write error message with details
void ft_puterr(char *error_detail)
{
write(2, error_detail, ft_strlen(error_detail));
}
void ft_print_map(t_map map)
{
int j;
int i;
i = 0;
while (i < map.spec.n)
{
j = 0;
while (j < map.spec.len)
{
ft_putchar(map.str[i][j]);
j++;
}
i++;
ft_putchar('\n');
}
}