summaryrefslogtreecommitdiff
path: root/include/engine/stack.h
diff options
context:
space:
mode:
author0scar <qgt268@alumni.ku.dk>2023-10-30 22:11:54 +0000
committer0scar <qgt268@alumni.ku.dk>2023-10-30 22:12:34 +0000
commit5c0311ff3095a5dd30fb15db54aa394498dd2bcf (patch)
tree2abb0e3dc145e4372fcf07aeeb736279d00471e5 /include/engine/stack.h
parent3e3fe3d42206dc14baca2f50445e6fe8bb2d2480 (diff)
The great formattening!
Diffstat (limited to 'include/engine/stack.h')
-rw-r--r--include/engine/stack.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/engine/stack.h b/include/engine/stack.h
index 636c306..69975df 100644
--- a/include/engine/stack.h
+++ b/include/engine/stack.h
@@ -28,22 +28,23 @@
#include "types.h"
typedef struct {
- isize head; /* current number of elements */
+ isize head; /* current number of elements */
const usize elem_size; /* size in bytes of each element */
- usize size; /* current memory size used by the stack */
- const usize chunk_size; /* size of which the stack increases when running out of mem */
- void *data; /* memory buffer */
+ usize size; /* current memory size used by the stack */
+ const usize chunk_size; /* size of which the stack increases when running out
+ of mem */
+ void* data; /* memory buffer */
} Stack;
Stack stack_new_ex(const usize element_size, const usize size);
Stack stack_new(const usize element_size);
-void stack_free(Stack *s);
-void *stack_pop(Stack *s);
-void stack_push(Stack *s, void *elem);
-void *stack_peek(Stack *s);
-isize stack_size(const Stack *s);
-void stack_swap(Stack *s, Stack *t);
+void stack_free(Stack* s);
+void* stack_pop(Stack* s);
+void stack_push(Stack* s, void* elem);
+void* stack_peek(Stack* s);
+isize stack_size(const Stack* s);
+void stack_swap(Stack* s, Stack* t);
#endif