-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathset_flags.c
More file actions
28 lines (26 loc) · 1.11 KB
/
set_flags.c
File metadata and controls
28 lines (26 loc) · 1.11 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* set_flags.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hiroshiusui <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/01/29 20:39:58 by hiroshius #+# #+# */
/* Updated: 2018/01/31 02:38:47 by hiroshius ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
bool set_flags(t_bag *bag, char c)
{
if (c == '#')
bag->number_sign = 1;
if (c == '-')
bag->minus = 1;
if (c == '+')
bag->plus = 1;
if (c == ' ')
bag->space = 1;
if (c == '0')
bag->zero = 1;
return (1);
}