aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/stack.h
diff options
context:
space:
mode:
authorLeandro Augusto Fogolin Pereira <leandro@zorg.(none)>2009-02-08 10:06:30 -0200
committerLeandro Augusto Fogolin Pereira <leandro@zorg.(none)>2009-02-08 10:06:30 -0200
commit444dca3f3d7e4b035e23d55cde33338d33f912ce (patch)
treec94cc6b3d0fb05c9c944291a8048134bcc72e199 /hardinfo2/stack.h
parentb09158b2cb9e98669a95fbb58763882d36fcd446 (diff)
Cleanups
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__ */