From 0fb01c961c92e54e04ad4c7881805db597089863 Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Mon, 18 Mar 2024 11:37:50 +0100 Subject: Remove the src dir and put everything in root dir hoping that it will appease moulinette --- ft_printhex.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ft_printhex.c (limited to 'ft_printhex.c') diff --git a/ft_printhex.c b/ft_printhex.c new file mode 100644 index 0000000..d65de1c --- /dev/null +++ b/ft_printhex.c @@ -0,0 +1,44 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_printhex.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: dkaiser 15) + printhex_rec(nbr / 16, fmt, len); + if (*len < 0) + return ; + success = write(1, &c, 1); + if (success < 0) + *len = -1; + else + (*len)++; +} + +int ft_printhex(unsigned int nbr, char fmt) +{ + int len; + + len = 0; + printhex_rec(nbr, fmt, &len); + return (len); +} -- cgit v1.2.3