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 |
int flag_c(va_list list, formating_t *formating) |
13 |
|
|
{ |
14 |
|
14 |
char temp = va_arg(list, int); |
15 |
|
14 |
char str[2] = {0}; |
16 |
|
14 |
char str_finale[100] = {0}; |
17 |
|
|
|
18 |
|
14 |
str[0] = temp; |
19 |
|
14 |
my_strcat(str_finale, str); |
20 |
|
14 |
format_it_char(str_finale, formating, temp); |
21 |
|
14 |
my_putstrf(formating->fd, str_finale); |
22 |
|
14 |
return my_strlen(str_finale); |
23 |
|
|
} |
24 |
|
|
|