-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putaddres.c
25 lines (22 loc) · 1.1 KB
/
ft_putaddres.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putaddres.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mel-mouh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/18 19:32:03 by mel-mouh #+# #+# */
/* Updated: 2024/11/20 12:22:02 by mel-mouh ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putaddres(unsigned long int addr)
{
int count;
count = 0;
if (addr == 0)
return (ft_putstr("(nil)"));
count += ft_putstr("0x");
count += ft_putnbr_hex(addr, "0123456789abcdef");
return (count);
}