diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-11-21 02:53:41 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-11-21 04:03:13 +0100 |
| commit | ee4b8e5e481850c936c5df10a0d3e70038234754 (patch) | |
| tree | 5e569b3ebc2bdcafdbd06fef99f32207da29d4ee /libft.h | |
| parent | afc8c70a66773563f6e7429b500abcbab631722b (diff) | |
| download | libft-ee4b8e5e481850c936c5df10a0d3e70038234754.tar.gz libft-ee4b8e5e481850c936c5df10a0d3e70038234754.tar.bz2 libft-ee4b8e5e481850c936c5df10a0d3e70038234754.zip | |
WIP: adding ft_*printf
Diffstat (limited to 'libft.h')
| -rw-r--r-- | libft.h | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/07 09:45:02 by cacharle #+# #+# */ -/* Updated: 2019/11/21 02:01:31 by cacharle ### ########.fr */ +/* Updated: 2019/11/21 03:39:19 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ # define LIBFT_H # include <unistd.h> +# include <stdarg.h> # include <stdlib.h> # include <stddef.h> # include <limits.h> @@ -22,8 +23,8 @@ # define TRUE 1 # define FALSE 0 -#define MIN(x, y) ((x) < (y) ? (x) : (y)) -#define MAX(x, y) ((x) > (y) ? (x) : (y)) +# define MIN(x, y) ((x) < (y) ? (x) : (y)) +# define MAX(x, y) ((x) > (y) ? (x) : (y)) typedef unsigned char t_byte; @@ -137,4 +138,22 @@ t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *)); void ft_lstpop_front(t_list **lst, void (*del)(void *)); +/* +** ft_*printf +*/ + +int ft_printf(const char *format, ...); +int ft_sprintf(char *str, const char *format, ...); +int ft_snprintf(char *str, size_t size, + const char *format, ...); +int ft_asprintf(char **ret, const char *format, ...); +int ft_dprintf(int fd, const char *format, ...); + +int ft_vprintf(const char *format, va_list ap); +int ft_vsprintf(char *str, const char *format, va_list ap); +int ft_vsnprintf(char *str, size_t size, const char *format, + va_list ap); +int ft_vasprintf(char **ret, const char *format, va_list ap); +int ft_vdprintf(int fd, const char *format, va_list ap); + #endif |
