-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf.h
55 lines (48 loc) · 2.12 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ysonmez <ysonmez@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/07/13 11:13:02 by ysonmez #+# #+# */
/* Updated: 2021/07/20 08:51:37 by ysonmez ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_PRINTF_H
# define FT_PRINTF_H
# include "libft/libft.h"
# include <stdarg.h>
# define INTD 0
# define INTI 1
# define CHAR 2
# define STR 3
# define PTR 4
# define LOWHEXA 5
# define UPHEXA 6
# define UNSINT 7
# define PRCT 8
int ft_count_digit(int n);
void ft_count_digit_hexa(unsigned long n, t_struct *data);
int ft_count_digit_unsint(unsigned int n);
int ft_get_type(const char *str);
int ft_get_chartype(t_struct *data);
int ft_set_format(t_struct *data, const char *str);
int ft_print_type(t_struct *data);
void ft_arg_len(va_list args, t_struct *data);
int ft_printer(va_list args, t_struct *data);
void ft_puthexa_fd(unsigned int n, t_struct *data, int fd);
void ft_putunslong_fd(unsigned long n, t_struct *data, int fd);
void ft_putunsint_fd(unsigned int n, t_struct *data, int fd);
void ft_putcharr_fd(char c, int fd);
void ft_print_before(t_struct *data);
void ft_print_after(t_struct *data);
void ft_width(t_struct *data, int k);
void ft_hash(t_struct *data);
void ft_zero(t_struct *data);
void ft_prec(t_struct *data);
int ft_printf_atoi(const char *str);
int ft_parse_format(va_list args, t_struct *data, const char *str);
int ft_printf(const char *format, ...)
__attribute__ ((format (printf, 1, 2)));
#endif