summaryrefslogtreecommitdiff
path: root/command_handling.c
diff options
context:
space:
mode:
authorDominik Kaiser2024-04-15 17:54:43 +0200
committerDominik Kaiser2024-04-15 17:54:43 +0200
commit4545c9f4dc339e94bf6ebe0963db55e9dcc131bd (patch)
treeef13af63281b0c7b08b48ade575bec87031055d2 /command_handling.c
parentedede8f8fd0ef6a51271bd7c12a784d9acbad7a8 (diff)
downloadpush_swap-4545c9f4dc339e94bf6ebe0963db55e9dcc131bd.tar.gz
push_swap-4545c9f4dc339e94bf6ebe0963db55e9dcc131bd.zip
Change stacks from linked lists to rotating arrays
Diffstat (limited to 'command_handling.c')
-rw-r--r--command_handling.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/command_handling.c b/command_handling.c
index b1fe85a..e4dc476 100644
--- a/command_handling.c
+++ b/command_handling.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/13 14:38:47 by dkaiser #+# #+# */
-/* Updated: 2024/04/13 14:47:55 by dkaiser ### ########.fr */
+/* Updated: 2024/04/15 16:35:05 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -31,14 +31,14 @@ static int add_cmd_to_queue(t_list **cmds, enum e_pscmd cmd)
return (0);
}
-static void run_for_both(t_list **stack_a, t_list **stack_b,
- void (*f)(t_list **))
+static void run_for_both(t_stack *stack_a, t_stack *stack_b,
+ void (*f)(t_stack *))
{
f(stack_a);
f(stack_b);
}
-void run_command(t_list **stack_a, t_list **stack_b, t_list **cmds,
+void run_command(t_stack *stack_a, t_stack *stack_b, t_list **cmds,
enum e_pscmd cmd)
{
if (cmd == SA)