intra to gitea
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_put_ptr.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: lfirmin <[email protected]> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/19 04:54:06 by lfirmin #+# #+# */
|
||||
/* Updated: 2024/06/19 07:46:52 by lfirmin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
#include "ftprintf.h"
|
||||
|
||||
void ft_put_ptr(int fd, unsigned long long num)
|
||||
{
|
||||
if (num >= 16)
|
||||
{
|
||||
ft_put_ptr(fd, num / 16);
|
||||
ft_put_ptr(fd, num % 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num <= 9)
|
||||
ft_putchar(fd, num + '0');
|
||||
else
|
||||
ft_putchar(fd, num - 10 + 'a');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user