/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putptr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/27 10:13:07 by narnaud #+# #+# */ /* Updated: 2021/12/21 09:50:41 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_printf.h" int ft_putptr(void *ptr) { char *str; int ret; str = ft_itox((unsigned long long int)ptr, "0123456789abcdef"); ft_putstr("0x"); ret = ft_putstr(str); free(str); return (ret + 2); } int va_putptr(va_list va_ptr, const char *str) { (void)*str; return (ft_putptr(va_arg(va_ptr, void *))); }