From 01a92f8c6e7268dd882ba0ea9a7a808248f1881f Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Thu, 3 Nov 2016 19:07:43 +0100 Subject: [PATCH] some norm changes --- libft/src/sstr/ft_sstradd.c | 12 ++++++++++++ libft/src/sstr/ft_sstrdel.c | 12 ++++++++++++ libft/src/sstr/ft_sstrdup.c | 12 ++++++++++++ libft/src/sstr/ft_sstrprint.c | 12 ++++++++++++ libft/src/sstr/ft_sstrsort.c | 12 ++++++++++++ libft/src/str/ft_convert_base.c | 5 +++-- libft/src/str/ft_str3join.c | 12 ++++++++++++ libft/src/str/ft_strcut.c | 12 ++++++++++++ libft/src/str/ft_strrev.c | 12 ++++++++++++ libft/src/time/ft_time_isrecent.c | 14 +++++++++++++- libft/src/xattr/ft_xattr_count.c | 13 ++++++++++++- libft/src/xattr/ft_xattr_print.c | 12 ++++++++++++ 12 files changed, 136 insertions(+), 4 deletions(-) diff --git a/libft/src/sstr/ft_sstradd.c b/libft/src/sstr/ft_sstradd.c index 97d1486a..4ec7bac9 100644 --- a/libft/src/sstr/ft_sstradd.c +++ b/libft/src/sstr/ft_sstradd.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_sstradd.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:03:58 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:04:23 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" char **ft_sstradd(char **sstr, char *new) diff --git a/libft/src/sstr/ft_sstrdel.c b/libft/src/sstr/ft_sstrdel.c index 41a71411..f539d73e 100644 --- a/libft/src/sstr/ft_sstrdel.c +++ b/libft/src/sstr/ft_sstrdel.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_sstrdel.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:04:07 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:04:08 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" void ft_sstrdel(char **sstr, int index) diff --git a/libft/src/sstr/ft_sstrdup.c b/libft/src/sstr/ft_sstrdup.c index f5403be2..d79d1467 100644 --- a/libft/src/sstr/ft_sstrdup.c +++ b/libft/src/sstr/ft_sstrdup.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_sstrdup.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:04:13 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:04:13 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" char **ft_sstrdup(char **list) diff --git a/libft/src/sstr/ft_sstrprint.c b/libft/src/sstr/ft_sstrprint.c index 9ad237c1..5d0b0c31 100644 --- a/libft/src/sstr/ft_sstrprint.c +++ b/libft/src/sstr/ft_sstrprint.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_sstrprint.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:04:15 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:04:15 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" void ft_sstrprint(char **list, char sep) diff --git a/libft/src/sstr/ft_sstrsort.c b/libft/src/sstr/ft_sstrsort.c index dd7d2611..b2985c70 100644 --- a/libft/src/sstr/ft_sstrsort.c +++ b/libft/src/sstr/ft_sstrsort.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_sstrsort.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:03:37 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:04:17 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" void ft_sstrsort(char **list, int size, int (*cmp)()) diff --git a/libft/src/str/ft_convert_base.c b/libft/src/str/ft_convert_base.c index a80f84fb..633a82ef 100644 --- a/libft/src/str/ft_convert_base.c +++ b/libft/src/str/ft_convert_base.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/08/07 23:31:20 by jhalford #+# #+# */ -/* Updated: 2016/08/25 17:32:17 by jhalford ### ########.fr */ +/* Updated: 2016/11/03 18:03:07 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -57,7 +57,8 @@ static int ft_check_str(char *str, char *base, int base_size) return (1); } -char *ft_convert_base(char *str, char *base_from, char *base_to, char *flags) +char *ft_convert_base( + char *str, char *base_from, char *base_to, char *flags) { int base_size; int res; diff --git a/libft/src/str/ft_str3join.c b/libft/src/str/ft_str3join.c index 2227a0e3..81bb69dc 100644 --- a/libft/src/str/ft_str3join.c +++ b/libft/src/str/ft_str3join.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_str3join.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:03:26 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:03:26 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" char *ft_str3join(char const *s1, char const *s2, char const *s3) diff --git a/libft/src/str/ft_strcut.c b/libft/src/str/ft_strcut.c index 5dda370e..75b4d51b 100644 --- a/libft/src/str/ft_strcut.c +++ b/libft/src/str/ft_strcut.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcut.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:04:37 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:04:37 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" char *ft_strcut(char *str, char *cut) diff --git a/libft/src/str/ft_strrev.c b/libft/src/str/ft_strrev.c index 685b0f31..73884204 100644 --- a/libft/src/str/ft_strrev.c +++ b/libft/src/str/ft_strrev.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strrev.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:01:36 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:01:36 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" char *ft_strrev(char *str) diff --git a/libft/src/time/ft_time_isrecent.c b/libft/src/time/ft_time_isrecent.c index 072e3fa1..032feb58 100644 --- a/libft/src/time/ft_time_isrecent.c +++ b/libft/src/time/ft_time_isrecent.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_time_isrecent.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:01:04 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:01:19 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" int ft_time_isrecent(time_t event) @@ -5,7 +17,7 @@ int ft_time_isrecent(time_t event) time_t now; now = time(&now); - if (now - event > 0 && now - event < 6*365/12*24*60*60) + if (now - event > 0 && now - event < 6 * 365 / 12 * 24 * 60 * 60) return (1); else return (0); diff --git a/libft/src/xattr/ft_xattr_count.c b/libft/src/xattr/ft_xattr_count.c index ac0abdc7..880c66d6 100644 --- a/libft/src/xattr/ft_xattr_count.c +++ b/libft/src/xattr/ft_xattr_count.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_xattr_count.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:00:52 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:00:56 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" int ft_xattr_count(char *path) @@ -9,7 +21,6 @@ int ft_xattr_count(char *path) i = 0; ft_bzero(list, FT_XATTR_SIZE); - /* printf("looking for xattr at: %s\n", path); */ listlen = listxattr(path, list, FT_XATTR_SIZE, XATTR_NOFOLLOW); if (listlen == -1) return (-1); diff --git a/libft/src/xattr/ft_xattr_print.c b/libft/src/xattr/ft_xattr_print.c index 7401fd64..444338e8 100644 --- a/libft/src/xattr/ft_xattr_print.c +++ b/libft/src/xattr/ft_xattr_print.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_xattr_print.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/11/03 18:00:43 by jhalford #+# #+# */ +/* Updated: 2016/11/03 18:00:44 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "libft.h" int ft_xattr_print(char *path)