From 925989f7e7af67d965e2b501a51068acfe449ab0 Mon Sep 17 00:00:00 2001 From: yctct Date: Wed, 28 Jan 2026 12:43:28 +0100 Subject: Add all files, first commit --- ft_checkpadd.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ft_checkpadd.c (limited to 'ft_checkpadd.c') diff --git a/ft_checkpadd.c b/ft_checkpadd.c new file mode 100644 index 0000000..a1881d1 --- /dev/null +++ b/ft_checkpadd.c @@ -0,0 +1,19 @@ + +#include "ft_printf.h" + +int ft_checkpadd(va_list ap) +{ + int counter; + unsigned long pointer_address; + + counter = 0; + pointer_address = ((long)(va_arg(ap, void *))); + if (pointer_address == 0) + counter += write(1, "(nil)", 5); + else + { + counter += write(1, "0x", 2); + counter += ft_puthexlower(pointer_address); + } + return (counter); +} -- cgit v1.2.3