-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_fprintf.h
50 lines (45 loc) · 2.01 KB
/
ft_fprintf.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_fprintf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hboudar <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/29 21:14:55 by hboudar #+# #+# */
/* Updated: 2024/05/30 16:09:00 by hboudar ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_FPRINTF_H
# define FT_FPRINTF_H
# include <unistd.h>
# include <stdarg.h>
typedef struct s_menu
{
va_list list;
int i;
int count;
int hash;
int space;
int plus;
int minus;
int zero;
int width;
int precision;
int precision_1;
int lenght;
} t_menu;
int ft_fprintf(int fd, const char *str, ...);
int ft_flags(char *s, t_menu *flags);
void ft_print_c(int fd, char s, t_menu *menu, int *count, char c);
void ft_print_di(int fd, long int n, t_menu *menu, int *count, char c);
void ft_print_s(int fd, char *s, t_menu *menu, int *count, char c);
void ft_print_u(int fd, unsigned int nbr, t_menu *menu, int *count, char c);
void ft_print_x(int fd, unsigned int nbr, t_menu *menu, int *count, char c);
void ft_print_xx(int fd, unsigned int n, t_menu *menu, int *count, char c);
void ft_print_p(int fd, unsigned long long nbr, t_menu *menu, int *count, char c);
int ft_write_c(int fd, int c);
void ft_write_s(int fd, char *s, int *count, t_menu *menu);
void ft_special_di(int fd, t_menu *menu, int *count);
void ft_precision_di(int fd, long int n, t_menu *menu, int *count);
void ft_special_x(int fd, t_menu *menu, int *count);
#endif