-
Notifications
You must be signed in to change notification settings - Fork 0
/
flags_effect.c
27 lines (25 loc) · 1.1 KB
/
flags_effect.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* flags_effect.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nahmed-m <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/01/19 20:34:05 by nahmed-m #+# #+# */
/* Updated: 2016/02/01 02:22:27 by nahmed-m ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void flags_effect(char *fmt, t_var *e)
{
if (fmt[e->i] == '#' && fmt[e->i + 1] == '\0')
e->error = 1;
else if (fmt[e->i] == '#')
{
while (fmt[e->i] == '#')
{
e->f_effect = 1;
e->i++;
}
}
}