-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_type.c
executable file
·33 lines (31 loc) · 1.4 KB
/
check_type.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* check_type.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: javrodri <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/12/08 17:11:51 by javrodri #+# #+# */
/* Updated: 2020/01/03 16:26:21 by javrodri ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void check_type(const char *format, t_struct *flags)
{
if (format[flags->i] == 'd' || format[flags->i] == 'i')
type_integer(flags);
if (format[flags->i] == 's')
type_string(flags);
if (format[flags->i] == 'c')
type_char(flags);
if (format[flags->i] == 'u')
type_unsigned_int(flags);
if (format[flags->i] == 'x')
type_hexa_low(flags);
if (format[flags->i] == 'X')
type_hexa_upper(flags);
if (format[flags->i] == '%')
type_percent(flags);
if (format[flags->i] == 'p')
type_pointer(flags);
}