-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
47 lines (42 loc) · 1.14 KB
/
main.h
File metadata and controls
47 lines (42 loc) · 1.14 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
#ifndef PRINT_FUNCTIONS_H
#define PRINT_FUNCTIONS_H
#include <stdarg.h>
#include <unistd.h>
#include <stdlib.h>
#include <limits.h>
#include <stdint.h>
/**
* struct option - option structure
* @character: char format specifier
* @print_arg: function pointer
*/
typedef struct option
{
char character;
int (*print_arg)(va_list ap);
} char_option;
int _printf(const char *format, ...);
int _putchar(char c);
int _strlen(char *str);
int print_str(char *str);
int print_int(int num);
int print_address(const void *ptr);
int print_bin(unsigned int num);
int print_hex(unsigned int num);
int print_hex_cap(unsigned int num);
int print_oct(unsigned int num);
int print_unsigned_int(unsigned int);
int print_rot13_arg(va_list ap);
int print_str_rev(va_list ap);
int print_address_arg(va_list ap);
int print_custom_str(va_list ap);
int print_int_arg(va_list ap);
int print_uint_arg(va_list ap);
int print_str_arg(va_list ap);
int print_char_arg(va_list ap);
int print_hex_arg(va_list ap);
int print_bin_arg(va_list ap);
int print_oct_arg(va_list ap);
int print_hexcap_arg(va_list ap);
int print_option(const char *format, char_option choice[], va_list ap);
#endif