summaryrefslogtreecommitdiff
path: root/src/sp_list.h
blob: 7ceee50f5dae8335483cf9fd03c418eeb3af9782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef SP_LIST_H
#define SP_LIST_H

typedef struct sp_node_s {
  struct sp_node_s *next;
  void *data;

} sp_list_node;

sp_list_node *sp_list_sort(sp_list_node *, int (*)(sp_list_node const *const,
                                                   sp_list_node const *const));
sp_list_node *sp_list_insert(sp_list_node *, void *);
sp_list_node *sp_list_prepend(sp_list_node *, void *);
void sp_list_free(sp_list_node *, void (*free_data_func)(void *data));
void sp_list_free2(sp_list_node *node);

#endif