/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putx.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/27 09:54:24 by narnaud #+# #+# */ /* Updated: 2021/11/17 10:24:24 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_printf.h" int ft_putx(unsigned int n) { char *str; int ret; str = ft_itox((unsigned long int)n, "0123456789abcdef"); ret = ft_putstr(str); free(str); return (ret); } int ft_putx_cap(unsigned int n) { char *str; int ret; str = ft_itox((unsigned long int)n, "0123456789ABCDEF"); ret = ft_putstr(str); free(str); return (ret); } int va_putx(va_list va_uint, const char *str) { (void)*str; return (ft_putx(va_arg(va_uint, unsigned int))); } int va_putx_cap(va_list va_uint, const char *str) { (void)*str; return (ft_putx_cap(va_arg(va_uint, unsigned int))); }