summaryrefslogtreecommitdiff
path: root/examples/list_null.c
diff options
context:
space:
mode:
authorTom Harley2020-01-11 19:46:15 +0000
committerTom Harley2020-01-11 19:46:15 +0000
commit9e87372371794bc3e7d46698141966c00acaad0e (patch)
tree068da13d97cefed2e49ab06843e1dd9d97c32f6a /examples/list_null.c
parentAdded int width specifiers (diff)
downloadsinter-9e87372371794bc3e7d46698141966c00acaad0e.tar.gz
sinter-9e87372371794bc3e7d46698141966c00acaad0e.zip

Tidying up

  • Removed unused example files
  • Removed redundant common.c
  • Added extra files to make sure the current version compiles the nqueens solution correctly
  • Added extensionless files to .gitignore
  • Added a way to install sinter
Diffstat (limited to 'examples/list_null.c')
-rw-r--r--examples/list_null.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/examples/list_null.c b/examples/list_null.c
deleted file mode 100644
index 85a3d2c..0000000
--- a/examples/list_null.c
+++ /dev/null
@@ -1,27 +0,0 @@
-typedef struct list_t {
- void *content;
- struct list_t *next;
-} list_t;
-
-void *list(void *head, void *tail) {
- list_t *ret = gc_alloc(sizeof (*ret));
- ret->content = head;
- ret->next = (list_t *) tail;
- return ret;
-}
-
-void *nil() {
- return (void *) 0;
-}
-
-void *head(void *list) {
- return list->head;
-}
-
-void *tail(void *list) {
- return list->tail;
-}
-
-void *has_tail(void *list) {
- return list->tail;
-}