aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-10-11 16:38:41 +0200
committerCharles <sircharlesaze@gmail.com>2019-10-11 16:38:41 +0200
commitbddc2d153a4c47257740a0bf0651513058a612d5 (patch)
treed39b3daad0562a50e78686f524f0c55b7438e13c /utils.c
parente1e7e692a26ab68dca25ea02ff8bed72c3c12e8e (diff)
downloadft_printf-bddc2d153a4c47257740a0bf0651513058a612d5.tar.gz
ft_printf-bddc2d153a4c47257740a0bf0651513058a612d5.tar.bz2
ft_printf-bddc2d153a4c47257740a0bf0651513058a612d5.zip
Added and renamed files
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/utils.c b/utils.c
index 1484165..8b13789 100644
--- a/utils.c
+++ b/utils.c
@@ -1,42 +1 @@
-#include <unistd.h>
-#include "ft_printf.h"
-void ft_putchar(char c)
-{
- write(STDOUT_FILENO, &c, 1);
-}
-
-void ft_putstr(char *str)
-{
- while (*str)
- write(STDOUT_FILENO, str++, 1);
-}
-
-void ft_putnbr(int n)
-{
- unsigned int p_n;
-
- p_n = n;
- if (n < 0)
- {
- ft_putchar('-');
- p_n = -n;
- }
- if (p_n > 9)
- ft_putnbr(p_n / 10);
- ft_putchar(p_n % 10 + '0');
-}
-
-void ft_putxnbr(unsigned int n, char *hex_symbols)
-{
- if (n > 15)
- ft_putxnbr(n / 16, hex_symbols);
- ft_putchar(hex_symbols[n % 16]);
-}
-
-void ft_putunbr(unsigned int n)
-{
- if (n > 9)
- ft_putunbr(n / 10);
- ft_putchar(n % 10 + '0');
-}