Bonus preparartion

This commit is contained in:
David Gailleton
2025-11-19 15:14:53 +01:00
parent 836eea81e1
commit 66878549eb
12 changed files with 297 additions and 122 deletions

View File

@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* print_pointer_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/17 12:19:16 by dgaillet #+# #+# */
/* Updated: 2025/11/19 13:35:58 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "ft_printf_bonus.h"
int print_pointer(unsigned long long p)
{
if (!p)
{
ft_putstr_fd("(nil)", 1);
return (5);
}
ft_putstr_fd("0x", 1);
return (2 + ft_putnbr_base(p, "0123456789abcdef", 16));
}