diff options
Diffstat (limited to 'src/libdatastruct')
-rw-r--r-- | src/libdatastruct/avlnode_delete.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/avlnode_insertnode.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/avlnode_iter.c | 4 | ||||
-rw-r--r-- | src/libdatastruct/avlnode_iter_withcancel.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/avlnode_search.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/avlnode_searchnode.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/avltree_init.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/avltreen_init.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/bigkv_fill.c | 14 | ||||
-rw-r--r-- | src/libdatastruct/bigkv_free.c | 4 | ||||
-rw-r--r-- | src/libdatastruct/bigkv_search.c | 4 | ||||
-rw-r--r-- | src/libdatastruct/bigkv_zero.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/genset_deepfree.c | 4 | ||||
-rw-r--r-- | src/libdatastruct/genset_iter_nocancel.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/genset_iter_withcancel.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/gensetdyn_deepfree.c | 4 | ||||
-rw-r--r-- | src/libdatastruct/gensetdyn_iter.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/gensetdyn_iter_withcancel.c | 2 |
18 files changed, 29 insertions, 29 deletions
diff --git a/src/libdatastruct/avlnode_delete.c b/src/libdatastruct/avlnode_delete.c index 8e57bf8..e75e0cc 100644 --- a/src/libdatastruct/avlnode_delete.c +++ b/src/libdatastruct/avlnode_delete.c @@ -3,7 +3,7 @@ #include <skalibs/avlnode.h> #include "avlnode-internal.h" -uint32_t avlnode_delete (avlnode *s, uint32_t max, uint32_t *root, void const *k, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p) +uint32_t avlnode_delete (avlnode *s, uint32_t max, uint32_t *root, void const *k, dtok_func_ref dtok, cmp_func_ref f, void *p) { uint32_t stack[AVLNODE_MAXDEPTH] ; int spin[AVLNODE_MAXDEPTH] ; diff --git a/src/libdatastruct/avlnode_insertnode.c b/src/libdatastruct/avlnode_insertnode.c index fa94811..cfeb6d4 100644 --- a/src/libdatastruct/avlnode_insertnode.c +++ b/src/libdatastruct/avlnode_insertnode.c @@ -3,7 +3,7 @@ #include <skalibs/avlnode.h> #include "avlnode-internal.h" -uint32_t avlnode_insertnode (avlnode *s, uint32_t max, uint32_t r, uint32_t i, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p) +uint32_t avlnode_insertnode (avlnode *s, uint32_t max, uint32_t r, uint32_t i, dtok_func_ref dtok, cmp_func_ref f, void *p) { uint32_t stack[AVLNODE_MAXDEPTH] ; int spin[AVLNODE_MAXDEPTH] ; diff --git a/src/libdatastruct/avlnode_iter.c b/src/libdatastruct/avlnode_iter.c index 47813f2..50e1b3a 100644 --- a/src/libdatastruct/avlnode_iter.c +++ b/src/libdatastruct/avlnode_iter.c @@ -8,7 +8,7 @@ struct avlnode_iter_s avlnode const *s ; uint32_t max ; uint32_t cut ; - avliterfunc_t_ref f ; + avliter_func_ref f ; void *p ; } ; @@ -24,7 +24,7 @@ static uint32_t avlnode_iter_rec (struct avlnode_iter_s const *blah, uint32_t r, return avlnode_iter_rec(blah, blah->s[r].child[1], h+1) ; } -uint32_t avlnode_iter_nocancel (avlnode *s, uint32_t max, uint32_t cut, uint32_t r, avliterfunc_t_ref f, void *p) +uint32_t avlnode_iter_nocancel (avlnode *s, uint32_t max, uint32_t cut, uint32_t r, avliter_func_ref f, void *p) { struct avlnode_iter_s blah = { .s = s, .max = max, .cut = cut, .f = f, .p = p } ; return avlnode_iter_rec(&blah, r, 0) ; diff --git a/src/libdatastruct/avlnode_iter_withcancel.c b/src/libdatastruct/avlnode_iter_withcancel.c index c029799..a9e7802 100644 --- a/src/libdatastruct/avlnode_iter_withcancel.c +++ b/src/libdatastruct/avlnode_iter_withcancel.c @@ -3,7 +3,7 @@ #include <errno.h> #include <skalibs/avlnode.h> -int avlnode_iter_withcancel (avlnode *tree, uint32_t max, uint32_t root, avliterfunc_t_ref f, avliterfunc_t_ref cancelf, void *stuff) +int avlnode_iter_withcancel (avlnode *tree, uint32_t max, uint32_t root, avliter_func_ref f, avliter_func_ref cancelf, void *stuff) { uint32_t cut = avlnode_iter_nocancel(tree, max, max, root, f, stuff) ; if (cut != max) diff --git a/src/libdatastruct/avlnode_search.c b/src/libdatastruct/avlnode_search.c index dca53ee..373f255 100644 --- a/src/libdatastruct/avlnode_search.c +++ b/src/libdatastruct/avlnode_search.c @@ -3,7 +3,7 @@ #include <errno.h> #include <skalibs/avlnode.h> -int avlnode_search (avlnode const *s, uint32_t max, uint32_t r, void const *k, uint32_t *data, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p) +int avlnode_search (avlnode const *s, uint32_t max, uint32_t r, void const *k, uint32_t *data, dtok_func_ref dtok, cmp_func_ref f, void *p) { uint32_t i = avlnode_searchnode(s, max, r, k, dtok, f, p) ; if (i >= max) return (errno = ESRCH, 0) ; diff --git a/src/libdatastruct/avlnode_searchnode.c b/src/libdatastruct/avlnode_searchnode.c index f655561..044d18d 100644 --- a/src/libdatastruct/avlnode_searchnode.c +++ b/src/libdatastruct/avlnode_searchnode.c @@ -3,7 +3,7 @@ #include <skalibs/avlnode.h> #include "avlnode-internal.h" -uint32_t avlnode_searchnode (avlnode const *s, uint32_t max, uint32_t r, void const *k, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p) +uint32_t avlnode_searchnode (avlnode const *s, uint32_t max, uint32_t r, void const *k, dtok_func_ref dtok, cmp_func_ref f, void *p) { while (r < max) { diff --git a/src/libdatastruct/avltree_init.c b/src/libdatastruct/avltree_init.c index fd14a3a..a9ead6e 100644 --- a/src/libdatastruct/avltree_init.c +++ b/src/libdatastruct/avltree_init.c @@ -6,7 +6,7 @@ #include <skalibs/avlnode.h> #include <skalibs/avltree.h> -void avltree_init (avltree *t, uint32_t base, uint32_t fracnum, uint32_t fracden, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p) +void avltree_init (avltree *t, uint32_t base, uint32_t fracnum, uint32_t fracden, dtok_func_ref dtok, cmp_func_ref f, void *p) { gensetdyn_init(&t->x, sizeof(avlnode), base, fracnum, fracden) ; t->root = UINT32_MAX ; diff --git a/src/libdatastruct/avltreen_init.c b/src/libdatastruct/avltreen_init.c index 3ac4482..8d1dfa1 100644 --- a/src/libdatastruct/avltreen_init.c +++ b/src/libdatastruct/avltreen_init.c @@ -4,7 +4,7 @@ #include <skalibs/avlnode.h> #include <skalibs/avltreen.h> -void avltreen_init (avltreen *t, avlnode *storage, uint32_t *freelist, uint32_t size, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p) +void avltreen_init (avltreen *t, avlnode *storage, uint32_t *freelist, uint32_t size, dtok_func_ref dtok, cmp_func_ref f, void *p) { GENSET_init(&t->x, avlnode, storage, freelist, size) ; t->root = size ; diff --git a/src/libdatastruct/bigkv_fill.c b/src/libdatastruct/bigkv_fill.c index 06747c6..249a300 100644 --- a/src/libdatastruct/bigkv_fill.c +++ b/src/libdatastruct/bigkv_fill.c @@ -12,8 +12,8 @@ static void *bigkv_dtok (uint32_t d, void *p) { - bigkv_t *b = p ; - return b->storage.s + genalloc_s(bigkv_node_t, &b->nodes)[d].k ; + bigkv *b = p ; + return b->storage.s + genalloc_s(bigkv_node, &b->nodes)[d].k ; } static int bigkv_cmp (void const *a, void const *b, void *p) @@ -22,14 +22,14 @@ static int bigkv_cmp (void const *a, void const *b, void *p) return strcmp((char const *)a, (char const *)b) ; } -int bigkv_fill (bigkv_t *b, char const *const *argv, char delim, char const *prefix, char const *stop, uint32_t options) +int bigkv_fill (bigkv *b, char const *const *argv, char delim, char const *prefix, char const *stop, uint32_t options) { int i = 0 ; size_t prefixlen = prefix ? strlen(prefix) : 0 ; avltree_init(&b->map, 3, 3, 8, &bigkv_dtok, &bigkv_cmp, b) ; for (; argv[i] && !(stop && !strcmp(argv[i], stop)) ; i++) { - bigkv_node_t node = { .k = b->storage.len } ; + bigkv_node node = { .k = b->storage.len } ; char const *s = argv[i] ; size_t len = strlen(s) ; size_t pos ; @@ -56,11 +56,11 @@ int bigkv_fill (bigkv_t *b, char const *const *argv, char delim, char const *pre if (!stralloc_catb(&b->storage, s + pos + 1, len - pos)) goto err ; } else node.v = b->storage.len - 1 ; - if (isdup) genalloc_s(bigkv_node_t, &b->nodes)[d].v = node.v ; + if (isdup) genalloc_s(bigkv_node, &b->nodes)[d].v = node.v ; else { - d = genalloc_len(bigkv_node_t, &b->nodes) ; - if (!genalloc_append(bigkv_node_t, &b->nodes, &node)) goto err ; + d = genalloc_len(bigkv_node, &b->nodes) ; + if (!genalloc_append(bigkv_node, &b->nodes, &node)) goto err ; if (!avltree_insert(&b->map, d)) goto err ; } } diff --git a/src/libdatastruct/bigkv_free.c b/src/libdatastruct/bigkv_free.c index 848c614..68dbad5 100644 --- a/src/libdatastruct/bigkv_free.c +++ b/src/libdatastruct/bigkv_free.c @@ -5,10 +5,10 @@ #include <skalibs/avltree.h> #include <skalibs/bigkv.h> -void bigkv_free (bigkv_t *b) +void bigkv_free (bigkv *b) { avltree_free(&b->map) ; - genalloc_free(bigkv_node_t, &b->nodes) ; + genalloc_free(bigkv_node, &b->nodes) ; stralloc_free(&b->storage) ; *b = bigkv_zero ; } diff --git a/src/libdatastruct/bigkv_search.c b/src/libdatastruct/bigkv_search.c index bb91e3a..e9efe7a 100644 --- a/src/libdatastruct/bigkv_search.c +++ b/src/libdatastruct/bigkv_search.c @@ -4,9 +4,9 @@ #include <skalibs/avltree.h> #include <skalibs/bigkv.h> -char const *bigkv_search (bigkv_t const *b, char const *k) +char const *bigkv_search (bigkv const *b, char const *k) { uint32_t i ; if (!avltree_search(&b->map, k, &i)) return 0 ; - return b->storage.s + genalloc_s(bigkv_node_t, &b->nodes)[i].v ; + return b->storage.s + genalloc_s(bigkv_node, &b->nodes)[i].v ; } diff --git a/src/libdatastruct/bigkv_zero.c b/src/libdatastruct/bigkv_zero.c index 5fc262f..e0eca64 100644 --- a/src/libdatastruct/bigkv_zero.c +++ b/src/libdatastruct/bigkv_zero.c @@ -2,4 +2,4 @@ #include <skalibs/bigkv.h> -bigkv_t const bigkv_zero = BIGKV_ZERO ; +bigkv const bigkv_zero = BIGKV_ZERO ; diff --git a/src/libdatastruct/genset_deepfree.c b/src/libdatastruct/genset_deepfree.c index e219344..c58a5f9 100644 --- a/src/libdatastruct/genset_deepfree.c +++ b/src/libdatastruct/genset_deepfree.c @@ -5,12 +5,12 @@ static int freeiter (char *s, void *aux) { - freefunc_t_ref f = aux ; + free_func_ref f = aux ; (*f)((void *)s) ; return 1 ; } -void genset_deepfree (genset *g, freefunc_t_ref f) +void genset_deepfree (genset *g, free_func_ref f) { genset_iter(g, &freeiter, f) ; } diff --git a/src/libdatastruct/genset_iter_nocancel.c b/src/libdatastruct/genset_iter_nocancel.c index a7248a9..339f4b6 100644 --- a/src/libdatastruct/genset_iter_nocancel.c +++ b/src/libdatastruct/genset_iter_nocancel.c @@ -3,7 +3,7 @@ #include <skalibs/bitarray.h> #include <skalibs/genset.h> -uint32_t genset_iter_nocancel (genset *g, uint32_t n, iterfunc_t_ref f, void *stuff) +uint32_t genset_iter_nocancel (genset *g, uint32_t n, iter_func_ref f, void *stuff) { unsigned char bits[bitarray_div8(n)] ; uint32_t i = 0, j = 0, m = genset_n(g) ; diff --git a/src/libdatastruct/genset_iter_withcancel.c b/src/libdatastruct/genset_iter_withcancel.c index 1583cb4..1220dbc 100644 --- a/src/libdatastruct/genset_iter_withcancel.c +++ b/src/libdatastruct/genset_iter_withcancel.c @@ -4,7 +4,7 @@ #include <errno.h> #include <skalibs/genset.h> -int genset_iter_withcancel (genset *g, iterfunc_t_ref f, iterfunc_t_ref cancelf, void *stuff) +int genset_iter_withcancel (genset *g, iter_func_ref f, iter_func_ref cancelf, void *stuff) { uint32_t n = genset_iter(g, f, stuff) ; if (n < g->max) diff --git a/src/libdatastruct/gensetdyn_deepfree.c b/src/libdatastruct/gensetdyn_deepfree.c index 8822bc3..2b0c87c 100644 --- a/src/libdatastruct/gensetdyn_deepfree.c +++ b/src/libdatastruct/gensetdyn_deepfree.c @@ -5,12 +5,12 @@ static int freeiter (char *s, void *aux) { - freefunc_t_ref f = aux ; + free_func_ref f = aux ; (*f)((void *)s) ; return 1 ; } -void gensetdyn_deepfree (gensetdyn *g, freefunc_t_ref f) +void gensetdyn_deepfree (gensetdyn *g, free_func_ref f) { gensetdyn_iter(g, &freeiter, f) ; gensetdyn_free(g) ; diff --git a/src/libdatastruct/gensetdyn_iter.c b/src/libdatastruct/gensetdyn_iter.c index 7943ab0..8470adf 100644 --- a/src/libdatastruct/gensetdyn_iter.c +++ b/src/libdatastruct/gensetdyn_iter.c @@ -4,7 +4,7 @@ #include <skalibs/bitarray.h> #include <skalibs/gensetdyn.h> -uint32_t gensetdyn_iter_nocancel (gensetdyn *g, uint32_t n, iterfunc_t_ref f, void *stuff) +uint32_t gensetdyn_iter_nocancel (gensetdyn *g, uint32_t n, iter_func_ref f, void *stuff) { /* XXX: we may be called by a freeing function, so we cannot alloc - diff --git a/src/libdatastruct/gensetdyn_iter_withcancel.c b/src/libdatastruct/gensetdyn_iter_withcancel.c index 0c5c35d..0a250ce 100644 --- a/src/libdatastruct/gensetdyn_iter_withcancel.c +++ b/src/libdatastruct/gensetdyn_iter_withcancel.c @@ -4,7 +4,7 @@ #include <errno.h> #include <skalibs/gensetdyn.h> -int gensetdyn_iter_withcancel (gensetdyn *g, iterfunc_t_ref f, iterfunc_t_ref cancelf, void *stuff) +int gensetdyn_iter_withcancel (gensetdyn *g, iter_func_ref f, iter_func_ref cancelf, void *stuff) { uint32_t n = gensetdyn_iter_nocancel(g, gensetdyn_n(g), f, stuff) ; if (n < gensetdyn_n(g)) |