-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
34 lines (31 loc) · 1.03 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
#ifndef PRINTF_H
#define PRINTF_H
#include <stdarg.h>
#include <stdio.h>
int _printf(const char *format, ...);
int _strlen(const char *s);
int _itoa(int num);
int _btoa(unsigned int num);
int _itou(unsigned int num);
int _itoo(unsigned int num);
int _itox(unsigned int num);
int _itoX(unsigned int num);
int handle_conversion_specifier(const char *format, va_list args);
int handle_char_specifier(va_list args);
int handle_string_specifier(va_list args);
int handle_percent_specifier(void);
int handle_decimal_specifier(va_list args);
int handle_integer_specifier(va_list args);
int handle_binary_specifier(va_list args);
int handle_unsigned_specifier(va_list args);
int handle_octal_specifier(va_list args);
int handle_hex_specifier(va_list args);
int handle_Hex_Specifier(va_list args);
int handle_other_specifiers(char specifier, va_list args);
/* the address specifier */
int stringLength(const char *str);
void writeString(const char *str);
void writeChar(char c);
void writeHex(unsigned long value);
void handle_memory_address(void *ptr);
#endif