all flags setup, some fixes is needed
This commit is contained in:
@@ -6,12 +6,13 @@
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/17 12:19:16 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/19 20:16:31 by dgaillet ### ########lyon.fr */
|
||||
/* Updated: 2025/11/20 15:03:57 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
#include "ft_printf_bonus.h"
|
||||
#include <unistd.h>
|
||||
|
||||
int print_pointer(t_arg *arg, unsigned long long p)
|
||||
{
|
||||
@@ -20,11 +21,11 @@ int print_pointer(t_arg *arg, unsigned long long p)
|
||||
count = 0;
|
||||
if (!p)
|
||||
{
|
||||
count += print_chars(arg->padding - 5, ' ');
|
||||
ft_putstr_fd("(nil)", 1);
|
||||
return (5);
|
||||
}
|
||||
if (arg->arg)
|
||||
ft_putstr_fd("", 1);
|
||||
count += print_chars(arg->padding - nbr_size_base(p, 16), ' ');
|
||||
count += write(1, "0x", 2);
|
||||
return (count + ft_putnbr_base(p, "0123456789abcdef", 16));
|
||||
return (count + ft_putnbr_base_ll(p, "0123456789abcdef", 16));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user