diff options
Diffstat (limited to 'src/common/common.h')
| -rw-r--r-- | src/common/common.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/common/common.h b/src/common/common.h index 87c4655..c4efad8 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/18 11:20:54 by cacharle #+# #+# */ -/* Updated: 2020/01/22 10:25:47 by cacharle ### ########.fr */ +/* Updated: 2021/09/10 10:33:19 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,24 +14,25 @@ # define COMMON_H # include <stdlib.h> +# include <stdbool.h> # include "libft.h" -typedef enum +typedef enum e_status { - STATUS_SUCCESS, - STATUS_FAILURE, + STATUS_FAILURE = false, + STATUS_SUCCESS = true, STATUS_ERROR, STATUS_EOF, } t_status; -typedef enum +typedef enum e_stack_tag { STACK_NO_TAG, STACK_A, STACK_B } t_stack_tag; -typedef struct s_stack +typedef struct s_stack { int *elements; t_stack_tag tag; @@ -43,7 +44,7 @@ typedef struct s_stack */ t_stack *stack_new(int size); -void stack_destroy(t_stack *stack); +int stack_destroy(t_stack *stack); void stack_push(t_stack *stack, int n); void stack_pop(t_stack *stack); int stack_peek(t_stack *stack); |
