-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
59 lines (53 loc) · 1.27 KB
/
main.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
#ifndef MAIN_H
#define MAIN_H
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/**
* struct flags - flags
* @plus: +
* @space: ' '
* @hash: #
*/
typedef struct flags
{
int plus;
int space;
int hash;
} flags_f;
/**
* struct print_handler - choose right func
* @a: char
* @f: pointer
*/
typedef struct print_handler
{
char a;
int (*f)(va_list args, flags_f *f);
} handler;
int print_perc(va_list args, flags_f *f);
int print_char(va_list args, flags_f *f);
int print_string(va_list args, flags_f *f);
int print_int(va_list args, flags_f *f);
int print_unsign(va_list args, flags_f *f);
int print_oct(va_list args, flags_f *f);
int print_binary(va_list args, flags_f *f);
int print_hex(va_list args, flags_f *f);
int print_HEXA(va_list args, flags_f *f);
int print_rev(va_list args, flags_f *f);
int print_rot13(va_list args, flags_f *f);
int print_specStr(va_list args, flags_f *f);
int print_address(va_list args, flags_f *f);
int get_flag(char c, flags_f *f);
int (*get_print(char c))(va_list args, flags_f *);
void print_num(int n);
int counting(int i);
char *convert(unsigned long int n, int b, int lc);
int _printf(const char *format, ...);
int _puts(char *s);
int _putchar(char c);
#endif