-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtype_c.c
More file actions
28 lines (25 loc) · 1.14 KB
/
type_c.c
File metadata and controls
28 lines (25 loc) · 1.14 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* type_c.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jamrabhi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 18:35:31 by jamrabhi #+# #+# */
/* Updated: 2020/02/22 22:15:27 by jamrabhi ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void type_c(va_list arg, t_specif *specif)
{
char c;
int j;
c = va_arg(arg, int);
j = 0;
if (specif->left == 1)
ft_putchar_count(c);
while (j++ < (specif->width - 1))
ft_putchar_count(' ');
if (specif->left == 0)
ft_putchar_count(c);
}