-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
48 lines (43 loc) · 1.2 KB
/
main.h
File metadata and controls
48 lines (43 loc) · 1.2 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
#ifndef MAIN_H
#define MAIN_H
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <limits.h>
#include <unistd.h>
#include <string.h>
/**
* struct type - connect conversion specifiers with the correct print function
* @print: a function pointer for the print functions
* @identifier: the conversion specifier
*/
typedef struct type
{
char *identifier;
int (*print)(va_list);
} type_t;
/* Function prototypes */
int _putchar(char c);
int printf_b(va_list args);
int printf_char(va_list args);
int printf_int(va_list args);
int printf_string(va_list args);
int (*printf_format(const char *specifier))(va_list);
int _printf(const char *format, ...);
int countBinary(unsigned int num);
int printf_u(va_list args);
int printf_o(va_list args);
int printf_x(va_list args);
int printf_X(va_list args);
void printf_lowerHex(unsigned int num, int *count);
void printf_upperHex(unsigned int num, int *count);
int printf_p(va_list args);
void printf_pointer(unsigned long ptr, int *count);
int printf_r(va_list args);
int print_number(unsigned int n);
int countDigits(unsigned int num);
int countOctal(unsigned int num);
int countBinary(unsigned int num);
int _strlen(char *str);
int rot13(va_list args);
#endif