-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintflib.h
More file actions
75 lines (67 loc) · 2.52 KB
/
Copy pathprintflib.h
File metadata and controls
75 lines (67 loc) · 2.52 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
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
65
66
67
68
69
70
71
72
73
74
75
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* printflib.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: imelnych <imelnych@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/01/02 16:40:26 by imelnych #+# #+# */
/* Updated: 2018/03/21 11:20:21 by imelnych ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PRINTFLIB_H
# define PRINTFLIB_H
# include <string.h>
# include <unistd.h>
# include <stdarg.h>
# include <stdlib.h>
# include <locale.h>
# define FL 3
# define TP "sSpdDioOuUxXcCb"
# define FLAGS "lh0123456789-+ #*.zj"
/*
** Color palette
*/
# define BLUE "\033[1;34m"
# define GREEN "\033[1;32m"
# define YELLOW "\033[1;33m"
# define LBLUE "\033[1;36m"
# define RESET "\033[0m"
typedef struct
{
int flag[FL];
int width;
int precs;
int mod;
char type;
char *str;
int count;
} t_list_spec;
void ft_bzero(void *s, size_t n);
int ft_atoi(const char *str);
void ft_putchar(char c);
size_t ft_strlen(const char *str);
char *ft_strdup(const char *s1);
char *ft_strnew(size_t size);
void ft_putstr(char const *s);
int ft_isdigit_char(char c);
int ft_numlen_max(intmax_t n, int c);
char *ft_strjoin_free(char *s1, char *s2, int opt);
void print_address(va_list *args, t_list_spec *cr);
int ft_printf(const char *fmt, ...);
void print_digits(va_list *args, t_list_spec *cr);
void print_digits_unsigned(va_list *args, t_list_spec *cr, int type);
void print_str(va_list *args, t_list_spec *cr);
void print_c(va_list *args, t_list_spec *cr);
char *print_unichar(int symb);
void print_unicode(va_list *args, t_list_spec *cr);
int main_call(const char **fmt, va_list *args, t_list_spec *cr);
int check_type(char c);
int check_flags(char c);
void fill_align(const char *fmt, t_list_spec *cr);
void fill_width(const char *fmt, t_list_spec *cr, va_list *args);
void fill_mod(const char *fmt, t_list_spec *cr);
int fill_type(const char **fmt, t_list_spec *cr);
char *ft_itoabase(uintmax_t c, int sys, int rg);
int ft_atoibase(char *str);
#endif