-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_pptr.c
28 lines (25 loc) · 1.06 KB
/
ft_pptr.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_pptr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aizsak <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/18 20:50:54 by aizsak #+# #+# */
/* Updated: 2022/12/11 10:50:46 by aizsak ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
unsigned long ft_pptr(unsigned long n)
{
int i;
i = 0;
if (n == 0)
i += ft_pstr ("(nil)");
else
{
i += ft_pstr("0x");
i += ft_phexa(n, 'x');
}
return (i);
}