-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflags_left.c
26 lines (24 loc) · 1.08 KB
/
flags_left.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* flags_left.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nahmed-m <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/01/19 20:24:36 by nahmed-m #+# #+# */
/* Updated: 2016/01/21 00:46:22 by nahmed-m ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void flags_left(char *fmt, t_var *e)
{
if (fmt[e->i] == '-' && fmt[e->i + 1] == '\0')
e->error = 1;
else if (fmt[e->i] == '-')
{
e->f_left = 1;
e->i++;
}
else
e->f_left = 0;
}