2020-06-28 17:43:08 +00:00
|
|
|
#ifndef WF_IMPL_UTIL_SLIST_H
|
|
|
|
#define WF_IMPL_UTIL_SLIST_H
|
2019-04-17 20:51:16 +00:00
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
#include <stdbool.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct wf_slist_item
|
|
|
|
{
|
|
|
|
struct wf_slist_item * next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wf_slist
|
|
|
|
{
|
2019-04-26 18:50:57 +00:00
|
|
|
struct wf_slist_item head;
|
2019-04-17 20:51:16 +00:00
|
|
|
struct wf_slist_item * last;
|
|
|
|
};
|
|
|
|
|
2020-06-28 17:43:08 +00:00
|
|
|
extern void wf_impl_slist_init(
|
2019-04-17 20:51:16 +00:00
|
|
|
struct wf_slist * list);
|
|
|
|
|
2020-06-28 17:43:08 +00:00
|
|
|
extern bool wf_impl_slist_empty(
|
2019-04-17 20:51:16 +00:00
|
|
|
struct wf_slist * list);
|
|
|
|
|
2020-06-28 17:43:08 +00:00
|
|
|
extern struct wf_slist_item * wf_impl_slist_first(
|
2019-04-26 18:50:57 +00:00
|
|
|
struct wf_slist * list);
|
|
|
|
|
2020-06-28 17:43:08 +00:00
|
|
|
extern void wf_impl_slist_append(
|
2019-04-17 20:51:16 +00:00
|
|
|
struct wf_slist * list,
|
|
|
|
struct wf_slist_item * item);
|
|
|
|
|
2020-06-28 17:43:08 +00:00
|
|
|
extern struct wf_slist_item * wf_impl_slist_remove_first(
|
2019-04-17 20:51:16 +00:00
|
|
|
struct wf_slist * list);
|
|
|
|
|
2020-06-28 17:43:08 +00:00
|
|
|
extern struct wf_slist_item * wf_impl_slist_remove_after(
|
2019-04-17 20:51:16 +00:00
|
|
|
struct wf_slist * list,
|
|
|
|
struct wf_slist_item * prev);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|