ft_printf/ft_putvd.c
Etienne Rey-bethbeder b7b7d5aa04 fuck
2022-11-25 15:35:14 +01:00

28 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putvd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/14 23:01:21 by erey-bet #+# #+# */
/* Updated: 2022/11/25 15:29:24 by erey-bet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putvd(void *v)
{
int count;
unsigned long u;
if (v == NULL)
return (ft_putstr("(nil)"));
u = (unsigned long)v;
count = 2;
ft_putstr("0x");
count += ft_putnbrhex(u);
return (count);
}