diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-14 18:50:02 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-14 18:50:02 +0100 |
| commit | f061613650f5e7c5e260a4d9a1ca1b1d80ca2f2c (patch) | |
| tree | f66480fb58bf9780a074809af09705bfc4cc94c7 /src/common | |
| parent | 535ce22f99694460f32030db9655206a9341c6da (diff) | |
| download | push_swap-f061613650f5e7c5e260a4d9a1ca1b1d80ca2f2c.tar.gz push_swap-f061613650f5e7c5e260a4d9a1ca1b1d80ca2f2c.tar.bz2 push_swap-f061613650f5e7c5e260a4d9a1ca1b1d80ca2f2c.zip | |
Added checker base
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/action.c | 56 | ||||
| -rw-r--r-- | src/common/action.h | 19 | ||||
| -rw-r--r-- | src/common/common.h (renamed from src/common/stack.h) | 20 | ||||
| -rw-r--r-- | src/common/stack.c | 2 |
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) { |
