-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
56 lines (41 loc) · 1.19 KB
/
main.h
File metadata and controls
56 lines (41 loc) · 1.19 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
#ifndef MAIN_H
#define MAIN_H
#include <stdarg.h>
#include <stdio.h>
/* prototypes for functions */
int _putchar(char c);
int _printf(const char *format, ...);
int (*get_spec(char spec))(va_list);
int find_specifier(const char *format, va_list args);
int print_char(va_list args);
int print_string(va_list args);
int print_S(va_list args);
int print_percent(va_list args);
int _put_int(int num, int count);
int print_int(va_list args);
int print_pointer(va_list args);
int convert_binary(va_list args);
int store_hex(unsigned long int n, char _case);
int print_u_num(unsigned int n, unsigned int base);
int print_unsigned_num(va_list args);
int print_octal_num(va_list args);
int print_hex(va_list args);
int print_HEX(va_list args);
char rot13_char(char c);
int _rot13(va_list args);
char *rev_str(char *s);
int print_rev_string(va_list args);
void buffer_store_char(char c);
void empty_buffer(void);
/**
* struct specifier - Struct specifier
* @spec: specs containig the conversion specifiers
* @f: a function pointer to a function that prints the spec
* corresponding to the pattern
*/
typedef struct specifier
{
char spec;
int (*f)(va_list args);
} spec_t;
#endif