/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_printf.h                                        :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: pbonilla <eirodeis.lepnj@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2021/02/11 15:21:19 by pbonilla          #+#    #+#             */
/*   Updated: 2021/03/21 20:11:37 by pbonilla         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#ifndef FT_PRINTF_H
# define FT_PRINTF_H

# include "../libft/libft.h"
# include <stdarg.h>
# include <stdio.h>

typedef struct	s_param
{
	int			minus;
	int			zero;
	int			width;
	int			prec;
	int			type;
	int			len;
}				t_param;
t_param			ft_init_param(void);
void			*ft_printf_memset(void *s, size_t n, t_param *param);
int				ft_printf(const char *s, ...);
int				ft_parse_param(const char *s, int i, t_param *par,
va_list args);
char			*ft_int_case(t_param *param, int i);
char			*ft_char_case(t_param *param, int i);
char			*ft_ui_case(t_param *param, unsigned int i);
char			*ft_x_case(t_param *param, unsigned long i);
char			*ft_ptr_case(t_param *param, unsigned long long i);
char			*ft_str_case(t_param *param, char *str);
char			*ft_percent_case(t_param *param);
#endif