aboutsummaryrefslogtreecommitdiffstats
path: root/src/misc/stack.h
blob: 14e557a58cb9bbd4107d058a5bfc6c470a4491ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef GSTACK_H
#define GSTACK_H GSTACK_H
#include<stdlib.h>
typedef struct Stack Stack;

struct Stack_Node
{
	struct Stack_Node *next;
	void *data;
};
struct Stack
{
	struct Stack_Node *first;
	size_t size;
};

void Stack_Init(Stack *stack);
void Stack_Push(Stack *stack,void* data);
void* Stack_Pop(Stack *stack);


#endif