aboutsummaryrefslogtreecommitdiff
path: root/src/list.h
blob: 71594ad410b247417e57fa837a6284689b5856df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * src/list.h
 * (c) 2021 Jonas Gunz <himself@jonasgunz.de>
 * License: MIT
 */

#pragma once

#include <stdio.h>
#include <stdlib.h>

typedef struct list_element list_element_t;

struct list_element {
	void* data;
	list_element_t* next;
};

int list_add( list_element_t** _root, void* _data );

int list_sort ( list_element_t** _root );

int list_length ( list_element_t* _root );

void* list_pop_front ( list_element_t** _root );