GCC Code Coverage Report


Directory: ./
File: lib/my/my_printf/flag_c.c
Date: 2024-06-05 00:36:48
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

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 * @file flag_c.c
9 * @brief The file containing the flag_c function
10 * @author Nicolas TORO
11 */
12
13 #include "myprintf.h"
14
15 10923 int flag_c(va_list list, formating_t *formating)
16 {
17 10923 char temp = va_arg(list, int);
18 10923 char str[2] = {0};
19 10923 char str_finale[100] = {0};
20
21 10923 str[0] = temp;
22 10923 my_strcat(str_finale, str);
23 10923 format_it_char(str_finale, formating, temp);
24 10923 return my_putstr_fd(str_finale, formating->fd);
25 }
26