List access standardization
This commit is contained in:
parent
ab75d629d3
commit
426f391561
@ -6,22 +6,18 @@
|
||||
#ifndef LIBCDSB_EXTRA_LIST_H
|
||||
#define LIBCDSB_EXTRA_LIST_H
|
||||
|
||||
typedef int (*list_foreach_callback)(void* value, ssize_t index, vtype type, void* data);
|
||||
|
||||
|
||||
#define list_get_by_index(x, s, index) libcdsb_list_get(x, s, index, 0)
|
||||
#define list_pop_by_index(x, s, index) libcdsb_list_get(x, s, index, 1)
|
||||
#define list_remove_by_index(s, index) libcdsb_list_get(0, s, index, 1)
|
||||
#define list_get_by_index(x, index, data, callback) libcdsb_list_get(x, index, data, callback, 0)
|
||||
#define list_pop_by_index(x, index, data, callback) libcdsb_list_get(x, index, data, callback, 1)
|
||||
#define list_remove_by_index(x, index) libcdsb_list_get(x, index, 0, 0, 1)
|
||||
|
||||
#define list_foreach(x, data, callback) libcdsb_list_foreach(x, data, callback, 0)
|
||||
|
||||
extern ssize_t libcdsb_list_find (vtype_value* x, vtype_list* s, const void* value, vtype type, _Bool reverse, _Bool cut) LIBCDSB_nt__ LIBCDSB_nn2__;
|
||||
extern _Bool libcdsb_list_update(vtype_list* x, ssize_t index, const void* value, vtype type, int ins_direction) LIBCDSB_nt__ LIBCDSB_nn1__;
|
||||
|
||||
extern size_t libcdsb_list_count(const vtype_list* s, const void* value, vtype type) LIBCDSB_nt__ LIBCDSB_nn1__;
|
||||
|
||||
extern ssize_t libcdsb_list_get(vtype_value* x, vtype_list* s, ssize_t index, _Bool cut) LIBCDSB_nt__ LIBCDSB_nn2__;
|
||||
|
||||
extern int libcdsb_list_foreach(vtype_list* x, void* data, list_foreach_callback, _Bool flush) LIBCDSB_nt__ LIBCDSB_nn13__;
|
||||
extern int libcdsb_list_find (vtype_list* x, const void* value, vtype type, void* data, list_access_callback, _Bool reverse, _Bool cut) LIBCDSB_nt__ LIBCDSB_nn1__;
|
||||
extern int libcdsb_list_get (vtype_list* x, ssize_t index, void* data, list_access_callback, _Bool cut) LIBCDSB_nt__ LIBCDSB_nn1__;
|
||||
extern int libcdsb_list_foreach(vtype_list* x, void* data, list_access_callback, _Bool flush) LIBCDSB_nt__ LIBCDSB_nn13__;
|
||||
|
||||
#endif /* LIBCDSB_EXTRA_LIST_H */
|
||||
|
@ -9,19 +9,20 @@
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
typedef int (*list_access_callback)(void* value, ssize_t index, vtype type, void* data);
|
||||
|
||||
extern void list_init(vtype_list* x);
|
||||
extern void list_extend(vtype_list* x, const vtype_list* s);
|
||||
|
||||
extern void list_sort(vtype_list* x);
|
||||
extern void list_reverse(vtype_list* x);
|
||||
|
||||
#define list_pop(x, s, value) _LIBCDSB_Generic(libcdsb_list, find, value)(x, s, value, 0, 1)
|
||||
#define list_find(x, s, value) _LIBCDSB_Generic(libcdsb_list, find, value)(x, s, value, 0, 0)
|
||||
#define list_rfind(x, s, value) _LIBCDSB_Generic(libcdsb_list, find, value)(x, s, value, 1, 0)
|
||||
#define list_countof(s, value) _LIBCDSB_Generic(libcdsb_list, count, value)(s, value)
|
||||
#define list_indexof(s, value) list_find(0, s, value)
|
||||
#define list_remove(s, value) list_pop(0, s, value)
|
||||
#define in_list(s, value) (list_indexof(s, value) >= 0)
|
||||
#define list_pop(x, value, data, callback) _LIBCDSB_Generic(libcdsb_list, find, value)(x, value, data, callback, 0, 1)
|
||||
#define list_find(x, value, data, callback) _LIBCDSB_Generic(libcdsb_list, find, value)(x, value, data, callback, 0, 0)
|
||||
#define list_rfind(x, value, data, callback) _LIBCDSB_Generic(libcdsb_list, find, value)(x, value, data, callback, 1, 0)
|
||||
#define list_countof(x, value) _LIBCDSB_Generic(libcdsb_list, count, value)(x, value)
|
||||
#define list_remove(x, value) list_pop(x, value, 0, 0)
|
||||
#define in_list(x, value) (list_find(x, value, 0, 0) == 0)
|
||||
|
||||
#define list_insert(x, index, value) _LIBCDSB_Generic(libcdsb_list, update, value)(x, index, value, -1)
|
||||
#define list_replace(x, index, value) _LIBCDSB_Generic(libcdsb_list, update, value)(x, index, value, 0)
|
||||
@ -30,25 +31,25 @@ extern void list_reverse(vtype_list* x);
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
extern ssize_t libcdsb_list_find_pointer(vtype_value* x, vtype_list* s, const void* value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_cstring(vtype_value* x, vtype_list* s, const char* value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_string (vtype_value* x, vtype_list* s, const vtype_string* value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_array (vtype_value* x, vtype_list* s, const vtype_array* value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_list (vtype_value* x, vtype_list* s, const vtype_list* value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_map (vtype_value* x, vtype_list* s, const vtype_map* value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_vset (vtype_value* x, vtype_list* s, const vtype_set* value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_boolean(vtype_value* x, vtype_list* s, vtype_bool value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_int8 (vtype_value* x, vtype_list* s, vtype_int8 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_int16 (vtype_value* x, vtype_list* s, vtype_int16 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_int32 (vtype_value* x, vtype_list* s, vtype_int32 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_int64 (vtype_value* x, vtype_list* s, vtype_int64 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_uint8 (vtype_value* x, vtype_list* s, vtype_uint8 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_uint16 (vtype_value* x, vtype_list* s, vtype_uint16 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_uint32 (vtype_value* x, vtype_list* s, vtype_uint32 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_uint64 (vtype_value* x, vtype_list* s, vtype_uint64 value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_float (vtype_value* x, vtype_list* s, vtype_float value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_double (vtype_value* x, vtype_list* s, vtype_double value, _Bool reverse, _Bool cut);
|
||||
extern ssize_t libcdsb_list_find_ldouble(vtype_value* x, vtype_list* s, vtype_ldouble value, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_pointer(vtype_list* x, const void* value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_cstring(vtype_list* x, const char* value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_string (vtype_list* x, const vtype_string* value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_array (vtype_list* x, const vtype_array* value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_list (vtype_list* x, const vtype_list* value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_map (vtype_list* x, const vtype_map* value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_vset (vtype_list* x, const vtype_set* value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_boolean(vtype_list* x, vtype_bool value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_int8 (vtype_list* x, vtype_int8 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_int16 (vtype_list* x, vtype_int16 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_int32 (vtype_list* x, vtype_int32 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_int64 (vtype_list* x, vtype_int64 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_uint8 (vtype_list* x, vtype_uint8 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_uint16 (vtype_list* x, vtype_uint16 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_uint32 (vtype_list* x, vtype_uint32 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_uint64 (vtype_list* x, vtype_uint64 value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_float (vtype_list* x, vtype_float value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_double (vtype_list* x, vtype_double value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
extern int libcdsb_list_find_ldouble(vtype_list* x, vtype_ldouble value, void* data, list_access_callback, _Bool reverse, _Bool cut);
|
||||
|
||||
extern size_t libcdsb_list_count_pointer(const vtype_list* s, const void* value);
|
||||
extern size_t libcdsb_list_count_cstring(const vtype_list* s, const char* value);
|
||||
|
178
src/list/extra.c
178
src/list/extra.c
@ -3,12 +3,9 @@
|
||||
|
||||
#include "include.h"
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
static void lnode_cut(list_t* s, lnode_t* cur) {
|
||||
|
||||
static void lnode_cut(val_t* x, list_t* s, lnode_t* cur) {
|
||||
if (!is_null(x)) {
|
||||
value_set(x, cur->node, cur->type, VF_WRITEABLE|VF_REMOVABLE);
|
||||
} else vnode_free(&cur->node, cur->type);
|
||||
vnode_free(&cur->node, cur->type);
|
||||
|
||||
if (!is_null(cur->prev)) {
|
||||
cur->prev->next = cur->next;
|
||||
@ -21,93 +18,6 @@ static void lnode_cut(val_t* x, list_t* s, lnode_t* cur) {
|
||||
free(cur);
|
||||
}
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
ssize_t libcdsb_list_get(val_t* x, list_t* s, ssize_t i, _Bool cut) {
|
||||
|
||||
ldir_t dir;
|
||||
lnode_t* c;
|
||||
size_t n;
|
||||
|
||||
if (i < 0) {
|
||||
n = (i = ~i);
|
||||
dir = LD_PREV;
|
||||
} else {
|
||||
n = i;
|
||||
dir = LD_NEXT;
|
||||
}
|
||||
|
||||
c = ldir_dir((lnode_t*)s, dir);
|
||||
|
||||
if (!is_null(x)) memset(x, 0, sizeof(*x));
|
||||
|
||||
while (n && !is_null(c)) {
|
||||
c = ldir_dir(c, dir);
|
||||
--n;
|
||||
}
|
||||
|
||||
if (n || is_null(c)) return -1;
|
||||
|
||||
if (!cut && !is_null(x)) {
|
||||
value_set(x, &c->node, c->type, VF_WRITEABLE|VF_CHANGEABLE);
|
||||
} else if (cut) lnode_cut(x, s, c);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
ssize_t libcdsb_list_find(val_t* x, list_t* s, const void* v, vtype t, _Bool r, _Bool cut) {
|
||||
ldir_t dir = r ? LD_PREV : LD_NEXT;
|
||||
|
||||
lnode_t* c;
|
||||
ssize_t i;
|
||||
int cmp;
|
||||
|
||||
c = ldir_dir((lnode_t*)s, dir);
|
||||
i = 0;
|
||||
|
||||
if (!is_null(x)) memset(x, 0, sizeof(*x));
|
||||
|
||||
while (!is_null(c)) {
|
||||
cmp = vtype_compare(vnode_peek(&c->node, c->type), c->type, v, t);
|
||||
|
||||
if (cmp == 0) {
|
||||
if (!cut && !is_null(x)) {
|
||||
value_set(x, &c->node, c->type, VF_WRITEABLE|VF_CHANGEABLE);
|
||||
} else if (cut) lnode_cut(x, s, c);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
c = ldir_dir(c, dir);
|
||||
++i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
size_t libcdsb_list_count(const list_t* s, const void* v, vtype t) {
|
||||
|
||||
lnode_t* c;
|
||||
size_t n;
|
||||
int cmp;
|
||||
|
||||
c = s->first;
|
||||
n = 0;
|
||||
|
||||
while (!is_null(c)) {
|
||||
cmp = vtype_compare(vnode_peek(&c->node, c->type), c->type, v, t);
|
||||
|
||||
if (cmp == 0) ++n;
|
||||
|
||||
c = c->next;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
@ -160,10 +70,88 @@ _Bool libcdsb_list_update(list_t* x, ssize_t i, const void* v, vtype t, int ins)
|
||||
}
|
||||
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
size_t libcdsb_list_count(const list_t* s, const void* v, vtype t) {
|
||||
|
||||
lnode_t* c;
|
||||
size_t n;
|
||||
int cmp;
|
||||
|
||||
c = s->first;
|
||||
n = 0;
|
||||
|
||||
while (!is_null(c)) {
|
||||
cmp = vtype_compare(vnode_peek(&c->node, c->type), c->type, v, t);
|
||||
|
||||
if (cmp == 0) ++n;
|
||||
|
||||
c = c->next;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
int libcdsb_list_foreach(vtype_list* x, void* data, list_foreach_callback callback, _Bool flush) {
|
||||
int libcdsb_list_get(vtype_list* x, ssize_t i, void* _, list_access_callback callback, _Bool cut) {
|
||||
|
||||
ldir_t dir;
|
||||
lnode_t* c;
|
||||
size_t n;
|
||||
|
||||
if (i < 0) {
|
||||
n = ~i;
|
||||
dir = LD_PREV;
|
||||
} else {
|
||||
n = i;
|
||||
dir = LD_NEXT;
|
||||
}
|
||||
|
||||
c = ldir_dir((lnode_t*)x, dir);
|
||||
|
||||
while (n && !is_null(c)) {
|
||||
c = ldir_dir(c, dir);
|
||||
--n;
|
||||
}
|
||||
|
||||
if (n || is_null(c)) return -1;
|
||||
|
||||
i = (callback) ? callback(vnode_peek(&c->node, c->type), i, c->type, _) : 0;
|
||||
|
||||
if (cut) lnode_cut(x, c);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
int libcdsb_list_find(vtype_list* x, const void* v, vtype t, void* _, list_access_callback callback, _Bool r, _Bool cut) {
|
||||
ldir_t dir;
|
||||
lnode_t* c;
|
||||
ssize_t i;
|
||||
int cmp;
|
||||
|
||||
dir = r ? LD_PREV : LD_NEXT;
|
||||
c = ldir_dir((lnode_t*)x, dir);
|
||||
i = 0;
|
||||
|
||||
while (!is_null(c)) {
|
||||
cmp = vtype_compare(vnode_peek(&c->node, c->type), c->type, v, t);
|
||||
|
||||
if (cmp == 0) {
|
||||
i = (callback) ? callback(vnode_peek(&c->node, c->type), (r)?~i:i, c->type, _) : 0;
|
||||
|
||||
if (cut) lnode_cut(x, c);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
c = ldir_dir(c, dir);
|
||||
++i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int libcdsb_list_foreach(vtype_list* x, void* data, list_access_callback callback, _Bool flush) {
|
||||
|
||||
lnode_t* n;
|
||||
lnode_t* c;
|
||||
@ -178,7 +166,7 @@ int libcdsb_list_foreach(vtype_list* x, void* data, list_foreach_callback callba
|
||||
break;
|
||||
|
||||
n = c->next;
|
||||
|
||||
|
||||
if (flush) {
|
||||
vnode_free(&c->node, c->type);
|
||||
free(c);
|
||||
|
@ -3,25 +3,25 @@
|
||||
|
||||
#include "include.h"
|
||||
|
||||
ssize_t libcdsb_list_find_pointer(val_t* x, list_t* s, const void* v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_cstring(val_t* x, list_t* s, const char* v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_string (val_t* x, list_t* s, const str_t* v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, v, vtypeof( v), r, cut); }
|
||||
ssize_t libcdsb_list_find_array (val_t* x, list_t* s, const arr_t* v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, v, vtypeof( v), r, cut); }
|
||||
ssize_t libcdsb_list_find_list (val_t* x, list_t* s, const list_t* v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, v, vtypeof( v), r, cut); }
|
||||
ssize_t libcdsb_list_find_map (val_t* x, list_t* s, const map_t* v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, v, vtypeof( v), r, cut); }
|
||||
ssize_t libcdsb_list_find_vset (val_t* x, list_t* s, const set_t* v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, v, vtypeof( v), r, cut); }
|
||||
ssize_t libcdsb_list_find_boolean(val_t* x, list_t* s, _Bool v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_int8 (val_t* x, list_t* s, s8_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_int16 (val_t* x, list_t* s, s16_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_int32 (val_t* x, list_t* s, s32_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_int64 (val_t* x, list_t* s, s64_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_uint8 (val_t* x, list_t* s, u8_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_uint16 (val_t* x, list_t* s, u16_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_uint32 (val_t* x, list_t* s, u32_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_uint64 (val_t* x, list_t* s, u64_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_float (val_t* x, list_t* s, fl_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_double (val_t* x, list_t* s, dbl_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
ssize_t libcdsb_list_find_ldouble(val_t* x, list_t* s, ldbl_t v, _Bool r, _Bool cut) { return libcdsb_list_find(x, s, &v, vtypeof(&v), r, cut); }
|
||||
int libcdsb_list_find_pointer(list_t* x, const void* v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_cstring(list_t* x, const char* v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_string (list_t* x, const str_t* v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, v, vtypeof( v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_array (list_t* x, const arr_t* v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, v, vtypeof( v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_list (list_t* x, const list_t* v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, v, vtypeof( v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_map (list_t* x, const map_t* v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, v, vtypeof( v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_vset (list_t* x, const set_t* v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, v, vtypeof( v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_boolean(list_t* x, _Bool v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_int8 (list_t* x, s8_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_int16 (list_t* x, s16_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_int32 (list_t* x, s32_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_int64 (list_t* x, s64_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_uint8 (list_t* x, u8_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_uint16 (list_t* x, u16_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_uint32 (list_t* x, u32_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_uint64 (list_t* x, u64_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_float (list_t* x, fl_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_double (list_t* x, dbl_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
int libcdsb_list_find_ldouble(list_t* x, ldbl_t v, void* _, list_access_callback cb, _Bool r, _Bool cut) { return libcdsb_list_find(x, &v, vtypeof(&v), _, cb, r, cut); }
|
||||
|
||||
size_t libcdsb_list_count_pointer(const list_t* s, const void* v) { return libcdsb_list_count((void*)s, &v, vtypeof(&v)); }
|
||||
size_t libcdsb_list_count_cstring(const list_t* s, const char* v) { return libcdsb_list_count((void*)s, &v, vtypeof(&v)); }
|
||||
|
Loading…
Reference in New Issue
Block a user