aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-01-26 13:40:52 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-01-26 13:40:52 +0100
commit0d9aa82da7d665c66c996ff45584e7a3de39d629 (patch)
tree0df65cb7986ef514af25a99b495302e7c9673a8a
parent2d909147580279eee111eb4791fb7738fda638c8 (diff)
downloadpintos-linked-list-0d9aa82da7d665c66c996ff45584e7a3de39d629.tar.gz
main.h
-rw-r--r--main.c7
-rw-r--r--main.h11
2 files changed, 12 insertions, 6 deletions
diff --git a/main.c b/main.c
index 6173f26..87f2f01 100644
--- a/main.c
+++ b/main.c
@@ -1,13 +1,8 @@
-#include "list.h"
+#include "main.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-struct student {
- char *name;
- struct list_elem elem;
-};
-
// Read a line from stdin, strip the eventual newline and return a pointer
// to the string. Remember to free the pointer.
char *read_input() {
diff --git a/main.h b/main.h
new file mode 100644
index 0000000..79c81ad
--- /dev/null
+++ b/main.h
@@ -0,0 +1,11 @@
+#include "list.h"
+
+struct student {
+ char *name;
+ struct list_elem elem;
+};
+
+void insert(struct list *student_list);
+void delete(struct list *student_list);
+void list(struct list *student_list);
+void quit(struct list *student_list);