-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putptr.c
More file actions
24 lines (21 loc) · 1.08 KB
/
ft_putptr.c
File metadata and controls
24 lines (21 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putptr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmounsif <mmounsif@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/07 20:03:12 by mmounsif #+# #+# */
/* Updated: 2024/12/11 18:58:56 by mmounsif ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putptr(unsigned long long ptr, int *count)
{
char *hexa;
hexa = "0123456789abcdef";
if (ptr >= 16)
ft_putptr(ptr / 16, count);
write(1, &hexa[ptr % 16], 1);
(*count)++;
}