maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_putnbr_fd.c File Reference
#include "libft.h"
Include dependency graph for ft_putnbr_fd.c:

Go to the source code of this file.

Functions

void ft_putnbr_fd (int n, int fd)
 

Function Documentation

◆ ft_putnbr_fd()

void ft_putnbr_fd ( int  n,
int  fd 
)

Definition at line 20 of file ft_putnbr_fd.c.

21{
22 if (n == -2147483648)
23 ft_putstr_fd("-2147483648", fd);
24 else
25 {
26 if (n < 0)
27 {
28 ft_putchar_fd('-', fd);
29 n = -n;
30 }
31 if (n >= 10)
32 ft_putnbr_fd(n / 10, fd);
33 ft_putchar_fd((n % 10) + '0', fd);
34 }
35}
void ft_putnbr_fd(int n, int fd)
void ft_putchar_fd(char c, int fd)
void ft_putstr_fd(char *s, int fd)

References ft_putchar_fd(), ft_putnbr_fd(), and ft_putstr_fd().

Referenced by ft_putnbr_fd().

Here is the call graph for this function:
Here is the caller graph for this function: