ft_putendl_fd: initial implementation
This commit is contained in:
parent
81343980be
commit
b1f1b8a13f
3 changed files with 39 additions and 2 deletions
5
Makefile
5
Makefile
|
|
@ -6,7 +6,7 @@
|
|||
# By: kcolin <marvin@42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2024/10/14 13:43:59 by kcolin #+# #+# #
|
||||
# Updated: 2024/10/18 14:36:09 by kcolin ### ########.fr #
|
||||
# Updated: 2024/10/18 15:24:03 by kcolin ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
|
|
@ -43,7 +43,8 @@ SOURCES = ft_isalpha.c \
|
|||
ft_strmapi.c \
|
||||
ft_striteri.c \
|
||||
ft_putchar_fd.c \
|
||||
ft_putstr_fd.c
|
||||
ft_putstr_fd.c \
|
||||
ft_putendl_fd.c
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
CC = gcc
|
||||
|
||||
|
|
|
|||
35
ft_putendl_fd.c
Normal file
35
ft_putendl_fd.c
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_putendl_fd.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/18 15:21:25 by kcolin #+# #+# */
|
||||
/* Updated: 2024/10/18 15:23:07 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_putendl_fd(char *s, int fd)
|
||||
{
|
||||
ft_putstr_fd(s, fd);
|
||||
ft_putchar_fd('\n', fd);
|
||||
}
|
||||
|
||||
/*
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc > 1)
|
||||
{
|
||||
int i = 1;
|
||||
while (i < argc)
|
||||
{
|
||||
ft_putendl_fd(argv[i], 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
*/
|
||||
1
libft.h
1
libft.h
|
|
@ -59,5 +59,6 @@ void ft_striteri(char *s, void (*f)(unsigned int, char*));
|
|||
|
||||
void ft_putchar_fd(char c, int fd);
|
||||
void ft_putstr_fd(char *s, int fd);
|
||||
void ft_putendl_fd(char *s, int fd);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue