properly started project
This commit is contained in:
58
includes/libftprintf.h
Normal file
58
includes/libftprintf.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* libftprintf.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/02/07 13:03:44 by tmaze #+# #+# */
|
||||
/* Updated: 2019/02/07 17:03:50 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef LIBFTPRINTF_H
|
||||
# define LIBFTPRINTF_H
|
||||
|
||||
# include <unistd.h>
|
||||
# include <stdarg.h>
|
||||
|
||||
typedef struct s_flags
|
||||
{
|
||||
enum e_convtype
|
||||
{
|
||||
none = -1,
|
||||
per = '%',
|
||||
c = 'c',
|
||||
s = 's',
|
||||
p = 'p',
|
||||
d = 'd',
|
||||
i = 'i',
|
||||
o = 'o',
|
||||
u = 'u',
|
||||
x = 'x',
|
||||
X = 'X',
|
||||
f = 'f'
|
||||
} convtype;
|
||||
char minus;
|
||||
char sign;
|
||||
char hash;
|
||||
int width;
|
||||
int precision;
|
||||
char size;
|
||||
} t_flags;
|
||||
|
||||
size_t pf_getflags(const char *format, t_flags *flags);
|
||||
|
||||
int pf_convc(t_flags *flags, va_list *ap);
|
||||
int pf_convs(t_flags *flags, va_list *ap);
|
||||
int pf_convp(t_flags *flags, va_list *ap);
|
||||
int pf_convd(t_flags *flags, va_list *ap);
|
||||
int pf_convi(t_flags *flags, va_list *ap);
|
||||
int pf_convo(t_flags *flags, va_list *ap);
|
||||
int pf_convu(t_flags *flags, va_list *ap);
|
||||
int pf_convx(t_flags *flags, va_list *ap);
|
||||
int pf_convf(t_flags *flags, va_list *ap);
|
||||
|
||||
int ft_printf(const char *format, ...);
|
||||
|
||||
#endif
|
41
includes/libftprintf.h~
Normal file
41
includes/libftprintf.h~
Normal file
@@ -0,0 +1,41 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* libftprintf.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/02/07 13:03:44 by tmaze #+# #+# */
|
||||
/* Updated: 2019/02/07 13:12:20 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef LIBFTPRINTF_H
|
||||
# define LIBFTPRINTF_H
|
||||
|
||||
# include <unistd.h>
|
||||
# include <stdarg.h>
|
||||
|
||||
typedef struct s_flags
|
||||
{
|
||||
enum e_convtype
|
||||
{
|
||||
c,
|
||||
s,
|
||||
p,
|
||||
d,
|
||||
i,
|
||||
o,
|
||||
u,
|
||||
x,
|
||||
X,
|
||||
f
|
||||
} convtype;
|
||||
char minus;
|
||||
char sign;
|
||||
int width;
|
||||
int precision;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user