feat: added strdup and putptr
This commit is contained in:
parent
0f35f48c25
commit
2a34720f4d
2 changed files with 32 additions and 0 deletions
13
srcs/vec/ft_putrptr.c
Normal file
13
srcs/vec/ft_putrptr.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include "libft.h"
|
||||
|
||||
int ft_putptr(void *ptr)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
count += ft_putstr("0x");
|
||||
if (!ptr)
|
||||
count += ft_putchar('0');
|
||||
else
|
||||
count += ft_putaddr((unsigned long)ptr);
|
||||
return (count);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue