minishell
ft_putstr_fd.c File Reference
#include <unistd.h>
#include <limits.h>
#include "../ft_string/ft_string.h"
Include dependency graph for ft_putstr_fd.c:

Go to the source code of this file.

Functions

void ft_putstr_fd (char *s, int fd)
 

Function Documentation

◆ ft_putstr_fd()

void ft_putstr_fd ( char *  s,
int  fd 
)

Definition at line 17 of file ft_putstr_fd.c.

18 {
19  size_t length;
20 
21  if (s == NULL)
22  return ;
23  while (*s != '\0')
24  {
25  length = ft_strnlen(s, INT_MAX);
26  write(fd, s, length);
27  s += length;
28  }
29 }
size_t ft_strnlen(const char *str, size_t max_len)
Definition: ft_strnlen.c:16
Here is the call graph for this function:
Here is the caller graph for this function: