-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlist.h
42 lines (37 loc) · 818 Bytes
/
list.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* (C)opyright 2007 Nico Golde <[email protected]>
* See LICENSE file for license details
*/
/**
* \file list.h
* \brief linked list
*/
/**
* \struct node_t
* \brief node for linked list
*/
typedef struct node{
char *name; /**< node name */
struct node *next; /**< pointer to the next node */
} node_t;
/**
* \struct list_t
* \brief linked list
*/
typedef struct{
int length; /**< list length */
node_t *top; /**< pointer to top node */
node_t *last; /**< pointer to last node */
} list_t;
/**
* Lists contents (for libacpi directories) of a directory
* and return them in a linked list
* @param dir directory to list
* @return linked list
*/
list_t *dir_list(char *dir);
/**
* Delete linked list
* @param lst list to delete
*/
void delete_list(list_t *lst);