-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathput_functions.c
41 lines (36 loc) · 1.2 KB
/
put_functions.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* put_functions.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: meldora <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/22 19:18:24 by meldora #+# #+# */
/* Updated: 2020/12/06 15:56:43 by meldora ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putchar(int c)
{
write(1, &c, 1);
}
void ft_putstr(const char *s)
{
unsigned int i;
i = 0;
while (s[i])
{
ft_putchar(s[i]);
i++;
}
}
char ft_putcstr(const char **fmt, int *len)
{
while (*(*fmt) != '%' && *(*fmt) != '\0')
{
ft_putchar(*(*fmt));
(*fmt)++;
(*len)++;
}
return (*(*fmt));
}