-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf_putint_bonus.c
27 lines (24 loc) · 1.22 KB
/
ft_printf_putint_bonus.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_putint_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dnakano <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/11 08:57:15 by dnakano #+# #+# */
/* Updated: 2020/10/18 14:25:23 by dnakano ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdarg.h>
#include "libftprintf.h"
int ft_printf_putint(const char fc, va_list *ap,
t_printf_flags *flags)
{
int count;
count = 0;
if (fc == 'd' || fc == 'i')
count = ft_printf_putsignedint(ap, flags);
else if (fc == 'u' || fc == 'x' || fc == 'X' || fc == 'o')
count = ft_printf_putunsignedint(ap, flags, fc);
return (count);
}