-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
74 lines (49 loc) · 1.52 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef MAIN_H
#define MAIN_H
#include <stdarg.h> /* for varidic funs */
#include <unistd.h>/* for write fun */
#include <stdlib.h>
#include <stdio.h>
/**
* struct sp_char - sturct for the special character
*@ch: symbole of the speacial character
*@fun: pointer to fun to print the argurment
*/
typedef struct sp_char
{
char ch;
int (*fun)(va_list, int *);
} spChar;
/**
*struct signs - sturct for the special character
*@ch: symbole of the signs
*@fun: pointer to fun to print sign
*/
typedef struct signs
{
char ch;
void (*fun)(int, char, int, va_list, int *);
} sign;
int _strlen(char *s);
int _printf(const char *format, ...);
int spIndex(char ch, struct sp_char *p);
int signIndex(char ch, struct signs *p);
int _putchar(char sp_ch);
int _putstr(char *str, int len);
void _putInt(unsigned int num, int *pCount);
int print_str(va_list pa, int *pCount);
int print_ch(va_list pa, int *pCount);
int print_int(va_list pa, int *pCount);
int print_bi(va_list pa, int *pCount);
int print_rev(va_list pa, int *pCount);
int print_unsigned(va_list pa, int *pCount);
int print_octal(va_list pa, int *pCount);
int print_lowerhex(va_list pa, int *pCount);
int print_upperhex(va_list pa, int *pCount);
int print_nonch(va_list pa, int *pCount);
int print_rot13(va_list pa, int *pCount);
int print_addr(va_list pa, int *pCount);
void postive_sign(int flag, char ch, int j, va_list ap, int *pCount);
void space_sign(int flag, char ch, int j, va_list ap, int *pCount);
void window_sign(int flag, char ch, int j, va_list ap, int *pCount);
#endif