-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_printf.h
35 lines (29 loc) · 1.5 KB
/
ft_printf.h
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
29
30
31
32
33
34
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adiaz-be <adiaz-be@student.42malaga.c +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/13 15:41:01 by adiaz-be #+# #+# */
/* Updated: 2022/10/13 15:41:05 by adiaz-be ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_PRINTF_H
# define FT_PRINTF_H
# include <stdarg.h>
# include <stdlib.h>
# include <unistd.h>
# define HEX_UPP_BASE "0123456789ABCDEF"
# define HEX_LOW_BASE "0123456789abcdef"
int ft_printf(char const *str, ...);
/* format functions */
void ft_putchar_pf(char c, size_t *counter);
void ft_putstr_pf(char *str, size_t *counter);
void ft_putnbr_pf(int num, size_t *counter);
void ft_putuint_pf(unsigned int num, size_t *counter);
void ft_puthex_pf(unsigned int num, size_t *counter, char *base);
void ft_putptr_pf(void *ptr, size_t *counter);
/* auxiliary functions */
char *ft_aux_pf(unsigned long long n, char *base);
#endif