-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathin_flags.c
More file actions
30 lines (27 loc) · 1.16 KB
/
in_flags.c
File metadata and controls
30 lines (27 loc) · 1.16 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
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* in_flags.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hiroshiusui <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/01/31 02:37:47 by hiroshius #+# #+# */
/* Updated: 2018/01/31 02:37:47 by hiroshius ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
bool in_flags(t_bag *bag, char c)
{
char *all_possible_flags;
if (bag->zero == 0)
all_possible_flags = "#-+ 0";
else
all_possible_flags = "#-+ ";
while (*all_possible_flags)
{
if (c == *all_possible_flags)
return (1);
all_possible_flags++;
}
return (0);
}