-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf.c
executable file
·27 lines (24 loc) · 1.11 KB
/
ft_printf.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bscamand <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/12/04 17:39:57 by bscamand #+# #+# */
/* Updated: 2021/01/11 13:45:05 by bscamand ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf.h"
int ft_printf(const char *str, ...)
{
t_parser parser;
t_parser *ptr;
ptr = &parser;
ft_init_struct_start(ptr);
STR = (char *)str;
va_start(ARGS, str);
ft_parse_and_print(ptr);
va_end(ARGS);
return (LEN);
}