| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2023 | ||
| 3 | ** my_printf | ||
| 4 | ** File description: | ||
| 5 | ** Flag to print a %s (a string) | ||
| 6 | */ | ||
| 7 | /** | ||
| 8 | * @file flag_s.c | ||
| 9 | * @brief The file containing the flag_s function | ||
| 10 | * @author Nicolas TORO | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include "myprintf.h" | ||
| 14 | |||
| 15 | 13027 | int flag_s(va_list list, formating_t *formating) | |
| 16 | { | ||
| 17 | 13027 | char *temp = va_arg(list, char *); | |
| 18 | 13027 | char temp2[5000] = {0}; | |
| 19 | |||
| 20 |
2/2✓ Branch 0 taken 12788 times.
✓ Branch 1 taken 239 times.
|
13027 | if (temp == NULL) |
| 21 | 12788 | return 0; | |
| 22 | 239 | my_strcat(temp2, temp); | |
| 23 | 239 | format_it_str(temp2, formating); | |
| 24 | 239 | return my_putstr_fd(temp2, formating->fd); | |
| 25 | } | ||
| 26 |