fx.collections: update header directories
This commit is contained in:
+30
-10
@@ -1,6 +1,6 @@
|
||||
#include <fx/core/iterator.h>
|
||||
#include <fx/core/queue.h>
|
||||
#include <fx/ds/list.h>
|
||||
#include <fx/collections/list.h>
|
||||
#include <fx/iterator.h>
|
||||
#include <fx/queue.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -109,7 +109,9 @@ static struct fx_list_entry *make_entry(void *item)
|
||||
}
|
||||
|
||||
static struct fx_list_entry *list_insert_before(
|
||||
struct fx_list_p *q, void *ptr, struct fx_list_entry *before)
|
||||
struct fx_list_p *q,
|
||||
void *ptr,
|
||||
struct fx_list_entry *before)
|
||||
{
|
||||
struct fx_list_entry *entry = make_entry(ptr);
|
||||
if (!entry) {
|
||||
@@ -122,7 +124,9 @@ static struct fx_list_entry *list_insert_before(
|
||||
}
|
||||
|
||||
static struct fx_list_entry *list_insert_after(
|
||||
struct fx_list_p *q, void *ptr, struct fx_list_entry *after)
|
||||
struct fx_list_p *q,
|
||||
void *ptr,
|
||||
struct fx_list_entry *after)
|
||||
{
|
||||
struct fx_list_entry *entry = make_entry(ptr);
|
||||
if (!entry) {
|
||||
@@ -226,7 +230,9 @@ static fx_status list_delete_item(struct fx_list_p *q, void *ptr)
|
||||
return FX_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_status list_delete_entry(struct fx_list_p *q, struct fx_list_entry *entry)
|
||||
static fx_status list_delete_entry(
|
||||
struct fx_list_p *q,
|
||||
struct fx_list_entry *entry)
|
||||
{
|
||||
fx_queue_delete(&q->l_queue, &entry->e_entry);
|
||||
q->l_len--;
|
||||
@@ -314,15 +320,29 @@ size_t fx_list_length(const fx_list *q)
|
||||
}
|
||||
|
||||
struct fx_list_entry *fx_list_insert_before(
|
||||
fx_list *q, void *ptr, struct fx_list_entry *before)
|
||||
fx_list *q,
|
||||
void *ptr,
|
||||
struct fx_list_entry *before)
|
||||
{
|
||||
FX_CLASS_DISPATCH_STATIC(FX_TYPE_LIST, list_insert_before, q, ptr, before);
|
||||
FX_CLASS_DISPATCH_STATIC(
|
||||
FX_TYPE_LIST,
|
||||
list_insert_before,
|
||||
q,
|
||||
ptr,
|
||||
before);
|
||||
}
|
||||
|
||||
struct fx_list_entry *fx_list_insert_after(
|
||||
fx_list *q, void *ptr, struct fx_list_entry *after)
|
||||
fx_list *q,
|
||||
void *ptr,
|
||||
struct fx_list_entry *after)
|
||||
{
|
||||
FX_CLASS_DISPATCH_STATIC(FX_TYPE_LIST, list_insert_after, q, ptr, after);
|
||||
FX_CLASS_DISPATCH_STATIC(
|
||||
FX_TYPE_LIST,
|
||||
list_insert_after,
|
||||
q,
|
||||
ptr,
|
||||
after);
|
||||
}
|
||||
|
||||
struct fx_list_entry *fx_list_push_front(fx_list *q, void *ptr)
|
||||
|
||||
Reference in New Issue
Block a user