diff --git a/libft b/libft index 75ebffd..071672f 160000 --- a/libft +++ b/libft @@ -1 +1 @@ -Subproject commit 75ebffddeadd84c4330e6348e097456ccb4abe19 +Subproject commit 071672f7c1a48be2d4eb4c4f9821240610d9a7b6 diff --git a/srcs/checker.c b/srcs/checker.c index f672bf3..56317b4 100644 --- a/srcs/checker.c +++ b/srcs/checker.c @@ -6,7 +6,7 @@ /* By: tmaze +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/02/23 13:35:15 by tmaze #+# #+# */ -/* Updated: 2019/03/18 17:24:12 by tmaze ### ########.fr */ +/* Updated: 2019/03/19 13:41:54 by tmaze ### ########.fr */ /* */ /* ************************************************************************** */ @@ -77,7 +77,7 @@ int read_ops(t_psdata *data) ft_bzero(tmp, 4); while ((ret = ft_getline(&buff)) > 0) { - ft_printf("checker read '%s'\n"); + ft_printf("=== debug ===\nbuff: '%s'\n", buff); ft_strncpy(tmp, buff, 3); if (ft_strlen(buff) > 4 || !is_op(buff) || (nop = ft_lstnew(tmp, 4)) == NULL) diff --git a/srcs/ps_sort.c b/srcs/ps_sort.c index 8d06ef2..89fc250 100644 --- a/srcs/ps_sort.c +++ b/srcs/ps_sort.c @@ -6,7 +6,7 @@ /* By: tmaze +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/16 13:21:02 by tmaze #+# #+# */ -/* Updated: 2019/03/18 17:36:47 by tmaze ### ########.fr */ +/* Updated: 2019/03/19 12:35:27 by tmaze ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,7 +16,6 @@ static int join_lists(t_psdata *data, t_stack **last, int inds, int inds2) { while ((*last)->ind == inds2 || data->size_b > 0) { - ft_printf("last nb %d ind %d inds2 %d\n", (*last)->nb, (*last)->ind, inds2); if (((*last)->ind != inds2 && data->size_b > 0) || (data->size_b > 0 && data->b->nb > (*last)->nb)) { @@ -33,6 +32,7 @@ static int join_lists(t_psdata *data, t_stack **last, int inds, int inds2) data->a->ind = inds; (*last) = get_last_a(data); } + (*last) = get_last_a(data); } return (1); } @@ -67,16 +67,9 @@ int sort(t_psdata *data) t_stack *last; int inds; int inds2; - t_stack *ptr; last = get_last_a(data); inds = last->ind + 1; - ptr = data->a; - while (ptr) - { - ft_printf("nb: %d ind %d\n", ptr->nb, ptr->ind); - ptr = ptr->next; - } while (data->a->ind != last->ind) { inds2 = data->a->ind; diff --git a/srcs/push_swap.c b/srcs/push_swap.c index cbbe32d..4f32b98 100644 --- a/srcs/push_swap.c +++ b/srcs/push_swap.c @@ -6,7 +6,7 @@ /* By: tmaze +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/03 11:41:49 by tmaze #+# #+# */ -/* Updated: 2019/03/18 15:18:04 by tmaze ### ########.fr */ +/* Updated: 2019/03/19 14:51:40 by tmaze ### ########.fr */ /* */ /* ************************************************************************** */