aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/action.c56
-rw-r--r--src/common/action.h19
-rw-r--r--src/common/common.h (renamed from src/common/stack.h)20
-rw-r--r--src/common/stack.c2
4 files changed, 77 insertions, 20 deletions
diff --git a/src/common/action.c b/src/common/action.c
index e69de29..bfbe436 100644
--- a/src/common/action.c
+++ b/src/common/action.c
@@ -0,0 +1,56 @@
+#include "common.h"
+
+void swap_a(t_stack *a)
+{
+
+}
+
+void swap_b(t_stack *b)
+{
+
+}
+
+void swap_both(t_stack *a, t_stack *b)
+{
+
+}
+
+void push_a(t_stack *a, t_stack *b)
+{
+
+}
+
+void push_b(t_stack *b, t_stack *a)
+{
+
+}
+
+void rotate_a(t_stack *a)
+{
+
+}
+
+void rotate_b(t_stack *b)
+{
+
+}
+
+void rotate_both(t_stack *a, t_stack *b)
+{
+
+}
+
+void reverse_rotate_a(t_stack *a)
+{
+
+}
+
+void reverse_rotate_b(t_stack *b)
+{
+
+}
+
+void reverse_rotate_both(t_stack *a, t_stack *b)
+{
+
+}
diff --git a/src/common/action.h b/src/common/action.h
deleted file mode 100644
index d458c49..0000000
--- a/src/common/action.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef ACTION_H
-# define ACTION_H
-
-# include "stack.h"
-
-void swap_a(t_stack *a);
-void swap_b(t_stack *b);
-void swap_both(t_stack *a, t_stack *b);
-void push_a(t_stack *a, t_stack *b);
-void push_b(t_stack *b, t_stack *a);
-void rotate_a(t_stack *a);
-void rotate_b(t_stack *b);
-void rotate_both(t_stack *a, t_stack *b);
-void reverse_rotate_a(t_stack *a);
-void reverse_rotate_b(t_stack *b);
-void reverse_rotate_both(t_stack *a, t_stack *b);
-
-
-#endif
diff --git a/src/common/stack.h b/src/common/common.h
index a85a333..4225d87 100644
--- a/src/common/stack.h
+++ b/src/common/common.h
@@ -10,6 +10,10 @@ typedef struct
int top;
} t_stack;
+/*
+** stack.c
+*/
+
t_stack *stack_new(int size);
void stack_destroy(t_stack *stack);
void stack_push(t_stack *stack, int n);
@@ -20,4 +24,20 @@ void stack_push_to(t_stack *from, t_stack *to);
void stack_rotate(t_stack *stack);
void stack_reverse_rotate(t_stack *stack);
+/*
+** action.c
+*/
+
+void swap_a(t_stack *a);
+void swap_b(t_stack *b);
+void swap_both(t_stack *a, t_stack *b);
+void push_a(t_stack *a, t_stack *b);
+void push_b(t_stack *b, t_stack *a);
+void rotate_a(t_stack *a);
+void rotate_b(t_stack *b);
+void rotate_both(t_stack *a, t_stack *b);
+void reverse_rotate_a(t_stack *a);
+void reverse_rotate_b(t_stack *b);
+void reverse_rotate_both(t_stack *a, t_stack *b);
+
#endif
diff --git a/src/common/stack.c b/src/common/stack.c
index cbd0986..693fb85 100644
--- a/src/common/stack.c
+++ b/src/common/stack.c
@@ -1,4 +1,4 @@
-#include "stack.h"
+#include "common.h"
t_stack *stack_new(int size)
{