-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_printf.c
More file actions
30 lines (26 loc) · 1.15 KB
/
ft_printf.c
File metadata and controls
30 lines (26 loc) · 1.15 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hbooke <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 00:59:59 by hbooke #+# #+# */
/* Updated: 2020/10/29 01:00:48 by hbooke ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "utils.h"
#include <stdarg.h>
#include <unistd.h>
int ft_printf(char *fmt, ...)
{
va_list ap;
int len;
if (!ft_strcmp("%", fmt))
return (0);
va_start(ap, fmt);
len = ft_internal_printf_fd(STDOUT_FILENO, fmt, &ap);
va_end(ap);
return (len);
}