You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.2 KiB
56 lines
2.2 KiB
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_printf.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2021/10/27 08:09:45 by narnaud #+# #+# */
|
|
/* Updated: 2021/12/21 09:39:34 by narnaud ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef FT_PRINTF_H
|
|
# define FT_PRINTF_H
|
|
|
|
# define MEM_ADD_SIZE 6
|
|
|
|
# include "./libft/libft.h"
|
|
# include <stdarg.h>
|
|
|
|
|
|
typedef struct s_opts {
|
|
int len;
|
|
int width;
|
|
int precision;
|
|
int zero;
|
|
int minus;
|
|
int dot;
|
|
int hash;
|
|
int space;
|
|
int plus;
|
|
} t_opts;
|
|
|
|
char *int_opts_transform(int n, char *nbr, t_opts *opts);
|
|
char *uint_opts_transform(unsigned int n, char *nbr, t_opts *opts);
|
|
char *ptr_opts_transform(char *ptr, t_opts *opts);
|
|
char *str_opts_transform(char *str, t_opts *opts);
|
|
char *ft_append(char *s1, char *s2);
|
|
char *ft_zero_fill(char *nbr, char c, t_opts *opts);
|
|
char *ft_strnew(int n, char c);
|
|
|
|
int ft_putnstr(char *str, int n);
|
|
|
|
int ft_print_char(int ch, t_opts *opts);
|
|
int ft_print_str(char *str, t_opts *opts);
|
|
int va_print_char(va_list va_ch, const char *str, t_opts *opts);
|
|
int va_print_str(va_list va_str, const char *str, t_opts *opts);
|
|
int va_print_ptr(va_list va_ptr, const char *str, t_opts *opts);
|
|
int va_print_nbr(va_list va_int, const char *str, t_opts *opts);
|
|
int va_print_unsign(va_list va_uint, const char *str, t_opts *opts);
|
|
int va_print_x(va_list va_uint, const char *str, t_opts *opts);
|
|
int va_print_x_cap(va_list va_uint, const char *str, t_opts *opts);
|
|
int va_print_perc(va_list va, const char *str, t_opts *opts);
|
|
int ft_printf(const char *str, ...);
|
|
|
|
#endif
|
|
|