Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2023 | ||
3 | ** format it | ||
4 | ** File description: | ||
5 | ** do the function linked to format | ||
6 | */ | ||
7 | |||
8 | #include <stddef.h> | ||
9 | #include "my.h" | ||
10 | #include "myformats.h" | ||
11 | |||
12 | 99 | void format_it_int(char *str_finale, formating_t *formating, size_t nb) | |
13 | { | ||
14 | 99 | void (*format[])(char *, formating_t *, size_t) = | |
15 | {&format_moins_int, &format_plus_int, | ||
16 | &format_esp_int, &format_hash_int, &format_zero_int}; | ||
17 | |||
18 |
4/4✓ Branch 0 taken 86 times.
✓ Branch 1 taken 13 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 84 times.
|
99 | if (formating->id_ft == -1 && formating->id_wd != -1) { |
19 | 2 | format[2](str_finale, formating, nb); | |
20 | } | ||
21 |
2/2✓ Branch 0 taken 495 times.
✓ Branch 1 taken 99 times.
|
594 | for (int i = 0; i < 5; i++) { |
22 |
2/2✓ Branch 0 taken 13 times.
✓ Branch 1 taken 482 times.
|
495 | if (formating->id_ft == i) { |
23 | 13 | format[i](str_finale, formating, nb); | |
24 | } | ||
25 | } | ||
26 | 99 | return; | |
27 | } | ||
28 |