You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
827 B
49 lines
827 B
4 years ago
|
#ifndef WFP_UTIL_SLIST_H
|
||
|
#define WFP_UTIL_SLIST_H
|
||
6 years ago
|
|
||
|
#ifndef __cplusplus
|
||
|
#include <stdbool.h>
|
||
|
#endif
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C"
|
||
|
{
|
||
|
#endif
|
||
|
|
||
4 years ago
|
struct wfp_slist_item
|
||
6 years ago
|
{
|
||
4 years ago
|
struct wfp_slist_item * next;
|
||
6 years ago
|
};
|
||
|
|
||
4 years ago
|
struct wfp_slist
|
||
6 years ago
|
{
|
||
4 years ago
|
struct wfp_slist_item head;
|
||
|
struct wfp_slist_item * last;
|
||
6 years ago
|
};
|
||
|
|
||
4 years ago
|
extern void wfp_slist_init(
|
||
|
struct wfp_slist * list);
|
||
6 years ago
|
|
||
4 years ago
|
extern bool wfp_slist_empty(
|
||
|
struct wfp_slist * list);
|
||
6 years ago
|
|
||
4 years ago
|
extern struct wfp_slist_item * wfp_slist_first(
|
||
|
struct wfp_slist * list);
|
||
5 years ago
|
|
||
4 years ago
|
extern void wfp_slist_append(
|
||
|
struct wfp_slist * list,
|
||
|
struct wfp_slist_item * item);
|
||
6 years ago
|
|
||
4 years ago
|
extern struct wfp_slist_item * wfp_slist_remove_first(
|
||
|
struct wfp_slist * list);
|
||
6 years ago
|
|
||
4 years ago
|
extern struct wfp_slist_item * wfp_slist_remove_after(
|
||
|
struct wfp_slist * list,
|
||
|
struct wfp_slist_item * prev);
|
||
6 years ago
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif
|