-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
50 lines (42 loc) · 1 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
#ifndef MAIN_H
#define MAIN_H
#include <unistd.h>
#include <stdarg.h>
/**
* struct format_spec - defines a structure for symbols and functions
*
* @c: The associated character
* @f: The associated function
*/
typedef struct format_spec
{
char *c;
int (*f)(va_list);
} form_spec;
/* _putchar.c */
int _putchar(char);
/* _printf */
int _printf(const char *, ...);
int printer(const char *, form_spec *, va_list);
/* specifier functions */
int print_char(va_list);
int print_str(va_list);
int print_percent(va_list);
int print_int(va_list);
int print_unsigned(va_list);
int print_bin(va_list);
int print_rev(va_list);
int print_rot13(va_list);
int print_STR(va_list);
int print_addr(va_list);
int print_oct(va_list);
int print_hex(va_list);
int print_HEX(va_list);
/* helper functions */
int print_string(char *);
int print_binary(unsigned int);
int print_number(unsigned int);
int print_hexadecimal(unsigned long int, int, int);
int print_octal(unsigned int);
/* specifier handlers / extras */
#endif /* MAIN_H */