-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_pointer.c
More file actions
26 lines (24 loc) · 1.1 KB
/
ft_pointer.c
File metadata and controls
26 lines (24 loc) · 1.1 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_pointer.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mraineri <mraineri@student.42lisboa.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/28 13:23:36 by mraineri #+# #+# */
/* Updated: 2024/09/03 15:38:26 by mraineri ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_pointer(void *addr, int *counter)
{
if (!addr)
{
ft_str_increment("(nil)", counter);
return ;
}
write(1, "0x", 2);
if (counter)
*counter += 2;
ft_hex_p((unsigned long long)addr, counter);
}