init avec fichiers ancienne libft

This commit is contained in:
Hugo LAMY
2019-11-06 18:42:13 +01:00
commit 80898b1d80
145 changed files with 2444 additions and 0 deletions

28
OLDsrc/put/ft_putnbr_fd.c Normal file
View File

@@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/14 21:15:09 by hulamy #+# #+# */
/* Updated: 2018/11/14 21:15:10 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putnbr_fd(int n, int fd)
{
long l;
l = n;
if (l < 0)
{
ft_putchar_fd('-', fd);
l *= -1;
}
if (l >= 10)
ft_putnbr_fd(l / 10, fd);
ft_putchar_fd((l % 10) + '0', fd);
}