minus and 0 flags WIP

This commit is contained in:
David Gailleton
2025-11-19 21:02:04 +01:00
parent 66878549eb
commit bd1c66d86f
15 changed files with 317 additions and 57 deletions

View File

@@ -6,20 +6,25 @@
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/17 12:19:16 by dgaillet #+# #+# */
/* Updated: 2025/11/19 13:35:58 by dgaillet ### ########lyon.fr */
/* Updated: 2025/11/19 20:16:31 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "ft_printf_bonus.h"
int print_pointer(unsigned long long p)
int print_pointer(t_arg *arg, unsigned long long p)
{
int count;
count = 0;
if (!p)
{
ft_putstr_fd("(nil)", 1);
return (5);
}
ft_putstr_fd("0x", 1);
return (2 + ft_putnbr_base(p, "0123456789abcdef", 16));
if (arg->arg)
ft_putstr_fd("", 1);
count += write(1, "0x", 2);
return (count + ft_putnbr_base(p, "0123456789abcdef", 16));
}