orton_runner/include/lib/my_stdio.h

55 lines
1.1 KiB
C

/*
** EPITECH PROJECT, 2018
** task01
** File description:
** I do task
*/
#ifndef __MY_STDIO_H__
# define __MY_STDIO_H__
#include <stdarg.h>
#include "lib/my_stddef.h"
#define PRINT_MODE_RESET 0x00
#define PRINT_MODE_DIEZ 0x01
#define PRINT_MODE_PLUS 0x02
#define PRINT_MODE_MINUS 0x04
#define PRINT_MODE_SPACE 0x08
#define PRINT_MODE_MAJ 0x10
#define PRINT_MODE_HEXA 0x20
#define PRINT_TYPE_RESET 0x00
#define PRINT_TYPE_RESET 0x00
#define PRINT_TYPE_LLONG 0x01
#define PRINT_TYPE_LONG 0x02
#define PRINT_TYPE_CHAR 0x04
#define PRINT_TYPE_PTRD 0x08
#define PRINT_TYPE_INTM 0x10
#define PRINT_TYPE_SIZE 0x20
#define PRINT_TYPE_SINT 0x40
typedef struct printf_s
{
uint8_t mode_flags;
uintmax_t value;
int precision;
int str_width;
int nbr_width;
uint8_t base;
uint8_t type;
int cursor;
va_list ap;
int stream;
char sign;
} printf_t;
int my_putchar(int n);
void my_printf(char const *format, ...);
void my_dprintf(int fd, const char *format, ...);
void my_fprintf(FILE *stream, const char *format, ...);
void my_vdprintf(int fd, const char *format, va_list ap);
void my_vfprintf(int _stdout, char const *format, va_list ap);
#endif /*MY_STDIO*/