ft_putstr_fd: initial implementation
This commit is contained in:
parent
28cadf55f1
commit
81343980be
3 changed files with 41 additions and 3 deletions
36
ft_putstr_fd.c
Normal file
36
ft_putstr_fd.c
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_putstr_fd.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/18 14:33:21 by kcolin #+# #+# */
|
||||
/* Updated: 2024/10/18 15:17:57 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_putstr_fd(char *s, int fd)
|
||||
{
|
||||
write(fd, s, ft_strlen(s));
|
||||
}
|
||||
|
||||
/*
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc > 1)
|
||||
{
|
||||
int i = 1;
|
||||
while (i < argc)
|
||||
{
|
||||
ft_putstr_fd(argv[i], 1);
|
||||
ft_putchar_fd('\n', 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue