forked from AngelPedroza/printf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathholberton.h
36 lines (33 loc) · 1.04 KB
/
holberton.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
#ifndef HOLBERTON_H
#define HOLBERTON_H
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
/**
* struct specifier - structure that redirects to other functions.
*
* @sp: My pointer to character for make match and select which functions call.
* @f: My pointer to function.
*/
typedef struct specifier
{
char *sp;
int (*f)();
} myforspec;
/*Auxiliar functions*/
int _strlen(char *str);
int _printf(char *format, ...);
void moveinto_buffer(char *buffer, char c, int *count);
char *convert(unsigned int num, int base);
/*Operations of my structure*/
int _printchar(va_list valist, char *buffer, int *i);
int printint(va_list valist, char *buffer, int *i);
int printstr(va_list valist, char *buffer, int *i);
int printhexa(va_list valist, char *buffer, int *i);
int printoctal(va_list valist, char *buffer, int *i);
int printbin(va_list valist, char *buffer, int *i);
int printunsigned(va_list valist, char *buffer, int *count);
int PPS(char *buffer, int *count);
int capitalize(va_list valist, char *buffer, int *count);
#endif