Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2023 | ||
3 | ** my_printf | ||
4 | ** File description: | ||
5 | ** The functions for apply format to a string | ||
6 | */ | ||
7 | /** | ||
8 | * @file format_it_str.c | ||
9 | * @brief The file containing the format_it_str function | ||
10 | * @author Nicolas TORO | ||
11 | */ | ||
12 | |||
13 | #include "myprintf.h" | ||
14 | |||
15 | 245 | void format_it_str(char *str_finale, | |
16 | formating_t *formating) | ||
17 | { | ||
18 | 245 | void (*format[])(char *, formating_t *) = | |
19 | {&format_moins_str, &format_plus_str, | ||
20 | &format_esp_str, &format_hash_str, &format_zero_str}; | ||
21 | |||
22 |
4/4✓ Branch 0 taken 238 times.
✓ Branch 1 taken 7 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 237 times.
|
245 | if (formating->id_ft == -1 && formating->id_wd != -1) |
23 | 1 | format[2](str_finale, formating); | |
24 |
2/2✓ Branch 0 taken 1225 times.
✓ Branch 1 taken 245 times.
|
1470 | for (int i = 0; i < 5; i++) { |
25 |
2/2✓ Branch 0 taken 7 times.
✓ Branch 1 taken 1218 times.
|
1225 | if (formating->id_ft == i) |
26 | 7 | format[i](str_finale, formating); | |
27 | } | ||
28 | 245 | return; | |
29 | } | ||
30 |