-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf.h
64 lines (51 loc) · 1.95 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
56
57
58
59
60
61
62
63
64
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fdi-cecc <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/07 09:36:33 by fdi-cecc #+# #+# */
/* Updated: 2024/05/20 16:13:26 by fdi-cecc ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_PRINTF_H
# define FT_PRINTF_H
# include <stdarg.h>
# include <stdio.h>
# include <unistd.h>
# include <stddef.h>
# include <stdlib.h>
# include <string.h>
# include <limits.h>
# include "./libft/includes/libft.h"
typedef struct s_flags
{
int hash;
int space;
int dot;
int plus;
int zero;
int minus;
int left;
int zerofill;
int precision;
int width;
} t_flags;
int ft_printf(const char *fmt, ...);
int ft_parse(const char *str, va_list *args, int *i);
int ft_processfmt(const char *str, va_list *args, t_flags flag);
void ft_processflags(t_flags *flag, const char *str, int *i);
int ft_printchar(char c, t_flags flag);
int ft_printstr(const char *str, t_flags flag);
int ft_printstrlen(const char *str);
int ft_atoiptr(const char *str, int *adv);
void ft_initflags(t_flags *flag);
int ft_checkflags(char c, char *str);
int ft_putcharlen(char c);
int ft_printnum(long n, t_flags flag);
int ft_putnbrlen(long n);
int ft_printuns(unsigned long n, t_flags flag);
int ft_printhex(int n, int upcase, t_flags flag);
int ft_printptr(void *ptr, t_flags flag);
#endif