GCC Code Coverage Report


Directory: ./
File: lib/my/flags/flag_c.c
Date: 2024-06-05 00:29:21
Exec Total Coverage
Lines: 9 9 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 #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