aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/stack.h')
-rw-r--r--hardinfo2/stack.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/hardinfo2/stack.h b/hardinfo2/stack.h
new file mode 100644
index 00000000..e706de2e
--- /dev/null
+++ b/hardinfo2/stack.h
@@ -0,0 +1,27 @@
+/*
+ * Simple Pascal Compiler
+ * Stack
+ *
+ * Copyright (c) 2007-2008 Leandro A. F. Pereira <leandro@hardinfo.org>
+ */
+#ifndef __STACK_H__
+#define __STACK_H__
+
+#include <glib.h>
+
+typedef struct _Stack Stack;
+
+struct _Stack {
+ GSList *_stack;
+};
+
+
+Stack *stack_new(void);
+void stack_free(Stack *stack);
+
+gboolean stack_is_empty(Stack *stack);
+void stack_push(Stack *stack, gpointer data);
+gpointer stack_pop(Stack *stack);
+gpointer stack_peek(Stack *stack);
+
+#endif /* __STACK_H__ */