-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_printf.h
More file actions
56 lines (49 loc) · 2.05 KB
/
ft_printf.h
File metadata and controls
56 lines (49 loc) · 2.05 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hyojeong <hyojeong@student.42seoul.kr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/29 17:59:39 by hyojeong #+# #+# */
/* Updated: 2022/04/27 11:37:32 by hyojeong ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_PRINTF_H
# define FT_PRINTF_H
# include <stddef.h>
# include <stdarg.h>
typedef struct s_flag
{
long hexa;
int unsign;
int zero;
long padding_left;
long padding_right;
int left;
int width;
char plus;
int hash;
int precision;
} t_flag;
int ft_printf(const char *str, ...);
void ft_putchar(char c, int *printf_len);
char *ft_strchr(const char *s, int c);
size_t ft_strlen(char *str);
void *ft_memset(void *b, int c, size_t len);
size_t get_numlen(long num, int flag);
size_t get_unsignedlen(size_t num, int mod);
void ft_putnbr(long num, t_flag flag);
void ft_putstr(char *s, long len, int *printf_len);
void ft_putptr(size_t num, int hexa);
void ft_hexa(long num, t_flag flag, int *printf_len);
void ft_put_x(unsigned int num, t_flag flag);
long adjust_num(va_list ap, t_flag flag);
long adjust_len_flag(long num, t_flag *flag);
void print_percent(int *printf_len);
void print_char(va_list ap, t_flag *flag, int *printf_len);
void print_str(va_list ap, t_flag *flag, int *printf_len);
void print_decimal(va_list ap, t_flag *flag, int *printf_len);
void print_pointer(va_list ap, t_flag *flag, int *printf_len);
void padding(long left, long right, int *printf_len, int c);
#endif