-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
59 lines (46 loc) · 1.26 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
59
#ifndef MAIN_H
#define MAIN_H
#include <stdarg.h>
/**
* struct specifiers - to format the character string according
* to specifiers.
*
* @s: the format to print
* @ptr: the pointer to the corresponding formatting function
*
*/
typedef struct specifiers
{
char *s;
int (*ptr)(va_list);
} f_specifiers;
/* implemented in string_functions.c*/
int _strlen(const char *str);
char *reverse_string(char *str);
char *_strcpy(char *dest, const char *src);
char *rot13(char *str);
/* implemented in print_nums.c */
int handle_d(va_list d);
int handle_oct(va_list oct);
int handle_b(va_list b);
int handle_u(va_list u);
/* implemented in print_hex.c */
int handle_x(va_list x);
int handle_upper_x(va_list upper);
int handle_p(va_list p);
/* implemented in print_strings.c*/
int _puts(const char *str);
int handle_ascii(va_list ascii);
int handle_r(va_list r);
int handle_rot13(va_list l);
int handle_s(va_list s);
/* implemented in print_chars.c*/
int _putchar(char c);
int handle_c(va_list c);
/* implemented in convert_bases.c */
void convert_bases(unsigned long num, char *tmp, int base, int upper);
/* implemented in _printf.c */
int _printf(const char *format, ...);
/* implemented in handle_specifiers.c */
int (*handle_specifiers(const char *format))(va_list);
#endif