From: Dominik Kaiser Date: Sat, 13 Apr 2024 13:31:29 +0000 (+0200) Subject: Add radixsort X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=9674332f03f434534017c0f70f3c213fa4ebb2bf;p=42%2Fpush_swap.git Add radixsort --- diff --git a/Makefile b/Makefile index 9a704a1..5509c89 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ LIBFT = libft CC = cc CFLAGS = -Wall -Wextra -Werror -SRC_FILES = main.c input_handling.c stack_utils.c command_handling.c +SRC_FILES = main.c input_handling.c stack_utils.c command_handling.c sorting.c OBJ_FILES = $(SRC_FILES:%.c=%.o) LIB_DIR = $(LIBFT) diff --git a/main.c b/main.c index 84cc7ad..1476fb1 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: dkaiser content >> bit) % 2 == 0) + run_command(stack_a, stack_b, cmds, PB); + else + run_command(stack_a, stack_b, cmds, RA); + i++; + } + while (*stack_b) + run_command(stack_a, stack_b, cmds, PA); + bit++; + } +} +void stack_sort(t_list **stack_a, t_list **stack_b, t_list **cmds) +{ + stack_radixsort(stack_a, stack_b, cmds); }