diff options
Diffstat (limited to 'include/stc/clist.h')
| -rw-r--r-- | include/stc/clist.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/stc/clist.h b/include/stc/clist.h index de874927..f257bc19 100644 --- a/include/stc/clist.h +++ b/include/stc/clist.h @@ -34,19 +34,19 @@ int main() { - c_AUTO (clist_ix, list) + c_auto (clist_ix, list) { int n; for (int i = 0; i < 1000000; ++i) // one million clist_ix_push_back(&list, crandom() >> 32); n = 0; - c_FOREACH (i, clist_ix, list) + c_foreach (i, clist_ix, list) if (++n % 10000 == 0) printf("%8d: %10zu\n", n, *i.ref); // Sort them... clist_ix_sort(&list); // mergesort O(n*log n) n = 0; puts("sorted"); - c_FOREACH (i, clist_ix, list) + c_foreach (i, clist_ix, list) if (++n % 10000 == 0) printf("%8d: %10zu\n", n, *i.ref); } } @@ -273,7 +273,7 @@ _clist_mergesort(clist_VOID_node *list, int (*cmp)(const clist_VOID_node*, const STC_DEF _cx_self _cx_memb(_clone)(_cx_self cx) { _cx_self out = _cx_memb(_init)(); - c_FOREACH (it, _cx_self, cx) + c_foreach (it, _cx_self, cx) _cx_memb(_push_back)(&out, i_keyclone((*it.ref))); return out; } @@ -406,7 +406,7 @@ _cx_memb(_split_off)(_cx_self* self, _cx_iter it1, _cx_iter it2) { STC_DEF _cx_iter _cx_memb(_find_in)(_cx_iter it1, _cx_iter it2, _cx_raw val) { - c_FOREACH (it, _cx_self, it1, it2) { + c_foreach (it, _cx_self, it1, it2) { _cx_raw r = i_keyto(it.ref); if (i_eq((&r), (&val))) return it; |
