lib/ft_printf/ft_putvd_fd.c

14 lines
213 B
C

u32
ft_putvd_fd(void *v, u32 fd) {
u32 count;
u64 u;
if (v == NULL)
return (ft_putstr_fd("(nil)", fd));
u = (u64)v;
count = 2;
ft_putstr_fd("0x", fd);
count += ft_putnbrhex_fd(u, fd);
return (count);
}