| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2023 | ||
| 3 | ** my_printf | ||
| 4 | ** File description: | ||
| 5 | ** Flag to print a %c (a char) | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include <stdarg.h> | ||
| 9 | #include "my.h" | ||
| 10 | #include "myformats.h" | ||
| 11 | |||
| 12 | 14 | void format_it_char(char *str_finale, | |
| 13 | formating_t *formating, char c) | ||
| 14 | { | ||
| 15 | 14 | void (*format[])(char *, formating_t *, char c) = | |
| 16 | {&format_moins_char, &format_plus_char, | ||
| 17 | &format_esp_char, &format_hash_char, &format_zero_char}; | ||
| 18 | |||
| 19 |
4/4✓ Branch 0 taken 7 times.
✓ Branch 1 taken 7 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 6 times.
|
14 | if (formating->id_ft == -1 && formating->id_wd != -1) { |
| 20 | 1 | format[2](str_finale, formating, c); | |
| 21 | } | ||
| 22 |
2/2✓ Branch 0 taken 70 times.
✓ Branch 1 taken 14 times.
|
84 | for (int i = 0; i < 5; i++) { |
| 23 |
2/2✓ Branch 0 taken 7 times.
✓ Branch 1 taken 63 times.
|
70 | if (formating->id_ft == i) { |
| 24 | 7 | format[i](str_finale, formating, c); | |
| 25 | } | ||
| 26 | } | ||
| 27 | 14 | return; | |
| 28 | } | ||
| 29 |