summaryrefslogtreecommitdiffstats
path: root/libft
diff options
context:
space:
mode:
Diffstat (limited to 'libft')
-rw-r--r--libft/src/ft_printf_treat_flags.c15
-rw-r--r--libft/src/ft_printf_use_flags.c21
-rw-r--r--libft/src/ft_putchar.c3
-rw-r--r--libft/src/ft_putchar_fd.c3
-rw-r--r--libft/src/ft_putendl.c3
-rw-r--r--libft/src/ft_putendl_fd.c3
-rw-r--r--libft/src/ft_putnbr.c5
-rw-r--r--libft/src/ft_putnbr_base.c5
-rw-r--r--libft/src/ft_putnbr_fd.c5
-rw-r--r--libft/src/ft_putnchar.c3
-rw-r--r--libft/src/ft_putstr.c3
-rw-r--r--libft/src/ft_putstr_fd.c3
12 files changed, 30 insertions, 42 deletions
diff --git a/libft/src/ft_printf_treat_flags.c b/libft/src/ft_printf_treat_flags.c
index d7b11a1..783efa5 100644
--- a/libft/src/ft_printf_treat_flags.c
+++ b/libft/src/ft_printf_treat_flags.c
@@ -14,8 +14,7 @@
#include <stdlib.h>
#include <stdarg.h>
-static int
- ft_printf_get_width(va_list arg, t_printflist *pflist)
+static int ft_printf_get_width(va_list arg, t_printflist *pflist)
{
char *nstr;
char *nstr_ptr;
@@ -35,8 +34,7 @@ static int
return (ret);
}
-static int
- ft_printf_get_precision(va_list arg, int pos, t_printflist *pflist)
+static int ft_printf_get_precision(va_list arg, int pos, t_printflist *pflist)
{
int ret;
char *ptr;
@@ -70,8 +68,7 @@ static int
** ll = 2
*/
-static void
- ft_printf_get_lh(t_printflist *pflist)
+static void ft_printf_get_lh(t_printflist *pflist)
{
int pos;
@@ -95,8 +92,7 @@ static void
}
}
-static uint8_t
- ft_printf_check_z(t_printflist *pflist)
+static uint8_t ft_printf_check_z(t_printflist *pflist)
{
char *ptr;
@@ -115,8 +111,7 @@ static uint8_t
** also l ll hh h
*/
-void
- ft_printf_treat_flags(va_list arg, t_printflist *pflist)
+void ft_printf_treat_flags(va_list arg, t_printflist *pflist)
{
int pos;
char c;
diff --git a/libft/src/ft_printf_use_flags.c b/libft/src/ft_printf_use_flags.c
index 562d499..c0f7377 100644
--- a/libft/src/ft_printf_use_flags.c
+++ b/libft/src/ft_printf_use_flags.c
@@ -13,8 +13,7 @@
#include <libft.h>
#include <stdlib.h>
-static void
- ft_printf_noflags(const char *format,
+static void ft_printf_noflags(const char *format,
int pos,
va_list arg,
t_printflist *pflist)
@@ -22,11 +21,10 @@ static void
ft_printf_process(format + pos, arg, pflist);
}
-static void
- ft_printf_withflags(const char *format,
- int pos,
- va_list arg,
- t_printflist *pflist)
+static void ft_printf_withflags(const char *format,
+ int pos,
+ va_list arg,
+ t_printflist *pflist)
{
ft_memdel((void**)&pflist->fullflag);
pflist->fullflag = ft_printf_get_flags(format, pos, pflist);
@@ -34,11 +32,10 @@ static void
ft_printf_process(format + pos, arg, pflist);
}
-int
- ft_printf_flags(const char *format,
- int pos,
- va_list arg,
- t_printflist *pflist)
+int ft_printf_flags(const char *format,
+ int pos,
+ va_list arg,
+ t_printflist *pflist)
{
int plen;
diff --git a/libft/src/ft_putchar.c b/libft/src/ft_putchar.c
index b48bd32..3a9923e 100644
--- a/libft/src/ft_putchar.c
+++ b/libft/src/ft_putchar.c
@@ -12,8 +12,7 @@
#include <unistd.h>
-int
- ft_putchar(int c)
+int ft_putchar(int c)
{
return (write(1, &c, 1));
}
diff --git a/libft/src/ft_putchar_fd.c b/libft/src/ft_putchar_fd.c
index 7e32ea7..cb812eb 100644
--- a/libft/src/ft_putchar_fd.c
+++ b/libft/src/ft_putchar_fd.c
@@ -12,8 +12,7 @@
#include <unistd.h>
-int
- ft_putchar_fd(char c, int fd)
+int ft_putchar_fd(char c, int fd)
{
return (write(fd, &c, 1));
}
diff --git a/libft/src/ft_putendl.c b/libft/src/ft_putendl.c
index 8ffbd60..c694cf3 100644
--- a/libft/src/ft_putendl.c
+++ b/libft/src/ft_putendl.c
@@ -13,8 +13,7 @@
#include <libft.h>
#include <unistd.h>
-int
- ft_putendl(const char *s)
+int ft_putendl(const char *s)
{
return (write(1, s, ft_strlen(s)) + ft_putchar('\n'));
}
diff --git a/libft/src/ft_putendl_fd.c b/libft/src/ft_putendl_fd.c
index c8c6401..ab847f9 100644
--- a/libft/src/ft_putendl_fd.c
+++ b/libft/src/ft_putendl_fd.c
@@ -12,8 +12,7 @@
#include <libft.h>
-void
- ft_putendl_fd(char *s, int fd)
+void ft_putendl_fd(char *s, int fd)
{
ft_putstr_fd(s, fd);
ft_putchar_fd('\n', fd);
diff --git a/libft/src/ft_putnbr.c b/libft/src/ft_putnbr.c
index 3aacca3..cd6bf9b 100644
--- a/libft/src/ft_putnbr.c
+++ b/libft/src/ft_putnbr.c
@@ -14,8 +14,7 @@
#include <unistd.h>
#include <inttypes.h>
-void
- ft_putnbr(long nb)
+void ft_putnbr(long nb)
{
long i;
@@ -31,5 +30,7 @@ void
ft_putchar((i % 10) + '0');
}
else
+ {
ft_putchar(i + '0');
+ }
}
diff --git a/libft/src/ft_putnbr_base.c b/libft/src/ft_putnbr_base.c
index 3a04cad..3468b6b 100644
--- a/libft/src/ft_putnbr_base.c
+++ b/libft/src/ft_putnbr_base.c
@@ -13,8 +13,7 @@
#include <libft.h>
#include <inttypes.h>
-void
- ft_putnbr_base(long nb, char *base)
+void ft_putnbr_base(long nb, char *base)
{
long i;
uint8_t size;
@@ -32,5 +31,7 @@ void
ft_putnbr_base(i % size, base);
}
else
+ {
ft_putchar(base[nb]);
+ }
}
diff --git a/libft/src/ft_putnbr_fd.c b/libft/src/ft_putnbr_fd.c
index 437a6e6..0fad8e8 100644
--- a/libft/src/ft_putnbr_fd.c
+++ b/libft/src/ft_putnbr_fd.c
@@ -12,8 +12,7 @@
#include <libft.h>
-void
- ft_putnbr_fd(int n, int fd)
+void ft_putnbr_fd(int n, int fd)
{
unsigned int i;
@@ -29,5 +28,7 @@ void
ft_putchar_fd((i % 10) + 48, fd);
}
else
+ {
ft_putchar_fd(i + 48, fd);
+ }
}
diff --git a/libft/src/ft_putnchar.c b/libft/src/ft_putnchar.c
index 5fdfc3f..c960cd2 100644
--- a/libft/src/ft_putnchar.c
+++ b/libft/src/ft_putnchar.c
@@ -13,8 +13,7 @@
#include <libft.h>
#include <stddef.h>
-int
- ft_putnchar(int c, const size_t n)
+int ft_putnchar(int c, const size_t n)
{
size_t i;
diff --git a/libft/src/ft_putstr.c b/libft/src/ft_putstr.c
index 5cd7a6d..d4b0669 100644
--- a/libft/src/ft_putstr.c
+++ b/libft/src/ft_putstr.c
@@ -13,8 +13,7 @@
#include <libft.h>
#include <unistd.h>
-int
- ft_putstr(const char *s)
+int ft_putstr(const char *s)
{
return (write(1, s, ft_strlen(s)));
}
diff --git a/libft/src/ft_putstr_fd.c b/libft/src/ft_putstr_fd.c
index ae827a1..04665d4 100644
--- a/libft/src/ft_putstr_fd.c
+++ b/libft/src/ft_putstr_fd.c
@@ -13,8 +13,7 @@
#include <libft.h>
#include <unistd.h>
-int
- ft_putstr_fd(char *s, int fd)
+int ft_putstr_fd(char *s, int fd)
{
return (write(fd, s, ft_strlen(s)));
}