-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpf_iniatalize.c
61 lines (57 loc) · 1.74 KB
/
pf_iniatalize.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pf_iniatalize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mg <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/02 14:31:46 by mg #+# #+# */
/* Updated: 2020/06/27 22:17:01 by mg ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
static inline void pf_intialize_format_2(t_fmt *flag)
{
flag->is_char = 0;
flag->is_upper = 0;
flag->is_llong = 0;
flag->is_numeric = 0;
flag->is_signed = 0;
flag->is_negative = 0;
flag->is_normalized = 0;
flag->is_zero = 0;
flag->is_null = 0;
flag->is_nan = 0;
flag->is_inf = 0;
flag->is_integer = 0;
flag->is_float = 0;
}
void pf_intialize_format(t_fmt *flag)
{
flag->length = 0;
flag->spec = 0;
flag->width = 0;
flag->precision = -1;
flag->group = 0;
flag->left = 0;
flag->showsign = 0;
flag->space = 0;
flag->alt = 0;
flag->pad = 0;
pf_intialize_format_2(flag);
flag->base = 0;
flag->exponent = 0;
flag->null_mantissa = 1;
}
void pf_reset_format(t_fmt *flag)
{
flag->length = 0;
flag->width = 0;
flag->precision = -1;
flag->group = 0;
flag->left = 0;
flag->showsign = 0;
flag->space = 0;
flag->alt = 0;
flag->pad = 0;
}