-
Notifications
You must be signed in to change notification settings - Fork 0
/
print.c
33 lines (30 loc) · 1.18 KB
/
print.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* print.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aapenko <aapenko@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/14 20:04:27 by aapenko #+# #+# */
/* Updated: 2023/10/15 21:08:34 by aapenko ### ########.fr */
/* */
/* ************************************************************************** */
#include "hotrace.h"
void print_value(char *str, char *temp)
{
int i;
int len;
i = 0;
if (!str)
{
len = ft_strlen(temp);
if (temp[len - 1] == '\n')
write(1, temp, len - 1);
else
write(1, temp, len);
write(1, ": Not found.\n", 13);
return ;
}
len = ft_strlen(str);
write(1, str, len);
}