-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putpointer.c
28 lines (25 loc) · 1.1 KB
/
ft_putpointer.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
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putpointer.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ana-lda- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/08 18:34:51 by anavolkmann #+# #+# */
/* Updated: 2024/06/26 15:30:39 by ana-lda- ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_putpointer(unsigned long nbr)
{
int result;
result = 0;
if (!nbr)
return (write(1, "(nil)", 5));
else
{
result += ft_putstr("0x");
result += ft_putpointerhexa(nbr, 'x');
}
return (result);
}