-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_print_out.c
More file actions
28 lines (25 loc) · 1.13 KB
/
ft_print_out.c
File metadata and controls
28 lines (25 loc) · 1.13 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bnidia <bnidia@student.21-school.ru> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/04 08:42:42 by bnidia #+# #+# */
/* Updated: 2022/05/07 20:42:54 by bnidia ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_fprintf.h"
/* 24 bytes is enough because ull 0xffffffffffffffff - 18 chars */
int ft_print_out(t_pf *z)
{
int i;
i = 0;
if (z->s_i + 24 > BUF_SIZE)
{
i = (int) write(1, z->s, z->s_i);
z->s_printed += z->s_i;
z->s_i = 0;
}
return (i);
}