-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putchar_size.c
32 lines (28 loc) · 1.16 KB
/
ft_putchar_size.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
/* ************************************************************************** */
/* LE - / */
/* / */
/* ft_putchar_size.c .:: .:/ . .:: */
/* +:+:+ +: +: +:+:+ */
/* By: bpajot <[email protected]> +:+ +: +: +:+ */
/* #+# #+ #+ #+# */
/* Created: 2018/02/01 19:24:28 by bpajot #+# ## ## #+# */
/* Updated: 2018/02/16 18:50:46 by bpajot ### #+. /#+ ###.fr */
/* / */
/* / */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putchar_size(int c)
{
return (write(1, &c, 1));
}
int ft_putchar_sizel(char c, int i)
{
int ret;
ret = 0;
while (i > 0)
{
ret += write(1, &c, 1);
i--;
}
return (ret);
}