-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putptr_pf.c
More file actions
30 lines (27 loc) · 1.19 KB
/
Copy pathft_putptr_pf.c
File metadata and controls
30 lines (27 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putptr_pf.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: csekakul <csekakul@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/01/30 09:42:19 by csekakul #+# #+# */
/* Updated: 2026/02/03 08:21:17 by csekakul ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putptr_pf(void *ptr, size_t *counter)
{
char *str;
unsigned long ptr_address;
if (!ptr)
{
ft_putstr_pf("(nil)", counter);
return ;
}
ptr_address = (unsigned long)ptr;
ft_putstr_pf("0x", counter);
str = ft_aux_pf(ptr_address, HEX_LOW_BASE);
ft_putstr_pf(str, counter);
free(str);
}