mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
49 lines
843 B
C
49 lines
843 B
C
#ifndef WF_IMPL_UTIL_SLIST_H
|
|
#define WF_IMPL_UTIL_SLIST_H
|
|
|
|
#ifndef __cplusplus
|
|
#include <stdbool.h>
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
struct wf_slist_item
|
|
{
|
|
struct wf_slist_item * next;
|
|
};
|
|
|
|
struct wf_slist
|
|
{
|
|
struct wf_slist_item head;
|
|
struct wf_slist_item * last;
|
|
};
|
|
|
|
extern void wf_impl_slist_init(
|
|
struct wf_slist * list);
|
|
|
|
extern bool wf_impl_slist_empty(
|
|
struct wf_slist * list);
|
|
|
|
extern struct wf_slist_item * wf_impl_slist_first(
|
|
struct wf_slist * list);
|
|
|
|
extern void wf_impl_slist_append(
|
|
struct wf_slist * list,
|
|
struct wf_slist_item * item);
|
|
|
|
extern struct wf_slist_item * wf_impl_slist_remove_first(
|
|
struct wf_slist * list);
|
|
|
|
extern struct wf_slist_item * wf_impl_slist_remove_after(
|
|
struct wf_slist * list,
|
|
struct wf_slist_item * prev);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|