diff --git a/libftasm/includes/btree.h b/libftasm/includes/btree.h index 8235f122..6a60a5df 100644 --- a/libftasm/includes/btree.h +++ b/libftasm/includes/btree.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/16 11:13:15 by jhalford #+# #+# */ -/* Updated: 2016/11/16 11:14:02 by jhalford ### ########.fr */ +/* Updated: 2016/11/25 18:33:24 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,6 +25,14 @@ struct s_btree struct s_btree *right; }; +enum e_printdata +{ + is_left, + offset, + depth, +}; + + t_btree *btree_create_node(void const *item, size_t content_size); void btree_insert_data( diff --git a/libftasm/includes/mytime.h b/libftasm/includes/mytime.h index 1bd8c58f..ad6ec422 100644 --- a/libftasm/includes/mytime.h +++ b/libftasm/includes/mytime.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/25 11:43:12 by jhalford #+# #+# */ -/* Updated: 2016/11/25 18:28:27 by jhalford ### ########.fr */ +/* Updated: 2016/11/25 18:33:09 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,8 @@ # define MYTIME_H # include "libft.h" +typedef struct s_mytime t_mytime; + struct s_mytime { char *year; @@ -24,7 +26,6 @@ struct s_mytime char *sec; }; -typedef struct s_mytime t_mytime; int ft_time_isrecent(time_t event); diff --git a/libftasm/src/btree/btree_print.c b/libftasm/src/btree/btree_print.c index 040cc966..4e44e8cc 100644 --- a/libftasm/src/btree/btree_print.c +++ b/libftasm/src/btree/btree_print.c @@ -6,19 +6,12 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/14 18:06:24 by jhalford #+# #+# */ -/* Updated: 2016/11/25 18:28:42 by jhalford ### ########.fr */ +/* Updated: 2016/11/25 18:33:47 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "btree.h" -enum e_data -{ - is_left, - offset, - depth, -}; - static int print_t(t_btree *tree, int data[3], char s[20][255], char *(*printer)(void *)) { @@ -45,8 +38,8 @@ static int print_t(t_btree *tree, while (++i < width + right) s[2 * data[depth] - 1][data[offset] + left + width / 2 + i] = '-'; s[2 * data[depth] - 1][data[offset] + left + width / 2] = '+'; - s[2 * data[depth] - 1][ - data[offset] + left + right + 3 * width / 2] = '+'; + s[2 * data[depth] - 1][ data[offset] + left + right + 3 * width / 2] + = '+'; } else if (data[depth] && !data[is_left]) {