-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_printf_utils.c
44 lines (40 loc) · 1.35 KB
/
ft_printf_utils.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: emdi-mar <emdi-mar@student.42roma.it> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/19 22:24:04 by emdi-mar #+# #+# */
/* Updated: 2025/02/19 23:47:30 by emdi-mar ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void init_fields(t_fields *flds)
{
flds->printed = 0;
flds->minus = 0;
flds->plus = 0;
flds->zero = 0;
flds->space = 0;
flds->hash = 0;
flds->width = 0;
flds->dot = -1;
flds->type = 0;
}
void reset_fields(t_fields *flds)
{
flds->minus = 0;
flds->plus = 0;
flds->zero = 0;
flds->space = 0;
flds->hash = 0;
flds->width = 0;
flds->dot = -1;
flds->type = 0;
}
void putchar_ftprintf(char c, t_fields *flds)
{
ft_putchar_fd(c, STDO);
(flds->printed)++;
}